From 9c0d7d72d70082a54f823cd44c0ccda5da64bb6f Mon Sep 17 00:00:00 2001 From: Doug McLain Date: Mon, 2 Jun 2008 05:02:28 +0000 Subject: [PATCH] remove empty sigc++2 directory git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/.cvsignore | 1 - libs/appleutility/AUOutputBL.cpp | 160 - libs/appleutility/AUOutputBL.h | 115 - libs/appleutility/AUParamInfo.cpp | 134 - libs/appleutility/AUParamInfo.h | 107 - libs/appleutility/CAAUParameter.cpp | 316 - libs/appleutility/CAAUParameter.h | 187 - libs/appleutility/CAAudioChannelLayout.cpp | 138 - libs/appleutility/CAAudioChannelLayout.h | 162 - .../CAAudioChannelLayoutObject.cpp | 199 - libs/appleutility/CAAudioFile.cpp | 1241 - libs/appleutility/CAAudioFile.h | 439 - libs/appleutility/CAAudioUnit.cpp | 1202 - libs/appleutility/CAAudioUnit.h | 383 - libs/appleutility/CABufferList.cpp | 179 - libs/appleutility/CABufferList.h | 300 - libs/appleutility/CACFDictionary.cpp | 478 - libs/appleutility/CACFDictionary.h | 141 - libs/appleutility/CACFNumber.cpp | 65 - libs/appleutility/CACFNumber.h | 102 - libs/appleutility/CACFString.cpp | 106 - libs/appleutility/CACFString.h | 156 - libs/appleutility/CAComponent.cpp | 257 - libs/appleutility/CAComponent.h | 120 - libs/appleutility/CAComponentDescription.cpp | 123 - libs/appleutility/CAComponentDescription.h | 148 - libs/appleutility/CAConditionalMacros.h | 74 - libs/appleutility/CADebugMacros.cpp | 84 - libs/appleutility/CADebugMacros.h | 414 - libs/appleutility/CAMath.h | 64 - libs/appleutility/CAReferenceCounted.h | 83 - .../appleutility/CAStreamBasicDescription.cpp | 520 - libs/appleutility/CAStreamBasicDescription.h | 224 - libs/appleutility/CAXException.cpp | 45 - libs/appleutility/CAXException.h | 158 - libs/appleutility/SConscript | 22 - libs/ardour/.cvsignore | 8 - libs/ardour/ChangeLog | 118 - libs/ardour/SConscript | 395 - libs/ardour/amp.cc | 102 - libs/ardour/analyser.cc | 119 - libs/ardour/ardour/.cvsignore | 1 - libs/ardour/ardour/amp.h | 44 - libs/ardour/ardour/analyser.h | 35 - libs/ardour/ardour/ardour.h | 87 - libs/ardour/ardour/audio_buffer.h | 121 - libs/ardour/ardour/audio_diskstream.h | 277 - libs/ardour/ardour/audio_library.h | 54 - libs/ardour/ardour/audio_port.h | 46 - libs/ardour/ardour/audio_track.h | 80 - libs/ardour/ardour/audio_unit.h | 172 - libs/ardour/ardour/audioanalyser.h | 74 - libs/ardour/ardour/audioengine.h | 276 - libs/ardour/ardour/audiofilesource.h | 183 - libs/ardour/ardour/audioplaylist.h | 93 - libs/ardour/ardour/audioregion.h | 204 - libs/ardour/ardour/audiosource.h | 159 - libs/ardour/ardour/auditioner.h | 70 - libs/ardour/ardour/auto_bundle.h | 50 - libs/ardour/ardour/automatable.h | 121 - libs/ardour/ardour/automation_control.h | 64 - libs/ardour/ardour/automation_event.h | 309 - libs/ardour/ardour/base_audio_port.h | 106 - libs/ardour/ardour/base_midi_port.h | 67 - libs/ardour/ardour/buffer.h | 92 - libs/ardour/ardour/buffer_set.h | 159 - libs/ardour/ardour/bundle.h | 73 - libs/ardour/ardour/caimportable.h | 48 - libs/ardour/ardour/chan_count.h | 126 - libs/ardour/ardour/click.h | 45 - libs/ardour/ardour/configuration.h | 106 - libs/ardour/ardour/configuration_variable.h | 184 - libs/ardour/ardour/configuration_vars.h | 176 - libs/ardour/ardour/control_protocol_manager.h | 93 - .../ardour/control_protocol_search_path.h | 42 - libs/ardour/ardour/coreaudiosource.h | 57 - libs/ardour/ardour/crossfade.h | 179 - libs/ardour/ardour/crossfade_compare.h | 42 - libs/ardour/ardour/curve.h | 62 - libs/ardour/ardour/cycle_timer.h | 50 - libs/ardour/ardour/cycles.h | 221 - libs/ardour/ardour/dB.h | 33 - libs/ardour/ardour/data_type.h | 130 - libs/ardour/ardour/directory_names.h | 23 - libs/ardour/ardour/diskstream.h | 308 - libs/ardour/ardour/export.h | 107 - libs/ardour/ardour/filename_extensions.h | 17 - libs/ardour/ardour/filesystem_paths.h | 50 - libs/ardour/ardour/filter.h | 51 - libs/ardour/ardour/gain.h | 43 - libs/ardour/ardour/gdither.h | 92 - libs/ardour/ardour/gdither_types.h | 48 - libs/ardour/ardour/gdither_types_internal.h | 74 - libs/ardour/ardour/importable_source.h | 43 - libs/ardour/ardour/internal_audio_port.h | 55 - libs/ardour/ardour/internal_port.h | 82 - libs/ardour/ardour/io.h | 391 - libs/ardour/ardour/io_processor.h | 86 - libs/ardour/ardour/jack_audio_port.h | 51 - libs/ardour/ardour/jack_midi_port.h | 52 - libs/ardour/ardour/jack_port.h | 112 - libs/ardour/ardour/ladspa.h | 606 - libs/ardour/ardour/ladspa_plugin.h | 147 - libs/ardour/ardour/latent.h | 26 - libs/ardour/ardour/location.h | 206 - libs/ardour/ardour/logcurve.h | 132 - libs/ardour/ardour/lv2_plugin.h | 171 - libs/ardour/ardour/meter.h | 77 - libs/ardour/ardour/midi_buffer.h | 102 - libs/ardour/ardour/midi_diskstream.h | 184 - libs/ardour/ardour/midi_model.h | 252 - libs/ardour/ardour/midi_playlist.h | 84 - libs/ardour/ardour/midi_port.h | 47 - libs/ardour/ardour/midi_region.h | 121 - libs/ardour/ardour/midi_ring_buffer.h | 466 - libs/ardour/ardour/midi_source.h | 119 - libs/ardour/ardour/midi_stretch.h | 40 - libs/ardour/ardour/midi_track.h | 111 - libs/ardour/ardour/midi_util.h | 73 - libs/ardour/ardour/mix.h | 65 - libs/ardour/ardour/named_selection.h | 55 - libs/ardour/ardour/noise.h | 38 - libs/ardour/ardour/note.h | 82 - libs/ardour/ardour/osc.h | 120 - libs/ardour/ardour/panner.h | 299 - libs/ardour/ardour/parameter.h | 168 - libs/ardour/ardour/pcm_utils.h | 41 - libs/ardour/ardour/peak.h | 36 - libs/ardour/ardour/pitch.h | 62 - libs/ardour/ardour/playlist.h | 287 - libs/ardour/ardour/playlist_factory.h | 44 - libs/ardour/ardour/playlist_templates.h | 48 - libs/ardour/ardour/plugin.h | 174 - libs/ardour/ardour/plugin_insert.h | 131 - libs/ardour/ardour/plugin_manager.h | 101 - libs/ardour/ardour/port.h | 180 - libs/ardour/ardour/port_insert.h | 73 - libs/ardour/ardour/port_set.h | 161 - libs/ardour/ardour/processor.h | 123 - libs/ardour/ardour/profile.h | 58 - libs/ardour/ardour/quantize.h | 41 - libs/ardour/ardour/rb_effect.h | 42 - libs/ardour/ardour/readable.h | 20 - libs/ardour/ardour/recent_sessions.h | 39 - libs/ardour/ardour/region.h | 313 - libs/ardour/ardour/region_factory.h | 64 - libs/ardour/ardour/resampled_source.h | 55 - libs/ardour/ardour/reverse.h | 37 - libs/ardour/ardour/route.h | 384 - libs/ardour/ardour/route_group.h | 124 - libs/ardour/ardour/route_group_specialized.h | 41 - libs/ardour/ardour/runtime_functions.h | 40 - libs/ardour/ardour/send.h | 74 - libs/ardour/ardour/session.h | 1714 - libs/ardour/ardour/session_directory.h | 136 - libs/ardour/ardour/session_object.h | 65 - libs/ardour/ardour/session_playlist.h | 46 - libs/ardour/ardour/session_region.h | 38 - libs/ardour/ardour/session_route.h | 76 - libs/ardour/ardour/session_selection.h | 39 - libs/ardour/ardour/session_state_utils.h | 65 - libs/ardour/ardour/session_utils.h | 26 - libs/ardour/ardour/silentfilesource.h | 68 - libs/ardour/ardour/slave.h | 153 - libs/ardour/ardour/smf_reader.h | 87 - libs/ardour/ardour/smf_source.h | 151 - libs/ardour/ardour/smpte.h | 79 - libs/ardour/ardour/sndfile_helpers.h | 58 - libs/ardour/ardour/sndfileimportable.h | 50 - libs/ardour/ardour/sndfilesource.h | 109 - libs/ardour/ardour/soundseq.h | 53 - libs/ardour/ardour/source.h | 112 - libs/ardour/ardour/source_factory.h | 60 - libs/ardour/ardour/spline.h | 90 - libs/ardour/ardour/stretch.h | 62 - libs/ardour/ardour/tape_file_matcher.h | 45 - libs/ardour/ardour/template_utils.h | 20 - libs/ardour/ardour/tempo.h | 322 - libs/ardour/ardour/timestamps.h | 32 - libs/ardour/ardour/track.h | 151 - libs/ardour/ardour/transient_detector.h | 58 - libs/ardour/ardour/types.h | 443 - libs/ardour/ardour/user_bundle.h | 72 - libs/ardour/ardour/utils.h | 76 - libs/ardour/ardour/vst_plugin.h | 116 - libs/ardour/audio_buffer.cc | 82 - libs/ardour/audio_diskstream.cc | 2490 - libs/ardour/audio_library.cc | 154 - libs/ardour/audio_playlist.cc | 788 - libs/ardour/audio_port.cc | 126 - libs/ardour/audio_track.cc | 884 - libs/ardour/audio_unit.cc | 924 - libs/ardour/audioanalyser.cc | 166 - libs/ardour/audioengine.cc | 1379 - libs/ardour/audiofilesource.cc | 759 - libs/ardour/audioregion.cc | 1402 - libs/ardour/audiosource.cc | 932 - libs/ardour/auditioner.cc | 233 - libs/ardour/auto_bundle.cc | 47 - libs/ardour/automatable.cc | 477 - libs/ardour/automation.cc | 32 - libs/ardour/automation_control.cc | 91 - libs/ardour/automation_event.cc | 1666 - libs/ardour/base_audio_port.cc | 82 - libs/ardour/base_midi_port.cc | 67 - libs/ardour/buffer.cc | 45 - libs/ardour/buffer_set.cc | 177 - libs/ardour/bundle.cc | 282 - libs/ardour/caimportable.cc | 118 - libs/ardour/chan_count.cc | 48 - libs/ardour/configuration.cc | 371 - libs/ardour/control_protocol_manager.cc | 390 - libs/ardour/control_protocol_search_path.cc | 52 - libs/ardour/coreaudiosource.cc | 270 - libs/ardour/crossfade.cc | 904 - libs/ardour/curve.cc | 406 - libs/ardour/cycle_timer.cc | 74 - libs/ardour/default_click.cc | 1174 - libs/ardour/directory_names.cc | 19 - libs/ardour/diskstream.cc | 411 - libs/ardour/enums.cc | 388 - libs/ardour/filename_extensions.cc | 15 - libs/ardour/filesystem_paths.cc | 106 - libs/ardour/filter.cc | 123 - libs/ardour/find_session.cc | 167 - libs/ardour/gain.cc | 61 - libs/ardour/gdither.cc | 474 - libs/ardour/gettext.h | 82 - libs/ardour/globals.cc | 619 - libs/ardour/i18n.h | 16 - libs/ardour/import.cc | 491 - libs/ardour/internal_audio_port.cc | 71 - libs/ardour/internal_port.cc | 163 - libs/ardour/io.cc | 2612 - libs/ardour/io_processor.cc | 107 - libs/ardour/jack_audio_port.cc | 55 - libs/ardour/jack_midi_port.cc | 91 - libs/ardour/jack_port.cc | 179 - libs/ardour/jack_slave.cc | 95 - libs/ardour/ladspa_plugin.cc | 663 - libs/ardour/location.cc | 915 - libs/ardour/lv2_plugin.cc | 625 - .../macosx/English.lproj/InfoPlist.strings | Bin 142 -> 0 bytes libs/ardour/macosx/Info.plist | 26 - .../macosx/ardour.xcodeproj/project.pbxproj | 1214 - libs/ardour/macosx/ardour_Prefix.pch | 4 - libs/ardour/macosx/version.cc | 3 - libs/ardour/macosx/version.h | 17 - libs/ardour/meter.cc | 165 - libs/ardour/midi_buffer.cc | 282 - libs/ardour/midi_diskstream.cc | 1461 - libs/ardour/midi_model.cc | 953 - libs/ardour/midi_playlist.cc | 318 - libs/ardour/midi_port.cc | 112 - libs/ardour/midi_region.cc | 363 - libs/ardour/midi_source.cc | 206 - libs/ardour/midi_stretch.cc | 108 - libs/ardour/midi_track.cc | 769 - libs/ardour/mix.cc | 176 - libs/ardour/mtc_slave.cc | 357 - libs/ardour/named_selection.cc | 130 - libs/ardour/note.cc | 110 - libs/ardour/osc.cc | 480 - libs/ardour/panner.cc | 1489 - libs/ardour/parameter.cc | 121 - libs/ardour/pcm_utils.cc | 177 - libs/ardour/playlist.cc | 2367 - libs/ardour/playlist_factory.cc | 111 - libs/ardour/plugin.cc | 243 - libs/ardour/plugin_insert.cc | 917 - libs/ardour/plugin_manager.cc | 489 - libs/ardour/po/el_GR.po | 2195 - libs/ardour/po/it_IT.po | 2236 - libs/ardour/po/pl_PL.po | 2063 - libs/ardour/po/ru_RU.po | 2000 - libs/ardour/po/sv_SE.po | 2025 - libs/ardour/port.cc | 379 - libs/ardour/port_insert.cc | 246 - libs/ardour/port_set.cc | 126 - libs/ardour/processor.cc | 255 - libs/ardour/quantize.cc | 85 - libs/ardour/rb_effect.cc | 298 - libs/ardour/recent_sessions.cc | 135 - libs/ardour/region.cc | 1532 - libs/ardour/region_factory.cc | 181 - libs/ardour/resampled_source.cc | 128 - libs/ardour/reverse.cc | 130 - libs/ardour/route.cc | 2676 - libs/ardour/route_group.cc | 213 - libs/ardour/send.cc | 228 - libs/ardour/session.cc | 4273 -- libs/ardour/session_butler.cc | 471 - libs/ardour/session_click.cc | 223 - libs/ardour/session_command.cc | 544 - libs/ardour/session_directory.cc | 148 - libs/ardour/session_events.cc | 453 - libs/ardour/session_export.cc | 652 - libs/ardour/session_feedback.cc | 49 - libs/ardour/session_midi.cc | 1211 - libs/ardour/session_process.cc | 886 - libs/ardour/session_state.cc | 3219 - libs/ardour/session_state_utils.cc | 76 - libs/ardour/session_time.cc | 606 - libs/ardour/session_transport.cc | 1355 - libs/ardour/session_utils.cc | 39 - libs/ardour/session_vst.cc | 315 - libs/ardour/silentfilesource.cc | 39 - libs/ardour/smf_reader.cc | 285 - libs/ardour/smf_source.cc | 971 - libs/ardour/sndfile_helpers.cc | 209 - libs/ardour/sndfileimportable.cc | 47 - libs/ardour/sndfilesource.cc | 900 - libs/ardour/source.cc | 269 - libs/ardour/source_factory.cc | 278 - libs/ardour/sse_functions.s | 531 - libs/ardour/sse_functions_64bit.s | 609 - libs/ardour/sse_functions_xmm.cc | 116 - libs/ardour/st_pitch.cc | 52 - libs/ardour/st_stretch.cc | 215 - libs/ardour/tape_file_matcher.cc | 62 - libs/ardour/template_utils.cc | 34 - libs/ardour/tempo.cc | 1539 - libs/ardour/track.cc | 224 - libs/ardour/transient_detector.cc | 118 - libs/ardour/user_bundle.cc | 198 - libs/ardour/utils.cc | 529 - libs/ardour/vst_plugin.cc | 512 - libs/cairomm/AUTHORS | 10 - libs/cairomm/COPYING | 481 - libs/cairomm/ChangeLog | 964 - libs/cairomm/INSTALL | 9 - libs/cairomm/MAINTAINERS | 8 - libs/cairomm/MSVC/Makefile.am | 3 - libs/cairomm/MSVC/Makefile.in | 498 - libs/cairomm/MSVC/README | 12 - libs/cairomm/MSVC/blank.cpp | 11 - libs/cairomm/MSVC/cairomm.sln | 73 - libs/cairomm/MSVC/cairomm/Makefile.am | 5 - libs/cairomm/MSVC/cairomm/Makefile.in | 350 - libs/cairomm/MSVC/cairomm/cairomm.rc | 72 - libs/cairomm/MSVC/cairomm/cairomm.rc.in | 72 - libs/cairomm/MSVC/cairomm/cairomm.vcproj | 310 - libs/cairomm/MSVC/examples/Makefile.am | 1 - libs/cairomm/MSVC/examples/Makefile.in | 497 - .../MSVC/examples/pdf-surface/Makefile.am | 1 - .../MSVC/examples/pdf-surface/Makefile.in | 340 - .../examples/pdf-surface/pdf-surface.vcproj | 213 - .../MSVC/examples/png_file/Makefile.am | 1 - .../MSVC/examples/png_file/Makefile.in | 340 - .../MSVC/examples/png_file/png_file.vcproj | 213 - .../MSVC/examples/ps-surface/Makefile.am | 1 - .../MSVC/examples/ps-surface/Makefile.in | 340 - .../examples/ps-surface/ps-surface.vcproj | 213 - .../MSVC/examples/svg-surface/Makefile.am | 1 - .../MSVC/examples/svg-surface/Makefile.in | 340 - .../examples/svg-surface/svg-surface.vcproj | 213 - .../MSVC/examples/text-rotate/Makefile.am | 1 - .../MSVC/examples/text-rotate/Makefile.in | 340 - .../examples/text-rotate/text-rotate.vcproj | 213 - libs/cairomm/MSVC/gendef/Makefile.am | 2 - libs/cairomm/MSVC/gendef/Makefile.in | 340 - libs/cairomm/MSVC/gendef/gendef.cc | 94 - libs/cairomm/MSVC/gendef/gendef.vcproj | 206 - libs/cairomm/Makefile.am | 126 - libs/cairomm/Makefile.in | 770 - libs/cairomm/NEWS | 107 - libs/cairomm/README | 13 - libs/cairomm/SConscript | 33 - libs/cairomm/aclocal.m4 | 7604 -- libs/cairomm/cairomm-1.0.pc.in | 12 - libs/cairomm/cairomm/Makefile.am | 24 - libs/cairomm/cairomm/Makefile.in | 674 - libs/cairomm/cairomm/cairomm.h | 43 - libs/cairomm/cairomm/cairommconfig.h.in | 73 - libs/cairomm/cairomm/context.cc | 797 - libs/cairomm/cairomm/context.h | 978 - libs/cairomm/cairomm/context_private.h | 47 - .../cairomm/cairomm/context_surface_quartz.cc | 42 - libs/cairomm/cairomm/context_surface_win32.cc | 42 - libs/cairomm/cairomm/context_surface_xlib.cc | 42 - libs/cairomm/cairomm/enums.h | 202 - libs/cairomm/cairomm/exception.cc | 49 - libs/cairomm/cairomm/exception.h | 46 - libs/cairomm/cairomm/fontface.cc | 74 - libs/cairomm/cairomm/fontface.h | 79 - libs/cairomm/cairomm/fontoptions.cc | 159 - libs/cairomm/cairomm/fontoptions.h | 81 - libs/cairomm/cairomm/path.cc | 98 - libs/cairomm/cairomm/path.h | 72 - libs/cairomm/cairomm/pattern.cc | 286 - libs/cairomm/cairomm/pattern.h | 290 - libs/cairomm/cairomm/private.cc | 85 - libs/cairomm/cairomm/private.h | 52 - libs/cairomm/cairomm/quartz_surface.cc | 60 - libs/cairomm/cairomm/quartz_surface.h | 88 - libs/cairomm/cairomm/refptr.h | 399 - libs/cairomm/cairomm/scaledfont.cc | 104 - libs/cairomm/cairomm/scaledfont.h | 156 - libs/cairomm/cairomm/surface.cc | 382 - libs/cairomm/cairomm/surface.h | 632 - libs/cairomm/cairomm/win32_surface.cc | 59 - libs/cairomm/cairomm/win32_surface.h | 96 - libs/cairomm/cairomm/xlib_surface.cc | 137 - libs/cairomm/cairomm/xlib_surface.h | 148 - libs/cairomm/config.guess | 1516 - libs/cairomm/config.sub | 1622 - libs/cairomm/configure | 22654 ------ libs/cairomm/configure.in | 189 - libs/cairomm/depcomp | 530 - libs/cairomm/install-sh | 323 - libs/cairomm/ltmain.sh | 6938 -- libs/cairomm/m4/ax_boost_base.m4 | 198 - .../m4/ax_boost_unit_test_framework.m4 | 138 - libs/cairomm/m4/reduced.m4 | 20 - libs/cairomm/missing | 360 - libs/cairomm/tests/Makefile.am | 19 - libs/cairomm/tests/Makefile.in | 532 - libs/cairomm/tests/test-context.cc | 349 - libs/clearlooks/SConscript | 43 - libs/clearlooks/animation.c | 337 - libs/clearlooks/animation.h | 34 - libs/clearlooks/bits.c | 121 - libs/clearlooks/cairo-support.c | 815 - libs/clearlooks/cairo-support.h | 118 - libs/clearlooks/clearlooks_draw.c | 2279 - libs/clearlooks/clearlooks_draw.h | 17 - libs/clearlooks/clearlooks_draw_glossy.c | 1422 - libs/clearlooks/clearlooks_draw_gummy.c | 1524 - libs/clearlooks/clearlooks_draw_inverted.c | 1002 - libs/clearlooks/clearlooks_rc_style.c | 473 - libs/clearlooks/clearlooks_rc_style.h | 74 - libs/clearlooks/clearlooks_style.c | 1647 - libs/clearlooks/clearlooks_style.h | 70 - libs/clearlooks/clearlooks_theme_main.c | 23 - libs/clearlooks/clearlooks_types.h | 455 - libs/clearlooks/config.h | 80 - libs/clearlooks/cpdll.sh | 2 - libs/clearlooks/ge-support.h | 9 - libs/clearlooks/general-support.h | 39 - libs/clearlooks/support.c | 287 - libs/clearlooks/support.h | 38 - libs/clearlooks/widget-information.c | 312 - libs/clearlooks/widget-information.h | 99 - libs/fst/SConscript | 56 - libs/fst/fst.c | 27 - libs/fst/fst.h | 109 - libs/fst/fstinfofile.c | 268 - libs/fst/jackvst.h | 35 - libs/fst/vsti.c | 181 - libs/fst/vstwin.c | 598 - libs/glibmm2/AUTHORS | 20 - libs/glibmm2/CHANGES | 33 - libs/glibmm2/COPYING | 515 - libs/glibmm2/ChangeLog | 2015 - libs/glibmm2/INSTALL | 234 - libs/glibmm2/Makefile.am | 64 - libs/glibmm2/NEWS | 514 - libs/glibmm2/README | 1 - libs/glibmm2/README.win32 | 65 - libs/glibmm2/SConscript | 50 - libs/glibmm2/aclocal.m4 | 7727 -- libs/glibmm2/autogen.sh | 79 - .../build_shared/Makefile_build.am_fragment | 71 - .../Makefile_build_extra.am_fragment | 40 - .../Makefile_build_gensrc.am_fragment | 66 - .../build_shared/Makefile_gensrc.am_fragment | 62 - .../Makefile_gensrc_platform.am_fragment | 25 - libs/glibmm2/config.h.in | 5 - libs/glibmm2/configure.in | 267 - libs/glibmm2/glib/Makefile.am | 14 - libs/glibmm2/glib/Makefile.in | 611 - libs/glibmm2/glib/README | 1 - libs/glibmm2/glib/glibmm-2.4.pc | 11 - libs/glibmm2/glib/glibmm-2.4.pc.in | 11 - libs/glibmm2/glib/glibmm.h | 74 - libs/glibmm2/glib/glibmm/Makefile.am | 105 - libs/glibmm2/glib/glibmm/Makefile.in | 906 - libs/glibmm2/glib/glibmm/arrayhandle.h | 522 - libs/glibmm2/glib/glibmm/class.cc | 117 - libs/glibmm2/glib/glibmm/class.h | 77 - .../glib/glibmm/containerhandle_shared.h | 373 - libs/glibmm2/glib/glibmm/containers.cc | 33 - libs/glibmm2/glib/glibmm/containers.h | 372 - libs/glibmm2/glib/glibmm/convert.cc | 436 - libs/glibmm2/glib/glibmm/convert.h | 361 - libs/glibmm2/glib/glibmm/date.cc | 388 - libs/glibmm2/glib/glibmm/date.h | 461 - libs/glibmm2/glib/glibmm/debug.cc | 21 - libs/glibmm2/glib/glibmm/debug.h | 85 - libs/glibmm2/glib/glibmm/dispatcher.cc | 464 - libs/glibmm2/glib/glibmm/dispatcher.h | 108 - libs/glibmm2/glib/glibmm/error.cc | 198 - libs/glibmm2/glib/glibmm/error.h | 92 - libs/glibmm2/glib/glibmm/exception.cc | 40 - libs/glibmm2/glib/glibmm/exception.h | 42 - libs/glibmm2/glib/glibmm/exceptionhandler.cc | 163 - libs/glibmm2/glib/glibmm/exceptionhandler.h | 48 - libs/glibmm2/glib/glibmm/fileutils.cc | 226 - libs/glibmm2/glib/glibmm/fileutils.h | 482 - libs/glibmm2/glib/glibmm/helperlist.h | 165 - libs/glibmm2/glib/glibmm/i18n.h | 30 - libs/glibmm2/glib/glibmm/init.cc | 34 - libs/glibmm2/glib/glibmm/init.h | 39 - libs/glibmm2/glib/glibmm/interface.cc | 95 - libs/glibmm2/glib/glibmm/interface.h | 72 - libs/glibmm2/glib/glibmm/iochannel.cc | 889 - libs/glibmm2/glib/glibmm/iochannel.h | 763 - libs/glibmm2/glib/glibmm/keyfile.cc | 605 - libs/glibmm2/glib/glibmm/keyfile.h | 754 - libs/glibmm2/glib/glibmm/listhandle.h | 406 - libs/glibmm2/glib/glibmm/main.cc | 1094 - libs/glibmm2/glib/glibmm/main.h | 782 - libs/glibmm2/glib/glibmm/markup.cc | 387 - libs/glibmm2/glib/glibmm/markup.h | 430 - libs/glibmm2/glib/glibmm/miscutils.cc | 161 - libs/glibmm2/glib/glibmm/miscutils.h | 320 - libs/glibmm2/glib/glibmm/module.cc | 96 - libs/glibmm2/glib/glibmm/module.h | 222 - libs/glibmm2/glib/glibmm/object.cc | 312 - libs/glibmm2/glib/glibmm/object.h | 292 - libs/glibmm2/glib/glibmm/objectbase.cc | 289 - libs/glibmm2/glib/glibmm/objectbase.h | 234 - libs/glibmm2/glib/glibmm/optioncontext.cc | 226 - libs/glibmm2/glib/glibmm/optioncontext.h | 277 - libs/glibmm2/glib/glibmm/optionentry.cc | 149 - libs/glibmm2/glib/glibmm/optionentry.h | 112 - libs/glibmm2/glib/glibmm/optiongroup.cc | 543 - libs/glibmm2/glib/glibmm/optiongroup.h | 146 - libs/glibmm2/glib/glibmm/pattern.cc | 66 - libs/glibmm2/glib/glibmm/pattern.h | 69 - libs/glibmm2/glib/glibmm/private/Makefile.am | 20 - libs/glibmm2/glib/glibmm/private/Makefile.in | 443 - libs/glibmm2/glib/glibmm/private/convert_p.h | 8 - libs/glibmm2/glib/glibmm/private/date_p.h | 8 - .../glibmm2/glib/glibmm/private/fileutils_p.h | 8 - .../glibmm2/glib/glibmm/private/interface_p.h | 24 - .../glibmm2/glib/glibmm/private/iochannel_p.h | 8 - libs/glibmm2/glib/glibmm/private/keyfile_p.h | 8 - libs/glibmm2/glib/glibmm/private/markup_p.h | 8 - libs/glibmm2/glib/glibmm/private/module_p.h | 8 - libs/glibmm2/glib/glibmm/private/object_p.h | 28 - .../glib/glibmm/private/optioncontext_p.h | 8 - .../glib/glibmm/private/optionentry_p.h | 8 - .../glib/glibmm/private/optiongroup_p.h | 8 - libs/glibmm2/glib/glibmm/private/regex_p.h | 8 - libs/glibmm2/glib/glibmm/private/shell_p.h | 8 - libs/glibmm2/glib/glibmm/private/spawn_p.h | 8 - libs/glibmm2/glib/glibmm/private/thread_p.h | 8 - libs/glibmm2/glib/glibmm/private/unicode_p.h | 8 - libs/glibmm2/glib/glibmm/property.cc | 203 - libs/glibmm2/glib/glibmm/property.h | 174 - libs/glibmm2/glib/glibmm/propertyproxy.cc | 24 - libs/glibmm2/glib/glibmm/propertyproxy.h | 181 - .../glibmm2/glib/glibmm/propertyproxy_base.cc | 131 - libs/glibmm2/glib/glibmm/propertyproxy_base.h | 111 - libs/glibmm2/glib/glibmm/quark.cc | 66 - libs/glibmm2/glib/glibmm/quark.h | 88 - libs/glibmm2/glib/glibmm/random.cc | 76 - libs/glibmm2/glib/glibmm/random.h | 73 - libs/glibmm2/glib/glibmm/refptr.h | 341 - libs/glibmm2/glib/glibmm/regex.cc | 451 - libs/glibmm2/glib/glibmm/regex.h | 676 - libs/glibmm2/glib/glibmm/sarray.h | 108 - libs/glibmm2/glib/glibmm/shell.cc | 102 - libs/glibmm2/glib/glibmm/shell.h | 130 - libs/glibmm2/glib/glibmm/signalproxy.cc | 109 - libs/glibmm2/glib/glibmm/signalproxy.h | 394 - .../glib/glibmm/signalproxy_connectionnode.cc | 94 - .../glib/glibmm/signalproxy_connectionnode.h | 77 - libs/glibmm2/glib/glibmm/slisthandle.h | 405 - libs/glibmm2/glib/glibmm/spawn.cc | 324 - libs/glibmm2/glib/glibmm/spawn.h | 210 - libs/glibmm2/glib/glibmm/streamiochannel.cc | 216 - libs/glibmm2/glib/glibmm/streamiochannel.h | 67 - libs/glibmm2/glib/glibmm/stringutils.cc | 128 - libs/glibmm2/glib/glibmm/stringutils.h | 184 - libs/glibmm2/glib/glibmm/thread.cc | 412 - libs/glibmm2/glib/glibmm/thread.h | 1091 - libs/glibmm2/glib/glibmm/threadpool.cc | 249 - libs/glibmm2/glib/glibmm/threadpool.h | 183 - libs/glibmm2/glib/glibmm/timer.cc | 72 - libs/glibmm2/glib/glibmm/timer.h | 79 - libs/glibmm2/glib/glibmm/timeval.cc | 120 - libs/glibmm2/glib/glibmm/timeval.h | 233 - libs/glibmm2/glib/glibmm/unicode.cc | 34 - libs/glibmm2/glib/glibmm/unicode.h | 316 - libs/glibmm2/glib/glibmm/ustring.cc | 1224 - libs/glibmm2/glib/glibmm/ustring.h | 997 - libs/glibmm2/glib/glibmm/utility.cc | 40 - libs/glibmm2/glib/glibmm/utility.h | 117 - libs/glibmm2/glib/glibmm/value.cc | 250 - libs/glibmm2/glib/glibmm/value.h | 331 - libs/glibmm2/glib/glibmm/value_basictypes.cc | 336 - libs/glibmm2/glib/glibmm/value_basictypes.h | 271 - libs/glibmm2/glib/glibmm/value_custom.cc | 145 - libs/glibmm2/glib/glibmm/value_custom.h | 295 - libs/glibmm2/glib/glibmm/wrap.cc | 209 - libs/glibmm2/glib/glibmm/wrap.h | 164 - libs/glibmm2/glib/glibmm/wrap_init.cc | 79 - libs/glibmm2/glib/glibmm/wrap_init.h | 38 - libs/glibmm2/glib/glibmmconfig.h | 93 - libs/glibmm2/glib/glibmmconfig.h.in | 92 - libs/glibmm2/glib/src/Makefile.am | 21 - libs/glibmm2/glib/src/Makefile.in | 416 - .../glib/src/Makefile_list_of_hg.am_fragment | 8 - libs/glibmm2/glib/src/convert.ccg | 395 - libs/glibmm2/glib/src/convert.hg | 324 - libs/glibmm2/glib/src/date.ccg | 375 - libs/glibmm2/glib/src/date.hg | 408 - libs/glibmm2/glib/src/fileutils.ccg | 185 - libs/glibmm2/glib/src/fileutils.hg | 400 - libs/glibmm2/glib/src/glib.defs | 5 - libs/glibmm2/glib/src/glib_docs.xml | 18080 ----- libs/glibmm2/glib/src/glib_docs_override.xml | 151 - libs/glibmm2/glib/src/glib_enums.defs | 720 - libs/glibmm2/glib/src/glib_functions.defs | 10118 --- libs/glibmm2/glib/src/gmodule_enums.defs | 12 - libs/glibmm2/glib/src/gmodule_functions.defs | 79 - libs/glibmm2/glib/src/gobject.defs | 3 - libs/glibmm2/glib/src/gobject_enums.defs | 80 - libs/glibmm2/glib/src/gobject_functions.defs | 2608 - libs/glibmm2/glib/src/iochannel.ccg | 640 - libs/glibmm2/glib/src/iochannel.hg | 476 - libs/glibmm2/glib/src/keyfile.ccg | 255 - libs/glibmm2/glib/src/keyfile.hg | 387 - libs/glibmm2/glib/src/markup.ccg | 346 - libs/glibmm2/glib/src/markup.hg | 346 - libs/glibmm2/glib/src/module.ccg | 44 - libs/glibmm2/glib/src/module.hg | 153 - libs/glibmm2/glib/src/optioncontext.ccg | 112 - libs/glibmm2/glib/src/optioncontext.hg | 127 - libs/glibmm2/glib/src/optionentry.ccg | 79 - libs/glibmm2/glib/src/optionentry.hg | 96 - libs/glibmm2/glib/src/optiongroup.ccg | 518 - libs/glibmm2/glib/src/optiongroup.hg | 124 - libs/glibmm2/glib/src/regex.ccg | 204 - libs/glibmm2/glib/src/regex.hg | 209 - libs/glibmm2/glib/src/shell.ccg | 61 - libs/glibmm2/glib/src/shell.hg | 96 - libs/glibmm2/glib/src/signalproxy.h.m4 | 200 - libs/glibmm2/glib/src/spawn.ccg | 283 - libs/glibmm2/glib/src/spawn.hg | 109 - libs/glibmm2/glib/src/template.macros.m4 | 229 - libs/glibmm2/glib/src/thread.ccg | 371 - libs/glibmm2/glib/src/thread.hg | 1047 - libs/glibmm2/glib/src/unicode.ccg | 22 - libs/glibmm2/glib/src/unicode.hg | 147 - libs/glibmm2/glib/src/value_basictypes.cc.m4 | 84 - libs/glibmm2/glib/src/value_basictypes.h.m4 | 83 - libs/glibmm2/scripts/Makefile.am | 8 - libs/glibmm2/scripts/Makefile.in | 387 - libs/glibmm2/scripts/README | 1 - libs/glibmm2/scripts/c_std.m4 | 43 - libs/glibmm2/scripts/config.guess | 1471 - libs/glibmm2/scripts/config.sub | 1599 - libs/glibmm2/scripts/cxx.m4 | 364 - libs/glibmm2/scripts/cxx_std.m4 | 195 - libs/glibmm2/scripts/depcomp | 584 - libs/glibmm2/scripts/docgen.m4 | 75 - libs/glibmm2/scripts/glibmm_check_perl.m4 | 54 - libs/glibmm2/scripts/install-sh | 507 - libs/glibmm2/scripts/ltmain.sh | 6863 -- libs/glibmm2/scripts/macros.m4 | 134 - libs/glibmm2/scripts/missing | 367 - libs/glibmm2/scripts/reduced.m4 | 106 - libs/glibmm2/scripts/sun.m4 | 15 - libs/glibmm2/tools/Makefile.am | 11 - libs/glibmm2/tools/Makefile.in | 551 - .../Makefile_list_of_sources.am_fragment | 5 - libs/glibmm2/tools/README | 4 - libs/glibmm2/tools/TODO | 12 - libs/glibmm2/tools/enum.pl | 233 - libs/glibmm2/tools/extra_defs_gen/Makefile.am | 29 - libs/glibmm2/tools/extra_defs_gen/Makefile.in | 562 - .../extra_defs_gen/generate_defs_glib.cc | 34 - .../extra_defs_gen/generate_extra_defs.cc | 217 - .../extra_defs_gen/generate_extra_defs.h | 33 - libs/glibmm2/tools/generate_wrap_init.pl | 392 - libs/glibmm2/tools/generate_wrap_init.pl.in | 392 - libs/glibmm2/tools/gmmproc.in | 239 - libs/glibmm2/tools/m4/Makefile.am | 10 - libs/glibmm2/tools/m4/Makefile.in | 433 - .../m4/Makefile_list_of_sources.am_fragment | 8 - libs/glibmm2/tools/m4/base.m4 | 436 - libs/glibmm2/tools/m4/class_boxedtype.m4 | 218 - .../tools/m4/class_boxedtype_static.m4 | 169 - libs/glibmm2/tools/m4/class_generic.m4 | 54 - libs/glibmm2/tools/m4/class_gobject.m4 | 243 - libs/glibmm2/tools/m4/class_gtkobject.m4 | 228 - libs/glibmm2/tools/m4/class_interface.m4 | 273 - .../glibmm2/tools/m4/class_opaque_copyable.m4 | 184 - .../tools/m4/class_opaque_refcounted.m4 | 175 - libs/glibmm2/tools/m4/class_shared.m4 | 221 - libs/glibmm2/tools/m4/compare.m4 | 118 - libs/glibmm2/tools/m4/convert.m4 | 6 - libs/glibmm2/tools/m4/convert_atk.m4 | 34 - libs/glibmm2/tools/m4/convert_base.m4 | 71 - libs/glibmm2/tools/m4/convert_gdk.m4 | 231 - libs/glibmm2/tools/m4/convert_glib.m4 | 69 - libs/glibmm2/tools/m4/convert_gtk.m4 | 394 - libs/glibmm2/tools/m4/convert_gtkmm.m4 | 8 - libs/glibmm2/tools/m4/convert_pango.m4 | 137 - libs/glibmm2/tools/m4/ctor.m4 | 59 - libs/glibmm2/tools/m4/doc.m4 | 3 - libs/glibmm2/tools/m4/enum.m4 | 101 - libs/glibmm2/tools/m4/gerror.m4 | 102 - libs/glibmm2/tools/m4/list.m4 | 230 - libs/glibmm2/tools/m4/member.m4 | 132 - libs/glibmm2/tools/m4/method.m4 | 108 - libs/glibmm2/tools/m4/property.m4 | 40 - libs/glibmm2/tools/m4/signal.m4 | 272 - libs/glibmm2/tools/m4/vfunc.m4 | 154 - libs/glibmm2/tools/pm/DocsParser.pm | 494 - libs/glibmm2/tools/pm/Enum.pm | 246 - libs/glibmm2/tools/pm/Function.pm | 351 - libs/glibmm2/tools/pm/FunctionBase.pm | 217 - libs/glibmm2/tools/pm/GtkDefs.pm | 635 - libs/glibmm2/tools/pm/Makefile.am | 10 - libs/glibmm2/tools/pm/Makefile.in | 426 - .../pm/Makefile_list_of_sources.am_fragment | 2 - libs/glibmm2/tools/pm/Object.pm | 72 - libs/glibmm2/tools/pm/Output.pm | 954 - libs/glibmm2/tools/pm/Property.pm | 119 - libs/glibmm2/tools/pm/Util.pm | 113 - libs/glibmm2/tools/pm/WrapParser.pm | 1439 - libs/gtkmm2/AUTHORS | 20 - libs/gtkmm2/CHANGES | 88 - libs/gtkmm2/COPYING | 515 - libs/gtkmm2/ChangeLog | 5974 -- libs/gtkmm2/INSTALL | 234 - libs/gtkmm2/MSVC_Net2003/Makefile.am | 3 - libs/gtkmm2/MSVC_Net2003/Makefile.in | 516 - libs/gtkmm2/MSVC_Net2003/README | 13 - libs/gtkmm2/MSVC_Net2003/atkmm/Makefile.am | 3 - libs/gtkmm2/MSVC_Net2003/atkmm/Makefile.in | 364 - libs/gtkmm2/MSVC_Net2003/atkmm/atkmm.rc | 72 - libs/gtkmm2/MSVC_Net2003/atkmm/atkmm.rc.in | 72 - libs/gtkmm2/MSVC_Net2003/atkmm/atkmm.vcproj | 377 - libs/gtkmm2/MSVC_Net2003/blank.cpp | 11 - libs/gtkmm2/MSVC_Net2003/demos/Makefile.am | 1 - libs/gtkmm2/MSVC_Net2003/demos/Makefile.in | 515 - .../MSVC_Net2003/demos/gtk-demo/Makefile.am | 1 - .../MSVC_Net2003/demos/gtk-demo/Makefile.in | 356 - .../demos/gtk-demo/gtk-demo.vcproj | 315 - libs/gtkmm2/MSVC_Net2003/examples/Makefile.am | 3 - libs/gtkmm2/MSVC_Net2003/examples/Makefile.in | 518 - .../MSVC_Net2003/examples/arrow/Makefile.am | 1 - .../MSVC_Net2003/examples/arrow/Makefile.in | 356 - .../MSVC_Net2003/examples/arrow/arrow.vcproj | 214 - .../examples/calendar/Makefile.am | 1 - .../examples/calendar/Makefile.in | 356 - .../examples/calendar/calendar.vcproj | 214 - .../cellrenderercustom_popup/Makefile.am | 1 - .../cellrenderercustom_popup/Makefile.in | 356 - .../cellrenderercustom_popup.vcproj | 238 - .../cellrenderercustom_toggle/Makefile.am | 1 - .../cellrenderercustom_toggle/Makefile.in | 356 - .../cellrenderercustom_toggle.vcproj | 214 - .../examples/direction/Makefile.am | 1 - .../examples/direction/Makefile.in | 356 - .../examples/direction/direction.vcproj | 214 - .../MSVC_Net2003/examples/dnd/Makefile.am | 1 - .../MSVC_Net2003/examples/dnd/Makefile.in | 356 - .../MSVC_Net2003/examples/dnd/dnd.vcproj | 226 - .../examples/exception/Makefile.am | 1 - .../examples/exception/Makefile.in | 356 - .../examples/exception/exception.vcproj | 214 - .../MSVC_Net2003/examples/gdk/Makefile.am | 1 - .../MSVC_Net2003/examples/gdk/Makefile.in | 356 - .../MSVC_Net2003/examples/gdk/gdk.vcproj | 214 - .../examples/printing/Makefile.am | 1 - .../examples/printing/Makefile.in | 356 - .../examples/printing/printing.vcproj | 231 - .../MSVC_Net2003/examples/rulers/Makefile.am | 1 - .../MSVC_Net2003/examples/rulers/Makefile.in | 356 - .../examples/rulers/rulers.vcproj | 214 - .../examples/statusbar/Makefile.am | 1 - .../examples/statusbar/Makefile.in | 356 - .../examples/statusbar/statusbar.vcproj | 214 - .../MSVC_Net2003/examples/stock/Makefile.am | 1 - .../MSVC_Net2003/examples/stock/Makefile.in | 356 - .../MSVC_Net2003/examples/stock/stock.vcproj | 214 - .../examples/tictactoe/Makefile.am | 1 - .../examples/tictactoe/Makefile.in | 356 - .../examples/tictactoe/tictactoe.vcproj | 222 - .../examples/treemodelcustom/Makefile.am | 1 - .../examples/treemodelcustom/Makefile.in | 356 - .../treemodelcustom/treemodelcustom.vcproj | 230 - .../MSVC_Net2003/examples/window/Makefile.am | 1 - .../MSVC_Net2003/examples/window/Makefile.in | 356 - .../examples/window/window.vcproj | 214 - libs/gtkmm2/MSVC_Net2003/gdkmm/Makefile.am | 13 - libs/gtkmm2/MSVC_Net2003/gdkmm/Makefile.in | 375 - libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmm.rc | 72 - libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmm.rc.in | 72 - libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmm.vcproj | 437 - libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmmconfig.h | 10 - libs/gtkmm2/MSVC_Net2003/gendef/Makefile.am | 2 - libs/gtkmm2/MSVC_Net2003/gendef/Makefile.in | 356 - libs/gtkmm2/MSVC_Net2003/gendef/gendef.cc | 94 - libs/gtkmm2/MSVC_Net2003/gendef/gendef.vcproj | 204 - libs/gtkmm2/MSVC_Net2003/gtkmm.sln | 251 - libs/gtkmm2/MSVC_Net2003/gtkmm/Makefile.am | 13 - libs/gtkmm2/MSVC_Net2003/gtkmm/Makefile.in | 375 - libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmm.rc | 72 - libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmm.rc.in | 72 - libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmm.vcproj | 1561 - libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmmconfig.h | 50 - libs/gtkmm2/MSVC_Net2003/pangomm/Makefile.am | 3 - libs/gtkmm2/MSVC_Net2003/pangomm/Makefile.in | 364 - libs/gtkmm2/MSVC_Net2003/pangomm/pangomm.rc | 72 - .../gtkmm2/MSVC_Net2003/pangomm/pangomm.rc.in | 72 - .../MSVC_Net2003/pangomm/pangomm.vcproj | 430 - libs/gtkmm2/Makefile.am | 69 - libs/gtkmm2/Makefile.in | 736 - libs/gtkmm2/NEWS | 2530 - libs/gtkmm2/PORTING | 5 - libs/gtkmm2/README | 3 - libs/gtkmm2/README.SUN | 88 - libs/gtkmm2/README.win32 | 69 - libs/gtkmm2/aclocal.m4 | 7519 -- libs/gtkmm2/atk/Makefile.am | 14 - libs/gtkmm2/atk/Makefile.in | 576 - libs/gtkmm2/atk/README | 0 libs/gtkmm2/atk/SConscript | 23 - libs/gtkmm2/atk/atkmm-1.6.pc.in | 11 - libs/gtkmm2/atk/atkmm.h | 42 - libs/gtkmm2/atk/atkmm/Makefile.am | 31 - libs/gtkmm2/atk/atkmm/Makefile.in | 782 - libs/gtkmm2/atk/atkmm/action.cc | 529 - libs/gtkmm2/atk/atkmm/action.h | 227 - libs/gtkmm2/atk/atkmm/component.cc | 979 - libs/gtkmm2/atk/atkmm/component.h | 386 - libs/gtkmm2/atk/atkmm/document.cc | 274 - libs/gtkmm2/atk/atkmm/document.h | 167 - libs/gtkmm2/atk/atkmm/editabletext.cc | 565 - libs/gtkmm2/atk/atkmm/editabletext.h | 230 - libs/gtkmm2/atk/atkmm/hyperlink.cc | 747 - libs/gtkmm2/atk/atkmm/hyperlink.h | 298 - libs/gtkmm2/atk/atkmm/hypertext.cc | 438 - libs/gtkmm2/atk/atkmm/hypertext.h | 197 - libs/gtkmm2/atk/atkmm/image.cc | 389 - libs/gtkmm2/atk/atkmm/image.h | 201 - libs/gtkmm2/atk/atkmm/implementor.cc | 198 - libs/gtkmm2/atk/atkmm/implementor.h | 146 - libs/gtkmm2/atk/atkmm/init.cc | 34 - libs/gtkmm2/atk/atkmm/init.h | 40 - libs/gtkmm2/atk/atkmm/noopobject.cc | 151 - libs/gtkmm2/atk/atkmm/noopobject.h | 153 - libs/gtkmm2/atk/atkmm/object.cc | 956 - libs/gtkmm2/atk/atkmm/object.h | 658 - libs/gtkmm2/atk/atkmm/objectaccessible.cc | 179 - libs/gtkmm2/atk/atkmm/objectaccessible.h | 155 - libs/gtkmm2/atk/atkmm/private/Makefile.am | 14 - libs/gtkmm2/atk/atkmm/private/Makefile.in | 490 - libs/gtkmm2/atk/atkmm/private/action_p.h | 54 - libs/gtkmm2/atk/atkmm/private/component_p.h | 61 - libs/gtkmm2/atk/atkmm/private/document_p.h | 50 - .../gtkmm2/atk/atkmm/private/editabletext_p.h | 53 - libs/gtkmm2/atk/atkmm/private/hyperlink_p.h | 61 - libs/gtkmm2/atk/atkmm/private/hypertext_p.h | 52 - libs/gtkmm2/atk/atkmm/private/image_p.h | 52 - libs/gtkmm2/atk/atkmm/private/implementor_p.h | 47 - libs/gtkmm2/atk/atkmm/private/noopobject_p.h | 51 - libs/gtkmm2/atk/atkmm/private/object_p.h | 57 - .../atk/atkmm/private/objectaccessible_p.h | 51 - libs/gtkmm2/atk/atkmm/private/relation_p.h | 51 - libs/gtkmm2/atk/atkmm/private/relationset_p.h | 51 - libs/gtkmm2/atk/atkmm/private/selection_p.h | 56 - libs/gtkmm2/atk/atkmm/private/stateset_p.h | 51 - .../atk/atkmm/private/streamablecontent_p.h | 51 - libs/gtkmm2/atk/atkmm/private/table_p.h | 84 - libs/gtkmm2/atk/atkmm/private/text_p.h | 67 - libs/gtkmm2/atk/atkmm/private/value_p.h | 50 - libs/gtkmm2/atk/atkmm/relation.cc | 196 - libs/gtkmm2/atk/atkmm/relation.h | 203 - libs/gtkmm2/atk/atkmm/relationset.cc | 201 - libs/gtkmm2/atk/atkmm/relationset.h | 190 - libs/gtkmm2/atk/atkmm/selection.cc | 654 - libs/gtkmm2/atk/atkmm/selection.h | 250 - libs/gtkmm2/atk/atkmm/stateset.cc | 220 - libs/gtkmm2/atk/atkmm/stateset.h | 258 - libs/gtkmm2/atk/atkmm/streamablecontent.cc | 339 - libs/gtkmm2/atk/atkmm/streamablecontent.h | 178 - libs/gtkmm2/atk/atkmm/table.cc | 2600 - libs/gtkmm2/atk/atkmm/table.h | 567 - libs/gtkmm2/atk/atkmm/text.cc | 1698 - libs/gtkmm2/atk/atkmm/text.h | 780 - libs/gtkmm2/atk/atkmm/value.cc | 381 - libs/gtkmm2/atk/atkmm/value.h | 185 - libs/gtkmm2/atk/atkmm/wrap_init.cc | 91 - libs/gtkmm2/atk/atkmm/wrap_init.h | 32 - libs/gtkmm2/atk/src/Makefile.am | 14 - libs/gtkmm2/atk/src/Makefile.in | 463 - .../atk/src/Makefile_list_of_hg.am_fragment | 12 - libs/gtkmm2/atk/src/action.ccg | 22 - libs/gtkmm2/atk/src/action.hg | 71 - libs/gtkmm2/atk/src/atk.defs | 4 - libs/gtkmm2/atk/src/atk_docs.xml | 4049 - libs/gtkmm2/atk/src/atk_docs_override.xml | 117 - libs/gtkmm2/atk/src/atk_enums.defs | 263 - libs/gtkmm2/atk/src/atk_methods.defs | 2284 - libs/gtkmm2/atk/src/atk_signals.defs | 390 - libs/gtkmm2/atk/src/atk_vfuncs.defs | 855 - libs/gtkmm2/atk/src/component.ccg | 23 - libs/gtkmm2/atk/src/component.hg | 91 - libs/gtkmm2/atk/src/document.ccg | 30 - libs/gtkmm2/atk/src/document.hg | 55 - libs/gtkmm2/atk/src/editabletext.ccg | 23 - libs/gtkmm2/atk/src/editabletext.hg | 67 - libs/gtkmm2/atk/src/hyperlink.ccg | 30 - libs/gtkmm2/atk/src/hyperlink.hg | 81 - libs/gtkmm2/atk/src/hypertext.ccg | 30 - libs/gtkmm2/atk/src/hypertext.hg | 61 - libs/gtkmm2/atk/src/image.ccg | 23 - libs/gtkmm2/atk/src/image.hg | 66 - libs/gtkmm2/atk/src/implementor.ccg | 23 - libs/gtkmm2/atk/src/implementor.hg | 45 - libs/gtkmm2/atk/src/noopobject.ccg | 22 - libs/gtkmm2/atk/src/noopobject.hg | 71 - libs/gtkmm2/atk/src/object.ccg | 61 - libs/gtkmm2/atk/src/object.hg | 105 - libs/gtkmm2/atk/src/objectaccessible.ccg | 23 - libs/gtkmm2/atk/src/objectaccessible.hg | 46 - libs/gtkmm2/atk/src/relation.ccg | 54 - libs/gtkmm2/atk/src/relation.hg | 59 - libs/gtkmm2/atk/src/relationset.ccg | 23 - libs/gtkmm2/atk/src/relationset.hg | 52 - libs/gtkmm2/atk/src/selection.ccg | 23 - libs/gtkmm2/atk/src/selection.hg | 71 - libs/gtkmm2/atk/src/stateset.ccg | 40 - libs/gtkmm2/atk/src/stateset.hg | 60 - libs/gtkmm2/atk/src/streamablecontent.ccg | 30 - libs/gtkmm2/atk/src/streamablecontent.hg | 56 - libs/gtkmm2/atk/src/table.ccg | 45 - libs/gtkmm2/atk/src/table.hg | 142 - libs/gtkmm2/atk/src/text.ccg | 111 - libs/gtkmm2/atk/src/text.hg | 194 - libs/gtkmm2/atk/src/value.ccg | 22 - libs/gtkmm2/atk/src/value.hg | 58 - libs/gtkmm2/autogen.sh | 114 - .../build_shared/Makefile_build.am_fragment | 52 - .../Makefile_build_gensrc.am_fragment | 86 - .../Makefile_conditional.am_fragment | 0 .../build_shared/Makefile_gensrc.am_fragment | 67 - libs/gtkmm2/config.h.in | 7 - libs/gtkmm2/configure | 23746 ------ libs/gtkmm2/configure.in | 589 - libs/gtkmm2/gdk/Makefile.am | 13 - libs/gtkmm2/gdk/Makefile.in | 617 - libs/gtkmm2/gdk/README | 1 - libs/gtkmm2/gdk/SConscript | 24 - libs/gtkmm2/gdk/gdkmm-2.4.pc.in | 11 - libs/gtkmm2/gdk/gdkmm.h | 48 - libs/gtkmm2/gdk/gdkmm/Makefile.am | 31 - libs/gtkmm2/gdk/gdkmm/Makefile.in | 794 - libs/gtkmm2/gdk/gdkmm/README | 1 - libs/gtkmm2/gdk/gdkmm/bitmap.cc | 72 - libs/gtkmm2/gdk/gdkmm/bitmap.h | 80 - libs/gtkmm2/gdk/gdkmm/color.cc | 302 - libs/gtkmm2/gdk/gdkmm/color.h | 287 - libs/gtkmm2/gdk/gdkmm/colormap.cc | 228 - libs/gtkmm2/gdk/gdkmm/colormap.h | 230 - libs/gtkmm2/gdk/gdkmm/cursor.cc | 172 - libs/gtkmm2/gdk/gdkmm/cursor.h | 272 - libs/gtkmm2/gdk/gdkmm/device.cc | 224 - libs/gtkmm2/gdk/gdkmm/device.h | 264 - libs/gtkmm2/gdk/gdkmm/display.cc | 628 - libs/gtkmm2/gdk/gdkmm/display.h | 692 - libs/gtkmm2/gdk/gdkmm/displaymanager.cc | 293 - libs/gtkmm2/gdk/gdkmm/displaymanager.h | 211 - libs/gtkmm2/gdk/gdkmm/dragcontext.cc | 315 - libs/gtkmm2/gdk/gdkmm/dragcontext.h | 381 - libs/gtkmm2/gdk/gdkmm/drawable.cc | 384 - libs/gtkmm2/gdk/gdkmm/drawable.h | 631 - libs/gtkmm2/gdk/gdkmm/event.cc | 225 - libs/gtkmm2/gdk/gdkmm/event.h | 392 - libs/gtkmm2/gdk/gdkmm/gc.cc | 346 - libs/gtkmm2/gdk/gdkmm/gc.h | 638 - libs/gtkmm2/gdk/gdkmm/general.cc | 119 - libs/gtkmm2/gdk/gdkmm/general.h | 161 - libs/gtkmm2/gdk/gdkmm/image.cc | 264 - libs/gtkmm2/gdk/gdkmm/image.h | 241 - libs/gtkmm2/gdk/gdkmm/list.h | 157 - libs/gtkmm2/gdk/gdkmm/pixbuf.cc | 695 - libs/gtkmm2/gdk/gdkmm/pixbuf.h | 1289 - libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc | 191 - libs/gtkmm2/gdk/gdkmm/pixbufanimation.h | 204 - libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc | 142 - libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h | 130 - libs/gtkmm2/gdk/gdkmm/pixbufformat.cc | 119 - libs/gtkmm2/gdk/gdkmm/pixbufformat.h | 143 - libs/gtkmm2/gdk/gdkmm/pixbufloader.cc | 531 - libs/gtkmm2/gdk/gdkmm/pixbufloader.h | 369 - libs/gtkmm2/gdk/gdkmm/pixmap.cc | 340 - libs/gtkmm2/gdk/gdkmm/pixmap.h | 212 - libs/gtkmm2/gdk/gdkmm/private/Makefile.am | 14 - libs/gtkmm2/gdk/gdkmm/private/Makefile.in | 491 - libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h | 11 - libs/gtkmm2/gdk/gdkmm/private/color_p.h | 8 - libs/gtkmm2/gdk/gdkmm/private/colormap_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/cursor_p.h | 11 - libs/gtkmm2/gdk/gdkmm/private/device_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/display_p.h | 52 - .../gdk/gdkmm/private/displaymanager_p.h | 52 - libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/drawable_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/event_p.h | 8 - libs/gtkmm2/gdk/gdkmm/private/gc_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/image_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h | 51 - .../gdk/gdkmm/private/pixbufanimation_p.h | 51 - .../gdk/gdkmm/private/pixbufanimationiter_p.h | 51 - .../gtkmm2/gdk/gdkmm/private/pixbufformat_p.h | 8 - .../gtkmm2/gdk/gdkmm/private/pixbufloader_p.h | 54 - libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h | 8 - libs/gtkmm2/gdk/gdkmm/private/region_p.h | 8 - libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h | 8 - libs/gtkmm2/gdk/gdkmm/private/screen_p.h | 52 - libs/gtkmm2/gdk/gdkmm/private/types_p.h | 8 - libs/gtkmm2/gdk/gdkmm/private/visual_p.h | 51 - libs/gtkmm2/gdk/gdkmm/private/window_p.h | 51 - libs/gtkmm2/gdk/gdkmm/rectangle.cc | 161 - libs/gtkmm2/gdk/gdkmm/rectangle.h | 115 - libs/gtkmm2/gdk/gdkmm/region.cc | 227 - libs/gtkmm2/gdk/gdkmm/region.h | 272 - libs/gtkmm2/gdk/gdkmm/rgb.cc | 43 - libs/gtkmm2/gdk/gdkmm/rgb.h | 55 - libs/gtkmm2/gdk/gdkmm/rgbcmap.cc | 73 - libs/gtkmm2/gdk/gdkmm/rgbcmap.h | 83 - libs/gtkmm2/gdk/gdkmm/screen.cc | 481 - libs/gtkmm2/gdk/gdkmm/screen.h | 579 - libs/gtkmm2/gdk/gdkmm/types.cc | 117 - libs/gtkmm2/gdk/gdkmm/types.h | 376 - libs/gtkmm2/gdk/gdkmm/visual.cc | 248 - libs/gtkmm2/gdk/gdkmm/visual.h | 263 - libs/gtkmm2/gdk/gdkmm/window.cc | 840 - libs/gtkmm2/gdk/gdkmm/window.h | 2102 - libs/gtkmm2/gdk/gdkmm/wrap_init.cc | 135 - libs/gtkmm2/gdk/gdkmm/wrap_init.h | 32 - libs/gtkmm2/gdk/gdkmmconfig.h | 8 - libs/gtkmm2/gdk/gdkmmconfig.h.in | 9 - libs/gtkmm2/gdk/src/Makefile.am | 11 - libs/gtkmm2/gdk/src/Makefile.in | 464 - .../gdk/src/Makefile_list_of_hg.am_fragment | 13 - libs/gtkmm2/gdk/src/README | 5 - libs/gtkmm2/gdk/src/bitmap.ccg | 44 - libs/gtkmm2/gdk/src/bitmap.hg | 60 - libs/gtkmm2/gdk/src/color.ccg | 213 - libs/gtkmm2/gdk/src/color.hg | 186 - libs/gtkmm2/gdk/src/colormap.ccg | 51 - libs/gtkmm2/gdk/src/colormap.hg | 85 - libs/gtkmm2/gdk/src/cursor.ccg | 59 - libs/gtkmm2/gdk/src/cursor.hg | 62 - libs/gtkmm2/gdk/src/device.ccg | 28 - libs/gtkmm2/gdk/src/device.hg | 83 - libs/gtkmm2/gdk/src/display.ccg | 114 - libs/gtkmm2/gdk/src/display.hg | 200 - libs/gtkmm2/gdk/src/displaymanager.ccg | 29 - libs/gtkmm2/gdk/src/displaymanager.hg | 65 - libs/gtkmm2/gdk/src/dragcontext.ccg | 49 - libs/gtkmm2/gdk/src/dragcontext.hg | 132 - libs/gtkmm2/gdk/src/drawable.ccg | 64 - libs/gtkmm2/gdk/src/drawable.hg | 175 - libs/gtkmm2/gdk/src/event.ccg | 34 - libs/gtkmm2/gdk/src/event.hg | 88 - libs/gtkmm2/gdk/src/gc.ccg | 41 - libs/gtkmm2/gdk/src/gc.hg | 102 - libs/gtkmm2/gdk/src/gdk.defs | 7 - libs/gtkmm2/gdk/src/gdk_docs.xml | 16345 ---- libs/gtkmm2/gdk/src/gdk_docs_override.xml | 605 - libs/gtkmm2/gdk/src/gdk_enums.defs | 777 - libs/gtkmm2/gdk/src/gdk_extra.defs | 103 - libs/gtkmm2/gdk/src/gdk_methods.defs | 6167 -- libs/gtkmm2/gdk/src/gdk_pixbuf.defs | 1041 - libs/gtkmm2/gdk/src/gdk_pixbuf_enums.defs | 95 - libs/gtkmm2/gdk/src/gdk_signals.defs | 167 - libs/gtkmm2/gdk/src/image.ccg | 32 - libs/gtkmm2/gdk/src/image.hg | 91 - libs/gtkmm2/gdk/src/pixbuf.ccg | 291 - libs/gtkmm2/gdk/src/pixbuf.hg | 622 - libs/gtkmm2/gdk/src/pixbufanimation.ccg | 36 - libs/gtkmm2/gdk/src/pixbufanimation.hg | 52 - libs/gtkmm2/gdk/src/pixbufanimationiter.ccg | 23 - libs/gtkmm2/gdk/src/pixbufanimationiter.hg | 41 - libs/gtkmm2/gdk/src/pixbufformat.ccg | 58 - libs/gtkmm2/gdk/src/pixbufformat.hg | 65 - libs/gtkmm2/gdk/src/pixbufloader.ccg | 60 - libs/gtkmm2/gdk/src/pixbufloader.hg | 173 - libs/gtkmm2/gdk/src/pixmap.ccg | 204 - libs/gtkmm2/gdk/src/pixmap.hg | 120 - libs/gtkmm2/gdk/src/rectangle.ccg | 65 - libs/gtkmm2/gdk/src/rectangle.hg | 57 - libs/gtkmm2/gdk/src/region.ccg | 60 - libs/gtkmm2/gdk/src/region.hg | 73 - libs/gtkmm2/gdk/src/rgbcmap.ccg | 54 - libs/gtkmm2/gdk/src/rgbcmap.hg | 65 - libs/gtkmm2/gdk/src/screen.ccg | 34 - libs/gtkmm2/gdk/src/screen.hg | 142 - libs/gtkmm2/gdk/src/types.ccg | 73 - libs/gtkmm2/gdk/src/types.hg | 147 - libs/gtkmm2/gdk/src/visual.ccg | 31 - libs/gtkmm2/gdk/src/visual.hg | 82 - libs/gtkmm2/gdk/src/window.ccg | 81 - libs/gtkmm2/gdk/src/window.hg | 256 - libs/gtkmm2/gtk/Makefile.am | 13 - libs/gtkmm2/gtk/Makefile.in | 617 - libs/gtkmm2/gtk/README | 6 - libs/gtkmm2/gtk/SConscript | 27 - libs/gtkmm2/gtk/gtkmm-2.4.pc.in | 11 - libs/gtkmm2/gtk/gtkmm.h | 187 - libs/gtkmm2/gtk/gtkmm/Makefile.am | 42 - libs/gtkmm2/gtk/gtkmm/Makefile.in | 1066 - libs/gtkmm2/gtk/gtkmm/aboutdialog.cc | 583 - libs/gtkmm2/gtk/gtkmm/aboutdialog.h | 752 - libs/gtkmm2/gtk/gtkmm/accelgroup.cc | 386 - libs/gtkmm2/gtk/gtkmm/accelgroup.h | 268 - libs/gtkmm2/gtk/gtkmm/accelkey.cc | 93 - libs/gtkmm2/gtk/gtkmm/accelkey.h | 94 - libs/gtkmm2/gtk/gtkmm/accellabel.cc | 213 - libs/gtkmm2/gtk/gtkmm/accellabel.h | 198 - libs/gtkmm2/gtk/gtkmm/accelmap.cc | 88 - libs/gtkmm2/gtk/gtkmm/accelmap.h | 147 - libs/gtkmm2/gtk/gtkmm/action.cc | 741 - libs/gtkmm2/gtk/gtkmm/action.h | 638 - libs/gtkmm2/gtk/gtkmm/actiongroup.cc | 462 - libs/gtkmm2/gtk/gtkmm/actiongroup.h | 311 - libs/gtkmm2/gtk/gtkmm/adjustment.cc | 365 - libs/gtkmm2/gtk/gtkmm/adjustment.h | 255 - libs/gtkmm2/gtk/gtkmm/alignment.cc | 296 - libs/gtkmm2/gtk/gtkmm/alignment.h | 362 - libs/gtkmm2/gtk/gtkmm/arrow.cc | 205 - libs/gtkmm2/gtk/gtkmm/arrow.h | 197 - libs/gtkmm2/gtk/gtkmm/aspectframe.cc | 223 - libs/gtkmm2/gtk/gtkmm/aspectframe.h | 271 - libs/gtkmm2/gtk/gtkmm/assistant.cc | 599 - libs/gtkmm2/gtk/gtkmm/assistant.h | 421 - libs/gtkmm2/gtk/gtkmm/base.h | 53 - libs/gtkmm2/gtk/gtkmm/bin.cc | 262 - libs/gtkmm2/gtk/gtkmm/bin.h | 223 - libs/gtkmm2/gtk/gtkmm/box.cc | 638 - libs/gtkmm2/gtk/gtkmm/box.h | 686 - libs/gtkmm2/gtk/gtkmm/builder.cc | 356 - libs/gtkmm2/gtk/gtkmm/builder.h | 401 - libs/gtkmm2/gtk/gtkmm/button.cc | 795 - libs/gtkmm2/gtk/gtkmm/button.h | 547 - libs/gtkmm2/gtk/gtkmm/buttonbox.cc | 450 - libs/gtkmm2/gtk/gtkmm/buttonbox.h | 399 - libs/gtkmm2/gtk/gtkmm/calendar.cc | 683 - libs/gtkmm2/gtk/gtkmm/calendar.h | 368 - libs/gtkmm2/gtk/gtkmm/celleditable.cc | 342 - libs/gtkmm2/gtk/gtkmm/celleditable.h | 185 - libs/gtkmm2/gtk/gtkmm/celllayout.cc | 566 - libs/gtkmm2/gtk/gtkmm/celllayout.h | 289 - libs/gtkmm2/gtk/gtkmm/cellrenderer.cc | 760 - libs/gtkmm2/gtk/gtkmm/cellrenderer.h | 740 - .../gtk/gtkmm/cellrenderer_generation.cc | 71 - .../gtk/gtkmm/cellrenderer_generation.h | 71 - libs/gtkmm2/gtk/gtkmm/cellrendereraccel.cc | 388 - libs/gtkmm2/gtk/gtkmm/cellrendereraccel.h | 225 - libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc | 208 - libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h | 208 - libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc | 249 - libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h | 266 - libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc | 238 - libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h | 237 - libs/gtkmm2/gtk/gtkmm/cellrendererspin.cc | 198 - libs/gtkmm2/gtk/gtkmm/cellrendererspin.h | 208 - libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc | 851 - libs/gtkmm2/gtk/gtkmm/cellrenderertext.h | 999 - libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc | 334 - libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h | 261 - libs/gtkmm2/gtk/gtkmm/cellview.cc | 237 - libs/gtkmm2/gtk/gtkmm/cellview.h | 227 - libs/gtkmm2/gtk/gtkmm/checkbutton.cc | 212 - libs/gtkmm2/gtk/gtkmm/checkbutton.h | 165 - libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc | 360 - libs/gtkmm2/gtk/gtkmm/checkmenuitem.h | 264 - libs/gtkmm2/gtk/gtkmm/clipboard.cc | 618 - libs/gtkmm2/gtk/gtkmm/clipboard.h | 525 - libs/gtkmm2/gtk/gtkmm/colorbutton.cc | 329 - libs/gtkmm2/gtk/gtkmm/colorbutton.h | 313 - libs/gtkmm2/gtk/gtkmm/colorselection.cc | 607 - libs/gtkmm2/gtk/gtkmm/colorselection.h | 406 - libs/gtkmm2/gtk/gtkmm/combo.cc | 1117 - libs/gtkmm2/gtk/gtkmm/combo.h | 635 - libs/gtkmm2/gtk/gtkmm/combobox.cc | 536 - libs/gtkmm2/gtk/gtkmm/combobox.h | 587 - libs/gtkmm2/gtk/gtkmm/comboboxentry.cc | 198 - libs/gtkmm2/gtk/gtkmm/comboboxentry.h | 195 - libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc | 162 - libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h | 110 - libs/gtkmm2/gtk/gtkmm/comboboxtext.cc | 166 - libs/gtkmm2/gtk/gtkmm/comboboxtext.h | 117 - libs/gtkmm2/gtk/gtkmm/container.cc | 1053 - libs/gtkmm2/gtk/gtkmm/container.h | 488 - libs/gtkmm2/gtk/gtkmm/curve.cc | 442 - libs/gtkmm2/gtk/gtkmm/curve.h | 351 - libs/gtkmm2/gtk/gtkmm/dialog.cc | 372 - libs/gtkmm2/gtk/gtkmm/dialog.h | 385 - libs/gtkmm2/gtk/gtkmm/drawingarea.cc | 149 - libs/gtkmm2/gtk/gtkmm/drawingarea.h | 132 - libs/gtkmm2/gtk/gtkmm/editable.cc | 852 - libs/gtkmm2/gtk/gtkmm/editable.h | 233 - libs/gtkmm2/gtk/gtkmm/entry.cc | 729 - libs/gtkmm2/gtk/gtkmm/entry.h | 707 - libs/gtkmm2/gtk/gtkmm/entrycompletion.cc | 861 - libs/gtkmm2/gtk/gtkmm/entrycompletion.h | 635 - libs/gtkmm2/gtk/gtkmm/enums.cc | 290 - libs/gtkmm2/gtk/gtkmm/enums.h | 1463 - libs/gtkmm2/gtk/gtkmm/eventbox.cc | 197 - libs/gtkmm2/gtk/gtkmm/eventbox.h | 249 - libs/gtkmm2/gtk/gtkmm/expander.cc | 311 - libs/gtkmm2/gtk/gtkmm/expander.h | 414 - libs/gtkmm2/gtk/gtkmm/filechooser.cc | 794 - libs/gtkmm2/gtk/gtkmm/filechooser.h | 1225 - libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc | 260 - libs/gtkmm2/gtk/gtkmm/filechooserbutton.h | 297 - libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc | 181 - libs/gtkmm2/gtk/gtkmm/filechooserdialog.h | 141 - libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc | 172 - libs/gtkmm2/gtk/gtkmm/filechooserwidget.h | 152 - libs/gtkmm2/gtk/gtkmm/filefilter.cc | 234 - libs/gtkmm2/gtk/gtkmm/filefilter.h | 292 - libs/gtkmm2/gtk/gtkmm/fileselection.cc | 361 - libs/gtkmm2/gtk/gtkmm/fileselection.h | 304 - libs/gtkmm2/gtk/gtkmm/fixed.cc | 173 - libs/gtkmm2/gtk/gtkmm/fixed.h | 164 - libs/gtkmm2/gtk/gtkmm/fontbutton.cc | 374 - libs/gtkmm2/gtk/gtkmm/fontbutton.h | 354 - libs/gtkmm2/gtk/gtkmm/fontselection.cc | 449 - libs/gtkmm2/gtk/gtkmm/fontselection.h | 349 - libs/gtkmm2/gtk/gtkmm/frame.cc | 338 - libs/gtkmm2/gtk/gtkmm/frame.h | 343 - libs/gtkmm2/gtk/gtkmm/handlebox.cc | 470 - libs/gtkmm2/gtk/gtkmm/handlebox.h | 254 - libs/gtkmm2/gtk/gtkmm/iconfactory.cc | 209 - libs/gtkmm2/gtk/gtkmm/iconfactory.h | 170 - libs/gtkmm2/gtk/gtkmm/iconinfo.cc | 186 - libs/gtkmm2/gtk/gtkmm/iconinfo.h | 238 - libs/gtkmm2/gtk/gtkmm/iconset.cc | 147 - libs/gtkmm2/gtk/gtkmm/iconset.h | 197 - libs/gtkmm2/gtk/gtkmm/iconsource.cc | 203 - libs/gtkmm2/gtk/gtkmm/iconsource.h | 293 - libs/gtkmm2/gtk/gtkmm/icontheme.cc | 389 - libs/gtkmm2/gtk/gtkmm/icontheme.h | 463 - libs/gtkmm2/gtk/gtkmm/iconview.cc | 1039 - libs/gtkmm2/gtk/gtkmm/iconview.h | 1145 - libs/gtkmm2/gtk/gtkmm/image.cc | 501 - libs/gtkmm2/gtk/gtkmm/image.h | 518 - libs/gtkmm2/gtk/gtkmm/imagemenuitem.cc | 215 - libs/gtkmm2/gtk/gtkmm/imagemenuitem.h | 161 - libs/gtkmm2/gtk/gtkmm/inputdialog.cc | 426 - libs/gtkmm2/gtk/gtkmm/inputdialog.h | 191 - libs/gtkmm2/gtk/gtkmm/invisible.cc | 183 - libs/gtkmm2/gtk/gtkmm/invisible.h | 154 - libs/gtkmm2/gtk/gtkmm/item.cc | 358 - libs/gtkmm2/gtk/gtkmm/item.h | 169 - libs/gtkmm2/gtk/gtkmm/label.cc | 709 - libs/gtkmm2/gtk/gtkmm/label.h | 851 - libs/gtkmm2/gtk/gtkmm/layout.cc | 417 - libs/gtkmm2/gtk/gtkmm/layout.h | 332 - libs/gtkmm2/gtk/gtkmm/linkbutton.cc | 235 - libs/gtkmm2/gtk/gtkmm/linkbutton.h | 203 - libs/gtkmm2/gtk/gtkmm/liststore.cc | 285 - libs/gtkmm2/gtk/gtkmm/liststore.h | 256 - libs/gtkmm2/gtk/gtkmm/listviewtext.cc | 183 - libs/gtkmm2/gtk/gtkmm/listviewtext.h | 136 - libs/gtkmm2/gtk/gtkmm/main.cc | 569 - libs/gtkmm2/gtk/gtkmm/main.h | 285 - libs/gtkmm2/gtk/gtkmm/menu.cc | 345 - libs/gtkmm2/gtk/gtkmm/menu.h | 330 - libs/gtkmm2/gtk/gtkmm/menu_elems.cc | 286 - libs/gtkmm2/gtk/gtkmm/menu_elems.h | 266 - libs/gtkmm2/gtk/gtkmm/menubar.cc | 167 - libs/gtkmm2/gtk/gtkmm/menubar.h | 140 - libs/gtkmm2/gtk/gtkmm/menuitem.cc | 612 - libs/gtkmm2/gtk/gtkmm/menuitem.h | 275 - libs/gtkmm2/gtk/gtkmm/menushell.cc | 622 - libs/gtkmm2/gtk/gtkmm/menushell.h | 378 - libs/gtkmm2/gtk/gtkmm/menutoolbutton.cc | 291 - libs/gtkmm2/gtk/gtkmm/menutoolbutton.h | 252 - libs/gtkmm2/gtk/gtkmm/messagedialog.cc | 311 - libs/gtkmm2/gtk/gtkmm/messagedialog.h | 383 - libs/gtkmm2/gtk/gtkmm/misc.cc | 236 - libs/gtkmm2/gtk/gtkmm/misc.h | 241 - libs/gtkmm2/gtk/gtkmm/notebook.cc | 1200 - libs/gtkmm2/gtk/gtkmm/notebook.h | 1132 - libs/gtkmm2/gtk/gtkmm/object.cc | 430 - libs/gtkmm2/gtk/gtkmm/object.h | 216 - libs/gtkmm2/gtk/gtkmm/optionmenu.cc | 281 - libs/gtkmm2/gtk/gtkmm/optionmenu.h | 182 - libs/gtkmm2/gtk/gtkmm/pagesetup.cc | 277 - libs/gtkmm2/gtk/gtkmm/pagesetup.h | 337 - libs/gtkmm2/gtk/gtkmm/pagesetupunixdialog.cc | 198 - libs/gtkmm2/gtk/gtkmm/pagesetupunixdialog.h | 187 - libs/gtkmm2/gtk/gtkmm/paned.cc | 489 - libs/gtkmm2/gtk/gtkmm/paned.h | 463 - libs/gtkmm2/gtk/gtkmm/papersize.cc | 227 - libs/gtkmm2/gtk/gtkmm/papersize.h | 313 - libs/gtkmm2/gtk/gtkmm/plug.cc | 244 - libs/gtkmm2/gtk/gtkmm/plug.h | 149 - libs/gtkmm2/gtk/gtkmm/printcontext.cc | 230 - libs/gtkmm2/gtk/gtkmm/printcontext.h | 260 - libs/gtkmm2/gtk/gtkmm/printer.cc | 427 - libs/gtkmm2/gtk/gtkmm/printer.h | 471 - libs/gtkmm2/gtk/gtkmm/printjob.cc | 396 - libs/gtkmm2/gtk/gtkmm/printjob.h | 336 - libs/gtkmm2/gtk/gtkmm/printoperation.cc | 1577 - libs/gtkmm2/gtk/gtkmm/printoperation.h | 966 - .../gtkmm2/gtk/gtkmm/printoperationpreview.cc | 506 - libs/gtkmm2/gtk/gtkmm/printoperationpreview.h | 201 - libs/gtkmm2/gtk/gtkmm/printsettings.cc | 608 - libs/gtkmm2/gtk/gtkmm/printsettings.h | 840 - libs/gtkmm2/gtk/gtkmm/printunixdialog.cc | 295 - libs/gtkmm2/gtk/gtkmm/printunixdialog.h | 326 - libs/gtkmm2/gtk/gtkmm/private/Makefile.am | 14 - libs/gtkmm2/gtk/gtkmm/private/Makefile.in | 521 - libs/gtkmm2/gtk/gtkmm/private/aboutdialog_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/accelgroup_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/accellabel_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/action_p.h | 56 - libs/gtkmm2/gtk/gtkmm/private/actiongroup_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/adjustment_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/alignment_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/arrow_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/aspectframe_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/assistant_p.h | 55 - libs/gtkmm2/gtk/gtkmm/private/bin_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/box_p.h | 133 - libs/gtkmm2/gtk/gtkmm/private/builder_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/button_p.h | 57 - libs/gtkmm2/gtk/gtkmm/private/buttonbox_p.h | 133 - libs/gtkmm2/gtk/gtkmm/private/calendar_p.h | 58 - .../gtkmm2/gtk/gtkmm/private/celleditable_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/celllayout_p.h | 54 - .../gtkmm2/gtk/gtkmm/private/cellrenderer_p.h | 57 - .../gtk/gtkmm/private/cellrendereraccel_p.h | 53 - .../gtk/gtkmm/private/cellrenderercombo_p.h | 51 - .../gtk/gtkmm/private/cellrendererpixbuf_p.h | 51 - .../gtkmm/private/cellrendererprogress_p.h | 51 - .../gtk/gtkmm/private/cellrendererspin_p.h | 51 - .../gtk/gtkmm/private/cellrenderertext_p.h | 52 - .../gtk/gtkmm/private/cellrenderertoggle_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/cellview_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/checkbutton_p.h | 52 - .../gtk/gtkmm/private/checkmenuitem_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/clipboard_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/colorbutton_p.h | 52 - .../gtk/gtkmm/private/colorselection_p.h | 94 - libs/gtkmm2/gtk/gtkmm/private/combo_p.h | 142 - libs/gtkmm2/gtk/gtkmm/private/combobox_p.h | 52 - .../gtk/gtkmm/private/comboboxentry_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/container_p.h | 62 - libs/gtkmm2/gtk/gtkmm/private/curve_p.h | 94 - libs/gtkmm2/gtk/gtkmm/private/dialog_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/drawingarea_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/editable_p.h | 58 - libs/gtkmm2/gtk/gtkmm/private/entry_p.h | 54 - .../gtk/gtkmm/private/entrycompletion_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/enums_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/eventbox_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/expander_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/filechooser_p.h | 48 - .../gtk/gtkmm/private/filechooserbutton_p.h | 51 - .../gtk/gtkmm/private/filechooserdialog_p.h | 51 - .../gtk/gtkmm/private/filechooserwidget_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/filefilter_p.h | 51 - .../gtk/gtkmm/private/fileselection_p.h | 54 - libs/gtkmm2/gtk/gtkmm/private/fixed_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/fontbutton_p.h | 52 - .../gtk/gtkmm/private/fontselection_p.h | 93 - libs/gtkmm2/gtk/gtkmm/private/frame_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/handlebox_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/iconfactory_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/iconinfo_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/iconset_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/iconsource_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/icontheme_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/iconview_p.h | 54 - libs/gtkmm2/gtk/gtkmm/private/image_p.h | 51 - .../gtk/gtkmm/private/imagemenuitem_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/inputdialog_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/invisible_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/item_p.h | 54 - libs/gtkmm2/gtk/gtkmm/private/label_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/layout_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/linkbutton_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/liststore_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/main_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/menu_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/menubar_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/menuitem_p.h | 55 - libs/gtkmm2/gtk/gtkmm/private/menushell_p.h | 59 - .../gtk/gtkmm/private/menutoolbutton_p.h | 52 - .../gtk/gtkmm/private/messagedialog_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/misc_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/notebook_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/object_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/optionmenu_p.h | 55 - libs/gtkmm2/gtk/gtkmm/private/pagesetup_p.h | 51 - .../gtk/gtkmm/private/pagesetupunixdialog_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/paned_p.h | 133 - libs/gtkmm2/gtk/gtkmm/private/papersize_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/plug_p.h | 52 - .../gtkmm2/gtk/gtkmm/private/printcontext_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/printer_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/printjob_p.h | 52 - .../gtk/gtkmm/private/printoperation_p.h | 62 - .../gtkmm/private/printoperationpreview_p.h | 53 - .../gtk/gtkmm/private/printsettings_p.h | 51 - .../gtk/gtkmm/private/printunixdialog_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/progressbar_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/radioaction_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/radiobutton_p.h | 52 - .../gtk/gtkmm/private/radiomenuitem_p.h | 52 - .../gtk/gtkmm/private/radiotoolbutton_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/range_p.h | 55 - libs/gtkmm2/gtk/gtkmm/private/rc_p.h | 51 - .../gtkmm2/gtk/gtkmm/private/recentaction_p.h | 51 - .../gtk/gtkmm/private/recentchooser_p.h | 55 - .../gtk/gtkmm/private/recentchooserdialog_p.h | 51 - .../gtk/gtkmm/private/recentchoosermenu_p.h | 51 - .../gtk/gtkmm/private/recentchooserwidget_p.h | 51 - .../gtkmm2/gtk/gtkmm/private/recentfilter_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/recentinfo_p.h | 8 - .../gtk/gtkmm/private/recentmanager_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/ruler_p.h | 135 - libs/gtkmm2/gtk/gtkmm/private/scale_p.h | 135 - libs/gtkmm2/gtk/gtkmm/private/scalebutton_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/scrollbar_p.h | 133 - .../gtk/gtkmm/private/scrolledwindow_p.h | 51 - .../gtk/gtkmm/private/selectiondata_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/separator_p.h | 133 - .../gtk/gtkmm/private/separatormenuitem_p.h | 51 - .../gtk/gtkmm/private/separatortoolitem_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/settings_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/sizegroup_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/socket_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/spinbutton_p.h | 54 - libs/gtkmm2/gtk/gtkmm/private/statusbar_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/statusicon_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/stockitem_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/style_p.h | 82 - libs/gtkmm2/gtk/gtkmm/private/table_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/targetlist_p.h | 8 - .../gtk/gtkmm/private/tearoffmenuitem_p.h | 51 - .../gtk/gtkmm/private/textattributes_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/textbuffer_p.h | 63 - .../gtk/gtkmm/private/textchildanchor_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/textiter_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/textmark_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/texttag_p.h | 53 - .../gtkmm2/gtk/gtkmm/private/texttagtable_p.h | 54 - libs/gtkmm2/gtk/gtkmm/private/textview_p.h | 55 - .../gtkmm2/gtk/gtkmm/private/toggleaction_p.h | 52 - .../gtkmm2/gtk/gtkmm/private/togglebutton_p.h | 52 - .../gtk/gtkmm/private/toggletoolbutton_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/toolbar_p.h | 54 - libs/gtkmm2/gtk/gtkmm/private/toolbutton_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/toolitem_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/tooltip_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/tooltips_p.h | 54 - .../gtkmm2/gtk/gtkmm/private/treedragdest_p.h | 50 - .../gtk/gtkmm/private/treedragsource_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/treeiter_p.h | 8 - libs/gtkmm2/gtk/gtkmm/private/treemodel_p.h | 67 - .../gtk/gtkmm/private/treemodelfilter_p.h | 51 - .../gtk/gtkmm/private/treemodelsort_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/treepath_p.h | 8 - .../gtk/gtkmm/private/treerowreference_p.h | 8 - .../gtk/gtkmm/private/treeselection_p.h | 52 - .../gtkmm2/gtk/gtkmm/private/treesortable_p.h | 55 - libs/gtkmm2/gtk/gtkmm/private/treestore_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/treeview_p.h | 59 - .../gtk/gtkmm/private/treeviewcolumn_p.h | 52 - libs/gtkmm2/gtk/gtkmm/private/uimanager_p.h | 53 - libs/gtkmm2/gtk/gtkmm/private/viewport_p.h | 52 - .../gtkmm2/gtk/gtkmm/private/volumebutton_p.h | 51 - libs/gtkmm2/gtk/gtkmm/private/widget_p.h | 120 - libs/gtkmm2/gtk/gtkmm/private/window_p.h | 97 - libs/gtkmm2/gtk/gtkmm/progressbar.cc | 288 - libs/gtkmm2/gtk/gtkmm/progressbar.h | 395 - libs/gtkmm2/gtk/gtkmm/radioaction.cc | 327 - libs/gtkmm2/gtk/gtkmm/radioaction.h | 231 - libs/gtkmm2/gtk/gtkmm/radiobutton.cc | 264 - libs/gtkmm2/gtk/gtkmm/radiobutton.h | 183 - libs/gtkmm2/gtk/gtkmm/radiobuttongroup.cc | 86 - libs/gtkmm2/gtk/gtkmm/radiobuttongroup.h | 80 - libs/gtkmm2/gtk/gtkmm/radiomenuitem.cc | 254 - libs/gtkmm2/gtk/gtkmm/radiomenuitem.h | 167 - libs/gtkmm2/gtk/gtkmm/radiotoolbutton.cc | 203 - libs/gtkmm2/gtk/gtkmm/radiotoolbutton.h | 207 - libs/gtkmm2/gtk/gtkmm/range.cc | 751 - libs/gtkmm2/gtk/gtkmm/range.h | 577 - libs/gtkmm2/gtk/gtkmm/rc.cc | 377 - libs/gtkmm2/gtk/gtkmm/rc.h | 362 - libs/gtkmm2/gtk/gtkmm/recentaction.cc | 216 - libs/gtkmm2/gtk/gtkmm/recentaction.h | 206 - libs/gtkmm2/gtk/gtkmm/recentchooser.cc | 982 - libs/gtkmm2/gtk/gtkmm/recentchooser.h | 788 - libs/gtkmm2/gtk/gtkmm/recentchooserdialog.cc | 176 - libs/gtkmm2/gtk/gtkmm/recentchooserdialog.h | 148 - libs/gtkmm2/gtk/gtkmm/recentchoosermenu.cc | 167 - libs/gtkmm2/gtk/gtkmm/recentchoosermenu.h | 160 - libs/gtkmm2/gtk/gtkmm/recentchooserwidget.cc | 157 - libs/gtkmm2/gtk/gtkmm/recentchooserwidget.h | 141 - libs/gtkmm2/gtk/gtkmm/recentfilter.cc | 266 - libs/gtkmm2/gtk/gtkmm/recentfilter.h | 332 - libs/gtkmm2/gtk/gtkmm/recentinfo.cc | 238 - libs/gtkmm2/gtk/gtkmm/recentinfo.h | 324 - libs/gtkmm2/gtk/gtkmm/recentmanager.cc | 479 - libs/gtkmm2/gtk/gtkmm/recentmanager.h | 504 - libs/gtkmm2/gtk/gtkmm/ruler.cc | 591 - libs/gtkmm2/gtk/gtkmm/ruler.h | 459 - libs/gtkmm2/gtk/gtkmm/scale.cc | 726 - libs/gtkmm2/gtk/gtkmm/scale.h | 513 - libs/gtkmm2/gtk/gtkmm/scalebutton.cc | 325 - libs/gtkmm2/gtk/gtkmm/scalebutton.h | 264 - libs/gtkmm2/gtk/gtkmm/scrollbar.cc | 400 - libs/gtkmm2/gtk/gtkmm/scrollbar.h | 341 - libs/gtkmm2/gtk/gtkmm/scrolledwindow.cc | 373 - libs/gtkmm2/gtk/gtkmm/scrolledwindow.h | 388 - libs/gtkmm2/gtk/gtkmm/selectiondata.cc | 259 - libs/gtkmm2/gtk/gtkmm/selectiondata.h | 284 - .../gtkmm2/gtk/gtkmm/selectiondata_private.cc | 40 - libs/gtkmm2/gtk/gtkmm/selectiondata_private.h | 49 - libs/gtkmm2/gtk/gtkmm/separator.cc | 374 - libs/gtkmm2/gtk/gtkmm/separator.h | 320 - libs/gtkmm2/gtk/gtkmm/separatormenuitem.cc | 148 - libs/gtkmm2/gtk/gtkmm/separatormenuitem.h | 133 - libs/gtkmm2/gtk/gtkmm/separatortoolitem.cc | 154 - libs/gtkmm2/gtk/gtkmm/separatortoolitem.h | 137 - libs/gtkmm2/gtk/gtkmm/settings.cc | 831 - libs/gtkmm2/gtk/gtkmm/settings.h | 1111 - libs/gtkmm2/gtk/gtkmm/sizegroup.cc | 237 - libs/gtkmm2/gtk/gtkmm/sizegroup.h | 297 - libs/gtkmm2/gtk/gtkmm/socket.cc | 346 - libs/gtkmm2/gtk/gtkmm/socket.h | 222 - libs/gtkmm2/gtk/gtkmm/spinbutton.cc | 760 - libs/gtkmm2/gtk/gtkmm/spinbutton.h | 560 - libs/gtkmm2/gtk/gtkmm/statusbar.cc | 381 - libs/gtkmm2/gtk/gtkmm/statusbar.h | 209 - libs/gtkmm2/gtk/gtkmm/statusicon.cc | 580 - libs/gtkmm2/gtk/gtkmm/statusicon.h | 551 - libs/gtkmm2/gtk/gtkmm/stock.cc | 165 - libs/gtkmm2/gtk/gtkmm/stock.h | 175 - libs/gtkmm2/gtk/gtkmm/stockid.cc | 80 - libs/gtkmm2/gtk/gtkmm/stockid.h | 97 - libs/gtkmm2/gtk/gtkmm/stockitem.cc | 167 - libs/gtkmm2/gtk/gtkmm/stockitem.h | 108 - libs/gtkmm2/gtk/gtkmm/style.cc | 2435 - libs/gtkmm2/gtk/gtkmm/style.h | 987 - libs/gtkmm2/gtk/gtkmm/table.cc | 442 - libs/gtkmm2/gtk/gtkmm/table.h | 407 - libs/gtkmm2/gtk/gtkmm/targetentry.cc | 113 - libs/gtkmm2/gtk/gtkmm/targetentry.h | 97 - libs/gtkmm2/gtk/gtkmm/targetlist.cc | 130 - libs/gtkmm2/gtk/gtkmm/targetlist.h | 115 - libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.cc | 157 - libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.h | 136 - libs/gtkmm2/gtk/gtkmm/textattributes.cc | 104 - libs/gtkmm2/gtk/gtkmm/textattributes.h | 119 - libs/gtkmm2/gtk/gtkmm/textbuffer.cc | 2002 - libs/gtkmm2/gtk/gtkmm/textbuffer.h | 1162 - libs/gtkmm2/gtk/gtkmm/textchildanchor.cc | 170 - libs/gtkmm2/gtk/gtkmm/textchildanchor.h | 171 - libs/gtkmm2/gtk/gtkmm/textiter.cc | 638 - libs/gtkmm2/gtk/gtkmm/textiter.h | 1172 - libs/gtkmm2/gtk/gtkmm/textmark.cc | 224 - libs/gtkmm2/gtk/gtkmm/textmark.h | 272 - libs/gtkmm2/gtk/gtkmm/texttag.cc | 1198 - libs/gtkmm2/gtk/gtkmm/texttag.h | 1468 - libs/gtkmm2/gtk/gtkmm/texttagtable.cc | 486 - libs/gtkmm2/gtk/gtkmm/texttagtable.h | 211 - libs/gtkmm2/gtk/gtkmm/textview.cc | 1024 - libs/gtkmm2/gtk/gtkmm/textview.h | 1058 - libs/gtkmm2/gtk/gtkmm/toggleaction.cc | 287 - libs/gtkmm2/gtk/gtkmm/toggleaction.h | 212 - libs/gtkmm2/gtk/gtkmm/togglebutton.cc | 312 - libs/gtkmm2/gtk/gtkmm/togglebutton.h | 270 - libs/gtkmm2/gtk/gtkmm/toggletoolbutton.cc | 252 - libs/gtkmm2/gtk/gtkmm/toggletoolbutton.h | 187 - libs/gtkmm2/gtk/gtkmm/toolbar.cc | 686 - libs/gtkmm2/gtk/gtkmm/toolbar.h | 450 - libs/gtkmm2/gtk/gtkmm/toolbutton.cc | 384 - libs/gtkmm2/gtk/gtkmm/toolbutton.h | 398 - libs/gtkmm2/gtk/gtkmm/toolitem.cc | 525 - libs/gtkmm2/gtk/gtkmm/toolitem.h | 517 - libs/gtkmm2/gtk/gtkmm/tooltip.cc | 181 - libs/gtkmm2/gtk/gtkmm/tooltip.h | 238 - libs/gtkmm2/gtk/gtkmm/tooltips.cc | 196 - libs/gtkmm2/gtk/gtkmm/tooltips.h | 170 - libs/gtkmm2/gtk/gtkmm/treedragdest.cc | 272 - libs/gtkmm2/gtk/gtkmm/treedragdest.h | 183 - libs/gtkmm2/gtk/gtkmm/treedragsource.cc | 343 - libs/gtkmm2/gtk/gtkmm/treedragsource.h | 195 - libs/gtkmm2/gtk/gtkmm/treeiter.cc | 394 - libs/gtkmm2/gtk/gtkmm/treeiter.h | 519 - libs/gtkmm2/gtk/gtkmm/treemodel.cc | 1767 - libs/gtkmm2/gtk/gtkmm/treemodel.h | 686 - libs/gtkmm2/gtk/gtkmm/treemodelcolumn.cc | 68 - libs/gtkmm2/gtk/gtkmm/treemodelcolumn.h | 147 - libs/gtkmm2/gtk/gtkmm/treemodelfilter.cc | 357 - libs/gtkmm2/gtk/gtkmm/treemodelfilter.h | 324 - libs/gtkmm2/gtk/gtkmm/treemodelsort.cc | 245 - libs/gtkmm2/gtk/gtkmm/treemodelsort.h | 236 - libs/gtkmm2/gtk/gtkmm/treepath.cc | 335 - libs/gtkmm2/gtk/gtkmm/treepath.h | 425 - libs/gtkmm2/gtk/gtkmm/treerowreference.cc | 139 - libs/gtkmm2/gtk/gtkmm/treerowreference.h | 156 - libs/gtkmm2/gtk/gtkmm/treeselection.cc | 467 - libs/gtkmm2/gtk/gtkmm/treeselection.h | 384 - libs/gtkmm2/gtk/gtkmm/treesortable.cc | 639 - libs/gtkmm2/gtk/gtkmm/treesortable.h | 282 - libs/gtkmm2/gtk/gtkmm/treestore.cc | 304 - libs/gtkmm2/gtk/gtkmm/treestore.h | 284 - libs/gtkmm2/gtk/gtkmm/treeview.cc | 2151 - libs/gtkmm2/gtk/gtkmm/treeview.h | 2500 - libs/gtkmm2/gtk/gtkmm/treeview_private.cc | 85 - libs/gtkmm2/gtk/gtkmm/treeview_private.h | 49 - libs/gtkmm2/gtk/gtkmm/treeviewcolumn.cc | 764 - libs/gtkmm2/gtk/gtkmm/treeviewcolumn.h | 957 - libs/gtkmm2/gtk/gtkmm/uimanager.cc | 656 - libs/gtkmm2/gtk/gtkmm/uimanager.h | 745 - libs/gtkmm2/gtk/gtkmm/viewport.cc | 337 - libs/gtkmm2/gtk/gtkmm/viewport.h | 260 - libs/gtkmm2/gtk/gtkmm/volumebutton.cc | 155 - libs/gtkmm2/gtk/gtkmm/volumebutton.h | 142 - libs/gtkmm2/gtk/gtkmm/widget.cc | 8067 -- libs/gtkmm2/gtk/gtkmm/widget.h | 3420 - libs/gtkmm2/gtk/gtkmm/window.cc | 1529 - libs/gtkmm2/gtk/gtkmm/window.h | 1961 - libs/gtkmm2/gtk/gtkmm/wrap_init.cc | 947 - libs/gtkmm2/gtk/gtkmm/wrap_init.h | 32 - libs/gtkmm2/gtk/gtkmmconfig.h | 48 - libs/gtkmm2/gtk/gtkmmconfig.h.in | 49 - libs/gtkmm2/gtk/src/Makefile.am | 11 - libs/gtkmm2/gtk/src/Makefile.in | 494 - .../gtk/src/Makefile_list_of_hg.am_fragment | 43 - libs/gtkmm2/gtk/src/README | 3 - libs/gtkmm2/gtk/src/aboutdialog.ccg | 84 - libs/gtkmm2/gtk/src/aboutdialog.hg | 135 - libs/gtkmm2/gtk/src/accelgroup.ccg | 58 - libs/gtkmm2/gtk/src/accelgroup.hg | 120 - libs/gtkmm2/gtk/src/accellabel.ccg | 46 - libs/gtkmm2/gtk/src/accellabel.hg | 68 - libs/gtkmm2/gtk/src/action.ccg | 61 - libs/gtkmm2/gtk/src/action.hg | 154 - libs/gtkmm2/gtk/src/actiongroup.ccg | 110 - libs/gtkmm2/gtk/src/actiongroup.hg | 132 - libs/gtkmm2/gtk/src/adjustment.ccg | 66 - libs/gtkmm2/gtk/src/adjustment.hg | 132 - libs/gtkmm2/gtk/src/alignment.ccg | 30 - libs/gtkmm2/gtk/src/alignment.hg | 85 - libs/gtkmm2/gtk/src/arrow.ccg | 46 - libs/gtkmm2/gtk/src/arrow.hg | 66 - libs/gtkmm2/gtk/src/aspectframe.ccg | 23 - libs/gtkmm2/gtk/src/aspectframe.hg | 104 - libs/gtkmm2/gtk/src/assistant.ccg | 70 - libs/gtkmm2/gtk/src/assistant.hg | 88 - libs/gtkmm2/gtk/src/bin.ccg | 127 - libs/gtkmm2/gtk/src/bin.hg | 133 - libs/gtkmm2/gtk/src/box.ccg | 125 - libs/gtkmm2/gtk/src/box.hg | 267 - libs/gtkmm2/gtk/src/builder.ccg | 129 - libs/gtkmm2/gtk/src/builder.hg | 212 - libs/gtkmm2/gtk/src/button.ccg | 43 - libs/gtkmm2/gtk/src/button.hg | 126 - libs/gtkmm2/gtk/src/buttonbox.ccg | 46 - libs/gtkmm2/gtk/src/buttonbox.hg | 106 - libs/gtkmm2/gtk/src/calendar.ccg | 42 - libs/gtkmm2/gtk/src/calendar.hg | 90 - libs/gtkmm2/gtk/src/celleditable.ccg | 22 - libs/gtkmm2/gtk/src/celleditable.hg | 56 - libs/gtkmm2/gtk/src/celllayout.ccg | 81 - libs/gtkmm2/gtk/src/celllayout.hg | 111 - libs/gtkmm2/gtk/src/cellrenderer.ccg | 46 - libs/gtkmm2/gtk/src/cellrenderer.hg | 211 - libs/gtkmm2/gtk/src/cellrendereraccel.ccg | 36 - libs/gtkmm2/gtk/src/cellrendereraccel.hg | 64 - libs/gtkmm2/gtk/src/cellrenderercombo.ccg | 40 - libs/gtkmm2/gtk/src/cellrenderercombo.hg | 62 - libs/gtkmm2/gtk/src/cellrendererpixbuf.ccg | 39 - libs/gtkmm2/gtk/src/cellrendererpixbuf.hg | 63 - libs/gtkmm2/gtk/src/cellrendererprogress.ccg | 42 - libs/gtkmm2/gtk/src/cellrendererprogress.hg | 53 - libs/gtkmm2/gtk/src/cellrendererspin.ccg | 30 - libs/gtkmm2/gtk/src/cellrendererspin.hg | 61 - libs/gtkmm2/gtk/src/cellrenderertext.ccg | 45 - libs/gtkmm2/gtk/src/cellrenderertext.hg | 102 - libs/gtkmm2/gtk/src/cellrenderertoggle.ccg | 40 - libs/gtkmm2/gtk/src/cellrenderertoggle.hg | 69 - libs/gtkmm2/gtk/src/cellview.ccg | 72 - libs/gtkmm2/gtk/src/cellview.hg | 88 - libs/gtkmm2/gtk/src/checkbutton.ccg | 34 - libs/gtkmm2/gtk/src/checkbutton.hg | 74 - libs/gtkmm2/gtk/src/checkmenuitem.ccg | 38 - libs/gtkmm2/gtk/src/checkmenuitem.hg | 78 - libs/gtkmm2/gtk/src/clipboard.ccg | 360 - libs/gtkmm2/gtk/src/clipboard.hg | 283 - libs/gtkmm2/gtk/src/colorbutton.ccg | 39 - libs/gtkmm2/gtk/src/colorbutton.hg | 102 - libs/gtkmm2/gtk/src/colorselection.ccg | 144 - libs/gtkmm2/gtk/src/colorselection.hg | 101 - libs/gtkmm2/gtk/src/combo.ccg | 129 - libs/gtkmm2/gtk/src/combo.hg | 203 - libs/gtkmm2/gtk/src/combobox.ccg | 87 - libs/gtkmm2/gtk/src/combobox.hg | 158 - libs/gtkmm2/gtk/src/comboboxentry.ccg | 42 - libs/gtkmm2/gtk/src/comboboxentry.hg | 87 - libs/gtkmm2/gtk/src/container.ccg | 256 - libs/gtkmm2/gtk/src/container.hg | 204 - libs/gtkmm2/gtk/src/curve.ccg | 43 - libs/gtkmm2/gtk/src/curve.hg | 80 - libs/gtkmm2/gtk/src/dialog.ccg | 53 - libs/gtkmm2/gtk/src/dialog.hg | 126 - libs/gtkmm2/gtk/src/drawingarea.ccg | 24 - libs/gtkmm2/gtk/src/drawingarea.hg | 44 - libs/gtkmm2/gtk/src/editable.ccg | 22 - libs/gtkmm2/gtk/src/editable.hg | 135 - libs/gtkmm2/gtk/src/entry.ccg | 24 - libs/gtkmm2/gtk/src/entry.hg | 135 - libs/gtkmm2/gtk/src/entrycompletion.ccg | 328 - libs/gtkmm2/gtk/src/entrycompletion.hg | 217 - libs/gtkmm2/gtk/src/enums.ccg | 56 - libs/gtkmm2/gtk/src/enums.hg | 170 - libs/gtkmm2/gtk/src/eventbox.ccg | 23 - libs/gtkmm2/gtk/src/eventbox.hg | 57 - libs/gtkmm2/gtk/src/expander.ccg | 34 - libs/gtkmm2/gtk/src/expander.hg | 116 - libs/gtkmm2/gtk/src/filechooser.ccg | 24 - libs/gtkmm2/gtk/src/filechooser.hg | 238 - libs/gtkmm2/gtk/src/filechooserbutton.ccg | 36 - libs/gtkmm2/gtk/src/filechooserbutton.hg | 101 - libs/gtkmm2/gtk/src/filechooserdialog.ccg | 56 - libs/gtkmm2/gtk/src/filechooserdialog.hg | 53 - libs/gtkmm2/gtk/src/filechooserwidget.ccg | 30 - libs/gtkmm2/gtk/src/filechooserwidget.hg | 64 - libs/gtkmm2/gtk/src/filefilter.ccg | 73 - libs/gtkmm2/gtk/src/filefilter.hg | 88 - libs/gtkmm2/gtk/src/fileselection.ccg | 37 - libs/gtkmm2/gtk/src/fileselection.hg | 103 - libs/gtkmm2/gtk/src/fixed.ccg | 28 - libs/gtkmm2/gtk/src/fixed.hg | 56 - libs/gtkmm2/gtk/src/fontbutton.ccg | 30 - libs/gtkmm2/gtk/src/fontbutton.hg | 72 - libs/gtkmm2/gtk/src/fontselection.ccg | 25 - libs/gtkmm2/gtk/src/fontselection.hg | 100 - libs/gtkmm2/gtk/src/frame.ccg | 32 - libs/gtkmm2/gtk/src/frame.hg | 89 - libs/gtkmm2/gtk/src/gtk.defs | 6 - libs/gtkmm2/gtk/src/gtk_docs.xml | 61479 ---------------- libs/gtkmm2/gtk/src/gtk_docs_override.xml | 2831 - libs/gtkmm2/gtk/src/gtk_enums.defs | 1509 - libs/gtkmm2/gtk/src/gtk_methods.defs | 32810 --------- libs/gtkmm2/gtk/src/gtk_other.defs | 422 - libs/gtkmm2/gtk/src/gtk_signals.defs | 39166 ---------- libs/gtkmm2/gtk/src/gtk_vfuncs.defs | 1156 - libs/gtkmm2/gtk/src/handlebox.ccg | 50 - libs/gtkmm2/gtk/src/handlebox.hg | 74 - libs/gtkmm2/gtk/src/iconfactory.ccg | 61 - libs/gtkmm2/gtk/src/iconfactory.hg | 50 - libs/gtkmm2/gtk/src/iconinfo.ccg | 45 - libs/gtkmm2/gtk/src/iconinfo.hg | 50 - libs/gtkmm2/gtk/src/iconset.ccg | 52 - libs/gtkmm2/gtk/src/iconset.hg | 64 - libs/gtkmm2/gtk/src/iconsource.ccg | 23 - libs/gtkmm2/gtk/src/iconsource.hg | 62 - libs/gtkmm2/gtk/src/icontheme.ccg | 53 - libs/gtkmm2/gtk/src/icontheme.hg | 86 - libs/gtkmm2/gtk/src/iconview.ccg | 239 - libs/gtkmm2/gtk/src/iconview.hg | 412 - libs/gtkmm2/gtk/src/image.ccg | 107 - libs/gtkmm2/gtk/src/image.hg | 119 - libs/gtkmm2/gtk/src/imagemenuitem.ccg | 69 - libs/gtkmm2/gtk/src/imagemenuitem.hg | 56 - libs/gtkmm2/gtk/src/inputdialog.ccg | 27 - libs/gtkmm2/gtk/src/inputdialog.hg | 73 - libs/gtkmm2/gtk/src/invisible.ccg | 30 - libs/gtkmm2/gtk/src/invisible.hg | 47 - libs/gtkmm2/gtk/src/item.ccg | 25 - libs/gtkmm2/gtk/src/item.hg | 57 - libs/gtkmm2/gtk/src/label.ccg | 57 - libs/gtkmm2/gtk/src/label.hg | 164 - libs/gtkmm2/gtk/src/layout.ccg | 75 - libs/gtkmm2/gtk/src/layout.hg | 87 - libs/gtkmm2/gtk/src/linkbutton.ccg | 75 - libs/gtkmm2/gtk/src/linkbutton.hg | 83 - libs/gtkmm2/gtk/src/liststore.ccg | 131 - libs/gtkmm2/gtk/src/liststore.hg | 150 - libs/gtkmm2/gtk/src/main.ccg | 557 - libs/gtkmm2/gtk/src/main.hg | 275 - libs/gtkmm2/gtk/src/menu.ccg | 101 - libs/gtkmm2/gtk/src/menu.hg | 139 - libs/gtkmm2/gtk/src/menubar.ccg | 49 - libs/gtkmm2/gtk/src/menubar.hg | 51 - libs/gtkmm2/gtk/src/menuitem.ccg | 113 - libs/gtkmm2/gtk/src/menuitem.hg | 94 - libs/gtkmm2/gtk/src/menushell.ccg | 201 - libs/gtkmm2/gtk/src/menushell.hg | 164 - libs/gtkmm2/gtk/src/menutoolbutton.ccg | 43 - libs/gtkmm2/gtk/src/menutoolbutton.hg | 86 - libs/gtkmm2/gtk/src/messagedialog.ccg | 71 - libs/gtkmm2/gtk/src/messagedialog.hg | 88 - libs/gtkmm2/gtk/src/misc.ccg | 29 - libs/gtkmm2/gtk/src/misc.hg | 61 - libs/gtkmm2/gtk/src/notebook.ccg | 471 - libs/gtkmm2/gtk/src/notebook.hg | 456 - libs/gtkmm2/gtk/src/object.ccg | 316 - libs/gtkmm2/gtk/src/object.hg | 114 - libs/gtkmm2/gtk/src/optionmenu.ccg | 68 - libs/gtkmm2/gtk/src/optionmenu.hg | 67 - libs/gtkmm2/gtk/src/pagesetup.ccg | 29 - libs/gtkmm2/gtk/src/pagesetup.hg | 107 - libs/gtkmm2/gtk/src/pagesetupunixdialog.ccg | 37 - libs/gtkmm2/gtk/src/pagesetupunixdialog.hg | 60 - libs/gtkmm2/gtk/src/paned.ccg | 47 - libs/gtkmm2/gtk/src/paned.hg | 130 - libs/gtkmm2/gtk/src/papersize.ccg | 74 - libs/gtkmm2/gtk/src/papersize.hg | 108 - libs/gtkmm2/gtk/src/plug.ccg | 50 - libs/gtkmm2/gtk/src/plug.hg | 43 - libs/gtkmm2/gtk/src/printcontext.ccg | 24 - libs/gtkmm2/gtk/src/printcontext.hg | 77 - libs/gtkmm2/gtk/src/printer.ccg | 71 - libs/gtkmm2/gtk/src/printer.hg | 125 - libs/gtkmm2/gtk/src/printjob.ccg | 70 - libs/gtkmm2/gtk/src/printjob.hg | 102 - libs/gtkmm2/gtk/src/printoperation.ccg | 113 - libs/gtkmm2/gtk/src/printoperation.hg | 200 - libs/gtkmm2/gtk/src/printoperationpreview.ccg | 19 - libs/gtkmm2/gtk/src/printoperationpreview.hg | 59 - libs/gtkmm2/gtk/src/printsettings.ccg | 141 - libs/gtkmm2/gtk/src/printsettings.hg | 233 - libs/gtkmm2/gtk/src/printunixdialog.ccg | 44 - libs/gtkmm2/gtk/src/printunixdialog.hg | 85 - libs/gtkmm2/gtk/src/progressbar.ccg | 24 - libs/gtkmm2/gtk/src/progressbar.hg | 98 - libs/gtkmm2/gtk/src/radioaction.ccg | 57 - libs/gtkmm2/gtk/src/radioaction.hg | 77 - libs/gtkmm2/gtk/src/radiobutton.ccg | 69 - libs/gtkmm2/gtk/src/radiobutton.hg | 87 - libs/gtkmm2/gtk/src/radiomenuitem.ccg | 63 - libs/gtkmm2/gtk/src/radiomenuitem.hg | 71 - libs/gtkmm2/gtk/src/radiotoolbutton.ccg | 68 - libs/gtkmm2/gtk/src/radiotoolbutton.hg | 107 - libs/gtkmm2/gtk/src/range.ccg | 34 - libs/gtkmm2/gtk/src/range.hg | 114 - libs/gtkmm2/gtk/src/rc.ccg | 177 - libs/gtkmm2/gtk/src/rc.hg | 209 - libs/gtkmm2/gtk/src/recentaction.ccg | 34 - libs/gtkmm2/gtk/src/recentaction.hg | 78 - libs/gtkmm2/gtk/src/recentchooser.ccg | 75 - libs/gtkmm2/gtk/src/recentchooser.hg | 167 - libs/gtkmm2/gtk/src/recentchooserdialog.ccg | 51 - libs/gtkmm2/gtk/src/recentchooserdialog.hg | 60 - libs/gtkmm2/gtk/src/recentchoosermenu.ccg | 23 - libs/gtkmm2/gtk/src/recentchoosermenu.hg | 56 - libs/gtkmm2/gtk/src/recentchooserwidget.ccg | 23 - libs/gtkmm2/gtk/src/recentchooserwidget.hg | 51 - libs/gtkmm2/gtk/src/recentfilter.ccg | 90 - libs/gtkmm2/gtk/src/recentfilter.hg | 105 - libs/gtkmm2/gtk/src/recentinfo.ccg | 51 - libs/gtkmm2/gtk/src/recentinfo.hg | 112 - libs/gtkmm2/gtk/src/recentmanager.ccg | 49 - libs/gtkmm2/gtk/src/recentmanager.hg | 144 - libs/gtkmm2/gtk/src/ruler.ccg | 43 - libs/gtkmm2/gtk/src/ruler.hg | 115 - libs/gtkmm2/gtk/src/scale.ccg | 107 - libs/gtkmm2/gtk/src/scale.hg | 171 - libs/gtkmm2/gtk/src/scalebutton.ccg | 30 - libs/gtkmm2/gtk/src/scalebutton.hg | 68 - libs/gtkmm2/gtk/src/scrollbar.ccg | 68 - libs/gtkmm2/gtk/src/scrollbar.hg | 97 - libs/gtkmm2/gtk/src/scrolledwindow.ccg | 54 - libs/gtkmm2/gtk/src/scrolledwindow.hg | 110 - libs/gtkmm2/gtk/src/selectiondata.ccg | 94 - libs/gtkmm2/gtk/src/selectiondata.hg | 117 - libs/gtkmm2/gtk/src/separator.ccg | 25 - libs/gtkmm2/gtk/src/separator.hg | 74 - libs/gtkmm2/gtk/src/separatormenuitem.ccg | 23 - libs/gtkmm2/gtk/src/separatormenuitem.hg | 44 - libs/gtkmm2/gtk/src/separatortoolitem.ccg | 29 - libs/gtkmm2/gtk/src/separatortoolitem.hg | 48 - libs/gtkmm2/gtk/src/settings.ccg | 30 - libs/gtkmm2/gtk/src/settings.hg | 117 - libs/gtkmm2/gtk/src/sizegroup.ccg | 34 - libs/gtkmm2/gtk/src/sizegroup.hg | 78 - libs/gtkmm2/gtk/src/socket.ccg | 22 - libs/gtkmm2/gtk/src/socket.hg | 91 - libs/gtkmm2/gtk/src/spinbutton.ccg | 38 - libs/gtkmm2/gtk/src/spinbutton.hg | 129 - libs/gtkmm2/gtk/src/statusbar.ccg | 39 - libs/gtkmm2/gtk/src/statusbar.hg | 62 - libs/gtkmm2/gtk/src/statusicon.ccg | 57 - libs/gtkmm2/gtk/src/statusicon.hg | 178 - libs/gtkmm2/gtk/src/stockitem.ccg | 59 - libs/gtkmm2/gtk/src/stockitem.hg | 54 - libs/gtkmm2/gtk/src/style.ccg | 233 - libs/gtkmm2/gtk/src/style.hg | 591 - libs/gtkmm2/gtk/src/table.ccg | 120 - libs/gtkmm2/gtk/src/table.hg | 179 - libs/gtkmm2/gtk/src/targetlist.ccg | 32 - libs/gtkmm2/gtk/src/targetlist.hg | 44 - libs/gtkmm2/gtk/src/tearoffmenuitem.ccg | 33 - libs/gtkmm2/gtk/src/tearoffmenuitem.hg | 47 - libs/gtkmm2/gtk/src/textattributes.ccg | 24 - libs/gtkmm2/gtk/src/textattributes.hg | 41 - libs/gtkmm2/gtk/src/textbuffer.ccg | 600 - libs/gtkmm2/gtk/src/textbuffer.hg | 604 - libs/gtkmm2/gtk/src/textchildanchor.ccg | 23 - libs/gtkmm2/gtk/src/textchildanchor.hg | 62 - libs/gtkmm2/gtk/src/textiter.ccg | 75 - libs/gtkmm2/gtk/src/textiter.hg | 367 - libs/gtkmm2/gtk/src/textmark.ccg | 45 - libs/gtkmm2/gtk/src/textmark.hg | 143 - libs/gtkmm2/gtk/src/texttag.ccg | 25 - libs/gtkmm2/gtk/src/texttag.hg | 143 - libs/gtkmm2/gtk/src/texttagtable.ccg | 50 - libs/gtkmm2/gtk/src/texttagtable.hg | 69 - libs/gtkmm2/gtk/src/textview.ccg | 73 - libs/gtkmm2/gtk/src/textview.hg | 235 - libs/gtkmm2/gtk/src/toggleaction.ccg | 46 - libs/gtkmm2/gtk/src/toggleaction.hg | 63 - libs/gtkmm2/gtk/src/togglebutton.ccg | 39 - libs/gtkmm2/gtk/src/togglebutton.hg | 83 - libs/gtkmm2/gtk/src/toggletoolbutton.ccg | 43 - libs/gtkmm2/gtk/src/toggletoolbutton.hg | 76 - libs/gtkmm2/gtk/src/toolbar.ccg | 104 - libs/gtkmm2/gtk/src/toolbar.hg | 156 - libs/gtkmm2/gtk/src/toolbutton.ccg | 36 - libs/gtkmm2/gtk/src/toolbutton.hg | 98 - libs/gtkmm2/gtk/src/toolitem.ccg | 39 - libs/gtkmm2/gtk/src/toolitem.hg | 148 - libs/gtkmm2/gtk/src/tooltip.ccg | 30 - libs/gtkmm2/gtk/src/tooltip.hg | 92 - libs/gtkmm2/gtk/src/tooltips.ccg | 41 - libs/gtkmm2/gtk/src/tooltips.hg | 69 - libs/gtkmm2/gtk/src/treedragdest.ccg | 24 - libs/gtkmm2/gtk/src/treedragdest.hg | 60 - libs/gtkmm2/gtk/src/treedragsource.ccg | 91 - libs/gtkmm2/gtk/src/treedragsource.hg | 74 - libs/gtkmm2/gtk/src/treeiter.ccg | 355 - libs/gtkmm2/gtk/src/treeiter.hg | 473 - libs/gtkmm2/gtk/src/treemodel.ccg | 657 - libs/gtkmm2/gtk/src/treemodel.hg | 429 - libs/gtkmm2/gtk/src/treemodelfilter.ccg | 160 - libs/gtkmm2/gtk/src/treemodelfilter.hg | 135 - libs/gtkmm2/gtk/src/treemodelsort.ccg | 70 - libs/gtkmm2/gtk/src/treemodelsort.hg | 95 - libs/gtkmm2/gtk/src/treepath.ccg | 148 - libs/gtkmm2/gtk/src/treepath.hg | 229 - libs/gtkmm2/gtk/src/treerowreference.ccg | 38 - libs/gtkmm2/gtk/src/treerowreference.hg | 54 - libs/gtkmm2/gtk/src/treeselection.ccg | 200 - libs/gtkmm2/gtk/src/treeselection.hg | 210 - libs/gtkmm2/gtk/src/treesortable.ccg | 94 - libs/gtkmm2/gtk/src/treesortable.hg | 124 - libs/gtkmm2/gtk/src/treestore.ccg | 140 - libs/gtkmm2/gtk/src/treestore.hg | 166 - libs/gtkmm2/gtk/src/treeview.ccg | 494 - libs/gtkmm2/gtk/src/treeview.hg | 1284 - libs/gtkmm2/gtk/src/treeviewcolumn.ccg | 120 - libs/gtkmm2/gtk/src/treeviewcolumn.hg | 287 - libs/gtkmm2/gtk/src/uimanager.ccg | 56 - libs/gtkmm2/gtk/src/uimanager.hg | 314 - libs/gtkmm2/gtk/src/viewport.ccg | 25 - libs/gtkmm2/gtk/src/viewport.hg | 79 - libs/gtkmm2/gtk/src/volumebutton.ccg | 30 - libs/gtkmm2/gtk/src/volumebutton.hg | 54 - libs/gtkmm2/gtk/src/widget.ccg | 584 - libs/gtkmm2/gtk/src/widget.hg | 962 - libs/gtkmm2/gtk/src/window.ccg | 206 - libs/gtkmm2/gtk/src/window.hg | 368 - libs/gtkmm2/pango/Makefile.am | 10 - libs/gtkmm2/pango/Makefile.in | 576 - libs/gtkmm2/pango/README | 0 libs/gtkmm2/pango/SConscript | 26 - libs/gtkmm2/pango/pangomm-1.4.pc.in | 11 - libs/gtkmm2/pango/pangomm.h | 41 - libs/gtkmm2/pango/pangomm/Makefile.am | 31 - libs/gtkmm2/pango/pangomm/Makefile.in | 791 - libs/gtkmm2/pango/pangomm/attributes.cc | 535 - libs/gtkmm2/pango/pangomm/attributes.h | 677 - libs/gtkmm2/pango/pangomm/attriter.cc | 181 - libs/gtkmm2/pango/pangomm/attriter.h | 152 - libs/gtkmm2/pango/pangomm/attrlist.cc | 166 - libs/gtkmm2/pango/pangomm/attrlist.h | 195 - libs/gtkmm2/pango/pangomm/cairofontmap.cc | 168 - libs/gtkmm2/pango/pangomm/cairofontmap.h | 181 - libs/gtkmm2/pango/pangomm/color.cc | 129 - libs/gtkmm2/pango/pangomm/color.h | 148 - libs/gtkmm2/pango/pangomm/context.cc | 330 - libs/gtkmm2/pango/pangomm/context.h | 497 - libs/gtkmm2/pango/pangomm/coverage.cc | 152 - libs/gtkmm2/pango/pangomm/coverage.h | 175 - libs/gtkmm2/pango/pangomm/font.cc | 205 - libs/gtkmm2/pango/pangomm/font.h | 229 - libs/gtkmm2/pango/pangomm/fontdescription.cc | 279 - libs/gtkmm2/pango/pangomm/fontdescription.h | 613 - libs/gtkmm2/pango/pangomm/fontface.cc | 172 - libs/gtkmm2/pango/pangomm/fontface.h | 172 - libs/gtkmm2/pango/pangomm/fontfamily.cc | 168 - libs/gtkmm2/pango/pangomm/fontfamily.h | 183 - libs/gtkmm2/pango/pangomm/fontmap.cc | 172 - libs/gtkmm2/pango/pangomm/fontmap.h | 163 - libs/gtkmm2/pango/pangomm/fontmetrics.cc | 143 - libs/gtkmm2/pango/pangomm/fontmetrics.h | 192 - libs/gtkmm2/pango/pangomm/fontset.cc | 184 - libs/gtkmm2/pango/pangomm/fontset.h | 163 - libs/gtkmm2/pango/pangomm/glyph.cc | 145 - libs/gtkmm2/pango/pangomm/glyph.h | 224 - libs/gtkmm2/pango/pangomm/glyphstring.cc | 191 - libs/gtkmm2/pango/pangomm/glyphstring.h | 245 - libs/gtkmm2/pango/pangomm/init.cc | 34 - libs/gtkmm2/pango/pangomm/init.h | 40 - libs/gtkmm2/pango/pangomm/item.cc | 202 - libs/gtkmm2/pango/pangomm/item.h | 219 - libs/gtkmm2/pango/pangomm/language.cc | 158 - libs/gtkmm2/pango/pangomm/language.h | 266 - libs/gtkmm2/pango/pangomm/layout.cc | 511 - libs/gtkmm2/pango/pangomm/layout.h | 825 - libs/gtkmm2/pango/pangomm/layoutiter.cc | 207 - libs/gtkmm2/pango/pangomm/layoutiter.h | 246 - libs/gtkmm2/pango/pangomm/layoutline.cc | 208 - libs/gtkmm2/pango/pangomm/layoutline.h | 244 - libs/gtkmm2/pango/pangomm/layoutrun.cc | 79 - libs/gtkmm2/pango/pangomm/layoutrun.h | 93 - libs/gtkmm2/pango/pangomm/private/Makefile.am | 11 - libs/gtkmm2/pango/pangomm/private/Makefile.in | 491 - .../pango/pangomm/private/attributes_p.h | 8 - .../gtkmm2/pango/pangomm/private/attriter_p.h | 8 - .../gtkmm2/pango/pangomm/private/attrlist_p.h | 8 - .../pango/pangomm/private/cairofontmap_p.h | 48 - libs/gtkmm2/pango/pangomm/private/color_p.h | 8 - libs/gtkmm2/pango/pangomm/private/context_p.h | 51 - .../gtkmm2/pango/pangomm/private/coverage_p.h | 8 - libs/gtkmm2/pango/pangomm/private/font_p.h | 51 - .../pango/pangomm/private/fontdescription_p.h | 8 - .../gtkmm2/pango/pangomm/private/fontface_p.h | 51 - .../pango/pangomm/private/fontfamily_p.h | 51 - libs/gtkmm2/pango/pangomm/private/fontmap_p.h | 51 - .../pango/pangomm/private/fontmetrics_p.h | 8 - libs/gtkmm2/pango/pangomm/private/fontset_p.h | 51 - libs/gtkmm2/pango/pangomm/private/glyph_p.h | 8 - .../pango/pangomm/private/glyphstring_p.h | 8 - libs/gtkmm2/pango/pangomm/private/item_p.h | 8 - .../gtkmm2/pango/pangomm/private/language_p.h | 8 - libs/gtkmm2/pango/pangomm/private/layout_p.h | 51 - .../pango/pangomm/private/layoutiter_p.h | 8 - .../pango/pangomm/private/layoutline_p.h | 8 - .../pango/pangomm/private/layoutrun_p.h | 8 - .../pango/pangomm/private/rectangle_p.h | 8 - .../gtkmm2/pango/pangomm/private/renderer_p.h | 51 - .../gtkmm2/pango/pangomm/private/tabarray_p.h | 8 - libs/gtkmm2/pango/pangomm/rectangle.cc | 84 - libs/gtkmm2/pango/pangomm/rectangle.h | 165 - libs/gtkmm2/pango/pangomm/renderer.cc | 234 - libs/gtkmm2/pango/pangomm/renderer.h | 338 - libs/gtkmm2/pango/pangomm/tabarray.cc | 184 - libs/gtkmm2/pango/pangomm/tabarray.h | 199 - libs/gtkmm2/pango/pangomm/types.h | 34 - libs/gtkmm2/pango/pangomm/wrap_init.cc | 101 - libs/gtkmm2/pango/pangomm/wrap_init.h | 32 - libs/gtkmm2/pango/src/Makefile.am | 16 - libs/gtkmm2/pango/src/Makefile.in | 464 - .../pango/src/Makefile_list_of_hg.am_fragment | 15 - libs/gtkmm2/pango/src/attributes.ccg | 351 - libs/gtkmm2/pango/src/attributes.hg | 508 - libs/gtkmm2/pango/src/attriter.ccg | 151 - libs/gtkmm2/pango/src/attriter.hg | 114 - libs/gtkmm2/pango/src/attrlist.ccg | 75 - libs/gtkmm2/pango/src/attrlist.hg | 89 - libs/gtkmm2/pango/src/cairofontmap.ccg | 30 - libs/gtkmm2/pango/src/cairofontmap.hg | 56 - libs/gtkmm2/pango/src/color.ccg | 33 - libs/gtkmm2/pango/src/color.hg | 72 - libs/gtkmm2/pango/src/context.ccg | 83 - libs/gtkmm2/pango/src/context.hg | 173 - libs/gtkmm2/pango/src/coverage.ccg | 35 - libs/gtkmm2/pango/src/coverage.hg | 60 - libs/gtkmm2/pango/src/font.ccg | 50 - libs/gtkmm2/pango/src/font.hg | 89 - libs/gtkmm2/pango/src/fontdescription.ccg | 35 - libs/gtkmm2/pango/src/fontdescription.hg | 100 - libs/gtkmm2/pango/src/fontface.ccg | 38 - libs/gtkmm2/pango/src/fontface.hg | 60 - libs/gtkmm2/pango/src/fontfamily.ccg | 38 - libs/gtkmm2/pango/src/fontfamily.hg | 68 - libs/gtkmm2/pango/src/fontmap.ccg | 41 - libs/gtkmm2/pango/src/fontmap.hg | 59 - libs/gtkmm2/pango/src/fontmetrics.ccg | 22 - libs/gtkmm2/pango/src/fontmetrics.hg | 48 - libs/gtkmm2/pango/src/fontset.ccg | 53 - libs/gtkmm2/pango/src/fontset.hg | 60 - libs/gtkmm2/pango/src/glyph.ccg | 87 - libs/gtkmm2/pango/src/glyph.hg | 195 - libs/gtkmm2/pango/src/glyphstring.ccg | 90 - libs/gtkmm2/pango/src/glyphstring.hg | 131 - libs/gtkmm2/pango/src/item.ccg | 124 - libs/gtkmm2/pango/src/item.hg | 182 - libs/gtkmm2/pango/src/language.ccg | 65 - libs/gtkmm2/pango/src/language.hg | 56 - libs/gtkmm2/pango/src/layout.ccg | 132 - libs/gtkmm2/pango/src/layout.hg | 248 - libs/gtkmm2/pango/src/layoutiter.ccg | 112 - libs/gtkmm2/pango/src/layoutiter.hg | 135 - libs/gtkmm2/pango/src/layoutline.ccg | 81 - libs/gtkmm2/pango/src/layoutline.hg | 151 - libs/gtkmm2/pango/src/layoutrun.ccg | 49 - libs/gtkmm2/pango/src/layoutrun.hg | 74 - libs/gtkmm2/pango/src/pango.defs | 5 - libs/gtkmm2/pango/src/pango_docs.xml | 11737 --- libs/gtkmm2/pango/src/pango_docs_override.xml | 372 - libs/gtkmm2/pango/src/pango_enums.defs | 322 - libs/gtkmm2/pango/src/pango_methods.defs | 5248 -- libs/gtkmm2/pango/src/pango_vfuncs.defs | 17 - libs/gtkmm2/pango/src/rectangle.ccg | 65 - libs/gtkmm2/pango/src/rectangle.hg | 145 - libs/gtkmm2/pango/src/renderer.ccg | 41 - libs/gtkmm2/pango/src/renderer.hg | 75 - libs/gtkmm2/pango/src/tabarray.ccg | 76 - libs/gtkmm2/pango/src/tabarray.hg | 67 - libs/gtkmm2/scripts/Makefile.am | 4 - libs/gtkmm2/scripts/Makefile.in | 359 - libs/gtkmm2/scripts/README | 2 - libs/gtkmm2/scripts/config.guess | 1471 - libs/gtkmm2/scripts/config.sub | 1599 - libs/gtkmm2/scripts/depcomp | 584 - libs/gtkmm2/scripts/docgen.m4 | 18 - libs/gtkmm2/scripts/install-sh | 507 - libs/gtkmm2/scripts/ltmain.sh | 6863 -- libs/gtkmm2/scripts/macros.m4 | 113 - libs/gtkmm2/scripts/missing | 367 - libs/gtkmm2/scripts/reduced.m4 | 42 - libs/gtkmm2/tests/Makefile.am | 8 - libs/gtkmm2/tests/Makefile.am_fragment | 22 - libs/gtkmm2/tests/Makefile.in | 522 - libs/gtkmm2/tests/child_widget/Makefile.am | 6 - libs/gtkmm2/tests/child_widget/Makefile.in | 523 - libs/gtkmm2/tests/child_widget/main.cc | 30 - libs/gtkmm2/tests/child_widget/testwindow.cc | 35 - libs/gtkmm2/tests/child_widget/testwindow.h | 39 - libs/gtkmm2/tests/child_widget2/Makefile.am | 6 - libs/gtkmm2/tests/child_widget2/Makefile.in | 481 - libs/gtkmm2/tests/child_widget2/main.cc | 29 - .../tests/child_widget_managed/Makefile.am | 6 - .../tests/child_widget_managed/Makefile.in | 513 - .../gtkmm2/tests/child_widget_managed/main.cc | 52 - .../gtkmm2/tests/delete_cpp_child/Makefile.am | 6 - .../gtkmm2/tests/delete_cpp_child/Makefile.in | 481 - libs/gtkmm2/tests/delete_cpp_child/main.cc | 57 - libs/gtkmm2/tests/dialog/Makefile.am | 6 - libs/gtkmm2/tests/dialog/Makefile.in | 481 - libs/gtkmm2/tests/dialog/main.cc | 57 - .../tests/dialog_deletethis/Makefile.am | 6 - .../tests/dialog_deletethis/Makefile.in | 481 - libs/gtkmm2/tests/dialog_deletethis/main.cc | 53 - .../tests/main_with_options/Makefile.am | 6 - .../tests/main_with_options/Makefile.in | 513 - libs/gtkmm2/tests/main_with_options/main.cc | 141 - .../gtkmm2/tests/menu_destruction/Makefile.am | 6 - .../gtkmm2/tests/menu_destruction/Makefile.in | 481 - libs/gtkmm2/tests/menu_destruction/main.cc | 84 - .../tests/property_notification/Makefile.am | 6 - .../tests/property_notification/Makefile.in | 481 - .../tests/property_notification/main.cc | 43 - libs/gtkmm2/tests/refcount_dialog/Makefile.am | 6 - libs/gtkmm2/tests/refcount_dialog/Makefile.in | 481 - libs/gtkmm2/tests/refcount_dialog/main.cc | 60 - libs/gtkmm2/tests/scrolledwindow/Makefile.am | 6 - libs/gtkmm2/tests/scrolledwindow/Makefile.in | 481 - libs/gtkmm2/tests/scrolledwindow/main.cc | 65 - libs/gtkmm2/tests/wrap_existing/Makefile.am | 6 - libs/gtkmm2/tests/wrap_existing/Makefile.in | 481 - libs/gtkmm2/tests/wrap_existing/main.cc | 38 - libs/gtkmm2/tools/Makefile | 0 libs/gtkmm2/tools/Makefile.am | 9 - libs/gtkmm2/tools/Makefile.in | 522 - .../Makefile_list_of_sources.am_fragment | 2 - libs/gtkmm2/tools/README | 4 - libs/gtkmm2/tools/TODO | 12 - libs/gtkmm2/tools/extra_defs_gen/Makefile.am | 8 - libs/gtkmm2/tools/extra_defs_gen/Makefile.in | 469 - .../tools/extra_defs_gen/generate_defs_gtk.cc | 225 - libs/gtkmm2/tools/m4/Makefile.am | 10 - libs/gtkmm2/tools/m4/Makefile.in | 442 - .../m4/Makefile_list_of_sources.am_fragment | 3 - libs/gtkmm2/tools/m4/convert.m4 | 6 - libs/gtkmm2/tools/m4/convert_atk.m4 | 44 - libs/gtkmm2/tools/m4/convert_gdk.m4 | 246 - libs/gtkmm2/tools/m4/convert_gtk.m4 | 622 - libs/gtkmm2/tools/m4/convert_gtkmm.m4 | 8 - libs/gtkmm2/tools/m4/convert_pango.m4 | 162 - libs/gtkmm2ext/.cvsignore | 7 - libs/gtkmm2ext/AUTHORS | 2 - libs/gtkmm2ext/COPYING | 340 - libs/gtkmm2ext/ChangeLog | 0 libs/gtkmm2ext/NEWS | 0 libs/gtkmm2ext/README | 0 libs/gtkmm2ext/SConscript | 97 - libs/gtkmm2ext/auto_spin.cc | 268 - libs/gtkmm2ext/barcontroller.cc | 469 - libs/gtkmm2ext/bindable_button.cc | 139 - libs/gtkmm2ext/binding_proxy.cc | 101 - libs/gtkmm2ext/choice.cc | 70 - libs/gtkmm2ext/click_box.cc | 153 - libs/gtkmm2ext/dndtreeview.cc | 71 - libs/gtkmm2ext/fastmeter.cc | 567 - libs/gtkmm2ext/focus_entry.cc | 50 - libs/gtkmm2ext/gettext.h | 82 - libs/gtkmm2ext/grouped_buttons.cc | 96 - libs/gtkmm2ext/gtk_ui.cc | 656 - libs/gtkmm2ext/gtkmm2ext/.cvsignore | 1 - libs/gtkmm2ext/gtkmm2ext/auto_spin.h | 71 - libs/gtkmm2ext/gtkmm2ext/barcontroller.h | 104 - libs/gtkmm2ext/gtkmm2ext/bindable_button.h | 81 - libs/gtkmm2ext/gtkmm2ext/binding_proxy.h | 55 - libs/gtkmm2ext/gtkmm2ext/choice.h | 44 - libs/gtkmm2ext/gtkmm2ext/click_box.h | 65 - libs/gtkmm2ext/gtkmm2ext/dndtreeview.h | 165 - libs/gtkmm2ext/gtkmm2ext/doi.h | 36 - libs/gtkmm2ext/gtkmm2ext/fastmeter.h | 92 - libs/gtkmm2ext/gtkmm2ext/focus_entry.h | 41 - libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h | 48 - libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 177 - libs/gtkmm2ext/gtkmm2ext/gtkutils.h | 33 - libs/gtkmm2ext/gtkmm2ext/hexentry.h | 58 - libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h | 45 - libs/gtkmm2ext/gtkmm2ext/pathlist.h | 63 - libs/gtkmm2ext/gtkmm2ext/pixfader.h | 78 - libs/gtkmm2ext/gtkmm2ext/pixscroller.h | 64 - libs/gtkmm2ext/gtkmm2ext/popup.h | 59 - libs/gtkmm2ext/gtkmm2ext/prompter.h | 72 - libs/gtkmm2ext/gtkmm2ext/scroomer.h | 88 - libs/gtkmm2ext/gtkmm2ext/selector.h | 110 - libs/gtkmm2ext/gtkmm2ext/slider_controller.h | 83 - libs/gtkmm2ext/gtkmm2ext/stateful_button.h | 83 - libs/gtkmm2ext/gtkmm2ext/stop_signal.h | 33 - libs/gtkmm2ext/gtkmm2ext/sync-menu.h | 44 - libs/gtkmm2ext/gtkmm2ext/tearoff.h | 70 - libs/gtkmm2ext/gtkmm2ext/textviewer.h | 57 - libs/gtkmm2ext/gtkmm2ext/utils.h | 58 - libs/gtkmm2ext/gtkmm2ext/window_title.h | 63 - libs/gtkmm2ext/gtkutils.cc | 22 - libs/gtkmm2ext/hexentry.cc | 111 - libs/gtkmm2ext/i18n.h | 11 - libs/gtkmm2ext/idle_adjustment.cc | 73 - libs/gtkmm2ext/libgtkmm2ext.pc.in | 11 - libs/gtkmm2ext/libgtkmm2ext.spec.in | 68 - libs/gtkmm2ext/pathlist.cc | 124 - libs/gtkmm2ext/pixfader.cc | 309 - libs/gtkmm2ext/pixscroller.cc | 265 - libs/gtkmm2ext/po/el_GR.po | 59 - libs/gtkmm2ext/po/es_ES.po | 58 - libs/gtkmm2ext/po/pl_PL.po | 53 - libs/gtkmm2ext/po/pt_BR.po | 59 - libs/gtkmm2ext/po/ru_RU.po | 58 - libs/gtkmm2ext/popup.cc | 139 - libs/gtkmm2ext/prompter.cc | 109 - libs/gtkmm2ext/scroomer.cc | 389 - libs/gtkmm2ext/selector.cc | 234 - libs/gtkmm2ext/slider_controller.cc | 91 - libs/gtkmm2ext/stateful_button.cc | 102 - libs/gtkmm2ext/sync-menu.c | 977 - libs/gtkmm2ext/tearoff.cc | 197 - libs/gtkmm2ext/textviewer.cc | 127 - libs/gtkmm2ext/utils.cc | 93 - libs/gtkmm2ext/window_title.cc | 45 - libs/libgnomecanvasmm/.DS_Store | Bin 6148 -> 0 bytes libs/libgnomecanvasmm/.cvsignore | 1 - libs/libgnomecanvasmm/AUTHORS | 40 - libs/libgnomecanvasmm/COPYING | 515 - libs/libgnomecanvasmm/ChangeLog | 556 - libs/libgnomecanvasmm/NEWS | 54 - libs/libgnomecanvasmm/README | 1 - libs/libgnomecanvasmm/SConscript | 34 - libs/libgnomecanvasmm/TODO | 8 - libs/libgnomecanvasmm/libgnomecanvasmm.h | 45 - .../libgnomecanvasmm/.DS_Store | Bin 15364 -> 0 bytes .../libgnomecanvasmm/.cvsignore | 1 - .../libgnomecanvasmm/affinetrans.cc | 234 - .../libgnomecanvasmm/affinetrans.h | 119 - .../libgnomecanvasmm/bpath.cc | 156 - .../libgnomecanvasmm/libgnomecanvasmm/bpath.h | 148 - .../libgnomecanvasmm/canvas.cc | 533 - .../libgnomecanvasmm/canvas.h | 443 - .../libgnomecanvasmm/ellipse.cc | 147 - .../libgnomecanvasmm/ellipse.h | 130 - .../libgnomecanvasmm/group.cc | 170 - .../libgnomecanvasmm/libgnomecanvasmm/group.h | 164 - .../libgnomecanvasmm/libgnomecanvasmm/init.cc | 37 - libs/libgnomecanvasmm/libgnomecanvasmm/init.h | 37 - .../libgnomecanvasmm/libgnomecanvasmm/item.cc | 908 - libs/libgnomecanvasmm/libgnomecanvasmm/item.h | 370 - .../libgnomecanvasmm/libgnomecanvasmm/line.cc | 390 - libs/libgnomecanvasmm/libgnomecanvasmm/line.h | 461 - .../libgnomecanvasmm/path-def.cc | 249 - .../libgnomecanvasmm/path-def.h | 284 - .../libgnomecanvasmm/pixbuf.cc | 277 - .../libgnomecanvasmm/pixbuf.h | 321 - .../libgnomecanvasmm/point.cc | 117 - .../libgnomecanvasmm/libgnomecanvasmm/point.h | 74 - .../libgnomecanvasmm/polygon.cc | 156 - .../libgnomecanvasmm/polygon.h | 144 - .../libgnomecanvasmm/private/bpath_p.h | 49 - .../libgnomecanvasmm/private/canvas_p.h | 52 - .../libgnomecanvasmm/private/ellipse_p.h | 49 - .../libgnomecanvasmm/private/group_p.h | 49 - .../libgnomecanvasmm/private/item_p.h | 60 - .../libgnomecanvasmm/private/line_p.h | 49 - .../libgnomecanvasmm/private/path-def_p.h | 6 - .../libgnomecanvasmm/private/pixbuf_p.h | 49 - .../libgnomecanvasmm/private/polygon_p.h | 49 - .../libgnomecanvasmm/private/rect-ellipse_p.h | 49 - .../libgnomecanvasmm/private/rect_p.h | 49 - .../libgnomecanvasmm/private/rich-text_p.h | 50 - .../libgnomecanvasmm/private/shape_p.h | 49 - .../libgnomecanvasmm/private/text_p.h | 49 - .../libgnomecanvasmm/private/widget_p.h | 49 - .../libgnomecanvasmm/properties.cc | 238 - .../libgnomecanvasmm/properties.h | 248 - .../libgnomecanvasmm/rect-ellipse.cc | 180 - .../libgnomecanvasmm/rect-ellipse.h | 196 - .../libgnomecanvasmm/libgnomecanvasmm/rect.cc | 146 - libs/libgnomecanvasmm/libgnomecanvasmm/rect.h | 132 - .../libgnomecanvasmm/rich-text.cc | 475 - .../libgnomecanvasmm/rich-text.h | 472 - .../libgnomecanvasmm/shape.cc | 272 - .../libgnomecanvasmm/libgnomecanvasmm/shape.h | 368 - .../libgnomecanvasmm/libgnomecanvasmm/text.cc | 575 - libs/libgnomecanvasmm/libgnomecanvasmm/text.h | 788 - .../libgnomecanvasmm/widget.cc | 220 - .../libgnomecanvasmm/widget.h | 244 - .../libgnomecanvasmm/wrap_init.cc | 116 - .../libgnomecanvasmm/wrap_init.h | 36 - .../libgnomecanvasmm/libgnomecanvasmmconfig.h | 11 - libs/libsndfile/AUTHORS | 14 - libs/libsndfile/ChangeLog | 6107 -- libs/libsndfile/Mingw-make-dist.sh | 113 - libs/libsndfile/NEWS | 126 - libs/libsndfile/README | 71 - libs/libsndfile/SConscript | 56 - libs/libsndfile/acinclude.m4 | 579 - libs/libsndfile/aclocal.m4 | 72 - libs/libsndfile/compile | 107 - libs/libsndfile/config.guess | 1497 - libs/libsndfile/config.sub | 1608 - libs/libsndfile/configure | 13933 ---- libs/libsndfile/configure.ac | 541 - libs/libsndfile/depcomp | 479 - libs/libsndfile/install-sh | 294 - libs/libsndfile/libsndfile.spec.in | 69 - libs/libsndfile/missing | 336 - libs/libsndfile/mkinstalldirs | 111 - libs/libsndfile/sndfile.pc.in | 11 - libs/libsndfile/src/G72x/ChangeLog | 50 - libs/libsndfile/src/G72x/README | 0 libs/libsndfile/src/G72x/README.original | 94 - libs/libsndfile/src/G72x/g721.c | 162 - libs/libsndfile/src/G72x/g723_16.c | 169 - libs/libsndfile/src/G72x/g723_24.c | 146 - libs/libsndfile/src/G72x/g723_40.c | 160 - libs/libsndfile/src/G72x/g72x.c | 652 - libs/libsndfile/src/G72x/g72x.h | 99 - libs/libsndfile/src/G72x/g72x_priv.h | 118 - libs/libsndfile/src/G72x/g72x_test.c | 222 - libs/libsndfile/src/GSM610/COPYRIGHT | 16 - libs/libsndfile/src/GSM610/ChangeLog | 56 - libs/libsndfile/src/GSM610/README | 36 - libs/libsndfile/src/GSM610/add.c | 248 - libs/libsndfile/src/GSM610/code.c | 97 - libs/libsndfile/src/GSM610/config.h | 33 - libs/libsndfile/src/GSM610/decode.c | 67 - libs/libsndfile/src/GSM610/gsm.h | 58 - libs/libsndfile/src/GSM610/gsm610_priv.h | 308 - libs/libsndfile/src/GSM610/gsm_create.c | 44 - libs/libsndfile/src/GSM610/gsm_decode.c | 366 - libs/libsndfile/src/GSM610/gsm_destroy.c | 31 - libs/libsndfile/src/GSM610/gsm_encode.c | 456 - libs/libsndfile/src/GSM610/gsm_option.c | 74 - libs/libsndfile/src/GSM610/long_term.c | 951 - libs/libsndfile/src/GSM610/lpc.c | 341 - libs/libsndfile/src/GSM610/preprocess.c | 115 - libs/libsndfile/src/GSM610/rpe.c | 490 - libs/libsndfile/src/GSM610/short_term.c | 427 - libs/libsndfile/src/GSM610/table.c | 69 - libs/libsndfile/src/Symbols.darwin | 36 - libs/libsndfile/src/Symbols.linux | 42 - libs/libsndfile/src/aiff.c | 1482 - libs/libsndfile/src/alaw.c | 544 - libs/libsndfile/src/au.c | 453 - libs/libsndfile/src/avr.c | 254 - libs/libsndfile/src/broadcast.c | 89 - libs/libsndfile/src/caf.c | 538 - libs/libsndfile/src/command.c | 367 - libs/libsndfile/src/common.c | 1290 - libs/libsndfile/src/common.h | 766 - libs/libsndfile/src/config.h.in | 247 - libs/libsndfile/src/cygsndfile.def | 39 - libs/libsndfile/src/dither.c | 535 - libs/libsndfile/src/double64.c | 1009 - libs/libsndfile/src/dwd.c | 210 - libs/libsndfile/src/dwvw.c | 671 - libs/libsndfile/src/file_io.c | 1537 - libs/libsndfile/src/flac.c | 1156 - libs/libsndfile/src/float32.c | 961 - libs/libsndfile/src/float_cast.h | 262 - libs/libsndfile/src/g72x.c | 615 - libs/libsndfile/src/gsm610.c | 628 - libs/libsndfile/src/htk.c | 225 - libs/libsndfile/src/ima_adpcm.c | 976 - libs/libsndfile/src/interleave.c | 306 - libs/libsndfile/src/ircam.c | 331 - libs/libsndfile/src/libsndfile.def | 39 - libs/libsndfile/src/macbinary3.c | 58 - libs/libsndfile/src/macos.c | 63 - libs/libsndfile/src/mat4.c | 394 - libs/libsndfile/src/mat5.c | 507 - libs/libsndfile/src/ms_adpcm.c | 834 - libs/libsndfile/src/nist.c | 367 - libs/libsndfile/src/ogg.c | 44 - libs/libsndfile/src/paf.c | 843 - libs/libsndfile/src/pcm.c | 2899 - libs/libsndfile/src/pvf.c | 199 - libs/libsndfile/src/raw.c | 111 - libs/libsndfile/src/rx2.c | 326 - libs/libsndfile/src/sd2.c | 613 - libs/libsndfile/src/sds.c | 993 - libs/libsndfile/src/sf_unistd.h | 67 - libs/libsndfile/src/sfconfig.h | 108 - libs/libsndfile/src/sfendian.h | 256 - libs/libsndfile/src/sndfile.c | 2709 - libs/libsndfile/src/sndfile.h.in | 554 - libs/libsndfile/src/stamp-h1 | 1 - libs/libsndfile/src/strings.c | 204 - libs/libsndfile/src/svx.c | 410 - libs/libsndfile/src/txw.c | 379 - libs/libsndfile/src/ulaw.c | 1047 - libs/libsndfile/src/voc.c | 878 - libs/libsndfile/src/vox_adpcm.c | 537 - libs/libsndfile/src/w64.c | 578 - libs/libsndfile/src/wav.c | 1632 - libs/libsndfile/src/wav_w64.c | 494 - libs/libsndfile/src/wav_w64.h | 283 - libs/libsndfile/src/wve.c | 125 - libs/libsndfile/src/xi.c | 1204 - libs/midi++2/.cvsignore | 5 - libs/midi++2/AUTHORS | 0 libs/midi++2/COPYING | 340 - libs/midi++2/ChangeLog | 9 - libs/midi++2/NEWS | 0 libs/midi++2/README | 0 libs/midi++2/SConscript | 74 - libs/midi++2/alsa_sequencer_midiport.cc | 425 - libs/midi++2/coremidi_midiport.cc | 150 - libs/midi++2/event.cc | 97 - libs/midi++2/fd_midiport.cc | 181 - libs/midi++2/fifomidi.cc | 44 - libs/midi++2/jack_midiport.cc | 253 - libs/midi++2/libmidi++.pc.in | 11 - libs/midi++2/libmidi++.spec.in | 71 - .../macosx/English.lproj/InfoPlist.strings | Bin 142 -> 0 bytes libs/midi++2/macosx/Info.plist | 26 - .../macosx/midi++.xcodeproj/project.pbxproj | 498 - libs/midi++2/macosx/midi++_Prefix.pch | 3 - libs/midi++2/macosx/version.cc | 3 - libs/midi++2/macosx/version.h | 7 - libs/midi++2/midi++/.DS_Store | Bin 6148 -> 0 bytes libs/midi++2/midi++/.cvsignore | 1 - libs/midi++2/midi++/alsa_rawmidi.h | 52 - libs/midi++2/midi++/alsa_sequencer.h | 76 - libs/midi++2/midi++/channel.h | 163 - libs/midi++2/midi++/coremidi_midiport.h | 79 - libs/midi++2/midi++/event.h | 220 - libs/midi++2/midi++/events.h | 135 - libs/midi++2/midi++/factory.h | 43 - libs/midi++2/midi++/fd_midiport.h | 93 - libs/midi++2/midi++/fifomidi.h | 52 - libs/midi++2/midi++/jack.h | 91 - libs/midi++2/midi++/manager.h | 103 - libs/midi++2/midi++/midnam_patch.h | 96 - libs/midi++2/midi++/mmc.h | 265 - libs/midi++2/midi++/names.h | 228 - libs/midi++2/midi++/nullmidi.h | 68 - libs/midi++2/midi++/parser.h | 188 - libs/midi++2/midi++/port.h | 194 - libs/midi++2/midi++/types.h | 92 - libs/midi++2/midi.cc | 171 - libs/midi++2/midichannel.cc | 307 - libs/midi++2/midifactory.cc | 207 - libs/midi++2/midimanager.cc | 284 - libs/midi++2/midiparser.cc | 788 - libs/midi++2/midiport.cc | 237 - libs/midi++2/miditrace.cc | 63 - libs/midi++2/midnam_patch.cc | 137 - libs/midi++2/mmc.cc | 626 - libs/midi++2/mmctest.cc | 112 - libs/midi++2/mtc.cc | 333 - libs/pbd/.cvsignore | 5 - libs/pbd/AUTHORS | 0 libs/pbd/COPYING | 340 - libs/pbd/ChangeLog | 10 - libs/pbd/NEWS | 0 libs/pbd/README | 0 libs/pbd/SConscript | 80 - libs/pbd/base_ui.cc | 108 - libs/pbd/basename.cc | 32 - libs/pbd/boost-debug/shared_ptr.hpp | 491 - libs/pbd/command.cc | 29 - libs/pbd/controllable.cc | 118 - libs/pbd/convert.cc | 301 - libs/pbd/dmalloc.cc | 102 - libs/pbd/enumwriter.cc | 273 - libs/pbd/error.cc | 26 - libs/pbd/file_utils.cc | 126 - libs/pbd/filesystem.cc | 201 - libs/pbd/filesystem_paths.cc | 61 - libs/pbd/fpu.cc | 97 - libs/pbd/gettext.h | 82 - libs/pbd/i18n.h | 11 - libs/pbd/id.cc | 89 - libs/pbd/libpbd.pc.in | 11 - libs/pbd/libpbd.spec.in | 70 - .../macosx/English.lproj/InfoPlist.strings | Bin 136 -> 0 bytes libs/pbd/macosx/Info.plist | 26 - libs/pbd/macosx/pbd.xcodeproj/project.pbxproj | 634 - libs/pbd/macosx/pbd_Prefix.pch | 4 - libs/pbd/macosx/version.cc | 3 - libs/pbd/macosx/version.h | 7 - libs/pbd/mountpoint.cc | 159 - libs/pbd/pathscanner.cc | 204 - libs/pbd/pbd/.DS_Store | Bin 6148 -> 0 bytes libs/pbd/pbd/.cvsignore | 1 - libs/pbd/pbd/abstract_ui.cc | 149 - libs/pbd/pbd/abstract_ui.h | 78 - libs/pbd/pbd/base_ui.h | 65 - libs/pbd/pbd/basename.h | 32 - libs/pbd/pbd/command.h | 49 - libs/pbd/pbd/compose.h | 393 - libs/pbd/pbd/controllable.h | 92 - libs/pbd/pbd/convert.h | 54 - libs/pbd/pbd/crossthread.h | 57 - libs/pbd/pbd/destructible.h | 47 - libs/pbd/pbd/enumwriter.h | 77 - libs/pbd/pbd/error.h | 31 - libs/pbd/pbd/failed_constructor.h | 30 - libs/pbd/pbd/fastlog.h | 40 - libs/pbd/pbd/file_utils.h | 99 - libs/pbd/pbd/filesystem.h | 202 - libs/pbd/pbd/filesystem_paths.h | 36 - libs/pbd/pbd/forkexec.h | 28 - libs/pbd/pbd/fpu.h | 31 - libs/pbd/pbd/functor_command.h | 121 - libs/pbd/pbd/id.h | 67 - libs/pbd/pbd/mathfix.h | 33 - libs/pbd/pbd/memento_command.h | 101 - libs/pbd/pbd/mountpoint.h | 27 - libs/pbd/pbd/pathscanner.h | 85 - libs/pbd/pbd/pool.h | 74 - libs/pbd/pbd/pthread_utils.h | 42 - libs/pbd/pbd/rcu.h | 165 - libs/pbd/pbd/receiver.h | 49 - libs/pbd/pbd/replace_all.h | 27 - libs/pbd/pbd/ringbuffer.h | 281 - libs/pbd/pbd/ringbufferNPT.h | 274 - libs/pbd/pbd/search_path.h | 183 - libs/pbd/pbd/selectable.h | 101 - libs/pbd/pbd/shiva.h | 138 - libs/pbd/pbd/shortpath.h | 27 - libs/pbd/pbd/stacktrace.h | 114 - libs/pbd/pbd/stateful.h | 63 - libs/pbd/pbd/statefuldestructible.h | 44 - libs/pbd/pbd/stl_delete.h | 88 - libs/pbd/pbd/stl_functors.h | 92 - libs/pbd/pbd/strsplit.h | 30 - libs/pbd/pbd/textreceiver.h | 43 - libs/pbd/pbd/thrown_error.h | 38 - libs/pbd/pbd/tokenizer.h | 90 - libs/pbd/pbd/touchable.h | 88 - libs/pbd/pbd/transmitter.h | 109 - libs/pbd/pbd/undo.h | 108 - libs/pbd/pbd/unknown_type.h | 11 - libs/pbd/pbd/whitespace.h | 33 - libs/pbd/pbd/xml++.h | 158 - libs/pbd/pool.cc | 145 - libs/pbd/pthread_utils.cc | 147 - libs/pbd/receiver.cc | 58 - libs/pbd/search_path.cc | 152 - libs/pbd/shortpath.cc | 75 - libs/pbd/stacktrace.cc | 72 - libs/pbd/stateful.cc | 148 - libs/pbd/strreplace.cc | 38 - libs/pbd/strsplit.cc | 99 - libs/pbd/tests/Makefile | 6 - libs/pbd/tests/ProtoolsPatchFile.midnam | 11756 --- libs/pbd/tests/RosegardenPatchFile.xml | 519 - libs/pbd/tests/TestSession.ardour | 3392 - libs/pbd/tests/xpath.cc | 98 - libs/pbd/textreceiver.cc | 66 - libs/pbd/transmitter.cc | 115 - libs/pbd/undo.cc | 293 - libs/pbd/whitespace.cc | 80 - libs/pbd/xml++.cc | 590 - libs/soundtouch/.cvsignore | 2 - libs/soundtouch/3dnow_win.cpp | 350 - libs/soundtouch/AAFilter.cpp | 184 - libs/soundtouch/AAFilter.h | 91 - libs/soundtouch/BPMDetect.h | 159 - libs/soundtouch/COPYING | 340 - libs/soundtouch/FIFOSampleBuffer.cpp | 252 - libs/soundtouch/FIFOSampleBuffer.h | 174 - libs/soundtouch/FIFOSamplePipe.h | 218 - libs/soundtouch/FIRFilter.cpp | 254 - libs/soundtouch/FIRFilter.h | 160 - libs/soundtouch/README | 191 - libs/soundtouch/RateTransposer.cpp | 611 - libs/soundtouch/RateTransposer.h | 158 - libs/soundtouch/SConscript | 30 - libs/soundtouch/STTypes.h | 114 - libs/soundtouch/SoundTouch.cpp | 472 - libs/soundtouch/SoundTouch.h | 252 - libs/soundtouch/TDStretch.cpp | 916 - libs/soundtouch/TDStretch.h | 253 - libs/soundtouch/cpu_detect.h | 62 - libs/soundtouch/cpu_detect_x86_gcc.cpp | 140 - libs/soundtouch/cpu_detect_x86_win.cpp | 126 - libs/soundtouch/mmx_gcc.cpp | 534 - libs/soundtouch/mmx_win.cpp | 487 - libs/soundtouch/sse_win.cpp | 367 - libs/surfaces/control_protocol/SConscript | 58 - libs/surfaces/control_protocol/basic_ui.cc | 282 - .../control_protocol/control_protocol.cc | 342 - .../control_protocol/basic_ui.h | 84 - .../control_protocol/control_protocol.h | 129 - .../control_protocol/control_protocol/smpte.h | 70 - libs/surfaces/control_protocol/smpte.cc | 428 - libs/surfaces/frontier/kernel_drivers/BUILD | 10 - .../surfaces/frontier/kernel_drivers/Makefile | 35 - libs/surfaces/frontier/kernel_drivers/README | 16 - .../frontier/kernel_drivers/doc/keycodes.html | 35 - .../frontier/kernel_drivers/tests/Makefile | 23 - .../frontier/kernel_drivers/tests/README | 104 - .../frontier/kernel_drivers/tests/tranzport.c | 375 - .../kernel_drivers/tests/tranzport_lights.c | 361 - .../kernel_drivers/tests/tranzport_tests.sh | 27 - .../frontier/kernel_drivers/tranzport.c | 1065 - libs/surfaces/frontier/tests/Makefile | 17 - libs/surfaces/frontier/tests/README | 104 - libs/surfaces/frontier/tests/tranzport.c | 347 - .../frontier/tests/tranzport_lights.c | 361 - libs/surfaces/frontier/tranzport/SConscript | 56 - libs/surfaces/frontier/tranzport/interface.cc | 51 - .../tranzport/tranzport_control_protocol.cc | 1949 - .../tranzport/tranzport_control_protocol.h | 320 - libs/surfaces/generic_midi/.cvsignore | 2 - libs/surfaces/generic_midi/SConscript | 59 - .../generic_midi_control_protocol.cc | 405 - .../generic_midi_control_protocol.h | 72 - libs/surfaces/generic_midi/interface.cc | 58 - .../surfaces/generic_midi/midicontrollable.cc | 382 - libs/surfaces/generic_midi/midicontrollable.h | 96 - libs/surfaces/mackie/SConscript | 77 - libs/surfaces/mackie/TODO | 45 - libs/surfaces/mackie/bcf_surface.cc | 1443 - libs/surfaces/mackie/bcf_surface.h | 27 - libs/surfaces/mackie/controls.cc | 109 - libs/surfaces/mackie/controls.h | 301 - libs/surfaces/mackie/interface.cc | 96 - libs/surfaces/mackie/mackie_button_handler.cc | 691 - libs/surfaces/mackie/mackie_button_handler.h | 227 - .../mackie/mackie_control_exception.h | 47 - .../mackie/mackie_control_protocol.cc | 1449 - .../surfaces/mackie/mackie_control_protocol.h | 319 - .../mackie/mackie_control_protocol_poll.cc | 191 - libs/surfaces/mackie/mackie_midi_builder.cc | 173 - libs/surfaces/mackie/mackie_midi_builder.h | 81 - libs/surfaces/mackie/mackie_port.cc | 399 - libs/surfaces/mackie/mackie_port.h | 122 - libs/surfaces/mackie/mackie_surface.cc | 1504 - libs/surfaces/mackie/mackie_surface.h | 27 - libs/surfaces/mackie/midi_byte_array.cc | 98 - libs/surfaces/mackie/midi_byte_array.h | 76 - libs/surfaces/mackie/route_signal.cc | 96 - libs/surfaces/mackie/route_signal.h | 81 - libs/surfaces/mackie/scripts/bank.rb | 32 - libs/surfaces/mackie/scripts/bcf-controls.csv | 94 - libs/surfaces/mackie/scripts/controls.rb | 208 - libs/surfaces/mackie/scripts/dump.rb | 11 - .../scripts/generate-button-handlers-cc.erb | 59 - .../scripts/generate-button-handlers-h.erb | 54 - .../mackie/scripts/generate-surface.rb | 26 - libs/surfaces/mackie/scripts/host.rb | 133 - .../mackie/scripts/mackie-controls.csv | 93 - libs/surfaces/mackie/scripts/mackie.rb | 119 - libs/surfaces/mackie/scripts/parse.rb | 61 - libs/surfaces/mackie/scripts/signals.rb | 137 - libs/surfaces/mackie/scripts/simple_host.rb | 137 - .../mackie/scripts/surface-cc-template.erb | 95 - .../mackie/scripts/surface-h-template.erb | 27 - libs/surfaces/mackie/scripts/test_controls.rb | 9 - libs/surfaces/mackie/scripts/transform.rb | 26 - libs/surfaces/mackie/scripts/write.rb | 10 - libs/surfaces/mackie/surface.cc | 142 - libs/surfaces/mackie/surface.h | 94 - libs/surfaces/mackie/surface_port.cc | 175 - libs/surfaces/mackie/surface_port.h | 100 - libs/surfaces/mackie/test.cc | 25 - libs/surfaces/mackie/types.cc | 9 - libs/surfaces/mackie/types.h | 93 - libs/surfaces/powermate/README | 21 - libs/surfaces/powermate/SConscript | 59 - libs/surfaces/powermate/interface.cc | 57 - libs/surfaces/powermate/powermate.cc | 243 - libs/surfaces/powermate/powermate.h | 34 - libs/surfaces/tranzport/.cvsignore | 2 - libs/surfaces/tranzport/README | 90 - libs/surfaces/tranzport/SConscript | 82 - libs/surfaces/tranzport/TODO | 6 - libs/surfaces/tranzport/bling.cc | 115 - libs/surfaces/tranzport/button_events.cc | 380 - libs/surfaces/tranzport/button_yn.cc | 21 - libs/surfaces/tranzport/buttons.cc | 113 - libs/surfaces/tranzport/general.cc | 333 - libs/surfaces/tranzport/init.cc | 314 - libs/surfaces/tranzport/interface.cc | 71 - libs/surfaces/tranzport/io.cc | 95 - libs/surfaces/tranzport/io_kernel.cc | 144 - libs/surfaces/tranzport/io_midi.cc | 26 - libs/surfaces/tranzport/io_usb.cc | 232 - libs/surfaces/tranzport/lcd.cc | 120 - libs/surfaces/tranzport/lights.cc | 95 - libs/surfaces/tranzport/meter.cc | 21 - libs/surfaces/tranzport/mode.cc | 107 - libs/surfaces/tranzport/mode_loop.cc | 21 - libs/surfaces/tranzport/mode_tuner.cc | 21 - libs/surfaces/tranzport/panner.cc | 34 - libs/surfaces/tranzport/screen.cc | 93 - libs/surfaces/tranzport/show.cc | 400 - libs/surfaces/tranzport/slider_gain.h | 40 - libs/surfaces/tranzport/state.cc | 148 - libs/surfaces/tranzport/tranzport_base.h | 78 - libs/surfaces/tranzport/tranzport_common.h | 44 - .../tranzport/tranzport_control_protocol.h | 386 - libs/surfaces/tranzport/view_automation.cc | 21 - libs/surfaces/tranzport/view_bigmeter.cc | 21 - libs/surfaces/tranzport/view_bling.cc | 21 - libs/surfaces/tranzport/view_bus.cc | 21 - libs/surfaces/tranzport/view_config.cc | 21 - libs/surfaces/tranzport/view_layer.cc | 21 - libs/surfaces/tranzport/view_loop.cc | 21 - libs/surfaces/tranzport/view_manymeter.cc | 21 - libs/surfaces/tranzport/view_marker.cc | 21 - libs/surfaces/tranzport/view_master.cc | 21 - libs/surfaces/tranzport/view_plugins.cc | 21 - libs/surfaces/tranzport/view_std.cc | 21 - libs/surfaces/tranzport/view_tempo.cc | 21 - libs/surfaces/tranzport/view_tuner.cc | 21 - libs/surfaces/tranzport/wheel.cc | 206 - libs/surfaces/tranzport/wheel_modes.cc | 139 - libs/vamp-plugins/AmplitudeFollower.cpp | 247 - libs/vamp-plugins/AmplitudeFollower.h | 84 - libs/vamp-plugins/PercussionOnsetDetector.cpp | 285 - libs/vamp-plugins/PercussionOnsetDetector.h | 90 - libs/vamp-plugins/SConscript | 26 - libs/vamp-plugins/SpectralCentroid.cpp | 188 - libs/vamp-plugins/SpectralCentroid.h | 78 - libs/vamp-plugins/ZeroCrossing.cpp | 194 - libs/vamp-plugins/ZeroCrossing.h | 78 - libs/vamp-plugins/plugins.cpp | 63 - libs/vamp-sdk/COPYING | 26 - libs/vamp-sdk/README | 240 - libs/vamp-sdk/SConscript | 46 - libs/vamp-sdk/vamp-sdk/Plugin.h | 405 - libs/vamp-sdk/vamp-sdk/PluginAdapter.cpp | 853 - libs/vamp-sdk/vamp-sdk/PluginAdapter.h | 117 - libs/vamp-sdk/vamp-sdk/PluginBase.h | 252 - libs/vamp-sdk/vamp-sdk/PluginHostAdapter.cpp | 419 - libs/vamp-sdk/vamp-sdk/PluginHostAdapter.h | 117 - libs/vamp-sdk/vamp-sdk/RealTime.cpp | 254 - libs/vamp-sdk/vamp-sdk/RealTime.h | 162 - .../hostext/PluginBufferingAdapter.cpp | 516 - .../vamp-sdk/hostext/PluginBufferingAdapter.h | 99 - .../vamp-sdk/hostext/PluginChannelAdapter.cpp | 228 - .../vamp-sdk/hostext/PluginChannelAdapter.h | 128 - .../hostext/PluginInputDomainAdapter.cpp | 557 - .../hostext/PluginInputDomainAdapter.h | 103 - .../vamp-sdk/hostext/PluginLoader.cpp | 637 - libs/vamp-sdk/vamp-sdk/hostext/PluginLoader.h | 238 - .../vamp-sdk/hostext/PluginWrapper.cpp | 201 - .../vamp-sdk/vamp-sdk/hostext/PluginWrapper.h | 106 - libs/vamp-sdk/vamp-sdk/libvamp-hostsdk.la.in | 9 - libs/vamp-sdk/vamp-sdk/libvamp-sdk.la.in | 9 - libs/vamp-sdk/vamp/vamp.h | 339 - libs/vamp-sdk/vamp/vamp.pc.in | 10 - 2797 files changed, 992363 deletions(-) delete mode 100644 libs/.cvsignore delete mode 100644 libs/appleutility/AUOutputBL.cpp delete mode 100644 libs/appleutility/AUOutputBL.h delete mode 100644 libs/appleutility/AUParamInfo.cpp delete mode 100644 libs/appleutility/AUParamInfo.h delete mode 100644 libs/appleutility/CAAUParameter.cpp delete mode 100644 libs/appleutility/CAAUParameter.h delete mode 100644 libs/appleutility/CAAudioChannelLayout.cpp delete mode 100644 libs/appleutility/CAAudioChannelLayout.h delete mode 100644 libs/appleutility/CAAudioChannelLayoutObject.cpp delete mode 100644 libs/appleutility/CAAudioFile.cpp delete mode 100644 libs/appleutility/CAAudioFile.h delete mode 100644 libs/appleutility/CAAudioUnit.cpp delete mode 100644 libs/appleutility/CAAudioUnit.h delete mode 100644 libs/appleutility/CABufferList.cpp delete mode 100644 libs/appleutility/CABufferList.h delete mode 100644 libs/appleutility/CACFDictionary.cpp delete mode 100644 libs/appleutility/CACFDictionary.h delete mode 100644 libs/appleutility/CACFNumber.cpp delete mode 100644 libs/appleutility/CACFNumber.h delete mode 100644 libs/appleutility/CACFString.cpp delete mode 100644 libs/appleutility/CACFString.h delete mode 100644 libs/appleutility/CAComponent.cpp delete mode 100644 libs/appleutility/CAComponent.h delete mode 100644 libs/appleutility/CAComponentDescription.cpp delete mode 100644 libs/appleutility/CAComponentDescription.h delete mode 100644 libs/appleutility/CAConditionalMacros.h delete mode 100644 libs/appleutility/CADebugMacros.cpp delete mode 100644 libs/appleutility/CADebugMacros.h delete mode 100644 libs/appleutility/CAMath.h delete mode 100644 libs/appleutility/CAReferenceCounted.h delete mode 100644 libs/appleutility/CAStreamBasicDescription.cpp delete mode 100644 libs/appleutility/CAStreamBasicDescription.h delete mode 100644 libs/appleutility/CAXException.cpp delete mode 100644 libs/appleutility/CAXException.h delete mode 100644 libs/appleutility/SConscript delete mode 100644 libs/ardour/.cvsignore delete mode 100644 libs/ardour/ChangeLog delete mode 100644 libs/ardour/SConscript delete mode 100644 libs/ardour/amp.cc delete mode 100644 libs/ardour/analyser.cc delete mode 100644 libs/ardour/ardour/.cvsignore delete mode 100644 libs/ardour/ardour/amp.h delete mode 100644 libs/ardour/ardour/analyser.h delete mode 100644 libs/ardour/ardour/ardour.h delete mode 100644 libs/ardour/ardour/audio_buffer.h delete mode 100644 libs/ardour/ardour/audio_diskstream.h delete mode 100644 libs/ardour/ardour/audio_library.h delete mode 100644 libs/ardour/ardour/audio_port.h delete mode 100644 libs/ardour/ardour/audio_track.h delete mode 100644 libs/ardour/ardour/audio_unit.h delete mode 100644 libs/ardour/ardour/audioanalyser.h delete mode 100644 libs/ardour/ardour/audioengine.h delete mode 100644 libs/ardour/ardour/audiofilesource.h delete mode 100644 libs/ardour/ardour/audioplaylist.h delete mode 100644 libs/ardour/ardour/audioregion.h delete mode 100644 libs/ardour/ardour/audiosource.h delete mode 100644 libs/ardour/ardour/auditioner.h delete mode 100644 libs/ardour/ardour/auto_bundle.h delete mode 100644 libs/ardour/ardour/automatable.h delete mode 100644 libs/ardour/ardour/automation_control.h delete mode 100644 libs/ardour/ardour/automation_event.h delete mode 100644 libs/ardour/ardour/base_audio_port.h delete mode 100644 libs/ardour/ardour/base_midi_port.h delete mode 100644 libs/ardour/ardour/buffer.h delete mode 100644 libs/ardour/ardour/buffer_set.h delete mode 100644 libs/ardour/ardour/bundle.h delete mode 100644 libs/ardour/ardour/caimportable.h delete mode 100644 libs/ardour/ardour/chan_count.h delete mode 100644 libs/ardour/ardour/click.h delete mode 100644 libs/ardour/ardour/configuration.h delete mode 100644 libs/ardour/ardour/configuration_variable.h delete mode 100644 libs/ardour/ardour/configuration_vars.h delete mode 100644 libs/ardour/ardour/control_protocol_manager.h delete mode 100644 libs/ardour/ardour/control_protocol_search_path.h delete mode 100644 libs/ardour/ardour/coreaudiosource.h delete mode 100644 libs/ardour/ardour/crossfade.h delete mode 100644 libs/ardour/ardour/crossfade_compare.h delete mode 100644 libs/ardour/ardour/curve.h delete mode 100644 libs/ardour/ardour/cycle_timer.h delete mode 100644 libs/ardour/ardour/cycles.h delete mode 100644 libs/ardour/ardour/dB.h delete mode 100644 libs/ardour/ardour/data_type.h delete mode 100644 libs/ardour/ardour/directory_names.h delete mode 100644 libs/ardour/ardour/diskstream.h delete mode 100644 libs/ardour/ardour/export.h delete mode 100644 libs/ardour/ardour/filename_extensions.h delete mode 100644 libs/ardour/ardour/filesystem_paths.h delete mode 100644 libs/ardour/ardour/filter.h delete mode 100644 libs/ardour/ardour/gain.h delete mode 100644 libs/ardour/ardour/gdither.h delete mode 100644 libs/ardour/ardour/gdither_types.h delete mode 100644 libs/ardour/ardour/gdither_types_internal.h delete mode 100644 libs/ardour/ardour/importable_source.h delete mode 100644 libs/ardour/ardour/internal_audio_port.h delete mode 100644 libs/ardour/ardour/internal_port.h delete mode 100644 libs/ardour/ardour/io.h delete mode 100644 libs/ardour/ardour/io_processor.h delete mode 100644 libs/ardour/ardour/jack_audio_port.h delete mode 100644 libs/ardour/ardour/jack_midi_port.h delete mode 100644 libs/ardour/ardour/jack_port.h delete mode 100644 libs/ardour/ardour/ladspa.h delete mode 100644 libs/ardour/ardour/ladspa_plugin.h delete mode 100644 libs/ardour/ardour/latent.h delete mode 100644 libs/ardour/ardour/location.h delete mode 100644 libs/ardour/ardour/logcurve.h delete mode 100644 libs/ardour/ardour/lv2_plugin.h delete mode 100644 libs/ardour/ardour/meter.h delete mode 100644 libs/ardour/ardour/midi_buffer.h delete mode 100644 libs/ardour/ardour/midi_diskstream.h delete mode 100644 libs/ardour/ardour/midi_model.h delete mode 100644 libs/ardour/ardour/midi_playlist.h delete mode 100644 libs/ardour/ardour/midi_port.h delete mode 100644 libs/ardour/ardour/midi_region.h delete mode 100644 libs/ardour/ardour/midi_ring_buffer.h delete mode 100644 libs/ardour/ardour/midi_source.h delete mode 100644 libs/ardour/ardour/midi_stretch.h delete mode 100644 libs/ardour/ardour/midi_track.h delete mode 100644 libs/ardour/ardour/midi_util.h delete mode 100644 libs/ardour/ardour/mix.h delete mode 100644 libs/ardour/ardour/named_selection.h delete mode 100644 libs/ardour/ardour/noise.h delete mode 100644 libs/ardour/ardour/note.h delete mode 100644 libs/ardour/ardour/osc.h delete mode 100644 libs/ardour/ardour/panner.h delete mode 100644 libs/ardour/ardour/parameter.h delete mode 100644 libs/ardour/ardour/pcm_utils.h delete mode 100644 libs/ardour/ardour/peak.h delete mode 100644 libs/ardour/ardour/pitch.h delete mode 100644 libs/ardour/ardour/playlist.h delete mode 100644 libs/ardour/ardour/playlist_factory.h delete mode 100644 libs/ardour/ardour/playlist_templates.h delete mode 100644 libs/ardour/ardour/plugin.h delete mode 100644 libs/ardour/ardour/plugin_insert.h delete mode 100644 libs/ardour/ardour/plugin_manager.h delete mode 100644 libs/ardour/ardour/port.h delete mode 100644 libs/ardour/ardour/port_insert.h delete mode 100644 libs/ardour/ardour/port_set.h delete mode 100644 libs/ardour/ardour/processor.h delete mode 100644 libs/ardour/ardour/profile.h delete mode 100644 libs/ardour/ardour/quantize.h delete mode 100644 libs/ardour/ardour/rb_effect.h delete mode 100644 libs/ardour/ardour/readable.h delete mode 100644 libs/ardour/ardour/recent_sessions.h delete mode 100644 libs/ardour/ardour/region.h delete mode 100644 libs/ardour/ardour/region_factory.h delete mode 100644 libs/ardour/ardour/resampled_source.h delete mode 100644 libs/ardour/ardour/reverse.h delete mode 100644 libs/ardour/ardour/route.h delete mode 100644 libs/ardour/ardour/route_group.h delete mode 100644 libs/ardour/ardour/route_group_specialized.h delete mode 100644 libs/ardour/ardour/runtime_functions.h delete mode 100644 libs/ardour/ardour/send.h delete mode 100644 libs/ardour/ardour/session.h delete mode 100644 libs/ardour/ardour/session_directory.h delete mode 100644 libs/ardour/ardour/session_object.h delete mode 100644 libs/ardour/ardour/session_playlist.h delete mode 100644 libs/ardour/ardour/session_region.h delete mode 100644 libs/ardour/ardour/session_route.h delete mode 100644 libs/ardour/ardour/session_selection.h delete mode 100644 libs/ardour/ardour/session_state_utils.h delete mode 100644 libs/ardour/ardour/session_utils.h delete mode 100644 libs/ardour/ardour/silentfilesource.h delete mode 100644 libs/ardour/ardour/slave.h delete mode 100644 libs/ardour/ardour/smf_reader.h delete mode 100644 libs/ardour/ardour/smf_source.h delete mode 100644 libs/ardour/ardour/smpte.h delete mode 100644 libs/ardour/ardour/sndfile_helpers.h delete mode 100644 libs/ardour/ardour/sndfileimportable.h delete mode 100644 libs/ardour/ardour/sndfilesource.h delete mode 100644 libs/ardour/ardour/soundseq.h delete mode 100644 libs/ardour/ardour/source.h delete mode 100644 libs/ardour/ardour/source_factory.h delete mode 100644 libs/ardour/ardour/spline.h delete mode 100644 libs/ardour/ardour/stretch.h delete mode 100644 libs/ardour/ardour/tape_file_matcher.h delete mode 100644 libs/ardour/ardour/template_utils.h delete mode 100644 libs/ardour/ardour/tempo.h delete mode 100644 libs/ardour/ardour/timestamps.h delete mode 100644 libs/ardour/ardour/track.h delete mode 100644 libs/ardour/ardour/transient_detector.h delete mode 100644 libs/ardour/ardour/types.h delete mode 100644 libs/ardour/ardour/user_bundle.h delete mode 100644 libs/ardour/ardour/utils.h delete mode 100644 libs/ardour/ardour/vst_plugin.h delete mode 100644 libs/ardour/audio_buffer.cc delete mode 100644 libs/ardour/audio_diskstream.cc delete mode 100644 libs/ardour/audio_library.cc delete mode 100644 libs/ardour/audio_playlist.cc delete mode 100644 libs/ardour/audio_port.cc delete mode 100644 libs/ardour/audio_track.cc delete mode 100644 libs/ardour/audio_unit.cc delete mode 100644 libs/ardour/audioanalyser.cc delete mode 100644 libs/ardour/audioengine.cc delete mode 100644 libs/ardour/audiofilesource.cc delete mode 100644 libs/ardour/audioregion.cc delete mode 100644 libs/ardour/audiosource.cc delete mode 100644 libs/ardour/auditioner.cc delete mode 100644 libs/ardour/auto_bundle.cc delete mode 100644 libs/ardour/automatable.cc delete mode 100644 libs/ardour/automation.cc delete mode 100644 libs/ardour/automation_control.cc delete mode 100644 libs/ardour/automation_event.cc delete mode 100644 libs/ardour/base_audio_port.cc delete mode 100644 libs/ardour/base_midi_port.cc delete mode 100644 libs/ardour/buffer.cc delete mode 100644 libs/ardour/buffer_set.cc delete mode 100644 libs/ardour/bundle.cc delete mode 100644 libs/ardour/caimportable.cc delete mode 100644 libs/ardour/chan_count.cc delete mode 100644 libs/ardour/configuration.cc delete mode 100644 libs/ardour/control_protocol_manager.cc delete mode 100644 libs/ardour/control_protocol_search_path.cc delete mode 100644 libs/ardour/coreaudiosource.cc delete mode 100644 libs/ardour/crossfade.cc delete mode 100644 libs/ardour/curve.cc delete mode 100644 libs/ardour/cycle_timer.cc delete mode 100644 libs/ardour/default_click.cc delete mode 100644 libs/ardour/directory_names.cc delete mode 100644 libs/ardour/diskstream.cc delete mode 100644 libs/ardour/enums.cc delete mode 100644 libs/ardour/filename_extensions.cc delete mode 100644 libs/ardour/filesystem_paths.cc delete mode 100644 libs/ardour/filter.cc delete mode 100644 libs/ardour/find_session.cc delete mode 100644 libs/ardour/gain.cc delete mode 100644 libs/ardour/gdither.cc delete mode 100644 libs/ardour/gettext.h delete mode 100644 libs/ardour/globals.cc delete mode 100644 libs/ardour/i18n.h delete mode 100644 libs/ardour/import.cc delete mode 100644 libs/ardour/internal_audio_port.cc delete mode 100644 libs/ardour/internal_port.cc delete mode 100644 libs/ardour/io.cc delete mode 100644 libs/ardour/io_processor.cc delete mode 100644 libs/ardour/jack_audio_port.cc delete mode 100644 libs/ardour/jack_midi_port.cc delete mode 100644 libs/ardour/jack_port.cc delete mode 100644 libs/ardour/jack_slave.cc delete mode 100644 libs/ardour/ladspa_plugin.cc delete mode 100644 libs/ardour/location.cc delete mode 100644 libs/ardour/lv2_plugin.cc delete mode 100644 libs/ardour/macosx/English.lproj/InfoPlist.strings delete mode 100644 libs/ardour/macosx/Info.plist delete mode 100644 libs/ardour/macosx/ardour.xcodeproj/project.pbxproj delete mode 100644 libs/ardour/macosx/ardour_Prefix.pch delete mode 100644 libs/ardour/macosx/version.cc delete mode 100644 libs/ardour/macosx/version.h delete mode 100644 libs/ardour/meter.cc delete mode 100644 libs/ardour/midi_buffer.cc delete mode 100644 libs/ardour/midi_diskstream.cc delete mode 100644 libs/ardour/midi_model.cc delete mode 100644 libs/ardour/midi_playlist.cc delete mode 100644 libs/ardour/midi_port.cc delete mode 100644 libs/ardour/midi_region.cc delete mode 100644 libs/ardour/midi_source.cc delete mode 100644 libs/ardour/midi_stretch.cc delete mode 100644 libs/ardour/midi_track.cc delete mode 100644 libs/ardour/mix.cc delete mode 100644 libs/ardour/mtc_slave.cc delete mode 100644 libs/ardour/named_selection.cc delete mode 100644 libs/ardour/note.cc delete mode 100644 libs/ardour/osc.cc delete mode 100644 libs/ardour/panner.cc delete mode 100644 libs/ardour/parameter.cc delete mode 100644 libs/ardour/pcm_utils.cc delete mode 100644 libs/ardour/playlist.cc delete mode 100644 libs/ardour/playlist_factory.cc delete mode 100644 libs/ardour/plugin.cc delete mode 100644 libs/ardour/plugin_insert.cc delete mode 100644 libs/ardour/plugin_manager.cc delete mode 100644 libs/ardour/po/el_GR.po delete mode 100644 libs/ardour/po/it_IT.po delete mode 100644 libs/ardour/po/pl_PL.po delete mode 100644 libs/ardour/po/ru_RU.po delete mode 100644 libs/ardour/po/sv_SE.po delete mode 100644 libs/ardour/port.cc delete mode 100644 libs/ardour/port_insert.cc delete mode 100644 libs/ardour/port_set.cc delete mode 100644 libs/ardour/processor.cc delete mode 100644 libs/ardour/quantize.cc delete mode 100644 libs/ardour/rb_effect.cc delete mode 100644 libs/ardour/recent_sessions.cc delete mode 100644 libs/ardour/region.cc delete mode 100644 libs/ardour/region_factory.cc delete mode 100644 libs/ardour/resampled_source.cc delete mode 100644 libs/ardour/reverse.cc delete mode 100644 libs/ardour/route.cc delete mode 100644 libs/ardour/route_group.cc delete mode 100644 libs/ardour/send.cc delete mode 100644 libs/ardour/session.cc delete mode 100644 libs/ardour/session_butler.cc delete mode 100644 libs/ardour/session_click.cc delete mode 100644 libs/ardour/session_command.cc delete mode 100644 libs/ardour/session_directory.cc delete mode 100644 libs/ardour/session_events.cc delete mode 100644 libs/ardour/session_export.cc delete mode 100644 libs/ardour/session_feedback.cc delete mode 100644 libs/ardour/session_midi.cc delete mode 100644 libs/ardour/session_process.cc delete mode 100644 libs/ardour/session_state.cc delete mode 100644 libs/ardour/session_state_utils.cc delete mode 100644 libs/ardour/session_time.cc delete mode 100644 libs/ardour/session_transport.cc delete mode 100644 libs/ardour/session_utils.cc delete mode 100644 libs/ardour/session_vst.cc delete mode 100644 libs/ardour/silentfilesource.cc delete mode 100644 libs/ardour/smf_reader.cc delete mode 100644 libs/ardour/smf_source.cc delete mode 100644 libs/ardour/sndfile_helpers.cc delete mode 100644 libs/ardour/sndfileimportable.cc delete mode 100644 libs/ardour/sndfilesource.cc delete mode 100644 libs/ardour/source.cc delete mode 100644 libs/ardour/source_factory.cc delete mode 100644 libs/ardour/sse_functions.s delete mode 100644 libs/ardour/sse_functions_64bit.s delete mode 100644 libs/ardour/sse_functions_xmm.cc delete mode 100644 libs/ardour/st_pitch.cc delete mode 100644 libs/ardour/st_stretch.cc delete mode 100644 libs/ardour/tape_file_matcher.cc delete mode 100644 libs/ardour/template_utils.cc delete mode 100644 libs/ardour/tempo.cc delete mode 100644 libs/ardour/track.cc delete mode 100644 libs/ardour/transient_detector.cc delete mode 100644 libs/ardour/user_bundle.cc delete mode 100644 libs/ardour/utils.cc delete mode 100644 libs/ardour/vst_plugin.cc delete mode 100644 libs/cairomm/AUTHORS delete mode 100644 libs/cairomm/COPYING delete mode 100644 libs/cairomm/ChangeLog delete mode 100644 libs/cairomm/INSTALL delete mode 100644 libs/cairomm/MAINTAINERS delete mode 100644 libs/cairomm/MSVC/Makefile.am delete mode 100644 libs/cairomm/MSVC/Makefile.in delete mode 100644 libs/cairomm/MSVC/README delete mode 100644 libs/cairomm/MSVC/blank.cpp delete mode 100644 libs/cairomm/MSVC/cairomm.sln delete mode 100644 libs/cairomm/MSVC/cairomm/Makefile.am delete mode 100644 libs/cairomm/MSVC/cairomm/Makefile.in delete mode 100644 libs/cairomm/MSVC/cairomm/cairomm.rc delete mode 100644 libs/cairomm/MSVC/cairomm/cairomm.rc.in delete mode 100644 libs/cairomm/MSVC/cairomm/cairomm.vcproj delete mode 100644 libs/cairomm/MSVC/examples/Makefile.am delete mode 100644 libs/cairomm/MSVC/examples/Makefile.in delete mode 100644 libs/cairomm/MSVC/examples/pdf-surface/Makefile.am delete mode 100644 libs/cairomm/MSVC/examples/pdf-surface/Makefile.in delete mode 100644 libs/cairomm/MSVC/examples/pdf-surface/pdf-surface.vcproj delete mode 100644 libs/cairomm/MSVC/examples/png_file/Makefile.am delete mode 100644 libs/cairomm/MSVC/examples/png_file/Makefile.in delete mode 100644 libs/cairomm/MSVC/examples/png_file/png_file.vcproj delete mode 100644 libs/cairomm/MSVC/examples/ps-surface/Makefile.am delete mode 100644 libs/cairomm/MSVC/examples/ps-surface/Makefile.in delete mode 100644 libs/cairomm/MSVC/examples/ps-surface/ps-surface.vcproj delete mode 100644 libs/cairomm/MSVC/examples/svg-surface/Makefile.am delete mode 100644 libs/cairomm/MSVC/examples/svg-surface/Makefile.in delete mode 100644 libs/cairomm/MSVC/examples/svg-surface/svg-surface.vcproj delete mode 100644 libs/cairomm/MSVC/examples/text-rotate/Makefile.am delete mode 100644 libs/cairomm/MSVC/examples/text-rotate/Makefile.in delete mode 100644 libs/cairomm/MSVC/examples/text-rotate/text-rotate.vcproj delete mode 100644 libs/cairomm/MSVC/gendef/Makefile.am delete mode 100644 libs/cairomm/MSVC/gendef/Makefile.in delete mode 100644 libs/cairomm/MSVC/gendef/gendef.cc delete mode 100644 libs/cairomm/MSVC/gendef/gendef.vcproj delete mode 100644 libs/cairomm/Makefile.am delete mode 100644 libs/cairomm/Makefile.in delete mode 100644 libs/cairomm/NEWS delete mode 100644 libs/cairomm/README delete mode 100644 libs/cairomm/SConscript delete mode 100644 libs/cairomm/aclocal.m4 delete mode 100644 libs/cairomm/cairomm-1.0.pc.in delete mode 100644 libs/cairomm/cairomm/Makefile.am delete mode 100644 libs/cairomm/cairomm/Makefile.in delete mode 100644 libs/cairomm/cairomm/cairomm.h delete mode 100644 libs/cairomm/cairomm/cairommconfig.h.in delete mode 100644 libs/cairomm/cairomm/context.cc delete mode 100644 libs/cairomm/cairomm/context.h delete mode 100644 libs/cairomm/cairomm/context_private.h delete mode 100644 libs/cairomm/cairomm/context_surface_quartz.cc delete mode 100644 libs/cairomm/cairomm/context_surface_win32.cc delete mode 100644 libs/cairomm/cairomm/context_surface_xlib.cc delete mode 100644 libs/cairomm/cairomm/enums.h delete mode 100644 libs/cairomm/cairomm/exception.cc delete mode 100644 libs/cairomm/cairomm/exception.h delete mode 100644 libs/cairomm/cairomm/fontface.cc delete mode 100644 libs/cairomm/cairomm/fontface.h delete mode 100644 libs/cairomm/cairomm/fontoptions.cc delete mode 100644 libs/cairomm/cairomm/fontoptions.h delete mode 100644 libs/cairomm/cairomm/path.cc delete mode 100644 libs/cairomm/cairomm/path.h delete mode 100644 libs/cairomm/cairomm/pattern.cc delete mode 100644 libs/cairomm/cairomm/pattern.h delete mode 100644 libs/cairomm/cairomm/private.cc delete mode 100644 libs/cairomm/cairomm/private.h delete mode 100644 libs/cairomm/cairomm/quartz_surface.cc delete mode 100644 libs/cairomm/cairomm/quartz_surface.h delete mode 100644 libs/cairomm/cairomm/refptr.h delete mode 100644 libs/cairomm/cairomm/scaledfont.cc delete mode 100644 libs/cairomm/cairomm/scaledfont.h delete mode 100644 libs/cairomm/cairomm/surface.cc delete mode 100644 libs/cairomm/cairomm/surface.h delete mode 100644 libs/cairomm/cairomm/win32_surface.cc delete mode 100644 libs/cairomm/cairomm/win32_surface.h delete mode 100644 libs/cairomm/cairomm/xlib_surface.cc delete mode 100644 libs/cairomm/cairomm/xlib_surface.h delete mode 100755 libs/cairomm/config.guess delete mode 100755 libs/cairomm/config.sub delete mode 100755 libs/cairomm/configure delete mode 100644 libs/cairomm/configure.in delete mode 100755 libs/cairomm/depcomp delete mode 100755 libs/cairomm/install-sh delete mode 100644 libs/cairomm/ltmain.sh delete mode 100644 libs/cairomm/m4/ax_boost_base.m4 delete mode 100644 libs/cairomm/m4/ax_boost_unit_test_framework.m4 delete mode 100644 libs/cairomm/m4/reduced.m4 delete mode 100755 libs/cairomm/missing delete mode 100644 libs/cairomm/tests/Makefile.am delete mode 100644 libs/cairomm/tests/Makefile.in delete mode 100644 libs/cairomm/tests/test-context.cc delete mode 100644 libs/clearlooks/SConscript delete mode 100644 libs/clearlooks/animation.c delete mode 100644 libs/clearlooks/animation.h delete mode 100644 libs/clearlooks/bits.c delete mode 100644 libs/clearlooks/cairo-support.c delete mode 100644 libs/clearlooks/cairo-support.h delete mode 100644 libs/clearlooks/clearlooks_draw.c delete mode 100644 libs/clearlooks/clearlooks_draw.h delete mode 100644 libs/clearlooks/clearlooks_draw_glossy.c delete mode 100644 libs/clearlooks/clearlooks_draw_gummy.c delete mode 100644 libs/clearlooks/clearlooks_draw_inverted.c delete mode 100644 libs/clearlooks/clearlooks_rc_style.c delete mode 100644 libs/clearlooks/clearlooks_rc_style.h delete mode 100644 libs/clearlooks/clearlooks_style.c delete mode 100644 libs/clearlooks/clearlooks_style.h delete mode 100644 libs/clearlooks/clearlooks_theme_main.c delete mode 100644 libs/clearlooks/clearlooks_types.h delete mode 100644 libs/clearlooks/config.h delete mode 100755 libs/clearlooks/cpdll.sh delete mode 100644 libs/clearlooks/ge-support.h delete mode 100644 libs/clearlooks/general-support.h delete mode 100644 libs/clearlooks/support.c delete mode 100644 libs/clearlooks/support.h delete mode 100644 libs/clearlooks/widget-information.c delete mode 100644 libs/clearlooks/widget-information.h delete mode 100644 libs/fst/SConscript delete mode 100644 libs/fst/fst.c delete mode 100644 libs/fst/fst.h delete mode 100644 libs/fst/fstinfofile.c delete mode 100644 libs/fst/jackvst.h delete mode 100644 libs/fst/vsti.c delete mode 100644 libs/fst/vstwin.c delete mode 100644 libs/glibmm2/AUTHORS delete mode 100644 libs/glibmm2/CHANGES delete mode 100644 libs/glibmm2/COPYING delete mode 100644 libs/glibmm2/ChangeLog delete mode 100644 libs/glibmm2/INSTALL delete mode 100644 libs/glibmm2/Makefile.am delete mode 100644 libs/glibmm2/NEWS delete mode 100644 libs/glibmm2/README delete mode 100644 libs/glibmm2/README.win32 delete mode 100644 libs/glibmm2/SConscript delete mode 100644 libs/glibmm2/aclocal.m4 delete mode 100755 libs/glibmm2/autogen.sh delete mode 100644 libs/glibmm2/build_shared/Makefile_build.am_fragment delete mode 100644 libs/glibmm2/build_shared/Makefile_build_extra.am_fragment delete mode 100644 libs/glibmm2/build_shared/Makefile_build_gensrc.am_fragment delete mode 100644 libs/glibmm2/build_shared/Makefile_gensrc.am_fragment delete mode 100644 libs/glibmm2/build_shared/Makefile_gensrc_platform.am_fragment delete mode 100644 libs/glibmm2/config.h.in delete mode 100644 libs/glibmm2/configure.in delete mode 100644 libs/glibmm2/glib/Makefile.am delete mode 100644 libs/glibmm2/glib/Makefile.in delete mode 100644 libs/glibmm2/glib/README delete mode 100644 libs/glibmm2/glib/glibmm-2.4.pc delete mode 100644 libs/glibmm2/glib/glibmm-2.4.pc.in delete mode 100644 libs/glibmm2/glib/glibmm.h delete mode 100644 libs/glibmm2/glib/glibmm/Makefile.am delete mode 100644 libs/glibmm2/glib/glibmm/Makefile.in delete mode 100644 libs/glibmm2/glib/glibmm/arrayhandle.h delete mode 100644 libs/glibmm2/glib/glibmm/class.cc delete mode 100644 libs/glibmm2/glib/glibmm/class.h delete mode 100644 libs/glibmm2/glib/glibmm/containerhandle_shared.h delete mode 100644 libs/glibmm2/glib/glibmm/containers.cc delete mode 100644 libs/glibmm2/glib/glibmm/containers.h delete mode 100644 libs/glibmm2/glib/glibmm/convert.cc delete mode 100644 libs/glibmm2/glib/glibmm/convert.h delete mode 100644 libs/glibmm2/glib/glibmm/date.cc delete mode 100644 libs/glibmm2/glib/glibmm/date.h delete mode 100644 libs/glibmm2/glib/glibmm/debug.cc delete mode 100644 libs/glibmm2/glib/glibmm/debug.h delete mode 100644 libs/glibmm2/glib/glibmm/dispatcher.cc delete mode 100644 libs/glibmm2/glib/glibmm/dispatcher.h delete mode 100644 libs/glibmm2/glib/glibmm/error.cc delete mode 100644 libs/glibmm2/glib/glibmm/error.h delete mode 100644 libs/glibmm2/glib/glibmm/exception.cc delete mode 100644 libs/glibmm2/glib/glibmm/exception.h delete mode 100644 libs/glibmm2/glib/glibmm/exceptionhandler.cc delete mode 100644 libs/glibmm2/glib/glibmm/exceptionhandler.h delete mode 100644 libs/glibmm2/glib/glibmm/fileutils.cc delete mode 100644 libs/glibmm2/glib/glibmm/fileutils.h delete mode 100644 libs/glibmm2/glib/glibmm/helperlist.h delete mode 100644 libs/glibmm2/glib/glibmm/i18n.h delete mode 100644 libs/glibmm2/glib/glibmm/init.cc delete mode 100644 libs/glibmm2/glib/glibmm/init.h delete mode 100644 libs/glibmm2/glib/glibmm/interface.cc delete mode 100644 libs/glibmm2/glib/glibmm/interface.h delete mode 100644 libs/glibmm2/glib/glibmm/iochannel.cc delete mode 100644 libs/glibmm2/glib/glibmm/iochannel.h delete mode 100644 libs/glibmm2/glib/glibmm/keyfile.cc delete mode 100644 libs/glibmm2/glib/glibmm/keyfile.h delete mode 100644 libs/glibmm2/glib/glibmm/listhandle.h delete mode 100644 libs/glibmm2/glib/glibmm/main.cc delete mode 100644 libs/glibmm2/glib/glibmm/main.h delete mode 100644 libs/glibmm2/glib/glibmm/markup.cc delete mode 100644 libs/glibmm2/glib/glibmm/markup.h delete mode 100644 libs/glibmm2/glib/glibmm/miscutils.cc delete mode 100644 libs/glibmm2/glib/glibmm/miscutils.h delete mode 100644 libs/glibmm2/glib/glibmm/module.cc delete mode 100644 libs/glibmm2/glib/glibmm/module.h delete mode 100644 libs/glibmm2/glib/glibmm/object.cc delete mode 100644 libs/glibmm2/glib/glibmm/object.h delete mode 100644 libs/glibmm2/glib/glibmm/objectbase.cc delete mode 100644 libs/glibmm2/glib/glibmm/objectbase.h delete mode 100644 libs/glibmm2/glib/glibmm/optioncontext.cc delete mode 100644 libs/glibmm2/glib/glibmm/optioncontext.h delete mode 100644 libs/glibmm2/glib/glibmm/optionentry.cc delete mode 100644 libs/glibmm2/glib/glibmm/optionentry.h delete mode 100644 libs/glibmm2/glib/glibmm/optiongroup.cc delete mode 100644 libs/glibmm2/glib/glibmm/optiongroup.h delete mode 100644 libs/glibmm2/glib/glibmm/pattern.cc delete mode 100644 libs/glibmm2/glib/glibmm/pattern.h delete mode 100644 libs/glibmm2/glib/glibmm/private/Makefile.am delete mode 100644 libs/glibmm2/glib/glibmm/private/Makefile.in delete mode 100644 libs/glibmm2/glib/glibmm/private/convert_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/date_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/fileutils_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/interface_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/iochannel_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/keyfile_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/markup_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/module_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/object_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/optioncontext_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/optionentry_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/optiongroup_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/regex_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/shell_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/spawn_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/thread_p.h delete mode 100644 libs/glibmm2/glib/glibmm/private/unicode_p.h delete mode 100644 libs/glibmm2/glib/glibmm/property.cc delete mode 100644 libs/glibmm2/glib/glibmm/property.h delete mode 100644 libs/glibmm2/glib/glibmm/propertyproxy.cc delete mode 100644 libs/glibmm2/glib/glibmm/propertyproxy.h delete mode 100644 libs/glibmm2/glib/glibmm/propertyproxy_base.cc delete mode 100644 libs/glibmm2/glib/glibmm/propertyproxy_base.h delete mode 100644 libs/glibmm2/glib/glibmm/quark.cc delete mode 100644 libs/glibmm2/glib/glibmm/quark.h delete mode 100644 libs/glibmm2/glib/glibmm/random.cc delete mode 100644 libs/glibmm2/glib/glibmm/random.h delete mode 100644 libs/glibmm2/glib/glibmm/refptr.h delete mode 100644 libs/glibmm2/glib/glibmm/regex.cc delete mode 100644 libs/glibmm2/glib/glibmm/regex.h delete mode 100644 libs/glibmm2/glib/glibmm/sarray.h delete mode 100644 libs/glibmm2/glib/glibmm/shell.cc delete mode 100644 libs/glibmm2/glib/glibmm/shell.h delete mode 100644 libs/glibmm2/glib/glibmm/signalproxy.cc delete mode 100644 libs/glibmm2/glib/glibmm/signalproxy.h delete mode 100644 libs/glibmm2/glib/glibmm/signalproxy_connectionnode.cc delete mode 100644 libs/glibmm2/glib/glibmm/signalproxy_connectionnode.h delete mode 100644 libs/glibmm2/glib/glibmm/slisthandle.h delete mode 100644 libs/glibmm2/glib/glibmm/spawn.cc delete mode 100644 libs/glibmm2/glib/glibmm/spawn.h delete mode 100644 libs/glibmm2/glib/glibmm/streamiochannel.cc delete mode 100644 libs/glibmm2/glib/glibmm/streamiochannel.h delete mode 100644 libs/glibmm2/glib/glibmm/stringutils.cc delete mode 100644 libs/glibmm2/glib/glibmm/stringutils.h delete mode 100644 libs/glibmm2/glib/glibmm/thread.cc delete mode 100644 libs/glibmm2/glib/glibmm/thread.h delete mode 100644 libs/glibmm2/glib/glibmm/threadpool.cc delete mode 100644 libs/glibmm2/glib/glibmm/threadpool.h delete mode 100644 libs/glibmm2/glib/glibmm/timer.cc delete mode 100644 libs/glibmm2/glib/glibmm/timer.h delete mode 100644 libs/glibmm2/glib/glibmm/timeval.cc delete mode 100644 libs/glibmm2/glib/glibmm/timeval.h delete mode 100644 libs/glibmm2/glib/glibmm/unicode.cc delete mode 100644 libs/glibmm2/glib/glibmm/unicode.h delete mode 100644 libs/glibmm2/glib/glibmm/ustring.cc delete mode 100644 libs/glibmm2/glib/glibmm/ustring.h delete mode 100644 libs/glibmm2/glib/glibmm/utility.cc delete mode 100644 libs/glibmm2/glib/glibmm/utility.h delete mode 100644 libs/glibmm2/glib/glibmm/value.cc delete mode 100644 libs/glibmm2/glib/glibmm/value.h delete mode 100644 libs/glibmm2/glib/glibmm/value_basictypes.cc delete mode 100644 libs/glibmm2/glib/glibmm/value_basictypes.h delete mode 100644 libs/glibmm2/glib/glibmm/value_custom.cc delete mode 100644 libs/glibmm2/glib/glibmm/value_custom.h delete mode 100644 libs/glibmm2/glib/glibmm/wrap.cc delete mode 100644 libs/glibmm2/glib/glibmm/wrap.h delete mode 100644 libs/glibmm2/glib/glibmm/wrap_init.cc delete mode 100644 libs/glibmm2/glib/glibmm/wrap_init.h delete mode 100644 libs/glibmm2/glib/glibmmconfig.h delete mode 100644 libs/glibmm2/glib/glibmmconfig.h.in delete mode 100644 libs/glibmm2/glib/src/Makefile.am delete mode 100644 libs/glibmm2/glib/src/Makefile.in delete mode 100644 libs/glibmm2/glib/src/Makefile_list_of_hg.am_fragment delete mode 100644 libs/glibmm2/glib/src/convert.ccg delete mode 100644 libs/glibmm2/glib/src/convert.hg delete mode 100644 libs/glibmm2/glib/src/date.ccg delete mode 100644 libs/glibmm2/glib/src/date.hg delete mode 100644 libs/glibmm2/glib/src/fileutils.ccg delete mode 100644 libs/glibmm2/glib/src/fileutils.hg delete mode 100644 libs/glibmm2/glib/src/glib.defs delete mode 100644 libs/glibmm2/glib/src/glib_docs.xml delete mode 100644 libs/glibmm2/glib/src/glib_docs_override.xml delete mode 100644 libs/glibmm2/glib/src/glib_enums.defs delete mode 100644 libs/glibmm2/glib/src/glib_functions.defs delete mode 100644 libs/glibmm2/glib/src/gmodule_enums.defs delete mode 100644 libs/glibmm2/glib/src/gmodule_functions.defs delete mode 100644 libs/glibmm2/glib/src/gobject.defs delete mode 100644 libs/glibmm2/glib/src/gobject_enums.defs delete mode 100644 libs/glibmm2/glib/src/gobject_functions.defs delete mode 100644 libs/glibmm2/glib/src/iochannel.ccg delete mode 100644 libs/glibmm2/glib/src/iochannel.hg delete mode 100644 libs/glibmm2/glib/src/keyfile.ccg delete mode 100644 libs/glibmm2/glib/src/keyfile.hg delete mode 100644 libs/glibmm2/glib/src/markup.ccg delete mode 100644 libs/glibmm2/glib/src/markup.hg delete mode 100644 libs/glibmm2/glib/src/module.ccg delete mode 100644 libs/glibmm2/glib/src/module.hg delete mode 100644 libs/glibmm2/glib/src/optioncontext.ccg delete mode 100644 libs/glibmm2/glib/src/optioncontext.hg delete mode 100644 libs/glibmm2/glib/src/optionentry.ccg delete mode 100644 libs/glibmm2/glib/src/optionentry.hg delete mode 100644 libs/glibmm2/glib/src/optiongroup.ccg delete mode 100644 libs/glibmm2/glib/src/optiongroup.hg delete mode 100644 libs/glibmm2/glib/src/regex.ccg delete mode 100644 libs/glibmm2/glib/src/regex.hg delete mode 100644 libs/glibmm2/glib/src/shell.ccg delete mode 100644 libs/glibmm2/glib/src/shell.hg delete mode 100644 libs/glibmm2/glib/src/signalproxy.h.m4 delete mode 100644 libs/glibmm2/glib/src/spawn.ccg delete mode 100644 libs/glibmm2/glib/src/spawn.hg delete mode 100644 libs/glibmm2/glib/src/template.macros.m4 delete mode 100644 libs/glibmm2/glib/src/thread.ccg delete mode 100644 libs/glibmm2/glib/src/thread.hg delete mode 100644 libs/glibmm2/glib/src/unicode.ccg delete mode 100644 libs/glibmm2/glib/src/unicode.hg delete mode 100644 libs/glibmm2/glib/src/value_basictypes.cc.m4 delete mode 100644 libs/glibmm2/glib/src/value_basictypes.h.m4 delete mode 100644 libs/glibmm2/scripts/Makefile.am delete mode 100644 libs/glibmm2/scripts/Makefile.in delete mode 100644 libs/glibmm2/scripts/README delete mode 100644 libs/glibmm2/scripts/c_std.m4 delete mode 100755 libs/glibmm2/scripts/config.guess delete mode 100755 libs/glibmm2/scripts/config.sub delete mode 100644 libs/glibmm2/scripts/cxx.m4 delete mode 100644 libs/glibmm2/scripts/cxx_std.m4 delete mode 100755 libs/glibmm2/scripts/depcomp delete mode 100644 libs/glibmm2/scripts/docgen.m4 delete mode 100644 libs/glibmm2/scripts/glibmm_check_perl.m4 delete mode 100755 libs/glibmm2/scripts/install-sh delete mode 100644 libs/glibmm2/scripts/ltmain.sh delete mode 100644 libs/glibmm2/scripts/macros.m4 delete mode 100755 libs/glibmm2/scripts/missing delete mode 100644 libs/glibmm2/scripts/reduced.m4 delete mode 100644 libs/glibmm2/scripts/sun.m4 delete mode 100644 libs/glibmm2/tools/Makefile.am delete mode 100644 libs/glibmm2/tools/Makefile.in delete mode 100644 libs/glibmm2/tools/Makefile_list_of_sources.am_fragment delete mode 100644 libs/glibmm2/tools/README delete mode 100644 libs/glibmm2/tools/TODO delete mode 100644 libs/glibmm2/tools/enum.pl delete mode 100644 libs/glibmm2/tools/extra_defs_gen/Makefile.am delete mode 100644 libs/glibmm2/tools/extra_defs_gen/Makefile.in delete mode 100644 libs/glibmm2/tools/extra_defs_gen/generate_defs_glib.cc delete mode 100644 libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.cc delete mode 100644 libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.h delete mode 100644 libs/glibmm2/tools/generate_wrap_init.pl delete mode 100644 libs/glibmm2/tools/generate_wrap_init.pl.in delete mode 100644 libs/glibmm2/tools/gmmproc.in delete mode 100644 libs/glibmm2/tools/m4/Makefile.am delete mode 100644 libs/glibmm2/tools/m4/Makefile.in delete mode 100644 libs/glibmm2/tools/m4/Makefile_list_of_sources.am_fragment delete mode 100644 libs/glibmm2/tools/m4/base.m4 delete mode 100644 libs/glibmm2/tools/m4/class_boxedtype.m4 delete mode 100644 libs/glibmm2/tools/m4/class_boxedtype_static.m4 delete mode 100644 libs/glibmm2/tools/m4/class_generic.m4 delete mode 100644 libs/glibmm2/tools/m4/class_gobject.m4 delete mode 100644 libs/glibmm2/tools/m4/class_gtkobject.m4 delete mode 100644 libs/glibmm2/tools/m4/class_interface.m4 delete mode 100644 libs/glibmm2/tools/m4/class_opaque_copyable.m4 delete mode 100644 libs/glibmm2/tools/m4/class_opaque_refcounted.m4 delete mode 100644 libs/glibmm2/tools/m4/class_shared.m4 delete mode 100644 libs/glibmm2/tools/m4/compare.m4 delete mode 100644 libs/glibmm2/tools/m4/convert.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_atk.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_base.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_gdk.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_glib.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_gtk.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_gtkmm.m4 delete mode 100644 libs/glibmm2/tools/m4/convert_pango.m4 delete mode 100644 libs/glibmm2/tools/m4/ctor.m4 delete mode 100644 libs/glibmm2/tools/m4/doc.m4 delete mode 100644 libs/glibmm2/tools/m4/enum.m4 delete mode 100644 libs/glibmm2/tools/m4/gerror.m4 delete mode 100644 libs/glibmm2/tools/m4/list.m4 delete mode 100644 libs/glibmm2/tools/m4/member.m4 delete mode 100644 libs/glibmm2/tools/m4/method.m4 delete mode 100644 libs/glibmm2/tools/m4/property.m4 delete mode 100644 libs/glibmm2/tools/m4/signal.m4 delete mode 100644 libs/glibmm2/tools/m4/vfunc.m4 delete mode 100644 libs/glibmm2/tools/pm/DocsParser.pm delete mode 100644 libs/glibmm2/tools/pm/Enum.pm delete mode 100644 libs/glibmm2/tools/pm/Function.pm delete mode 100644 libs/glibmm2/tools/pm/FunctionBase.pm delete mode 100644 libs/glibmm2/tools/pm/GtkDefs.pm delete mode 100644 libs/glibmm2/tools/pm/Makefile.am delete mode 100644 libs/glibmm2/tools/pm/Makefile.in delete mode 100644 libs/glibmm2/tools/pm/Makefile_list_of_sources.am_fragment delete mode 100644 libs/glibmm2/tools/pm/Object.pm delete mode 100644 libs/glibmm2/tools/pm/Output.pm delete mode 100644 libs/glibmm2/tools/pm/Property.pm delete mode 100644 libs/glibmm2/tools/pm/Util.pm delete mode 100644 libs/glibmm2/tools/pm/WrapParser.pm delete mode 100644 libs/gtkmm2/AUTHORS delete mode 100644 libs/gtkmm2/CHANGES delete mode 100644 libs/gtkmm2/COPYING delete mode 100644 libs/gtkmm2/ChangeLog delete mode 100644 libs/gtkmm2/INSTALL delete mode 100644 libs/gtkmm2/MSVC_Net2003/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/README delete mode 100644 libs/gtkmm2/MSVC_Net2003/atkmm/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/atkmm/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/atkmm/atkmm.rc delete mode 100755 libs/gtkmm2/MSVC_Net2003/atkmm/atkmm.rc.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/atkmm/atkmm.vcproj delete mode 100755 libs/gtkmm2/MSVC_Net2003/blank.cpp delete mode 100644 libs/gtkmm2/MSVC_Net2003/demos/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/demos/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/demos/gtk-demo/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/demos/gtk-demo/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/demos/gtk-demo/gtk-demo.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/arrow/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/arrow/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/arrow/arrow.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/calendar/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/calendar/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/calendar/calendar.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/cellrenderercustom_popup/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/cellrenderercustom_popup/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/cellrenderercustom_popup/cellrenderercustom_popup.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/cellrenderercustom_toggle/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/cellrenderercustom_toggle/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/cellrenderercustom_toggle/cellrenderercustom_toggle.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/direction/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/direction/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/direction/direction.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/dnd/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/dnd/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/dnd/dnd.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/exception/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/exception/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/exception/exception.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/gdk/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/gdk/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/gdk/gdk.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/printing/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/printing/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/printing/printing.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/rulers/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/rulers/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/rulers/rulers.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/statusbar/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/statusbar/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/statusbar/statusbar.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/stock/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/stock/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/stock/stock.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/tictactoe/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/tictactoe/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/tictactoe/tictactoe.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/treemodelcustom/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/treemodelcustom/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/treemodelcustom/treemodelcustom.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/window/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/examples/window/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/examples/window/window.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/gdkmm/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/gdkmm/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmm.rc delete mode 100755 libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmm.rc.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmm.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/gdkmm/gdkmmconfig.h delete mode 100644 libs/gtkmm2/MSVC_Net2003/gendef/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/gendef/Makefile.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/gendef/gendef.cc delete mode 100755 libs/gtkmm2/MSVC_Net2003/gendef/gendef.vcproj delete mode 100755 libs/gtkmm2/MSVC_Net2003/gtkmm.sln delete mode 100644 libs/gtkmm2/MSVC_Net2003/gtkmm/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/gtkmm/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmm.rc delete mode 100755 libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmm.rc.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmm.vcproj delete mode 100644 libs/gtkmm2/MSVC_Net2003/gtkmm/gtkmmconfig.h delete mode 100644 libs/gtkmm2/MSVC_Net2003/pangomm/Makefile.am delete mode 100644 libs/gtkmm2/MSVC_Net2003/pangomm/Makefile.in delete mode 100644 libs/gtkmm2/MSVC_Net2003/pangomm/pangomm.rc delete mode 100755 libs/gtkmm2/MSVC_Net2003/pangomm/pangomm.rc.in delete mode 100755 libs/gtkmm2/MSVC_Net2003/pangomm/pangomm.vcproj delete mode 100644 libs/gtkmm2/Makefile.am delete mode 100644 libs/gtkmm2/Makefile.in delete mode 100644 libs/gtkmm2/NEWS delete mode 100644 libs/gtkmm2/PORTING delete mode 100644 libs/gtkmm2/README delete mode 100644 libs/gtkmm2/README.SUN delete mode 100644 libs/gtkmm2/README.win32 delete mode 100644 libs/gtkmm2/aclocal.m4 delete mode 100644 libs/gtkmm2/atk/Makefile.am delete mode 100644 libs/gtkmm2/atk/Makefile.in delete mode 100644 libs/gtkmm2/atk/README delete mode 100644 libs/gtkmm2/atk/SConscript delete mode 100644 libs/gtkmm2/atk/atkmm-1.6.pc.in delete mode 100644 libs/gtkmm2/atk/atkmm.h delete mode 100644 libs/gtkmm2/atk/atkmm/Makefile.am delete mode 100644 libs/gtkmm2/atk/atkmm/Makefile.in delete mode 100644 libs/gtkmm2/atk/atkmm/action.cc delete mode 100644 libs/gtkmm2/atk/atkmm/action.h delete mode 100644 libs/gtkmm2/atk/atkmm/component.cc delete mode 100644 libs/gtkmm2/atk/atkmm/component.h delete mode 100644 libs/gtkmm2/atk/atkmm/document.cc delete mode 100644 libs/gtkmm2/atk/atkmm/document.h delete mode 100644 libs/gtkmm2/atk/atkmm/editabletext.cc delete mode 100644 libs/gtkmm2/atk/atkmm/editabletext.h delete mode 100644 libs/gtkmm2/atk/atkmm/hyperlink.cc delete mode 100644 libs/gtkmm2/atk/atkmm/hyperlink.h delete mode 100644 libs/gtkmm2/atk/atkmm/hypertext.cc delete mode 100644 libs/gtkmm2/atk/atkmm/hypertext.h delete mode 100644 libs/gtkmm2/atk/atkmm/image.cc delete mode 100644 libs/gtkmm2/atk/atkmm/image.h delete mode 100644 libs/gtkmm2/atk/atkmm/implementor.cc delete mode 100644 libs/gtkmm2/atk/atkmm/implementor.h delete mode 100644 libs/gtkmm2/atk/atkmm/init.cc delete mode 100644 libs/gtkmm2/atk/atkmm/init.h delete mode 100644 libs/gtkmm2/atk/atkmm/noopobject.cc delete mode 100644 libs/gtkmm2/atk/atkmm/noopobject.h delete mode 100644 libs/gtkmm2/atk/atkmm/object.cc delete mode 100644 libs/gtkmm2/atk/atkmm/object.h delete mode 100644 libs/gtkmm2/atk/atkmm/objectaccessible.cc delete mode 100644 libs/gtkmm2/atk/atkmm/objectaccessible.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/Makefile.am delete mode 100644 libs/gtkmm2/atk/atkmm/private/Makefile.in delete mode 100644 libs/gtkmm2/atk/atkmm/private/action_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/component_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/document_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/editabletext_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/hyperlink_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/hypertext_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/image_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/implementor_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/noopobject_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/object_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/relation_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/relationset_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/selection_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/stateset_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/table_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/text_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/private/value_p.h delete mode 100644 libs/gtkmm2/atk/atkmm/relation.cc delete mode 100644 libs/gtkmm2/atk/atkmm/relation.h delete mode 100644 libs/gtkmm2/atk/atkmm/relationset.cc delete mode 100644 libs/gtkmm2/atk/atkmm/relationset.h delete mode 100644 libs/gtkmm2/atk/atkmm/selection.cc delete mode 100644 libs/gtkmm2/atk/atkmm/selection.h delete mode 100644 libs/gtkmm2/atk/atkmm/stateset.cc delete mode 100644 libs/gtkmm2/atk/atkmm/stateset.h delete mode 100644 libs/gtkmm2/atk/atkmm/streamablecontent.cc delete mode 100644 libs/gtkmm2/atk/atkmm/streamablecontent.h delete mode 100644 libs/gtkmm2/atk/atkmm/table.cc delete mode 100644 libs/gtkmm2/atk/atkmm/table.h delete mode 100644 libs/gtkmm2/atk/atkmm/text.cc delete mode 100644 libs/gtkmm2/atk/atkmm/text.h delete mode 100644 libs/gtkmm2/atk/atkmm/value.cc delete mode 100644 libs/gtkmm2/atk/atkmm/value.h delete mode 100644 libs/gtkmm2/atk/atkmm/wrap_init.cc delete mode 100644 libs/gtkmm2/atk/atkmm/wrap_init.h delete mode 100644 libs/gtkmm2/atk/src/Makefile.am delete mode 100644 libs/gtkmm2/atk/src/Makefile.in delete mode 100644 libs/gtkmm2/atk/src/Makefile_list_of_hg.am_fragment delete mode 100644 libs/gtkmm2/atk/src/action.ccg delete mode 100644 libs/gtkmm2/atk/src/action.hg delete mode 100644 libs/gtkmm2/atk/src/atk.defs delete mode 100644 libs/gtkmm2/atk/src/atk_docs.xml delete mode 100644 libs/gtkmm2/atk/src/atk_docs_override.xml delete mode 100644 libs/gtkmm2/atk/src/atk_enums.defs delete mode 100644 libs/gtkmm2/atk/src/atk_methods.defs delete mode 100644 libs/gtkmm2/atk/src/atk_signals.defs delete mode 100644 libs/gtkmm2/atk/src/atk_vfuncs.defs delete mode 100644 libs/gtkmm2/atk/src/component.ccg delete mode 100644 libs/gtkmm2/atk/src/component.hg delete mode 100644 libs/gtkmm2/atk/src/document.ccg delete mode 100644 libs/gtkmm2/atk/src/document.hg delete mode 100644 libs/gtkmm2/atk/src/editabletext.ccg delete mode 100644 libs/gtkmm2/atk/src/editabletext.hg delete mode 100644 libs/gtkmm2/atk/src/hyperlink.ccg delete mode 100644 libs/gtkmm2/atk/src/hyperlink.hg delete mode 100644 libs/gtkmm2/atk/src/hypertext.ccg delete mode 100644 libs/gtkmm2/atk/src/hypertext.hg delete mode 100644 libs/gtkmm2/atk/src/image.ccg delete mode 100644 libs/gtkmm2/atk/src/image.hg delete mode 100644 libs/gtkmm2/atk/src/implementor.ccg delete mode 100644 libs/gtkmm2/atk/src/implementor.hg delete mode 100644 libs/gtkmm2/atk/src/noopobject.ccg delete mode 100644 libs/gtkmm2/atk/src/noopobject.hg delete mode 100644 libs/gtkmm2/atk/src/object.ccg delete mode 100644 libs/gtkmm2/atk/src/object.hg delete mode 100644 libs/gtkmm2/atk/src/objectaccessible.ccg delete mode 100644 libs/gtkmm2/atk/src/objectaccessible.hg delete mode 100644 libs/gtkmm2/atk/src/relation.ccg delete mode 100644 libs/gtkmm2/atk/src/relation.hg delete mode 100644 libs/gtkmm2/atk/src/relationset.ccg delete mode 100644 libs/gtkmm2/atk/src/relationset.hg delete mode 100644 libs/gtkmm2/atk/src/selection.ccg delete mode 100644 libs/gtkmm2/atk/src/selection.hg delete mode 100644 libs/gtkmm2/atk/src/stateset.ccg delete mode 100644 libs/gtkmm2/atk/src/stateset.hg delete mode 100644 libs/gtkmm2/atk/src/streamablecontent.ccg delete mode 100644 libs/gtkmm2/atk/src/streamablecontent.hg delete mode 100644 libs/gtkmm2/atk/src/table.ccg delete mode 100644 libs/gtkmm2/atk/src/table.hg delete mode 100644 libs/gtkmm2/atk/src/text.ccg delete mode 100644 libs/gtkmm2/atk/src/text.hg delete mode 100644 libs/gtkmm2/atk/src/value.ccg delete mode 100644 libs/gtkmm2/atk/src/value.hg delete mode 100755 libs/gtkmm2/autogen.sh delete mode 100644 libs/gtkmm2/build_shared/Makefile_build.am_fragment delete mode 100644 libs/gtkmm2/build_shared/Makefile_build_gensrc.am_fragment delete mode 100644 libs/gtkmm2/build_shared/Makefile_conditional.am_fragment delete mode 100644 libs/gtkmm2/build_shared/Makefile_gensrc.am_fragment delete mode 100644 libs/gtkmm2/config.h.in delete mode 100755 libs/gtkmm2/configure delete mode 100644 libs/gtkmm2/configure.in delete mode 100644 libs/gtkmm2/gdk/Makefile.am delete mode 100644 libs/gtkmm2/gdk/Makefile.in delete mode 100644 libs/gtkmm2/gdk/README delete mode 100644 libs/gtkmm2/gdk/SConscript delete mode 100644 libs/gtkmm2/gdk/gdkmm-2.4.pc.in delete mode 100644 libs/gtkmm2/gdk/gdkmm.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/Makefile.am delete mode 100644 libs/gtkmm2/gdk/gdkmm/Makefile.in delete mode 100644 libs/gtkmm2/gdk/gdkmm/README delete mode 100644 libs/gtkmm2/gdk/gdkmm/bitmap.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/bitmap.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/color.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/color.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/colormap.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/colormap.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/cursor.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/cursor.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/device.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/device.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/display.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/display.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/displaymanager.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/displaymanager.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/dragcontext.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/dragcontext.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/drawable.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/drawable.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/event.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/event.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/gc.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/gc.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/general.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/general.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/image.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/image.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/list.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbuf.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbuf.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufanimation.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufformat.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufformat.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufloader.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixbufloader.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixmap.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/pixmap.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/Makefile.am delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/Makefile.in delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/color_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/colormap_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/cursor_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/device_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/display_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/drawable_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/event_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/gc_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/image_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/region_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/screen_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/types_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/visual_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/private/window_p.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/rectangle.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/rectangle.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/region.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/region.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/rgb.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/rgb.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/rgbcmap.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/rgbcmap.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/screen.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/screen.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/types.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/types.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/visual.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/visual.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/window.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/window.h delete mode 100644 libs/gtkmm2/gdk/gdkmm/wrap_init.cc delete mode 100644 libs/gtkmm2/gdk/gdkmm/wrap_init.h delete mode 100644 libs/gtkmm2/gdk/gdkmmconfig.h delete mode 100644 libs/gtkmm2/gdk/gdkmmconfig.h.in delete mode 100644 libs/gtkmm2/gdk/src/Makefile.am delete mode 100644 libs/gtkmm2/gdk/src/Makefile.in delete mode 100644 libs/gtkmm2/gdk/src/Makefile_list_of_hg.am_fragment delete mode 100644 libs/gtkmm2/gdk/src/README delete mode 100644 libs/gtkmm2/gdk/src/bitmap.ccg delete mode 100644 libs/gtkmm2/gdk/src/bitmap.hg delete mode 100644 libs/gtkmm2/gdk/src/color.ccg delete mode 100644 libs/gtkmm2/gdk/src/color.hg delete mode 100644 libs/gtkmm2/gdk/src/colormap.ccg delete mode 100644 libs/gtkmm2/gdk/src/colormap.hg delete mode 100644 libs/gtkmm2/gdk/src/cursor.ccg delete mode 100644 libs/gtkmm2/gdk/src/cursor.hg delete mode 100644 libs/gtkmm2/gdk/src/device.ccg delete mode 100644 libs/gtkmm2/gdk/src/device.hg delete mode 100644 libs/gtkmm2/gdk/src/display.ccg delete mode 100644 libs/gtkmm2/gdk/src/display.hg delete mode 100644 libs/gtkmm2/gdk/src/displaymanager.ccg delete mode 100644 libs/gtkmm2/gdk/src/displaymanager.hg delete mode 100644 libs/gtkmm2/gdk/src/dragcontext.ccg delete mode 100644 libs/gtkmm2/gdk/src/dragcontext.hg delete mode 100644 libs/gtkmm2/gdk/src/drawable.ccg delete mode 100644 libs/gtkmm2/gdk/src/drawable.hg delete mode 100644 libs/gtkmm2/gdk/src/event.ccg delete mode 100644 libs/gtkmm2/gdk/src/event.hg delete mode 100644 libs/gtkmm2/gdk/src/gc.ccg delete mode 100644 libs/gtkmm2/gdk/src/gc.hg delete mode 100644 libs/gtkmm2/gdk/src/gdk.defs delete mode 100644 libs/gtkmm2/gdk/src/gdk_docs.xml delete mode 100644 libs/gtkmm2/gdk/src/gdk_docs_override.xml delete mode 100644 libs/gtkmm2/gdk/src/gdk_enums.defs delete mode 100644 libs/gtkmm2/gdk/src/gdk_extra.defs delete mode 100644 libs/gtkmm2/gdk/src/gdk_methods.defs delete mode 100644 libs/gtkmm2/gdk/src/gdk_pixbuf.defs delete mode 100644 libs/gtkmm2/gdk/src/gdk_pixbuf_enums.defs delete mode 100644 libs/gtkmm2/gdk/src/gdk_signals.defs delete mode 100644 libs/gtkmm2/gdk/src/image.ccg delete mode 100644 libs/gtkmm2/gdk/src/image.hg delete mode 100644 libs/gtkmm2/gdk/src/pixbuf.ccg delete mode 100644 libs/gtkmm2/gdk/src/pixbuf.hg delete mode 100644 libs/gtkmm2/gdk/src/pixbufanimation.ccg delete mode 100644 libs/gtkmm2/gdk/src/pixbufanimation.hg delete mode 100644 libs/gtkmm2/gdk/src/pixbufanimationiter.ccg delete mode 100644 libs/gtkmm2/gdk/src/pixbufanimationiter.hg delete mode 100644 libs/gtkmm2/gdk/src/pixbufformat.ccg delete mode 100644 libs/gtkmm2/gdk/src/pixbufformat.hg delete mode 100644 libs/gtkmm2/gdk/src/pixbufloader.ccg delete mode 100644 libs/gtkmm2/gdk/src/pixbufloader.hg delete mode 100644 libs/gtkmm2/gdk/src/pixmap.ccg delete mode 100644 libs/gtkmm2/gdk/src/pixmap.hg delete mode 100644 libs/gtkmm2/gdk/src/rectangle.ccg delete mode 100644 libs/gtkmm2/gdk/src/rectangle.hg delete mode 100644 libs/gtkmm2/gdk/src/region.ccg delete mode 100644 libs/gtkmm2/gdk/src/region.hg delete mode 100644 libs/gtkmm2/gdk/src/rgbcmap.ccg delete mode 100644 libs/gtkmm2/gdk/src/rgbcmap.hg delete mode 100644 libs/gtkmm2/gdk/src/screen.ccg delete mode 100644 libs/gtkmm2/gdk/src/screen.hg delete mode 100644 libs/gtkmm2/gdk/src/types.ccg delete mode 100644 libs/gtkmm2/gdk/src/types.hg delete mode 100644 libs/gtkmm2/gdk/src/visual.ccg delete mode 100644 libs/gtkmm2/gdk/src/visual.hg delete mode 100644 libs/gtkmm2/gdk/src/window.ccg delete mode 100644 libs/gtkmm2/gdk/src/window.hg delete mode 100644 libs/gtkmm2/gtk/Makefile.am delete mode 100644 libs/gtkmm2/gtk/Makefile.in delete mode 100644 libs/gtkmm2/gtk/README delete mode 100644 libs/gtkmm2/gtk/SConscript delete mode 100644 libs/gtkmm2/gtk/gtkmm-2.4.pc.in delete mode 100644 libs/gtkmm2/gtk/gtkmm.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/Makefile.am delete mode 100644 libs/gtkmm2/gtk/gtkmm/Makefile.in delete mode 100644 libs/gtkmm2/gtk/gtkmm/aboutdialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/aboutdialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/accelgroup.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/accelgroup.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/accelkey.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/accelkey.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/accellabel.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/accellabel.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/accelmap.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/accelmap.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/action.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/action.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/actiongroup.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/actiongroup.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/adjustment.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/adjustment.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/alignment.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/alignment.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/arrow.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/arrow.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/aspectframe.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/aspectframe.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/assistant.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/assistant.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/base.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/bin.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/bin.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/box.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/box.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/builder.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/builder.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/button.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/button.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/buttonbox.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/buttonbox.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/calendar.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/calendar.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/celleditable.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/celleditable.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/celllayout.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/celllayout.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderer.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderer.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendereraccel.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendereraccel.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendererspin.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrendererspin.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderertext.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellview.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/cellview.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/checkbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/checkbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/checkmenuitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/clipboard.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/clipboard.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/colorbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/colorbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/colorselection.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/colorselection.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/combo.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/combo.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/combobox.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/combobox.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/comboboxentry.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/comboboxentry.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/comboboxtext.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/comboboxtext.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/container.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/container.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/curve.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/curve.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/dialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/dialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/drawingarea.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/drawingarea.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/editable.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/editable.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/entry.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/entry.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/entrycompletion.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/entrycompletion.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/enums.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/enums.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/eventbox.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/eventbox.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/expander.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/expander.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooser.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooser.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooserbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooserdialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/filechooserwidget.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/filefilter.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/filefilter.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/fileselection.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/fileselection.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/fixed.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/fixed.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/fontbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/fontbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/fontselection.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/fontselection.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/frame.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/frame.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/handlebox.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/handlebox.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconfactory.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconfactory.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconinfo.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconinfo.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconset.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconset.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconsource.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconsource.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/icontheme.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/icontheme.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconview.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/iconview.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/image.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/image.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/imagemenuitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/imagemenuitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/inputdialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/inputdialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/invisible.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/invisible.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/item.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/item.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/label.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/label.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/layout.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/layout.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/linkbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/linkbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/liststore.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/liststore.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/listviewtext.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/listviewtext.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/main.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/main.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/menu.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/menu.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/menu_elems.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/menu_elems.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/menubar.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/menubar.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/menuitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/menuitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/menushell.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/menushell.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/menutoolbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/menutoolbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/messagedialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/messagedialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/misc.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/misc.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/notebook.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/notebook.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/object.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/object.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/optionmenu.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/optionmenu.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/pagesetup.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/pagesetup.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/pagesetupunixdialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/pagesetupunixdialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/paned.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/paned.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/papersize.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/papersize.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/plug.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/plug.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printcontext.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printcontext.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printer.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printer.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printjob.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printjob.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printoperation.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printoperation.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printoperationpreview.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printoperationpreview.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printsettings.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printsettings.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/printunixdialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/printunixdialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/Makefile.am delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/Makefile.in delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/aboutdialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/accelgroup_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/accellabel_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/action_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/actiongroup_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/adjustment_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/alignment_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/arrow_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/aspectframe_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/assistant_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/bin_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/box_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/builder_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/button_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/buttonbox_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/calendar_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/celleditable_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/celllayout_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrenderer_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrendereraccel_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrenderercombo_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrendererpixbuf_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrendererprogress_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrendererspin_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrenderertext_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellrenderertoggle_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/cellview_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/checkbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/checkmenuitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/clipboard_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/colorbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/colorselection_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/combo_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/combobox_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/comboboxentry_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/container_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/curve_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/dialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/drawingarea_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/editable_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/entry_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/entrycompletion_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/enums_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/eventbox_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/expander_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/filechooser_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/filechooserbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/filechooserdialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/filechooserwidget_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/filefilter_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/fileselection_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/fixed_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/fontbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/fontselection_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/frame_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/handlebox_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/iconfactory_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/iconinfo_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/iconset_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/iconsource_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/icontheme_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/iconview_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/image_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/imagemenuitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/inputdialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/invisible_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/item_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/label_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/layout_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/linkbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/liststore_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/main_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/menu_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/menubar_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/menuitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/menushell_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/menutoolbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/messagedialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/misc_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/notebook_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/object_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/optionmenu_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/pagesetup_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/pagesetupunixdialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/paned_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/papersize_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/plug_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printcontext_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printer_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printjob_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printoperation_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printoperationpreview_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printsettings_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/printunixdialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/progressbar_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/radioaction_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/radiobutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/radiomenuitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/radiotoolbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/range_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/rc_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentaction_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentchooser_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentchooserdialog_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentchoosermenu_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentchooserwidget_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentfilter_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentinfo_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/recentmanager_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/ruler_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/scale_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/scalebutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/scrollbar_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/scrolledwindow_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/selectiondata_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/separator_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/separatormenuitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/separatortoolitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/settings_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/sizegroup_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/socket_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/spinbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/statusbar_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/statusicon_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/stockitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/style_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/table_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/targetlist_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/tearoffmenuitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/textattributes_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/textbuffer_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/textchildanchor_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/textiter_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/textmark_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/texttag_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/texttagtable_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/textview_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/toggleaction_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/togglebutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/toggletoolbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/toolbar_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/toolbutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/toolitem_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/tooltip_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/tooltips_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treedragdest_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treedragsource_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treeiter_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treemodel_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treemodelfilter_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treemodelsort_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treepath_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treerowreference_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treeselection_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treesortable_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treestore_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treeview_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/treeviewcolumn_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/uimanager_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/viewport_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/volumebutton_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/widget_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/private/window_p.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/progressbar.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/progressbar.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/radioaction.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/radioaction.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiobutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiobutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiobuttongroup.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiobuttongroup.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiomenuitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiomenuitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiotoolbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/radiotoolbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/range.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/range.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/rc.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/rc.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentaction.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentaction.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchooser.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchooser.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchooserdialog.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchooserdialog.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchoosermenu.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchoosermenu.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchooserwidget.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentchooserwidget.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentfilter.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentfilter.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentinfo.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentinfo.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentmanager.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/recentmanager.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/ruler.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/ruler.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/scale.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/scale.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/scalebutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/scalebutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/scrollbar.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/scrollbar.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/scrolledwindow.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/scrolledwindow.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/selectiondata.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/selectiondata.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/selectiondata_private.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/selectiondata_private.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/separator.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/separator.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/separatormenuitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/separatormenuitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/separatortoolitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/separatortoolitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/settings.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/settings.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/sizegroup.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/sizegroup.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/socket.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/socket.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/spinbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/spinbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/statusbar.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/statusbar.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/statusicon.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/statusicon.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/stock.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/stock.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/stockid.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/stockid.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/stockitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/stockitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/style.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/style.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/table.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/table.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/targetentry.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/targetentry.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/targetlist.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/targetlist.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/textattributes.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/textattributes.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/textbuffer.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/textbuffer.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/textchildanchor.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/textchildanchor.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/textiter.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/textiter.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/textmark.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/textmark.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/texttag.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/texttag.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/texttagtable.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/texttagtable.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/textview.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/textview.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/toggleaction.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/toggleaction.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/togglebutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/togglebutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/toggletoolbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/toggletoolbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/toolbar.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/toolbar.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/toolbutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/toolbutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/toolitem.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/toolitem.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/tooltip.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/tooltip.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/tooltips.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/tooltips.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treedragdest.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treedragdest.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treedragsource.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treedragsource.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeiter.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeiter.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodel.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodel.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodelcolumn.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodelcolumn.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodelfilter.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodelfilter.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodelsort.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treemodelsort.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treepath.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treepath.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treerowreference.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treerowreference.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeselection.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeselection.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treesortable.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treesortable.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treestore.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treestore.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeview.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeview.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeview_private.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeview_private.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeviewcolumn.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/treeviewcolumn.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/uimanager.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/uimanager.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/viewport.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/viewport.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/volumebutton.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/volumebutton.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/widget.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/widget.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/window.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/window.h delete mode 100644 libs/gtkmm2/gtk/gtkmm/wrap_init.cc delete mode 100644 libs/gtkmm2/gtk/gtkmm/wrap_init.h delete mode 100644 libs/gtkmm2/gtk/gtkmmconfig.h delete mode 100644 libs/gtkmm2/gtk/gtkmmconfig.h.in delete mode 100644 libs/gtkmm2/gtk/src/Makefile.am delete mode 100644 libs/gtkmm2/gtk/src/Makefile.in delete mode 100644 libs/gtkmm2/gtk/src/Makefile_list_of_hg.am_fragment delete mode 100644 libs/gtkmm2/gtk/src/README delete mode 100644 libs/gtkmm2/gtk/src/aboutdialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/aboutdialog.hg delete mode 100644 libs/gtkmm2/gtk/src/accelgroup.ccg delete mode 100644 libs/gtkmm2/gtk/src/accelgroup.hg delete mode 100644 libs/gtkmm2/gtk/src/accellabel.ccg delete mode 100644 libs/gtkmm2/gtk/src/accellabel.hg delete mode 100644 libs/gtkmm2/gtk/src/action.ccg delete mode 100644 libs/gtkmm2/gtk/src/action.hg delete mode 100644 libs/gtkmm2/gtk/src/actiongroup.ccg delete mode 100644 libs/gtkmm2/gtk/src/actiongroup.hg delete mode 100644 libs/gtkmm2/gtk/src/adjustment.ccg delete mode 100644 libs/gtkmm2/gtk/src/adjustment.hg delete mode 100644 libs/gtkmm2/gtk/src/alignment.ccg delete mode 100644 libs/gtkmm2/gtk/src/alignment.hg delete mode 100644 libs/gtkmm2/gtk/src/arrow.ccg delete mode 100644 libs/gtkmm2/gtk/src/arrow.hg delete mode 100644 libs/gtkmm2/gtk/src/aspectframe.ccg delete mode 100644 libs/gtkmm2/gtk/src/aspectframe.hg delete mode 100644 libs/gtkmm2/gtk/src/assistant.ccg delete mode 100644 libs/gtkmm2/gtk/src/assistant.hg delete mode 100644 libs/gtkmm2/gtk/src/bin.ccg delete mode 100644 libs/gtkmm2/gtk/src/bin.hg delete mode 100644 libs/gtkmm2/gtk/src/box.ccg delete mode 100644 libs/gtkmm2/gtk/src/box.hg delete mode 100644 libs/gtkmm2/gtk/src/builder.ccg delete mode 100644 libs/gtkmm2/gtk/src/builder.hg delete mode 100644 libs/gtkmm2/gtk/src/button.ccg delete mode 100644 libs/gtkmm2/gtk/src/button.hg delete mode 100644 libs/gtkmm2/gtk/src/buttonbox.ccg delete mode 100644 libs/gtkmm2/gtk/src/buttonbox.hg delete mode 100644 libs/gtkmm2/gtk/src/calendar.ccg delete mode 100644 libs/gtkmm2/gtk/src/calendar.hg delete mode 100644 libs/gtkmm2/gtk/src/celleditable.ccg delete mode 100644 libs/gtkmm2/gtk/src/celleditable.hg delete mode 100644 libs/gtkmm2/gtk/src/celllayout.ccg delete mode 100644 libs/gtkmm2/gtk/src/celllayout.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderer.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderer.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrendereraccel.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrendereraccel.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderercombo.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderercombo.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrendererpixbuf.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrendererpixbuf.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrendererprogress.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrendererprogress.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrendererspin.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrendererspin.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderertext.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderertext.hg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderertoggle.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellrenderertoggle.hg delete mode 100644 libs/gtkmm2/gtk/src/cellview.ccg delete mode 100644 libs/gtkmm2/gtk/src/cellview.hg delete mode 100644 libs/gtkmm2/gtk/src/checkbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/checkbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/checkmenuitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/checkmenuitem.hg delete mode 100644 libs/gtkmm2/gtk/src/clipboard.ccg delete mode 100644 libs/gtkmm2/gtk/src/clipboard.hg delete mode 100644 libs/gtkmm2/gtk/src/colorbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/colorbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/colorselection.ccg delete mode 100644 libs/gtkmm2/gtk/src/colorselection.hg delete mode 100644 libs/gtkmm2/gtk/src/combo.ccg delete mode 100644 libs/gtkmm2/gtk/src/combo.hg delete mode 100644 libs/gtkmm2/gtk/src/combobox.ccg delete mode 100644 libs/gtkmm2/gtk/src/combobox.hg delete mode 100644 libs/gtkmm2/gtk/src/comboboxentry.ccg delete mode 100644 libs/gtkmm2/gtk/src/comboboxentry.hg delete mode 100644 libs/gtkmm2/gtk/src/container.ccg delete mode 100644 libs/gtkmm2/gtk/src/container.hg delete mode 100644 libs/gtkmm2/gtk/src/curve.ccg delete mode 100644 libs/gtkmm2/gtk/src/curve.hg delete mode 100644 libs/gtkmm2/gtk/src/dialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/dialog.hg delete mode 100644 libs/gtkmm2/gtk/src/drawingarea.ccg delete mode 100644 libs/gtkmm2/gtk/src/drawingarea.hg delete mode 100644 libs/gtkmm2/gtk/src/editable.ccg delete mode 100644 libs/gtkmm2/gtk/src/editable.hg delete mode 100644 libs/gtkmm2/gtk/src/entry.ccg delete mode 100644 libs/gtkmm2/gtk/src/entry.hg delete mode 100644 libs/gtkmm2/gtk/src/entrycompletion.ccg delete mode 100644 libs/gtkmm2/gtk/src/entrycompletion.hg delete mode 100644 libs/gtkmm2/gtk/src/enums.ccg delete mode 100644 libs/gtkmm2/gtk/src/enums.hg delete mode 100644 libs/gtkmm2/gtk/src/eventbox.ccg delete mode 100644 libs/gtkmm2/gtk/src/eventbox.hg delete mode 100644 libs/gtkmm2/gtk/src/expander.ccg delete mode 100644 libs/gtkmm2/gtk/src/expander.hg delete mode 100644 libs/gtkmm2/gtk/src/filechooser.ccg delete mode 100644 libs/gtkmm2/gtk/src/filechooser.hg delete mode 100644 libs/gtkmm2/gtk/src/filechooserbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/filechooserbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/filechooserdialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/filechooserdialog.hg delete mode 100644 libs/gtkmm2/gtk/src/filechooserwidget.ccg delete mode 100644 libs/gtkmm2/gtk/src/filechooserwidget.hg delete mode 100644 libs/gtkmm2/gtk/src/filefilter.ccg delete mode 100644 libs/gtkmm2/gtk/src/filefilter.hg delete mode 100644 libs/gtkmm2/gtk/src/fileselection.ccg delete mode 100644 libs/gtkmm2/gtk/src/fileselection.hg delete mode 100644 libs/gtkmm2/gtk/src/fixed.ccg delete mode 100644 libs/gtkmm2/gtk/src/fixed.hg delete mode 100644 libs/gtkmm2/gtk/src/fontbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/fontbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/fontselection.ccg delete mode 100644 libs/gtkmm2/gtk/src/fontselection.hg delete mode 100644 libs/gtkmm2/gtk/src/frame.ccg delete mode 100644 libs/gtkmm2/gtk/src/frame.hg delete mode 100644 libs/gtkmm2/gtk/src/gtk.defs delete mode 100644 libs/gtkmm2/gtk/src/gtk_docs.xml delete mode 100644 libs/gtkmm2/gtk/src/gtk_docs_override.xml delete mode 100644 libs/gtkmm2/gtk/src/gtk_enums.defs delete mode 100644 libs/gtkmm2/gtk/src/gtk_methods.defs delete mode 100644 libs/gtkmm2/gtk/src/gtk_other.defs delete mode 100644 libs/gtkmm2/gtk/src/gtk_signals.defs delete mode 100644 libs/gtkmm2/gtk/src/gtk_vfuncs.defs delete mode 100644 libs/gtkmm2/gtk/src/handlebox.ccg delete mode 100644 libs/gtkmm2/gtk/src/handlebox.hg delete mode 100644 libs/gtkmm2/gtk/src/iconfactory.ccg delete mode 100644 libs/gtkmm2/gtk/src/iconfactory.hg delete mode 100644 libs/gtkmm2/gtk/src/iconinfo.ccg delete mode 100644 libs/gtkmm2/gtk/src/iconinfo.hg delete mode 100644 libs/gtkmm2/gtk/src/iconset.ccg delete mode 100644 libs/gtkmm2/gtk/src/iconset.hg delete mode 100644 libs/gtkmm2/gtk/src/iconsource.ccg delete mode 100644 libs/gtkmm2/gtk/src/iconsource.hg delete mode 100644 libs/gtkmm2/gtk/src/icontheme.ccg delete mode 100644 libs/gtkmm2/gtk/src/icontheme.hg delete mode 100644 libs/gtkmm2/gtk/src/iconview.ccg delete mode 100644 libs/gtkmm2/gtk/src/iconview.hg delete mode 100644 libs/gtkmm2/gtk/src/image.ccg delete mode 100644 libs/gtkmm2/gtk/src/image.hg delete mode 100644 libs/gtkmm2/gtk/src/imagemenuitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/imagemenuitem.hg delete mode 100644 libs/gtkmm2/gtk/src/inputdialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/inputdialog.hg delete mode 100644 libs/gtkmm2/gtk/src/invisible.ccg delete mode 100644 libs/gtkmm2/gtk/src/invisible.hg delete mode 100644 libs/gtkmm2/gtk/src/item.ccg delete mode 100644 libs/gtkmm2/gtk/src/item.hg delete mode 100644 libs/gtkmm2/gtk/src/label.ccg delete mode 100644 libs/gtkmm2/gtk/src/label.hg delete mode 100644 libs/gtkmm2/gtk/src/layout.ccg delete mode 100644 libs/gtkmm2/gtk/src/layout.hg delete mode 100644 libs/gtkmm2/gtk/src/linkbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/linkbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/liststore.ccg delete mode 100644 libs/gtkmm2/gtk/src/liststore.hg delete mode 100644 libs/gtkmm2/gtk/src/main.ccg delete mode 100644 libs/gtkmm2/gtk/src/main.hg delete mode 100644 libs/gtkmm2/gtk/src/menu.ccg delete mode 100644 libs/gtkmm2/gtk/src/menu.hg delete mode 100644 libs/gtkmm2/gtk/src/menubar.ccg delete mode 100644 libs/gtkmm2/gtk/src/menubar.hg delete mode 100644 libs/gtkmm2/gtk/src/menuitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/menuitem.hg delete mode 100644 libs/gtkmm2/gtk/src/menushell.ccg delete mode 100644 libs/gtkmm2/gtk/src/menushell.hg delete mode 100644 libs/gtkmm2/gtk/src/menutoolbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/menutoolbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/messagedialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/messagedialog.hg delete mode 100644 libs/gtkmm2/gtk/src/misc.ccg delete mode 100644 libs/gtkmm2/gtk/src/misc.hg delete mode 100644 libs/gtkmm2/gtk/src/notebook.ccg delete mode 100644 libs/gtkmm2/gtk/src/notebook.hg delete mode 100644 libs/gtkmm2/gtk/src/object.ccg delete mode 100644 libs/gtkmm2/gtk/src/object.hg delete mode 100644 libs/gtkmm2/gtk/src/optionmenu.ccg delete mode 100644 libs/gtkmm2/gtk/src/optionmenu.hg delete mode 100644 libs/gtkmm2/gtk/src/pagesetup.ccg delete mode 100644 libs/gtkmm2/gtk/src/pagesetup.hg delete mode 100644 libs/gtkmm2/gtk/src/pagesetupunixdialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/pagesetupunixdialog.hg delete mode 100644 libs/gtkmm2/gtk/src/paned.ccg delete mode 100644 libs/gtkmm2/gtk/src/paned.hg delete mode 100644 libs/gtkmm2/gtk/src/papersize.ccg delete mode 100644 libs/gtkmm2/gtk/src/papersize.hg delete mode 100644 libs/gtkmm2/gtk/src/plug.ccg delete mode 100644 libs/gtkmm2/gtk/src/plug.hg delete mode 100644 libs/gtkmm2/gtk/src/printcontext.ccg delete mode 100644 libs/gtkmm2/gtk/src/printcontext.hg delete mode 100644 libs/gtkmm2/gtk/src/printer.ccg delete mode 100644 libs/gtkmm2/gtk/src/printer.hg delete mode 100644 libs/gtkmm2/gtk/src/printjob.ccg delete mode 100644 libs/gtkmm2/gtk/src/printjob.hg delete mode 100644 libs/gtkmm2/gtk/src/printoperation.ccg delete mode 100644 libs/gtkmm2/gtk/src/printoperation.hg delete mode 100644 libs/gtkmm2/gtk/src/printoperationpreview.ccg delete mode 100644 libs/gtkmm2/gtk/src/printoperationpreview.hg delete mode 100644 libs/gtkmm2/gtk/src/printsettings.ccg delete mode 100644 libs/gtkmm2/gtk/src/printsettings.hg delete mode 100644 libs/gtkmm2/gtk/src/printunixdialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/printunixdialog.hg delete mode 100644 libs/gtkmm2/gtk/src/progressbar.ccg delete mode 100644 libs/gtkmm2/gtk/src/progressbar.hg delete mode 100644 libs/gtkmm2/gtk/src/radioaction.ccg delete mode 100644 libs/gtkmm2/gtk/src/radioaction.hg delete mode 100644 libs/gtkmm2/gtk/src/radiobutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/radiobutton.hg delete mode 100644 libs/gtkmm2/gtk/src/radiomenuitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/radiomenuitem.hg delete mode 100644 libs/gtkmm2/gtk/src/radiotoolbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/radiotoolbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/range.ccg delete mode 100644 libs/gtkmm2/gtk/src/range.hg delete mode 100644 libs/gtkmm2/gtk/src/rc.ccg delete mode 100644 libs/gtkmm2/gtk/src/rc.hg delete mode 100644 libs/gtkmm2/gtk/src/recentaction.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentaction.hg delete mode 100644 libs/gtkmm2/gtk/src/recentchooser.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentchooser.hg delete mode 100644 libs/gtkmm2/gtk/src/recentchooserdialog.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentchooserdialog.hg delete mode 100644 libs/gtkmm2/gtk/src/recentchoosermenu.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentchoosermenu.hg delete mode 100644 libs/gtkmm2/gtk/src/recentchooserwidget.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentchooserwidget.hg delete mode 100644 libs/gtkmm2/gtk/src/recentfilter.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentfilter.hg delete mode 100644 libs/gtkmm2/gtk/src/recentinfo.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentinfo.hg delete mode 100644 libs/gtkmm2/gtk/src/recentmanager.ccg delete mode 100644 libs/gtkmm2/gtk/src/recentmanager.hg delete mode 100644 libs/gtkmm2/gtk/src/ruler.ccg delete mode 100644 libs/gtkmm2/gtk/src/ruler.hg delete mode 100644 libs/gtkmm2/gtk/src/scale.ccg delete mode 100644 libs/gtkmm2/gtk/src/scale.hg delete mode 100644 libs/gtkmm2/gtk/src/scalebutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/scalebutton.hg delete mode 100644 libs/gtkmm2/gtk/src/scrollbar.ccg delete mode 100644 libs/gtkmm2/gtk/src/scrollbar.hg delete mode 100644 libs/gtkmm2/gtk/src/scrolledwindow.ccg delete mode 100644 libs/gtkmm2/gtk/src/scrolledwindow.hg delete mode 100644 libs/gtkmm2/gtk/src/selectiondata.ccg delete mode 100644 libs/gtkmm2/gtk/src/selectiondata.hg delete mode 100644 libs/gtkmm2/gtk/src/separator.ccg delete mode 100644 libs/gtkmm2/gtk/src/separator.hg delete mode 100644 libs/gtkmm2/gtk/src/separatormenuitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/separatormenuitem.hg delete mode 100644 libs/gtkmm2/gtk/src/separatortoolitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/separatortoolitem.hg delete mode 100644 libs/gtkmm2/gtk/src/settings.ccg delete mode 100644 libs/gtkmm2/gtk/src/settings.hg delete mode 100644 libs/gtkmm2/gtk/src/sizegroup.ccg delete mode 100644 libs/gtkmm2/gtk/src/sizegroup.hg delete mode 100644 libs/gtkmm2/gtk/src/socket.ccg delete mode 100644 libs/gtkmm2/gtk/src/socket.hg delete mode 100644 libs/gtkmm2/gtk/src/spinbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/spinbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/statusbar.ccg delete mode 100644 libs/gtkmm2/gtk/src/statusbar.hg delete mode 100644 libs/gtkmm2/gtk/src/statusicon.ccg delete mode 100644 libs/gtkmm2/gtk/src/statusicon.hg delete mode 100644 libs/gtkmm2/gtk/src/stockitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/stockitem.hg delete mode 100644 libs/gtkmm2/gtk/src/style.ccg delete mode 100644 libs/gtkmm2/gtk/src/style.hg delete mode 100644 libs/gtkmm2/gtk/src/table.ccg delete mode 100644 libs/gtkmm2/gtk/src/table.hg delete mode 100644 libs/gtkmm2/gtk/src/targetlist.ccg delete mode 100644 libs/gtkmm2/gtk/src/targetlist.hg delete mode 100644 libs/gtkmm2/gtk/src/tearoffmenuitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/tearoffmenuitem.hg delete mode 100644 libs/gtkmm2/gtk/src/textattributes.ccg delete mode 100644 libs/gtkmm2/gtk/src/textattributes.hg delete mode 100644 libs/gtkmm2/gtk/src/textbuffer.ccg delete mode 100644 libs/gtkmm2/gtk/src/textbuffer.hg delete mode 100644 libs/gtkmm2/gtk/src/textchildanchor.ccg delete mode 100644 libs/gtkmm2/gtk/src/textchildanchor.hg delete mode 100644 libs/gtkmm2/gtk/src/textiter.ccg delete mode 100644 libs/gtkmm2/gtk/src/textiter.hg delete mode 100644 libs/gtkmm2/gtk/src/textmark.ccg delete mode 100644 libs/gtkmm2/gtk/src/textmark.hg delete mode 100644 libs/gtkmm2/gtk/src/texttag.ccg delete mode 100644 libs/gtkmm2/gtk/src/texttag.hg delete mode 100644 libs/gtkmm2/gtk/src/texttagtable.ccg delete mode 100644 libs/gtkmm2/gtk/src/texttagtable.hg delete mode 100644 libs/gtkmm2/gtk/src/textview.ccg delete mode 100644 libs/gtkmm2/gtk/src/textview.hg delete mode 100644 libs/gtkmm2/gtk/src/toggleaction.ccg delete mode 100644 libs/gtkmm2/gtk/src/toggleaction.hg delete mode 100644 libs/gtkmm2/gtk/src/togglebutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/togglebutton.hg delete mode 100644 libs/gtkmm2/gtk/src/toggletoolbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/toggletoolbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/toolbar.ccg delete mode 100644 libs/gtkmm2/gtk/src/toolbar.hg delete mode 100644 libs/gtkmm2/gtk/src/toolbutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/toolbutton.hg delete mode 100644 libs/gtkmm2/gtk/src/toolitem.ccg delete mode 100644 libs/gtkmm2/gtk/src/toolitem.hg delete mode 100644 libs/gtkmm2/gtk/src/tooltip.ccg delete mode 100644 libs/gtkmm2/gtk/src/tooltip.hg delete mode 100644 libs/gtkmm2/gtk/src/tooltips.ccg delete mode 100644 libs/gtkmm2/gtk/src/tooltips.hg delete mode 100644 libs/gtkmm2/gtk/src/treedragdest.ccg delete mode 100644 libs/gtkmm2/gtk/src/treedragdest.hg delete mode 100644 libs/gtkmm2/gtk/src/treedragsource.ccg delete mode 100644 libs/gtkmm2/gtk/src/treedragsource.hg delete mode 100644 libs/gtkmm2/gtk/src/treeiter.ccg delete mode 100644 libs/gtkmm2/gtk/src/treeiter.hg delete mode 100644 libs/gtkmm2/gtk/src/treemodel.ccg delete mode 100644 libs/gtkmm2/gtk/src/treemodel.hg delete mode 100644 libs/gtkmm2/gtk/src/treemodelfilter.ccg delete mode 100644 libs/gtkmm2/gtk/src/treemodelfilter.hg delete mode 100644 libs/gtkmm2/gtk/src/treemodelsort.ccg delete mode 100644 libs/gtkmm2/gtk/src/treemodelsort.hg delete mode 100644 libs/gtkmm2/gtk/src/treepath.ccg delete mode 100644 libs/gtkmm2/gtk/src/treepath.hg delete mode 100644 libs/gtkmm2/gtk/src/treerowreference.ccg delete mode 100644 libs/gtkmm2/gtk/src/treerowreference.hg delete mode 100644 libs/gtkmm2/gtk/src/treeselection.ccg delete mode 100644 libs/gtkmm2/gtk/src/treeselection.hg delete mode 100644 libs/gtkmm2/gtk/src/treesortable.ccg delete mode 100644 libs/gtkmm2/gtk/src/treesortable.hg delete mode 100644 libs/gtkmm2/gtk/src/treestore.ccg delete mode 100644 libs/gtkmm2/gtk/src/treestore.hg delete mode 100644 libs/gtkmm2/gtk/src/treeview.ccg delete mode 100644 libs/gtkmm2/gtk/src/treeview.hg delete mode 100644 libs/gtkmm2/gtk/src/treeviewcolumn.ccg delete mode 100644 libs/gtkmm2/gtk/src/treeviewcolumn.hg delete mode 100644 libs/gtkmm2/gtk/src/uimanager.ccg delete mode 100644 libs/gtkmm2/gtk/src/uimanager.hg delete mode 100644 libs/gtkmm2/gtk/src/viewport.ccg delete mode 100644 libs/gtkmm2/gtk/src/viewport.hg delete mode 100644 libs/gtkmm2/gtk/src/volumebutton.ccg delete mode 100644 libs/gtkmm2/gtk/src/volumebutton.hg delete mode 100644 libs/gtkmm2/gtk/src/widget.ccg delete mode 100644 libs/gtkmm2/gtk/src/widget.hg delete mode 100644 libs/gtkmm2/gtk/src/window.ccg delete mode 100644 libs/gtkmm2/gtk/src/window.hg delete mode 100644 libs/gtkmm2/pango/Makefile.am delete mode 100644 libs/gtkmm2/pango/Makefile.in delete mode 100644 libs/gtkmm2/pango/README delete mode 100644 libs/gtkmm2/pango/SConscript delete mode 100644 libs/gtkmm2/pango/pangomm-1.4.pc.in delete mode 100644 libs/gtkmm2/pango/pangomm.h delete mode 100644 libs/gtkmm2/pango/pangomm/Makefile.am delete mode 100644 libs/gtkmm2/pango/pangomm/Makefile.in delete mode 100644 libs/gtkmm2/pango/pangomm/attributes.cc delete mode 100644 libs/gtkmm2/pango/pangomm/attributes.h delete mode 100644 libs/gtkmm2/pango/pangomm/attriter.cc delete mode 100644 libs/gtkmm2/pango/pangomm/attriter.h delete mode 100644 libs/gtkmm2/pango/pangomm/attrlist.cc delete mode 100644 libs/gtkmm2/pango/pangomm/attrlist.h delete mode 100644 libs/gtkmm2/pango/pangomm/cairofontmap.cc delete mode 100644 libs/gtkmm2/pango/pangomm/cairofontmap.h delete mode 100644 libs/gtkmm2/pango/pangomm/color.cc delete mode 100644 libs/gtkmm2/pango/pangomm/color.h delete mode 100644 libs/gtkmm2/pango/pangomm/context.cc delete mode 100644 libs/gtkmm2/pango/pangomm/context.h delete mode 100644 libs/gtkmm2/pango/pangomm/coverage.cc delete mode 100644 libs/gtkmm2/pango/pangomm/coverage.h delete mode 100644 libs/gtkmm2/pango/pangomm/font.cc delete mode 100644 libs/gtkmm2/pango/pangomm/font.h delete mode 100644 libs/gtkmm2/pango/pangomm/fontdescription.cc delete mode 100644 libs/gtkmm2/pango/pangomm/fontdescription.h delete mode 100644 libs/gtkmm2/pango/pangomm/fontface.cc delete mode 100644 libs/gtkmm2/pango/pangomm/fontface.h delete mode 100644 libs/gtkmm2/pango/pangomm/fontfamily.cc delete mode 100644 libs/gtkmm2/pango/pangomm/fontfamily.h delete mode 100644 libs/gtkmm2/pango/pangomm/fontmap.cc delete mode 100644 libs/gtkmm2/pango/pangomm/fontmap.h delete mode 100644 libs/gtkmm2/pango/pangomm/fontmetrics.cc delete mode 100644 libs/gtkmm2/pango/pangomm/fontmetrics.h delete mode 100644 libs/gtkmm2/pango/pangomm/fontset.cc delete mode 100644 libs/gtkmm2/pango/pangomm/fontset.h delete mode 100644 libs/gtkmm2/pango/pangomm/glyph.cc delete mode 100644 libs/gtkmm2/pango/pangomm/glyph.h delete mode 100644 libs/gtkmm2/pango/pangomm/glyphstring.cc delete mode 100644 libs/gtkmm2/pango/pangomm/glyphstring.h delete mode 100644 libs/gtkmm2/pango/pangomm/init.cc delete mode 100644 libs/gtkmm2/pango/pangomm/init.h delete mode 100644 libs/gtkmm2/pango/pangomm/item.cc delete mode 100644 libs/gtkmm2/pango/pangomm/item.h delete mode 100644 libs/gtkmm2/pango/pangomm/language.cc delete mode 100644 libs/gtkmm2/pango/pangomm/language.h delete mode 100644 libs/gtkmm2/pango/pangomm/layout.cc delete mode 100644 libs/gtkmm2/pango/pangomm/layout.h delete mode 100644 libs/gtkmm2/pango/pangomm/layoutiter.cc delete mode 100644 libs/gtkmm2/pango/pangomm/layoutiter.h delete mode 100644 libs/gtkmm2/pango/pangomm/layoutline.cc delete mode 100644 libs/gtkmm2/pango/pangomm/layoutline.h delete mode 100644 libs/gtkmm2/pango/pangomm/layoutrun.cc delete mode 100644 libs/gtkmm2/pango/pangomm/layoutrun.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/Makefile.am delete mode 100644 libs/gtkmm2/pango/pangomm/private/Makefile.in delete mode 100644 libs/gtkmm2/pango/pangomm/private/attributes_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/attriter_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/attrlist_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/cairofontmap_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/color_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/context_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/coverage_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/font_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/fontdescription_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/fontface_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/fontfamily_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/fontmap_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/fontmetrics_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/fontset_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/glyph_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/glyphstring_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/item_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/language_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/layout_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/layoutiter_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/layoutline_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/layoutrun_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/rectangle_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/renderer_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/private/tabarray_p.h delete mode 100644 libs/gtkmm2/pango/pangomm/rectangle.cc delete mode 100644 libs/gtkmm2/pango/pangomm/rectangle.h delete mode 100644 libs/gtkmm2/pango/pangomm/renderer.cc delete mode 100644 libs/gtkmm2/pango/pangomm/renderer.h delete mode 100644 libs/gtkmm2/pango/pangomm/tabarray.cc delete mode 100644 libs/gtkmm2/pango/pangomm/tabarray.h delete mode 100644 libs/gtkmm2/pango/pangomm/types.h delete mode 100644 libs/gtkmm2/pango/pangomm/wrap_init.cc delete mode 100644 libs/gtkmm2/pango/pangomm/wrap_init.h delete mode 100644 libs/gtkmm2/pango/src/Makefile.am delete mode 100644 libs/gtkmm2/pango/src/Makefile.in delete mode 100644 libs/gtkmm2/pango/src/Makefile_list_of_hg.am_fragment delete mode 100644 libs/gtkmm2/pango/src/attributes.ccg delete mode 100644 libs/gtkmm2/pango/src/attributes.hg delete mode 100644 libs/gtkmm2/pango/src/attriter.ccg delete mode 100644 libs/gtkmm2/pango/src/attriter.hg delete mode 100644 libs/gtkmm2/pango/src/attrlist.ccg delete mode 100644 libs/gtkmm2/pango/src/attrlist.hg delete mode 100644 libs/gtkmm2/pango/src/cairofontmap.ccg delete mode 100644 libs/gtkmm2/pango/src/cairofontmap.hg delete mode 100644 libs/gtkmm2/pango/src/color.ccg delete mode 100644 libs/gtkmm2/pango/src/color.hg delete mode 100644 libs/gtkmm2/pango/src/context.ccg delete mode 100644 libs/gtkmm2/pango/src/context.hg delete mode 100644 libs/gtkmm2/pango/src/coverage.ccg delete mode 100644 libs/gtkmm2/pango/src/coverage.hg delete mode 100644 libs/gtkmm2/pango/src/font.ccg delete mode 100644 libs/gtkmm2/pango/src/font.hg delete mode 100644 libs/gtkmm2/pango/src/fontdescription.ccg delete mode 100644 libs/gtkmm2/pango/src/fontdescription.hg delete mode 100644 libs/gtkmm2/pango/src/fontface.ccg delete mode 100644 libs/gtkmm2/pango/src/fontface.hg delete mode 100644 libs/gtkmm2/pango/src/fontfamily.ccg delete mode 100644 libs/gtkmm2/pango/src/fontfamily.hg delete mode 100644 libs/gtkmm2/pango/src/fontmap.ccg delete mode 100644 libs/gtkmm2/pango/src/fontmap.hg delete mode 100644 libs/gtkmm2/pango/src/fontmetrics.ccg delete mode 100644 libs/gtkmm2/pango/src/fontmetrics.hg delete mode 100644 libs/gtkmm2/pango/src/fontset.ccg delete mode 100644 libs/gtkmm2/pango/src/fontset.hg delete mode 100644 libs/gtkmm2/pango/src/glyph.ccg delete mode 100644 libs/gtkmm2/pango/src/glyph.hg delete mode 100644 libs/gtkmm2/pango/src/glyphstring.ccg delete mode 100644 libs/gtkmm2/pango/src/glyphstring.hg delete mode 100644 libs/gtkmm2/pango/src/item.ccg delete mode 100644 libs/gtkmm2/pango/src/item.hg delete mode 100644 libs/gtkmm2/pango/src/language.ccg delete mode 100644 libs/gtkmm2/pango/src/language.hg delete mode 100644 libs/gtkmm2/pango/src/layout.ccg delete mode 100644 libs/gtkmm2/pango/src/layout.hg delete mode 100644 libs/gtkmm2/pango/src/layoutiter.ccg delete mode 100644 libs/gtkmm2/pango/src/layoutiter.hg delete mode 100644 libs/gtkmm2/pango/src/layoutline.ccg delete mode 100644 libs/gtkmm2/pango/src/layoutline.hg delete mode 100644 libs/gtkmm2/pango/src/layoutrun.ccg delete mode 100644 libs/gtkmm2/pango/src/layoutrun.hg delete mode 100644 libs/gtkmm2/pango/src/pango.defs delete mode 100644 libs/gtkmm2/pango/src/pango_docs.xml delete mode 100644 libs/gtkmm2/pango/src/pango_docs_override.xml delete mode 100644 libs/gtkmm2/pango/src/pango_enums.defs delete mode 100644 libs/gtkmm2/pango/src/pango_methods.defs delete mode 100644 libs/gtkmm2/pango/src/pango_vfuncs.defs delete mode 100644 libs/gtkmm2/pango/src/rectangle.ccg delete mode 100644 libs/gtkmm2/pango/src/rectangle.hg delete mode 100644 libs/gtkmm2/pango/src/renderer.ccg delete mode 100644 libs/gtkmm2/pango/src/renderer.hg delete mode 100644 libs/gtkmm2/pango/src/tabarray.ccg delete mode 100644 libs/gtkmm2/pango/src/tabarray.hg delete mode 100644 libs/gtkmm2/scripts/Makefile.am delete mode 100644 libs/gtkmm2/scripts/Makefile.in delete mode 100644 libs/gtkmm2/scripts/README delete mode 100755 libs/gtkmm2/scripts/config.guess delete mode 100755 libs/gtkmm2/scripts/config.sub delete mode 100755 libs/gtkmm2/scripts/depcomp delete mode 100644 libs/gtkmm2/scripts/docgen.m4 delete mode 100755 libs/gtkmm2/scripts/install-sh delete mode 100644 libs/gtkmm2/scripts/ltmain.sh delete mode 100644 libs/gtkmm2/scripts/macros.m4 delete mode 100755 libs/gtkmm2/scripts/missing delete mode 100644 libs/gtkmm2/scripts/reduced.m4 delete mode 100644 libs/gtkmm2/tests/Makefile.am delete mode 100644 libs/gtkmm2/tests/Makefile.am_fragment delete mode 100644 libs/gtkmm2/tests/Makefile.in delete mode 100644 libs/gtkmm2/tests/child_widget/Makefile.am delete mode 100644 libs/gtkmm2/tests/child_widget/Makefile.in delete mode 100644 libs/gtkmm2/tests/child_widget/main.cc delete mode 100644 libs/gtkmm2/tests/child_widget/testwindow.cc delete mode 100644 libs/gtkmm2/tests/child_widget/testwindow.h delete mode 100644 libs/gtkmm2/tests/child_widget2/Makefile.am delete mode 100644 libs/gtkmm2/tests/child_widget2/Makefile.in delete mode 100644 libs/gtkmm2/tests/child_widget2/main.cc delete mode 100644 libs/gtkmm2/tests/child_widget_managed/Makefile.am delete mode 100644 libs/gtkmm2/tests/child_widget_managed/Makefile.in delete mode 100644 libs/gtkmm2/tests/child_widget_managed/main.cc delete mode 100644 libs/gtkmm2/tests/delete_cpp_child/Makefile.am delete mode 100644 libs/gtkmm2/tests/delete_cpp_child/Makefile.in delete mode 100644 libs/gtkmm2/tests/delete_cpp_child/main.cc delete mode 100644 libs/gtkmm2/tests/dialog/Makefile.am delete mode 100644 libs/gtkmm2/tests/dialog/Makefile.in delete mode 100644 libs/gtkmm2/tests/dialog/main.cc delete mode 100644 libs/gtkmm2/tests/dialog_deletethis/Makefile.am delete mode 100644 libs/gtkmm2/tests/dialog_deletethis/Makefile.in delete mode 100644 libs/gtkmm2/tests/dialog_deletethis/main.cc delete mode 100644 libs/gtkmm2/tests/main_with_options/Makefile.am delete mode 100644 libs/gtkmm2/tests/main_with_options/Makefile.in delete mode 100644 libs/gtkmm2/tests/main_with_options/main.cc delete mode 100644 libs/gtkmm2/tests/menu_destruction/Makefile.am delete mode 100644 libs/gtkmm2/tests/menu_destruction/Makefile.in delete mode 100644 libs/gtkmm2/tests/menu_destruction/main.cc delete mode 100644 libs/gtkmm2/tests/property_notification/Makefile.am delete mode 100644 libs/gtkmm2/tests/property_notification/Makefile.in delete mode 100644 libs/gtkmm2/tests/property_notification/main.cc delete mode 100644 libs/gtkmm2/tests/refcount_dialog/Makefile.am delete mode 100644 libs/gtkmm2/tests/refcount_dialog/Makefile.in delete mode 100644 libs/gtkmm2/tests/refcount_dialog/main.cc delete mode 100644 libs/gtkmm2/tests/scrolledwindow/Makefile.am delete mode 100644 libs/gtkmm2/tests/scrolledwindow/Makefile.in delete mode 100644 libs/gtkmm2/tests/scrolledwindow/main.cc delete mode 100644 libs/gtkmm2/tests/wrap_existing/Makefile.am delete mode 100644 libs/gtkmm2/tests/wrap_existing/Makefile.in delete mode 100644 libs/gtkmm2/tests/wrap_existing/main.cc delete mode 100644 libs/gtkmm2/tools/Makefile delete mode 100644 libs/gtkmm2/tools/Makefile.am delete mode 100644 libs/gtkmm2/tools/Makefile.in delete mode 100644 libs/gtkmm2/tools/Makefile_list_of_sources.am_fragment delete mode 100644 libs/gtkmm2/tools/README delete mode 100644 libs/gtkmm2/tools/TODO delete mode 100644 libs/gtkmm2/tools/extra_defs_gen/Makefile.am delete mode 100644 libs/gtkmm2/tools/extra_defs_gen/Makefile.in delete mode 100644 libs/gtkmm2/tools/extra_defs_gen/generate_defs_gtk.cc delete mode 100644 libs/gtkmm2/tools/m4/Makefile.am delete mode 100644 libs/gtkmm2/tools/m4/Makefile.in delete mode 100644 libs/gtkmm2/tools/m4/Makefile_list_of_sources.am_fragment delete mode 100644 libs/gtkmm2/tools/m4/convert.m4 delete mode 100644 libs/gtkmm2/tools/m4/convert_atk.m4 delete mode 100644 libs/gtkmm2/tools/m4/convert_gdk.m4 delete mode 100644 libs/gtkmm2/tools/m4/convert_gtk.m4 delete mode 100644 libs/gtkmm2/tools/m4/convert_gtkmm.m4 delete mode 100644 libs/gtkmm2/tools/m4/convert_pango.m4 delete mode 100644 libs/gtkmm2ext/.cvsignore delete mode 100644 libs/gtkmm2ext/AUTHORS delete mode 100644 libs/gtkmm2ext/COPYING delete mode 100644 libs/gtkmm2ext/ChangeLog delete mode 100644 libs/gtkmm2ext/NEWS delete mode 100644 libs/gtkmm2ext/README delete mode 100644 libs/gtkmm2ext/SConscript delete mode 100644 libs/gtkmm2ext/auto_spin.cc delete mode 100644 libs/gtkmm2ext/barcontroller.cc delete mode 100644 libs/gtkmm2ext/bindable_button.cc delete mode 100644 libs/gtkmm2ext/binding_proxy.cc delete mode 100644 libs/gtkmm2ext/choice.cc delete mode 100644 libs/gtkmm2ext/click_box.cc delete mode 100644 libs/gtkmm2ext/dndtreeview.cc delete mode 100644 libs/gtkmm2ext/fastmeter.cc delete mode 100644 libs/gtkmm2ext/focus_entry.cc delete mode 100644 libs/gtkmm2ext/gettext.h delete mode 100644 libs/gtkmm2ext/grouped_buttons.cc delete mode 100644 libs/gtkmm2ext/gtk_ui.cc delete mode 100644 libs/gtkmm2ext/gtkmm2ext/.cvsignore delete mode 100644 libs/gtkmm2ext/gtkmm2ext/auto_spin.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/barcontroller.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/bindable_button.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/binding_proxy.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/choice.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/click_box.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/dndtreeview.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/doi.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/fastmeter.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/focus_entry.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/grouped_buttons.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/gtk_ui.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/gtkutils.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/hexentry.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/pathlist.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/pixfader.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/pixscroller.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/popup.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/prompter.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/scroomer.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/selector.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/slider_controller.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/stateful_button.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/stop_signal.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/sync-menu.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/tearoff.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/textviewer.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/utils.h delete mode 100644 libs/gtkmm2ext/gtkmm2ext/window_title.h delete mode 100644 libs/gtkmm2ext/gtkutils.cc delete mode 100644 libs/gtkmm2ext/hexentry.cc delete mode 100644 libs/gtkmm2ext/i18n.h delete mode 100644 libs/gtkmm2ext/idle_adjustment.cc delete mode 100644 libs/gtkmm2ext/libgtkmm2ext.pc.in delete mode 100644 libs/gtkmm2ext/libgtkmm2ext.spec.in delete mode 100644 libs/gtkmm2ext/pathlist.cc delete mode 100644 libs/gtkmm2ext/pixfader.cc delete mode 100644 libs/gtkmm2ext/pixscroller.cc delete mode 100644 libs/gtkmm2ext/po/el_GR.po delete mode 100644 libs/gtkmm2ext/po/es_ES.po delete mode 100644 libs/gtkmm2ext/po/pl_PL.po delete mode 100644 libs/gtkmm2ext/po/pt_BR.po delete mode 100644 libs/gtkmm2ext/po/ru_RU.po delete mode 100644 libs/gtkmm2ext/popup.cc delete mode 100644 libs/gtkmm2ext/prompter.cc delete mode 100644 libs/gtkmm2ext/scroomer.cc delete mode 100644 libs/gtkmm2ext/selector.cc delete mode 100644 libs/gtkmm2ext/slider_controller.cc delete mode 100644 libs/gtkmm2ext/stateful_button.cc delete mode 100644 libs/gtkmm2ext/sync-menu.c delete mode 100644 libs/gtkmm2ext/tearoff.cc delete mode 100644 libs/gtkmm2ext/textviewer.cc delete mode 100644 libs/gtkmm2ext/utils.cc delete mode 100644 libs/gtkmm2ext/window_title.cc delete mode 100644 libs/libgnomecanvasmm/.DS_Store delete mode 100644 libs/libgnomecanvasmm/.cvsignore delete mode 100644 libs/libgnomecanvasmm/AUTHORS delete mode 100644 libs/libgnomecanvasmm/COPYING delete mode 100644 libs/libgnomecanvasmm/ChangeLog delete mode 100644 libs/libgnomecanvasmm/NEWS delete mode 100644 libs/libgnomecanvasmm/README delete mode 100644 libs/libgnomecanvasmm/SConscript delete mode 100644 libs/libgnomecanvasmm/TODO delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/.DS_Store delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/.cvsignore delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/bpath.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/bpath.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/canvas.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/canvas.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/group.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/group.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/init.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/init.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/item.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/item.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/line.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/line.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/path-def.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/path-def.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/point.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/point.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/polygon.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/polygon.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/bpath_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/canvas_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/ellipse_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/group_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/item_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/line_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/path-def_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/pixbuf_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/polygon_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/rect-ellipse_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/rect_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/rich-text_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/shape_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/text_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/private/widget_p.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/properties.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/properties.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/rect.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/rect.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/shape.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/shape.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/text.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/text.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/widget.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/widget.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.cc delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.h delete mode 100644 libs/libgnomecanvasmm/libgnomecanvasmmconfig.h delete mode 100644 libs/libsndfile/AUTHORS delete mode 100644 libs/libsndfile/ChangeLog delete mode 100755 libs/libsndfile/Mingw-make-dist.sh delete mode 100644 libs/libsndfile/NEWS delete mode 100644 libs/libsndfile/README delete mode 100644 libs/libsndfile/SConscript delete mode 100644 libs/libsndfile/acinclude.m4 delete mode 100644 libs/libsndfile/aclocal.m4 delete mode 100755 libs/libsndfile/compile delete mode 100755 libs/libsndfile/config.guess delete mode 100755 libs/libsndfile/config.sub delete mode 100755 libs/libsndfile/configure delete mode 100644 libs/libsndfile/configure.ac delete mode 100755 libs/libsndfile/depcomp delete mode 100755 libs/libsndfile/install-sh delete mode 100644 libs/libsndfile/libsndfile.spec.in delete mode 100755 libs/libsndfile/missing delete mode 100755 libs/libsndfile/mkinstalldirs delete mode 100644 libs/libsndfile/sndfile.pc.in delete mode 100644 libs/libsndfile/src/G72x/ChangeLog delete mode 100644 libs/libsndfile/src/G72x/README delete mode 100644 libs/libsndfile/src/G72x/README.original delete mode 100644 libs/libsndfile/src/G72x/g721.c delete mode 100644 libs/libsndfile/src/G72x/g723_16.c delete mode 100644 libs/libsndfile/src/G72x/g723_24.c delete mode 100644 libs/libsndfile/src/G72x/g723_40.c delete mode 100644 libs/libsndfile/src/G72x/g72x.c delete mode 100644 libs/libsndfile/src/G72x/g72x.h delete mode 100644 libs/libsndfile/src/G72x/g72x_priv.h delete mode 100644 libs/libsndfile/src/G72x/g72x_test.c delete mode 100644 libs/libsndfile/src/GSM610/COPYRIGHT delete mode 100644 libs/libsndfile/src/GSM610/ChangeLog delete mode 100644 libs/libsndfile/src/GSM610/README delete mode 100644 libs/libsndfile/src/GSM610/add.c delete mode 100644 libs/libsndfile/src/GSM610/code.c delete mode 100644 libs/libsndfile/src/GSM610/config.h delete mode 100644 libs/libsndfile/src/GSM610/decode.c delete mode 100644 libs/libsndfile/src/GSM610/gsm.h delete mode 100644 libs/libsndfile/src/GSM610/gsm610_priv.h delete mode 100644 libs/libsndfile/src/GSM610/gsm_create.c delete mode 100644 libs/libsndfile/src/GSM610/gsm_decode.c delete mode 100644 libs/libsndfile/src/GSM610/gsm_destroy.c delete mode 100644 libs/libsndfile/src/GSM610/gsm_encode.c delete mode 100644 libs/libsndfile/src/GSM610/gsm_option.c delete mode 100644 libs/libsndfile/src/GSM610/long_term.c delete mode 100644 libs/libsndfile/src/GSM610/lpc.c delete mode 100644 libs/libsndfile/src/GSM610/preprocess.c delete mode 100644 libs/libsndfile/src/GSM610/rpe.c delete mode 100644 libs/libsndfile/src/GSM610/short_term.c delete mode 100644 libs/libsndfile/src/GSM610/table.c delete mode 100644 libs/libsndfile/src/Symbols.darwin delete mode 100644 libs/libsndfile/src/Symbols.linux delete mode 100644 libs/libsndfile/src/aiff.c delete mode 100644 libs/libsndfile/src/alaw.c delete mode 100644 libs/libsndfile/src/au.c delete mode 100644 libs/libsndfile/src/avr.c delete mode 100644 libs/libsndfile/src/broadcast.c delete mode 100644 libs/libsndfile/src/caf.c delete mode 100644 libs/libsndfile/src/command.c delete mode 100644 libs/libsndfile/src/common.c delete mode 100644 libs/libsndfile/src/common.h delete mode 100644 libs/libsndfile/src/config.h.in delete mode 100644 libs/libsndfile/src/cygsndfile.def delete mode 100644 libs/libsndfile/src/dither.c delete mode 100644 libs/libsndfile/src/double64.c delete mode 100644 libs/libsndfile/src/dwd.c delete mode 100644 libs/libsndfile/src/dwvw.c delete mode 100644 libs/libsndfile/src/file_io.c delete mode 100644 libs/libsndfile/src/flac.c delete mode 100644 libs/libsndfile/src/float32.c delete mode 100644 libs/libsndfile/src/float_cast.h delete mode 100644 libs/libsndfile/src/g72x.c delete mode 100644 libs/libsndfile/src/gsm610.c delete mode 100644 libs/libsndfile/src/htk.c delete mode 100644 libs/libsndfile/src/ima_adpcm.c delete mode 100644 libs/libsndfile/src/interleave.c delete mode 100644 libs/libsndfile/src/ircam.c delete mode 100644 libs/libsndfile/src/libsndfile.def delete mode 100644 libs/libsndfile/src/macbinary3.c delete mode 100644 libs/libsndfile/src/macos.c delete mode 100644 libs/libsndfile/src/mat4.c delete mode 100644 libs/libsndfile/src/mat5.c delete mode 100644 libs/libsndfile/src/ms_adpcm.c delete mode 100644 libs/libsndfile/src/nist.c delete mode 100644 libs/libsndfile/src/ogg.c delete mode 100644 libs/libsndfile/src/paf.c delete mode 100644 libs/libsndfile/src/pcm.c delete mode 100644 libs/libsndfile/src/pvf.c delete mode 100644 libs/libsndfile/src/raw.c delete mode 100644 libs/libsndfile/src/rx2.c delete mode 100644 libs/libsndfile/src/sd2.c delete mode 100644 libs/libsndfile/src/sds.c delete mode 100644 libs/libsndfile/src/sf_unistd.h delete mode 100644 libs/libsndfile/src/sfconfig.h delete mode 100644 libs/libsndfile/src/sfendian.h delete mode 100644 libs/libsndfile/src/sndfile.c delete mode 100644 libs/libsndfile/src/sndfile.h.in delete mode 100644 libs/libsndfile/src/stamp-h1 delete mode 100644 libs/libsndfile/src/strings.c delete mode 100644 libs/libsndfile/src/svx.c delete mode 100644 libs/libsndfile/src/txw.c delete mode 100644 libs/libsndfile/src/ulaw.c delete mode 100644 libs/libsndfile/src/voc.c delete mode 100644 libs/libsndfile/src/vox_adpcm.c delete mode 100644 libs/libsndfile/src/w64.c delete mode 100644 libs/libsndfile/src/wav.c delete mode 100644 libs/libsndfile/src/wav_w64.c delete mode 100644 libs/libsndfile/src/wav_w64.h delete mode 100644 libs/libsndfile/src/wve.c delete mode 100644 libs/libsndfile/src/xi.c delete mode 100644 libs/midi++2/.cvsignore delete mode 100644 libs/midi++2/AUTHORS delete mode 100644 libs/midi++2/COPYING delete mode 100644 libs/midi++2/ChangeLog delete mode 100644 libs/midi++2/NEWS delete mode 100644 libs/midi++2/README delete mode 100644 libs/midi++2/SConscript delete mode 100644 libs/midi++2/alsa_sequencer_midiport.cc delete mode 100644 libs/midi++2/coremidi_midiport.cc delete mode 100644 libs/midi++2/event.cc delete mode 100644 libs/midi++2/fd_midiport.cc delete mode 100644 libs/midi++2/fifomidi.cc delete mode 100644 libs/midi++2/jack_midiport.cc delete mode 100644 libs/midi++2/libmidi++.pc.in delete mode 100644 libs/midi++2/libmidi++.spec.in delete mode 100644 libs/midi++2/macosx/English.lproj/InfoPlist.strings delete mode 100644 libs/midi++2/macosx/Info.plist delete mode 100644 libs/midi++2/macosx/midi++.xcodeproj/project.pbxproj delete mode 100644 libs/midi++2/macosx/midi++_Prefix.pch delete mode 100644 libs/midi++2/macosx/version.cc delete mode 100644 libs/midi++2/macosx/version.h delete mode 100644 libs/midi++2/midi++/.DS_Store delete mode 100644 libs/midi++2/midi++/.cvsignore delete mode 100644 libs/midi++2/midi++/alsa_rawmidi.h delete mode 100644 libs/midi++2/midi++/alsa_sequencer.h delete mode 100644 libs/midi++2/midi++/channel.h delete mode 100644 libs/midi++2/midi++/coremidi_midiport.h delete mode 100644 libs/midi++2/midi++/event.h delete mode 100644 libs/midi++2/midi++/events.h delete mode 100644 libs/midi++2/midi++/factory.h delete mode 100644 libs/midi++2/midi++/fd_midiport.h delete mode 100644 libs/midi++2/midi++/fifomidi.h delete mode 100644 libs/midi++2/midi++/jack.h delete mode 100644 libs/midi++2/midi++/manager.h delete mode 100644 libs/midi++2/midi++/midnam_patch.h delete mode 100644 libs/midi++2/midi++/mmc.h delete mode 100644 libs/midi++2/midi++/names.h delete mode 100644 libs/midi++2/midi++/nullmidi.h delete mode 100644 libs/midi++2/midi++/parser.h delete mode 100644 libs/midi++2/midi++/port.h delete mode 100644 libs/midi++2/midi++/types.h delete mode 100644 libs/midi++2/midi.cc delete mode 100644 libs/midi++2/midichannel.cc delete mode 100644 libs/midi++2/midifactory.cc delete mode 100644 libs/midi++2/midimanager.cc delete mode 100644 libs/midi++2/midiparser.cc delete mode 100644 libs/midi++2/midiport.cc delete mode 100644 libs/midi++2/miditrace.cc delete mode 100644 libs/midi++2/midnam_patch.cc delete mode 100644 libs/midi++2/mmc.cc delete mode 100644 libs/midi++2/mmctest.cc delete mode 100644 libs/midi++2/mtc.cc delete mode 100644 libs/pbd/.cvsignore delete mode 100644 libs/pbd/AUTHORS delete mode 100644 libs/pbd/COPYING delete mode 100644 libs/pbd/ChangeLog delete mode 100644 libs/pbd/NEWS delete mode 100644 libs/pbd/README delete mode 100644 libs/pbd/SConscript delete mode 100644 libs/pbd/base_ui.cc delete mode 100644 libs/pbd/basename.cc delete mode 100644 libs/pbd/boost-debug/shared_ptr.hpp delete mode 100644 libs/pbd/command.cc delete mode 100644 libs/pbd/controllable.cc delete mode 100644 libs/pbd/convert.cc delete mode 100644 libs/pbd/dmalloc.cc delete mode 100644 libs/pbd/enumwriter.cc delete mode 100644 libs/pbd/error.cc delete mode 100644 libs/pbd/file_utils.cc delete mode 100644 libs/pbd/filesystem.cc delete mode 100644 libs/pbd/filesystem_paths.cc delete mode 100644 libs/pbd/fpu.cc delete mode 100644 libs/pbd/gettext.h delete mode 100644 libs/pbd/i18n.h delete mode 100644 libs/pbd/id.cc delete mode 100644 libs/pbd/libpbd.pc.in delete mode 100644 libs/pbd/libpbd.spec.in delete mode 100644 libs/pbd/macosx/English.lproj/InfoPlist.strings delete mode 100644 libs/pbd/macosx/Info.plist delete mode 100644 libs/pbd/macosx/pbd.xcodeproj/project.pbxproj delete mode 100644 libs/pbd/macosx/pbd_Prefix.pch delete mode 100644 libs/pbd/macosx/version.cc delete mode 100644 libs/pbd/macosx/version.h delete mode 100644 libs/pbd/mountpoint.cc delete mode 100644 libs/pbd/pathscanner.cc delete mode 100644 libs/pbd/pbd/.DS_Store delete mode 100644 libs/pbd/pbd/.cvsignore delete mode 100644 libs/pbd/pbd/abstract_ui.cc delete mode 100644 libs/pbd/pbd/abstract_ui.h delete mode 100644 libs/pbd/pbd/base_ui.h delete mode 100644 libs/pbd/pbd/basename.h delete mode 100644 libs/pbd/pbd/command.h delete mode 100644 libs/pbd/pbd/compose.h delete mode 100644 libs/pbd/pbd/controllable.h delete mode 100644 libs/pbd/pbd/convert.h delete mode 100644 libs/pbd/pbd/crossthread.h delete mode 100644 libs/pbd/pbd/destructible.h delete mode 100644 libs/pbd/pbd/enumwriter.h delete mode 100644 libs/pbd/pbd/error.h delete mode 100644 libs/pbd/pbd/failed_constructor.h delete mode 100644 libs/pbd/pbd/fastlog.h delete mode 100644 libs/pbd/pbd/file_utils.h delete mode 100644 libs/pbd/pbd/filesystem.h delete mode 100644 libs/pbd/pbd/filesystem_paths.h delete mode 100644 libs/pbd/pbd/forkexec.h delete mode 100644 libs/pbd/pbd/fpu.h delete mode 100644 libs/pbd/pbd/functor_command.h delete mode 100644 libs/pbd/pbd/id.h delete mode 100644 libs/pbd/pbd/mathfix.h delete mode 100644 libs/pbd/pbd/memento_command.h delete mode 100644 libs/pbd/pbd/mountpoint.h delete mode 100644 libs/pbd/pbd/pathscanner.h delete mode 100644 libs/pbd/pbd/pool.h delete mode 100644 libs/pbd/pbd/pthread_utils.h delete mode 100644 libs/pbd/pbd/rcu.h delete mode 100644 libs/pbd/pbd/receiver.h delete mode 100644 libs/pbd/pbd/replace_all.h delete mode 100644 libs/pbd/pbd/ringbuffer.h delete mode 100644 libs/pbd/pbd/ringbufferNPT.h delete mode 100644 libs/pbd/pbd/search_path.h delete mode 100644 libs/pbd/pbd/selectable.h delete mode 100644 libs/pbd/pbd/shiva.h delete mode 100644 libs/pbd/pbd/shortpath.h delete mode 100644 libs/pbd/pbd/stacktrace.h delete mode 100644 libs/pbd/pbd/stateful.h delete mode 100644 libs/pbd/pbd/statefuldestructible.h delete mode 100644 libs/pbd/pbd/stl_delete.h delete mode 100644 libs/pbd/pbd/stl_functors.h delete mode 100644 libs/pbd/pbd/strsplit.h delete mode 100644 libs/pbd/pbd/textreceiver.h delete mode 100644 libs/pbd/pbd/thrown_error.h delete mode 100644 libs/pbd/pbd/tokenizer.h delete mode 100644 libs/pbd/pbd/touchable.h delete mode 100644 libs/pbd/pbd/transmitter.h delete mode 100644 libs/pbd/pbd/undo.h delete mode 100644 libs/pbd/pbd/unknown_type.h delete mode 100644 libs/pbd/pbd/whitespace.h delete mode 100644 libs/pbd/pbd/xml++.h delete mode 100644 libs/pbd/pool.cc delete mode 100644 libs/pbd/pthread_utils.cc delete mode 100644 libs/pbd/receiver.cc delete mode 100644 libs/pbd/search_path.cc delete mode 100644 libs/pbd/shortpath.cc delete mode 100644 libs/pbd/stacktrace.cc delete mode 100644 libs/pbd/stateful.cc delete mode 100644 libs/pbd/strreplace.cc delete mode 100644 libs/pbd/strsplit.cc delete mode 100644 libs/pbd/tests/Makefile delete mode 100755 libs/pbd/tests/ProtoolsPatchFile.midnam delete mode 100644 libs/pbd/tests/RosegardenPatchFile.xml delete mode 100644 libs/pbd/tests/TestSession.ardour delete mode 100644 libs/pbd/tests/xpath.cc delete mode 100644 libs/pbd/textreceiver.cc delete mode 100644 libs/pbd/transmitter.cc delete mode 100644 libs/pbd/undo.cc delete mode 100644 libs/pbd/whitespace.cc delete mode 100644 libs/pbd/xml++.cc delete mode 100644 libs/soundtouch/.cvsignore delete mode 100644 libs/soundtouch/3dnow_win.cpp delete mode 100644 libs/soundtouch/AAFilter.cpp delete mode 100644 libs/soundtouch/AAFilter.h delete mode 100644 libs/soundtouch/BPMDetect.h delete mode 100644 libs/soundtouch/COPYING delete mode 100644 libs/soundtouch/FIFOSampleBuffer.cpp delete mode 100644 libs/soundtouch/FIFOSampleBuffer.h delete mode 100644 libs/soundtouch/FIFOSamplePipe.h delete mode 100644 libs/soundtouch/FIRFilter.cpp delete mode 100644 libs/soundtouch/FIRFilter.h delete mode 100644 libs/soundtouch/README delete mode 100644 libs/soundtouch/RateTransposer.cpp delete mode 100644 libs/soundtouch/RateTransposer.h delete mode 100644 libs/soundtouch/SConscript delete mode 100644 libs/soundtouch/STTypes.h delete mode 100644 libs/soundtouch/SoundTouch.cpp delete mode 100644 libs/soundtouch/SoundTouch.h delete mode 100644 libs/soundtouch/TDStretch.cpp delete mode 100644 libs/soundtouch/TDStretch.h delete mode 100644 libs/soundtouch/cpu_detect.h delete mode 100644 libs/soundtouch/cpu_detect_x86_gcc.cpp delete mode 100644 libs/soundtouch/cpu_detect_x86_win.cpp delete mode 100644 libs/soundtouch/mmx_gcc.cpp delete mode 100644 libs/soundtouch/mmx_win.cpp delete mode 100644 libs/soundtouch/sse_win.cpp delete mode 100644 libs/surfaces/control_protocol/SConscript delete mode 100644 libs/surfaces/control_protocol/basic_ui.cc delete mode 100644 libs/surfaces/control_protocol/control_protocol.cc delete mode 100644 libs/surfaces/control_protocol/control_protocol/basic_ui.h delete mode 100644 libs/surfaces/control_protocol/control_protocol/control_protocol.h delete mode 100644 libs/surfaces/control_protocol/control_protocol/smpte.h delete mode 100644 libs/surfaces/control_protocol/smpte.cc delete mode 100644 libs/surfaces/frontier/kernel_drivers/BUILD delete mode 100644 libs/surfaces/frontier/kernel_drivers/Makefile delete mode 100644 libs/surfaces/frontier/kernel_drivers/README delete mode 100644 libs/surfaces/frontier/kernel_drivers/doc/keycodes.html delete mode 100644 libs/surfaces/frontier/kernel_drivers/tests/Makefile delete mode 100644 libs/surfaces/frontier/kernel_drivers/tests/README delete mode 100644 libs/surfaces/frontier/kernel_drivers/tests/tranzport.c delete mode 100644 libs/surfaces/frontier/kernel_drivers/tests/tranzport_lights.c delete mode 100755 libs/surfaces/frontier/kernel_drivers/tests/tranzport_tests.sh delete mode 100644 libs/surfaces/frontier/kernel_drivers/tranzport.c delete mode 100644 libs/surfaces/frontier/tests/Makefile delete mode 100644 libs/surfaces/frontier/tests/README delete mode 100644 libs/surfaces/frontier/tests/tranzport.c delete mode 100644 libs/surfaces/frontier/tests/tranzport_lights.c delete mode 100644 libs/surfaces/frontier/tranzport/SConscript delete mode 100644 libs/surfaces/frontier/tranzport/interface.cc delete mode 100644 libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc delete mode 100644 libs/surfaces/frontier/tranzport/tranzport_control_protocol.h delete mode 100644 libs/surfaces/generic_midi/.cvsignore delete mode 100644 libs/surfaces/generic_midi/SConscript delete mode 100644 libs/surfaces/generic_midi/generic_midi_control_protocol.cc delete mode 100644 libs/surfaces/generic_midi/generic_midi_control_protocol.h delete mode 100644 libs/surfaces/generic_midi/interface.cc delete mode 100644 libs/surfaces/generic_midi/midicontrollable.cc delete mode 100644 libs/surfaces/generic_midi/midicontrollable.h delete mode 100644 libs/surfaces/mackie/SConscript delete mode 100644 libs/surfaces/mackie/TODO delete mode 100644 libs/surfaces/mackie/bcf_surface.cc delete mode 100644 libs/surfaces/mackie/bcf_surface.h delete mode 100644 libs/surfaces/mackie/controls.cc delete mode 100644 libs/surfaces/mackie/controls.h delete mode 100644 libs/surfaces/mackie/interface.cc delete mode 100644 libs/surfaces/mackie/mackie_button_handler.cc delete mode 100644 libs/surfaces/mackie/mackie_button_handler.h delete mode 100644 libs/surfaces/mackie/mackie_control_exception.h delete mode 100644 libs/surfaces/mackie/mackie_control_protocol.cc delete mode 100644 libs/surfaces/mackie/mackie_control_protocol.h delete mode 100644 libs/surfaces/mackie/mackie_control_protocol_poll.cc delete mode 100644 libs/surfaces/mackie/mackie_midi_builder.cc delete mode 100644 libs/surfaces/mackie/mackie_midi_builder.h delete mode 100644 libs/surfaces/mackie/mackie_port.cc delete mode 100644 libs/surfaces/mackie/mackie_port.h delete mode 100644 libs/surfaces/mackie/mackie_surface.cc delete mode 100644 libs/surfaces/mackie/mackie_surface.h delete mode 100644 libs/surfaces/mackie/midi_byte_array.cc delete mode 100644 libs/surfaces/mackie/midi_byte_array.h delete mode 100644 libs/surfaces/mackie/route_signal.cc delete mode 100644 libs/surfaces/mackie/route_signal.h delete mode 100644 libs/surfaces/mackie/scripts/bank.rb delete mode 100644 libs/surfaces/mackie/scripts/bcf-controls.csv delete mode 100644 libs/surfaces/mackie/scripts/controls.rb delete mode 100755 libs/surfaces/mackie/scripts/dump.rb delete mode 100644 libs/surfaces/mackie/scripts/generate-button-handlers-cc.erb delete mode 100644 libs/surfaces/mackie/scripts/generate-button-handlers-h.erb delete mode 100755 libs/surfaces/mackie/scripts/generate-surface.rb delete mode 100755 libs/surfaces/mackie/scripts/host.rb delete mode 100644 libs/surfaces/mackie/scripts/mackie-controls.csv delete mode 100644 libs/surfaces/mackie/scripts/mackie.rb delete mode 100644 libs/surfaces/mackie/scripts/parse.rb delete mode 100644 libs/surfaces/mackie/scripts/signals.rb delete mode 100644 libs/surfaces/mackie/scripts/simple_host.rb delete mode 100644 libs/surfaces/mackie/scripts/surface-cc-template.erb delete mode 100644 libs/surfaces/mackie/scripts/surface-h-template.erb delete mode 100755 libs/surfaces/mackie/scripts/test_controls.rb delete mode 100644 libs/surfaces/mackie/scripts/transform.rb delete mode 100644 libs/surfaces/mackie/scripts/write.rb delete mode 100644 libs/surfaces/mackie/surface.cc delete mode 100644 libs/surfaces/mackie/surface.h delete mode 100644 libs/surfaces/mackie/surface_port.cc delete mode 100644 libs/surfaces/mackie/surface_port.h delete mode 100644 libs/surfaces/mackie/test.cc delete mode 100644 libs/surfaces/mackie/types.cc delete mode 100644 libs/surfaces/mackie/types.h delete mode 100644 libs/surfaces/powermate/README delete mode 100644 libs/surfaces/powermate/SConscript delete mode 100644 libs/surfaces/powermate/interface.cc delete mode 100644 libs/surfaces/powermate/powermate.cc delete mode 100644 libs/surfaces/powermate/powermate.h delete mode 100644 libs/surfaces/tranzport/.cvsignore delete mode 100644 libs/surfaces/tranzport/README delete mode 100644 libs/surfaces/tranzport/SConscript delete mode 100644 libs/surfaces/tranzport/TODO delete mode 100644 libs/surfaces/tranzport/bling.cc delete mode 100644 libs/surfaces/tranzport/button_events.cc delete mode 100644 libs/surfaces/tranzport/button_yn.cc delete mode 100644 libs/surfaces/tranzport/buttons.cc delete mode 100644 libs/surfaces/tranzport/general.cc delete mode 100644 libs/surfaces/tranzport/init.cc delete mode 100644 libs/surfaces/tranzport/interface.cc delete mode 100644 libs/surfaces/tranzport/io.cc delete mode 100644 libs/surfaces/tranzport/io_kernel.cc delete mode 100644 libs/surfaces/tranzport/io_midi.cc delete mode 100644 libs/surfaces/tranzport/io_usb.cc delete mode 100644 libs/surfaces/tranzport/lcd.cc delete mode 100644 libs/surfaces/tranzport/lights.cc delete mode 100644 libs/surfaces/tranzport/meter.cc delete mode 100644 libs/surfaces/tranzport/mode.cc delete mode 100644 libs/surfaces/tranzport/mode_loop.cc delete mode 100644 libs/surfaces/tranzport/mode_tuner.cc delete mode 100644 libs/surfaces/tranzport/panner.cc delete mode 100644 libs/surfaces/tranzport/screen.cc delete mode 100644 libs/surfaces/tranzport/show.cc delete mode 100644 libs/surfaces/tranzport/slider_gain.h delete mode 100644 libs/surfaces/tranzport/state.cc delete mode 100644 libs/surfaces/tranzport/tranzport_base.h delete mode 100644 libs/surfaces/tranzport/tranzport_common.h delete mode 100644 libs/surfaces/tranzport/tranzport_control_protocol.h delete mode 100644 libs/surfaces/tranzport/view_automation.cc delete mode 100644 libs/surfaces/tranzport/view_bigmeter.cc delete mode 100644 libs/surfaces/tranzport/view_bling.cc delete mode 100644 libs/surfaces/tranzport/view_bus.cc delete mode 100644 libs/surfaces/tranzport/view_config.cc delete mode 100644 libs/surfaces/tranzport/view_layer.cc delete mode 100644 libs/surfaces/tranzport/view_loop.cc delete mode 100644 libs/surfaces/tranzport/view_manymeter.cc delete mode 100644 libs/surfaces/tranzport/view_marker.cc delete mode 100644 libs/surfaces/tranzport/view_master.cc delete mode 100644 libs/surfaces/tranzport/view_plugins.cc delete mode 100644 libs/surfaces/tranzport/view_std.cc delete mode 100644 libs/surfaces/tranzport/view_tempo.cc delete mode 100644 libs/surfaces/tranzport/view_tuner.cc delete mode 100644 libs/surfaces/tranzport/wheel.cc delete mode 100644 libs/surfaces/tranzport/wheel_modes.cc delete mode 100644 libs/vamp-plugins/AmplitudeFollower.cpp delete mode 100644 libs/vamp-plugins/AmplitudeFollower.h delete mode 100644 libs/vamp-plugins/PercussionOnsetDetector.cpp delete mode 100644 libs/vamp-plugins/PercussionOnsetDetector.h delete mode 100644 libs/vamp-plugins/SConscript delete mode 100644 libs/vamp-plugins/SpectralCentroid.cpp delete mode 100644 libs/vamp-plugins/SpectralCentroid.h delete mode 100644 libs/vamp-plugins/ZeroCrossing.cpp delete mode 100644 libs/vamp-plugins/ZeroCrossing.h delete mode 100644 libs/vamp-plugins/plugins.cpp delete mode 100644 libs/vamp-sdk/COPYING delete mode 100644 libs/vamp-sdk/README delete mode 100644 libs/vamp-sdk/SConscript delete mode 100644 libs/vamp-sdk/vamp-sdk/Plugin.h delete mode 100644 libs/vamp-sdk/vamp-sdk/PluginAdapter.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/PluginAdapter.h delete mode 100644 libs/vamp-sdk/vamp-sdk/PluginBase.h delete mode 100644 libs/vamp-sdk/vamp-sdk/PluginHostAdapter.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/PluginHostAdapter.h delete mode 100644 libs/vamp-sdk/vamp-sdk/RealTime.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/RealTime.h delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginBufferingAdapter.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginBufferingAdapter.h delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginChannelAdapter.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginChannelAdapter.h delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginInputDomainAdapter.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginInputDomainAdapter.h delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginLoader.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginLoader.h delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginWrapper.cpp delete mode 100644 libs/vamp-sdk/vamp-sdk/hostext/PluginWrapper.h delete mode 100644 libs/vamp-sdk/vamp-sdk/libvamp-hostsdk.la.in delete mode 100644 libs/vamp-sdk/vamp-sdk/libvamp-sdk.la.in delete mode 100644 libs/vamp-sdk/vamp/vamp.h delete mode 100644 libs/vamp-sdk/vamp/vamp.pc.in diff --git a/libs/.cvsignore b/libs/.cvsignore deleted file mode 100644 index e43b0f9889..0000000000 --- a/libs/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store diff --git a/libs/appleutility/AUOutputBL.cpp b/libs/appleutility/AUOutputBL.cpp deleted file mode 100644 index 8509f46288..0000000000 --- a/libs/appleutility/AUOutputBL.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - AUOutputBL.h - -=============================================================================*/ -#include "AUOutputBL.h" - -/* -struct AudioBufferList -{ - UInt32 mNumberBuffers; - AudioBuffer mBuffers[1]; -}; -struct AudioBuffer -{ - UInt32 mNumberChannels; // number of interleaved channels in the buffer - UInt32 mDataByteSize; // the size of the buffer pointed to by mData - void* mData; // the pointer to the buffer -}; -*/ - -AUOutputBL::AUOutputBL (const CAStreamBasicDescription &inDesc, UInt32 inDefaultNumFrames) - : mFormat (inDesc), - mBufferMemory(NULL), - mBufferList (NULL), - mNumberBuffers (0), // keep this here, so can ensure integrity of ABL - mBufferSize (0), - mFrames(inDefaultNumFrames) -{ - mNumberBuffers = mFormat.IsInterleaved() ? 1 : mFormat.NumberChannels(); - mBufferList = reinterpret_cast(new Byte[sizeof(UInt32) + (mNumberBuffers * sizeof(AudioBuffer))]); -} - -AUOutputBL::~AUOutputBL() -{ - if (mBufferMemory) - delete[] mBufferMemory; - - if (mBufferList) - delete [] mBufferList; -} - -void AUOutputBL::Prepare (UInt32 inNumFrames, bool inWantNullBufferIfAllocated) -{ - UInt32 channelsPerBuffer = mFormat.IsInterleaved() ? mFormat.NumberChannels() : 1; - - if (mBufferMemory == NULL || inWantNullBufferIfAllocated) - { - mBufferList->mNumberBuffers = mNumberBuffers; - AudioBuffer *buf = &mBufferList->mBuffers[0]; - for (UInt32 i = 0; i < mNumberBuffers; ++i, ++buf) { - buf->mNumberChannels = channelsPerBuffer; - buf->mDataByteSize = mFormat.FramesToBytes (inNumFrames); - buf->mData = NULL; - } - } - else - { - UInt32 nBytes = mFormat.FramesToBytes (inNumFrames); - if ((nBytes * mNumberBuffers) > AllocatedBytes()) - throw OSStatus(-10874);//(kAudioUnitErr_TooManyFramesToProcess); - - mBufferList->mNumberBuffers = mNumberBuffers; - AudioBuffer *buf = &mBufferList->mBuffers[0]; - Byte* p = mBufferMemory; - for (UInt32 i = 0; i < mNumberBuffers; ++i, ++buf) { - buf->mNumberChannels = channelsPerBuffer; - buf->mDataByteSize = nBytes; - buf->mData = p; - p += mBufferSize; - } - } -} - - -void AUOutputBL::Allocate (UInt32 inNumFrames) -{ - if (inNumFrames) - { - UInt32 nBytes = mFormat.FramesToBytes (inNumFrames); - - if (nBytes <= AllocatedBytes()) - return; - - // align successive buffers for Altivec and to take alternating - // cache line hits by spacing them by odd multiples of 16 - if (mNumberBuffers > 1) - nBytes = (nBytes + (0x10 - (nBytes & 0xF))) | 0x10; - - mBufferSize = nBytes; - - UInt32 memorySize = mBufferSize * mNumberBuffers; - Byte *newMemory = new Byte[memorySize]; - memset(newMemory, 0, memorySize); // make buffer "hot" - - Byte *oldMemory = mBufferMemory; - mBufferMemory = newMemory; - delete[] oldMemory; - - mFrames = inNumFrames; - } - else - { - if (mBufferMemory) { - delete [] mBufferMemory; - mBufferMemory = NULL; - } - mBufferSize = 0; - mFrames = 0; - } -} - -#if DEBUG -void AUOutputBL::Print() -{ - printf ("AUOutputBL::Print\n"); - mFormat.Print(); - printf ("Num Buffers:%ld, mFrames:%ld, allocatedMemory:%c\n", mBufferList->mNumberBuffers, mFrames, (mBufferMemory != NULL ? 'T' : 'F')); - AudioBuffer *buf = &mBufferList->mBuffers[0]; - for (UInt32 i = 0; i < mBufferList->mNumberBuffers; ++i, ++buf) - printf ("\tBuffer:%ld, Size:%ld, Chans:%ld, Buffer:%X\n", i, buf->mDataByteSize, buf->mNumberChannels, int(buf->mData)); -} -#endif - diff --git a/libs/appleutility/AUOutputBL.h b/libs/appleutility/AUOutputBL.h deleted file mode 100644 index b80588abac..0000000000 --- a/libs/appleutility/AUOutputBL.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - AUOutputBL.h - -=============================================================================*/ - -#ifndef __AUOutputBL_h__ -#define __AUOutputBL_h__ - -#include "CAStreamBasicDescription.h" -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -// ____________________________________________________________________________ -// -// AUOutputBL - Simple Buffer List wrapper targetted to use with retrieving AU output -// Works in one of two ways (both adjustable)... Can use it with NULL pointers, or allocate -// memory to receive the data in. - -// Before using this with any call to AudioUnitRender, it needs to be Prepared -// as some calls to AudioUnitRender can reset the ABL - -class AUOutputBL { -public: - - // you CANNOT use one of these - it will crash! -// AUOutputBL (); - - // this is the constructor that you use - // it can't be reset once you've constructed it - AUOutputBL (const CAStreamBasicDescription &inDesc, UInt32 inDefaultNumFrames = 512); - ~AUOutputBL(); - - void Prepare () - { - Prepare (mFrames); - } - - // this version can throw if this is an allocted ABL and inNumFrames is > AllocatedFrames() - // you can set the bool to true if you want a NULL buffer list even if allocated - // inNumFrames must be a valid number (will throw if inNumFrames is 0) - void Prepare (UInt32 inNumFrames, bool inWantNullBufferIfAllocated = false); - - AudioBufferList* ABL() { return mBufferList; } - - // You only need to call this if you want to allocate a buffer list - // if you want an empty buffer list, just call Prepare() - // if you want to dispose previously allocted memory, pass in 0 - // then you either have an empty buffer list, or you can re-allocate - // Memory is kept around if an Allocation request is less than what is currently allocated - void Allocate (UInt32 inNumberFrames); - - UInt32 AllocatedFrames() const { return mFrames; } - - const CAStreamBasicDescription& GetFormat() const { return mFormat; } - -#if DEBUG - void Print(); -#endif - -private: - UInt32 AllocatedBytes () const { return (mBufferSize * mNumberBuffers); } - - CAStreamBasicDescription mFormat; - Byte* mBufferMemory; - AudioBufferList* mBufferList; - UInt32 mNumberBuffers; - UInt32 mBufferSize; - UInt32 mFrames; - -// don't want to copy these.. can if you want, but more code to write! - AUOutputBL (const AUOutputBL &c) {} - AUOutputBL& operator= (const AUOutputBL& c) { return *this; } -}; - -#endif // __AUOutputBL_h__ diff --git a/libs/appleutility/AUParamInfo.cpp b/libs/appleutility/AUParamInfo.cpp deleted file mode 100644 index 9b0046166f..0000000000 --- a/libs/appleutility/AUParamInfo.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - AUParamInfo.cpp - -=============================================================================*/ -#include "AUParamInfo.h" -#include "CAXException.h" - -AUParamInfo::AUParamInfo (AudioUnit inAU, - bool inIncludeExpert, - bool inIncludeReadOnly, - AudioUnitScope inScope, - AudioUnitElement inElement) - : mAU (inAU), - mNumParams (0), - mParamListID(NULL), - mScope (inScope), - mElement (inElement) -{ - UInt32 size; - OSStatus result = AudioUnitGetPropertyInfo(mAU, kAudioUnitProperty_ParameterList, inScope, mElement, &size, NULL); - if (size == 0 || result) return; - - int nparams = size / sizeof(AudioUnitPropertyID); - mParamListID = new AudioUnitParameterID[nparams]; - - memset (mParamListID, 0xFF, size); - - AudioUnitParameterID *paramList = new AudioUnitParameterID[nparams]; - - result = AudioUnitGetProperty(mAU, kAudioUnitProperty_ParameterList, mScope, mElement, paramList, &size); - if (result) { - delete [] mParamListID; - delete [] paramList; - mParamListID = NULL; - return; - } - - ParameterMap params; - for (int i = 0; i < nparams; ++i) - { - CAAUParameter auvp (mAU, paramList[i], mScope, mElement); // took out only using global scope in CAAUParameter creation - const AudioUnitParameterInfo ¶mInfo = auvp.ParamInfo(); - - // don't include if parameter can't be read or written - if (!(paramInfo.flags & kAudioUnitParameterFlag_IsWritable) - && !(paramInfo.flags & kAudioUnitParameterFlag_IsReadable)) - continue; - - // only include if expert params wanted - if (!inIncludeExpert && auvp.IsExpert()) - continue; - - // only include if read only params are wanted - if (!(paramInfo.flags & kAudioUnitParameterFlag_IsWritable) - && (paramInfo.flags & kAudioUnitParameterFlag_IsReadable)) - { - if (!inIncludeReadOnly) - continue; - } - - mParamListID[mNumParams] = paramList[i]; - mNumParams++; - - // ok - if we're here, then we have a parameter we are going to display. - UInt32 clump = 0; - auvp.GetClumpID (clump); - mParams[clump].push_back (auvp); - } - - delete [] paramList; -} - -AUParamInfo::~AUParamInfo() -{ - delete [] mParamListID; -} - -UInt32 AUParamInfo::NumParamsForClump (UInt32 inClump) const -{ - ParameterMap::const_iterator it = mParams.find(inClump); - if (it != mParams.end()) - return (*it).second.size(); - return 0; -} - -const CAAUParameter* AUParamInfo::GetParamInfo (AudioUnitParameterID inParamID) const -{ - for (ParameterMap::const_iterator it = mParams.begin(); it != mParams.end(); ++it) { - const ParameterList &list = (*it).second; - for (ParameterList::const_iterator iter = list.begin(); iter != list.end(); ++iter) { - if (inParamID == (*iter).mParameterID) { - return &(*iter); - } - } - } - return NULL; -} diff --git a/libs/appleutility/AUParamInfo.h b/libs/appleutility/AUParamInfo.h deleted file mode 100644 index 9d342080b1..0000000000 --- a/libs/appleutility/AUParamInfo.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - AUParamInfo.h - -=============================================================================*/ -#include -#include -#include -#include "CAAUParameter.h" - -/* - The ParameterMap returned by the Map() method is a map where - - the key is the clumpID - - the value is a ParameterList (vector) - - If you have parameters on multiple scopes (or elements within a scope), then you should create one of these - for each scope-element pair -*/ - -class AUParamInfo { - -public: - typedef std::vector ParameterList; - typedef std::map > ParameterMap; - - - - AUParamInfo (AudioUnit inAU, - bool inIncludeExpert, - bool inIncludeReadOnly, - AudioUnitScope inScope = kAudioUnitScope_Global, - AudioUnitElement inElement = 0); - - ~AUParamInfo(); - - const ParameterMap& Map () const { return mParams; } - - // some convenience methods - UInt32 NumParams () const { return mNumParams; } - - AudioUnitParameterID ParamID (UInt32 inIndex) const - { - if (inIndex < mNumParams) return mParamListID[inIndex]; - return 0xFFFFFFFF; - } - - UInt32 NumClumps () const { return mParams.size(); } - - UInt32 NumParamsForClump (UInt32 inClump) const; - - // returns NULL if there's no info for the parameter - const CAAUParameter* GetParamInfo (AudioUnitParameterID inParamID) const; - - AudioUnitScope GetScope () const { return mScope; } - AudioUnitElement GetElement () const { return mElement; } - -private: - - AudioUnit mAU; - UInt32 mNumParams; - AudioUnitParameterID * mParamListID; - - ParameterMap mParams; - AudioUnitScope mScope; - AudioUnitElement mElement; - - // disallow - AUParamInfo () {} - AUParamInfo (const AUParamInfo &c) {} - AUParamInfo& operator= (const AUParamInfo& c) { return *this; } -}; diff --git a/libs/appleutility/CAAUParameter.cpp b/libs/appleutility/CAAUParameter.cpp deleted file mode 100644 index b99b6ab749..0000000000 --- a/libs/appleutility/CAAUParameter.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAUParameter.cpp - -=============================================================================*/ - -#include "CAAUParameter.h" - -CAAUParameter::CAAUParameter() -{ - memset(this, 0, sizeof(CAAUParameter)); -} - -CAAUParameter::CAAUParameter(AudioUnit au, AudioUnitParameterID param, AudioUnitScope scope, AudioUnitElement element) -{ - memset(this, 0, sizeof(CAAUParameter)); - Init (au, param, scope, element); -} - -CAAUParameter::CAAUParameter (AudioUnitParameter &inParam) -{ - memset(this, 0, sizeof(CAAUParameter)); - Init (inParam.mAudioUnit, inParam.mParameterID, inParam.mScope, inParam.mElement); -} - -CAAUParameter::CAAUParameter(const CAAUParameter &a) -{ - memset(this, 0, sizeof(CAAUParameter)); - *this = a; -} - -CAAUParameter & CAAUParameter::operator = (const CAAUParameter &a) -{ - if (mParamName) CFRelease(mParamName); - if (mParamTag) CFRelease(mParamTag); - if (mNamedParams) CFRelease(mNamedParams); - - memcpy(this, &a, sizeof(CAAUParameter)); - - if (mParamName) CFRetain(mParamName); - if (mParamTag) CFRetain(mParamTag); - if (mNamedParams) CFRetain(mNamedParams); - - return *this; -} - -CAAUParameter::~CAAUParameter() -{ - if (mParamName) CFRelease(mParamName); - if (mParamTag) CFRelease(mParamTag); - if (mNamedParams) CFRelease (mNamedParams); -} - -void CAAUParameter::Init (AudioUnit au, AudioUnitParameterID param, AudioUnitScope scope, AudioUnitElement element) -{ - mAudioUnit = au; - mParameterID = param; - mScope = scope; - mElement = element; - - UInt32 propertySize = sizeof(mParamInfo); - OSStatus err = AudioUnitGetProperty(au, kAudioUnitProperty_ParameterInfo, - scope, param, &mParamInfo, &propertySize); - if (err) - memset(&mParamInfo, 0, sizeof(mParamInfo)); - if (mParamInfo.flags & kAudioUnitParameterFlag_HasCFNameString) { - mParamName = mParamInfo.cfNameString; - if (!(mParamInfo.flags & kAudioUnitParameterFlag_CFNameRelease)) - CFRetain (mParamName); - } else - mParamName = CFStringCreateWithCString(NULL, mParamInfo.name, kCFStringEncodingUTF8); - - char* str = 0; - switch (mParamInfo.unit) - { - case kAudioUnitParameterUnit_Boolean: - str = "T/F"; - break; - case kAudioUnitParameterUnit_Percent: - case kAudioUnitParameterUnit_EqualPowerCrossfade: - str = "%"; - break; - case kAudioUnitParameterUnit_Seconds: - str = "Secs"; - break; - case kAudioUnitParameterUnit_SampleFrames: - str = "Samps"; - break; - case kAudioUnitParameterUnit_Phase: - case kAudioUnitParameterUnit_Degrees: - str = "Degr."; - break; - case kAudioUnitParameterUnit_Hertz: - str = "Hz"; - break; - case kAudioUnitParameterUnit_Cents: - case kAudioUnitParameterUnit_AbsoluteCents: - str = "Cents"; - break; - case kAudioUnitParameterUnit_RelativeSemiTones: - str = "S-T"; - break; - case kAudioUnitParameterUnit_MIDINoteNumber: - case kAudioUnitParameterUnit_MIDIController: - str = "MIDI"; - //these are inclusive, so add one value here - mNumIndexedParams = short(mParamInfo.maxValue+1 - mParamInfo.minValue); - break; - case kAudioUnitParameterUnit_Decibels: - str = "dB"; - break; - case kAudioUnitParameterUnit_MixerFaderCurve1: - case kAudioUnitParameterUnit_LinearGain: - str = "Gain"; - break; - case kAudioUnitParameterUnit_Pan: - str = "L/R"; - break; - case kAudioUnitParameterUnit_Meters: - str = "Mtrs"; - break; - case kAudioUnitParameterUnit_Octaves: - str = "8ve"; - break; - case kAudioUnitParameterUnit_BPM: - str = "BPM"; - break; - case kAudioUnitParameterUnit_Beats: - str = "Beats"; - break; - case kAudioUnitParameterUnit_Milliseconds: - str = "msecs"; - break; - case kAudioUnitParameterUnit_Ratio: - str = "ratio"; - break; - case kAudioUnitParameterUnit_Indexed: - { - propertySize = sizeof(mNamedParams); - err = AudioUnitGetProperty (au, - kAudioUnitProperty_ParameterValueStrings, - scope, - param, - &mNamedParams, - &propertySize); - if (!err && mNamedParams) { - mNumIndexedParams = CFArrayGetCount(mNamedParams); - } else { - //these are inclusive, so add one value here - mNumIndexedParams = short(mParamInfo.maxValue+1 - mParamInfo.minValue); - } - str = NULL; - } - break; - case kAudioUnitParameterUnit_CustomUnit: - { - CFStringRef unitName = mParamInfo.unitName; - static char paramStr[256]; - CFStringGetCString (unitName, paramStr, 256, kCFStringEncodingUTF8); - if (mParamInfo.flags & kAudioUnitParameterFlag_CFNameRelease) - CFRelease (unitName); - str = paramStr; - break; - } - case kAudioUnitParameterUnit_Generic: - case kAudioUnitParameterUnit_Rate: - default: - str = NULL; - break; - } - - if (str) - mParamTag = CFStringCreateWithCString(NULL, str, kCFStringEncodingUTF8); - else - mParamTag = NULL; -} - - -Float32 CAAUParameter::GetValue() const -{ - Float32 value = 0.; - //OSStatus err = - AudioUnitGetParameter(mAudioUnit, mParameterID, mScope, mElement, &value); - return value; -} - -CFStringRef CAAUParameter::GetStringFromValueCopy(const Float32 *value) const -{ - if (HasNamedParams()) - { - Float32 val = (value == NULL ? GetValue() : *value); - int index = int(mParamInfo.minValue) + int(val); - CFStringRef str = GetParamName (index); - if (str) { - CFRetain (str); - return str; - } - } - else if (ValuesHaveStrings()) - { - AudioUnitParameterStringFromValue stringValue; - stringValue.inParamID = mParameterID; - stringValue.inValue = value; - stringValue.outString = NULL; - UInt32 propertySize = sizeof(stringValue); - - OSStatus err = AudioUnitGetProperty (mAudioUnit, - kAudioUnitProperty_ParameterStringFromValue, - mScope, - mParameterID, - &stringValue, - &propertySize); - - if (err == noErr && stringValue.outString != NULL) - return stringValue.outString; - } - - Float32 val = (value == NULL ? GetValue() : *value); - char valstr[32]; - AUParameterFormatValue (val, this, valstr, 4); - return CFStringCreateWithCString(NULL, valstr, kCFStringEncodingUTF8); -} - -Float32 CAAUParameter::GetValueFromString(CFStringRef str) const -{ - if (ValuesHaveStrings()) - { - AudioUnitParameterValueFromString valueString; - valueString.inParamID = mParameterID; - valueString.inString = str; - UInt32 propertySize = sizeof(valueString); - - OSStatus err = AudioUnitGetProperty (mAudioUnit, - kAudioUnitProperty_ParameterValueFromString, - mScope, - mParameterID, - &valueString, - &propertySize); - - if (err == noErr) { - return valueString.outValue; - } - } - - Float32 paramValue = mParamInfo.defaultValue; - char valstr[32]; - CFStringGetCString(str, valstr, sizeof(valstr), kCFStringEncodingUTF8); - sscanf(valstr, "%f", ¶mValue); - return paramValue; -} - -void CAAUParameter::SetValue( AUParameterListenerRef inListener, - void * inObject, - Float32 inValue) const -{ - // clip inValue as: maxValue >= inValue >= minValue before setting - Float32 valueToSet = inValue; - if (valueToSet > mParamInfo.maxValue) - valueToSet = mParamInfo.maxValue; - if (valueToSet < mParamInfo.minValue) - valueToSet = mParamInfo.minValue; - - AUParameterSet(inListener, inObject, this, valueToSet, 0); -} - -#if DEBUG -void CAAUParameter::Print() const -{ - UInt32 clump = 0; - GetClumpID (clump); - - UInt32 len = CFStringGetLength(mParamName); - char* chars = (char*)malloc (len * 2); // give us plenty of room for unichar chars - if (!CFStringGetCString (mParamName, chars, len * 2, kCFStringEncodingUTF8)) - chars[0] = 0; - - printf ("ID: %ld, Clump: %ld, Name: %s\n", mParameterID, clump, chars); - free (chars); -} -#endif diff --git a/libs/appleutility/CAAUParameter.h b/libs/appleutility/CAAUParameter.h deleted file mode 100644 index 4f35b26353..0000000000 --- a/libs/appleutility/CAAUParameter.h +++ /dev/null @@ -1,187 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAUParameter.h - -=============================================================================*/ - -#ifndef __CAAUParameter_h__ -#define __CAAUParameter_h__ - -#include - -// ____________________________________________________________________________ -// CAAUParameter -// complete parameter specification - /*! @class CAAUParameter */ -class CAAUParameter : public AudioUnitParameter { -public: - /*! @ctor CAAUParameter.0 */ - CAAUParameter(); - /*! @ctor CAAUParameter.1 */ - CAAUParameter(AudioUnit au, AudioUnitParameterID param, AudioUnitScope scope, AudioUnitElement element); - /*! @ctor CAAUParameter.2 */ - CAAUParameter(AudioUnitParameter &inParam); - /*! @ctor CAAUParameter.3 */ - CAAUParameter(const CAAUParameter &a); - /*! @dtor ~CAAUParameter */ - ~CAAUParameter(); - - /*! @method operator <@ */ - bool operator < (const CAAUParameter &a) const - { - return memcmp(this, &a, sizeof(AudioUnitParameter)) < 0; - } - - /*! @method operator ==@ */ - bool operator == (const CAAUParameter &a) const - { - return !memcmp(this, &a, sizeof(AudioUnitParameter)); - } - - /*! @method operator =@ */ - CAAUParameter & operator = (const CAAUParameter &a); - - /*! @method GetValue */ - Float32 GetValue() const; - /*! @method SetValue */ - void SetValue( AUParameterListenerRef inListener, - void * inObject, - Float32 inValue) const; - - /*! @method GetName */ - CFStringRef GetName() const { return mParamName; } - // borrowed reference! - - /*! @method GetStringFromValueCopy */ - CFStringRef GetStringFromValueCopy(const Float32 *value = NULL) const; - // returns a copy of the name of the current parameter value - // or null if there is no name associated - // caller must release - /*! @method ValuesHaveStrings */ - bool ValuesHaveStrings () const - { - return (mParamInfo.flags & kAudioUnitParameterFlag_ValuesHaveStrings) != 0; - } - - /*! @method GetValueFromString */ - Float32 GetValueFromString (CFStringRef str) const; - // caller must release - - /*! @method ParamInfo */ - const AudioUnitParameterInfo & - ParamInfo() const { return mParamInfo; } - - /*! @method GetParamTag */ - CFStringRef GetParamTag() const { return mParamTag; } - // this may return null! - - // in which case there is no descriptive tag for the parameter - - /*! @method GetParamName */ - CFStringRef GetParamName (int inIndex) const - // this can return null if there is no name for the parameter - { - return (mNamedParams && inIndex < mNumIndexedParams) - ? (CFStringRef) CFArrayGetValueAtIndex(mNamedParams, inIndex) - : 0; - } - - /*! @method GetNumIndexedParams */ - int GetNumIndexedParams () const { return mNumIndexedParams; } - - /*! @method IsIndexedParam */ - bool IsIndexedParam () const { return mNumIndexedParams != 0; } - - /*! @method HasNamedParams */ - bool HasNamedParams () const { return IsIndexedParam() && mNamedParams; } - - /*! @method GetClumpID */ - bool GetClumpID (UInt32 &outClumpID) const - { - if (mParamInfo.flags & kAudioUnitParameterFlag_HasClump) { - outClumpID = mParamInfo.clumpID; - return true; - } - return false; - } - - /*! @method HasDisplayTransformation */ - bool HasDisplayTransformation () const - { - return GetAudioUnitParameterDisplayType (mParamInfo.flags); - } - - /*! @method IsExpert */ - bool IsExpert () const - { - return mParamInfo.flags & kAudioUnitParameterFlag_ExpertMode; - } -#if DEBUG - void Print () const; -#endif - - // these methods are defined in CAPersistence.cpp - // they will persist and restore only the scope, element and param ID's of the AudioUnitParameter - // however, this is sufficient to be able to save/restore a CAAUParameter object - void Save (CFPropertyListRef &outData) const; - - static void Save (const AudioUnitParameter &inParam, CFPropertyListRef &outData); - - static OSStatus Restore (const CFPropertyListRef inData, AudioUnitParameter &outParam); - -protected: - // cached parameter info - /*! @var mParamInfo */ - AudioUnitParameterInfo mParamInfo; - /*! @var mParamName */ - CFStringRef mParamName; - /*! @var mParamTag */ - CFStringRef mParamTag; - /*! @var mNumIndexedParams */ - short mNumIndexedParams; - /*! @var mNamedParams */ - CFArrayRef mNamedParams; - -private: - void Init (AudioUnit au, AudioUnitParameterID param, AudioUnitScope scope, AudioUnitElement element); - -}; - - - -#endif // __CAAUParameter_h__ diff --git a/libs/appleutility/CAAudioChannelLayout.cpp b/libs/appleutility/CAAudioChannelLayout.cpp deleted file mode 100644 index 585ff44fb7..0000000000 --- a/libs/appleutility/CAAudioChannelLayout.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioChannelLayout.cpp - -=============================================================================*/ - -//============================================================================= -// Includes -//============================================================================= - -// Self Include -#include "CAAudioChannelLayout.h" -#include -#include - -//============================================================================= -// CAAudioChannelLayout -//============================================================================= - -AudioChannelLayout* CAAudioChannelLayout::Create(UInt32 inNumberChannelDescriptions) -{ - UInt32 theSize = CalculateByteSize(inNumberChannelDescriptions); - AudioChannelLayout* theAnswer = static_cast(calloc(1, theSize)); - if(theAnswer != NULL) - { - SetAllToUnknown(*theAnswer, inNumberChannelDescriptions); - } - return theAnswer; -} - -void CAAudioChannelLayout::Destroy(AudioChannelLayout* inChannelLayout) -{ - free(inChannelLayout); -} - -void CAAudioChannelLayout::SetAllToUnknown(AudioChannelLayout& outChannelLayout, UInt32 inNumberChannelDescriptions) -{ - outChannelLayout.mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions; - outChannelLayout.mChannelBitmap = 0; - outChannelLayout.mNumberChannelDescriptions = inNumberChannelDescriptions; - for(UInt32 theChannelIndex = 0; theChannelIndex < inNumberChannelDescriptions; ++theChannelIndex) - { - outChannelLayout.mChannelDescriptions[theChannelIndex].mChannelLabel = kAudioChannelLabel_Unknown; - outChannelLayout.mChannelDescriptions[theChannelIndex].mChannelFlags = 0; - outChannelLayout.mChannelDescriptions[theChannelIndex].mCoordinates[0] = 0; - outChannelLayout.mChannelDescriptions[theChannelIndex].mCoordinates[1] = 0; - outChannelLayout.mChannelDescriptions[theChannelIndex].mCoordinates[2] = 0; - } -} - -bool operator== (const AudioChannelLayout &x, const AudioChannelLayout &y) -{ - // compare based on the number of channel descriptions present - // (this may be too strict a comparison if all you care about are matching layout tags) - UInt32 theSize1 = CAAudioChannelLayout::CalculateByteSize(x.mNumberChannelDescriptions); - UInt32 theSize2 = CAAudioChannelLayout::CalculateByteSize(y.mNumberChannelDescriptions); - - if (theSize1 != theSize2) - return false; - - return !memcmp (&x, &y, theSize1); -} - -// counting the one bits in a word -inline UInt32 CountOnes(UInt32 x) -{ - // secret magic algorithm for counting bits in a word. - UInt32 t; - x = x - ((x >> 1) & 0x55555555); - t = ((x >> 2) & 0x33333333); - x = (x & 0x33333333) + t; - x = (x + (x >> 4)) & 0x0F0F0F0F; - x = x + (x << 8); - x = x + (x << 16); - return x >> 24; -} - -UInt32 CAAudioChannelLayout::NumberChannels (const AudioChannelLayout& inLayout) -{ - if (inLayout.mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions) - return inLayout.mNumberChannelDescriptions; - - if (inLayout.mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) - return CountOnes (inLayout.mChannelBitmap); - - return AudioChannelLayoutTag_GetNumberOfChannels(inLayout.mChannelLayoutTag); -} - -void CAShowAudioChannelLayout (FILE* file, const AudioChannelLayout *layout) -{ - fprintf (file, "\tTag=0x%lX, ", layout->mChannelLayoutTag); - if (layout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) - fprintf (file, "Using Bitmap:0x%lX\n", layout->mChannelBitmap); - else { - fprintf (file, "Num Chan Descs=%ld\n", layout->mNumberChannelDescriptions); - const AudioChannelDescription *desc = layout->mChannelDescriptions; - for (unsigned int i = 0; i < layout->mNumberChannelDescriptions; ++i, ++desc) { - fprintf (file, "\t\tLabel=%ld, Flags=0x%lX, ", desc->mChannelLabel, desc->mChannelFlags); - fprintf (file, "[az=%f,el=%f,dist=%f]\n", desc->mCoordinates[0], desc->mCoordinates[1], desc->mCoordinates[2]); - } - } -} diff --git a/libs/appleutility/CAAudioChannelLayout.h b/libs/appleutility/CAAudioChannelLayout.h deleted file mode 100644 index 8f995b8614..0000000000 --- a/libs/appleutility/CAAudioChannelLayout.h +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioChannelLayout.h - -=============================================================================*/ -#if !defined(__CAAudioChannelLayout_h__) -#define __CAAudioChannelLayout_h__ - -//============================================================================= -// Includes -//============================================================================= - -// System Includes -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include -#else - #include - #include -#endif -#include -#include -#include - -#if !HAL_Build - #include "CAReferenceCounted.h" -#endif - -//============================================================================= -// CAAudioChannelLayout -//============================================================================= - -bool operator== (const AudioChannelLayout &x, const AudioChannelLayout &y); - -extern "C" void CAShowAudioChannelLayout (FILE* file, const AudioChannelLayout *layout); - -class CAAudioChannelLayout -{ -// static Construction/Destruction -public: - static AudioChannelLayout* Create(UInt32 inNumberChannelDescriptions); - static void Destroy(AudioChannelLayout* inChannelLayout); - static UInt32 CalculateByteSize(UInt32 inNumberChannelDescriptions) { - return offsetof(AudioChannelLayout, mChannelDescriptions) + inNumberChannelDescriptions * sizeof(AudioChannelDescription); - } - static void SetAllToUnknown(AudioChannelLayout& outChannelLayout, UInt32 inNumberChannelDescriptions); - static UInt32 NumberChannels(const AudioChannelLayout& inLayout); - -#if !HAL_Build -// object methods -public: - CAAudioChannelLayout (); - - CAAudioChannelLayout (UInt32 inNumberChannels, bool inChooseSurround); - // if inChooseSurround is false, then symmetrical speaker arrangements - // are chosen in place of surround layouts if there is a choice - // This call chooses layouts based on the expected defaults in - // AudioUnit usage - CAAudioChannelLayout (AudioChannelLayoutTag inTag); - CAAudioChannelLayout (const CAAudioChannelLayout &c); - CAAudioChannelLayout (const AudioChannelLayout* inChannelLayout); - ~CAAudioChannelLayout(); - - CAAudioChannelLayout& operator= (const AudioChannelLayout* inChannelLayout); - CAAudioChannelLayout& operator= (const CAAudioChannelLayout& c); - bool operator== (const CAAudioChannelLayout &c) const; - - void SetWithTag(AudioChannelLayoutTag inTag); - - bool IsValid() const { return NumberChannels() > 0; } - UInt32 Size() const { return mLayoutHolder ? mLayoutHolder->Size() : 0; } - - UInt32 NumberChannels() const { return NumberChannels(Layout()); } - - AudioChannelLayoutTag Tag() const { return Layout().mChannelLayoutTag; } - const AudioChannelLayout& Layout() const { return mLayoutHolder->Layout(); } - operator const AudioChannelLayout *() const { return &Layout(); } - - void Print () const { Print (stdout); } - void Print (FILE* file) const; - - OSStatus Save (CFPropertyListRef *outData) const; - OSStatus Restore (CFPropertyListRef &inData); - -private: - class ACLRefCounter : public CAReferenceCounted { - public: - ACLRefCounter (UInt32 inDataSize) - { - if (inDataSize < offsetof(AudioChannelLayout, mChannelDescriptions)) - inDataSize = offsetof(AudioChannelLayout, mChannelDescriptions); - - mLayout = static_cast(malloc (inDataSize)); - memset (mLayout, 0, inDataSize); - mByteSize = inDataSize; - } - - const AudioChannelLayout & Layout() const { return *mLayout; } - - UInt32 Size () const { return mByteSize; } - - private: - AudioChannelLayout *mLayout; - UInt32 mByteSize; - - // only the constructors can change the actual state of the layout - friend CAAudioChannelLayout::CAAudioChannelLayout (UInt32 inNumberChannels, bool inChooseSurround); - friend OSStatus CAAudioChannelLayout::Restore (CFPropertyListRef &inData); - friend CAAudioChannelLayout& CAAudioChannelLayout::operator= (const AudioChannelLayout* inChannelLayout); - friend void CAAudioChannelLayout::SetWithTag(AudioChannelLayoutTag inTag); - - AudioChannelLayout * GetLayout() { return mLayout; } - ~ACLRefCounter() { if (mLayout) { free(mLayout); mLayout = NULL; } } - - private: - ACLRefCounter () : mLayout(NULL) { } - ACLRefCounter(const ACLRefCounter& c) : mLayout(NULL) { } - ACLRefCounter& operator=(const ACLRefCounter& c) { return *this; } - }; - - ACLRefCounter *mLayoutHolder; -#endif // HAL_Build - -}; - -#endif diff --git a/libs/appleutility/CAAudioChannelLayoutObject.cpp b/libs/appleutility/CAAudioChannelLayoutObject.cpp deleted file mode 100644 index 8c4030048d..0000000000 --- a/libs/appleutility/CAAudioChannelLayoutObject.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioChannelLayoutObject.cpp - -=============================================================================*/ - -#include "CAAudioChannelLayout.h" -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include -#else - #include - #include -#endif - - -CAAudioChannelLayout::CAAudioChannelLayout () -{ - mLayoutHolder = new ACLRefCounter (offsetof(AudioChannelLayout, mChannelDescriptions)); -} - -//============================================================================= -// CAAudioChannelLayout::CAAudioChannelLayout -//============================================================================= -CAAudioChannelLayout::CAAudioChannelLayout (UInt32 inNumberChannels, bool inChooseSurround) -{ - // this chooses default layouts based on the number of channels... - UInt32 theSize = CalculateByteSize (inNumberChannels); - - mLayoutHolder = new ACLRefCounter (theSize); - - AudioChannelLayout* layout = mLayoutHolder->GetLayout(); - - layout->mNumberChannelDescriptions = inNumberChannels; - - switch (inNumberChannels) - { - case 1: - layout->mChannelLayoutTag = kAudioChannelLayoutTag_Mono; - break; - case 2: - layout->mChannelLayoutTag = inChooseSurround ? kAudioChannelLayoutTag_Binaural : kAudioChannelLayoutTag_Stereo; - break; - case 4: - layout->mChannelLayoutTag = inChooseSurround ? kAudioChannelLayoutTag_Ambisonic_B_Format : kAudioChannelLayoutTag_AudioUnit_4; - break; - case 5: - layout->mChannelLayoutTag = inChooseSurround ? kAudioChannelLayoutTag_AudioUnit_5_0 : kAudioChannelLayoutTag_AudioUnit_5; - break; - case 6: - layout->mChannelLayoutTag = inChooseSurround ? kAudioChannelLayoutTag_AudioUnit_6_0 : kAudioChannelLayoutTag_AudioUnit_6; - break; - case 7: - layout->mChannelLayoutTag = kAudioChannelLayoutTag_AudioUnit_7_0; - break; - case 8: - layout->mChannelLayoutTag = kAudioChannelLayoutTag_AudioUnit_8; - break; - default: - // here we have a "broken" layout, in the sense that we haven't any idea how to lay this out - // the layout itself is all set to zeros - // ### no longer true ### - SetAllToUnknown(*layout, inNumberChannels); - break; - } -} - -//============================================================================= -// CAAudioChannelLayout::CAAudioChannelLayout -//============================================================================= -CAAudioChannelLayout::CAAudioChannelLayout (AudioChannelLayoutTag inLayoutTag) - : mLayoutHolder(NULL) -{ - SetWithTag(inLayoutTag); -} - -//============================================================================= -// CAAudioChannelLayout::CAAudioChannelLayout -//============================================================================= -CAAudioChannelLayout::CAAudioChannelLayout (const CAAudioChannelLayout &c) - : mLayoutHolder(NULL) -{ - *this = c; -} - - -//============================================================================= -// CAAudioChannelLayout::AudioChannelLayout -//============================================================================= -CAAudioChannelLayout::CAAudioChannelLayout (const AudioChannelLayout* inChannelLayout) - : mLayoutHolder(NULL) -{ - *this = inChannelLayout; -} - -//============================================================================= -// CAAudioChannelLayout::~CAAudioChannelLayout -//============================================================================= -CAAudioChannelLayout::~CAAudioChannelLayout () -{ - if (mLayoutHolder) { - mLayoutHolder->release(); - mLayoutHolder = NULL; - } -} - -//============================================================================= -// CAAudioChannelLayout::CAAudioChannelLayout -//============================================================================= -CAAudioChannelLayout& CAAudioChannelLayout::operator= (const CAAudioChannelLayout &c) -{ - if (mLayoutHolder != c.mLayoutHolder) { - if (mLayoutHolder) - mLayoutHolder->release(); - - if ((mLayoutHolder = c.mLayoutHolder) != NULL) - mLayoutHolder->retain(); - } - - return *this; -} - -CAAudioChannelLayout& CAAudioChannelLayout::operator= (const AudioChannelLayout* inChannelLayout) -{ - if (mLayoutHolder) - mLayoutHolder->release(); - - UInt32 theSize = CalculateByteSize (inChannelLayout->mNumberChannelDescriptions); - - mLayoutHolder = new ACLRefCounter (theSize); - - memcpy(mLayoutHolder->mLayout, inChannelLayout, theSize); - return *this; -} - -void CAAudioChannelLayout::SetWithTag(AudioChannelLayoutTag inTag) -{ - if (mLayoutHolder) - mLayoutHolder->release(); - - mLayoutHolder = new ACLRefCounter(offsetof(AudioChannelLayout, mChannelDescriptions[0])); - AudioChannelLayout* layout = mLayoutHolder->GetLayout(); - layout->mChannelLayoutTag = inTag; -} - -//============================================================================= -// CAAudioChannelLayout::operator== -//============================================================================= -bool CAAudioChannelLayout::operator== (const CAAudioChannelLayout &c) const -{ - if (mLayoutHolder == c.mLayoutHolder) - return true; - return Layout() == c.Layout(); -} - -//============================================================================= -// CAAudioChannelLayout::Print -//============================================================================= -void CAAudioChannelLayout::Print (FILE* file) const -{ - CAShowAudioChannelLayout (file, &Layout()); -} - diff --git a/libs/appleutility/CAAudioFile.cpp b/libs/appleutility/CAAudioFile.cpp deleted file mode 100644 index e1e39b0ec9..0000000000 --- a/libs/appleutility/CAAudioFile.cpp +++ /dev/null @@ -1,1241 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioFile.cpp - -=============================================================================*/ - -#include "CAAudioFile.h" - -#if !CAAF_USE_EXTAUDIOFILE - -#include "CAXException.h" -#include -#include "CAHostTimeBase.h" -#include "CADebugMacros.h" - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -#if DEBUG - //#define VERBOSE_IO 1 - //#define VERBOSE_CONVERTER 1 - //#define VERBOSE_CHANNELMAP 1 - //#define LOG_FUNCTION_ENTRIES 1 - - #if VERBOSE_CHANNELMAP - #include "CAChannelLayouts.h" // this is in Source/Tests/AudioFileTools/Utility - #endif -#endif - -#if LOG_FUNCTION_ENTRIES - class FunctionLogger { - public: - FunctionLogger(const char *name, const char *fmt=NULL, ...) : mName(name) { - Indent(); - printf("-> %s ", name); - if (fmt) { - va_list args; - va_start(args, fmt); - vprintf(fmt, args); - va_end(args); - } - printf("\n"); - ++sIndent; - } - ~FunctionLogger() { - --sIndent; - Indent(); - printf("<- %s\n", mName); - if (sIndent == 0) - printf("\n"); - } - - static void Indent() { - for (int i = sIndent; --i >= 0; ) { - putchar(' '); putchar(' '); - } - } - - const char *mName; - static int sIndent; - }; - int FunctionLogger::sIndent = 0; - - #define LOG_FUNCTION(name, format, ...) FunctionLogger _flog(name, format, ## __VA_ARGS__); -#else - #define LOG_FUNCTION(name, format, foo) -#endif - -static const UInt32 kDefaultIOBufferSizeBytes = 0x10000; - -#if CAAUDIOFILE_PROFILE - #define StartTiming(af, starttime) UInt64 starttime = af->mProfiling ? CAHostTimeBase::GetTheCurrentTime() : 0 - #define ElapsedTime(af, starttime, counter) if (af->mProfiling) counter += (CAHostTimeBase::GetTheCurrentTime() - starttime) -#else - #define StartTiming(af, starttime) - #define ElapsedTime(af, starttime, counter) -#endif - -#define kNoMoreInputRightNow 'nein' - -// _______________________________________________________________________________________ -// -CAAudioFile::CAAudioFile() : - mAudioFile(0), - mUseCache(false), - mFinishingEncoding(false), - mMode(kClosed), - mFileDataOffset(-1), - mFramesToSkipFollowingSeek(0), - - mClientOwnsIOBuffer(false), - mPacketDescs(NULL), - mNumPacketDescs(0), - mConverter(NULL), - mMagicCookie(NULL), - mWriteBufferList(NULL) -#if CAAUDIOFILE_PROFILE - , - mProfiling(false), - mTicksInConverter(0), - mTicksInReadInConverter(0), - mTicksInIO(0), - mInConverter(false) -#endif -{ - mIOBufferList.mBuffers[0].mData = NULL; - mIOBufferList.mBuffers[0].mDataByteSize = 0; - mClientMaxPacketSize = 0; - mIOBufferSizeBytes = kDefaultIOBufferSizeBytes; -} - -// _______________________________________________________________________________________ -// -CAAudioFile::~CAAudioFile() -{ - Close(); -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::Close() -{ - LOG_FUNCTION("CAAudioFile::Close", NULL, NULL); - if (mMode == kClosed) - return; - if (mMode == kWriting) - FlushEncoder(); - CloseConverter(); - if (mAudioFile != 0 && mOwnOpenFile) { - AudioFileClose(mAudioFile); - mAudioFile = 0; - } - if (!mClientOwnsIOBuffer) { - delete[] (Byte *)mIOBufferList.mBuffers[0].mData; - mIOBufferList.mBuffers[0].mData = NULL; - mIOBufferList.mBuffers[0].mDataByteSize = 0; - } - delete[] mPacketDescs; mPacketDescs = NULL; mNumPacketDescs = 0; - delete[] mMagicCookie; mMagicCookie = NULL; - delete mWriteBufferList; mWriteBufferList = NULL; - mMode = kClosed; -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::CloseConverter() -{ - if (mConverter) { -#if VERBOSE_CONVERTER - printf("CAAudioFile %p : CloseConverter\n", this); -#endif - AudioConverterDispose(mConverter); - mConverter = NULL; - } -} - -// ======================================================================================= - -// _______________________________________________________________________________________ -// -void CAAudioFile::Open(const FSRef &fsref) -{ - LOG_FUNCTION("CAAudioFile::Open", "%p", this); - XThrowIf(mMode != kClosed, kExtAudioFileError_InvalidOperationOrder, "file already open"); - mFSRef = fsref; - XThrowIfError(AudioFileOpen(&mFSRef, fsRdPerm, 0, &mAudioFile), "open audio file"); - mOwnOpenFile = true; - mMode = kReading; - GetExistingFileInfo(); -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::Wrap(AudioFileID fileID, bool forWriting) -{ - LOG_FUNCTION("CAAudioFile::Wrap", "%p", this); - XThrowIf(mMode != kClosed, kExtAudioFileError_InvalidOperationOrder, "file already open"); - - mAudioFile = fileID; - mOwnOpenFile = false; - mMode = forWriting ? kPreparingToWrite : kReading; - GetExistingFileInfo(); - if (forWriting) - FileFormatChanged(); -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::CreateNew(const FSRef &parentDir, CFStringRef filename, AudioFileTypeID filetype, const AudioStreamBasicDescription &dataFormat, const AudioChannelLayout *layout) -{ - LOG_FUNCTION("CAAudioFile::CreateNew", "%p", this); - XThrowIf(mMode != kClosed, kExtAudioFileError_InvalidOperationOrder, "file already open"); - - mFileDataFormat = dataFormat; - if (layout) { - mFileChannelLayout = layout; -#if VERBOSE_CHANNELMAP - printf("PrepareNew passed channel layout: %s\n", CAChannelLayouts::ConstantToString(mFileChannelLayout.Tag())); -#endif - } - mMode = kPreparingToCreate; - FileFormatChanged(&parentDir, filename, filetype); -} - -// _______________________________________________________________________________________ -// -// called to create the file -- or update its format/channel layout/properties based on an encoder -// setting change -void CAAudioFile::FileFormatChanged(const FSRef *parentDir, CFStringRef filename, AudioFileTypeID filetype) -{ - LOG_FUNCTION("CAAudioFile::FileFormatChanged", "%p", this); - XThrowIf(mMode != kPreparingToCreate && mMode != kPreparingToWrite, kExtAudioFileError_InvalidOperationOrder, "new file not prepared"); - - UInt32 propertySize; - OSStatus err; - AudioStreamBasicDescription saveFileDataFormat = mFileDataFormat; - -#if VERBOSE_CONVERTER - mFileDataFormat.PrintFormat(stdout, "", "Specified file data format"); -#endif - - // Find out the actual format the converter will produce. This is necessary in - // case the bitrate has forced a lower sample rate, which needs to be set correctly - // in the stream description passed to AudioFileCreate. - if (mConverter != NULL) { - propertySize = sizeof(AudioStreamBasicDescription); - Float64 origSampleRate = mFileDataFormat.mSampleRate; - XThrowIfError(AudioConverterGetProperty(mConverter, kAudioConverterCurrentOutputStreamDescription, &propertySize, &mFileDataFormat), "get audio converter's output stream description"); - // do the same for the channel layout being output by the converter -#if VERBOSE_CONVERTER - mFileDataFormat.PrintFormat(stdout, "", "Converter output"); -#endif - if (fiszero(mFileDataFormat.mSampleRate)) - mFileDataFormat.mSampleRate = origSampleRate; - err = AudioConverterGetPropertyInfo(mConverter, kAudioConverterOutputChannelLayout, &propertySize, NULL); - if (err == noErr && propertySize > 0) { - AudioChannelLayout *layout = static_cast(malloc(propertySize)); - err = AudioConverterGetProperty(mConverter, kAudioConverterOutputChannelLayout, &propertySize, layout); - if (err) { - free(layout); - XThrow(err, "couldn't get audio converter's output channel layout"); - } - mFileChannelLayout = layout; -#if VERBOSE_CHANNELMAP - printf("got new file's channel layout from converter: %s\n", CAChannelLayouts::ConstantToString(mFileChannelLayout.Tag())); -#endif - free(layout); - } - } - - // create the output file - if (mMode == kPreparingToCreate) { - CAStreamBasicDescription newFileDataFormat = mFileDataFormat; - if (fiszero(newFileDataFormat.mSampleRate)) - newFileDataFormat.mSampleRate = 44100; // just make something up for now -#if VERBOSE_CONVERTER - newFileDataFormat.PrintFormat(stdout, "", "Applied to new file"); -#endif - XThrowIfError(AudioFileCreate(parentDir, filename, filetype, &newFileDataFormat, 0, &mFSRef, &mAudioFile), "create audio file"); - mMode = kPreparingToWrite; - mOwnOpenFile = true; - } else if (saveFileDataFormat != mFileDataFormat || fnotequal(saveFileDataFormat.mSampleRate, mFileDataFormat.mSampleRate)) { - // second check must be explicit since operator== on ASBD treats SR of zero as "don't care" - if (fiszero(mFileDataFormat.mSampleRate)) - mFileDataFormat.mSampleRate = mClientDataFormat.mSampleRate; -#if VERBOSE_CONVERTER - mFileDataFormat.PrintFormat(stdout, "", "Applied to new file"); -#endif - XThrowIf(fiszero(mFileDataFormat.mSampleRate), kExtAudioFileError_InvalidDataFormat, "file's sample rate is 0"); - XThrowIfError(AudioFileSetProperty(mAudioFile, kAudioFilePropertyDataFormat, sizeof(AudioStreamBasicDescription), &mFileDataFormat), "couldn't update file's data format"); - } - - UInt32 deferSizeUpdates = 1; - err = AudioFileSetProperty(mAudioFile, kAudioFilePropertyDeferSizeUpdates, sizeof(UInt32), &deferSizeUpdates); - - if (mConverter != NULL) { - // encoder - // get the magic cookie, if any, from the converter - delete[] mMagicCookie; mMagicCookie = NULL; - mMagicCookieSize = 0; - - err = AudioConverterGetPropertyInfo(mConverter, kAudioConverterCompressionMagicCookie, &propertySize, NULL); - - // we can get a noErr result and also a propertySize == 0 - // -- if the file format does support magic cookies, but this file doesn't have one. - if (err == noErr && propertySize > 0) { - mMagicCookie = new Byte[propertySize]; - XThrowIfError(AudioConverterGetProperty(mConverter, kAudioConverterCompressionMagicCookie, &propertySize, mMagicCookie), "get audio converter's magic cookie"); - mMagicCookieSize = propertySize; // the converter lies and tell us the wrong size - // now set the magic cookie on the output file - UInt32 willEatTheCookie = false; - // the converter wants to give us one; will the file take it? - err = AudioFileGetPropertyInfo(mAudioFile, kAudioFilePropertyMagicCookieData, - NULL, &willEatTheCookie); - if (err == noErr && willEatTheCookie) { -#if VERBOSE_CONVERTER - printf("Setting cookie on encoded file\n"); -#endif - XThrowIfError(AudioFileSetProperty(mAudioFile, kAudioFilePropertyMagicCookieData, mMagicCookieSize, mMagicCookie), "set audio file's magic cookie"); - } - } - - // get maximum packet size - propertySize = sizeof(UInt32); - XThrowIfError(AudioConverterGetProperty(mConverter, kAudioConverterPropertyMaximumOutputPacketSize, &propertySize, &mFileMaxPacketSize), "get audio converter's maximum output packet size"); - - AllocateBuffers(true /* okToFail */); - } else { - InitFileMaxPacketSize(); - } - - if (mFileChannelLayout.IsValid() && mFileChannelLayout.NumberChannels() > 2) { - // don't bother tagging mono/stereo files - UInt32 isWritable; - err = AudioFileGetPropertyInfo(mAudioFile, kAudioFilePropertyChannelLayout, NULL, &isWritable); - if (!err && isWritable) { -#if VERBOSE_CHANNELMAP - printf("writing file's channel layout: %s\n", CAChannelLayouts::ConstantToString(mFileChannelLayout.Tag())); -#endif - err = AudioFileSetProperty(mAudioFile, kAudioFilePropertyChannelLayout, - mFileChannelLayout.Size(), &mFileChannelLayout.Layout()); - if (err) - CAXException::Warning("could not set the file's channel layout", err); - } else { -#if VERBOSE_CHANNELMAP - printf("file won't accept a channel layout (write)\n"); -#endif - } - } - - UpdateClientMaxPacketSize(); // also sets mFrame0Offset - mPacketMark = 0; - mFrameMark = 0; -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::InitFileMaxPacketSize() -{ - LOG_FUNCTION("CAAudioFile::InitFileMaxPacketSize", "%p", this); - UInt32 propertySize = sizeof(UInt32); - OSStatus err = AudioFileGetProperty(mAudioFile, kAudioFilePropertyMaximumPacketSize, - &propertySize, &mFileMaxPacketSize); - if (err) { - // workaround for 3361377: not all file formats' maximum packet sizes are supported - if (!mFileDataFormat.IsPCM()) - XThrowIfError(err, "get audio file's maximum packet size"); - mFileMaxPacketSize = mFileDataFormat.mBytesPerFrame; - } - AllocateBuffers(true /* okToFail */); -} - - -// _______________________________________________________________________________________ -// -SInt64 CAAudioFile::FileDataOffset() -{ - if (mFileDataOffset < 0) { - UInt32 propertySize = sizeof(SInt64); - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyDataOffset, &propertySize, &mFileDataOffset), "couldn't get file's data offset"); - } - return mFileDataOffset; -} - -// _______________________________________________________________________________________ -// -SInt64 CAAudioFile::GetNumberFrames() const -{ - AudioFilePacketTableInfo pti; - UInt32 propertySize = sizeof(pti); - OSStatus err = AudioFileGetProperty(mAudioFile, kAudioFilePropertyPacketTableInfo, &propertySize, &pti); - if (err == noErr) - return pti.mNumberValidFrames; - return mFileDataFormat.mFramesPerPacket * GetNumberPackets() - mFrame0Offset; -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::SetNumberFrames(SInt64 nFrames) -{ - XThrowIf(mFileDataFormat.mFramesPerPacket != 1, kExtAudioFileError_InvalidDataFormat, "SetNumberFrames only supported for PCM"); - XThrowIfError(AudioFileSetProperty(mAudioFile, kAudioFilePropertyAudioDataPacketCount, sizeof(SInt64), &nFrames), "Couldn't set number of packets on audio file"); -} - -// _______________________________________________________________________________________ -// -// call for existing file, NOT new one - from Open() or Wrap() -void CAAudioFile::GetExistingFileInfo() -{ - LOG_FUNCTION("CAAudioFile::GetExistingFileInfo", "%p", this); - UInt32 propertySize; - OSStatus err; - - // get mFileDataFormat - propertySize = sizeof(AudioStreamBasicDescription); - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyDataFormat, &propertySize, &mFileDataFormat), "get audio file's data format"); - - // get mFileChannelLayout - err = AudioFileGetPropertyInfo(mAudioFile, kAudioFilePropertyChannelLayout, &propertySize, NULL); - if (err == noErr && propertySize > 0) { - AudioChannelLayout *layout = static_cast(malloc(propertySize)); - err = AudioFileGetProperty(mAudioFile, kAudioFilePropertyChannelLayout, &propertySize, layout); - if (err == noErr) { - mFileChannelLayout = layout; -#if VERBOSE_CHANNELMAP - printf("existing file's channel layout: %s\n", CAChannelLayouts::ConstantToString(mFileChannelLayout.Tag())); -#endif - } - free(layout); - XThrowIfError(err, "get audio file's channel layout"); - } - if (mMode != kReading) - return; - -#if 0 - // get mNumberPackets - propertySize = sizeof(mNumberPackets); - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyAudioDataPacketCount, &propertySize, &mNumberPackets), "get audio file's packet count"); -#if VERBOSE_IO - printf("CAAudioFile::GetExistingFileInfo: %qd packets\n", mNumberPackets); -#endif -#endif - - // get mMagicCookie - err = AudioFileGetPropertyInfo(mAudioFile, kAudioFilePropertyMagicCookieData, &propertySize, NULL); - if (err == noErr && propertySize > 0) { - mMagicCookie = new Byte[propertySize]; - mMagicCookieSize = propertySize; - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyMagicCookieData, &propertySize, mMagicCookie), "get audio file's magic cookie"); - } - InitFileMaxPacketSize(); - mPacketMark = 0; - mFrameMark = 0; - - UpdateClientMaxPacketSize(); -} - -// ======================================================================================= - -// _______________________________________________________________________________________ -// -void CAAudioFile::SetFileChannelLayout(const CAAudioChannelLayout &layout) -{ - LOG_FUNCTION("CAAudioFile::SetFileChannelLayout", "%p", this); - mFileChannelLayout = layout; -#if VERBOSE_CHANNELMAP - printf("file channel layout set explicitly (%s): %s\n", mMode == kReading ? "read" : "write", CAChannelLayouts::ConstantToString(mFileChannelLayout.Tag())); -#endif - if (mMode != kReading) - FileFormatChanged(); -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::SetClientFormat(const CAStreamBasicDescription &dataFormat, const CAAudioChannelLayout *layout) -{ - LOG_FUNCTION("CAAudioFile::SetClientFormat", "%p", this); - XThrowIf(!dataFormat.IsPCM(), kExtAudioFileError_NonPCMClientFormat, "non-PCM client format on audio file"); - - bool dataFormatChanging = (mClientDataFormat.mFormatID == 0 || mClientDataFormat != dataFormat); - - if (dataFormatChanging) { - CloseConverter(); - if (mWriteBufferList) { - delete mWriteBufferList; - mWriteBufferList = NULL; - } - mClientDataFormat = dataFormat; - } - - if (layout && layout->IsValid()) { - XThrowIf(layout->NumberChannels() != mClientDataFormat.NumberChannels(), kExtAudioFileError_InvalidChannelMap, "inappropriate channel map"); - mClientChannelLayout = *layout; - } - - bool differentLayouts; - if (mClientChannelLayout.IsValid()) { - if (mFileChannelLayout.IsValid()) { - differentLayouts = mClientChannelLayout.Tag() != mFileChannelLayout.Tag(); -#if VERBOSE_CHANNELMAP - printf("two valid layouts, %s\n", differentLayouts ? "different" : "same"); -#endif - } else { - differentLayouts = false; -#if VERBOSE_CHANNELMAP - printf("valid client layout, unknown file layout\n"); -#endif - } - } else { - differentLayouts = false; -#if VERBOSE_CHANNELMAP - if (mFileChannelLayout.IsValid()) - printf("valid file layout, unknown client layout\n"); - else - printf("two invalid layouts\n"); -#endif - } - - if (mClientDataFormat != mFileDataFormat || differentLayouts) { - // We need an AudioConverter. - if (mMode == kReading) { - // file -> client (decode) -//mFileDataFormat.PrintFormat( stdout, "", "File: "); -//mClientDataFormat.PrintFormat(stdout, "", "Client: "); - - if (mConverter == NULL) - XThrowIfError(AudioConverterNew(&mFileDataFormat, &mClientDataFormat, &mConverter), - "create audio converter"); - -#if VERBOSE_CONVERTER - printf("CAAudioFile %p -- created converter\n", this); - CAShow(mConverter); -#endif - // set the magic cookie, if any (for decode) - if (mMagicCookie) - SetConverterProperty(kAudioConverterDecompressionMagicCookie, mMagicCookieSize, mMagicCookie, mFileDataFormat.IsPCM()); - // we get cookies from some AIFF's but the converter barfs on them, - // so we set canFail to true for PCM - - SetConverterChannelLayout(false, mFileChannelLayout); - SetConverterChannelLayout(true, mClientChannelLayout); - - // propagate leading/trailing frame counts - if (mFileDataFormat.mBitsPerChannel == 0) { - UInt32 propertySize; - OSStatus err; - AudioFilePacketTableInfo pti; - propertySize = sizeof(pti); - err = AudioFileGetProperty(mAudioFile, kAudioFilePropertyPacketTableInfo, &propertySize, &pti); - if (err == noErr && (pti.mPrimingFrames > 0 || pti.mRemainderFrames > 0)) { - AudioConverterPrimeInfo primeInfo; - primeInfo.leadingFrames = pti.mPrimingFrames; - primeInfo.trailingFrames = pti.mRemainderFrames; - /* ignore any error. better to play it at all than not. */ - /*err = */AudioConverterSetProperty(mConverter, kAudioConverterPrimeInfo, sizeof(primeInfo), &primeInfo); - //XThrowIfError(err, "couldn't set prime info on converter"); - } - } - } else if (mMode == kPreparingToCreate || mMode == kPreparingToWrite) { - // client -> file (encode) - if (mConverter == NULL) - XThrowIfError(AudioConverterNew(&mClientDataFormat, &mFileDataFormat, &mConverter), "create audio converter"); - mWriteBufferList = CABufferList::New("", mClientDataFormat); - SetConverterChannelLayout(false, mClientChannelLayout); - SetConverterChannelLayout(true, mFileChannelLayout); - if (mMode == kPreparingToWrite) - FileFormatChanged(); - } else - XThrowIfError(kExtAudioFileError_InvalidOperationOrder, "audio file format not yet known"); - } - UpdateClientMaxPacketSize(); -} - -// _______________________________________________________________________________________ -// -OSStatus CAAudioFile::SetConverterProperty( - AudioConverterPropertyID inPropertyID, - UInt32 inPropertyDataSize, - const void* inPropertyData, - bool inCanFail) -{ - OSStatus err = noErr; - //LOG_FUNCTION("ExtAudioFile::SetConverterProperty", "%p %-4.4s", this, (char *)&inPropertyID); - if (inPropertyID == kAudioConverterPropertySettings && *(CFPropertyListRef *)inPropertyData == NULL) - ; - else { - err = AudioConverterSetProperty(mConverter, inPropertyID, inPropertyDataSize, inPropertyData); - if (!inCanFail) { - XThrowIfError(err, "set audio converter property"); - } - } - UpdateClientMaxPacketSize(); - if (mMode == kPreparingToWrite) - FileFormatChanged(); - return err; -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::SetConverterChannelLayout(bool output, const CAAudioChannelLayout &layout) -{ - LOG_FUNCTION("CAAudioFile::SetConverterChannelLayout", "%p", this); - OSStatus err; - - if (layout.IsValid()) { -#if VERBOSE_CHANNELMAP - printf("Setting converter's %s channel layout: %s\n", output ? "output" : "input", - CAChannelLayouts::ConstantToString(mFileChannelLayout.Tag())); -#endif - if (output) { - err = AudioConverterSetProperty(mConverter, kAudioConverterOutputChannelLayout, - layout.Size(), &layout.Layout()); - XThrowIf(err && err != kAudioConverterErr_OperationNotSupported, err, "couldn't set converter's output channel layout"); - } else { - err = AudioConverterSetProperty(mConverter, kAudioConverterInputChannelLayout, - layout.Size(), &layout.Layout()); - XThrowIf(err && err != kAudioConverterErr_OperationNotSupported, err, "couldn't set converter's input channel layout"); - } - if (mMode == kPreparingToWrite) - FileFormatChanged(); - } -} - -// _______________________________________________________________________________________ -// -CFArrayRef CAAudioFile::GetConverterConfig() -{ - CFArrayRef plist; - UInt32 propertySize = sizeof(plist); - XThrowIfError(AudioConverterGetProperty(mConverter, kAudioConverterPropertySettings, &propertySize, &plist), "get converter property settings"); - return plist; -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::UpdateClientMaxPacketSize() -{ - LOG_FUNCTION("CAAudioFile::UpdateClientMaxPacketSize", "%p", this); - mFrame0Offset = 0; - if (mConverter != NULL) { - AudioConverterPropertyID property = (mMode == kReading) ? - kAudioConverterPropertyMaximumOutputPacketSize : - kAudioConverterPropertyMaximumInputPacketSize; - - UInt32 propertySize = sizeof(UInt32); - XThrowIfError(AudioConverterGetProperty(mConverter, property, &propertySize, &mClientMaxPacketSize), - "get audio converter's maximum packet size"); - - if (mFileDataFormat.mBitsPerChannel == 0) { - AudioConverterPrimeInfo primeInfo; - propertySize = sizeof(primeInfo); - OSStatus err = AudioConverterGetProperty(mConverter, kAudioConverterPrimeInfo, &propertySize, &primeInfo); - if (err == noErr) - mFrame0Offset = primeInfo.leadingFrames; -#if VERBOSE_CONVERTER - printf("kAudioConverterPrimeInfo: err = %ld, leadingFrames = %ld\n", err, mFrame0Offset); -#endif - } - } else { - mClientMaxPacketSize = mFileMaxPacketSize; - } -} - -// _______________________________________________________________________________________ -// Allocates: mIOBufferList, mIOBufferSizePackets, mPacketDescs -// Dependent on: mFileMaxPacketSize, mIOBufferSizeBytes -void CAAudioFile::AllocateBuffers(bool okToFail) -{ - LOG_FUNCTION("CAAudioFile::AllocateBuffers", "%p", this); - if (mFileMaxPacketSize == 0) { - if (okToFail) - return; - XThrowIf(true, kExtAudioFileError_MaxPacketSizeUnknown, "file's maximum packet size is 0"); - } - UInt32 bufferSizeBytes = mIOBufferSizeBytes = std::max(mIOBufferSizeBytes, mFileMaxPacketSize); - // must be big enough for at least one maximum size packet - - if (mIOBufferList.mBuffers[0].mDataByteSize != bufferSizeBytes) { - mIOBufferList.mNumberBuffers = 1; - mIOBufferList.mBuffers[0].mNumberChannels = mFileDataFormat.mChannelsPerFrame; - if (!mClientOwnsIOBuffer) { - //printf("reallocating I/O buffer\n"); - delete[] (Byte *)mIOBufferList.mBuffers[0].mData; - mIOBufferList.mBuffers[0].mData = new Byte[bufferSizeBytes]; - } - mIOBufferList.mBuffers[0].mDataByteSize = bufferSizeBytes; - mIOBufferSizePackets = bufferSizeBytes / mFileMaxPacketSize; - } - - UInt32 propertySize = sizeof(UInt32); - UInt32 externallyFramed; - XThrowIfError(AudioFormatGetProperty(kAudioFormatProperty_FormatIsExternallyFramed, - sizeof(AudioStreamBasicDescription), &mFileDataFormat, &propertySize, &externallyFramed), - "is format externally framed"); - if (mNumPacketDescs != (externallyFramed ? mIOBufferSizePackets : 0)) { - delete[] mPacketDescs; - mPacketDescs = NULL; - mNumPacketDescs = 0; - - if (externallyFramed) { - //printf("reallocating packet descs\n"); - mPacketDescs = new AudioStreamPacketDescription[mIOBufferSizePackets]; - mNumPacketDescs = mIOBufferSizePackets; - } - } -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::SetIOBuffer(void *buf) -{ - if (!mClientOwnsIOBuffer) - delete[] (Byte *)mIOBufferList.mBuffers[0].mData; - mIOBufferList.mBuffers[0].mData = buf; - - if (buf == NULL) { - mClientOwnsIOBuffer = false; - SetIOBufferSizeBytes(mIOBufferSizeBytes); - } else { - mClientOwnsIOBuffer = true; - AllocateBuffers(); - } -// printf("CAAudioFile::SetIOBuffer %p: %p, 0x%lx bytes, mClientOwns = %d\n", this, mIOBufferList.mBuffers[0].mData, mIOBufferSizeBytes, mClientOwnsIOBuffer); -} - -// =============================================================================== - -/* -For Tiger: -added kAudioFilePropertyPacketToFrame and kAudioFilePropertyFrameToPacket. -You pass in an AudioFramePacketTranslation struct, with the appropriate field filled in, to AudioFileGetProperty. - - kAudioFilePropertyPacketToFrame = 'pkfr', - // pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back. mFrameOffsetInPacket is ignored. - kAudioFilePropertyFrameToPacket = 'frpk', - // pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and mFrameOffsetInPacket back. - -struct AudioFramePacketTranslation -{ - SInt64 mFrame; - SInt64 mPacket; - UInt32 mFrameOffsetInPacket; -}; -*/ - -SInt64 CAAudioFile::PacketToFrame(SInt64 packet) const -{ - AudioFramePacketTranslation trans; - UInt32 propertySize; - - switch (mFileDataFormat.mFramesPerPacket) { - case 1: - return packet; - case 0: - trans.mPacket = packet; - propertySize = sizeof(trans); - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyPacketToFrame, &propertySize, &trans), - "packet <-> frame translation unimplemented for format with variable frames/packet"); - return trans.mFrame; - } - return packet * mFileDataFormat.mFramesPerPacket; -} - -SInt64 CAAudioFile::FrameToPacket(SInt64 inFrame) const -{ - AudioFramePacketTranslation trans; - UInt32 propertySize; - - switch (mFileDataFormat.mFramesPerPacket) { - case 1: - return inFrame; - case 0: - trans.mFrame = inFrame; - propertySize = sizeof(trans); - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyFrameToPacket, &propertySize, &trans), - "packet <-> frame translation unimplemented for format with variable frames/packet"); - return trans.mPacket; - } - return inFrame / mFileDataFormat.mFramesPerPacket; -} - -// _______________________________________________________________________________________ -// - -SInt64 CAAudioFile::Tell() const // frameNumber -{ - return mFrameMark - mFrame0Offset; -} - -void CAAudioFile::SeekToPacket(SInt64 packetNumber) -{ -#if VERBOSE_IO - printf("CAAudioFile::SeekToPacket: %qd\n", packetNumber); -#endif - XThrowIf(mMode != kReading || packetNumber < 0 /*|| packetNumber >= mNumberPackets*/ , kExtAudioFileError_InvalidSeek, "seek to packet in audio file"); - if (mPacketMark == packetNumber) - return; // already there! don't reset converter - mPacketMark = packetNumber; - - mFrameMark = PacketToFrame(packetNumber) - mFrame0Offset; - mFramesToSkipFollowingSeek = 0; - if (mConverter) - // must reset -- if we reached end of stream. converter will no longer work otherwise - AudioConverterReset(mConverter); -} - -/* - Example: AAC, 1024 frames/packet, 2112 frame offset - - 2112 - | - Absolute frames: 0 1024 2048 | 3072 - +---------+---------+--|------+---------+---------+ - Packets: | 0 | 1 | | 2 | 3 | 4 | - +---------+---------+--|------+---------+---------+ - Client frames: -2112 -1088 -64 | 960 SeekToFrame, TellFrame - | - 0 - - * Offset between absolute and client frames is mFrame0Offset. - *** mFrameMark is in client frames *** - - Examples: - clientFrame 0 960 1000 1024 - absoluteFrame 2112 3072 3112 3136 - packet 0 0 0 1 - tempFrameMark* -2112 -2112 -2112 -1088 - mFramesToSkipFollowingSeek 2112 3072 3112 2112 -*/ -void CAAudioFile::Seek(SInt64 clientFrame) -{ - if (clientFrame == mFrameMark) - return; // already there! don't reset converter - - //SInt64 absoluteFrame = clientFrame + mFrame0Offset; - XThrowIf(mMode != kReading || clientFrame < 0 || !mClientDataFormat.IsPCM(), kExtAudioFileError_InvalidSeek, "seek to frame in audio file"); - -#if VERBOSE_IO - SInt64 prevFrameMark = mFrameMark; -#endif - - SInt64 packet; - packet = FrameToPacket(clientFrame); - if (packet < 0) - packet = 0; - SeekToPacket(packet); - // this will have backed up mFrameMark to match the beginning of the packet - mFramesToSkipFollowingSeek = std::max(UInt32(clientFrame - mFrameMark), UInt32(0)); - mFrameMark = clientFrame; - -#if VERBOSE_IO - printf("CAAudioFile::SeekToFrame: frame %qd (from %qd), packet %qd, skip %ld frames\n", mFrameMark, prevFrameMark, packet, mFramesToSkipFollowingSeek); -#endif -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::Read(UInt32 &ioNumPackets, AudioBufferList *ioData) - // May read fewer packets than requested if: - // buffer is not big enough - // file does not contain that many more packets - // Note that eofErr is not fatal, just results in 0 packets returned - // ioData's buffer sizes may be shortened -{ - XThrowIf(mClientMaxPacketSize == 0, kExtAudioFileError_MaxPacketSizeUnknown, "client maximum packet size is 0"); - if (mIOBufferList.mBuffers[0].mData == NULL) { -#if DEBUG - printf("warning: CAAudioFile::AllocateBuffers called from ReadPackets\n"); -#endif - AllocateBuffers(); - } - UInt32 bufferSizeBytes = ioData->mBuffers[0].mDataByteSize; - UInt32 maxNumPackets = bufferSizeBytes / mClientMaxPacketSize; - // older versions of AudioConverterFillComplexBuffer don't do this, so do our own sanity check - UInt32 nPackets = std::min(ioNumPackets, maxNumPackets); - - mMaxPacketsToRead = ~0UL; - - if (mClientDataFormat.mFramesPerPacket == 1) { // PCM or equivalent - while (mFramesToSkipFollowingSeek > 0) { - UInt32 skipFrames = std::min(mFramesToSkipFollowingSeek, maxNumPackets); - UInt32 framesPerPacket; - if ((framesPerPacket=mFileDataFormat.mFramesPerPacket) > 0) - mMaxPacketsToRead = (skipFrames + framesPerPacket - 1) / framesPerPacket; - - if (mConverter == NULL) { - XThrowIfError(ReadInputProc(NULL, &skipFrames, ioData, NULL, this), "read audio file"); - } else { -#if CAAUDIOFILE_PROFILE - mInConverter = true; -#endif - StartTiming(this, fill); - XThrowIfError(AudioConverterFillComplexBuffer(mConverter, ReadInputProc, this, &skipFrames, ioData, NULL), "convert audio packets (pcm read)"); - ElapsedTime(this, fill, mTicksInConverter); -#if CAAUDIOFILE_PROFILE - mInConverter = false; -#endif - } - if (skipFrames == 0) { // hit EOF - ioNumPackets = 0; - return; - } - mFrameMark += skipFrames; -#if VERBOSE_IO - printf("CAAudioFile::ReadPackets: skipped %ld frames\n", skipFrames); -#endif - - mFramesToSkipFollowingSeek -= skipFrames; - - // restore mDataByteSize - for (int i = ioData->mNumberBuffers; --i >= 0 ; ) - ioData->mBuffers[i].mDataByteSize = bufferSizeBytes; - } - } - - if (mFileDataFormat.mFramesPerPacket > 0) - // don't read more packets than we are being asked to produce - mMaxPacketsToRead = nPackets / mFileDataFormat.mFramesPerPacket + 1; - if (mConverter == NULL) { - XThrowIfError(ReadInputProc(NULL, &nPackets, ioData, NULL, this), "read audio file"); - } else { -#if CAAUDIOFILE_PROFILE - mInConverter = true; -#endif - StartTiming(this, fill); - XThrowIfError(AudioConverterFillComplexBuffer(mConverter, ReadInputProc, this, &nPackets, ioData, NULL), "convert audio packets (read)"); - ElapsedTime(this, fill, mTicksInConverter); -#if CAAUDIOFILE_PROFILE - mInConverter = false; -#endif - } - if (mClientDataFormat.mFramesPerPacket == 1) - mFrameMark += nPackets; - - ioNumPackets = nPackets; -} - -// _______________________________________________________________________________________ -// -OSStatus CAAudioFile::ReadInputProc( AudioConverterRef inAudioConverter, - UInt32* ioNumberDataPackets, - AudioBufferList* ioData, - AudioStreamPacketDescription** outDataPacketDescription, - void* inUserData) -{ - CAAudioFile *This = static_cast(inUserData); - -#if 0 - SInt64 remainingPacketsInFile = This->mNumberPackets - This->mPacketMark; - if (remainingPacketsInFile <= 0) { - *ioNumberDataPackets = 0; - ioData->mBuffers[0].mDataByteSize = 0; - if (outDataPacketDescription) - *outDataPacketDescription = This->mPacketDescs; -#if VERBOSE_IO - printf("CAAudioFile::ReadInputProc: EOF\n"); -#endif - return noErr; // not eofErr; EOF is signified by 0 packets/0 bytes - } -#endif - - // determine how much to read - AudioBufferList *readBuffer; - UInt32 readPackets; - if (inAudioConverter != NULL) { - // getting called from converter, need to use our I/O buffer - readBuffer = &This->mIOBufferList; - readPackets = This->mIOBufferSizePackets; - } else { - // getting called directly from ReadPackets, use supplied buffer - if (This->mFileMaxPacketSize == 0) - return kExtAudioFileError_MaxPacketSizeUnknown; - readBuffer = ioData; - readPackets = std::min(*ioNumberDataPackets, readBuffer->mBuffers[0].mDataByteSize / This->mFileMaxPacketSize); - // don't attempt to read more packets than will fit in the buffer - } - // don't try to read past EOF -// if (readPackets > remainingPacketsInFile) -// readPackets = remainingPacketsInFile; - // don't read more packets than necessary to produce the requested amount of converted data - if (readPackets > This->mMaxPacketsToRead) { -#if VERBOSE_IO - printf("CAAudioFile::ReadInputProc: limiting read to %ld packets (from %ld)\n", This->mMaxPacketsToRead, readPackets); -#endif - readPackets = This->mMaxPacketsToRead; - } - - // read - UInt32 bytesRead; - OSStatus err; - - StartTiming(This, read); - StartTiming(This, readinconv); - err = AudioFileReadPackets(This->mAudioFile, This->mUseCache, &bytesRead, This->mPacketDescs, This->mPacketMark, &readPackets, readBuffer->mBuffers[0].mData); -#if CAAUDIOFILE_PROFILE - if (This->mInConverter) ElapsedTime(This, readinconv, This->mTicksInReadInConverter); -#endif - ElapsedTime(This, read, This->mTicksInIO); - - if (err) { - DebugMessageN1("Error %ld from AudioFileReadPackets!!!\n", err); - return err; - } - -#if VERBOSE_IO - printf("CAAudioFile::ReadInputProc: read %ld packets (%qd-%qd), %ld bytes, err %ld\n", readPackets, This->mPacketMark, This->mPacketMark + readPackets, bytesRead, err); -#if VERBOSE_IO >= 2 - if (This->mPacketDescs) { - for (UInt32 i = 0; i < readPackets; ++i) { - printf(" read packet %qd : offset %qd, length %ld\n", This->mPacketMark + i, This->mPacketDescs[i].mStartOffset, This->mPacketDescs[i].mDataByteSize); - } - } - printf(" read buffer:"); CAShowAudioBufferList(readBuffer, 0, 4); -#endif -#endif - if (readPackets == 0) { - *ioNumberDataPackets = 0; - ioData->mBuffers[0].mDataByteSize = 0; - return noErr; - } - - if (outDataPacketDescription) - *outDataPacketDescription = This->mPacketDescs; - ioData->mBuffers[0].mDataByteSize = bytesRead; - ioData->mBuffers[0].mData = readBuffer->mBuffers[0].mData; - - This->mPacketMark += readPackets; - if (This->mClientDataFormat.mFramesPerPacket != 1) { // for PCM client formats we update in Read - // but for non-PCM client format (weird case) we must update here/now - if (This->mFileDataFormat.mFramesPerPacket > 0) - This->mFrameMark += readPackets * This->mFileDataFormat.mFramesPerPacket; - else { - for (UInt32 i = 0; i < readPackets; ++i) - This->mFrameMark += This->mPacketDescs[i].mVariableFramesInPacket; - } - } - *ioNumberDataPackets = readPackets; - return noErr; -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::Write(UInt32 numPackets, const AudioBufferList *data) -{ - if (mIOBufferList.mBuffers[0].mData == NULL) { -#if DEBUG - printf("warning: CAAudioFile::AllocateBuffers called from WritePackets\n"); -#endif - AllocateBuffers(); - } - - if (mMode == kPreparingToWrite) - mMode = kWriting; - else - XThrowIf(mMode != kWriting, kExtAudioFileError_InvalidOperationOrder, "can't write to this file"); - if (mConverter != NULL) { - mWritePackets = numPackets; - mWriteBufferList->SetFrom(data); - WritePacketsFromCallback(WriteInputProc, this); - } else { - StartTiming(this, write); - XThrowIfError(AudioFileWritePackets(mAudioFile, mUseCache, data->mBuffers[0].mDataByteSize, - NULL, mPacketMark, &numPackets, data->mBuffers[0].mData), - "write audio file"); - ElapsedTime(this, write, mTicksInIO); -#if VERBOSE_IO - printf("CAAudioFile::WritePackets: wrote %ld packets at %qd, %ld bytes\n", numPackets, mPacketMark, data->mBuffers[0].mDataByteSize); -#endif - //mNumberPackets = - mPacketMark += numPackets; - if (mFileDataFormat.mFramesPerPacket > 0) - mFrameMark += numPackets * mFileDataFormat.mFramesPerPacket; - // else: shouldn't happen since we're only called when there's no converter - } -} - -// _______________________________________________________________________________________ -// -void CAAudioFile::FlushEncoder() -{ - if (mConverter != NULL) { - mFinishingEncoding = true; - WritePacketsFromCallback(WriteInputProc, this); - mFinishingEncoding = false; - - // get priming info from converter, set it on the file - if (mFileDataFormat.mBitsPerChannel == 0) { - UInt32 propertySize; - OSStatus err; - AudioConverterPrimeInfo primeInfo; - propertySize = sizeof(primeInfo); - - err = AudioConverterGetProperty(mConverter, kAudioConverterPrimeInfo, &propertySize, &primeInfo); - if (err == noErr) { - AudioFilePacketTableInfo pti; - propertySize = sizeof(pti); - err = AudioFileGetProperty(mAudioFile, kAudioFilePropertyPacketTableInfo, &propertySize, &pti); - if (err == noErr) { -//printf("old packet table info: %qd valid, %ld priming, %ld remainder\n", pti.mNumberValidFrames, pti.mPrimingFrames, pti.mRemainderFrames); - UInt64 totalFrames = pti.mNumberValidFrames + pti.mPrimingFrames + pti.mRemainderFrames; - pti.mPrimingFrames = primeInfo.leadingFrames; - pti.mRemainderFrames = primeInfo.trailingFrames; - pti.mNumberValidFrames = totalFrames - pti.mPrimingFrames - pti.mRemainderFrames; -//printf("new packet table info: %qd valid, %ld priming, %ld remainder\n", pti.mNumberValidFrames, pti.mPrimingFrames, pti.mRemainderFrames); - XThrowIfError(AudioFileSetProperty(mAudioFile, kAudioFilePropertyPacketTableInfo, sizeof(pti), &pti), "couldn't set packet table info on audio file"); - } - } - } - } -} - -// _______________________________________________________________________________________ -// -OSStatus CAAudioFile::WriteInputProc( AudioConverterRef /*inAudioConverter*/, - UInt32 * ioNumberDataPackets, - AudioBufferList* ioData, - AudioStreamPacketDescription ** outDataPacketDescription, - void* inUserData) -{ - CAAudioFile *This = static_cast(inUserData); - if (This->mFinishingEncoding) { - *ioNumberDataPackets = 0; - ioData->mBuffers[0].mDataByteSize = 0; - ioData->mBuffers[0].mData = NULL; - if (outDataPacketDescription) - *outDataPacketDescription = NULL; - return noErr; - } - UInt32 numPackets = This->mWritePackets; - if (numPackets == 0) { - return kNoMoreInputRightNow; - } - This->mWriteBufferList->ToAudioBufferList(ioData); - This->mWriteBufferList->BytesConsumed(numPackets * This->mClientDataFormat.mBytesPerFrame); - *ioNumberDataPackets = numPackets; - if (outDataPacketDescription) - *outDataPacketDescription = NULL; - This->mWritePackets -= numPackets; - return noErr; -} - -// _______________________________________________________________________________________ -// -#if VERBOSE_IO -static void hexdump(const void *addr, long len) -{ - const Byte *p = (Byte *)addr; - UInt32 offset = 0; - - if (len > 0x400) len = 0x400; - - while (len > 0) { - int n = len > 16 ? 16 : len; - printf("%08lX: ", offset); - for (int i = 0; i < 16; ++i) - if (i < n) - printf("%02X ", p[i]); - else printf(" "); - for (int i = 0; i < 16; ++i) - if (i < n) - putchar(p[i] >= ' ' && p[i] < 127 ? p[i] : '.'); - else putchar(' '); - putchar('\n'); - p += 16; - len -= 16; - offset += 16; - } -} -#endif - -// _______________________________________________________________________________________ -// -void CAAudioFile::WritePacketsFromCallback( - AudioConverterComplexInputDataProc inInputDataProc, - void * inInputDataProcUserData) -{ - while (true) { - // keep writing until we exhaust the input (temporary stop), or produce no output (EOF) - UInt32 numEncodedPackets = mIOBufferSizePackets; - mIOBufferList.mBuffers[0].mDataByteSize = mIOBufferSizeBytes; -#if CAAUDIOFILE_PROFILE - mInConverter = true; -#endif - StartTiming(this, fill); - OSStatus err = AudioConverterFillComplexBuffer(mConverter, inInputDataProc, inInputDataProcUserData, - &numEncodedPackets, &mIOBufferList, mPacketDescs); - ElapsedTime(this, fill, mTicksInConverter); -#if CAAUDIOFILE_PROFILE - mInConverter = false; -#endif - XThrowIf(err != 0 && err != kNoMoreInputRightNow, err, "convert audio packets (write)"); - if (numEncodedPackets == 0) - break; - Byte *buf = (Byte *)mIOBufferList.mBuffers[0].mData; -#if VERBOSE_IO - printf("CAAudioFile::WritePacketsFromCallback: wrote %ld packets, %ld bytes\n", numEncodedPackets, mIOBufferList.mBuffers[0].mDataByteSize); - if (mPacketDescs) { - for (UInt32 i = 0; i < numEncodedPackets; ++i) { - printf(" write packet %qd : offset %qd, length %ld\n", mPacketMark + i, mPacketDescs[i].mStartOffset, mPacketDescs[i].mDataByteSize); -#if VERBOSE_IO >= 2 - hexdump(buf + mPacketDescs[i].mStartOffset, mPacketDescs[i].mDataByteSize); -#endif - } - } -#endif - StartTiming(this, write); - XThrowIfError(AudioFileWritePackets(mAudioFile, mUseCache, mIOBufferList.mBuffers[0].mDataByteSize, mPacketDescs, mPacketMark, &numEncodedPackets, buf), "write audio file"); - ElapsedTime(this, write, mTicksInIO); - mPacketMark += numEncodedPackets; - //mNumberPackets += numEncodedPackets; - if (mFileDataFormat.mFramesPerPacket > 0) - mFrameMark += numEncodedPackets * mFileDataFormat.mFramesPerPacket; - else { - for (UInt32 i = 0; i < numEncodedPackets; ++i) - mFrameMark += mPacketDescs[i].mVariableFramesInPacket; - } - if (err == kNoMoreInputRightNow) - break; - } -} - -#endif // !CAAF_USE_EXTAUDIOFILE diff --git a/libs/appleutility/CAAudioFile.h b/libs/appleutility/CAAudioFile.h deleted file mode 100644 index 2cfb4f3031..0000000000 --- a/libs/appleutility/CAAudioFile.h +++ /dev/null @@ -1,439 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioFile.h - -=============================================================================*/ - -#ifndef __CAAudioFile_h__ -#define __CAAudioFile_h__ - -#include - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -#include "CAStreamBasicDescription.h" -#include "CABufferList.h" -#include "CAAudioChannelLayout.h" -#include "CAXException.h" -#include "CAMath.h" - -#ifndef CAAF_USE_EXTAUDIOFILE -// option: use AudioToolbox/ExtAudioFile.h? Only available on Tiger. - #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_3 - // we are building software that must be deployable on Panther or earlier - #define CAAF_USE_EXTAUDIOFILE 0 - #else - // else we require Tiger and can use the API - #define CAAF_USE_EXTAUDIOFILE 1 - #endif -#endif - -#ifndef MAC_OS_X_VERSION_10_4 - // we have pre-Tiger headers; add our own declarations - typedef UInt32 AudioFileTypeID; - enum { - kExtAudioFileError_InvalidProperty = -66561, - kExtAudioFileError_InvalidPropertySize = -66562, - kExtAudioFileError_NonPCMClientFormat = -66563, - kExtAudioFileError_InvalidChannelMap = -66564, // number of channels doesn't match format - kExtAudioFileError_InvalidOperationOrder = -66565, - kExtAudioFileError_InvalidDataFormat = -66566, - kExtAudioFileError_MaxPacketSizeUnknown = -66567, - kExtAudioFileError_InvalidSeek = -66568, // writing, or offset out of bounds - kExtAudioFileError_AsyncWriteTooLarge = -66569, - kExtAudioFileError_AsyncWriteBufferOverflow = -66570 // an async write could not be completed in time - }; -#else - #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #else - #include "ExtendedAudioFile.h" - #endif -#endif - -// _______________________________________________________________________________________ -// Wrapper class for an AudioFile, supporting encode/decode to/from a PCM client format -class CAAudioFile { -public: - // implementation-independent helpers - void Open(const char *filePath) { - FSRef fsref; - XThrowIfError(FSPathMakeRef((UInt8 *)filePath, &fsref, NULL), "locate audio file"); - Open(fsref); - } - - bool HasConverter() const { return GetConverter() != NULL; } - - double GetDurationSeconds() { - double sr = GetFileDataFormat().mSampleRate; - return fnonzero(sr) ? GetNumberFrames() / sr : 0.; - } - // will be 0 if the file's frames/packet is 0 (variable) - // or the file's sample rate is 0 (unknown) - -#if CAAF_USE_EXTAUDIOFILE -public: - CAAudioFile() : mExtAF(NULL) { } - virtual ~CAAudioFile() { if (mExtAF) Close(); } - - void Open(const FSRef &fsref) { - // open an existing file - XThrowIfError(ExtAudioFileOpen(&fsref, &mExtAF), "ExtAudioFileOpen failed"); - } - - void CreateNew(const FSRef &inParentDir, CFStringRef inFileName, AudioFileTypeID inFileType, const AudioStreamBasicDescription &inStreamDesc, const AudioChannelLayout *inChannelLayout=NULL) { - XThrowIfError(ExtAudioFileCreateNew(&inParentDir, inFileName, inFileType, &inStreamDesc, inChannelLayout, &mExtAF), "ExtAudioFileCreateNew failed"); - } - - void Wrap(AudioFileID fileID, bool forWriting) { - // use this to wrap an AudioFileID opened externally - XThrowIfError(ExtAudioFileWrapAudioFileID(fileID, forWriting, &mExtAF), "ExtAudioFileWrapAudioFileID failed"); - } - - void Close() { - XThrowIfError(ExtAudioFileDispose(mExtAF), "ExtAudioFileClose failed"); - mExtAF = NULL; - } - - const CAStreamBasicDescription &GetFileDataFormat() { - UInt32 size = sizeof(mFileDataFormat); - XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_FileDataFormat, &size, &mFileDataFormat), "Couldn't get file's data format"); - return mFileDataFormat; - } - - const CAAudioChannelLayout & GetFileChannelLayout() { - return FetchChannelLayout(mFileChannelLayout, kExtAudioFileProperty_FileChannelLayout); - } - - void SetFileChannelLayout(const CAAudioChannelLayout &layout) { - XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_FileChannelLayout, layout.Size(), &layout.Layout()), "Couldn't set file's channel layout"); - mFileChannelLayout = layout; - } - - const CAStreamBasicDescription &GetClientDataFormat() { - UInt32 size = sizeof(mClientDataFormat); - XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_ClientDataFormat, &size, &mClientDataFormat), "Couldn't get client data format"); - return mClientDataFormat; - } - - const CAAudioChannelLayout & GetClientChannelLayout() { - return FetchChannelLayout(mClientChannelLayout, kExtAudioFileProperty_ClientChannelLayout); - } - - void SetClientFormat(const CAStreamBasicDescription &dataFormat, const CAAudioChannelLayout *layout=NULL) { - XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_ClientDataFormat, sizeof(dataFormat), &dataFormat), "Couldn't set client format"); - if (layout) - SetClientChannelLayout(*layout); - } - - void SetClientChannelLayout(const CAAudioChannelLayout &layout) { - XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_ClientChannelLayout, layout.Size(), &layout.Layout()), "Couldn't set client channel layout"); - } - - AudioConverterRef GetConverter() const { - UInt32 size = sizeof(AudioConverterRef); - AudioConverterRef converter; - XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_AudioConverter, &size, &converter), "Couldn't get file's AudioConverter"); - return converter; - } - - OSStatus SetConverterProperty(AudioConverterPropertyID inPropertyID, UInt32 inPropertyDataSize, const void *inPropertyData, bool inCanFail=false) - { - OSStatus err = AudioConverterSetProperty(GetConverter(), inPropertyID, inPropertyDataSize, inPropertyData); - if (!inCanFail) - XThrowIfError(err, "Couldn't set audio converter property"); - if (!err) { - // must tell the file that we have changed the converter; a NULL converter config is sufficient - CFPropertyListRef config = NULL; - XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_ConverterConfig, sizeof(CFPropertyListRef), &config), "couldn't signal the file that the converter has changed"); - } - return err; - } - - SInt64 GetNumberFrames() { - SInt64 length; - UInt32 size = sizeof(SInt64); - XThrowIfError(ExtAudioFileGetProperty(mExtAF, kExtAudioFileProperty_FileLengthFrames, &size, &length), "Couldn't get file's length"); - return length; - } - - void SetNumberFrames(SInt64 length) { - XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_FileLengthFrames, sizeof(SInt64), &length), "Couldn't set file's length"); - } - - void Seek(SInt64 pos) { - XThrowIfError(ExtAudioFileSeek(mExtAF, pos), "Couldn't seek in audio file"); - } - - SInt64 Tell() { - SInt64 pos; - XThrowIfError(ExtAudioFileTell(mExtAF, &pos), "Couldn't get file's mark"); - return pos; - } - - void Read(UInt32 &ioFrames, AudioBufferList *ioData) { - XThrowIfError(ExtAudioFileRead(mExtAF, &ioFrames, ioData), "Couldn't read audio file"); - } - - void Write(UInt32 inFrames, const AudioBufferList *inData) { - XThrowIfError(ExtAudioFileWrite(mExtAF, inFrames, inData), "Couldn't write audio file"); - } - - void SetIOBufferSizeBytes(UInt32 bufferSizeBytes) { - XThrowIfError(ExtAudioFileSetProperty(mExtAF, kExtAudioFileProperty_IOBufferSizeBytes, sizeof(UInt32), &bufferSizeBytes), "Couldn't set audio file's I/O buffer size"); - } - -private: - const CAAudioChannelLayout & FetchChannelLayout(CAAudioChannelLayout &layoutObj, ExtAudioFilePropertyID propID) { - UInt32 size; - XThrowIfError(ExtAudioFileGetPropertyInfo(mExtAF, propID, &size, NULL), "Couldn't get info about channel layout"); - AudioChannelLayout *layout = (AudioChannelLayout *)malloc(size); - OSStatus err = ExtAudioFileGetProperty(mExtAF, propID, &size, layout); - if (err) { - free(layout); - XThrowIfError(err, "Couldn't get channel layout"); - } - layoutObj = layout; - free(layout); - return layoutObj; - } - - -private: - ExtAudioFileRef mExtAF; - - CAStreamBasicDescription mFileDataFormat; - CAAudioChannelLayout mFileChannelLayout; - - CAStreamBasicDescription mClientDataFormat; - CAAudioChannelLayout mClientChannelLayout; -#endif - -#if !CAAF_USE_EXTAUDIOFILE - CAAudioFile(); - virtual ~CAAudioFile(); - - // --- second-stage initializers --- - // Use exactly one of the following: - // - Open - // - PrepareNew followed by Create - // - Wrap - - void Open(const FSRef &fsref); - // open an existing file - - void CreateNew(const FSRef &inParentDir, CFStringRef inFileName, AudioFileTypeID inFileType, const AudioStreamBasicDescription &inStreamDesc, const AudioChannelLayout *inChannelLayout=NULL); - - void Wrap(AudioFileID fileID, bool forWriting); - // use this to wrap an AudioFileID opened externally - - // --- - - void Close(); - // In case you want to close the file before the destructor executes - - // --- Data formats --- - - // Allow specifying the file's channel layout. Must be called before SetClientFormat. - // When writing, the specified channel layout is written to the file (if the file format supports - // the channel layout). When reading, the specified layout overrides the one read from the file, - // if any. - void SetFileChannelLayout(const CAAudioChannelLayout &layout); - - // This specifies the data format which the client will use for reading/writing the file, - // which may be different from the file's format. An AudioConverter is created if necessary. - // The client format must be linear PCM. - void SetClientFormat(const CAStreamBasicDescription &dataFormat, const CAAudioChannelLayout *layout=NULL); - void SetClientDataFormat(const CAStreamBasicDescription &dataFormat) { SetClientFormat(dataFormat, NULL); } - void SetClientChannelLayout(const CAAudioChannelLayout &layout) { SetClientFormat(mClientDataFormat, &layout); } - - // Wrapping the underlying converter, if there is one - OSStatus SetConverterProperty(AudioConverterPropertyID inPropertyID, - UInt32 inPropertyDataSize, - const void * inPropertyData, - bool inCanFail = false); - void SetConverterConfig(CFArrayRef config) { - SetConverterProperty(kAudioConverterPropertySettings, sizeof(config), &config); } - CFArrayRef GetConverterConfig(); - - // --- I/O --- - // All I/O is sequential, but you can seek to an arbitrary position when reading. - // SeekToPacket and TellPacket's packet numbers are in the file's data format, not the client's. - // However, ReadPackets/WritePackets use packet counts in the client data format. - - void Read(UInt32 &ioNumFrames, AudioBufferList *ioData); - void Write(UInt32 numFrames, const AudioBufferList *data); - - // These can fail for files without a constant mFramesPerPacket - void Seek(SInt64 frameNumber); - SInt64 Tell() const; // frameNumber - - // --- Accessors --- - // note: client parameters only valid if SetClientFormat has been called - AudioFileID GetAudioFileID() const { return mAudioFile; } - const CAStreamBasicDescription &GetFileDataFormat() const { return mFileDataFormat; } - const CAStreamBasicDescription &GetClientDataFormat() const { return mClientDataFormat; } - const CAAudioChannelLayout & GetFileChannelLayout() const { return mFileChannelLayout; } - const CAAudioChannelLayout & GetClientChannelLayout() const { return mClientChannelLayout; } - AudioConverterRef GetConverter() const { return mConverter; } - - UInt32 GetFileMaxPacketSize() const { return mFileMaxPacketSize; } - UInt32 GetClientMaxPacketSize() const { return mClientMaxPacketSize; } - SInt64 GetNumberPackets() const { - SInt64 npackets; - UInt32 propertySize = sizeof(npackets); - XThrowIfError(AudioFileGetProperty(mAudioFile, kAudioFilePropertyAudioDataPacketCount, &propertySize, &npackets), "get audio file's packet count"); - return npackets; - } - SInt64 GetNumberFrames() const; - // will be 0 if the file's frames/packet is 0 (variable) - void SetNumberFrames(SInt64 length); // should only be set on a PCM file - - // --- Tunable performance parameters --- - void SetUseCache(bool b) { mUseCache = b; } - void SetIOBufferSizeBytes(UInt32 bufferSizeBytes) { mIOBufferSizeBytes = bufferSizeBytes; } - UInt32 GetIOBufferSizeBytes() { return mIOBufferSizeBytes; } - void * GetIOBuffer() { return mIOBufferList.mBuffers[0].mData; } - void SetIOBuffer(void *buf); - - // -- Profiling --- -#if CAAUDIOFILE_PROFILE - void EnableProfiling(bool b) { mProfiling = b; } - UInt64 TicksInConverter() const { return (mTicksInConverter > 0) ? (mTicksInConverter - mTicksInReadInConverter) : 0; } - UInt64 TicksInIO() const { return mTicksInIO; } -#endif - -// _______________________________________________________________________________________ -private: - SInt64 FileDataOffset(); - void SeekToPacket(SInt64 packetNumber); - SInt64 TellPacket() const { return mPacketMark; } // will be imprecise if SeekToFrame was called - - void SetConverterChannelLayout(bool output, const CAAudioChannelLayout &layout); - void WritePacketsFromCallback( - AudioConverterComplexInputDataProc inInputDataProc, - void * inInputDataProcUserData); - // will use I/O buffer size - void InitFileMaxPacketSize(); - void FileFormatChanged(const FSRef *parentDir=0, CFStringRef filename=0, AudioFileTypeID filetype=0); - - void GetExistingFileInfo(); - void FlushEncoder(); - void CloseConverter(); - void UpdateClientMaxPacketSize(); - void AllocateBuffers(bool okToFail=false); - SInt64 PacketToFrame(SInt64 packet) const; - SInt64 FrameToPacket(SInt64 inFrame) const; - - static OSStatus ReadInputProc( AudioConverterRef inAudioConverter, - UInt32* ioNumberDataPackets, - AudioBufferList* ioData, - AudioStreamPacketDescription** outDataPacketDescription, - void* inUserData); - - static OSStatus WriteInputProc( AudioConverterRef inAudioConverter, - UInt32* ioNumberDataPackets, - AudioBufferList* ioData, - AudioStreamPacketDescription** outDataPacketDescription, - void* inUserData); -// _______________________________________________________________________________________ -private: - - // the file - FSRef mFSRef; - AudioFileID mAudioFile; - bool mOwnOpenFile; - bool mUseCache; - bool mFinishingEncoding; - enum { kClosed, kReading, kPreparingToCreate, kPreparingToWrite, kWriting } mMode; - -// SInt64 mNumberPackets; // in file's format - SInt64 mFileDataOffset; - SInt64 mPacketMark; // in file's format - SInt64 mFrameMark; // this may be offset from the start of the file - // by the codec's latency; i.e. our frame 0 could - // lie at frame 2112 of a decoded AAC file - SInt32 mFrame0Offset; - UInt32 mFramesToSkipFollowingSeek; - - // buffers - UInt32 mIOBufferSizeBytes; - UInt32 mIOBufferSizePackets; - AudioBufferList mIOBufferList; // only one buffer -- USE ACCESSOR so it can be lazily initialized - bool mClientOwnsIOBuffer; - AudioStreamPacketDescription *mPacketDescs; - UInt32 mNumPacketDescs; - - // formats/conversion - AudioConverterRef mConverter; - CAStreamBasicDescription mFileDataFormat; - CAStreamBasicDescription mClientDataFormat; - CAAudioChannelLayout mFileChannelLayout; - CAAudioChannelLayout mClientChannelLayout; - UInt32 mFileMaxPacketSize; - UInt32 mClientMaxPacketSize; - - // cookie - Byte * mMagicCookie; - UInt32 mMagicCookieSize; - - // for ReadPackets - UInt32 mMaxPacketsToRead; - - // for WritePackets - UInt32 mWritePackets; - CABufferList * mWriteBufferList; - -#if CAAUDIOFILE_PROFILE - // performance - bool mProfiling; - UInt64 mTicksInConverter; - UInt64 mTicksInReadInConverter; - UInt64 mTicksInIO; - bool mInConverter; -#endif - -#endif // CAAF_USE_EXTAUDIOFILE -}; - -#endif // __CAAudioFile_h__ diff --git a/libs/appleutility/CAAudioUnit.cpp b/libs/appleutility/CAAudioUnit.cpp deleted file mode 100644 index 9244877d29..0000000000 --- a/libs/appleutility/CAAudioUnit.cpp +++ /dev/null @@ -1,1202 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioUnit.cpp - -=============================================================================*/ - -#include "CAAudioUnit.h" - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -#include "CAReferenceCounted.h" -#include "AUOutputBL.h" //this is for the Preroll only - - -struct StackAUChannelInfo { - StackAUChannelInfo (UInt32 inSize) : mChanInfo ((AUChannelInfo*)malloc (inSize)) {} - ~StackAUChannelInfo() { free (mChanInfo); } - - AUChannelInfo* mChanInfo; -}; - - - -class CAAudioUnit::AUState : public CAReferenceCounted { -public: - AUState (Component inComp) - : mUnit(0), mNode (0) - { - OSStatus result = ::OpenAComponent (inComp, &mUnit); - if (result) - throw result; - Init(); - } - - AUState (const AUNode &inNode, const AudioUnit& inUnit) - : mUnit (inUnit), mNode (inNode) - { - Init(); - } - - ~AUState(); - - AudioUnit mUnit; - AUNode mNode; - - OSStatus GetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element, - Float32 &outValue) const - { - if (mGetParamProc != NULL) { - return reinterpret_cast(mGetParamProc) (mConnInstanceStorage, - inID, scope, element, &outValue); - } - return AudioUnitGetParameter(mUnit, inID, scope, element, &outValue); - } - - OSStatus SetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element, - Float32 value, UInt32 bufferOffsetFrames) - { - if (mSetParamProc != NULL) { - return reinterpret_cast(mSetParamProc) (mConnInstanceStorage, - inID, scope, element, value, bufferOffsetFrames); - } - return AudioUnitSetParameter(mUnit, inID, scope, element, value, bufferOffsetFrames); - } - - OSStatus Render (AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inOutputBusNumber, - UInt32 inNumberFrames, - AudioBufferList * ioData) - { - if (mRenderProc != NULL) { - return reinterpret_cast(mRenderProc) (mConnInstanceStorage, - ioActionFlags, inTimeStamp, inOutputBusNumber, inNumberFrames, ioData); - } - return AudioUnitRender(mUnit, ioActionFlags, inTimeStamp, inOutputBusNumber, inNumberFrames, ioData); - } - - OSStatus MIDIEvent (UInt32 inStatus, - UInt32 inData1, - UInt32 inData2, - UInt32 inOffsetSampleFrame) - { -#if !TARGET_OS_WIN32 - if (mMIDIEventProc != NULL) { - return reinterpret_cast(mMIDIEventProc) (mConnInstanceStorage, - inStatus, inData1, inData2, inOffsetSampleFrame); - } - return MusicDeviceMIDIEvent (mUnit, inStatus, inData1, inData2, inOffsetSampleFrame); -#else - return paramErr; -#endif - } - - OSStatus StartNote (MusicDeviceInstrumentID inInstrument, - MusicDeviceGroupID inGroupID, - NoteInstanceID * outNoteInstanceID, - UInt32 inOffsetSampleFrame, - const MusicDeviceNoteParams * inParams) - { -#if !TARGET_OS_WIN32 - return MusicDeviceStartNote (mUnit, inInstrument, inGroupID, outNoteInstanceID, inOffsetSampleFrame, inParams); -#else - return paramErr; -#endif - } - OSStatus StopNote (MusicDeviceGroupID inGroupID, - NoteInstanceID inNoteInstanceID, - UInt32 inOffsetSampleFrame) - { -#if !TARGET_OS_WIN32 - return MusicDeviceStopNote (mUnit, inGroupID, inNoteInstanceID, inOffsetSampleFrame); -#else - return paramErr; -#endif - } - -private: - // get the fast dispatch pointers - void Init() - { - UInt32 size = sizeof(AudioUnitRenderProc); - if (AudioUnitGetProperty(mUnit, kAudioUnitProperty_FastDispatch, - kAudioUnitScope_Global, kAudioUnitRenderSelect, - &mRenderProc, &size) != noErr) - mRenderProc = NULL; - if (AudioUnitGetProperty(mUnit, kAudioUnitProperty_FastDispatch, - kAudioUnitScope_Global, kAudioUnitGetParameterSelect, - &mGetParamProc, &size) != noErr) - mGetParamProc = NULL; - if (AudioUnitGetProperty(mUnit, kAudioUnitProperty_FastDispatch, - kAudioUnitScope_Global, kAudioUnitSetParameterSelect, - &mSetParamProc, &size) != noErr) - mSetParamProc = NULL; - - if (AudioUnitGetProperty(mUnit, kAudioUnitProperty_FastDispatch, - kAudioUnitScope_Global, kMusicDeviceMIDIEventSelect, - &mMIDIEventProc, &size) != noErr) - mMIDIEventProc = NULL; - - if (mRenderProc || mGetParamProc || mSetParamProc || mMIDIEventProc) - mConnInstanceStorage = GetComponentInstanceStorage(mUnit); - else - mConnInstanceStorage = NULL; - } - - ProcPtr mRenderProc, mGetParamProc, mSetParamProc, mMIDIEventProc; - - void * mConnInstanceStorage; - -private: - // get the compiler to tell us when we do a bad thing!!! - AUState () {} - AUState (const AUState&) {} - AUState& operator= (const AUState&) { return *this; } -}; - - -CAAudioUnit::AUState::~AUState () -{ - if (mUnit && (mNode == 0)) { - ::CloseComponent (mUnit); - } - mNode = 0; - mUnit = 0; -} - -OSStatus CAAudioUnit::Open (const CAComponent& inComp, CAAudioUnit &outUnit) -{ - try { - outUnit = inComp; - return noErr; - } catch (OSStatus res) { - return res; - } catch (...) { - return -1; - } -} - -CAAudioUnit::CAAudioUnit (const AudioUnit& inUnit) - : mComp (inUnit), mDataPtr (new AUState (-1, inUnit)) -{ -} - -CAAudioUnit::CAAudioUnit (const CAComponent& inComp) - : mComp (inComp), mDataPtr (0) -{ - mDataPtr = new AUState (mComp.Comp()); -} - -CAAudioUnit::CAAudioUnit (const AUNode &inNode, const AudioUnit& inUnit) - : mComp (inUnit), mDataPtr(new AUState (inNode, inUnit)) -{ -} - -CAAudioUnit::~CAAudioUnit () -{ - if (mDataPtr) { - mDataPtr->release(); - mDataPtr = NULL; - } -} - -CAAudioUnit& CAAudioUnit::operator= (const CAAudioUnit &a) -{ - if (mDataPtr != a.mDataPtr) { - if (mDataPtr) - mDataPtr->release(); - - if ((mDataPtr = a.mDataPtr) != NULL) - mDataPtr->retain(); - - mComp = a.mComp; - } - - return *this; -} - -bool CAAudioUnit::operator== (const CAAudioUnit& y) const -{ - if (mDataPtr == y.mDataPtr) return true; - AudioUnit au1 = mDataPtr ? mDataPtr->mUnit : 0; - AudioUnit au2 = y.mDataPtr ? y.mDataPtr->mUnit : 0; - return au1 == au2; -} - -bool CAAudioUnit::operator== (const AudioUnit& y) const -{ - if (!mDataPtr) return false; - return mDataPtr->mUnit == y; -} - -#pragma mark __State Management - -bool CAAudioUnit::IsValid () const -{ - return mDataPtr ? mDataPtr->mUnit != 0 : false; -} - -AudioUnit CAAudioUnit::AU() const -{ - return mDataPtr ? mDataPtr->mUnit : 0; -} - -AUNode CAAudioUnit::GetAUNode () const -{ - return mDataPtr ? mDataPtr->mNode : 0; -} - -#pragma mark __Format Handling - -bool CAAudioUnit::CanDo ( int inChannelsIn, - int inChannelsOut) const -{ - // this is the default assumption of an audio effect unit - Boolean* isWritable = 0; - UInt32 dataSize = 0; - // lets see if the unit has any channel restrictions - OSStatus result = AudioUnitGetPropertyInfo (AU(), - kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, - &dataSize, isWritable); //don't care if this is writable - - // if this property is NOT implemented an FX unit - // is expected to deal with same channel valance in and out - if (result) - { - if (Comp().Desc().IsEffect() && (inChannelsIn == inChannelsOut) - || Comp().Desc().IsOffline() && (inChannelsIn == inChannelsOut)) - { - return true; - } - else - { - // the au should either really tell us about this - // or we will assume the worst - return false; - } - } - - StackAUChannelInfo info (dataSize); - - result = GetProperty (kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, - info.mChanInfo, &dataSize); - if (result) { return false; } - - return ValidateChannelPair (inChannelsIn, inChannelsOut, info.mChanInfo, (dataSize / sizeof (AUChannelInfo))); -} - -bool CAAudioUnit::ValidateChannelPair (int inChannelsIn, - int inChannelsOut, - const AUChannelInfo * info, - UInt32 numChanInfo) const -{ -// we've the following cases (some combinations) to test here: -/* ->0 An explicit number of channels on either side -0 that side (generally input!) has no elements --1 wild card: --1,-1 any num channels as long as same channels on in and out --1,-2 any num channels channels on in and out - special meaning --2+ indicates total num channs AU can handle - - elements configurable to any num channels, - - element count in scope must be writable -*/ - - //now chan layout can contain -1 for either scope (ie. doesn't care) - for (unsigned int i = 0; i < numChanInfo; ++i) - { - //less than zero on both sides - check for special attributes - if ((info[i].inChannels < 0) && (info[i].outChannels < 0)) - { - // these are our wild card matches - if (info[i].inChannels == -1 && info[i].outChannels == -1) { - if (inChannelsOut == inChannelsIn) { - return true; - } - } - else if ((info[i].inChannels == -1 && info[i].outChannels == -2) - || (info[i].inChannels == -2 && info[i].outChannels == -1)) - { - return true; - } - // these are our total num channels matches - // element count MUST be writable - else { - bool outWrite = false; bool inWrite = false; - IsElementCountWritable (kAudioUnitScope_Output, outWrite); - IsElementCountWritable (kAudioUnitScope_Input, inWrite); - if (inWrite && outWrite) { - if ((inChannelsOut <= abs(info[i].outChannels)) - && (inChannelsIn <= abs(info[i].inChannels))) - { - return true; - } - } - } - } - - // special meaning on input, specific num on output - else if (info[i].inChannels < 0) { - if (info[i].outChannels == inChannelsOut) - { - // can do any in channels - if (info[i].inChannels == -1) { - return true; - } - // total chans on input - else { - bool inWrite = false; - IsElementCountWritable (kAudioUnitScope_Input, inWrite); - if (inWrite && (inChannelsIn <= abs(info[i].inChannels))) { - return true; - } - } - } - } - - // special meaning on output, specific num on input - else if (info[i].outChannels < 0) { - if (info[i].inChannels == inChannelsIn) - { - // can do any out channels - if (info[i].outChannels == -1) { - return true; - } - // total chans on output - else { - bool outWrite = false; - IsElementCountWritable (kAudioUnitScope_Output, outWrite); - if (outWrite && (inChannelsOut <= abs(info[i].outChannels))) { - return true; - } - } - } - } - - // both chans in struct >= 0 - thus has to explicitly match - else if ((info[i].inChannels == inChannelsIn) && (info[i].outChannels == inChannelsOut)) { - return true; - } - - // now check to see if a wild card on the args (inChannelsIn or inChannelsOut chans is zero) is found - // tells us to match just one side of the scopes - else if (inChannelsIn == 0) { - if (info[i].outChannels == inChannelsOut) { - return true; - } - } - else if (inChannelsOut == 0) { - if (info[i].inChannels == inChannelsIn) { - return true; - } - } - } - - return false; -} - -bool CheckDynCount (SInt32 inTotalChans, const CAAUChanHelper &inHelper) -{ - int totalChans = 0; - for (unsigned int i = 0; i < inHelper.mNumEls; ++i) - totalChans += inHelper.mChans[i]; - return (totalChans <= inTotalChans); -} - -bool CAAudioUnit::CheckOneSide (const CAAUChanHelper &inHelper, - bool checkOutput, - const AUChannelInfo *info, - UInt32 numInfo) const -{ - // now we can use the wildcard option (see above impl) to see if this matches - for (unsigned int el = 0; el < inHelper.mNumEls; ++el) { - bool testAlready = false; - for (unsigned int i = 0; i < el; ++i) { - if (inHelper.mChans[i] == inHelper.mChans[el]) { - testAlready = true; - break; - } - } - if (!testAlready) { - if (checkOutput) { - if (!ValidateChannelPair (0, inHelper.mChans[el], info, numInfo)) return false; - } else { - if (!ValidateChannelPair (inHelper.mChans[el], 0, info, numInfo)) return false; - } - } - } - return true; -} - -bool CAAudioUnit::CanDo (const CAAUChanHelper &inputs, - const CAAUChanHelper &outputs) const - -{ -// first check our state - // huh! - if (inputs.mNumEls == 0 && outputs.mNumEls == 0) return false; - - UInt32 elCount; - if (GetElementCount (kAudioUnitScope_Input, elCount)) { return false; } - if (elCount != inputs.mNumEls) return false; - - if (GetElementCount (kAudioUnitScope_Output, elCount)) { return false; } - if (elCount != outputs.mNumEls) return false; - -// (1) special cases (effects and sources (generators and instruments) only) - UInt32 dataSize = 0; - if (GetPropertyInfo (kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, &dataSize, NULL) != noErr) - { - if (Comp().Desc().IsEffect() || Comp().Desc().IsOffline()) { - UInt32 numChan = outputs.mNumEls > 0 ? outputs.mChans[0] : inputs.mChans[0]; - for (unsigned int in = 0; in < inputs.mNumEls; ++in) - if (numChan != inputs.mChans[in]) return false; - for (unsigned int out = 0; out < outputs.mNumEls; ++out) - if (numChan != outputs.mChans[out]) return false; - return true; - } - - // in this case, all the channels have to match the current config - if (Comp().Desc().IsGenerator() || Comp().Desc().IsMusicDevice()) { - for (unsigned int in = 0; in < inputs.mNumEls; ++in) { - UInt32 chan; - if (NumberChannels (kAudioUnitScope_Input, in, chan)) return false; - if (chan != UInt32(inputs.mChans[in])) return false; - } - for (unsigned int out = 0; out < outputs.mNumEls; ++out) { - UInt32 chan; - if (NumberChannels (kAudioUnitScope_Output, out, chan)) return false; - if (chan != UInt32(outputs.mChans[out])) return false; - } - return true; - } - - // if we get here we can't determine anything about channel capabilities - return false; - } - - StackAUChannelInfo info (dataSize); - - if (GetProperty (kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, - info.mChanInfo, &dataSize) != noErr) - { - return false; - } - - int numInfo = dataSize / sizeof(AUChannelInfo); - -// (2) Test for dynamic capability (or no elements on that scope) - SInt32 dynInChans = 0; - if (ValidateDynamicScope (kAudioUnitScope_Input, dynInChans, info.mChanInfo, numInfo)) { - if (CheckDynCount (dynInChans, inputs) == false) return false; - } - - SInt32 dynOutChans = 0; - if (ValidateDynamicScope (kAudioUnitScope_Output, dynOutChans, info.mChanInfo, numInfo)) { - if (CheckDynCount (dynOutChans, outputs) == false) return false; - } - - if (dynOutChans && dynInChans) { return true; } - -// (3) Just need to test one side - if (dynInChans || (inputs.mNumEls == 0)) { - return CheckOneSide (outputs, true, info.mChanInfo, numInfo); - } - - if (dynOutChans || (outputs.mNumEls == 0)) { - return CheckOneSide (inputs, false, info.mChanInfo, numInfo); - } - -// (4) - not a dynamic AU, has ins and outs, and has channel constraints so we test every possible pairing - for (unsigned int in = 0; in < inputs.mNumEls; ++in) - { - bool testInAlready = false; - for (unsigned int i = 0; i < in; ++i) { - if (inputs.mChans[i] == inputs.mChans[in]) { - testInAlready = true; - break; - } - } - if (!testInAlready) { - for (unsigned int out = 0; out < outputs.mNumEls; ++out) { - // try to save a little bit and not test the same pairing multiple times... - bool testOutAlready = false; - for (unsigned int i = 0; i < out; ++i) { - if (outputs.mChans[i] == outputs.mChans[out]) { - testOutAlready = true; - break; - } - } - if (!testOutAlready) { - if (!ValidateChannelPair (inputs.mChans[in], outputs.mChans[out],info.mChanInfo, numInfo)) { - return false; - } - } - } - } - } - - return true; -} - -bool CAAudioUnit::SupportsNumChannels () const -{ - // this is the default assumption of an audio effect unit - Boolean* isWritable = 0; - UInt32 dataSize = 0; - // lets see if the unit has any channel restrictions - OSStatus result = AudioUnitGetPropertyInfo (AU(), - kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, - &dataSize, isWritable); //don't care if this is writable - - // if this property is NOT implemented an FX unit - // is expected to deal with same channel valance in and out - if (result) { - if (Comp().Desc().IsEffect() || Comp().Desc().IsOffline()) - return true; - } - return result == noErr; -} - -bool CAAudioUnit::GetChannelLayouts (AudioUnitScope inScope, - AudioUnitElement inEl, - ChannelTagVector &outChannelVector) const -{ - if (HasChannelLayouts (inScope, inEl) == false) return false; - - UInt32 dataSize; - OSStatus result = AudioUnitGetPropertyInfo (AU(), - kAudioUnitProperty_SupportedChannelLayoutTags, - inScope, inEl, - &dataSize, NULL); - - if (result == kAudioUnitErr_InvalidProperty) { - // if we get here we can do layouts but we've got the speaker config property - outChannelVector.erase (outChannelVector.begin(), outChannelVector.end()); - outChannelVector.push_back (kAudioChannelLayoutTag_Stereo); - outChannelVector.push_back (kAudioChannelLayoutTag_StereoHeadphones); - outChannelVector.push_back (kAudioChannelLayoutTag_Quadraphonic); - outChannelVector.push_back (kAudioChannelLayoutTag_AudioUnit_5_0); - return true; - } - - if (result) return false; - - bool canDo = false; - // OK lets get our channel layouts and see if the one we want is present - AudioChannelLayoutTag* info = (AudioChannelLayoutTag*)malloc (dataSize); - result = AudioUnitGetProperty (AU(), - kAudioUnitProperty_SupportedChannelLayoutTags, - inScope, inEl, - info, &dataSize); - if (result) goto home; - - outChannelVector.erase (outChannelVector.begin(), outChannelVector.end()); - for (unsigned int i = 0; i < (dataSize / sizeof (AudioChannelLayoutTag)); ++i) - outChannelVector.push_back (info[i]); - -home: - free (info); - return canDo; -} - -bool CAAudioUnit::HasChannelLayouts (AudioUnitScope inScope, - AudioUnitElement inEl) const -{ - OSStatus result = AudioUnitGetPropertyInfo (AU(), - kAudioUnitProperty_SupportedChannelLayoutTags, - inScope, inEl, - NULL, NULL); - return !result; -} - -OSStatus CAAudioUnit::GetChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl, - CAAudioChannelLayout &outLayout) const -{ - UInt32 size; - OSStatus result = AudioUnitGetPropertyInfo (AU(), kAudioUnitProperty_AudioChannelLayout, - inScope, inEl, &size, NULL); - if (result) return result; - - AudioChannelLayout *layout = (AudioChannelLayout*)malloc (size); - - require_noerr (result = AudioUnitGetProperty (AU(), kAudioUnitProperty_AudioChannelLayout, - inScope, inEl, layout, &size), home); - - outLayout = CAAudioChannelLayout (layout); - -home: - free (layout); - return result; -} - -OSStatus CAAudioUnit::SetChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl, - CAAudioChannelLayout &inLayout) -{ - OSStatus result = AudioUnitSetProperty (AU(), - kAudioUnitProperty_AudioChannelLayout, - inScope, inEl, - inLayout, inLayout.Size()); - return result; -} - -OSStatus CAAudioUnit::SetChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl, - AudioChannelLayout &inLayout, - UInt32 inSize) -{ - OSStatus result = AudioUnitSetProperty (AU(), - kAudioUnitProperty_AudioChannelLayout, - inScope, inEl, - &inLayout, inSize); - return result; -} - -OSStatus CAAudioUnit::ClearChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl) -{ - return AudioUnitSetProperty (AU(), - kAudioUnitProperty_AudioChannelLayout, - inScope, inEl, NULL, 0); -} - -OSStatus CAAudioUnit::GetFormat (AudioUnitScope inScope, - AudioUnitElement inEl, - AudioStreamBasicDescription &outFormat) const -{ - UInt32 dataSize = sizeof (AudioStreamBasicDescription); - return AudioUnitGetProperty (AU(), kAudioUnitProperty_StreamFormat, - inScope, inEl, - &outFormat, &dataSize); -} - -OSStatus CAAudioUnit::SetFormat (AudioUnitScope inScope, - AudioUnitElement inEl, - const AudioStreamBasicDescription &inFormat) -{ - return AudioUnitSetProperty (AU(), kAudioUnitProperty_StreamFormat, - inScope, inEl, - const_cast(&inFormat), - sizeof (AudioStreamBasicDescription)); -} - -OSStatus CAAudioUnit::GetSampleRate (AudioUnitScope inScope, - AudioUnitElement inEl, - Float64 &outRate) const -{ - UInt32 dataSize = sizeof (Float64); - return AudioUnitGetProperty (AU(), kAudioUnitProperty_SampleRate, - inScope, inEl, - &outRate, &dataSize); -} - -OSStatus CAAudioUnit::SetSampleRate (AudioUnitScope inScope, - AudioUnitElement inEl, - Float64 inRate) -{ - AudioStreamBasicDescription desc; - OSStatus result = GetFormat (inScope, inEl, desc); - if (result) return result; - desc.mSampleRate = inRate; - return SetFormat (inScope, inEl, desc); -} - -OSStatus CAAudioUnit::SetSampleRate (Float64 inSampleRate) -{ - OSStatus result; - - UInt32 elCount; - require_noerr (result = GetElementCount(kAudioUnitScope_Input, elCount), home); - if (elCount) { - for (unsigned int i = 0; i < elCount; ++i) { - require_noerr (result = SetSampleRate (kAudioUnitScope_Input, i, inSampleRate), home); - } - } - - require_noerr (result = GetElementCount(kAudioUnitScope_Output, elCount), home); - if (elCount) { - for (unsigned int i = 0; i < elCount; ++i) { - require_noerr (result = SetSampleRate (kAudioUnitScope_Output, i, inSampleRate), home); - } - } - -home: - return result; -} - -OSStatus CAAudioUnit::NumberChannels (AudioUnitScope inScope, - AudioUnitElement inEl, - UInt32 &outChans) const -{ - AudioStreamBasicDescription desc; - OSStatus result = GetFormat (inScope, inEl, desc); - if (!result) - outChans = desc.mChannelsPerFrame; - return result; -} - -OSStatus CAAudioUnit::SetNumberChannels (AudioUnitScope inScope, - AudioUnitElement inEl, - UInt32 inChans) -{ - // set this as the output of the AU - CAStreamBasicDescription desc; - OSStatus result = GetFormat (inScope, inEl, desc); - if (result) return result; - desc.SetCanonical (inChans, desc.IsInterleaved()); - result = SetFormat (inScope, inEl, desc); - return result; -} - -OSStatus CAAudioUnit::IsElementCountWritable (AudioUnitScope inScope, bool &outWritable) const -{ - Boolean isWritable; - UInt32 outDataSize; - OSStatus result = GetPropertyInfo (kAudioUnitProperty_ElementCount, inScope, 0, &outDataSize, &isWritable); - if (result) - return result; - outWritable = isWritable ? true : false; - return noErr; -} - -OSStatus CAAudioUnit::GetElementCount (AudioUnitScope inScope, UInt32 &outCount) const -{ - UInt32 propSize = sizeof(outCount); - return GetProperty (kAudioUnitProperty_ElementCount, inScope, 0, &outCount, &propSize); -} - -OSStatus CAAudioUnit::SetElementCount (AudioUnitScope inScope, UInt32 inCount) -{ - return SetProperty (kAudioUnitProperty_ElementCount, inScope, 0, &inCount, sizeof(inCount)); -} - -bool CAAudioUnit::HasDynamicScope (AudioUnitScope inScope, SInt32 &outTotalNumChannels) const -{ - // ok - now we need to check the AU's capability here. - // this is the default assumption of an audio effect unit - Boolean* isWritable = 0; - UInt32 dataSize = 0; - OSStatus result = GetPropertyInfo (kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, - &dataSize, isWritable); //don't care if this is writable - - // AU has to explicitly tell us about this. - if (result) return false; - - StackAUChannelInfo info (dataSize); - - result = GetProperty (kAudioUnitProperty_SupportedNumChannels, - kAudioUnitScope_Global, 0, - info.mChanInfo, &dataSize); - if (result) return false; - - return ValidateDynamicScope (inScope, outTotalNumChannels, info.mChanInfo, (dataSize / sizeof(AUChannelInfo))); -} - -// as we've already checked that the element count is writable -// the following conditions will match this.. -/* --1, -2 -> signifies no restrictions --2, -1 -> signifies no restrictions -> in this case outTotalNumChannels == -1 (any num channels) - --N (where N is less than -2), signifies the total channel count on the scope side (in or out) -*/ -bool CAAudioUnit::ValidateDynamicScope (AudioUnitScope inScope, - SInt32 &outTotalNumChannels, - const AUChannelInfo *info, - UInt32 numInfo) const -{ - bool writable = false; - OSStatus result = IsElementCountWritable (inScope, writable); - if (result || (writable == false)) - return false; - - //now chan layout can contain -1 for either scope (ie. doesn't care) - for (unsigned int i = 0; i < numInfo; ++i) - { - // lets test the special wild card case first... - // this says the AU can do any num channels on input or output - for eg. Matrix Mixer - if (((info[i].inChannels == -1) && (info[i].outChannels == -2)) - || ((info[i].inChannels == -2) && (info[i].outChannels == -1))) - { - outTotalNumChannels = -1; - return true; - } - - // ok lets now test our special case.... - if (inScope == kAudioUnitScope_Input) { - // isn't dynamic on this side at least - if (info[i].inChannels >= 0) - continue; - - if (info[i].inChannels < -2) { - outTotalNumChannels = abs (info[i].inChannels); - return true; - } - } - - else if (inScope == kAudioUnitScope_Output) { - // isn't dynamic on this side at least - if (info[i].outChannels >= 0) - continue; - - if (info[i].outChannels < -2) { - outTotalNumChannels = abs (info[i].outChannels); - return true; - } - } - - else { - break; // wrong scope was specified - } - } - - return false; -} - -OSStatus CAAudioUnit::ConfigureDynamicScope (AudioUnitScope inScope, - UInt32 inNumElements, - UInt32 *inChannelsPerElement, - Float64 inSampleRate) -{ - SInt32 numChannels = 0; - bool isDyamic = HasDynamicScope (inScope, numChannels); - if (isDyamic == false) - return kAudioUnitErr_InvalidProperty; - - //lets to a sanity check... - // if numChannels == -1, then it can do "any"... - if (numChannels > 0) { - SInt32 count = 0; - for (unsigned int i = 0; i < inNumElements; ++i) - count += inChannelsPerElement[i]; - if (count > numChannels) - return kAudioUnitErr_InvalidPropertyValue; - } - - OSStatus result = SetElementCount (inScope, inNumElements); - if (result) - return result; - - CAStreamBasicDescription desc; - desc.mSampleRate = inSampleRate; - for (unsigned int i = 0; i < inNumElements; ++i) { - desc.SetCanonical (inChannelsPerElement[i], false); - result = SetFormat (inScope, i, desc); - if (result) - return result; - } - return noErr; -} - -#pragma mark __Properties - -bool CAAudioUnit::CanBypass () const -{ - Boolean outWritable; - OSStatus result = AudioUnitGetPropertyInfo (AU(), kAudioUnitProperty_BypassEffect, - kAudioUnitScope_Global, 0, - NULL, &outWritable); - return (!result && outWritable); -} - -bool CAAudioUnit::GetBypass () const -{ - UInt32 dataSize = sizeof (UInt32); - UInt32 outBypass; - OSStatus result = AudioUnitGetProperty (AU(), kAudioUnitProperty_BypassEffect, - kAudioUnitScope_Global, 0, - &outBypass, &dataSize); - return (result ? false : outBypass); -} - -OSStatus CAAudioUnit::SetBypass (bool inBypass) const -{ - UInt32 bypass = inBypass ? 1 : 0; - return AudioUnitSetProperty (AU(), kAudioUnitProperty_BypassEffect, - kAudioUnitScope_Global, 0, - &bypass, sizeof (UInt32)); -} - -Float64 CAAudioUnit::Latency () const -{ - Float64 secs; - UInt32 size = sizeof(secs); - if (GetProperty (kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0, &secs, &size)) - return 0; - return secs; -} - -OSStatus CAAudioUnit::GetAUPreset (CFPropertyListRef &outData) const -{ - UInt32 dataSize = sizeof(outData); - return AudioUnitGetProperty (AU(), kAudioUnitProperty_ClassInfo, - kAudioUnitScope_Global, 0, - &outData, &dataSize); -} - -OSStatus CAAudioUnit::SetAUPreset (CFPropertyListRef &inData) -{ - return AudioUnitSetProperty (AU(), kAudioUnitProperty_ClassInfo, - kAudioUnitScope_Global, 0, - &inData, sizeof (CFPropertyListRef)); -} - -OSStatus CAAudioUnit::GetPresentPreset (AUPreset &outData) const -{ - UInt32 dataSize = sizeof(outData); - OSStatus result = AudioUnitGetProperty (AU(), kAudioUnitProperty_PresentPreset, - kAudioUnitScope_Global, 0, - &outData, &dataSize); - if (result == kAudioUnitErr_InvalidProperty) { - dataSize = sizeof(outData); - result = AudioUnitGetProperty (AU(), kAudioUnitProperty_CurrentPreset, - kAudioUnitScope_Global, 0, - &outData, &dataSize); - if (result == noErr) { - // we now retain the CFString in the preset so for the client of this API - // it is consistent (ie. the string should be released when done) - if (outData.presetName) - CFRetain (outData.presetName); - } - } - return result; -} - -OSStatus CAAudioUnit::SetPresentPreset (AUPreset &inData) -{ - OSStatus result = AudioUnitSetProperty (AU(), kAudioUnitProperty_PresentPreset, - kAudioUnitScope_Global, 0, - &inData, sizeof (AUPreset)); - if (result == kAudioUnitErr_InvalidProperty) { - result = AudioUnitSetProperty (AU(), kAudioUnitProperty_CurrentPreset, - kAudioUnitScope_Global, 0, - &inData, sizeof (AUPreset)); - } - return result; -} - -bool CAAudioUnit::HasCustomView () const -{ - UInt32 dataSize = 0; - OSStatus result = GetPropertyInfo(kAudioUnitProperty_GetUIComponentList, - kAudioUnitScope_Global, 0, - &dataSize, NULL); - if (result || !dataSize) { - dataSize = 0; - result = GetPropertyInfo(kAudioUnitProperty_CocoaUI, - kAudioUnitScope_Global, 0, - &dataSize, NULL); - if (result || !dataSize) - return false; - } - return true; -} - -OSStatus CAAudioUnit::GetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element, - Float32 &outValue) const -{ - return mDataPtr ? mDataPtr->GetParameter (inID, scope, element, outValue) : paramErr; -} - -OSStatus CAAudioUnit::SetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element, - Float32 value, UInt32 bufferOffsetFrames) -{ - return mDataPtr ? mDataPtr->SetParameter (inID, scope, element, value, bufferOffsetFrames) : paramErr; -} - -OSStatus CAAudioUnit::MIDIEvent (UInt32 inStatus, - UInt32 inData1, - UInt32 inData2, - UInt32 inOffsetSampleFrame) -{ - return mDataPtr ? mDataPtr->MIDIEvent (inStatus, inData1, inData2, inOffsetSampleFrame) : paramErr; -} - -OSStatus CAAudioUnit::StartNote (MusicDeviceInstrumentID inInstrument, - MusicDeviceGroupID inGroupID, - NoteInstanceID * outNoteInstanceID, - UInt32 inOffsetSampleFrame, - const MusicDeviceNoteParams * inParams) -{ - return mDataPtr ? mDataPtr->StartNote (inInstrument, inGroupID, outNoteInstanceID, inOffsetSampleFrame, inParams) - : paramErr; -} - -OSStatus CAAudioUnit::StopNote (MusicDeviceGroupID inGroupID, - NoteInstanceID inNoteInstanceID, - UInt32 inOffsetSampleFrame) -{ - return mDataPtr ? mDataPtr->StopNote (inGroupID, inNoteInstanceID, inOffsetSampleFrame) : paramErr; -} - -#pragma mark __Render - -OSStatus CAAudioUnit::Render (AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inOutputBusNumber, - UInt32 inNumberFrames, - AudioBufferList * ioData) -{ - return mDataPtr ? mDataPtr->Render (ioActionFlags, inTimeStamp, inOutputBusNumber, inNumberFrames, ioData) : paramErr; -} - -static AURenderCallbackStruct sRenderCallback; -static OSStatus PrerollRenderProc ( void * /*inRefCon*/, - AudioUnitRenderActionFlags * /*inActionFlags*/, - const AudioTimeStamp * /*inTimeStamp*/, - UInt32 /*inBusNumber*/, - UInt32 /*inNumFrames*/, - AudioBufferList *ioData) -{ - AudioBuffer *buf = ioData->mBuffers; - for (UInt32 i = ioData->mNumberBuffers; i--; ++buf) - memset((Byte *)buf->mData, 0, buf->mDataByteSize); - - return noErr; -} - -OSStatus CAAudioUnit::Preroll (UInt32 inFrameSize) -{ - CAStreamBasicDescription desc; - OSStatus result = GetFormat (kAudioUnitScope_Input, 0, desc); - bool hasInput = false; - //we have input - if (result == noErr) - { - sRenderCallback.inputProc = PrerollRenderProc; - sRenderCallback.inputProcRefCon = 0; - - result = SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, - 0, &sRenderCallback, sizeof(sRenderCallback)); - if (result) return result; - hasInput = true; - } - - AudioUnitRenderActionFlags flags = 0; - AudioTimeStamp time; - memset (&time, 0, sizeof(time)); - time.mFlags = kAudioTimeStampSampleTimeValid; - - CAStreamBasicDescription outputFormat; - require_noerr (result = GetFormat (kAudioUnitScope_Output, 0, outputFormat), home); - { - AUOutputBL list (outputFormat, inFrameSize); - list.Prepare (); - - require_noerr (result = Render (&flags, &time, 0, inFrameSize, list.ABL()), home); - require_noerr (result = GlobalReset(), home); - } - -home: - if (hasInput) { - // remove our installed callback - sRenderCallback.inputProc = 0; - sRenderCallback.inputProcRefCon = 0; - - SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, - 0, &sRenderCallback, sizeof(sRenderCallback)); - } - return result; -} - -#pragma mark __CAAUChanHelper - -CAAUChanHelper::CAAUChanHelper(const CAAudioUnit &inAU, AudioUnitScope inScope) - :mChans(NULL), mNumEls(0), mDidAllocate(false) -{ - UInt32 elCount; - if (inAU.GetElementCount (inScope, elCount)) return; - if (elCount > 8) { - mChans = new UInt32[elCount]; - mDidAllocate = true; - memset (mChans, 0, sizeof(int) * elCount); - } else { - mChans = mStaticChans; - memset (mChans, 0, sizeof(int) * 8); - } - for (unsigned int i = 0; i < elCount; ++i) { - UInt32 numChans; - if (inAU.NumberChannels (inScope, i, numChans)) return; - mChans[i] = numChans; - } - mNumEls = elCount; -} - -CAAUChanHelper::~CAAUChanHelper() -{ - if (mDidAllocate) delete [] mChans; -} - -CAAUChanHelper& CAAUChanHelper::operator= (const CAAUChanHelper &c) -{ - if (mDidAllocate) delete [] mChans; - if (c.mDidAllocate) { - mChans = new UInt32[c.mNumEls]; - mDidAllocate = true; - } else { - mDidAllocate = false; - mChans = mStaticChans; - } - memcpy (mChans, c.mChans, c.mNumEls * sizeof(int)); - - return *this; -} - -#pragma mark __Print Utilities - -void CAAudioUnit::Print (FILE* file) const -{ - fprintf (file, "AudioUnit:%p\n", AU()); - if (IsValid()) { - fprintf (file, "\tnode=%ld\t", (long)GetAUNode()); Comp().Print (file); - } -} diff --git a/libs/appleutility/CAAudioUnit.h b/libs/appleutility/CAAudioUnit.h deleted file mode 100644 index 6bc31bf30b..0000000000 --- a/libs/appleutility/CAAudioUnit.h +++ /dev/null @@ -1,383 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAAudioUnit.h - -=============================================================================*/ - -#ifndef __CAAudioUnit_h__ -#define __CAAudioUnit_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include - #include - #include -#else - #include - #include - #include - #include - #include -#endif - -#include -#include "CAStreamBasicDescription.h" -#include "CAComponent.h" -#include "CAAudioChannelLayout.h" - -// defined below -class CAAUChanHelper; - -// These constructors will NOT throw exceptions - so "check" after creation if AU IsValid() -// The destructor will NOT automatically close the AU down -// This state should be managed by the Caller -// once closed, the unit represented by this object is no longer valid -// it is up to the user of this object to ensure its validity is in sync -// if it is removed from a graph - -// methods that can significantly change the state of the AU (like its format) are -// NOT const whereas those that don't change the externally related state of the AU are not const - -class CAAudioUnit { -public: - typedef std::vector ChannelTagVector; - typedef ChannelTagVector::iterator ChannelTagVectorIter; - -public: - CAAudioUnit () - : mDataPtr(0) {} - - CAAudioUnit (const AudioUnit& inUnit); - - CAAudioUnit (const AUNode &inNode, const AudioUnit& inUnit); - - CAAudioUnit (const CAAudioUnit& y) - : mDataPtr(0) { *this = y; } - - static OSStatus Open (const CAComponent& inComp, CAAudioUnit &outUnit); - - ~CAAudioUnit (); - - - CAAudioUnit& operator= (const CAAudioUnit& y); - - bool operator== (const CAAudioUnit& y) const; - - bool operator== (const AudioUnit& y) const; - -#pragma mark __State Management - bool IsValid () const; - - AudioUnit AU() const; - operator AudioUnit () const { return AU(); } - - const CAComponent& Comp() const { return mComp; } - - bool FromAUGraph () const { return GetAUNode() != 0 || GetAUNode() != -1; } - - AUNode GetAUNode () const; - operator AUNode () const { return GetAUNode(); } - -#pragma mark __API Wrapper - OSStatus Initialize() const { return AudioUnitInitialize(AU()); } - OSStatus Uninitialize() const { return AudioUnitUninitialize(AU()); } - OSStatus GetPropertyInfo(AudioUnitPropertyID propID, AudioUnitScope scope, AudioUnitElement element, - UInt32 *outDataSize, Boolean *outWritable) const - { - return AudioUnitGetPropertyInfo(AU(), propID, scope, element, outDataSize, outWritable); - } - OSStatus GetProperty(AudioUnitPropertyID propID, AudioUnitScope scope, AudioUnitElement element, - void *outData, UInt32 *ioDataSize) const - { - return AudioUnitGetProperty(AU(), propID, scope, element, outData, ioDataSize); - } - OSStatus SetProperty(AudioUnitPropertyID propID, AudioUnitScope scope, AudioUnitElement element, - const void *inData, UInt32 inDataSize) - { - return AudioUnitSetProperty(AU(), propID, scope, element, inData, inDataSize); - } - OSStatus SetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element, - Float32 value, UInt32 bufferOffsetFrames=0); - - OSStatus GetParameter(AudioUnitParameterID inID, AudioUnitScope scope, AudioUnitElement element, - Float32 &outValue) const; - - OSStatus Render (AudioUnitRenderActionFlags * ioActionFlags, - const AudioTimeStamp * inTimeStamp, - UInt32 inOutputBusNumber, - UInt32 inNumberFrames, - AudioBufferList * ioData); - - OSStatus Reset (AudioUnitScope scope, AudioUnitElement element) - { - return AudioUnitReset (AU(), scope, element); - } - OSStatus GlobalReset () - { - return AudioUnitReset (AU(), kAudioUnitScope_Global, 0); - } - - OSStatus Preroll (UInt32 inFrameSize); - - OSStatus AddRenderNotify (AURenderCallback inProc, void *inProcRefCon) - { - return AudioUnitAddRenderNotify (AU(), inProc, inProcRefCon); - } - - OSStatus RemoveRenderNotify (AURenderCallback inProc, void *inProcRefCon) - { - return AudioUnitRemoveRenderNotify (AU(), inProc, inProcRefCon); - } - - -// Fast dispatch support for MIDI Effects or Music Devices - OSStatus MIDIEvent (UInt32 inStatus, - UInt32 inData1, - UInt32 inData2, - UInt32 inOffsetSampleFrame); - - // uses the default VoiceForGroup value - this is the normal case - OSStatus StartNote (MusicDeviceGroupID inGroupID, - NoteInstanceID * outNoteInstanceID, - UInt32 inOffsetSampleFrame, - const MusicDeviceNoteParams * inParams) - { - return StartNote (kMusicNoteEvent_UseGroupInstrument, - inGroupID, outNoteInstanceID, - inOffsetSampleFrame, inParams); - } - - OSStatus StartNote (MusicDeviceInstrumentID inInstrument, - MusicDeviceGroupID inGroupID, - NoteInstanceID * outNoteInstanceID, - UInt32 inOffsetSampleFrame, - const MusicDeviceNoteParams * inParams); - - OSStatus StopNote (MusicDeviceGroupID inGroupID, - NoteInstanceID inNoteInstanceID, - UInt32 inOffsetSampleFrame); - -#pragma mark __Format Utilities - // typically you ask this about an AU - // These Questions are asking about Input and Output... - - // These ones just say whether an AU can do a single combination of channels - // and is fine if the AU has a single output (and if an input, a single input) - bool CanDo (int inChannelsInOut) const - { - return CanDo (inChannelsInOut, inChannelsInOut); - } - - bool CanDo ( int inChannelsIn, - int inChannelsOut) const; - - // This version does a more thorough test for ANY AU with ANY ins/outs - // you pass in the channel helper (for the current element count on that scope) - - bool CanDo ( const CAAUChanHelper &input, - const CAAUChanHelper &output) const; - - bool SupportsNumChannels () const; - - bool HasChannelLayouts (AudioUnitScope inScope, - AudioUnitElement inEl) const; - - bool GetChannelLayouts (AudioUnitScope inScope, - AudioUnitElement inEl, - ChannelTagVector &outChannelVector) const; - - OSStatus GetChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl, - CAAudioChannelLayout &outLayout) const; - - OSStatus SetChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl, - CAAudioChannelLayout &inLayout); - - OSStatus SetChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl, - AudioChannelLayout &inLayout, - UInt32 inSize); - - OSStatus ClearChannelLayout (AudioUnitScope inScope, - AudioUnitElement inEl); - - OSStatus GetFormat (AudioUnitScope inScope, - AudioUnitElement inEl, - AudioStreamBasicDescription &outFormat) const; - // if an AudioChannelLayout is either required or set, this call can fail - // and the SetChannelLayout call should be used to set the format - OSStatus SetFormat (AudioUnitScope inScope, - AudioUnitElement inEl, - const AudioStreamBasicDescription &inFormat); - - OSStatus GetSampleRate (AudioUnitScope inScope, - AudioUnitElement inEl, - Float64 &outRate) const; - OSStatus SetSampleRate (AudioUnitScope inScope, - AudioUnitElement inEl, - Float64 inRate); - - // this sets the sample rate on all in/out buses of the AU - OSStatus SetSampleRate (Float64 inSampleRate); - - OSStatus NumberChannels (AudioUnitScope inScope, - AudioUnitElement inEl, - UInt32 &outChans) const; - - OSStatus GetNumberChannels (AudioUnitScope inScope, - AudioUnitElement inEl, - UInt32 &outChans) const - { - return NumberChannels (inScope, inEl, outChans); - } - - OSStatus SetNumberChannels (AudioUnitScope inScope, - AudioUnitElement inEl, - UInt32 inChans); - - OSStatus IsElementCountWritable (AudioUnitScope inScope, bool &outWritable) const; - - OSStatus GetElementCount (AudioUnitScope inScope, UInt32 &outCount) const; - - OSStatus SetElementCount (AudioUnitScope inScope, UInt32 inCount); - - // value of -1 for outTotalNumChannels indicates no restriction on num channels - // for ex. the Matrix Mixer satisfies this (its in/out element count is writable, and can be set to - // any number of channels. - // outTotalNumChannels is only valid if method returns true... - bool HasDynamicInputs (SInt32 &outTotalNumChannels) const - { - return HasDynamicScope (kAudioUnitScope_Input, outTotalNumChannels); - } - - bool HasDynamicOutputs (SInt32 &outTotalNumChannels) const - { - return HasDynamicScope (kAudioUnitScope_Output, outTotalNumChannels); - } - - // here, if the in (or out) elements are dynamic, then you supply the number of elements - // you want on in (or out) scope, and the number of channels on each consecutive element - OSStatus ConfigureDynamicInput (UInt32 inNumElements, UInt32 *inChannelsPerElement, Float64 inSampleRate) - { - return ConfigureDynamicScope (kAudioUnitScope_Input, inNumElements, inChannelsPerElement, inSampleRate); - } - - OSStatus ConfigureDynamicOutput (UInt32 inNumElements, UInt32 *inChannelsPerElement, Float64 inSampleRate) - { - return ConfigureDynamicScope (kAudioUnitScope_Output, inNumElements, inChannelsPerElement, inSampleRate); - } - - bool CanBypass () const; - - bool GetBypass () const; - - OSStatus SetBypass (bool inBypass) const; - - Float64 Latency () const; - - // these calls just deal with the global preset state - // you could rescope them to deal with presets on the part scope - OSStatus GetAUPreset (CFPropertyListRef &outData) const; - - OSStatus SetAUPreset (CFPropertyListRef &inData); - - OSStatus GetPresentPreset (AUPreset &outData) const; - - OSStatus SetPresentPreset (AUPreset &inData); - - bool HasCustomView () const; - -#pragma mark __Print - void Print () const { Print (stdout); } - void Print (FILE* file) const; - -private: - CAComponent mComp; - - class AUState; - AUState* mDataPtr; - - // this can throw - so wrap this up in a static that returns a result code... - CAAudioUnit (const CAComponent& inComp); - - bool HasDynamicScope (AudioUnitScope inScope, SInt32 &outTotalNumChannels) const; - OSStatus ConfigureDynamicScope (AudioUnitScope inScope, - UInt32 inNumElements, - UInt32 *inChannelsPerElement, - Float64 inSampleRate); - bool ValidateChannelPair (int inChannelsIn, - int inChannelsOut, - const AUChannelInfo * info, - UInt32 numChanInfo) const; - - bool ValidateDynamicScope (AudioUnitScope inScope, - SInt32 &outTotalNumChannels, - const AUChannelInfo * info, - UInt32 numInfo) const; - bool CheckOneSide (const CAAUChanHelper &inHelper, - bool checkOutput, - const AUChannelInfo *info, - UInt32 numInfo) const; - -}; - -class CAAUChanHelper { -public: - CAAUChanHelper() - : mChans(mStaticChans), mNumEls(0), mDidAllocate(false) - { - memset (mChans, 0, sizeof(UInt32) * 8); - } - CAAUChanHelper(const CAAudioUnit &inAU, AudioUnitScope inScope); - CAAUChanHelper (const CAAUChanHelper &c) :mChans(mStaticChans), mNumEls(0), mDidAllocate(false) { *this = c; } - - ~CAAUChanHelper(); - - CAAUChanHelper& operator= (const CAAUChanHelper &c); - - UInt32 * mChans; - UInt32 mNumEls; - -private: - UInt32 mStaticChans[8]; - bool mDidAllocate; -}; - -#endif diff --git a/libs/appleutility/CABufferList.cpp b/libs/appleutility/CABufferList.cpp deleted file mode 100644 index 81298f918a..0000000000 --- a/libs/appleutility/CABufferList.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CABufferList.cpp - -=============================================================================*/ - -#include "CABufferList.h" -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -void CABufferList::AllocateBuffers(UInt32 nBytes) -{ - if (nBytes <= GetNumBytes()) return; - - if (mNumberBuffers > 1) - // align successive buffers for Altivec and to take alternating - // cache line hits by spacing them by odd multiples of 16 - nBytes = (nBytes + (0x10 - (nBytes & 0xF))) | 0x10; - UInt32 memorySize = nBytes * mNumberBuffers; - Byte *newMemory = new Byte[memorySize], *p = newMemory; - memset(newMemory, 0, memorySize); // get page faults now, not later - - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - if (buf->mData != NULL && buf->mDataByteSize > 0) - // preserve existing buffer contents - memcpy(p, buf->mData, buf->mDataByteSize); - buf->mDataByteSize = nBytes; - buf->mData = p; - p += nBytes; - } - Byte *oldMemory = mBufferMemory; - mBufferMemory = newMemory; - delete[] oldMemory; -} - -void CABufferList::AllocateBuffersAndCopyFrom(UInt32 nBytes, CABufferList *inSrcList, CABufferList *inSetPtrList) -{ - if (mNumberBuffers != inSrcList->mNumberBuffers) return; - if (mNumberBuffers != inSetPtrList->mNumberBuffers) return; - if (nBytes <= GetNumBytes()) { - CopyAllFrom(inSrcList, inSetPtrList); - return; - } - inSetPtrList->VerifyNotTrashingOwnedBuffer(); - UInt32 fromByteSize = inSrcList->GetNumBytes(); - - if (mNumberBuffers > 1) - // align successive buffers for Altivec and to take alternating - // cache line hits by spacing them by odd multiples of 16 - nBytes = (nBytes + (0x10 - (nBytes & 0xF))) | 0x10; - UInt32 memorySize = nBytes * mNumberBuffers; - Byte *newMemory = new Byte[memorySize], *p = newMemory; - memset(newMemory, 0, memorySize); // make buffer "hot" - - AudioBuffer *buf = mBuffers; - AudioBuffer *ptrBuf = inSetPtrList->mBuffers; - AudioBuffer *srcBuf = inSrcList->mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf, ++ptrBuf, ++srcBuf) { - if (srcBuf->mData != NULL && srcBuf->mDataByteSize > 0) - // preserve existing buffer contents - memmove(p, srcBuf->mData, srcBuf->mDataByteSize); - buf->mDataByteSize = nBytes; - buf->mData = p; - ptrBuf->mDataByteSize = srcBuf->mDataByteSize; - ptrBuf->mData = p; - p += nBytes; - } - Byte *oldMemory = mBufferMemory; - mBufferMemory = newMemory; - if (inSrcList != inSetPtrList) - inSrcList->BytesConsumed(fromByteSize); - delete[] oldMemory; -} - -void CABufferList::DeallocateBuffers() -{ - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - buf->mData = NULL; - buf->mDataByteSize = 0; - } - if (mBufferMemory != NULL) { - delete[] mBufferMemory; - mBufferMemory = NULL; - } - -} - -extern "C" void CAShowAudioBufferList(const AudioBufferList *abl, int framesToPrint, int wordSize) -{ - printf("AudioBufferList @ %p:\n", abl); - const AudioBuffer *buf = abl->mBuffers; - for (UInt32 i = 0; i < abl->mNumberBuffers; ++i, ++buf) { - printf(" [%2ld]: %2ldch, %5ld bytes @ %8p", - i, buf->mNumberChannels, buf->mDataByteSize, buf->mData); - if (framesToPrint) { - printf(":"); - Byte *p = (Byte *)buf->mData; - for (int j = framesToPrint * buf->mNumberChannels; --j >= 0; ) - switch (wordSize) { - case 0: - printf(" %6.3f", *(Float32 *)p); - p += sizeof(Float32); - break; - case 1: - case -1: - printf(" %02X", *p); - p += 1; - break; - case 2: - printf(" %04X", EndianU16_BtoN(*(UInt16 *)p)); - p += 2; - break; - case 3: - printf(" %06X", (p[0] << 16) | (p[1] << 8) | p[2]); - p += 3; - break; - case 4: - printf(" %08lX", EndianU32_BtoN(*(UInt32 *)p)); - p += 4; - break; - case -2: - printf(" %04X", EndianU16_LtoN(*(UInt16 *)p)); - p += 2; - break; - case -3: - printf(" %06X", (p[2] << 16) | (p[1] << 8) | p[0]); - p += 3; - break; - case -4: - printf(" %08lX", EndianU32_LtoN(*(UInt32 *)p)); - p += 4; - break; - } - } - printf("\n"); - } -} - diff --git a/libs/appleutility/CABufferList.h b/libs/appleutility/CABufferList.h deleted file mode 100644 index 3b0cef9a52..0000000000 --- a/libs/appleutility/CABufferList.h +++ /dev/null @@ -1,300 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CABufferList.h - -=============================================================================*/ - -#ifndef __CABufferList_h__ -#define __CABufferList_h__ - -#include -#include "CAStreamBasicDescription.h" -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -extern "C" void CAShowAudioBufferList(const AudioBufferList *abl, int framesToPrint, int wordSize); - // wordSize: 0 = float32, else integer word size, negative if little-endian - -/* ____________________________________________________________________________ -// CABufferList - variable length buffer list - - This class is designed for use in non-simplistic cases. For AudioUnits, AUBufferList - is preferred. - - CABufferList can be used in one of two ways: - - as mutable pointers into non-owned memory - - as an immutable array of buffers (owns its own memory). - - All buffers are assumed to have the same format (number of channels, word size), so that - we can assume their mDataByteSizes are all the same. -____________________________________________________________________________ */ -class CABufferList { -public: - void * operator new(size_t /*size*/, int nBuffers) { - return ::operator new(sizeof(CABufferList) + (nBuffers-1) * sizeof(AudioBuffer)); - } - static CABufferList * New(const char *name, const CAStreamBasicDescription &format) - { - UInt32 numBuffers = format.NumberChannelStreams(), channelsPerBuffer = format.NumberInterleavedChannels(); - return new(numBuffers) CABufferList(name, numBuffers, channelsPerBuffer); - } - -protected: - CABufferList(const char *name, UInt32 numBuffers, UInt32 channelsPerBuffer) : - mName(name), - mBufferMemory(NULL) - { - check(numBuffers > 0 /*&& channelsPerBuffer > 0*/); - mNumberBuffers = numBuffers; - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - buf->mNumberChannels = channelsPerBuffer; - buf->mDataByteSize = 0; - buf->mData = NULL; - } - } - -public: - ~CABufferList() - { - if (mBufferMemory) - delete[] mBufferMemory; - } - - const char * Name() { return mName; } - - const AudioBufferList & GetBufferList() const { return *(AudioBufferList *)&mNumberBuffers; } - - AudioBufferList & GetModifiableBufferList() - { - VerifyNotTrashingOwnedBuffer(); - return _GetBufferList(); - } - - UInt32 GetNumBytes() const - { - return mBuffers[0].mDataByteSize; - } - - void SetBytes(UInt32 nBytes, void *data) - { - VerifyNotTrashingOwnedBuffer(); - check(mNumberBuffers == 1); - mBuffers[0].mDataByteSize = nBytes; - mBuffers[0].mData = data; - } - - void CopyAllFrom(CABufferList *srcbl, CABufferList *ptrbl) - // copies bytes from srcbl - // make ptrbl reflect the length copied - // note that srcbl may be same as ptrbl! - { - // Note that this buffer *can* own memory and its pointers/lengths are not - // altered; only its buffer contents, which are copied from srcbl. - // The pointers/lengths in ptrbl are updated to reflect the addresses/lengths - // of the copied data, and srcbl's contents are consumed. - ptrbl->VerifyNotTrashingOwnedBuffer(); - UInt32 nBytes = srcbl->GetNumBytes(); - AudioBuffer *mybuf = mBuffers, *srcbuf = srcbl->mBuffers, - *ptrbuf = ptrbl->mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++mybuf, ++srcbuf, ++ptrbuf) { - memmove(mybuf->mData, srcbuf->mData, srcbuf->mDataByteSize); - ptrbuf->mData = mybuf->mData; - ptrbuf->mDataByteSize = srcbuf->mDataByteSize; - } - if (srcbl != ptrbl) - srcbl->BytesConsumed(nBytes); - } - - void AppendFrom(CABufferList *blp, UInt32 nBytes) - { - VerifyNotTrashingOwnedBuffer(); - AudioBuffer *mybuf = mBuffers, *srcbuf = blp->mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++mybuf, ++srcbuf) { - check(nBytes <= srcbuf->mDataByteSize); - memcpy((Byte *)mybuf->mData + mybuf->mDataByteSize, srcbuf->mData, nBytes); - mybuf->mDataByteSize += nBytes; - } - blp->BytesConsumed(nBytes); - } - - void PadWithZeroes(UInt32 desiredBufferSize) - // for cases where an algorithm (e.g. SRC) requires some - // padding to create silence following end-of-file - { - VerifyNotTrashingOwnedBuffer(); - if (GetNumBytes() > desiredBufferSize) return; - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - memset((Byte *)buf->mData + buf->mDataByteSize, 0, desiredBufferSize - buf->mDataByteSize); - buf->mDataByteSize = desiredBufferSize; - } - } - - void SetToZeroes(UInt32 nBytes) - { - VerifyNotTrashingOwnedBuffer(); - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - memset((Byte *)buf->mData, 0, nBytes); - buf->mDataByteSize = nBytes; - } - } - - void Reset() - { - DeallocateBuffers(); - } - - Boolean SameDataAs(const CABufferList* anotherBufferList) - { - // check to see if two buffer lists point to the same memory. - if (mNumberBuffers != anotherBufferList->mNumberBuffers) return false; - - for (UInt32 i = 0; i < mNumberBuffers; ++i) { - if (mBuffers[i].mData != anotherBufferList->mBuffers[i].mData) return false; - } - return true; - } - - void BytesConsumed(UInt32 nBytes) - // advance buffer pointers, decrease buffer sizes - { - VerifyNotTrashingOwnedBuffer(); - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - check(nBytes <= buf->mDataByteSize); - buf->mData = (Byte *)buf->mData + nBytes; - buf->mDataByteSize -= nBytes; - } - } - - void SetFrom(const AudioBufferList *abl) - { - VerifyNotTrashingOwnedBuffer(); - memcpy(&_GetBufferList(), abl, (char *)&abl->mBuffers[abl->mNumberBuffers] - (char *)abl); - } - - void SetFrom(const CABufferList *blp) - { - SetFrom(&blp->GetBufferList()); - } - - void SetFrom(const AudioBufferList *abl, UInt32 nBytes) - { - VerifyNotTrashingOwnedBuffer(); - AudioBuffer *mybuf = mBuffers; - const AudioBuffer *srcbuf = abl->mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++mybuf, ++srcbuf) { - mybuf->mNumberChannels = srcbuf->mNumberChannels; - mybuf->mDataByteSize = nBytes; - mybuf->mData = srcbuf->mData; - } - } - - void SetFrom(const CABufferList *blp, UInt32 nBytes) - { - SetFrom(&blp->GetBufferList(), nBytes); - } - - AudioBufferList * ToAudioBufferList(AudioBufferList *abl) const - { - memcpy(abl, &GetBufferList(), (char *)&abl->mBuffers[mNumberBuffers] - (char *)abl); - return abl; - } - - void AllocateBuffers(UInt32 nBytes); - void AllocateBuffersAndCopyFrom(UInt32 nBytes, CABufferList *inCopyFromList, CABufferList *inSetPtrList); - - void DeallocateBuffers(); - - void UseExternalBuffer(Byte *ptr, UInt32 nBytes); - - void AdvanceBufferPointers(UInt32 nBytes) - // this is for bufferlists that function simply as - // an array of pointers into another bufferlist, being advanced, - // as in RenderOutput implementations - { - VerifyNotTrashingOwnedBuffer(); - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) { - buf->mData = (Byte *)buf->mData + nBytes; - buf->mDataByteSize -= nBytes; - } - } - - void SetNumBytes(UInt32 nBytes) - { - VerifyNotTrashingOwnedBuffer(); - AudioBuffer *buf = mBuffers; - for (UInt32 i = mNumberBuffers; i--; ++buf) - buf->mDataByteSize = nBytes; - } - - void Print(const char *label=NULL, int nframes=0, int wordSize=0) const - { - if (label == NULL) - label = mName; - printf("%s - ", label); - CAShowAudioBufferList(&GetBufferList(), nframes, wordSize); - if (mBufferMemory) - printf(" owned memory @ 0x%p:\n", mBufferMemory); - } - -protected: - AudioBufferList & _GetBufferList() { return *(AudioBufferList *)&mNumberBuffers; } // use with care - // if we make this public, then we lose ability to call VerifyNotTrashingOwnedBuffer - void VerifyNotTrashingOwnedBuffer() - { - // This needs to be called from places where we are modifying the buffer list. - // It's an error to modify the buffer pointers or lengths if we own the buffer memory. - check(mBufferMemory == NULL); - } - - const char * mName; // for debugging - Byte * mBufferMemory; - // the rest must exactly mirror the structure of AudioBufferList - UInt32 mNumberBuffers; - AudioBuffer mBuffers[1]; -}; - -#endif // __CABufferList_h__ diff --git a/libs/appleutility/CACFDictionary.cpp b/libs/appleutility/CACFDictionary.cpp deleted file mode 100644 index c209b5fc36..0000000000 --- a/libs/appleutility/CACFDictionary.cpp +++ /dev/null @@ -1,478 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CACFDictionary.cpp - CAAudioEngine - -=============================================================================*/ - -//============================================================================= -// Includes -//============================================================================= - -// Self Include -#include "CACFDictionary.h" - -// PublicUtility Includes -#include "CACFString.h" -#include "CACFNumber.h" - -//============================================================================= -// CACFDictionary -//============================================================================= - -bool CACFDictionary::HasKey(const CFStringRef inKey) const -{ - return CFDictionaryContainsKey(mCFDictionary, inKey) != 0; -} - -UInt32 CACFDictionary::Size () const -{ - return CFDictionaryGetCount(mCFDictionary); -} - -void CACFDictionary::GetKeys (const void **keys) const -{ - CFDictionaryGetKeysAndValues(mCFDictionary, keys, NULL); -} - -bool CACFDictionary::GetBool(const CFStringRef inKey, bool& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFBooleanGetTypeID())) - { - outValue = CFBooleanGetValue(static_cast(theValue)); - theAnswer = true; - } - else if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - SInt32 theNumericValue = 0; - CFNumberGetValue(static_cast(theValue), kCFNumberSInt32Type, &theNumericValue); - outValue = theNumericValue != 0; - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetSInt32(const CFStringRef inKey, SInt32& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - CFNumberGetValue(static_cast(theValue), kCFNumberSInt32Type, &outValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetUInt32(const CFStringRef inKey, UInt32& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - CFNumberGetValue(static_cast(theValue), kCFNumberSInt32Type, &outValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetSInt64(const CFStringRef inKey, SInt64& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - CFNumberGetValue(static_cast(theValue), kCFNumberSInt64Type, &outValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetUInt64(const CFStringRef inKey, UInt64& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - CFNumberGetValue(static_cast(theValue), kCFNumberSInt64Type, &outValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetFloat32(const CFStringRef inKey, Float32& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - CFNumberGetValue(static_cast(theValue), kCFNumberFloat32Type, &outValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetFloat64(const CFStringRef inKey, Float64& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFNumberGetTypeID())) - { - CFNumberGetValue(static_cast(theValue), kCFNumberFloat64Type, &outValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetString(const CFStringRef inKey, CFStringRef& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFStringGetTypeID())) - { - outValue = static_cast(theValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetArray(const CFStringRef inKey, CFArrayRef& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFArrayGetTypeID())) - { - outValue = static_cast(theValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetDictionary(const CFStringRef inKey, CFDictionaryRef& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFDictionaryGetTypeID())) - { - outValue = static_cast(theValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetData(const CFStringRef inKey, CFDataRef& outValue) const -{ - bool theAnswer = false; - - CFTypeRef theValue = NULL; - if(GetCFType(inKey, theValue)) - { - if((theValue != NULL) && (CFGetTypeID(theValue) == CFDataGetTypeID())) - { - outValue = static_cast(theValue); - theAnswer = true; - } - } - - return theAnswer; -} - -bool CACFDictionary::GetCFType(const CFStringRef inKey, CFTypeRef& outValue) const -{ - bool theAnswer = false; - - if(mCFDictionary != NULL) - { - outValue = CFDictionaryGetValue(mCFDictionary, inKey); - theAnswer = (outValue != NULL); - } - - return theAnswer; -} - -bool CACFDictionary::GetCFTypeWithCStringKey(const char* inKey, CFTypeRef& outValue) const -{ - bool theAnswer = false; - - if(mCFDictionary != NULL) - { - CACFString theKey(inKey); - if(theKey.IsValid()) - { - theAnswer = GetCFType(theKey.GetCFString(), outValue); - } - } - - return theAnswer; -} - -bool CACFDictionary::AddSInt32(const CFStringRef inKey, SInt32 inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFNumber theValue(inValue); - theAnswer = AddCFType(inKey, theValue.GetCFNumber()); - } - - return theAnswer; -} - -bool CACFDictionary::AddUInt32(const CFStringRef inKey, UInt32 inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFNumber theValue(inValue); - theAnswer = AddCFType(inKey, theValue.GetCFNumber()); - } - - return theAnswer; -} - -bool CACFDictionary::AddSInt64(const CFStringRef inKey, SInt64 inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFNumber theValue(inValue); - theAnswer = AddCFType(inKey, theValue.GetCFNumber()); - } - - return theAnswer; -} - -bool CACFDictionary::AddUInt64(const CFStringRef inKey, UInt64 inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFNumber theValue(inValue); - theAnswer = AddCFType(inKey, theValue.GetCFNumber()); - } - - return theAnswer; -} - -bool CACFDictionary::AddFloat32(const CFStringRef inKey, Float32 inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFNumber theValue(inValue); - theAnswer = AddCFType(inKey, theValue.GetCFNumber()); - } - - return theAnswer; -} - -bool CACFDictionary::AddFloat64(const CFStringRef inKey, Float64 inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFNumber theValue(inValue); - theAnswer = AddCFType(inKey, theValue.GetCFNumber()); - } - - return theAnswer; -} - -bool CACFDictionary::AddNumber(const CFStringRef inKey, const CFNumberRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - theAnswer = AddCFType(inKey, inValue); - } - - return theAnswer; -} - -bool CACFDictionary::AddString(const CFStringRef inKey, const CFStringRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - theAnswer = AddCFType(inKey, inValue); - } - - return theAnswer; -} - -bool CACFDictionary::AddArray(const CFStringRef inKey, const CFArrayRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - theAnswer = AddCFType(inKey, inValue); - } - - return theAnswer; -} - -bool CACFDictionary::AddDictionary(const CFStringRef inKey, const CFDictionaryRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - theAnswer = AddCFType(inKey, inValue); - } - - return theAnswer; -} - -bool CACFDictionary::AddData(const CFStringRef inKey, const CFDataRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - theAnswer = AddCFType(inKey, inValue); - } - - return theAnswer; -} - -bool CACFDictionary::AddCFType(const CFStringRef inKey, const CFTypeRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CFDictionarySetValue(mCFDictionary, inKey, inValue); - theAnswer = true; - } - - return theAnswer; -} - -bool CACFDictionary::AddCFTypeWithCStringKey(const char* inKey, const CFTypeRef inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFString theKey(inKey); - if(theKey.IsValid()) - { - theAnswer = AddCFType(theKey.GetCFString(), inValue); - } - } - - return theAnswer; -} - -bool CACFDictionary::AddCString(const CFStringRef inKey, const char* inValue) -{ - bool theAnswer = false; - - if(mMutable && (mCFDictionary != NULL)) - { - CACFString theValue(inValue); - if(theValue.IsValid()) - { - theAnswer = AddCFType(inKey, theValue.GetCFString()); - } - } - - return theAnswer; -} diff --git a/libs/appleutility/CACFDictionary.h b/libs/appleutility/CACFDictionary.h deleted file mode 100644 index 362b1c8821..0000000000 --- a/libs/appleutility/CACFDictionary.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CACFDictionary.h - -=============================================================================*/ -#if !defined(__CACFDictionary_h__) -#define __CACFDictionary_h__ - -//============================================================================= -// Includes -//============================================================================= - -// System Includes -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -//============================================================================= -// CACFDictionary -//============================================================================= - -class CACFDictionary -{ - -// Construction/Destruction -public: - CACFDictionary(bool inRelease) : mCFDictionary(CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)), mRelease(inRelease), mMutable(true) {} - CACFDictionary(const CFDictionaryRef inCFDictionary, bool inRelease) : mCFDictionary(const_cast(inCFDictionary)), mRelease(inRelease), mMutable(true) {} - CACFDictionary(const CFMutableDictionaryRef inCFDictionary, bool inRelease) : mCFDictionary(inCFDictionary), mRelease(inRelease), mMutable(true) {} - CACFDictionary(const CACFDictionary& inDictionary) : mCFDictionary(inDictionary.mCFDictionary), mRelease(inDictionary.mRelease), mMutable(inDictionary.mMutable) { if(mRelease && (mCFDictionary != NULL)) { CFRetain(mCFDictionary); } } - CACFDictionary& operator=(const CACFDictionary& inDictionary) { mCFDictionary = inDictionary.mCFDictionary; mRelease = inDictionary.mRelease; mMutable = inDictionary.mMutable; if(mRelease && (mCFDictionary != NULL)) { CFRetain(mCFDictionary); } return *this; } - ~CACFDictionary() { if(mRelease && (mCFDictionary != NULL)) { CFRelease(mCFDictionary); } } - -// Attributes -public: - bool IsValid() const { return mCFDictionary != NULL; } - bool IsMutable() const { return mMutable;} - bool CanModify() const { return mMutable && (mCFDictionary != NULL); } - - bool WillRelease() const { return mRelease; } - void ShouldRelease(bool inRelease) { mRelease = inRelease; } - - CFDictionaryRef GetDict() const { return mCFDictionary; } - CFDictionaryRef GetCFDictionary() const { return mCFDictionary; } - CFDictionaryRef CopyCFDictionary() const { if(mCFDictionary != NULL) { CFRetain(mCFDictionary); } return mCFDictionary; } - - CFMutableDictionaryRef GetMutableDict() { return mCFDictionary; } - CFMutableDictionaryRef GetCFMutableDictionary() const { return mCFDictionary; } - CFMutableDictionaryRef CopyCFMutableDictionary() const { if(mCFDictionary != NULL) { CFRetain(mCFDictionary); } return mCFDictionary; } - void SetCFMutableDictionaryFromCopy(CFDictionaryRef inDictionary, bool inRelease = true) { if(mRelease && (mCFDictionary != NULL)) { CFRelease(mCFDictionary); } mCFDictionary = CFDictionaryCreateMutableCopy(NULL, 0, inDictionary); mMutable = true; mRelease = inRelease; } - - CFPropertyListRef AsPropertyList() const { return mCFDictionary; } - OSStatus GetDictIfMutable(CFMutableDictionaryRef& outDict) const { OSStatus theAnswer = -1; if(mMutable) { outDict = mCFDictionary; theAnswer = 0; } return theAnswer; } - -// Item Operations -public: - bool HasKey(const CFStringRef inKey) const; - UInt32 Size() const; - void GetKeys(const void** keys) const; - - bool GetBool(const CFStringRef inKey, bool& outValue) const; - bool GetSInt32(const CFStringRef inKey, SInt32& outValue) const; - bool GetUInt32(const CFStringRef inKey, UInt32& outValue) const; - bool GetSInt64(const CFStringRef inKey, SInt64& outValue) const; - bool GetUInt64(const CFStringRef inKey, UInt64& outValue) const; - bool GetFloat32(const CFStringRef inKey, Float32& outValue) const; - bool GetFloat64(const CFStringRef inKey, Float64& outValue) const; - bool GetString(const CFStringRef inKey, CFStringRef& outValue) const; - bool GetArray(const CFStringRef inKey, CFArrayRef& outValue) const; - bool GetDictionary(const CFStringRef inKey, CFDictionaryRef& outValue) const; - bool GetData(const CFStringRef inKey, CFDataRef& outValue) const; - bool GetCFType(const CFStringRef inKey, CFTypeRef& outValue) const; - - bool GetCFTypeWithCStringKey(const char* inKey, CFTypeRef& outValue) const; - - bool AddSInt32(const CFStringRef inKey, SInt32 inValue); - bool AddUInt32(const CFStringRef inKey, UInt32 inValue); - bool AddSInt64(const CFStringRef inKey, SInt64 inValue); - bool AddUInt64(const CFStringRef inKey, UInt64 inValue); - bool AddFloat32(const CFStringRef inKey, Float32 inValue); - bool AddFloat64(const CFStringRef inKey, Float64 inValue); - bool AddNumber(const CFStringRef inKey, const CFNumberRef inValue); - bool AddString(const CFStringRef inKey, const CFStringRef inValue); - bool AddArray(const CFStringRef inKey, const CFArrayRef inValue); - bool AddDictionary(const CFStringRef inKey, const CFDictionaryRef inValue); - bool AddData(const CFStringRef inKey, const CFDataRef inValue); - bool AddCFType(const CFStringRef inKey, const CFTypeRef inValue); - - bool AddCFTypeWithCStringKey(const char* inKey, const CFTypeRef inValue); - bool AddCString(const CFStringRef inKey, const char* inValue); - - void Clear() { if(CanModify()) { CFDictionaryRemoveAllValues(mCFDictionary); } } - - void Show() { CFShow(mCFDictionary); } - -// Implementation -private: - CFMutableDictionaryRef mCFDictionary; - bool mRelease; - bool mMutable; -}; - -#endif //__CACFDictionary_h__ diff --git a/libs/appleutility/CACFNumber.cpp b/libs/appleutility/CACFNumber.cpp deleted file mode 100644 index 3b6160c8bb..0000000000 --- a/libs/appleutility/CACFNumber.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CACFNumber.cp - -=============================================================================*/ - -//============================================================================= -// Includes -//============================================================================= - -#include "CACFNumber.h" - -//============================================================================= -// CACFNumber -//============================================================================= - -Float32 CACFNumber::GetFixed32() const -{ - SInt32 theFixedValue = GetSInt32(); - - // this is a 16.16 value so convert it to a float - Float32 theSign = theFixedValue < 0 ? -1.0 : 1.0; - theFixedValue *= (SInt32)theSign; - Float32 theWholePart = (theFixedValue & 0x7FFF0000) >> 16; - Float32 theFractPart = theFixedValue & 0x0000FFFF; - theFractPart /= 65536.0; - - return theSign * (theWholePart + theFractPart); -} diff --git a/libs/appleutility/CACFNumber.h b/libs/appleutility/CACFNumber.h deleted file mode 100644 index 3991637bac..0000000000 --- a/libs/appleutility/CACFNumber.h +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CACFNumber.h - -=============================================================================*/ -#if !defined(__CACFNumber_h__) -#define __CACFNumber_h__ - -//============================================================================= -// Includes -//============================================================================= - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include -#else - #include - #include -#endif - -//============================================================================= -// CACFNumber -//============================================================================= - -class CACFNumber -{ -// Construction/Destruction -public: - CACFNumber(CFNumberRef inCFNumber, bool inWillRelease = true) : mCFNumber(inCFNumber), mWillRelease(inWillRelease) {} - CACFNumber(SInt32 inValue) : mCFNumber(CFNumberCreate(NULL, kCFNumberSInt32Type, &inValue)), mWillRelease(true) {} - CACFNumber(UInt32 inValue) : mCFNumber(CFNumberCreate(NULL, kCFNumberSInt32Type, &inValue)), mWillRelease(true) {} - CACFNumber(SInt64 inValue) : mCFNumber(CFNumberCreate(NULL, kCFNumberSInt64Type, &inValue)), mWillRelease(true) {} - CACFNumber(UInt64 inValue) : mCFNumber(CFNumberCreate(NULL, kCFNumberSInt64Type, &inValue)), mWillRelease(true) {} - CACFNumber(Float32 inValue) : mCFNumber(CFNumberCreate(NULL, kCFNumberFloat32Type, &inValue)), mWillRelease(true) {} - CACFNumber(Float64 inValue) : mCFNumber(CFNumberCreate(NULL, kCFNumberFloat64Type, &inValue)), mWillRelease(true) {} - ~CACFNumber() { Release(); } - CACFNumber(const CACFNumber& inNumber) : mCFNumber(inNumber.mCFNumber), mWillRelease(inNumber.mWillRelease) { Retain(); } - CACFNumber& operator=(const CACFNumber& inNumber) { Release(); mCFNumber = inNumber.mCFNumber; mWillRelease = inNumber.mWillRelease; Retain(); return *this; } - CACFNumber& operator=(CFNumberRef inCFNumber) { Release(); mCFNumber = inCFNumber; mWillRelease = true; return *this; } - -private: - void Retain() { if(mWillRelease && (mCFNumber != NULL)) { CFRetain(mCFNumber); } } - void Release() { if(mWillRelease && (mCFNumber != NULL)) { CFRelease(mCFNumber); } } - - CFNumberRef mCFNumber; - bool mWillRelease; - -// Operations -public: - void AllowRelease() { mWillRelease = true; } - void DontAllowRelease() { mWillRelease = false; } - bool IsValid() { return mCFNumber != NULL; } - -// Value Access -public: - CFNumberRef GetCFNumber() const { return mCFNumber; } - CFNumberRef CopyCFNumber() const { if(mCFNumber != NULL) { CFRetain(mCFNumber); } return mCFNumber; } - - SInt8 GetSInt8() const { SInt8 theAnswer = 0; if(mCFNumber != NULL) { CFNumberGetValue(mCFNumber, kCFNumberSInt8Type, &theAnswer); } return theAnswer; } - SInt32 GetSInt32() const { SInt32 theAnswer = 0; if(mCFNumber != NULL) { CFNumberGetValue(mCFNumber, kCFNumberSInt32Type, &theAnswer); } return theAnswer; } - Float32 GetFloat32() const { Float32 theAnswer = 0.0; if(mCFNumber != NULL) { CFNumberGetValue(mCFNumber, kCFNumberFloat32Type, &theAnswer); } return theAnswer; } - Float32 GetFixed32() const; - SInt64 GetSInt64() const { SInt64 theAnswer = 0; if(mCFNumber != NULL) { CFNumberGetValue(mCFNumber, kCFNumberSInt64Type, &theAnswer); } return theAnswer; } -}; - -#endif diff --git a/libs/appleutility/CACFString.cpp b/libs/appleutility/CACFString.cpp deleted file mode 100644 index ec3b18a8b6..0000000000 --- a/libs/appleutility/CACFString.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CACFString.cp - -=============================================================================*/ - -//============================================================================= -// Includes -//============================================================================= - -#include "CACFString.h" - -//============================================================================= -// CACFString -//============================================================================= - -UInt32 CACFString::GetStringByteLength(CFStringRef inCFString, CFStringEncoding inEncoding) -{ - UInt32 theAnswer = 0; - - if(inCFString != NULL) - { - CFRange theRange = { 0, CFStringGetLength(inCFString) }; - CFStringGetBytes(inCFString, theRange, inEncoding, 0, false, NULL, 0x7FFFFFFF, (CFIndex*)&theAnswer); - } - - return theAnswer; -} - -void CACFString::GetCString(CFStringRef inCFString, char* outString, UInt32& ioStringSize, CFStringEncoding inEncoding) -{ - if(ioStringSize > 0) - { - if(inCFString != NULL) - { - CFIndex theLength = 0; - CFRange theRange = { 0, CFStringGetLength(inCFString) }; - CFStringGetBytes(inCFString, theRange, inEncoding, 0, false, (UInt8*)outString, ioStringSize - 1, &theLength); - outString[theLength] = 0; - ioStringSize = theLength + 1; - } - else - { - outString[0] = 0; - ioStringSize = 1; - } - } -} - -void CACFString::GetUnicodeString(CFStringRef inCFString, UInt16* outString, UInt32& ioStringSize) -{ - if(ioStringSize > 0) - { - if(inCFString != NULL) - { - CFRange theStringRange = { 0, CFStringGetLength(inCFString) }; - if(static_cast(theStringRange.length) > ioStringSize) - { - theStringRange.length = ioStringSize; - } - CFStringGetCharacters(inCFString, theStringRange, outString); - ioStringSize = theStringRange.length; - } - else - { - outString[0] = 0; - ioStringSize = 0; - } - } -} diff --git a/libs/appleutility/CACFString.h b/libs/appleutility/CACFString.h deleted file mode 100644 index 51fa64ebff..0000000000 --- a/libs/appleutility/CACFString.h +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CACFString.h - -=============================================================================*/ -#if !defined(__CACFString_h__) -#define __CACFString_h__ - -//============================================================================= -// Includes -//============================================================================= - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include -#else - #include - #include -#endif - -//============================================================================= -// CACFString -//============================================================================= - -class CACFString -{ -// Construction/Destruction -public: - CACFString() : mCFString(NULL), mWillRelease(true) {} - CACFString(CFStringRef inCFString, bool inWillRelease = true) : mCFString(inCFString), mWillRelease(inWillRelease) {} - CACFString(const char* inCString, bool inWillRelease = true) : mCFString(CFStringCreateWithCString(NULL, inCString, kCFStringEncodingASCII)), mWillRelease(inWillRelease) {} - CACFString(const char* inCString, CFStringEncoding inCStringEncoding, bool inWillRelease = true) : mCFString(CFStringCreateWithCString(NULL, inCString, inCStringEncoding)), mWillRelease(inWillRelease) {} - ~CACFString() { Release(); } - CACFString(const CACFString& inString) : mCFString(inString.mCFString), mWillRelease(inString.mWillRelease) { Retain(); } - CACFString& operator=(const CACFString& inString) { Release(); mCFString = inString.mCFString; mWillRelease = inString.mWillRelease; Retain(); return *this; } - CACFString& operator=(CFStringRef inCFString) { Release(); mCFString = inCFString; mWillRelease = true; return *this; } - -private: - void Retain() { if(mWillRelease && (mCFString != NULL)) { CFRetain(mCFString); } } - void Release() { if(mWillRelease && (mCFString != NULL)) { CFRelease(mCFString); } } - - CFStringRef mCFString; - bool mWillRelease; - -// Operations -public: - void AllowRelease() { mWillRelease = true; } - void DontAllowRelease() { mWillRelease = false; } - bool IsValid() const { return mCFString != NULL; } - bool StartsWith(CFStringRef inString) const { bool theAnswer = false; if(mCFString != NULL) { theAnswer = CFStringHasPrefix(mCFString, inString); } return theAnswer; } - bool EndsWith(CFStringRef inString) const { bool theAnswer = false; if(mCFString != NULL) { theAnswer = CFStringHasSuffix(mCFString, inString); } return theAnswer; } - -// Value Access -public: - CFStringRef GetCFString() const { return mCFString; } - CFStringRef CopyCFString() const { if(mCFString != NULL) { CFRetain(mCFString); } return mCFString; } - UInt32 GetLength() const { UInt32 theAnswer = 0; if(mCFString != NULL) { theAnswer = CFStringGetLength(mCFString); } return theAnswer; } - UInt32 GetByteLength(CFStringEncoding inEncoding = kCFStringEncodingUTF8) const { UInt32 theAnswer = 0; if(mCFString != NULL) { theAnswer = GetStringByteLength(mCFString, inEncoding); } return theAnswer; } - void GetCString(char* outString, UInt32& ioStringSize, CFStringEncoding inEncoding = kCFStringEncodingUTF8) const { GetCString(mCFString, outString, ioStringSize, inEncoding); } - void GetUnicodeString(UInt16* outString, UInt32& ioStringSize) const { GetUnicodeString(mCFString, outString, ioStringSize); } - - static UInt32 GetStringByteLength(CFStringRef inCFString, CFStringEncoding inEncoding = kCFStringEncodingUTF8); - static void GetCString(CFStringRef inCFString, char* outString, UInt32& ioStringSize, CFStringEncoding inEncoding = kCFStringEncodingUTF8); - static void GetUnicodeString(CFStringRef inCFString, UInt16* outString, UInt32& ioStringSize); - -}; - -inline bool operator<(const CACFString& x, const CACFString& y) { return CFStringCompare(x.GetCFString(), y.GetCFString(), 0) == kCFCompareLessThan; } -inline bool operator==(const CACFString& x, const CACFString& y) { return CFStringCompare(x.GetCFString(), y.GetCFString(), 0) == kCFCompareEqualTo; } -inline bool operator!=(const CACFString& x, const CACFString& y) { return !(x == y); } -inline bool operator<=(const CACFString& x, const CACFString& y) { return (x < y) || (x == y); } -inline bool operator>=(const CACFString& x, const CACFString& y) { return !(x < y); } -inline bool operator>(const CACFString& x, const CACFString& y) { return !((x < y) || (x == y)); } - -//============================================================================= -// CACFMutableString -//============================================================================= - -class CACFMutableString -{ -// Construction/Destruction -public: - CACFMutableString() : mCFMutableString(NULL), mWillRelease(true) {} - CACFMutableString(CFMutableStringRef inCFMutableString, bool inWillRelease = true) : mCFMutableString(inCFMutableString), mWillRelease(inWillRelease) {} - CACFMutableString(CFStringRef inStringToCopy, bool /*inMakeCopy*/, bool inWillRelease = true) : mCFMutableString(CFStringCreateMutableCopy(NULL, 0, inStringToCopy)), mWillRelease(inWillRelease) {} - CACFMutableString(const char* inCString, bool inWillRelease = true) : mCFMutableString(NULL), mWillRelease(inWillRelease) { CACFString theString(inCString); mCFMutableString = CFStringCreateMutableCopy(NULL, 0, theString.GetCFString()); } - CACFMutableString(const char* inCString, CFStringEncoding inCStringEncoding, bool inWillRelease = true) : mCFMutableString(NULL), mWillRelease(inWillRelease) { CACFString theString(inCString, inCStringEncoding); mCFMutableString = CFStringCreateMutableCopy(NULL, 0, theString.GetCFString()); } - ~CACFMutableString() { Release(); } - CACFMutableString(const CACFMutableString& inString) : mCFMutableString(inString.mCFMutableString), mWillRelease(inString.mWillRelease) { Retain(); } - CACFMutableString operator=(const CACFMutableString& inString) { Release(); mCFMutableString = inString.mCFMutableString; mWillRelease = inString.mWillRelease; Retain(); return *this; } - CACFMutableString operator=(CFMutableStringRef inCFMutableString) { Release(); mCFMutableString = inCFMutableString; mWillRelease = true; return *this; } - -private: - void Retain() { if(mWillRelease && (mCFMutableString != NULL)) { CFRetain(mCFMutableString); } } - void Release() { if(mWillRelease && (mCFMutableString != NULL)) { CFRelease(mCFMutableString); } } - - CFMutableStringRef mCFMutableString; - bool mWillRelease; - -// Operations -public: - void AllowRelease() { mWillRelease = true; } - void DontAllowRelease() { mWillRelease = false; } - bool IsValid() { return mCFMutableString != NULL; } - bool StartsWith(CFStringRef inString) const { bool theAnswer = false; if(mCFMutableString != NULL) { theAnswer = CFStringHasPrefix(mCFMutableString, inString); } return theAnswer; } - bool EndsWith(CFStringRef inString) const { bool theAnswer = false; if(mCFMutableString != NULL) { theAnswer = CFStringHasSuffix(mCFMutableString, inString); } return theAnswer; } - void Append(CFStringRef inString) { if(mCFMutableString != NULL) { CFStringAppend(mCFMutableString, inString); } } - -// Value Access -public: - CFMutableStringRef GetCFMutableString() const { return mCFMutableString; } - CFMutableStringRef CopyCFMutableString() const { if(mCFMutableString != NULL) { CFRetain(mCFMutableString); } return mCFMutableString; } - UInt32 GetLength() const { UInt32 theAnswer = 0; if(mCFMutableString != NULL) { theAnswer = CFStringGetLength(mCFMutableString); } return theAnswer; } - UInt32 GetByteLength(CFStringEncoding inEncoding = kCFStringEncodingUTF8) const { UInt32 theAnswer = 0; if(mCFMutableString != NULL) { theAnswer = CACFString::GetStringByteLength(mCFMutableString, inEncoding); } return theAnswer; } - void GetCString(char* outString, UInt32& ioStringSize, CFStringEncoding inEncoding = kCFStringEncodingUTF8) const { CACFString::GetCString(mCFMutableString, outString, ioStringSize, inEncoding); } - void GetUnicodeString(UInt16* outString, UInt32& ioStringSize) const { CACFString::GetUnicodeString(mCFMutableString, outString, ioStringSize); } - -}; - -#endif diff --git a/libs/appleutility/CAComponent.cpp b/libs/appleutility/CAComponent.cpp deleted file mode 100644 index 700d9e2b3e..0000000000 --- a/libs/appleutility/CAComponent.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAComponent.cpp - -=============================================================================*/ - -#include "CAComponent.h" -#include "CAComponentDescription.h" -#include "CACFDictionary.h" -#include - -CAComponent::CAComponent (const ComponentDescription& inDesc, CAComponent* next) - : mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) -{ - mComp = FindNextComponent ((next ? next->Comp() : NULL), const_cast(&inDesc)); - if (mComp) - GetComponentInfo (Comp(), &mDesc, NULL, NULL, NULL); - else - memcpy (&mDesc, &inDesc, sizeof(ComponentDescription)); -} - -CAComponent::CAComponent (const Component& comp) - : mComp (comp), - mManuName(0), - mAUName(0), - mCompName(0), - mCompInfo (0) -{ - GetComponentInfo (Comp(), &mDesc, NULL, NULL, NULL); -} - -CAComponent::CAComponent (const ComponentInstance& compInst) - : mComp (Component(compInst)), - mManuName(0), - mAUName(0), - mCompName(0), - mCompInfo (0) -{ - GetComponentInfo (Comp(), &mDesc, NULL, NULL, NULL); -} - -CAComponent::CAComponent (OSType inType, OSType inSubtype, OSType inManu) - : mDesc (inType, inSubtype, inManu), - mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) -{ - mComp = FindNextComponent (NULL, &mDesc); - GetComponentInfo (Comp(), &mDesc, NULL, NULL, NULL); -} - -CAComponent::~CAComponent () -{ - Clear(); -} - -OSStatus CAComponent::GetResourceVersion (UInt32 &outVersion) const -{ - bool versionFound = false; - short componentResFileID = kResFileNotOpened; - OSStatus result; - short thngResourceCount; - - short curRes = CurResFile(); - require_noerr (result = OpenAComponentResFile( mComp, &componentResFileID), home); - require_noerr (result = componentResFileID <= 0, home); - - UseResFile(componentResFileID); - - thngResourceCount = Count1Resources(kComponentResourceType); - - require_noerr (result = ResError(), home); - // only go on if we successfully found at least 1 thng resource - require_noerr (thngResourceCount <= 0 ? -1 : 0, home); - - // loop through all of the Component thng resources trying to - // find one that matches this Component description - for (short i = 0; i < thngResourceCount && (!versionFound); i++) - { - // try to get a handle to this code resource - Handle thngResourceHandle = Get1IndResource(kComponentResourceType, i+1); - if (thngResourceHandle != NULL && ((*thngResourceHandle) != NULL)) - { - if (UInt32(GetHandleSize(thngResourceHandle)) >= sizeof(ExtComponentResource)) - { - ExtComponentResource * componentThng = (ExtComponentResource*) (*thngResourceHandle); - - // check to see if this is the thng resource for the particular Component that we are looking at - // (there often is more than one Component described in the resource) - if ((componentThng->cd.componentType == mDesc.Type()) - && (componentThng->cd.componentSubType == mDesc.SubType()) - && (componentThng->cd.componentManufacturer == mDesc.Manu())) - { - outVersion = componentThng->componentVersion; - versionFound = true; - } - } - ReleaseResource(thngResourceHandle); - } - } - - if (!versionFound) - result = resNotFound; - - UseResFile(curRes); // revert - - if ( componentResFileID != kResFileNotOpened ) - CloseComponentResFile(componentResFileID); - -home: - return result; -} - -void CAComponent::Clear () -{ - if (mManuName) { CFRelease (mManuName); mManuName = 0; } - if (mAUName) { CFRelease (mAUName); mAUName = 0; } - if (mCompName) { CFRelease (mCompName); mCompName = 0; } - if (mCompInfo) { CFRelease (mCompInfo); mCompInfo = 0; } -} - -CAComponent& CAComponent::operator= (const CAComponent& y) -{ - Clear(); - - mComp = y.mComp; - mDesc = y.mDesc; - - if (y.mManuName) { mManuName = y.mManuName; CFRetain (mManuName); } - if (y.mAUName) { mAUName = y.mAUName; CFRetain (mAUName); } - if (y.mCompName) { mCompName = y.mCompName; CFRetain (mCompName); } - if (y.mCompInfo) { mCompInfo = y.mCompInfo; CFRetain (mCompInfo); } - - return *this; -} - -void CAComponent::SetCompNames () const -{ - if (!mCompName) { - Handle h1 = NewHandle(4); - CAComponentDescription desc; - OSStatus err = GetComponentInfo (Comp(), &desc, h1, 0, 0); - - if (err) { DisposeHandle(h1); return; } - - HLock(h1); - char* ptr1 = *h1; - // Get the manufacturer's name... look for the ':' character convention - int len = *ptr1++; - char* displayStr = 0; - - const_cast(this)->mCompName = CFStringCreateWithPascalString(NULL, (const unsigned char*)*h1, kCFStringEncodingMacRoman); - - for (int i = 0; i < len; ++i) { - if (ptr1[i] == ':') { // found the name - ptr1[i] = 0; - displayStr = ptr1; - break; - } - } - - if (displayStr) - { - const_cast(this)->mManuName = CFStringCreateWithCString(NULL, displayStr, kCFStringEncodingMacRoman); - - //move displayStr ptr past the manu, to the name - // we move the characters down a index, because the handle doesn't have any room - // at the end for the \0 - int i = strlen(displayStr), j = 0; - while (displayStr[++i] == ' ' && i < len) - ; - while (i < len) - displayStr[j++] = displayStr[i++]; - displayStr[j] = 0; - - const_cast(this)->mAUName = CFStringCreateWithCString(NULL, displayStr, kCFStringEncodingMacRoman); - } - - DisposeHandle (h1); - } -} - -void CAComponent::SetCompInfo () const -{ - if (!mCompInfo) { - Handle h1 = NewHandle(4); - CAComponentDescription desc; - OSStatus err = GetComponentInfo (Comp(), &desc, 0, h1, 0); - if (err) return; - HLock (h1); - const_cast(this)->mCompInfo = CFStringCreateWithPascalString(NULL, (const unsigned char*)*h1, kCFStringEncodingMacRoman); - - DisposeHandle (h1); - } -} - -void _ShowCF (FILE* file, CFStringRef str) -{ - if (CFGetTypeID(str) != CFStringGetTypeID()) { - CFShow(str); - return; - } - - UInt32 len = CFStringGetLength(str); - char* chars = (char*)malloc (len * 2); // give us plenty of room for unichar chars - if (CFStringGetCString (str, chars, len * 2, kCFStringEncodingUTF8)) - fprintf (file, "%s", chars); - else - CFShow (str); - - free (chars); -} - -void CAComponent::Print(FILE* file) const -{ - fprintf (file, "CAComponent: 0x%X", int(Comp())); - if (mManuName) { - fprintf (file, ", Manu:"); _ShowCF (file, mManuName); - if (mAUName) fprintf (file, ", Name:"); _ShowCF (file, mAUName); - } - fprintf (file, ", "); - Desc ().Print(file); -} diff --git a/libs/appleutility/CAComponent.h b/libs/appleutility/CAComponent.h deleted file mode 100644 index 2ace42532d..0000000000 --- a/libs/appleutility/CAComponent.h +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAComponent.h - -=============================================================================*/ - -#ifndef __CAComponent_h__ -#define __CAComponent_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include - #include -#endif - -#include "CAComponentDescription.h" - -class CAComponent -{ -public: - CAComponent () - : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) {} - - // if next is specifed that is used to find the next component after that one - CAComponent (const ComponentDescription& inDesc, CAComponent* next = 0); - - CAComponent (const CAComponent& y) - : mComp (0), mDesc(), mManuName(0), mAUName(0), mCompName(0), mCompInfo (0) { *this = y; } - - CAComponent (const Component& comp); - - CAComponent (const ComponentInstance& compInst); - - CAComponent (OSType inType, OSType inSubtype = 0, OSType inManu = 0); - - ~CAComponent (); - - CAComponent& operator= (const CAComponent& y); - - // returns true if this object references a valid component - bool IsValid () const { return Comp() != 0; } - - bool HasAUStrings() const { SetCompNames (); return mManuName != 0; } - - // CFStringRef should be retained by caller if needed beyond lifetime of this object - - // Can return NULL if component doesn't follow AU naming conventions - CFStringRef GetAUManu () const { SetCompNames (); return mManuName; } - CFStringRef GetAUName () const { SetCompNames (); return mAUName ? mAUName : mCompName; } - - // Return value of NULL indicates a problem getting that information from the component - CFStringRef GetCompName () const { SetCompNames(); return mCompName; } - CFStringRef GetCompInfo () const { SetCompInfo(); return mCompInfo; } - - const CAComponentDescription& Desc () const { return mDesc; } - - OSStatus Open (ComponentInstance& outInst) const - { - return OpenAComponent (Comp(), &outInst); - } - - OSStatus GetResourceVersion (UInt32 &outVersion) const; - - const Component& Comp() const { return mComp; } - - void Print(FILE* file = stdout) const; - - OSStatus Save (CFPropertyListRef *outData) const; - - OSStatus Restore (CFPropertyListRef &inData); - -private: - Component mComp; - CAComponentDescription mDesc; - - CFStringRef mManuName, mAUName, mCompName, mCompInfo; - - void SetCompNames () const; - void SetCompInfo () const; - void Clear (); -}; - -#endif diff --git a/libs/appleutility/CAComponentDescription.cpp b/libs/appleutility/CAComponentDescription.cpp deleted file mode 100644 index 261a2b881c..0000000000 --- a/libs/appleutility/CAComponentDescription.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAComponentDescription.cpp - -=============================================================================*/ - -#include "CAComponentDescription.h" -#include - -extern "C" void CAShowComponentDescription(const ComponentDescription *desc) -{ - CAComponentDescription::_CAShowComponentDescription (desc, stdout); -} - -char *StringForOSType (OSType t, char *writeLocation) -{ - char *p = writeLocation; - unsigned char str[4], *q = str; - *(UInt32 *)str = EndianU32_NtoB(t); - for (int i = 0; i < 4; ++i) { - if (isprint(*q) && *q != '\\') - *p++ = *q++; - else { - sprintf(p, "\\x%02X", *q++); - p += 4; - } - } - *p = '\0'; - return writeLocation; -} - - -void CAComponentDescription::_CAShowComponentDescription(const ComponentDescription *desc, FILE* file) -{ - if (desc) - { - char str[24]; - fprintf (file, "ComponentDescription: %s - ", StringForOSType(desc->componentType, str)); - fprintf (file, "%s - ", StringForOSType(desc->componentSubType, str)); - fprintf (file, "%s", StringForOSType(desc->componentManufacturer, str)); - fprintf (file, ", 0x%lX, 0x%lX\n", desc->componentFlags, desc->componentFlagsMask); - } -} - -CAComponentDescription::CAComponentDescription (OSType inType, OSType inSubtype, OSType inManu) -{ - componentType = inType; - componentSubType = inSubtype; - componentManufacturer = inManu; - componentFlags = 0; - componentFlagsMask = 0; -} - -bool CAComponentDescription::IsAU () const -{ - bool flag = IsEffect() || IsMusicDevice() || IsOffline(); - if (flag) return true; - - switch (componentType) { - case kAudioUnitType_Output: - case kAudioUnitType_FormatConverter: - case kAudioUnitType_Mixer: - return true; - } - return false; -} - -inline bool _MatchTest (const OSType &inTypeA, const OSType &inTypeB) -{ - return ((inTypeA == inTypeB) || (!inTypeA && !inTypeB) || (inTypeA && !inTypeB) || (!inTypeA && inTypeB)); -} - -bool CAComponentDescription::Matches (const ComponentDescription &desc) const -{ - bool matches = false; - - // see if the type matches - matches = _MatchTest (componentType, desc.componentType); - - if (matches) - matches = _MatchTest (componentSubType, desc.componentSubType); - - if (matches) - matches = _MatchTest (componentManufacturer, desc.componentManufacturer); - - return matches; -} diff --git a/libs/appleutility/CAComponentDescription.h b/libs/appleutility/CAComponentDescription.h deleted file mode 100644 index a681902b91..0000000000 --- a/libs/appleutility/CAComponentDescription.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAComponentDescription.h - -=============================================================================*/ - -#ifndef __CAComponentDescription_h__ -#define __CAComponentDescription_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include -#else - #include - #include - #include -#endif - -#include "CACFDictionary.h" -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void CAShowComponentDescription(const ComponentDescription *desc); - -#ifdef __cplusplus -} -#endif - - -// ____________________________________________________________________________ -// -// CAComponentDescription -class CAComponentDescription : public ComponentDescription { -public: - CAComponentDescription() { memset (this, 0, sizeof (ComponentDescription)); } - - CAComponentDescription (OSType inType, OSType inSubtype = 0, OSType inManu = 0); - - CAComponentDescription(const ComponentDescription& desc) { memcpy (this, &desc, sizeof (ComponentDescription)); } - - // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - // - // interrogation - - bool IsAU () const; - - bool IsAUFX() const { return componentType == kAudioUnitType_Effect; } - bool IsAUFM() const { return componentType == kAudioUnitType_MusicEffect; } - - bool IsEffect () const { return IsAUFX() || IsAUFM() || IsPanner(); } - - bool IsOffline () const { return componentType == 'auol'; } - - bool IsFConv () const { return componentType == kAudioUnitType_FormatConverter; } - - bool IsPanner () const { return componentType == kAudioUnitType_Panner; } - - bool IsMusicDevice () const { return componentType == kAudioUnitType_MusicDevice; } - -#ifndef MAC_OS_X_VERSION_10_4 - bool IsGenerator () const { return componentType =='augn'; } -#else - bool IsGenerator () const { return componentType ==kAudioUnitType_Generator; } -#endif - - bool IsOutput () const { return componentType == kAudioUnitType_Output; } - - bool IsSource () const { return IsMusicDevice() || IsGenerator(); } - - OSType Type () const { return componentType; } - OSType SubType () const { return componentSubType; } - OSType Manu () const { return componentManufacturer; } - - int Count() const { return CountComponents(const_cast(this)); } - - // does a semantic match where "wild card" values for type, subtype, manu will match - bool Matches (const ComponentDescription &desc) const; - - // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - // - // other - - void Print(FILE* file = stdout) const { _CAShowComponentDescription (this, file); } - - OSStatus Save (CFPropertyListRef *outData) const; - OSStatus Restore (CFPropertyListRef &inData); - -private: - static void _CAShowComponentDescription (const ComponentDescription *desc, FILE* file); - friend void CAShowComponentDescription (const ComponentDescription *desc); -}; - -inline bool operator< (const ComponentDescription& x, const ComponentDescription& y) -{ - return memcmp (&x, &y, offsetof (ComponentDescription, componentFlags)) < 0; -} - -inline bool operator== (const ComponentDescription& x, const ComponentDescription& y) -{ - return !memcmp (&x, &y, offsetof (ComponentDescription, componentFlags)); -} - -inline bool operator!= (const ComponentDescription& x, const ComponentDescription& y) -{ - return !(x == y); -} - -#endif diff --git a/libs/appleutility/CAConditionalMacros.h b/libs/appleutility/CAConditionalMacros.h deleted file mode 100644 index 62f642709a..0000000000 --- a/libs/appleutility/CAConditionalMacros.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAConditionalMacros.h - -=============================================================================*/ -#if !defined(__CAConditionalMacros_h__) -#define __CAConditionalMacros_h__ - -//============================================================================= -// This file exists to make figuring out how to include system headers -// easier in a cross platform world. We throw in an include of the standard -// ConditionalMacros too. -//============================================================================= - -// ########## THIS FILE SHOULD GO AWAY SOON, replaced by __COREAUDIO_USE_FLAT_INCLUDES__ -// but for now, use this as a way to define __COREAUDIO_USE_FLAT_INCLUDES__ programmatically - -// TargetConditionals.h defines the bare minimum we need -#include "TargetConditionals.h" - -// Determine whether or not to use framework style includes for system headers -#if !defined(CoreAudio_Use_Framework_Includes) && !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #if TARGET_RT_MAC_MACHO - #define CoreAudio_Use_Framework_Includes 1 - #else - #define CoreAudio_Use_Framework_Includes 0 - #endif -#endif - -// Include the regular ConditionalMacros.h too, since it has useful stuff that -// TargetConditionals.h lacks for some reason. -#if CoreAudio_Use_Framework_Includes - #include -#else - #include "ConditionalMacros.h" -#endif - -#endif diff --git a/libs/appleutility/CADebugMacros.cpp b/libs/appleutility/CADebugMacros.cpp deleted file mode 100644 index edee1f3d51..0000000000 --- a/libs/appleutility/CADebugMacros.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CADebugMacros.cp - -=============================================================================*/ - -#include "CADebugMacros.h" -#include -#include -#if TARGET_API_MAC_OSX - #include -#endif - -#if DEBUG -#include - -void DebugPrint(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - vprintf(fmt, args); - va_end(args); -} -#endif // DEBUG - -#if TARGET_API_MAC_OSX -void LogError(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); -#if DEBUG - vprintf(fmt, args); -#endif - vsyslog(LOG_ERR, fmt, args); - va_end(args); -} - -void LogWarning(const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); -#if DEBUG - vprintf(fmt, args); -#endif - vsyslog(LOG_WARNING, fmt, args); - va_end(args); -} -#endif diff --git a/libs/appleutility/CADebugMacros.h b/libs/appleutility/CADebugMacros.h deleted file mode 100644 index 1abae40187..0000000000 --- a/libs/appleutility/CADebugMacros.h +++ /dev/null @@ -1,414 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CADebugMacros.h - -=============================================================================*/ -#if !defined(__CADebugMacros_h__) -#define __CADebugMacros_h__ - -//============================================================================= -// CADebugMacros -//============================================================================= - -//#define CoreAudio_StopOnFailure 1 -//#define CoreAudio_TimeStampMessages 1 -//#define CoreAudio_ThreadStampMessages 1 -//#define CoreAudio_FlushDebugMessages 1 - -#define CA4CCToCString(the4CC) { ((char*)&the4CC)[0], ((char*)&the4CC)[1], ((char*)&the4CC)[2], ((char*)&the4CC)[3], 0 } - -#pragma mark Basic Definitions - -#if DEBUG || CoreAudio_Debug - - // can be used to break into debugger immediately, also see CADebugger - #define BusError() (*(long *)0 = 0) - - // basic debugging print routines - #if TARGET_OS_MAC && !TARGET_API_MAC_CARBON - extern pascal void DebugStr(const unsigned char* debuggerMsg); - #define DebugMessage(msg) DebugStr("\p"msg) - #define DebugMessageN1(msg, N1) - #define DebugMessageN2(msg, N1, N2) - #define DebugMessageN3(msg, N1, N2, N3) - #else - #include "CADebugPrintf.h" - - #if (CoreAudio_FlushDebugMessages && !CoreAudio_UseSysLog) || defined(CoreAudio_UseSideFile) - #define FlushRtn ;fflush(DebugPrintfFile) - #else - #define FlushRtn - #endif - - #if CoreAudio_ThreadStampMessages - #include - #include "CAHostTimeBase.h" - #define DebugMessage(msg) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: %s"DebugPrintfLineEnding, pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), msg) FlushRtn - #define DebugMessageN1(msg, N1) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1) FlushRtn - #define DebugMessageN2(msg, N1, N2) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2) FlushRtn - #define DebugMessageN3(msg, N1, N2, N3) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3) FlushRtn - #define DebugMessageN4(msg, N1, N2, N3, N4) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4) FlushRtn - #define DebugMessageN5(msg, N1, N2, N3, N4, N5) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5) FlushRtn - #define DebugMessageN6(msg, N1, N2, N3, N4, N5, N6) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6) FlushRtn - #define DebugMessageN7(msg, N1, N2, N3, N4, N5, N6, N7) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6, N7) FlushRtn - #define DebugMessageN8(msg, N1, N2, N3, N4, N5, N6, N7, N8) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6, N7, N8) FlushRtn - #define DebugMessageN9(msg, N1, N2, N3, N4, N5, N6, N7, N8, N9) DebugPrintfRtn(DebugPrintfFile, "%p %.4f: "msg"\n", pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6, N7, N8, N9) FlushRtn - #elif CoreAudio_TimeStampMessages - #include "CAHostTimeBase.h" - #define DebugMessage(msg) DebugPrintfRtn(DebugPrintfFile, "%.4f: %s"DebugPrintfLineEnding, pthread_self(), ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), msg) FlushRtn - #define DebugMessageN1(msg, N1) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1) FlushRtn - #define DebugMessageN2(msg, N1, N2) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2) FlushRtn - #define DebugMessageN3(msg, N1, N2, N3) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3) FlushRtn - #define DebugMessageN4(msg, N1, N2, N3, N4) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4) FlushRtn - #define DebugMessageN5(msg, N1, N2, N3, N4, N5) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5) FlushRtn - #define DebugMessageN6(msg, N1, N2, N3, N4, N5, N6) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6) FlushRtn - #define DebugMessageN7(msg, N1, N2, N3, N4, N5, N6, N7) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6, N7) FlushRtn - #define DebugMessageN8(msg, N1, N2, N3, N4, N5, N6, N7, N8) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6, N7, N8) FlushRtn - #define DebugMessageN9(msg, N1, N2, N3, N4, N5, N6, N7, N8, N9) DebugPrintfRtn(DebugPrintfFile, "%.4f: "msg DebugPrintfLineEnding, ((Float64)(CAHostTimeBase::GetCurrentTimeInNanos()) / 1000000.0), N1, N2, N3, N4, N5, N6, N7, N8, N9) FlushRtn - #else - #define DebugMessage(msg) DebugPrintfRtn(DebugPrintfFile, "%s"DebugPrintfLineEnding, msg) FlushRtn - #define DebugMessageN1(msg, N1) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1) FlushRtn - #define DebugMessageN2(msg, N1, N2) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2) FlushRtn - #define DebugMessageN3(msg, N1, N2, N3) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3) FlushRtn - #define DebugMessageN4(msg, N1, N2, N3, N4) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3, N4) FlushRtn - #define DebugMessageN5(msg, N1, N2, N3, N4, N5) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3, N4, N5) FlushRtn - #define DebugMessageN6(msg, N1, N2, N3, N4, N5, N6) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3, N4, N5, N6) FlushRtn - #define DebugMessageN7(msg, N1, N2, N3, N4, N5, N6, N7) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3, N4, N5, N6, N7) FlushRtn - #define DebugMessageN8(msg, N1, N2, N3, N4, N5, N6, N7, N8) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3, N4, N5, N6, N7, N8) FlushRtn - #define DebugMessageN9(msg, N1, N2, N3, N4, N5, N6, N7, N8, N9) DebugPrintfRtn(DebugPrintfFile, msg DebugPrintfLineEnding, N1, N2, N3, N4, N5, N6, N7, N8, N9) FlushRtn - #endif - #endif - void DebugPrint(const char *fmt, ...); // can be used like printf - #define DEBUGPRINT(msg) DebugPrint msg // have to double-parenthesize arglist (see Debugging.h) - #if VERBOSE - #define vprint(msg) DEBUGPRINT(msg) - #else - #define vprint(msg) - #endif - - #if CoreAudio_StopOnFailure - #include "CADebugger.h" - #define STOP CADebuggerStop() - #else - #define STOP - #endif - -#else - #define DebugMessage(msg) - #define DebugMessageN1(msg, N1) - #define DebugMessageN2(msg, N1, N2) - #define DebugMessageN3(msg, N1, N2, N3) - #define DebugMessageN4(msg, N1, N2, N3, N4) - #define DebugMessageN5(msg, N1, N2, N3, N4, N5) - #define DebugMessageN6(msg, N1, N2, N3, N4, N5, N6) - #define DebugMessageN7(msg, N1, N2, N3, N4, N5, N6, N7) - #define DebugMessageN8(msg, N1, N2, N3, N4, N5, N6, N7, N8) - #define DebugMessageN9(msg, N1, N2, N3, N4, N5, N6, N7, N8, N9) - #define DEBUGPRINT(msg) - #define vprint(msg) - #define STOP -#endif - -void LogError(const char *fmt, ...); // writes to syslog (and stderr if debugging) -void LogWarning(const char *fmt, ...); // writes to syslog (and stderr if debugging) - -#if DEBUG || CoreAudio_Debug - -#pragma mark Debug Macros - -#define Assert(inCondition, inMessage) \ - if(!(inCondition)) \ - { \ - DebugMessage(inMessage); \ - STOP; \ - } - -#define AssertNoError(inError, inMessage) \ - { \ - SInt32 __Err = (inError); \ - if(__Err != 0) \ - { \ - char __4CC[5] = CA4CCToCString(__Err); \ - DebugMessageN2(inMessage ", Error: %ld (%s)", __Err, __4CC); \ - STOP; \ - } \ - } - -#define AssertNoKernelError(inError, inMessage) \ - { \ - unsigned int __Err = (unsigned int)(inError); \ - if(__Err != 0) \ - { \ - DebugMessageN1(inMessage ", Error: 0x%X", __Err); \ - STOP; \ - } \ - } - -#define FailIf(inCondition, inHandler, inMessage) \ - if(inCondition) \ - { \ - DebugMessage(inMessage); \ - STOP; \ - goto inHandler; \ - } - -#define FailWithAction(inCondition, inAction, inHandler, inMessage) \ - if(inCondition) \ - { \ - DebugMessage(inMessage); \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } - -#define FailIfNULL(inPointer, inAction, inHandler, inMessage) \ - if((inPointer) == NULL) \ - { \ - DebugMessage(inMessage); \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } - -#define FailIfKernelError(inKernelError, inException, inMessage) \ - { \ - kern_return_t __Err = (inKernelError); \ - if(__Err != 0) \ - { \ - DebugMessageN1(inMessage ", Error: 0x%X", __Err); \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } \ - } - -#define FailIfError(inError, inException, inMessage) \ - { \ - SInt32 __Err = (inError); \ - if(__Err != 0) \ - { \ - char __4CC[5] = CA4CCToCString(__Err); \ - DebugMessageN2(inMessage ", Error: %ld (%s)", __Err, __4CC); \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } \ - } - -#if defined(__cplusplus) - -#define Throw(inException) STOP; throw (inException) - -#define ThrowIf(inCondition, inException, inMessage) \ - if(inCondition) \ - { \ - DebugMessage(inMessage); \ - Throw(inException); \ - } - -#define ThrowIfNULL(inPointer, inException, inMessage) \ - if((inPointer) == NULL) \ - { \ - DebugMessage(inMessage); \ - Throw(inException); \ - } - -#define ThrowIfKernelError(inKernelError, inException, inMessage) \ - { \ - kern_return_t __Err = (inKernelError); \ - if(__Err != 0) \ - { \ - DebugMessageN1(inMessage ", Error: 0x%X", __Err); \ - Throw(inException); \ - } \ - } - -#define ThrowIfError(inError, inException, inMessage) \ - { \ - SInt32 __Err = (inError); \ - if(__Err != 0) \ - { \ - char __4CC[5] = CA4CCToCString(__Err); \ - DebugMessageN2(inMessage ", Error: %ld (%s)", __Err, __4CC); \ - Throw(inException); \ - } \ - } - -#if TARGET_OS_WIN32 -#define ThrowIfWinError(inError, inException, inMessage) \ - { \ - HRESULT __Err = (inError); \ - if(FAILED(__Err)) \ - { \ - DebugMessageN1(inMessage ", Error: 0x%X", __Err); \ - Throw(inException); \ - } \ - } -#endif - -#define SubclassResponsibility(inMethodName, inException) \ - { \ - DebugMessage(inMethodName": Subclasses must implement this method"); \ - Throw(inException); \ - } - -#endif // defined(__cplusplus) - -#else - -#pragma mark Release Macros - -#define Assert(inCondition, inMessage) \ - if(!(inCondition)) \ - { \ - STOP; \ - } - -#define AssertNoError(inError, inMessage) \ - { \ - SInt32 __Err = (inError); \ - if(__Err != 0) \ - { \ - STOP; \ - } \ - } - -#define AssertNoKernelError(inError, inMessage) \ - { \ - unsigned int __Err = (unsigned int)(inError); \ - if(__Err != 0) \ - { \ - STOP; \ - } \ - } - -#define FailIf(inCondition, inHandler, inMessage) \ - if(inCondition) \ - { \ - STOP; \ - goto inHandler; \ - } - -#define FailWithAction(inCondition, inAction, inHandler, inMessage) \ - if(inCondition) \ - { \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } - -#define FailIfNULL(inPointer, inAction, inHandler, inMessage) \ - if((inPointer) == NULL) \ - { \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } - -#define FailIfKernelError(inKernelError, inException, inMessage) \ - if((inKernelError) != 0) \ - { \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } - -#define FailIfError(inError, inException, inMessage) \ - if((inError) != 0) \ - { \ - STOP; \ - { inAction; } \ - goto inHandler; \ - } - -#if defined(__cplusplus) - -#define Throw(inException) STOP; throw (inException) - -#define ThrowIf(inCondition, inException, inMessage) \ - if(inCondition) \ - { \ - Throw(inException); \ - } - -#define ThrowIfNULL(inPointer, inException, inMessage) \ - if((inPointer) == NULL) \ - { \ - Throw(inException); \ - } - -#define ThrowIfKernelError(inKernelError, inException, inMessage) \ - { \ - kern_return_t __Err = (inKernelError); \ - if(__Err != 0) \ - { \ - Throw(inException); \ - } \ - } - -#define ThrowIfError(inError, inException, inMessage) \ - { \ - SInt32 __Err = (inError); \ - if(__Err != 0) \ - { \ - Throw(inException); \ - } \ - } - -#if TARGET_OS_WIN32 -#define ThrowIfWinError(inError, inException, inMessage) \ - { \ - HRESULT __Err = (inError); \ - if(FAILED(__Err)) \ - { \ - Throw(inException); \ - } \ - } -#endif - -#define SubclassResponsibility(inMethodName, inException) \ - { \ - Throw(inException); \ - } - -#endif // defined(__cplusplus) - -#endif // DEBUG || CoreAudio_Debug - -#endif diff --git a/libs/appleutility/CAMath.h b/libs/appleutility/CAMath.h deleted file mode 100644 index 32b4e7f0b3..0000000000 --- a/libs/appleutility/CAMath.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAMath.h - -=============================================================================*/ - -#ifndef __CAMath_h__ -#define __CAMath_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -inline bool fiszero(Float64 f) { return (f == 0.); } -inline bool fiszero(Float32 f) { return (f == 0.f); } - -inline bool fnonzero(Float64 f) { return !fiszero(f); } -inline bool fnonzero(Float32 f) { return !fiszero(f); } - -inline bool fequal(const Float64 &a, const Float64 &b) { return a == b; } -inline bool fequal(const Float32 &a, const Float32 &b) { return a == b; } - -inline bool fnotequal(const Float64 &a, const Float64 &b) { return !fequal(a, b); } -inline bool fnotequal(const Float32 &a, const Float32 &b) { return !fequal(a, b); } - -#endif // __CAMath_h__ diff --git a/libs/appleutility/CAReferenceCounted.h b/libs/appleutility/CAReferenceCounted.h deleted file mode 100644 index d57f97c31f..0000000000 --- a/libs/appleutility/CAReferenceCounted.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAReferenceCounted.h - -=============================================================================*/ - -#ifndef __CAReferenceCounted_h__ -#define __CAReferenceCounted_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -#if TARGET_OS_WIN32 - #include "CAWindows.h" -#endif - -// base class for reference-counted objects -class CAReferenceCounted { -public: - CAReferenceCounted() : mRefCount(1) {} - - void retain() { IncrementAtomic(&mRefCount); } - - void release() - { - // this returns the ORIGINAL value, not the new one. - SInt32 rc = DecrementAtomic(&mRefCount); - if (rc == 1) { - delete this; - } - } - -protected: - virtual ~CAReferenceCounted() { } - -private: - SInt32 mRefCount; - - CAReferenceCounted(const CAReferenceCounted &a) : mRefCount(0) { } - CAReferenceCounted operator=(const CAReferenceCounted &a) { return *this; } -}; - - -#endif // __CAReferenceCounted_h__ diff --git a/libs/appleutility/CAStreamBasicDescription.cpp b/libs/appleutility/CAStreamBasicDescription.cpp deleted file mode 100644 index f65bdd99ac..0000000000 --- a/libs/appleutility/CAStreamBasicDescription.cpp +++ /dev/null @@ -1,520 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAStreamBasicDescription.cpp - -=============================================================================*/ - -#include "CAConditionalMacros.h" - -#include "CAStreamBasicDescription.h" -#include "CAMath.h" - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include -#endif - -#pragma mark This file needs to compile on more earlier versions of the OS, so please keep that in mind when editing it - -const AudioStreamBasicDescription CAStreamBasicDescription::sEmpty = { 0.0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -CAStreamBasicDescription::CAStreamBasicDescription(double inSampleRate, UInt32 inFormatID, - UInt32 inBytesPerPacket, UInt32 inFramesPerPacket, - UInt32 inBytesPerFrame, UInt32 inChannelsPerFrame, - UInt32 inBitsPerChannel, UInt32 inFormatFlags) -{ - mSampleRate = inSampleRate; - mFormatID = inFormatID; - mBytesPerPacket = inBytesPerPacket; - mFramesPerPacket = inFramesPerPacket; - mBytesPerFrame = inBytesPerFrame; - mChannelsPerFrame = inChannelsPerFrame; - mBitsPerChannel = inBitsPerChannel; - mFormatFlags = inFormatFlags; -} - -void CAStreamBasicDescription::PrintFormat(FILE *f, const char *indent, const char *name) const -{ - fprintf(f, "%s%s ", indent, name); - char formatID[5]; - *(UInt32 *)formatID = CFSwapInt32HostToBig(mFormatID); - formatID[4] = '\0'; - fprintf(f, "%2ld ch, %6.0f Hz, '%-4.4s' (0x%08lX) ", - NumberChannels(), mSampleRate, formatID, - mFormatFlags); - if (mFormatID == kAudioFormatLinearPCM) { - bool isInt = !(mFormatFlags & kLinearPCMFormatFlagIsFloat); - int wordSize = SampleWordSize(); - const char *endian = (wordSize > 1) ? - ((mFormatFlags & kLinearPCMFormatFlagIsBigEndian) ? " big-endian" : " little-endian" ) : ""; - const char *sign = isInt ? - ((mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) ? " signed" : " unsigned") : ""; - const char *floatInt = isInt ? "integer" : "float"; - char packed[32]; - if (wordSize > 0 && PackednessIsSignificant()) { - if (mFormatFlags & kLinearPCMFormatFlagIsPacked) - sprintf(packed, "packed in %d bytes", wordSize); - else - sprintf(packed, "unpacked in %d bytes", wordSize); - } else - packed[0] = '\0'; - const char *align = (wordSize > 0 && AlignmentIsSignificant()) ? - ((mFormatFlags & kLinearPCMFormatFlagIsAlignedHigh) ? " high-aligned" : " low-aligned") : ""; - const char *deinter = (mFormatFlags & kAudioFormatFlagIsNonInterleaved) ? ", deinterleaved" : ""; - const char *commaSpace = (packed[0]!='\0') || (align[0]!='\0') ? ", " : ""; - - fprintf(f, "%ld-bit%s%s %s%s%s%s%s\n", - mBitsPerChannel, endian, sign, floatInt, - commaSpace, packed, align, deinter); - } else if (mFormatID == 'alac') { // kAudioFormatAppleLossless - int sourceBits = 0; - switch (mFormatFlags) - { - case 1: // kAppleLosslessFormatFlag_16BitSourceData - sourceBits = 16; - break; - case 2: // kAppleLosslessFormatFlag_20BitSourceData - sourceBits = 20; - break; - case 3: // kAppleLosslessFormatFlag_24BitSourceData - sourceBits = 24; - break; - case 4: // kAppleLosslessFormatFlag_32BitSourceData - sourceBits = 32; - break; - } - if (sourceBits) - fprintf(f, "from %d-bit source, ", sourceBits); - else - fprintf(f, "from UNKNOWN source bit depth, "); - - fprintf(f, "%ld frames/packet\n", mFramesPerPacket); - } - else - fprintf(f, "%ld bits/channel, %ld bytes/packet, %ld frames/packet, %ld bytes/frame\n", - mBitsPerChannel, mBytesPerPacket, mFramesPerPacket, mBytesPerFrame); -} - -void CAStreamBasicDescription::NormalizeLinearPCMFormat(AudioStreamBasicDescription& ioDescription) -{ - // the only thing that changes is to make mixable linear PCM into the canonical linear PCM format - if((ioDescription.mFormatID == kAudioFormatLinearPCM) && ((ioDescription.mFormatFlags & kIsNonMixableFlag) == 0)) - { - // the canonical linear PCM format is 32 bit native endian floats - ioDescription.mFormatFlags = kAudioFormatFlagsNativeFloatPacked; - ioDescription.mBytesPerPacket = sizeof(Float32) * ioDescription.mChannelsPerFrame; - ioDescription.mFramesPerPacket = 1; - ioDescription.mBytesPerFrame = sizeof(Float32) * ioDescription.mChannelsPerFrame; - ioDescription.mBitsPerChannel = 8 * sizeof(Float32); - } -} - -void CAStreamBasicDescription::ResetFormat(AudioStreamBasicDescription& ioDescription) -{ - ioDescription.mSampleRate = 0; - ioDescription.mFormatID = 0; - ioDescription.mBytesPerPacket = 0; - ioDescription.mFramesPerPacket = 0; - ioDescription.mBytesPerFrame = 0; - ioDescription.mChannelsPerFrame = 0; - ioDescription.mBitsPerChannel = 0; - ioDescription.mFormatFlags = 0; -} - -void CAStreamBasicDescription::FillOutFormat(AudioStreamBasicDescription& ioDescription, const AudioStreamBasicDescription& inTemplateDescription) -{ - if(fiszero(ioDescription.mSampleRate)) - { - ioDescription.mSampleRate = inTemplateDescription.mSampleRate; - } - if(ioDescription.mFormatID == 0) - { - ioDescription.mFormatID = inTemplateDescription.mFormatID; - } - if(ioDescription.mFormatFlags == 0) - { - ioDescription.mFormatFlags = inTemplateDescription.mFormatFlags; - } - if(ioDescription.mBytesPerPacket == 0) - { - ioDescription.mBytesPerPacket = inTemplateDescription.mBytesPerPacket; - } - if(ioDescription.mFramesPerPacket == 0) - { - ioDescription.mFramesPerPacket = inTemplateDescription.mFramesPerPacket; - } - if(ioDescription.mBytesPerFrame == 0) - { - ioDescription.mBytesPerFrame = inTemplateDescription.mBytesPerFrame; - } - if(ioDescription.mChannelsPerFrame == 0) - { - ioDescription.mChannelsPerFrame = inTemplateDescription.mChannelsPerFrame; - } - if(ioDescription.mBitsPerChannel == 0) - { - ioDescription.mBitsPerChannel = inTemplateDescription.mBitsPerChannel; - } -} - -void CAStreamBasicDescription::GetSimpleName(const AudioStreamBasicDescription& inDescription, char* outName, bool inAbbreviate) -{ - switch(inDescription.mFormatID) - { - case kAudioFormatLinearPCM: - { - const char* theEndianString = NULL; - if((inDescription.mFormatFlags & kAudioFormatFlagIsBigEndian) != 0) - { - #if TARGET_RT_LITTLE_ENDIAN - theEndianString = "Big Endian"; - #endif - } - else - { - #if TARGET_RT_BIG_ENDIAN - theEndianString = "Little Endian"; - #endif - } - - const char* theKindString = NULL; - if((inDescription.mFormatFlags & kAudioFormatFlagIsFloat) != 0) - { - theKindString = (inAbbreviate ? "Float" : "Floating Point"); - } - else if((inDescription.mFormatFlags & kAudioFormatFlagIsSignedInteger) != 0) - { - theKindString = (inAbbreviate ? "SInt" : "Signed Integer"); - } - else - { - theKindString = (inAbbreviate ? "UInt" : "Unsigned Integer"); - } - - const char* thePackingString = NULL; - if((inDescription.mFormatFlags & kAudioFormatFlagIsPacked) == 0) - { - if((inDescription.mFormatFlags & kAudioFormatFlagIsAlignedHigh) != 0) - { - thePackingString = "High"; - } - else - { - thePackingString = "Low"; - } - } - - const char* theMixabilityString = NULL; - if((inDescription.mFormatFlags & kIsNonMixableFlag) == 0) - { - theMixabilityString = "Mixable"; - } - else - { - theMixabilityString = "Unmixable"; - } - - if(inAbbreviate) - { - if(theEndianString != NULL) - { - if(thePackingString != NULL) - { - sprintf(outName, "%s %d Ch %s %s %s%d/%s%d", theMixabilityString, (int)inDescription.mChannelsPerFrame, theEndianString, thePackingString, theKindString, (int)inDescription.mBitsPerChannel, theKindString, (int)(inDescription.mBytesPerFrame / inDescription.mChannelsPerFrame) * 8); - } - else - { - sprintf(outName, "%s %d Ch %s %s%d", theMixabilityString, (int)inDescription.mChannelsPerFrame, theEndianString, theKindString, (int)inDescription.mBitsPerChannel); - } - } - else - { - if(thePackingString != NULL) - { - sprintf(outName, "%s %d Ch %s %s%d/%s%d", theMixabilityString, (int)inDescription.mChannelsPerFrame, thePackingString, theKindString, (int)inDescription.mBitsPerChannel, theKindString, (int)((inDescription.mBytesPerFrame / inDescription.mChannelsPerFrame) * 8)); - } - else - { - sprintf(outName, "%s %d Ch %s%d", theMixabilityString, (int)inDescription.mChannelsPerFrame, theKindString, (int)inDescription.mBitsPerChannel); - } - } - } - else - { - if(theEndianString != NULL) - { - if(thePackingString != NULL) - { - sprintf(outName, "%s %d Channel %d Bit %s %s Aligned %s in %d Bits", theMixabilityString, (int)inDescription.mChannelsPerFrame, (int)inDescription.mBitsPerChannel, theEndianString, theKindString, thePackingString, (int)(inDescription.mBytesPerFrame / inDescription.mChannelsPerFrame) * 8); - } - else - { - sprintf(outName, "%s %d Channel %d Bit %s %s", theMixabilityString, (int)inDescription.mChannelsPerFrame, (int)inDescription.mBitsPerChannel, theEndianString, theKindString); - } - } - else - { - if(thePackingString != NULL) - { - sprintf(outName, "%s %d Channel %d Bit %s Aligned %s in %d Bits", theMixabilityString, (int)inDescription.mChannelsPerFrame, (int)inDescription.mBitsPerChannel, theKindString, thePackingString, (int)(inDescription.mBytesPerFrame / inDescription.mChannelsPerFrame) * 8); - } - else - { - sprintf(outName, "%s %d Channel %d Bit %s", theMixabilityString, (int)inDescription.mChannelsPerFrame, (int)inDescription.mBitsPerChannel, theKindString); - } - } - } - } - break; - - case kAudioFormatAC3: - strcpy(outName, "AC-3"); - break; - - case kAudioFormat60958AC3: - strcpy(outName, "AC-3 for SPDIF"); - break; - - default: - { - char* the4CCString = (char*)&inDescription.mFormatID; - outName[0] = the4CCString[0]; - outName[1] = the4CCString[1]; - outName[2] = the4CCString[2]; - outName[3] = the4CCString[3]; - outName[4] = 0; - } - break; - }; -} - -#if CoreAudio_Debug -#include "CALogMacros.h" - -void CAStreamBasicDescription::PrintToLog(const AudioStreamBasicDescription& inDesc) -{ - PrintFloat (" Sample Rate: ", inDesc.mSampleRate); - Print4CharCode (" Format ID: ", inDesc.mFormatID); - PrintHex (" Format Flags: ", inDesc.mFormatFlags); - PrintInt (" Bytes per Packet: ", inDesc.mBytesPerPacket); - PrintInt (" Frames per Packet: ", inDesc.mFramesPerPacket); - PrintInt (" Bytes per Frame: ", inDesc.mBytesPerFrame); - PrintInt (" Channels per Frame: ", inDesc.mChannelsPerFrame); - PrintInt (" Bits per Channel: ", inDesc.mBitsPerChannel); -} -#endif - -bool operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) -{ - bool theAnswer = false; - bool isDone = false; - - // note that if either side is 0, that field is skipped - - // format ID is the first order sort - if((!isDone) && ((x.mFormatID != 0) && (y.mFormatID != 0))) - { - if(x.mFormatID != y.mFormatID) - { - // formats are sorted numerically except that linear - // PCM is always first - if(x.mFormatID == kAudioFormatLinearPCM) - { - theAnswer = true; - } - else if(y.mFormatID == kAudioFormatLinearPCM) - { - theAnswer = false; - } - else - { - theAnswer = x.mFormatID < y.mFormatID; - } - isDone = true; - } - } - - - // mixable is always better than non-mixable for linear PCM and should be the second order sort item - if((!isDone) && ((x.mFormatID == kAudioFormatLinearPCM) && (y.mFormatID == kAudioFormatLinearPCM))) - { - if(((x.mFormatFlags & kIsNonMixableFlag) == 0) && ((y.mFormatFlags & kIsNonMixableFlag) != 0)) - { - theAnswer = true; - isDone = true; - } - else if(((x.mFormatFlags & kIsNonMixableFlag) != 0) && ((y.mFormatFlags & kIsNonMixableFlag) == 0)) - { - theAnswer = false; - isDone = true; - } - } - - // floating point vs integer for linear PCM only - if((!isDone) && ((x.mFormatID == kAudioFormatLinearPCM) && (y.mFormatID == kAudioFormatLinearPCM))) - { - if((x.mFormatFlags & kAudioFormatFlagIsFloat) != (y.mFormatFlags & kAudioFormatFlagIsFloat)) - { - // floating point is better than integer - theAnswer = y.mFormatFlags & kAudioFormatFlagIsFloat; - isDone = true; - } - } - - // bit depth - if((!isDone) && ((x.mBitsPerChannel != 0) && (y.mBitsPerChannel != 0))) - { - if(x.mBitsPerChannel != y.mBitsPerChannel) - { - // deeper bit depths are higher quality - theAnswer = x.mBitsPerChannel < y.mBitsPerChannel; - isDone = true; - } - } - - // sample rate - if((!isDone) && fnonzero(x.mSampleRate) && fnonzero(y.mSampleRate)) - { - if(fnotequal(x.mSampleRate, y.mSampleRate)) - { - // higher sample rates are higher quality - theAnswer = x.mSampleRate < y.mSampleRate; - isDone = true; - } - } - - // number of channels - if((!isDone) && ((x.mChannelsPerFrame != 0) && (y.mChannelsPerFrame != 0))) - { - if(x.mChannelsPerFrame != y.mChannelsPerFrame) - { - // more channels is higher quality - theAnswer = x.mChannelsPerFrame < y.mChannelsPerFrame; - isDone = true; - } - } - - return theAnswer; -} - -static bool MatchFormatFlags(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) -{ - UInt32 xFlags = x.mFormatFlags; - UInt32 yFlags = y.mFormatFlags; - - // match wildcards - if (x.mFormatID == 0 || y.mFormatID == 0 || xFlags == 0 || yFlags == 0) - return true; - - if (x.mFormatID == kAudioFormatLinearPCM) - { - // knock off the all clear flag - xFlags = xFlags & ~kAudioFormatFlagsAreAllClear; - yFlags = yFlags & ~kAudioFormatFlagsAreAllClear; - - // if both kAudioFormatFlagIsPacked bits are set, then we don't care about the kAudioFormatFlagIsAlignedHigh bit. - if (xFlags & yFlags & kAudioFormatFlagIsPacked) { - xFlags = xFlags & ~kAudioFormatFlagIsAlignedHigh; - yFlags = yFlags & ~kAudioFormatFlagIsAlignedHigh; - } - - // if both kAudioFormatFlagIsFloat bits are set, then we don't care about the kAudioFormatFlagIsSignedInteger bit. - if (xFlags & yFlags & kAudioFormatFlagIsFloat) { - xFlags = xFlags & ~kAudioFormatFlagIsSignedInteger; - yFlags = yFlags & ~kAudioFormatFlagIsSignedInteger; - } - - // if the bit depth is 8 bits or less and the format is packed, we don't care about endianness - if((x.mBitsPerChannel <= 8) && ((xFlags & kAudioFormatFlagIsPacked) == kAudioFormatFlagIsPacked)) - { - xFlags = xFlags & ~kAudioFormatFlagIsBigEndian; - } - if((y.mBitsPerChannel <= 8) && ((yFlags & kAudioFormatFlagIsPacked) == kAudioFormatFlagIsPacked)) - { - yFlags = yFlags & ~kAudioFormatFlagIsBigEndian; - } - - // if the number of channels is 0 or 1, we don't care about non-interleavedness - if (x.mChannelsPerFrame <= 1 && y.mChannelsPerFrame <= 1) { - xFlags &= ~kLinearPCMFormatFlagIsNonInterleaved; - yFlags &= ~kLinearPCMFormatFlagIsNonInterleaved; - } - } - return xFlags == yFlags; -} - -bool operator==(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) -{ - // the semantics for equality are: - // 1) Values must match exactly - // 2) wildcard's are ignored in the comparison - -#define MATCH(name) ((x.name) == 0 || (y.name) == 0 || (x.name) == (y.name)) - - return - // check the sample rate - (fiszero(x.mSampleRate) || fiszero(y.mSampleRate) || fequal(x.mSampleRate, y.mSampleRate)) - - // check the format ids - && MATCH(mFormatID) - - // check the format flags - && MatchFormatFlags(x, y) - - // check the bytes per packet - && MATCH(mBytesPerPacket) - - // check the frames per packet - && MATCH(mFramesPerPacket) - - // check the bytes per frame - && MATCH(mBytesPerFrame) - - // check the channels per frame - && MATCH(mChannelsPerFrame) - - // check the channels per frame - && MATCH(mBitsPerChannel) ; -} - -bool SanityCheck(const AudioStreamBasicDescription& x) -{ - return (x.mSampleRate >= 0.); -} diff --git a/libs/appleutility/CAStreamBasicDescription.h b/libs/appleutility/CAStreamBasicDescription.h deleted file mode 100644 index aa41c40fe4..0000000000 --- a/libs/appleutility/CAStreamBasicDescription.h +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAStreamBasicDescription.h - -=============================================================================*/ - -#ifndef __CAStreamBasicDescription_h__ -#define __CAStreamBasicDescription_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include - #include -#else - #include "CoreAudioTypes.h" - #include "CoreFoundation.h" -#endif - -#include "CADebugMacros.h" -#include // for memset, memcpy -#include // for FILE * - -#pragma mark This file needs to compile on more earlier versions of the OS, so please keep that in mind when editing it - -// define the IsMixable format flag for all versions of the system -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) - enum { kIsNonMixableFlag = kAudioFormatFlagIsNonMixable }; -#else - enum { kIsNonMixableFlag = (1L << 6) }; -#endif - -//============================================================================= -// CAStreamBasicDescription -// -// This is a wrapper class for the AudioStreamBasicDescription struct. -// It adds a number of convenience routines, but otherwise adds nothing -// to the footprint of the original struct. -//============================================================================= -class CAStreamBasicDescription : - public AudioStreamBasicDescription -{ - -// Constants -public: - static const AudioStreamBasicDescription sEmpty; - -// Construction/Destruction -public: - CAStreamBasicDescription() { memset (this, 0, sizeof(AudioStreamBasicDescription)); } - - CAStreamBasicDescription(const AudioStreamBasicDescription &desc) - { - SetFrom(desc); - } - - CAStreamBasicDescription( double inSampleRate, UInt32 inFormatID, - UInt32 inBytesPerPacket, UInt32 inFramesPerPacket, - UInt32 inBytesPerFrame, UInt32 inChannelsPerFrame, - UInt32 inBitsPerChannel, UInt32 inFormatFlags); - -// Assignment - CAStreamBasicDescription& operator=(const AudioStreamBasicDescription& v) { SetFrom(v); return *this; } - - void SetFrom(const AudioStreamBasicDescription &desc) - { - memcpy(this, &desc, sizeof(AudioStreamBasicDescription)); - } - - // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - // - // interrogation - - bool IsPCM() const { return mFormatID == kAudioFormatLinearPCM; } - - bool PackednessIsSignificant() const - { - Assert(IsPCM(), "PackednessIsSignificant only applies for PCM"); - return (SampleWordSize() << 3) != mBitsPerChannel; - } - - bool AlignmentIsSignificant() const - { - return PackednessIsSignificant() || (mBitsPerChannel & 7) != 0; - } - - bool IsInterleaved() const - { - return !IsPCM() || !(mFormatFlags & kAudioFormatFlagIsNonInterleaved); - } - - // for sanity with interleaved/deinterleaved possibilities, never access mChannelsPerFrame, use these: - UInt32 NumberInterleavedChannels() const { return IsInterleaved() ? mChannelsPerFrame : 1; } - UInt32 NumberChannelStreams() const { return IsInterleaved() ? 1 : mChannelsPerFrame; } - UInt32 NumberChannels() const { return mChannelsPerFrame; } - UInt32 SampleWordSize() const { return (mBytesPerFrame > 0) ? mBytesPerFrame / NumberInterleavedChannels() : 0;} - - UInt32 FramesToBytes(UInt32 nframes) const { return nframes * mBytesPerFrame; } - UInt32 BytesToFrames(UInt32 nbytes) const { - Assert(mBytesPerFrame > 0, "bytesPerFrame must be > 0 in BytesToFrames"); - return nbytes / mBytesPerFrame; - } - - bool SameChannelsAndInterleaving(const CAStreamBasicDescription &a) const - { - return this->NumberChannels() == a.NumberChannels() && this->IsInterleaved() == a.IsInterleaved(); - } - - // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - // - // manipulation - - void SetCanonical(UInt32 nChannels, bool interleaved) - // note: leaves sample rate untouched - { - mFormatID = kAudioFormatLinearPCM; - mFormatFlags = kAudioFormatFlagsNativeFloatPacked; - mBitsPerChannel = 32; - mChannelsPerFrame = nChannels; - mFramesPerPacket = 1; - if (interleaved) - mBytesPerPacket = mBytesPerFrame = nChannels * sizeof(Float32); - else { - mBytesPerPacket = mBytesPerFrame = sizeof(Float32); - mFormatFlags |= kAudioFormatFlagIsNonInterleaved; - } - } - - void ChangeNumberChannels(UInt32 nChannels, bool interleaved) - // alter an existing format - { - Assert(IsPCM(), "ChangeNumberChannels only works for PCM formats"); - UInt32 wordSize = SampleWordSize(); // get this before changing ANYTHING - if (wordSize == 0) - wordSize = (mBitsPerChannel + 7) / 8; - mChannelsPerFrame = nChannels; - mFramesPerPacket = 1; - if (interleaved) { - mBytesPerPacket = mBytesPerFrame = nChannels * wordSize; - mFormatFlags &= ~kAudioFormatFlagIsNonInterleaved; - } else { - mBytesPerPacket = mBytesPerFrame = wordSize; - mFormatFlags |= kAudioFormatFlagIsNonInterleaved; - } - } - - // _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - // - // other - - void Print() const - { - Print (stdout); - } - - void Print(FILE* file) const - { - PrintFormat (file, "", "AudioStreamBasicDescription:"); - } - - void PrintFormat(FILE *f, const char *indent, const char *name) const; - - OSStatus Save(CFPropertyListRef *outData) const; - - OSStatus Restore(CFPropertyListRef &inData); - -// Operations - static bool IsMixable(const AudioStreamBasicDescription& inDescription) { return (inDescription.mFormatID == kAudioFormatLinearPCM) && ((inDescription.mFormatFlags & kIsNonMixableFlag) == 0); } - static void NormalizeLinearPCMFormat(AudioStreamBasicDescription& ioDescription); - static void ResetFormat(AudioStreamBasicDescription& ioDescription); - static void FillOutFormat(AudioStreamBasicDescription& ioDescription, const AudioStreamBasicDescription& inTemplateDescription); - static void GetSimpleName(const AudioStreamBasicDescription& inDescription, char* outName, bool inAbbreviate); -#if CoreAudio_Debug - static void PrintToLog(const AudioStreamBasicDescription& inDesc); -#endif -}; - -bool operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y); -bool operator==(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y); -#if TARGET_OS_MAC || (TARGET_OS_WIN32 && (_MSC_VER > 600)) -inline bool operator!=(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return !(x == y); } -inline bool operator<=(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return (x < y) || (x == y); } -inline bool operator>=(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return !(x < y); } -inline bool operator>(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return !((x < y) || (x == y)); } -#endif - -bool SanityCheck(const AudioStreamBasicDescription& x); - - -#endif // __CAStreamBasicDescription_h__ diff --git a/libs/appleutility/CAXException.cpp b/libs/appleutility/CAXException.cpp deleted file mode 100644 index 088575f041..0000000000 --- a/libs/appleutility/CAXException.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAXException.cpp - -=============================================================================*/ - -#include "CAXException.h" - -CAXException::WarningHandler CAXException::sWarningHandler = NULL; diff --git a/libs/appleutility/CAXException.h b/libs/appleutility/CAXException.h deleted file mode 100644 index 796119763d..0000000000 --- a/libs/appleutility/CAXException.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright: © Copyright 2005 Apple Computer, Inc. All rights reserved. - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs - copyrights in this original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks or logos of - Apple Computer, Inc. may be used to endorse or promote products derived from the - Apple Software without specific prior written permission from Apple. Except as - expressly stated in this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any patent rights that - may be infringed by your derivative works or by other works in which the Apple - Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT - (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*============================================================================= - CAXException.h - -=============================================================================*/ - -#ifndef __CAXException_h__ -#define __CAXException_h__ - -#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) - #include -#else - #include - #include -#endif -#include "CADebugMacros.h" -#include -#include -#include - -// An extended exception class that includes the name of the failed operation -class CAXException { -public: - CAXException(const char *operation, OSStatus err) : - mError(err) - { - if (operation == NULL) - mOperation[0] = '\0'; - else if (strlen(operation) >= sizeof(mOperation)) { - memcpy(mOperation, operation, sizeof(mOperation) - 1); - mOperation[sizeof(mOperation) - 1] = '\0'; - } else - strcpy(mOperation, operation); - } - - char *FormatError(char *str) const - { - return FormatError(str, mError); - } - - char mOperation[256]; - const OSStatus mError; - - // ------------------------------------------------- - - typedef void (*WarningHandler)(const char *msg, OSStatus err); - - /*static void Throw(const char *operation, OSStatus err) - { - throw CAXException(operation, err); - }*/ - - static char *FormatError(char *str, OSStatus error) - { - // see if it appears to be a 4-char-code - *(UInt32 *)(str + 1) = EndianU32_NtoB(error); - if (isprint(str[1]) && isprint(str[2]) && isprint(str[3]) && isprint(str[4])) { - str[0] = str[5] = '\''; - str[6] = '\0'; - } else - // no, format it as an integer - sprintf(str, "%ld", error); - return str; - } - - static void Warning(const char *s, OSStatus error) - { - if (sWarningHandler) - (*sWarningHandler)(s, error); - } - - static void SetWarningHandler(WarningHandler f) { sWarningHandler = f; } -private: - static WarningHandler sWarningHandler; -}; - -#if DEBUG || CoreAudio_Debug - #define XThrowIfError(error, operation) \ - do { \ - OSStatus __err = error; \ - if (__err) { \ - char __buf[12]; \ - DebugMessageN2("error %s: %4s\n", CAXException::FormatError(__buf, __err), operation);\ - STOP; \ - throw CAXException(operation, __err); \ - } \ - } while (0) - - #define XThrowIf(condition, error, operation) \ - do { \ - if (condition) { \ - OSStatus __err = error; \ - char __buf[12]; \ - DebugMessageN2("error %s: %4s\n", CAXException::FormatError(__buf, __err), operation);\ - STOP; \ - throw CAXException(operation, __err); \ - } \ - } while (0) - -#else - #define XThrowIfError(error, operation) \ - do { \ - OSStatus __err = error; \ - if (__err) { \ - throw CAXException(operation, __err); \ - } \ - } while (0) - - #define XThrowIf(condition, error, operation) \ - do { \ - if (condition) { \ - OSStatus __err = error; \ - throw CAXException(operation, __err); \ - } \ - } while (0) - -#endif - -#define XThrow(error, operation) XThrowIf(true, error, operation) -#define XThrowIfErr(error) XThrowIfError(error, #error) - -#endif // __CAXException_h__ diff --git a/libs/appleutility/SConscript b/libs/appleutility/SConscript deleted file mode 100644 index bddca04032..0000000000 --- a/libs/appleutility/SConscript +++ /dev/null @@ -1,22 +0,0 @@ -# -*- python -*- - -import os -import os.path -import glob - -appleutility_files = glob.glob('*.cpp') - -Import('env install_prefix') -appleutility = env.Copy() - -appleutility.Append(LINKFLAGS='-framework AudioToolbox') -appleutility.Append(LINKFLAGS='-framework AudioUnit') -appleutility.Append(LINKFLAGS='-framework CoreFoundation') -appleutility.Append(LINKFLAGS='-framework CoreServices') - -libappleutility = appleutility.SharedLibrary('appleutility', appleutility_files) -if appleutility['COREAUDIO']: - Default(libappleutility) - env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour3'), libappleutility)) - -env.Alias('tarball', env.Distribute (env['DISTTREE'], ['SConscript'] + appleutility_files + glob.glob('*.h') )) diff --git a/libs/ardour/.cvsignore b/libs/ardour/.cvsignore deleted file mode 100644 index 15d7926473..0000000000 --- a/libs/ardour/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -libardour.la -libardour.pc -version.cc -*.lo -*.os -*.mo -*.pot -*.dylib diff --git a/libs/ardour/ChangeLog b/libs/ardour/ChangeLog deleted file mode 100644 index a0d3b193b6..0000000000 --- a/libs/ardour/ChangeLog +++ /dev/null @@ -1,118 +0,0 @@ -2002-11-24 gettextize - - * configure.ac (AC_OUTPUT): Add intl/Makefile, - -2002-11-24 gettextize - - * Makefile.am (ACLOCAL_AMFLAGS): New variable. - -2001-10-26 Paul Davis - - * playlist.cc (recover_backup): restored the backup recovery code - for playlists. - - * diskstream.cc (do_refill): added state_lock to diskstream, just - to be safe. - - * session.cc (butler_thread_work): changed Session ISA thread to - HASA thread. - -2001-10-23 Paul Davis - - merged in marcus' patch for edit/mix group save/restore, and - rationalized both it and the existing code for Route::set_state() - -2001-10-20 Paul Davis - - * session.cc (get_state): in get_state, use the public order for routes. - -2001-10-18 Paul Davis - - * playlist.cc (read): stop a muted region from causing a playlist - read error. - -2001-10-17 Paul Davis - - * region.cc (read_at): remove staccato noise caused by not - shifting target buffer when !opaque. - -2001-10-15 Paul Davis - - * region.cc (set_fade_out_active): made region fade in/out optional. - - * configure.in: patches from Ben related to libxml++ - -2001-10-12 Paul Davis - - * session.cc (XMLRegionFactory): move most XML-based Region - constructor into region. - - -2001-10-10 Paul Davis - - * session.cc (load_sources): add whole-file regions when loading - sources. - -2001-10-09 Paul Davis - - * ardour/session.h: fix an ugly bug with a non-reference return type. - -2001-10-04 Paul Davis - - * playlist.cc (split_region): ensure that left region after split - is in the right place. - - * auditioner.cc (play_audition): stop existing audition before - starting a new one. - -2001-10-03 Paul Davis - - * session.cc (process): stop regular process() call from operating - on hidden diskstreams and routes. the butler thread still works on - all diskstreams, every time, which might be a mistake. - -2001-10-02 Paul Davis - - * session.cc (set_auto_play_range): added provisional support - for play ranges using session events. added code to use - auditioner. - - * auditioner.cc: new file/object to support auditioning. - - * route.cc: remove seek() function (didn't exist). - - * session.cc (process): use list instead of GList - for diskstreams. add auditioner object. - -2001-09-30 Paul Davis - - * playlist.cc (split_region): fix problem with region splitting - not defining two *smaller* regions of the original. - - * region.cc (set_position): remove RegionTemplate object. - - * playlist.cc (struct RegionSorter ): fix sorting to use position, - not start - whatever was i thinking ? - -2001-09-28 Paul Davis - - * source.cc: emit source creation signal. - - * session.cc (first_stage_init): catch all source creation events. - - * sndfilesource.cc (init): fix up an off-by-one substr-length - error when creating a sndfilesource. - -2001-09-27 Paul Davis - - * route.cc (operator): correct loop increment bug that caused a - hang when an Insert is added to a Route as a Redirect. - -2001-09-25 Paul Davis - - * session.cc: make new file sources be partially named for their - initial host diskstream. - - peak file construction now carried out en-masse at the - end of capture run. - diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript deleted file mode 100644 index b50aecbcb3..0000000000 --- a/libs/ardour/SConscript +++ /dev/null @@ -1,395 +0,0 @@ -# -*- python -*- - -import os -import os.path -import glob - -Import('env final_prefix install_prefix final_config_prefix libraries i18n') - -ardour = env.Copy() - -# -# this defines the version number of libardour -# - -domain = 'libardour3' - -ardour.Append(DOMAIN = domain, MAJOR = 2, MINOR = 0, MICRO = 0) -ardour.Append(CXXFLAGS = "-DPACKAGE=\\\"" + domain + "\\\"") -ardour.Append(CXXFLAGS=["-DLIBSIGC_DISABLE_DEPRECATED", "-DGLIBMM_EXCEPTIONS_ENABLED"]) -ardour.Append(PACKAGE = domain) -ardour.Append(POTFILE = domain + '.pot') - -if ardour['IS_OSX']: - ardour.Append (LINKFLAGS="-Xlinker -headerpad -Xlinker 2048") - -# -# explicitly reference the control protocol LGPL library for includes -# - -ardour.Append(CPPPATH = '#libs/surfaces/control_protocol') - -ardour_files=Split(""" -amp.cc -analyser.cc -audioanalyser.cc -audio_buffer.cc -audio_diskstream.cc -audioengine.cc -audiofilesource.cc -audio_library.cc -audio_playlist.cc -audio_port.cc -audioregion.cc -audiosource.cc -audio_track.cc -auditioner.cc -auto_bundle.cc -automatable.cc -automation.cc -automation_control.cc -automation_event.cc -base_audio_port.cc -base_midi_port.cc -buffer.cc -buffer_set.cc -chan_count.cc -configuration.cc -control_protocol_manager.cc -control_protocol_search_path.cc -crossfade.cc -curve.cc -cycle_timer.cc -default_click.cc -directory_names.cc -diskstream.cc -enums.cc -filename_extensions.cc -filesystem_paths.cc -filter.cc -find_session.cc -gain.cc -gdither.cc -globals.cc -import.cc -io.cc -io_processor.cc -jack_audio_port.cc -jack_midi_port.cc -jack_port.cc -jack_slave.cc -ladspa_plugin.cc -location.cc -meter.cc -midi_buffer.cc -midi_diskstream.cc -midi_model.cc -midi_playlist.cc -midi_port.cc -midi_region.cc -midi_source.cc -midi_stretch.cc -midi_track.cc -mix.cc -mtc_slave.cc -named_selection.cc -note.cc -panner.cc -parameter.cc -pcm_utils.cc -playlist.cc -playlist_factory.cc -plugin.cc -plugin_insert.cc -plugin_manager.cc -port.cc -port_insert.cc -port_set.cc -processor.cc -quantize.cc -recent_sessions.cc -region.cc -region_factory.cc -resampled_source.cc -reverse.cc -route.cc -route_group.cc -send.cc -session_butler.cc -session.cc -session_click.cc -session_command.cc -session_directory.cc -session_events.cc -session_export.cc -session_midi.cc -session_process.cc -session_state.cc -session_state_utils.cc -session_time.cc -session_transport.cc -session_utils.cc -silentfilesource.cc -smf_reader.cc -smf_source.cc -sndfile_helpers.cc -sndfilesource.cc -sndfileimportable.cc -source.cc -source_factory.cc -tape_file_matcher.cc -template_utils.cc -tempo.cc -track.cc -transient_detector.cc -user_bundle.cc -utils.cc -version.cc -""") - -arch_specific_objects = [ ] - -osc_files = [ 'osc.cc' ] -vst_files = [ 'vst_plugin.cc', 'session_vst.cc' ] -lv2_files = [ 'lv2_plugin.cc' ] -audiounit_files = [ 'audio_unit.cc' ] -coreaudio_files = [ 'coreaudiosource.cc', 'caimportable.cc' ] -extra_sources = [ ] -timefx_sources = [ ] - -if ardour['VST']: - extra_sources += vst_files - ardour.Append(CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst") - -if ardour['LV2']: - extra_sources += lv2_files - ardour.Append(CCFLAGS="-DHAVE_SLV2") - -if ardour['LIBLO']: - extra_sources += osc_files - -ardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE") -ardour.Append(CXXFLAGS="-DDATA_DIR=\\\"" + os.path.join (final_prefix, 'share') + "\\\"") -ardour.Append(CXXFLAGS="-DMODULE_DIR=\\\"" + os.path.join (final_prefix, env['LIBDIR']) + "\\\"") -ardour.Append(CXXFLAGS="-DVAMP_DIR=\\\"" + os.path.join (final_prefix, env['LIBDIR'], 'ardour3', 'vamp') + "\\\"") -ardour.Append(CXXFLAGS="-DCONFIG_DIR=\\\"" + final_config_prefix + "\\\"") -ardour.Append(CXXFLAGS="-DLOCALEDIR=\\\"" + os.path.join (final_prefix, 'share', 'locale') + "\\\"") - -ardour.Merge ([ libraries['jack'] ]) - -# -# See if JACK supports jack_client_open() -# - -jack_test_source_file = """ -#include -int main(int argc, char **argv) -{ - jack_client_open ("foo", 0, 0); - return 0; -} -""" -def CheckJackClientOpen(context): - context.Message('Checking for jack_client_open()...') - result = context.TryLink(jack_test_source_file, '.c') - context.Result(result) - return result - -# -# See if JACK supports jack_recompute_total_latencies() -# - -jack_test_source_file = """ -#include -int main(int argc, char **argv) -{ - jack_recompute_total_latencies ((jack_client_t*) 0); - return 0; -} -""" -def CheckJackRecomputeLatencies(context): - context.Message('Checking for jack_recompute_total_latencies()...') - result = context.TryLink(jack_test_source_file, '.c') - context.Result(result) - return result - -jack_video_frame_offset_test = """ -#include -int main(int argc, char** argv) -{ - jack_position_t pos; - - pos.valid & JackVideoFrameOffset; - return 0; -} -""" -def CheckJackVideoFrameOffset(context): - context.Message('Checking for JackVideoFrameOffset in jack_position_bits_t enum...') - result = context.TryLink(jack_video_frame_offset_test, '.c') - context.Result(result) - return result - - -# -# See if JACK supports jack_recompute_total_latency() (single port version) -# - -jack_port_latency_test = """ -#include -int main(int argc, char **argv) -{ - jack_recompute_total_latency ((jack_client_t*) 0, (jack_port_t*) 0); - return 0; -} -""" -def CheckJackRecomputeLatency(context): - context.Message('Checking for jack_recompute_total_latency()...') - result = context.TryLink(jack_port_latency_test, '.c') - context.Result(result) - return result - -conf = Configure(ardour, custom_tests = { - 'CheckJackClientOpen' : CheckJackClientOpen, - 'CheckJackRecomputeLatencies' : CheckJackRecomputeLatencies, - 'CheckJackRecomputeLatency' : CheckJackRecomputeLatency, - 'CheckJackVideoFrameOffset' : CheckJackVideoFrameOffset -}) - -if conf.CheckJackClientOpen(): - ardour.Append(CXXFLAGS="-DHAVE_JACK_CLIENT_OPEN") - -if conf.CheckJackRecomputeLatencies(): - ardour.Append(CXXFLAGS="-DHAVE_JACK_RECOMPUTE_LATENCIES") - -if conf.CheckJackRecomputeLatency(): - ardour.Append(CXXFLAGS="-DHAVE_JACK_RECOMPUTE_LATENCY") - -if conf.CheckJackVideoFrameOffset(): - ardour.Append(CXXFLAGS="-DHAVE_JACK_VIDEO_SUPPORT") - -# -# Optional header files -# - -if conf.CheckCHeader('wordexp.h'): - ardour.Append(CXXFLAGS="-DHAVE_WORDEXP") - -if conf.CheckCHeader('sys/vfs.h'): - ardour.Append(CXXFLAGS="-DHAVE_SYS_VFS_H") - -if conf.CheckCHeader('/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h'): - ardour.Append(LINKFLAGS="-framework CoreMIDI") - -if conf.CheckCHeader('/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h'): - ardour.Append(LINKFLAGS="-framework AudioToolbox") - -if conf.CheckCHeader('/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h'): - ardour.Append(CXXFLAGS="-DHAVE_WEAK_COREAUDIO") - -if conf.CheckCHeader('/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h') and ardour['AUDIOUNITS']: - ardour.Append(CXXFLAGS="-DHAVE_AUDIOUNITS") - ardour.Append(LINKFLAGS="-framework AudioUnit") - extra_sources += audiounit_files - -if ardour['COREAUDIO']: - ardour.Append(CXXFLAGS="-DHAVE_COREAUDIO") - extra_sources += coreaudio_files - -if env['CONFIG_ARCH'] == 'apple': - # this next line avoids issues with circular dependencies between libardour and libardour_cp. - # it is based on the (entirely reasonable) assumption that a system with CoreAudio is OS X - # - ardour.Append(LINKFLAGS='-undefined suppress -flat_namespace') - -ardour = conf.Finish () - -ardour.Merge ([ - libraries['core'], - libraries['fftw3'], - libraries['fftw3f'], - libraries['glib2'], - libraries['glibmm2'], - libraries['lrdf'], - libraries['midi++2'], - libraries['pbd'], - libraries['raptor'], - libraries['samplerate'], - libraries['sigc2'], - libraries['sndfile-ardour'], - libraries['vamp'], - libraries['vamphost'], - libraries['xml'] - ]) - -if ardour['RUBBERBAND']: - ardour.Merge ([ libraries['rubberband']]) - timefx_sources += [ 'rb_effect.cc' ] -else: - ardour.Merge ([ libraries['soundtouch'] ]) - timefx_sources += [ 'st_stretch.cc', 'st_pitch.cc' ] - -if ardour['LV2']: - ardour.Merge ([ libraries['slv2'] ]) - -if ardour['LIBLO']: - ardour.Merge ([ libraries['lo'] ]) - -if ardour['COREAUDIO'] or ardour['AUDIOUNITS']: - ardour.Merge ([ libraries['appleutility'] ]) - -def SharedAsmObjectEmitter(target, source, env): - for tgt in target: - tgt.attributes.shared = 1 - return (target, source) - - -env['BUILDERS']['SharedAsmObject'] = Builder (action = '$CXX -c -fPIC $SOURCE -o $TARGET', - emitter = SharedAsmObjectEmitter, - suffix = '$SHOBJSUFFIX', - src_suffix = '.s', - single_source = 1) -# -# handle objects that should always be compiled with -msse in their own -# special environment, which is exactly like "ardour" but unconditionally -# includes -msse -# - - -always_sse_objects = [] -sse_env = ardour.Copy() -sse_env.Append (CXXFLAGS="-msse") - -if env['FPU_OPTIMIZATION']: - if env['DIST_TARGET'] == "i386": - arch_specific_objects = env.SharedAsmObject('sse_functions.os', 'sse_functions.s') - always_sse_objects += [ sse_env.SharedObject (source = 'sse_functions_xmm.cc') ] - if env['DIST_TARGET'] == "i686": - arch_specific_objects = env.SharedAsmObject('sse_functions.os', 'sse_functions.s') - always_sse_objects += [ sse_env.SharedObject (source = 'sse_functions_xmm.cc') ] - if env['DIST_TARGET'] == "x86_64": - arch_specific_objects = env.SharedAsmObject('sse_functions_64bit.os', 'sse_functions_64bit.s') - always_sse_objects += [ sse_env.SharedObject (source = 'sse_functions_xmm.cc') ] - -libardour = ardour.SharedLibrary('ardour', ardour_files + always_sse_objects + timefx_sources + extra_sources + arch_specific_objects) - -Default(libardour) - -if env['NLS']: - i18n (ardour, ardour_files + vst_files + coreaudio_files + timefx_sources + audiounit_files, env) - - -env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour3'), libardour)) - -env.Alias('version', ardour.VersionBuild(['version.cc', 'ardour/version.h'], [])) - -env.Alias('tarball', env.Distribute (env['DISTTREE'], - [ 'SConscript', 'i18n.h', 'gettext.h' ] + - [ 'sse_functions_xmm.cc', 'sse_functions.s', 'sse_functions_64bit.s' ] + - [ 'rb_effect.cc', 'st_stretch.cc', 'st_pitch.cc' ] + - ardour_files + - osc_files + - vst_files + - coreaudio_files + - audiounit_files + - lv2_files + - glob.glob('po/*.po') + glob.glob('ardour/*.h'))) diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc deleted file mode 100644 index a2ad70e8b1..0000000000 --- a/libs/ardour/amp.cc +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - - -/** Apply a declicked gain to the audio buffers of @a bufs */ -void -Amp::run_in_place (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target, bool invert_polarity) -{ - if (nframes == 0) - return; - - if (bufs.count().n_audio() == 0) - return; - - // assert(bufs.buffer_capacity(DataType::AUDIO) >= nframes); - - // if we don't need to declick, defer to apply_simple_gain - if (initial == target) { - if (target == 0.0) { - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - memset (i->data(), 0, sizeof (Sample) * nframes); - } - } else if (target != 1.0) { - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - apply_gain_to_buffer (i->data(), nframes, target); - } - } - return; - } - - const nframes_t declick = std::min ((nframes_t)128, nframes); - gain_t delta; - double fractional_shift = -1.0/declick; - double fractional_pos; - gain_t polscale = invert_polarity ? -1.0f : 1.0f; - - if (target < initial) { - /* fade out: remove more and more of delta from initial */ - delta = -(initial - target); - } else { - /* fade in: add more and more of delta from initial */ - delta = target - initial; - } - - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const buffer = i->data(); - - fractional_pos = 1.0; - - for (nframes_t nx = 0; nx < declick; ++nx) { - buffer[nx] *= polscale * (initial + (delta * (0.5 + 0.5 * cos (M_PI * fractional_pos)))); - fractional_pos += fractional_shift; - } - - /* now ensure the rest of the buffer has the target value applied, if necessary. */ - - if (declick != nframes) { - - if (invert_polarity) { - target = -target; - } - - if (target == 0.0) { - memset (&buffer[declick], 0, sizeof (Sample) * (nframes - declick)); - } else if (target != 1.0) { - apply_gain_to_buffer (&buffer[declick], nframes - declick, target); - } - } - } -} - -void -Amp::apply_simple_gain (BufferSet& bufs, nframes_t nframes, gain_t target) -{ -} - - -} // namespace ARDOUR diff --git a/libs/ardour/analyser.cc b/libs/ardour/analyser.cc deleted file mode 100644 index 2e14c74b86..0000000000 --- a/libs/ardour/analyser.cc +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include -#include - -using namespace std; -using namespace sigc; -using namespace ARDOUR; -using namespace PBD; - -Analyser* Analyser::the_analyser = 0; -Glib::StaticMutex Analyser::analysis_queue_lock = GLIBMM_STATIC_MUTEX_INIT; -Glib::Cond* Analyser::SourcesToAnalyse = 0; -list > Analyser::analysis_queue; - -Analyser::Analyser () -{ - -} - -Analyser::~Analyser () -{ -} - -static void -analyser_work () -{ - Analyser::work (); -} - -void -Analyser::init () -{ - SourcesToAnalyse = new Glib::Cond(); - Glib::Thread::create (sigc::ptr_fun (analyser_work), false); -} - -void -Analyser::queue_source_for_analysis (boost::shared_ptr src, bool force) -{ - if (!src->can_be_analysed()) { - return; - } - - if (!force && src->has_been_analysed()) { - return; - } - - Glib::Mutex::Lock lm (analysis_queue_lock); - analysis_queue.push_back (boost::weak_ptr(src)); - SourcesToAnalyse->broadcast (); -} - -void -Analyser::work () -{ - PBD::ThreadCreated (pthread_self(), string ("analyser-") + to_string (pthread_self(), std::dec)); - - while (true) { - analysis_queue_lock.lock (); - - wait: - if (analysis_queue.empty()) { - SourcesToAnalyse->wait (analysis_queue_lock); - } - - if (analysis_queue.empty()) { - goto wait; - } - - boost::shared_ptr src (analysis_queue.front().lock()); - analysis_queue.pop_front(); - analysis_queue_lock.unlock (); - - boost::shared_ptr afs = boost::dynamic_pointer_cast (src); - - if (afs && afs->length()) { - analyse_audio_file_source (afs); - } - } -} - -void -Analyser::analyse_audio_file_source (boost::shared_ptr src) -{ - AnalysisFeatureList results; - - TransientDetector td (src->sample_rate()); - - if (td.run (src->get_transients_path(), src.get(), 0, results) == 0) { - src->set_been_analysed (true); - } else { - src->set_been_analysed (false); - } - -} - - diff --git a/libs/ardour/ardour/.cvsignore b/libs/ardour/ardour/.cvsignore deleted file mode 100644 index 67020331ba..0000000000 --- a/libs/ardour/ardour/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -version.h diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h deleted file mode 100644 index cdbcacbd91..0000000000 --- a/libs/ardour/ardour/amp.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_amp_h__ -#define __ardour_amp_h__ - -#include - -namespace ARDOUR { - -class BufferSet; - - -/** Applies a declick operation to all audio inputs, passing the same number of - * audio outputs, and passing through any other types unchanged. - * - * FIXME: make this a Processor. - */ -class Amp { -public: - static void run_in_place (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target, bool invert_polarity); - - static void apply_simple_gain(BufferSet& bufs, nframes_t nframes, gain_t target); -}; - - -} // namespace ARDOUR - -#endif // __ardour_amp_h__ diff --git a/libs/ardour/ardour/analyser.h b/libs/ardour/ardour/analyser.h deleted file mode 100644 index 8771cab6b0..0000000000 --- a/libs/ardour/ardour/analyser.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __ardour_analyser_h__ -#define __ardour_analyser_h__ - -#include -#include - -namespace ARDOUR { - -class AudioFileSource; -class Source; -class TransientDetector; - -class Analyser { - - public: - Analyser(); - ~Analyser (); - - static void init (); - static void queue_source_for_analysis (boost::shared_ptr, bool force); - static void work (); - - private: - static Analyser* the_analyser; - static Glib::StaticMutex analysis_queue_lock; - static Glib::Cond* SourcesToAnalyse; - static std::list > analysis_queue; - - static void analyse_audio_file_source (boost::shared_ptr); -}; - - -} - -#endif /* __ardour_analyser_h__ */ diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h deleted file mode 100644 index 6f653f10bf..0000000000 --- a/libs/ardour/ardour/ardour.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 1999 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_ardour_h__ -#define __ardour_ardour_h__ - -#include -#include - -#include -#include - -#include -#include - -#include -#include - -namespace MIDI { - class MachineControl; - class Port; -} - -namespace ARDOUR { - - class AudioEngine; - class OSC; - - extern OSC* osc; - - static const nframes_t max_frames = JACK_MAX_FRAMES; - extern sigc::signal BootMessage; - - int init (bool with_vst, bool try_optimization); - int cleanup (); - - std::string get_ardour_revision (); - - void find_bindings_files (std::map&); - - const layer_t max_layer = UCHAR_MAX; - - microseconds_t get_microseconds (); - - Change new_change (); - - extern Change StartChanged; - extern Change LengthChanged; - extern Change PositionChanged; - extern Change NameChanged; - extern Change BoundsChanged; - - struct LocaleGuard { - LocaleGuard (const char*); - ~LocaleGuard (); - const char* old; - }; - - static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */ - - void setup_fpu (); -} - -/* how do we make these be within the Ardour namespace? */ - -extern MIDI::Port* default_mmc_port; -extern MIDI::Port* default_mtc_port; -extern MIDI::Port* default_midi_port; - -#endif /* __ardour_ardour_h__ */ - diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h deleted file mode 100644 index 71eaf60ade..0000000000 --- a/libs/ardour/ardour/audio_buffer.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_audio_buffer_h__ -#define __ardour_audio_buffer_h__ - -#include -#include - -namespace ARDOUR { - -class AudioBuffer : public Buffer -{ -public: - AudioBuffer(size_t capacity); - - ~AudioBuffer(); - - void silence(nframes_t len, nframes_t offset = 0) { - if (!_silent) { - assert(_capacity > 0); - assert(offset + len <= _capacity); - memset(_data + offset, 0, sizeof (Sample) * len); - if (offset == 0 && len == _capacity) { - _silent = true; - } - } - } - - /** Read @a len frames FROM THE START OF @a src into self at @a offset */ - void read_from(const Buffer& src, nframes_t len, nframes_t offset) { - assert(&src != this); - assert(_capacity > 0); - assert(src.type() == DataType::AUDIO); - assert(offset + len <= _capacity); - memcpy(_data + offset, ((AudioBuffer&)src).data(), sizeof(Sample) * len); - _silent = src.silent(); - } - - /** Accumulate (add)@a len frames FROM THE START OF @a src into self at @a offset */ - void accumulate_from(const AudioBuffer& src, nframes_t len, nframes_t offset) { - assert(_capacity > 0); - assert(offset + len <= _capacity); - - Sample* const dst_raw = _data + offset; - const Sample* const src_raw = src.data(); - - mix_buffers_no_gain(dst_raw, src_raw, len); - - _silent = (src.silent() && _silent); - } - - /** Accumulate (add) @a len frames FROM THE START OF @a src into self at @a offset - * scaling by @a gain_coeff */ - void accumulate_with_gain_from(const AudioBuffer& src, nframes_t len, nframes_t offset, gain_t gain_coeff) { - assert(_capacity > 0); - assert(offset + len <= _capacity); - - Sample* const dst_raw = _data + offset; - const Sample* const src_raw = src.data(); - - mix_buffers_with_gain (dst_raw, src_raw, len, gain_coeff); - - _silent = ( (src.silent() && _silent) || (_silent && gain_coeff == 0) ); - } - - void apply_gain(gain_t gain, nframes_t len, nframes_t offset=0) { - apply_gain_to_buffer (_data + offset, len, gain); - } - - /** Set the data contained by this buffer manually (for setting directly to jack buffer). - * - * Constructor MUST have been passed capacity=0 or this will die (to prevent mem leaks). - */ - void set_data (Sample* data, size_t size) { - assert(!_owns_data); // prevent leaks - _capacity = size; - _size = size; - _data = data; - _silent = false; - } - - /** Reallocate the buffer used internally to handle at least @nframes of data - * - * Constructor MUST have been passed capacity!=0 or this will die (to prevent mem leaks). - */ - void resize (size_t nframes); - - const Sample* data () const { return _data; } - Sample* data () { return _data; } - - const Sample* data(nframes_t nframes, nframes_t offset) const - { assert(offset + nframes <= _capacity); return _data + offset; } - - Sample* data (nframes_t nframes, nframes_t offset) - { assert(offset + nframes <= _capacity); return _data + offset; } - -private: - bool _owns_data; - Sample* _data; ///< Actual buffer contents -}; - - -} // namespace ARDOUR - -#endif // __ardour_audio_audio_buffer_h__ diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h deleted file mode 100644 index aaf5461361..0000000000 --- a/libs/ardour/ardour/audio_diskstream.h +++ /dev/null @@ -1,277 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_audio_diskstream_h__ -#define __ardour_audio_diskstream_h__ - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct tm; - -namespace ARDOUR { - -class AudioEngine; -class Send; -class Session; -class AudioPlaylist; -class AudioFileSource; -class IO; - -class AudioDiskstream : public Diskstream -{ - public: - AudioDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable); - AudioDiskstream (Session &, const XMLNode&); - ~AudioDiskstream(); - - float playback_buffer_load() const; - float capture_buffer_load() const; - - string input_source (uint32_t n=0) const { - boost::shared_ptr c = channels.reader(); - if (n < c->size()) { - return (*c)[n]->source ? (*c)[n]->source->name() : ""; - } else { - return ""; - } - } - - Port *input_source_port (uint32_t n=0) const { - boost::shared_ptr c = channels.reader(); - if (n < c->size()) return (*c)[n]->source; return 0; - } - - void set_record_enabled (bool yn); - int set_destructive (bool yn); - bool can_become_destructive (bool& requires_bounce) const; - - float peak_power(uint32_t n = 0) { - boost::shared_ptr c = channels.reader(); - ChannelInfo* chaninfo = (*c)[n]; - float x = chaninfo->peak_power; - chaninfo->peak_power = 0.0f; - if (x > 0.0f) { - return 20.0f * fast_log10(x); - } else { - return minus_infinity(); - } - } - - boost::shared_ptr audio_playlist () { return boost::dynamic_pointer_cast(_playlist); } - - int use_playlist (boost::shared_ptr); - int use_new_playlist (); - int use_copy_playlist (); - - Sample *playback_buffer (uint32_t n = 0) { - boost::shared_ptr c = channels.reader(); - if (n < c->size()) - return (*c)[n]->current_playback_buffer; - return 0; - } - - Sample *capture_buffer (uint32_t n = 0) { - boost::shared_ptr c = channels.reader(); - if (n < c->size()) - return (*c)[n]->current_capture_buffer; - return 0; - } - - boost::shared_ptr write_source (uint32_t n=0) { - boost::shared_ptr c = channels.reader(); - if (n < c->size()) - return (*c)[n]->write_source; - return boost::shared_ptr(); - } - - int add_channel (uint32_t how_many); - int remove_channel (uint32_t how_many); - - /* stateful */ - - XMLNode& get_state(void); - int set_state(const XMLNode& node); - - void monitor_input (bool); - - static void swap_by_ptr (Sample *first, Sample *last) { - while (first < last) { - Sample tmp = *first; - *first++ = *last; - *last-- = tmp; - } - } - - static void swap_by_ptr (Sample *first, Sample *last, nframes_t n) { - while (n--) { - Sample tmp = *first; - *first++ = *last; - *last-- = tmp; - } - } - - XMLNode* deprecated_io_node; - - protected: - friend class Session; - - /* the Session is the only point of access for these - because they require that the Session is "inactive" - while they are called. - */ - - void set_pending_overwrite(bool); - int overwrite_existing_buffers (); - void set_block_size (nframes_t); - int internal_playback_seek (nframes_t distance); - int can_internal_playback_seek (nframes_t distance); - int rename_write_sources (); - void reset_write_sources (bool, bool force = false); - void non_realtime_input_change (); - - protected: - friend class Auditioner; - int seek (nframes_t which_sample, bool complete_refill = false); - - protected: - friend class AudioTrack; - - int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input); - bool commit (nframes_t nframes); - - private: - - struct ChannelInfo { - - ChannelInfo (nframes_t buffer_size, nframes_t speed_buffer_size, nframes_t wrap_buffer_size); - ~ChannelInfo (); - - Sample *playback_wrap_buffer; - Sample *capture_wrap_buffer; - Sample *speed_buffer; - - float peak_power; - - boost::shared_ptr fades_source; - boost::shared_ptr write_source; - - /// the Port that our audio data comes from - Port *source; - Sample *current_capture_buffer; - Sample *current_playback_buffer; - - RingBufferNPT *playback_buf; - RingBufferNPT *capture_buf; - - Sample* scrub_buffer; - Sample* scrub_forward_buffer; - Sample* scrub_reverse_buffer; - - RingBufferNPT::rw_vector playback_vector; - RingBufferNPT::rw_vector capture_vector; - - RingBufferNPT * capture_transition_buf; - // the following are used in the butler thread only - nframes_t curr_capture_cnt; - }; - - typedef std::vector ChannelList; - - /* The two central butler operations */ - int do_flush (Session::RunContext context, bool force = false); - int do_refill () { return _do_refill(_mixdown_buffer, _gain_buffer); } - - int do_refill_with_alloc (); - - int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, - nframes_t& start, nframes_t cnt, - ChannelInfo* channel_info, int channel, bool reversed); - - void finish_capture (bool rec_monitors_input, boost::shared_ptr); - void transport_stopped (struct tm&, time_t, bool abort); - void transport_looped (nframes_t transport_frame); - - void init (Diskstream::Flag); - - void init_channel (ChannelInfo &chan); - void destroy_channel (ChannelInfo &chan); - - int use_new_write_source (uint32_t n=0); - - int find_and_use_playlist (const string&); - - void allocate_temporary_buffers (); - - int use_pending_capture_data (XMLNode& node); - - void get_input_sources (); - void check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record); - void set_align_style_from_io(); - void setup_destructive_playlist (); - void use_destructive_playlist (); - - void engage_record_enable (); - void disengage_record_enable (); - - // Working buffers for do_refill (butler thread) - static void allocate_working_buffers(); - static void free_working_buffers(); - - static size_t _working_buffers_size; - static Sample* _mixdown_buffer; - static gain_t* _gain_buffer; - - std::vector > capturing_sources; - - SerializedRCUManager channels; - - /* really */ - private: - int _do_refill (Sample *mixdown_buffer, float *gain_buffer); - - int add_channel_to (boost::shared_ptr, uint32_t how_many); - int remove_channel_from (boost::shared_ptr, uint32_t how_many); - -}; - -} // namespace ARDOUR - -#endif /* __ardour_audio_diskstream_h__ */ diff --git a/libs/ardour/ardour/audio_library.h b/libs/ardour/ardour/audio_library.h deleted file mode 100644 index 86b5fb3aa2..0000000000 --- a/libs/ardour/ardour/audio_library.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2003-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audio_library_h__ -#define __ardour_audio_library_h__ - -#include -#include -#include - -using std::vector; -using std::string; -using std::map; - -namespace ARDOUR { - -class AudioLibrary -{ - public: - AudioLibrary (); - ~AudioLibrary (); - - void set_tags (string member, vector tags); - vector get_tags (string member); - - void search_members_and (vector& results, const vector tags); - - void save_changes(); - - private: - string src; -}; - -extern AudioLibrary* Library; - -} // ARDOUR namespace - -#endif // __ardour_audio_library_h__ diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h deleted file mode 100644 index 874f842d83..0000000000 --- a/libs/ardour/ardour/audio_port.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_audio_port_h__ -#define __ardour_audio_port_h__ - -#include - -namespace ARDOUR { - -class AudioPort : public BaseAudioPort, public PortFacade { - - public: - ~AudioPort(); - - void reset (); - - void cycle_start (nframes_t nframes, nframes_t offset); - void cycle_end (nframes_t nframes, nframes_t offset); - - protected: - friend class AudioEngine; - - AudioPort (const std::string&, Flags, bool external, nframes_t); -}; - -} // namespace ARDOUR - -#endif /* __ardour_audio_port_h__ */ diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h deleted file mode 100644 index 3546545329..0000000000 --- a/libs/ardour/ardour/audio_track.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2002-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audio_track_h__ -#define __ardour_audio_track_h__ - -#include - -namespace ARDOUR { - -class Session; -class AudioDiskstream; -class AudioPlaylist; -class RouteGroup; - -class AudioTrack : public Track -{ - public: - AudioTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); - AudioTrack (Session&, const XMLNode&); - ~AudioTrack (); - - int set_mode (TrackMode m); - bool can_use_mode (TrackMode m, bool& bounce_required); - - int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, int declick, bool can_record, bool rec_monitors_input); - - int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input); - - int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool can_record, bool rec_monitors_input); - - boost::shared_ptr audio_diskstream() const; - - int use_diskstream (string name); - int use_diskstream (const PBD::ID& id); - - int export_stuff (BufferSet& bufs, nframes_t nframes, nframes_t end_frame); - - void freeze (InterThreadInfo&); - void unfreeze (); - - void bounce (InterThreadInfo&); - void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&); - - int set_state(const XMLNode& node); - - protected: - XMLNode& state (bool full); - - int _set_state (const XMLNode&, bool call_base); - - private: - int set_diskstream (boost::shared_ptr, void *); - int deprecated_use_diskstream_connections (); - void set_state_part_two (); - void set_state_part_three (); -}; - -} // namespace ARDOUR - -#endif /* __ardour_audio_track_h__ */ diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h deleted file mode 100644 index dc9a52d5d3..0000000000 --- a/libs/ardour/ardour/audio_unit.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Taybin Rutkin - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audio_unit_h__ -#define __ardour_audio_unit_h__ - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include - -#include - -class CAComponent; -class CAAudioUnit; -class CAComponentDescription; -struct AudioBufferList; - -namespace ARDOUR { - -class AudioEngine; -class Session; - -struct AUParameterDescriptor : public Plugin::ParameterDescriptor { - // additional fields to make operations more efficient - AudioUnitParameterID id; - AudioUnitScope scope; - AudioUnitElement element; - float default_value; - bool automatable; - AudioUnitParameterUnit unit; -}; - -class AUPlugin : public ARDOUR::Plugin -{ - public: - AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr comp); - AUPlugin (const AUPlugin& other); - virtual ~AUPlugin (); - - std::string unique_id () const; - const char * label () const; - const char * name () const { return _info->name.c_str(); } - const char * maker () const { return _info->creator.c_str(); } - uint32_t parameter_count () const; - float default_value (uint32_t port); - nframes_t signal_latency () const; - void set_parameter (uint32_t which, float val); - float get_parameter (uint32_t which) const; - - int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const; - uint32_t nth_parameter (uint32_t which, bool& ok) const; - void activate (); - void deactivate (); - void set_block_size (nframes_t nframes); - - int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset); - - std::set automatable() const; - string describe_parameter (uint32_t); - string state_node_name () const { return "audiounit"; } - void print_parameter (uint32_t, char*, uint32_t len) const; - - bool parameter_is_audio (uint32_t) const; - bool parameter_is_control (uint32_t) const; - bool parameter_is_input (uint32_t) const; - bool parameter_is_output (uint32_t) const; - - XMLNode& get_state(); - int set_state(const XMLNode& node); - - bool save_preset (string name); - bool load_preset (const string preset_label); - std::vector get_presets (); - - bool has_editor () const; - - bool fixed_io() const { return false; } - int32_t can_support_input_configuration (int32_t in); - int32_t compute_output_streams (int32_t nplugins); - uint32_t output_streams() const; - uint32_t input_streams() const; - - boost::shared_ptr get_au () { return unit; } - boost::shared_ptr get_comp () const { return comp; } - - OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, - AudioBufferList* ioData); - private: - boost::shared_ptr comp; - boost::shared_ptr unit; - - AudioStreamBasicDescription streamFormat; - bool initialized; - int format_set; - AudioBufferList* buffers; - - UInt32 global_elements; - UInt32 output_elements; - UInt32 input_elements; - - int set_output_format (); - int set_input_format (); - int set_stream_format (int scope, uint32_t cnt); - int _set_block_size (nframes_t nframes); - void discover_parameters (); - - std::vector > parameter_map; - uint32_t current_maxbuf; - nframes_t current_offset; - nframes_t cb_offset; - vector* current_buffers; - nframes_t frames_processed; - - std::vector descriptors; - void init (); -}; - -typedef boost::shared_ptr AUPluginPtr; - -class AUPluginInfo : public PluginInfo { - public: - AUPluginInfo (boost::shared_ptr); - ~AUPluginInfo (); - - PluginPtr load (Session& session); - - static PluginInfoList discover (); - static void get_names (CAComponentDescription&, std::string& name, Glib::ustring& maker); - static std::string stringify_descriptor (const CAComponentDescription&); - - private: - boost::shared_ptr descriptor; - - static void discover_music (PluginInfoList&); - static void discover_fx (PluginInfoList&); - static void discover_by_description (PluginInfoList&, CAComponentDescription&); -}; - -typedef boost::shared_ptr AUPluginInfoPtr; - -} // namespace ARDOUR - -#endif // __ardour_audio_unit_h__ diff --git a/libs/ardour/ardour/audioanalyser.h b/libs/ardour/ardour/audioanalyser.h deleted file mode 100644 index 06b841990a..0000000000 --- a/libs/ardour/ardour/audioanalyser.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audioanalyser_h__ -#define __ardour_audioanalyser_h__ - -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Readable; -class Session; - -class AudioAnalyser { - - public: - typedef Vamp::Plugin AnalysisPlugin; - typedef std::string AnalysisPluginKey; - - AudioAnalyser (float sample_rate, AnalysisPluginKey key); - virtual ~AudioAnalyser(); - - /* analysis object should provide a run method - that accepts a path to write the results to (optionally empty) - a Readable* to read data from - and a reference to a type-specific container to return the - results. - */ - - void reset (); - - protected: - float sample_rate; - AnalysisPlugin* plugin; - AnalysisPluginKey plugin_key; - - nframes64_t bufsize; - nframes64_t stepsize; - - int initialize_plugin (AnalysisPluginKey name, float sample_rate); - int analyse (const std::string& path, Readable*, uint32_t channel); - - /* instances of an analysis object will have this method called - whenever there are results to process. if out is non-null, - the data should be written to the stream it points to. - */ - - virtual int use_features (Vamp::Plugin::FeatureSet&, std::ostream*) = 0; -}; - -} /* namespace */ - -#endif /* __ardour_audioanalyser_h__ */ diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h deleted file mode 100644 index e1d5e50cc2..0000000000 --- a/libs/ardour/ardour/audioengine.h +++ /dev/null @@ -1,276 +0,0 @@ -/* - Copyright (C) 2002-2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audioengine_h__ -#define __ardour_audioengine_h__ - -#include -#include -#include -#include -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Session; -class Port; -class InternalPort; - -class AudioEngine : public sigc::trackable -{ - public: - typedef std::set Ports; - - AudioEngine (std::string client_name); - virtual ~AudioEngine (); - - jack_client_t* jack() const; - bool connected() const { return _jack != 0; } - - bool is_realtime () const; - - std::string client_name() const { return jack_client_name; } - - int reconnect_to_jack (); - int disconnect_from_jack(); - - bool will_reconnect_at_halt (); - void set_reconnect_at_halt (bool); - - int stop (bool forever = false); - int start (); - bool running() const { return _running; } - - Glib::Mutex& process_lock() { return _process_lock; } - - nframes_t frame_rate(); - nframes_t frames_per_cycle(); - - int usecs_per_cycle () const { return _usecs_per_cycle; } - - bool get_sync_offset (nframes_t& offset) const; - - nframes_t frames_since_cycle_start () { - if (!_running || !_jack) return 0; - return jack_frames_since_cycle_start (_jack); - } - nframes_t frame_time () { - if (!_running || !_jack) return 0; - return jack_frame_time (_jack); - } - - nframes_t transport_frame () const { - if (!_running || !_jack) return 0; - return jack_get_current_transport_frame (_jack); - } - - int request_buffer_size (nframes_t); - - nframes_t set_monitor_check_interval (nframes_t); - - float get_cpu_load() { - if (!_running || !_jack) return 0; - return jack_cpu_load (_jack); - } - - void set_session (Session *); - void remove_session (); - - class PortRegistrationFailure : public std::exception { - public: - PortRegistrationFailure (const char* why = "") { - reason = why; - } - virtual const char *what() const throw() { return reason; } - - private: - const char* reason; - }; - - class NoBackendAvailable : public std::exception { - public: - virtual const char *what() const throw() { return "could not connect to engine backend"; } - }; - - Port *register_input_port (DataType, const std::string& portname, bool publish); - Port *register_output_port (DataType, const std::string& portname, bool publish); - int unregister_port (Port &); - - int connect (const std::string& source, const std::string& destination); - int disconnect (const std::string& source, const std::string& destination); - int disconnect (Port &); - - const char ** get_ports (const std::string& port_name_pattern, const std::string& type_name_pattern, uint32_t flags); - - uint32_t n_physical_outputs () const; - uint32_t n_physical_inputs () const; - - bool can_request_hardware_monitoring (); - - void get_physical_outputs (std::vector&); - void get_physical_inputs (std::vector&); - - std::string get_nth_physical_output (DataType type, uint32_t n) { - return get_nth_physical (type, n, JackPortIsInput); - } - - std::string get_nth_physical_input (DataType type, uint32_t n) { - return get_nth_physical (type, n, JackPortIsOutput); - } - - nframes_t get_port_total_latency (const Port&); - void update_total_latencies (); - void update_total_latency (const Port&); - - /** Caller may not delete the object pointed to by the return value - */ - Port *get_port_by_name (const std::string& name, bool keep = true) const; - - enum TransportState { - TransportStopped = JackTransportStopped, - TransportRolling = JackTransportRolling, - TransportLooping = JackTransportLooping, - TransportStarting = JackTransportStarting - }; - - void transport_start (); - void transport_stop (); - void transport_locate (nframes_t); - TransportState transport_state (); - - int reset_timebase (); - - /* start/stop freewheeling */ - - int freewheel (bool onoff); - bool freewheeling() const { return _freewheeling; } - - /* this signal is sent for every process() cycle while freewheeling. - the regular process() call to session->process() is not made. - */ - - sigc::signal Freewheel; - - sigc::signal Xrun; - - /* this signal is if JACK notifies us of a graph order event */ - - sigc::signal GraphReordered; - - /* this signal is emitted if the sample rate changes */ - - sigc::signal SampleRateChanged; - - /* this signal is sent if JACK ever disconnects us */ - - sigc::signal Halted; - - /* these two are emitted when the engine itself is - started and stopped - */ - - sigc::signal Running; - sigc::signal Stopped; - - std::string make_port_name_relative (std::string); - std::string make_port_name_non_relative (std::string); - - private: - ARDOUR::Session *session; - jack_client_t *_jack; - std::string jack_client_name; - mutable Glib::Mutex _process_lock; - Glib::Cond session_removed; - bool session_remove_pending; - bool _running; - bool _has_run; - nframes_t _buffer_size; - nframes_t _frame_rate; - /// number of frames between each check for changes in monitor input - nframes_t monitor_check_interval; - /// time of the last monitor check in frames - nframes_t last_monitor_check; - /// the number of frames processed since start() was called - nframes_t _processed_frames; - bool _freewheeling; - bool _freewheel_thread_registered; - sigc::slot freewheel_action; - bool reconnect_on_halt; - int _usecs_per_cycle; - - SerializedRCUManager ports; - - Port *register_port (DataType type, const std::string& portname, bool input, bool publish); - - int process_callback (nframes_t nframes); - void remove_all_ports (); - - Port* get_port (const std::string& short_name); - - typedef std::pair PortConnection; - typedef std::list PortConnections; - - PortConnections port_connections; - void remove_connections_for (Port&); - - std::string get_nth_physical (DataType type, uint32_t n, int flags); - - void port_registration_failure (const std::string& portname); - - static int _xrun_callback (void *arg); - static int _graph_order_callback (void *arg); - static int _process_callback (nframes_t nframes, void *arg); - static int _sample_rate_callback (nframes_t nframes, void *arg); - static int _bufsize_callback (nframes_t nframes, void *arg); - static void _jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int, void*); - static int _jack_sync_callback (jack_transport_state_t, jack_position_t*, void *arg); - static void _freewheel_callback (int , void *arg); - - void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int); - int jack_sync_callback (jack_transport_state_t, jack_position_t*); - int jack_bufsize_callback (nframes_t); - int jack_sample_rate_callback (nframes_t); - - static void halted (void *); - - int connect_to_jack (std::string client_name); - - void meter_thread (); - void start_metering_thread (); - void stop_metering_thread (); - - Glib::Thread* m_meter_thread; - static gint m_meter_exit; -}; - -} // namespace ARDOUR - -#endif /* __ardour_audioengine_h__ */ diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h deleted file mode 100644 index de388a06fc..0000000000 --- a/libs/ardour/ardour/audiofilesource.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audiofilesource_h__ -#define __ardour_audiofilesource_h__ - -#include - -#include - -#include - -namespace ARDOUR { - -class non_existent_source : public std::exception { - public: - virtual const char *what() const throw() { return "audio file does not exist"; } -}; - -struct SoundFileInfo { - float samplerate; - uint16_t channels; - int64_t length; - std::string format_name; - int64_t timecode; -}; - -class AudioFileSource : public AudioSource { - public: - enum Flag { - Writable = 0x1, - CanRename = 0x2, - Broadcast = 0x4, - Removable = 0x8, - RemovableIfEmpty = 0x10, - RemoveAtDestroy = 0x20, - NoPeakFile = 0x40, - Destructive = 0x80 - }; - - virtual ~AudioFileSource (); - - bool set_name (const std::string& newname) { return (set_source_name(newname, destructive()) == 0); } - int set_source_name (Glib::ustring newname, bool destructive); - - Glib::ustring path() const { return _path; } - Glib::ustring peak_path (Glib::ustring audio_path); - Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path, - Glib::ustring audio_path); - - uint16_t channel() const { return _channel; } - - static void set_peak_dir (Glib::ustring dir) { peak_dir = dir; } - - static bool get_soundfile_info (Glib::ustring path, SoundFileInfo& _info, std::string& error); - - static bool safe_file_extension (Glib::ustring path); - - void set_allow_remove_if_empty (bool yn); - void mark_for_remove(); - - /* this block of methods do nothing for regular file sources, but are significant - for files used in destructive recording. - */ - - virtual nframes_t last_capture_start_frame() const { return 0; } - virtual void mark_capture_start (nframes_t) {} - virtual void mark_capture_end () {} - virtual void clear_capture_marks() {} - virtual bool one_of_several_channels () const { return false; } - - virtual int update_header (nframes_t when, struct tm&, time_t) = 0; - virtual int flush_header () = 0; - - int move_to_trash (const Glib::ustring& trash_dir_name); - - static bool is_empty (Session&, Glib::ustring path); - void mark_streaming_write_completed (); - - void mark_take (Glib::ustring); - Glib::ustring take_id() const { return _take_id; } - - bool is_embedded() const { return _is_embedded; } - - static void set_bwf_serial_number (int); - - static void set_search_path (Glib::ustring string); - static void set_header_position_offset (nframes_t offset ); - - int setup_peakfile (); - - static sigc::signal HeaderPositionOffsetChanged; - - XMLNode& get_state (); - int set_state (const XMLNode&); - - bool destructive() const { return (_flags & Destructive); } - virtual bool set_destructive (bool yn) { return false; } - bool can_truncate_peaks() const { return !destructive(); } - - Flag flags() const { return _flags; } - - void mark_immutable (); - - /* this should really be protected, but C++ is getting stricter - and creating slots from protected member functions is starting - to cause issues. - */ - - virtual void handle_header_position_change () {} - - bool can_be_analysed() const { return _length > 0; } - - protected: - - /* constructor to be called for existing external-to-session files */ - - AudioFileSource (Session&, Glib::ustring path, Flag flags); - - /* constructor to be called for new in-session files */ - - AudioFileSource (Session&, Glib::ustring path, Flag flags, - SampleFormat samp_format, HeaderFormat hdr_format); - - /* constructor to be called for existing in-session files */ - - AudioFileSource (Session&, const XMLNode&, bool must_exit = true); - - int init (Glib::ustring idstr, bool must_exist); - - Glib::ustring _path; - Flag _flags; - Glib::ustring _take_id; - int64_t timeline_position; - bool file_is_new; - uint16_t _channel; - - bool _is_embedded; - static bool determine_embeddedness(Glib::ustring path); - - static Glib::ustring peak_dir; - static Glib::ustring search_path; - - static char bwf_country_code[3]; - static char bwf_organization_code[4]; - static char bwf_serial_number[13]; - - static uint64_t header_position_offset; - - virtual void set_timeline_position (int64_t pos); - virtual void set_header_timeline_position () = 0; - - bool find (Glib::ustring& path, bool must_exist, bool& is_new, uint16_t& chan); - bool removable() const; - bool writable() const { return _flags & Writable; } - - static Sample* get_interleave_buffer (nframes_t size); - - private: - Glib::ustring old_peak_path (Glib::ustring audio_path); - Glib::ustring broken_peak_path (Glib::ustring audio_path); -}; - -} // namespace ARDOUR - -#endif /* __ardour_audiofilesource_h__ */ - diff --git a/libs/ardour/ardour/audioplaylist.h b/libs/ardour/ardour/audioplaylist.h deleted file mode 100644 index 4acbc9ad51..0000000000 --- a/libs/ardour/ardour/audioplaylist.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audio_playlist_h__ -#define __ardour_audio_playlist_h__ - -#include -#include - -#include -#include - -namespace ARDOUR { - -class Session; -class Region; -class AudioRegion; -class Source; - -class AudioPlaylist : public ARDOUR::Playlist -{ - public: - typedef std::list > Crossfades; - - public: - AudioPlaylist (Session&, const XMLNode&, bool hidden = false); - AudioPlaylist (Session&, string name, bool hidden = false); - AudioPlaylist (boost::shared_ptr, string name, bool hidden = false); - AudioPlaylist (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); - - ~AudioPlaylist (); - - void clear (bool with_signals=true); - - nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0); - - int set_state (const XMLNode&); - - sigc::signal > NewCrossfade; - - template void foreach_crossfade (T *t, void (T::*func)(boost::shared_ptr)); - void crossfades_at (nframes_t frame, Crossfades&); - - bool destroy_region (boost::shared_ptr); - - protected: - - /* playlist "callbacks" */ - void notify_crossfade_added (boost::shared_ptr); - void flush_notifications (); - - void finalize_split_region (boost::shared_ptr orig, boost::shared_ptr left, boost::shared_ptr right); - - void refresh_dependents (boost::shared_ptr region); - void check_dependents (boost::shared_ptr region, bool norefresh); - void remove_dependents (boost::shared_ptr region); - - private: - Crossfades _crossfades; - Crossfades _pending_xfade_adds; - - void crossfade_invalidated (boost::shared_ptr); - XMLNode& state (bool full_state); - void dump () const; - - bool region_changed (Change, boost::shared_ptr); - void crossfade_changed (Change); - void add_crossfade (boost::shared_ptr); - - void source_offset_changed (boost::shared_ptr region); -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_audio_playlist_h__ */ - - diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h deleted file mode 100644 index 81b7ef7c57..0000000000 --- a/libs/ardour/ardour/audioregion.h +++ /dev/null @@ -1,204 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audio_region_h__ -#define __ardour_audio_region_h__ - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Route; -class Playlist; -class Session; -class Filter; -class AudioSource; - -class AudioRegion : public Region -{ - public: - static Change FadeInChanged; - static Change FadeOutChanged; - static Change FadeInActiveChanged; - static Change FadeOutActiveChanged; - static Change EnvelopeActiveChanged; - static Change ScaleAmplitudeChanged; - static Change EnvelopeChanged; - - ~AudioRegion(); - - bool speed_mismatch (float) const; - - boost::shared_ptr audio_source (uint32_t n=0) const; - - void set_scale_amplitude (gain_t); - gain_t scale_amplitude() const { return _scale_amplitude; } - - void normalize_to (float target_in_dB = 0.0f); - - bool envelope_active () const { return _flags & Region::EnvelopeActive; } - bool fade_in_active () const { return _flags & Region::FadeIn; } - bool fade_out_active () const { return _flags & Region::FadeOut; } - - boost::shared_ptr fade_in() { return _fade_in; } - boost::shared_ptr fade_out() { return _fade_out; } - boost::shared_ptr envelope() { return _envelope; } - - virtual nframes_t read_peaks (PeakData *buf, nframes_t npeaks, - nframes_t offset, nframes_t cnt, - uint32_t chan_n=0, double samples_per_unit= 1.0) const; - - /* Readable interface */ - - virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const; - virtual nframes64_t readable_length() const { return length(); } - - virtual nframes_t read_at (Sample *buf, Sample *mixdown_buf, - float *gain_buf, nframes_t position, nframes_t cnt, - uint32_t chan_n = 0, - nframes_t read_frames = 0, - nframes_t skip_frames = 0) const; - - virtual nframes_t master_read_at (Sample *buf, Sample *mixdown_buf, - float *gain_buf, - nframes_t position, nframes_t cnt, uint32_t chan_n=0) const; - - virtual nframes_t read_raw_internal (Sample*, nframes_t, nframes_t) const; - - XMLNode& state (bool); - int set_state (const XMLNode&); - - static void set_default_fade (float steepness, nframes_t len); - bool fade_in_is_default () const; - bool fade_out_is_default () const; - - enum FadeShape { - Linear, - Fast, - Slow, - LogA, - LogB - }; - - void set_fade_in_active (bool yn); - void set_fade_in_shape (FadeShape); - void set_fade_in_length (nframes_t); - void set_fade_in (FadeShape, nframes_t); - - void set_fade_out_active (bool yn); - void set_fade_out_shape (FadeShape); - void set_fade_out_length (nframes_t); - void set_fade_out (FadeShape, nframes_t); - - void set_envelope_active (bool yn); - void set_default_envelope (); - - int separate_by_channel (ARDOUR::Session&, vector >&) const; - - /* export */ - - int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&); - - /* xfade/fade interactions */ - - void suspend_fade_in (); - void suspend_fade_out (); - void resume_fade_in (); - void resume_fade_out (); - - int get_transients (AnalysisFeatureList&, bool force_new = false); - - private: - friend class RegionFactory; - - AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length); - AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (boost::shared_ptr, const XMLNode&); - AudioRegion (SourceList &, const XMLNode&); - - private: - void init (); - void set_default_fades (); - void set_default_fade_in (); - void set_default_fade_out (); - - void recompute_gain_at_end (); - void recompute_gain_at_start (); - - nframes_t _read_at (const SourceList&, nframes_t limit, - Sample *buf, Sample *mixdown_buffer, - float *gain_buffer, nframes_t position, nframes_t cnt, - uint32_t chan_n = 0, - nframes_t read_frames = 0, - nframes_t skip_frames = 0, - bool raw = false) const; - - void recompute_at_start (); - void recompute_at_end (); - - void envelope_changed (); - void fade_in_changed (); - void fade_out_changed (); - void source_offset_changed (); - void listen_to_my_curves (); - void listen_to_my_sources (); - - boost::shared_ptr _fade_in; - FadeShape _fade_in_shape; - boost::shared_ptr _fade_out; - FadeShape _fade_out_shape; - boost::shared_ptr _envelope; - gain_t _scale_amplitude; - uint32_t _fade_in_disabled; - uint32_t _fade_out_disabled; - - protected: - /* default constructor for derived (compound) types */ - - AudioRegion (Session& s, nframes_t, nframes_t, std::string name); - AudioRegion (boost::shared_ptr); - - int set_live_state (const XMLNode&, Change&, bool send); -}; - -} /* namespace ARDOUR */ - -/* access from C objects */ - -extern "C" { - int region_read_peaks_from_c (void *arg, uint32_t npeaks, uint32_t start, uint32_t length, intptr_t data, uint32_t n_chan, double samples_per_unit); - uint32_t region_length_from_c (void *arg); - uint32_t sourcefile_length_from_c (void *arg, double); -} - -#endif /* __ardour_audio_region_h__ */ diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h deleted file mode 100644 index d11b829694..0000000000 --- a/libs/ardour/ardour/audiosource.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_audio_source_h__ -#define __ardour_audio_source_h__ - -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include - -using std::list; -using std::vector; - -namespace ARDOUR { - -class AudioSource : public Source, public boost::enable_shared_from_this -{ - public: - AudioSource (Session&, Glib::ustring name); - AudioSource (Session&, const XMLNode&); - virtual ~AudioSource (); - - nframes64_t readable_length() const { return _length; } - uint32_t n_channels() const { return 1; } - - virtual nframes_t available_peaks (double zoom) const; - - /* stopgap until nframes_t becomes nframes64_t. this function is needed by the Readable interface */ - - virtual nframes64_t read (Sample *dst, nframes64_t start, nframes64_t cnt, int channel) const { - /* XXX currently ignores channel, assuming that source is always mono, which - historically has been true. - */ - return read (dst, (nframes_t) start, (nframes_t) cnt); - } - - virtual nframes_t read (Sample *dst, nframes_t start, nframes_t cnt) const; - virtual nframes_t write (Sample *src, nframes_t cnt); - - virtual float sample_rate () const = 0; - - virtual void mark_for_remove() = 0; - virtual void mark_streaming_write_completed () {} - - virtual bool can_truncate_peaks() const { return true; } - - void set_captured_for (Glib::ustring str) { _captured_for = str; } - Glib::ustring captured_for() const { return _captured_for; } - - uint32_t read_data_count() const { return _read_data_count; } - uint32_t write_data_count() const { return _write_data_count; } - - int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_visual_peak) const; - - int build_peaks (); - bool peaks_ready (sigc::slot, sigc::connection&) const; - - mutable sigc::signal PeaksReady; - mutable sigc::signal PeakRangeReady; - - XMLNode& get_state (); - int set_state (const XMLNode&); - - int rename_peakfile (Glib::ustring newpath); - void touch_peakfile (); - - static void set_build_missing_peakfiles (bool yn) { - _build_missing_peakfiles = yn; - } - - static void set_build_peakfiles (bool yn) { - _build_peakfiles = yn; - } - - static bool get_build_peakfiles () { - return _build_peakfiles; - } - - virtual int setup_peakfile () { return 0; } - - int prepare_for_peakfile_writes (); - void done_with_peakfile_writes (bool done = true); - - protected: - static bool _build_missing_peakfiles; - static bool _build_peakfiles; - - bool _peaks_built; - mutable Glib::Mutex _lock; - mutable Glib::Mutex _peaks_ready_lock; - Glib::ustring peakpath; - Glib::ustring _captured_for; - - mutable uint32_t _read_data_count; // modified in read() - mutable uint32_t _write_data_count; // modified in write() - - int initialize_peakfile (bool newfile, Glib::ustring path); - int build_peaks_from_scratch (); - int compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt, bool force, bool intermediate_peaks_ready_signal); - void truncate_peakfile(); - - mutable off_t _peak_byte_max; // modified in compute_and_write_peak() - - virtual nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const = 0; - virtual nframes_t write_unlocked (Sample *dst, nframes_t cnt) = 0; - virtual Glib::ustring peak_path(Glib::ustring audio_path) = 0; - virtual Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path, Glib::ustring audio_path) = 0; - - void update_length (nframes_t pos, nframes_t cnt); - - virtual int read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, - double samples_per_visual_peak, nframes_t fpp) const; - - int compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt, bool force, - bool intermediate_peaks_ready_signal, nframes_t frames_per_peak); - - private: - int peakfile; - nframes_t peak_leftover_cnt; - nframes_t peak_leftover_size; - Sample* peak_leftovers; - nframes_t peak_leftover_frame; - - bool file_changed (Glib::ustring path); -}; - -} - -#endif /* __ardour_audio_source_h__ */ diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h deleted file mode 100644 index 06d521ea21..0000000000 --- a/libs/ardour/ardour/auditioner.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_auditioner_h__ -#define __ardour_auditioner_h__ - -#include - -#include - -#include -#include - -namespace ARDOUR { - -class Session; -class AudioRegion; -class AudioPlaylist; - -class Auditioner : public AudioTrack -{ - public: - Auditioner (Session&); - ~Auditioner (); - - void audition_region (boost::shared_ptr); - - ARDOUR::AudioPlaylist& prepare_playlist (); - void audition_current_playlist (); - - int play_audition (nframes_t nframes); - - void cancel_audition () { - g_atomic_int_set (&_active, 0); - } - - bool active() const { return g_atomic_int_get (&_active); } - - private: - boost::shared_ptr the_region; - nframes_t current_frame; - mutable gint _active; - Glib::Mutex lock; - nframes_t length; - - void drop_ports (); - static void *_drop_ports (void *); - void actually_drop_ports (); - void output_changed (IOChange, void*); -}; - -}; /* namespace ARDOUR */ - -#endif /* __ardour_auditioner_h__ */ diff --git a/libs/ardour/ardour/auto_bundle.h b/libs/ardour/ardour/auto_bundle.h deleted file mode 100644 index 685a083e8d..0000000000 --- a/libs/ardour/ardour/auto_bundle.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_auto_bundle_h__ -#define __ardour_auto_bundle_h__ - -#include -#include -#include "ardour/bundle.h" - -namespace ARDOUR { - -class AutoBundle : public Bundle { - - public: - AutoBundle (bool i = true); - AutoBundle (std::string const &, bool i = true); - - uint32_t nchannels () const; - const PortList& channel_ports (uint32_t) const; - - void set_channels (uint32_t); - void set_port (uint32_t, std::string const &); - - private: - /// mutex for _ports; - /// XXX: is this necessary? - mutable Glib::Mutex _ports_mutex; - std::vector _ports; -}; - -} - -#endif /* __ardour_auto_bundle_h__ */ diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h deleted file mode 100644 index a2c1d98ae7..0000000000 --- a/libs/ardour/ardour/automatable.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_automatable_h__ -#define __ardour_automatable_h__ - -#include -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Session; -class AutomationControl; - -class Automatable : public SessionObject -{ -public: - Automatable(Session&, const std::string& name); - - virtual ~Automatable() {} - - // shorthand for gain, pan, etc - inline boost::shared_ptr - control(AutomationType type, bool create_if_missing=false) { - return control(Parameter(type), create_if_missing); - } - - virtual boost::shared_ptr control(Parameter id, bool create_if_missing=false); - virtual boost::shared_ptr control(Parameter id) const; - - boost::shared_ptr control_factory(boost::shared_ptr list); - - typedef std::map > Controls; - Controls& controls() { return _controls; } - const Controls& controls() const { return _controls; } - - virtual void add_control(boost::shared_ptr); - - virtual void automation_snapshot(nframes_t now, bool force); - bool should_snapshot (nframes_t now) { - return (_last_automation_snapshot > now || (now - _last_automation_snapshot) > _automation_interval); - } - virtual void transport_stopped(nframes_t now); - - virtual bool find_next_event(nframes_t start, nframes_t end, ControlEvent& ev) const; - - virtual string describe_parameter(Parameter param); - virtual float default_parameter_value(Parameter param) { return 1.0f; } - - virtual void clear_automation(); - - AutoState get_parameter_automation_state (Parameter param, bool lock = true); - virtual void set_parameter_automation_state (Parameter param, AutoState); - - AutoStyle get_parameter_automation_style (Parameter param); - void set_parameter_automation_style (Parameter param, AutoStyle); - - void protect_automation (); - - void what_has_automation(std::set&) const; - void what_has_visible_automation(std::set&) const; - const std::set& what_can_be_automated() const { return _can_automate_list; } - - void mark_automation_visible(Parameter, bool); - - Glib::Mutex& automation_lock() const { return _automation_lock; } - - static void set_automation_interval (jack_nframes_t frames) { - _automation_interval = frames; - } - - static jack_nframes_t automation_interval() { - return _automation_interval; - } - -protected: - - void can_automate(Parameter); - - virtual void auto_state_changed (Parameter which) {} - - int set_automation_state(const XMLNode&, Parameter default_param); - XMLNode& get_automation_state(); - - int load_automation (const std::string& path); - int old_set_automation_state(const XMLNode&); - - mutable Glib::Mutex _automation_lock; - - Controls _controls; - std::set _visible_controls; - std::set _can_automate_list; - - nframes_t _last_automation_snapshot; - static nframes_t _automation_interval; -}; - -} // namespace ARDOUR - -#endif /* __ardour_automatable_h__ */ diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h deleted file mode 100644 index 68ac5797dc..0000000000 --- a/libs/ardour/ardour/automation_control.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_automation_control_h__ -#define __ardour_automation_control_h__ - -#include -#include -#include - -namespace ARDOUR { - -class AutomationList; -class Session; -class Automatable; - - -/** A PBD:Controllable with associated automation data (AutomationList) - */ -class AutomationControl : public PBD::Controllable -{ -public: - AutomationControl(ARDOUR::Session&, - boost::shared_ptr, - std::string name="unnamed controllable"); - - void set_value(float val); - float get_value() const; - float user_value() const; - - void set_list(boost::shared_ptr); - - boost::shared_ptr list() { return _list; } - boost::shared_ptr list() const { return _list; } - - Parameter parameter() const; - -protected: - ARDOUR::Session& _session; - boost::shared_ptr _list; - float _user_value; -}; - - -} // namespace ARDOUR - -#endif /* __ardour_automation_control_h__ */ diff --git a/libs/ardour/ardour/automation_event.h b/libs/ardour/ardour/automation_event.h deleted file mode 100644 index 18190aa9b6..0000000000 --- a/libs/ardour/ardour/automation_event.h +++ /dev/null @@ -1,309 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_automation_event_h__ -#define __ardour_automation_event_h__ - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -namespace ARDOUR { - -class Curve; - -struct ControlEvent { - - ControlEvent (double w, double v) - : when (w), value (v), coeff (0) { - } - - ControlEvent (const ControlEvent& other) - : when (other.when), value (other.value), coeff (0) { - if (other.coeff) { - create_coeffs(); - for (size_t i=0; i < 4; ++i) - coeff[i] = other.coeff[i]; - } - } - - ~ControlEvent() { if (coeff) delete[] coeff; } - - void create_coeffs() { - if (!coeff) - coeff = new double[4]; - - coeff[0] = coeff[1] = coeff[2] = coeff[3] = 0.0; - } - - double when; - double value; - double* coeff; ///< double[4] allocated by Curve as needed -}; - -/* automation lists use a pool allocator that does not use a lock and - allocates 8k of new pointers at a time -*/ - -typedef boost::fast_pool_allocator ControlEventAllocator; - -class AutomationList : public PBD::StatefulDestructible -{ - public: - typedef std::list EventList; - typedef EventList::iterator iterator; - typedef EventList::reverse_iterator reverse_iterator; - typedef EventList::const_iterator const_iterator; - - AutomationList (Parameter id, double min_val, double max_val, double default_val); - AutomationList (const XMLNode&, Parameter id); - ~AutomationList(); - - AutomationList (const AutomationList&); - AutomationList (const AutomationList&, double start, double end); - AutomationList& operator= (const AutomationList&); - bool operator== (const AutomationList&); - - const Parameter& parameter() const { return _parameter; } - void set_parameter(Parameter p) { _parameter = p; } - - void freeze(); - void thaw (); - - EventList::size_type size() const { return _events.size(); } - bool empty() const { return _events.empty(); } - - void reset_default (double val) { - _default_value = val; - } - - void clear (); - void x_scale (double factor); - bool extend_to (double); - void slide (iterator before, double distance); - - void reposition_for_rt_add (double when); - void rt_add (double when, double value); - void add (double when, double value); - /* this should be private but old-school automation loading needs it in IO/IOProcessor */ - void fast_simple_add (double when, double value); - - void reset_range (double start, double end); - void erase_range (double start, double end); - void erase (iterator); - void erase (iterator, iterator); - void move_range (iterator start, iterator end, double, double); - void modify (iterator, double, double); - - AutomationList* cut (double, double); - AutomationList* copy (double, double); - void clear (double, double); - - AutomationList* cut (iterator, iterator); - AutomationList* copy (iterator, iterator); - void clear (iterator, iterator); - - bool paste (AutomationList&, double position, float times); - - void set_automation_state (AutoState); - AutoState automation_state() const { return _state; } - sigc::signal automation_style_changed; - - void set_automation_style (AutoStyle m); - AutoStyle automation_style() const { return _style; } - sigc::signal automation_state_changed; - - bool automation_playback() const { - return (_state & Play) || ((_state & Touch) && !_touching); - } - bool automation_write () const { - return (_state & Write) || ((_state & Touch) && _touching); - } - - void start_touch (); - void stop_touch (); - bool touching() const { return _touching; } - - void set_yrange (double min, double max) { - _min_yval = min; - _max_yval = max; - } - - double get_max_y() const { return _max_yval; } - double get_min_y() const { return _min_yval; } - - void truncate_end (double length); - void truncate_start (double length); - - iterator begin() { return _events.begin(); } - iterator end() { return _events.end(); } - - ControlEvent* back() { return _events.back(); } - ControlEvent* front() { return _events.front(); } - - const_iterator const_begin() const { return _events.begin(); } - const_iterator const_end() const { return _events.end(); } - - std::pair control_points_adjacent (double when); - - template void apply_to_points (T& obj, void (T::*method)(const AutomationList&)) { - Glib::Mutex::Lock lm (_lock); - (obj.*method)(*this); - } - - sigc::signal StateChanged; - - XMLNode& get_state(void); - int set_state (const XMLNode &s); - XMLNode& state (bool full); - XMLNode& serialize_events (); - - void set_max_xval (double); - double get_max_xval() const { return _max_xval; } - - double eval (double where) { - Glib::Mutex::Lock lm (_lock); - return unlocked_eval (where); - } - - double rt_safe_eval (double where, bool& ok) { - - Glib::Mutex::Lock lm (_lock, Glib::TRY_LOCK); - - if ((ok = lm.locked())) { - return unlocked_eval (where); - } else { - return 0.0; - } - } - - static inline bool time_comparator (const ControlEvent* a, const ControlEvent* b) { - return a->when < b->when; - } - - /** Lookup cache for eval functions, range contains equivalent values */ - struct LookupCache { - LookupCache() : left(-1) {} - double left; /* leftmost x coordinate used when finding "range" */ - std::pair range; - }; - - /** Lookup cache for point finding, range contains points between left and right */ - struct SearchCache { - SearchCache() : left(-1), right(-1) {} - double left; /* leftmost x coordinate used when finding "range" */ - double right; /* rightmost x coordinate used when finding "range" */ - std::pair range; - }; - - static sigc::signal AutomationListCreated; - - const EventList& events() const { return _events; } - double default_value() const { return _default_value; } - - // teeny const violations for Curve - mutable sigc::signal Dirty; - Glib::Mutex& lock() const { return _lock; } - LookupCache& lookup_cache() const { return _lookup_cache; } - SearchCache& search_cache() const { return _search_cache; } - - /** Called by locked entry point and various private - * locations where we already hold the lock. - * - * FIXME: Should this be private? Curve needs it.. - */ - double unlocked_eval (double x) const; - - bool rt_safe_earliest_event (double start, double end, double& x, double& y, bool start_inclusive=false) const; - bool rt_safe_earliest_event_unlocked (double start, double end, double& x, double& y, bool start_inclusive=false) const; - - Curve& curve() { return *_curve; } - const Curve& curve() const { return *_curve; } - - enum InterpolationStyle { - Discrete, - Linear, - Curved - }; - - InterpolationStyle interpolation() const { return _interpolation; } - void set_interpolation(InterpolationStyle style) { _interpolation = style; } - - private: - - /** Called by unlocked_eval() to handle cases of 3 or more control points. - */ - double multipoint_eval (double x) const; - - void build_search_cache_if_necessary(double start, double end) const; - - bool rt_safe_earliest_event_discrete_unlocked (double start, double end, double& x, double& y, bool inclusive) const; - bool rt_safe_earliest_event_linear_unlocked (double start, double end, double& x, double& y, bool inclusive) const; - - AutomationList* cut_copy_clear (double, double, int op); - - int deserialize_events (const XMLNode&); - - void maybe_signal_changed (); - void mark_dirty (); - void _x_scale (double factor); - - mutable LookupCache _lookup_cache; - mutable SearchCache _search_cache; - - Parameter _parameter; - InterpolationStyle _interpolation; - EventList _events; - mutable Glib::Mutex _lock; - int8_t _frozen; - bool _changed_when_thawed; - AutoState _state; - AutoStyle _style; - bool _touching; - bool _new_touch; - double _max_xval; - double _min_yval; - double _max_yval; - double _default_value; - bool _sort_pending; - iterator _rt_insertion_point; - double _rt_pos; - - Curve* _curve; -}; - -} // namespace - -#endif /* __ardour_automation_event_h__ */ diff --git a/libs/ardour/ardour/base_audio_port.h b/libs/ardour/ardour/base_audio_port.h deleted file mode 100644 index 791928fa03..0000000000 --- a/libs/ardour/ardour/base_audio_port.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_base_audio_port_h__ -#define __ardour_base_audio_port_h__ - -#include - -#include - -#include - -#include -#include -#include - -namespace ARDOUR { - -class AudioEngine; - -class BaseAudioPort : public virtual Port { - public: - virtual ~BaseAudioPort(); - - DataType type() const { return DataType::AUDIO; } - - virtual Buffer& get_buffer () { - assert (_buffer); - return *_buffer; - } - - virtual AudioBuffer& get_audio_buffer() { - assert (_buffer); - return *_buffer; - } - - void reset (); - - void reset_overs () { - /* XXX NOT THREAD SAFE */ - _short_overs = 0; - _long_overs = 0; - _overlen = 0; - } - - void reset_peak_meter () { - /* XXX NOT THREAD SAFE */ - _peak = 0; - } - - void reset_meters () { - /* XXX NOT THREAD SAFE */ - reset_peak_meter (); - reset_overs (); - } - - float peak_db() const { return _peak_db; } - Sample peak() const { return _peak; } - - uint32_t short_overs () const { return _short_overs; } - uint32_t long_overs () const { return _long_overs; } - - static void set_short_over_length (nframes_t); - static void set_long_over_length (nframes_t); - - void set_mixdown_function (void (*func)(const std::set&, AudioBuffer*, nframes_t, nframes_t, bool)); - - protected: - BaseAudioPort (const std::string& name, Flags flags); - - AudioBuffer* _buffer; - nframes_t _overlen; - Sample _peak; - float _peak_db; - uint32_t _short_overs; - uint32_t _long_overs; - bool _own_buffer; - - void (*_mixdown)(const std::set&, AudioBuffer*, nframes_t, nframes_t, bool); - - static void default_mixdown (const std::set&, AudioBuffer*, nframes_t, nframes_t, bool); - - static nframes_t _long_over_length; - static nframes_t _short_over_length; -}; - -} // namespace ARDOUR - -#endif /* __ardour_base_audio_port_h__ */ diff --git a/libs/ardour/ardour/base_midi_port.h b/libs/ardour/ardour/base_midi_port.h deleted file mode 100644 index 1c9a69d48d..0000000000 --- a/libs/ardour/ardour/base_midi_port.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_base_midi_port_h__ -#define __ardour_base_midi_port_h__ - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class MidiEngine; - -class BaseMidiPort : public virtual Port { - public: - virtual ~BaseMidiPort(); - - DataType type() const { return DataType::MIDI; } - - Buffer& get_buffer() { - assert (_buffer); - return *_buffer; - } - - MidiBuffer& get_midi_buffer() { - assert (_buffer); - return *_buffer; - } - - size_t capacity() { return _buffer->capacity(); } - size_t size() { return _buffer->size(); } - - void set_mixdown_function (void (*func)(const std::set&, MidiBuffer*, nframes_t, nframes_t, bool)); - - protected: - BaseMidiPort (const std::string& name, Flags); - - MidiBuffer* _buffer; - bool _own_buffer; - - void (*_mixdown)(const std::set&, MidiBuffer*, nframes_t, nframes_t, bool); - static void default_mixdown (const std::set&, MidiBuffer*, nframes_t, nframes_t, bool); -}; - -} // namespace ARDOUR - -#endif /* __ardour_base_midi_port_h__ */ diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h deleted file mode 100644 index fd94360226..0000000000 --- a/libs/ardour/ardour/buffer.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_buffer_h__ -#define __ardour_buffer_h__ - -#include -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - - -/** A buffer of recordable/playable data. - * - * This is a datatype-agnostic base class for all buffers (there are no - * methods to actually access the data). This provides a way for code that - * doesn't care about the data type to still deal with buffers (which is - * why the base class can't be a template). - * - * To actually read/write buffer contents, use the appropriate derived class. - */ -class Buffer : public boost::noncopyable -{ -public: - virtual ~Buffer() {} - - /** Factory function */ - static Buffer* create(DataType type, size_t capacity); - - /** Maximum capacity of buffer. - * Note in some cases the entire buffer may not contain valid data, use size. */ - size_t capacity() const { return _capacity; } - - /** Amount of valid data in buffer. Use this over capacity almost always. */ - size_t size() const { return _size; } - - /** Type of this buffer. - * Based on this you can static cast a Buffer* to the desired type. */ - DataType type() const { return _type; } - - bool silent() const { return _silent; } - - /** Reallocate the buffer used internally to handle at least @a size_t units of data. - * - * The buffer is not silent after this operation. the @a capacity argument - * passed to the constructor must have been non-zero. - */ - virtual void resize(size_t) = 0; - - /** Clear (eg zero, or empty) buffer starting at TIME @a offset */ - virtual void silence(nframes_t len, nframes_t offset=0) = 0; - - /** Clear the entire buffer */ - virtual void clear() { silence(_capacity, 0); } - - virtual void read_from(const Buffer& src, nframes_t offset, nframes_t len) = 0; - -protected: - Buffer(DataType type, size_t capacity) - : _type(type), _capacity(capacity), _size(0), _silent(true) - {} - - DataType _type; - size_t _capacity; - size_t _size; - bool _silent; -}; - - -} // namespace ARDOUR - -#endif // __ardour_buffer_h__ diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h deleted file mode 100644 index c750615798..0000000000 --- a/libs/ardour/ardour/buffer_set.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_buffer_set_h__ -#define __ardour_buffer_set_h__ - -#include -#include -#include -#include - -namespace ARDOUR { - -class Buffer; -class AudioBuffer; -class MidiBuffer; -class PortSet; - - -/** A set of buffers of various types. - * - * These are mainly accessed from Session and passed around as scratch buffers - * (eg as parameters to run() methods) to do in-place signal processing. - * - * There are two types of counts associated with a BufferSet - available, - * and the 'use count'. Available is the actual number of allocated buffers - * (and so is the maximum acceptable value for the use counts). - * - * The use counts are how things determine the form of their input and inform - * others the form of their output (eg what they did to the BufferSet). - * Setting the use counts is realtime safe. - */ -class BufferSet -{ -public: - BufferSet(); - ~BufferSet(); - - void clear(); - - void attach_buffers(PortSet& ports); - - void ensure_buffers(const ChanCount& count, size_t buffer_capacity); - void ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capacity); - - const ChanCount& available() const { return _available; } - ChanCount& available() { return _available; } - - const ChanCount& count() const { return _count; } - ChanCount& count() { return _count; } - - void set_count(const ChanCount& count) { _count = count; } - - size_t buffer_capacity(DataType type) const; - - Buffer& get(DataType type, size_t i) - { - assert(i <= _count.get(type)); - return *_buffers[type][i]; - } - - AudioBuffer& get_audio(size_t i) - { - return (AudioBuffer&)get(DataType::AUDIO, i); - } - - MidiBuffer& get_midi(size_t i) - { - return (MidiBuffer&)get(DataType::MIDI, i); - } - - void read_from(BufferSet& in, jack_nframes_t nframes, jack_nframes_t offset=0); - - // ITERATORS - - // FIXME: this is a filthy copy-and-paste mess - // FIXME: litter these with assertions - - class audio_iterator { - public: - - AudioBuffer& operator*() { return _set.get_audio(_index); } - AudioBuffer* operator->() { return &_set.get_audio(_index); } - audio_iterator& operator++() { ++_index; return *this; } // yes, prefix only - bool operator==(const audio_iterator& other) { return (_index == other._index); } - bool operator!=(const audio_iterator& other) { return (_index != other._index); } - - private: - friend class BufferSet; - - audio_iterator(BufferSet& list, size_t index) : _set(list), _index(index) {} - - BufferSet& _set; - size_t _index; - }; - - audio_iterator audio_begin() { return audio_iterator(*this, 0); } - audio_iterator audio_end() { return audio_iterator(*this, _count.n_audio()); } - - class iterator { - public: - - Buffer& operator*() { return _set.get(_type, _index); } - Buffer* operator->() { return &_set.get(_type, _index); } - iterator& operator++() { ++_index; return *this; } // yes, prefix only - bool operator==(const iterator& other) { return (_index == other._index); } - bool operator!=(const iterator& other) { return (_index != other._index); } - iterator operator=(const iterator& other) { _set = other._set; _type = other._type; _index = other._index; return *this; } - - private: - friend class BufferSet; - - iterator(BufferSet& list, DataType type, size_t index) - : _set(list), _type(type), _index(index) {} - - BufferSet& _set; - DataType _type; - size_t _index; - }; - - iterator begin(DataType type) { return iterator(*this, type, 0); } - iterator end(DataType type) { return iterator(*this, type, _count.get(type)); } - - -private: - typedef std::vector BufferVec; - - /// Vector of vectors, indexed by DataType - std::vector _buffers; - - /// Use counts (there may be more actual buffers than this) - ChanCount _count; - - /// Available counts (number of buffers actually allocated) - ChanCount _available; - - /// Whether we (don't) 'own' the contained buffers (otherwise we mirror a PortSet) - bool _is_mirror; -}; - - -} // namespace ARDOUR - -#endif // __ardour_buffer_set_h__ diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h deleted file mode 100644 index ba92063b30..0000000000 --- a/libs/ardour/ardour/bundle.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_bundle_h__ -#define __ardour_bundle_h__ - -#include -#include -#include "ardour/data_type.h" - -namespace ARDOUR { - -typedef std::vector PortList; - -/** - * A set of `channels', each of which is associated with 0 or more JACK ports. - */ - -class Bundle { - public: - Bundle () : _type (DataType::AUDIO) {} - Bundle (bool i) : _type (DataType::AUDIO), _ports_are_inputs (i) {} - Bundle (std::string const & n, bool i = true) : _name (n), _type (DataType::AUDIO), _ports_are_inputs (i) {} - virtual ~Bundle() {} - - /** - * @return Number of channels that this Bundle has. - */ - virtual uint32_t nchannels () const = 0; - virtual const PortList& channel_ports (uint32_t) const = 0; - - void set_name (std::string const & n) { - _name = n; - NameChanged (); - } - - std::string name () const { return _name; } - - sigc::signal NameChanged; - - void set_type (DataType t) { _type = t; } - DataType type () const { return _type; } - - void set_ports_are_inputs () { _ports_are_inputs = true; } - void set_ports_are_outputs () { _ports_are_inputs = false; } - bool ports_are_inputs () const { return _ports_are_inputs; } - bool ports_are_outputs () const { return !_ports_are_inputs; } - - private: - std::string _name; - ARDOUR::DataType _type; - bool _ports_are_inputs; -}; - -} - -#endif /* __ardour_bundle_h__ */ diff --git a/libs/ardour/ardour/caimportable.h b/libs/ardour/ardour/caimportable.h deleted file mode 100644 index dc7f5769ae..0000000000 --- a/libs/ardour/ardour/caimportable.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_ca_importable_source_h__ -#define __ardour_ca_importable_source_h__ - -#include -#include -#include - -#include - -namespace ARDOUR { - -class CAImportableSource : public ImportableSource { - public: - CAImportableSource (const std::string& path); - virtual ~CAImportableSource(); - - nframes_t read (Sample* buffer, nframes_t nframes); - uint32_t channels() const; - nframes_t length() const; - nframes_t samplerate() const; - void seek (nframes_t pos); - - protected: - mutable CAAudioFile af; -}; - -} - -#endif /* __ardour_ca_importable_source_h__ */ diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h deleted file mode 100644 index 986ef76e25..0000000000 --- a/libs/ardour/ardour/chan_count.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_chan_count_h__ -#define __ardour_chan_count_h__ - -#include -#include - -namespace ARDOUR { - - -/** A count of channels, possibly with many types. - * - * Operators are defined so this may safely be used as if it were a simple - * (single-typed) integer count of channels. - */ -class ChanCount { -public: - ChanCount() { reset(); } - - // Convenience constructor for making single-typed streams (stereo, mono, etc) - ChanCount(DataType type, uint32_t channels) - { - reset(); - set(type, channels); - } - - void reset() - { - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - _counts[*t] = 0; - } - } - - void set(DataType t, uint32_t count) { assert(t != DataType::NIL); _counts[t] = count; } - uint32_t get(DataType t) const { assert(t != DataType::NIL); return _counts[t]; } - - inline uint32_t n_audio() const { return _counts[DataType::AUDIO]; } - inline void set_audio(uint32_t a) { _counts[DataType::AUDIO] = a; } - - inline uint32_t n_midi() const { return _counts[DataType::MIDI]; } - inline void set_midi(uint32_t m) { _counts[DataType::MIDI] = m; } - - uint32_t n_total() const - { - uint32_t ret = 0; - for (uint32_t i=0; i < DataType::num_types; ++i) - ret += _counts[i]; - - return ret; - } - - bool operator==(const ChanCount& other) const - { - for (uint32_t i=0; i < DataType::num_types; ++i) - if (_counts[i] != other._counts[i]) - return false; - - return true; - } - - bool operator!=(const ChanCount& other) const - { - return ! (*this == other); - } - - bool operator<(const ChanCount& other) const - { - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - if (_counts[*t] > other._counts[*t]) { - return false; - } - } - return (*this != other); - } - - bool operator<=(const ChanCount& other) const - { - return ( (*this < other) || (*this == other) ); - } - - bool operator>(const ChanCount& other) const - { - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - if (_counts[*t] < other._counts[*t]) { - return false; - } - } - return (*this != other); - } - - bool operator>=(const ChanCount& other) const - { - return ( (*this > other) || (*this == other) ); - } - - static const ChanCount INFINITE; - static const ChanCount ZERO; - -private: - - uint32_t _counts[DataType::num_types]; -}; - - -} // namespace ARDOUR - -#endif // __ardour_chan_count_h__ - diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h deleted file mode 100644 index 60499b98da..0000000000 --- a/libs/ardour/ardour/click.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_click_h__ -#define __ardour_click_h__ - -#include - -namespace ARDOUR { - -class ClickIO : public IO -{ - public: - ClickIO (Session& s, const string& name, - - int input_min = -1, int input_max = -1, - - int output_min = -1, int output_max = -1) - : IO (s, name, input_min, input_max, output_min, output_max) {} - - ~ClickIO() {} - - protected: - uint32_t pans_required () const { return 1; } -}; - -}; /* namespace ARDOUR */ - -#endif /*__ardour_click_h__ */ diff --git a/libs/ardour/ardour/configuration.h b/libs/ardour/ardour/configuration.h deleted file mode 100644 index 7b890500d8..0000000000 --- a/libs/ardour/ardour/configuration.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (C) 1999 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_configuration_h__ -#define __ardour_configuration_h__ - -#include -#include - -#include -#include - -#include - -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Configuration : public PBD::Stateful -{ - public: - Configuration(); - virtual ~Configuration(); - - std::map midi_ports; - - void map_parameters (sigc::slot theSlot); - - int load_state (); - int save_state (); - - /// calls Stateful::*instant_xml methods using - /// ARDOUR::user_config_directory for the directory argument - void add_instant_xml (XMLNode&); - XMLNode * instant_xml (const std::string& str); - - int set_state (const XMLNode&); - XMLNode& get_state (void); - XMLNode& get_variables (sigc::slot, std::string which_node = "Config"); - void set_variables (const XMLNode&, ConfigVariableBase::Owner owner); - - void set_current_owner (ConfigVariableBase::Owner); - - XMLNode* control_protocol_state () { return _control_protocol_state; } - - sigc::signal ParameterChanged; - - /* define accessor methods */ - -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(Type,var,name,value) \ - Type get_##var () const { return var.get(); } \ - bool set_##var (Type val) { bool ret = var.set (val, current_owner); if (ret) { ParameterChanged (name); } return ret; } -#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \ - Type get_##var () const { return var.get(); } \ - bool set_##var (Type val) { bool ret = var.set (val, current_owner); if (ret) { ParameterChanged (name); } return ret; } -#include "ardour/configuration_vars.h" -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL - - private: - - /* declare variables */ - -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(Type,var,name,value) ConfigVariable var; -#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) ConfigVariableWithMutation var; -#include "ardour/configuration_vars.h" -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL - - ConfigVariableBase::Owner current_owner; - XMLNode* _control_protocol_state; - - XMLNode& state (sigc::slot); - bool save_config_options_predicate (ConfigVariableBase::Owner owner); -}; - -extern Configuration *Config; -extern gain_t speed_quietning; /* see comment in configuration.cc */ - -} // namespace ARDOUR - -#endif /* __ardour_configuration_h__ */ diff --git a/libs/ardour/ardour/configuration_variable.h b/libs/ardour/ardour/configuration_variable.h deleted file mode 100644 index a61283ecd0..0000000000 --- a/libs/ardour/ardour/configuration_variable.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_configuration_variable_h__ -#define __ardour_configuration_variable_h__ - -#include -#include -#include - -#include - -namespace ARDOUR { - -class ConfigVariableBase { - public: - enum Owner { - Default = 0x1, - System = 0x2, - Config = 0x4, - Session = 0x8, - Interface = 0x10 - }; - - ConfigVariableBase (std::string str) : _name (str), _owner (Default) {} - virtual ~ConfigVariableBase() {} - - std::string name() const { return _name; } - Owner owner() const { return _owner; } - - virtual void add_to_node (XMLNode& node) = 0; - virtual bool set_from_node (const XMLNode& node, Owner owner) = 0; - - void show_stored_value (const std::string&); - static void set_show_stored_values (bool yn); - - protected: - std::string _name; - Owner _owner; - static bool show_stores; - - void notify (); - void miss (); -}; - -template -class ConfigVariable : public ConfigVariableBase -{ - public: - ConfigVariable (std::string str) : ConfigVariableBase (str) {} - ConfigVariable (std::string str, T val) : ConfigVariableBase (str), value (val) {} - - virtual bool set (T val, Owner owner = ARDOUR::ConfigVariableBase::Config) { - if (val == value) { - miss (); - return false; - } - value = val; - _owner = (ConfigVariableBase::Owner)(_owner |owner); - notify (); - return true; - } - - T get() const { - return value; - } - - void add_to_node (XMLNode& node) { - std::stringstream ss; - ss << value; - show_stored_value (ss.str()); - XMLNode* child = new XMLNode ("Option"); - child->add_property ("name", _name); - child->add_property ("value", ss.str()); - node.add_child_nocopy (*child); - } - - bool set_from_node (const XMLNode& node, Owner owner) { - - if (node.name() == "Config") { - - /* ardour.rc */ - - const XMLProperty* prop; - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLNode* child; - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - child = *niter; - - if (child->name() == "Option") { - if ((prop = child->property ("name")) != 0) { - if (prop->value() == _name) { - if ((prop = child->property ("value")) != 0) { - std::stringstream ss; - ss << prop->value(); - ss >> value; - _owner = (ConfigVariableBase::Owner)(_owner |owner); - return true; - } - } - } - } - } - - } else if (node.name() == "Options") { - - /* session file */ - - XMLNodeList olist; - XMLNodeConstIterator oiter; - XMLNode* option; - const XMLProperty* opt_prop; - - olist = node.children(); - - for (oiter = olist.begin(); oiter != olist.end(); ++oiter) { - - option = *oiter; - - if (option->name() == _name) { - if ((opt_prop = option->property ("val")) != 0) { - std::stringstream ss; - ss << opt_prop->value(); - ss >> value; - _owner = (ConfigVariableBase::Owner)(_owner |owner); - return true; - } - } - } - } - - return false; - } - - protected: - virtual T get_for_save() { return value; } - T value; -}; - -template -class ConfigVariableWithMutation : public ConfigVariable -{ - public: - ConfigVariableWithMutation (std::string name, T val, T (*m)(T)) - : ConfigVariable (name, val), mutator (m) {} - - bool set (T val, ConfigVariableBase::Owner owner) { - if (unmutated_value != val) { - unmutated_value = val; - return ConfigVariable::set (mutator (val), owner); - } - return false; - } - - protected: - virtual T get_for_save() { return unmutated_value; } - T unmutated_value; - T (*mutator)(T); -}; - -} - -#endif /* __ardour_configuration_variable_h__ */ diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h deleted file mode 100644 index 4e2a14c07b..0000000000 --- a/libs/ardour/ardour/configuration_vars.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -/* IO connection */ - -CONFIG_VARIABLE (AutoConnectOption, output_auto_connect, "output-auto-connect", AutoConnectOption (0)) -CONFIG_VARIABLE (AutoConnectOption, input_auto_connect, "input-auto-connect", AutoConnectOption (0)) - -CONFIG_VARIABLE (std::string, auditioner_output_left, "auditioner-output-left", "default") -CONFIG_VARIABLE (std::string, auditioner_output_right, "auditioner-output-right", "default") - -/* MIDI and MIDI related */ - -CONFIG_VARIABLE (std::string, mtc_port_name, "mtc-port-name", "default") -CONFIG_VARIABLE (std::string, mmc_port_name, "mmc-port-name", "default") -CONFIG_VARIABLE (std::string, midi_port_name, "midi-port-name", "default") -CONFIG_VARIABLE (bool, trace_midi_input, "trace-midi-input", false) -CONFIG_VARIABLE (bool, trace_midi_output, "trace-midi-output", false) -CONFIG_VARIABLE (bool, send_mtc, "send-mtc", false) -CONFIG_VARIABLE (bool, send_mmc, "send-mmc", true) -CONFIG_VARIABLE (bool, mmc_control, "mmc-control", true) -CONFIG_VARIABLE (bool, midi_feedback, "midi-feedback", false) -CONFIG_VARIABLE (uint8_t, mmc_receive_device_id, "mmc-receive-device-id", 0) -CONFIG_VARIABLE (uint8_t, mmc_send_device_id, "mmc-send-device-id", 0) - -/* control surfaces */ - -CONFIG_VARIABLE (uint32_t, feedback_interval_ms, "feedback-interval-ms", 100) -CONFIG_VARIABLE (bool, use_tranzport, "use-tranzport", false) -CONFIG_VARIABLE (std::string, mackie_emulation, "mackie-emulation", "mcu") -CONFIG_VARIABLE (RemoteModel, remote_model, "remote-model", MixerOrdered) - -/* disk operations */ - -CONFIG_VARIABLE (uint32_t, minimum_disk_io_bytes, "minimum-disk-io-bytes", 1024 * 256) -CONFIG_VARIABLE (float, audio_track_buffer_seconds, "track-buffer-seconds", 5.0) -CONFIG_VARIABLE (float, midi_track_buffer_seconds, "midi-track-buffer-seconds", 1.0) -CONFIG_VARIABLE (uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000) -CONFIG_VARIABLE (SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat) -CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE) -CONFIG_VARIABLE (bool, auto_analyse_audio, "auto-analyse-audio", false) - -/* OSC */ - -CONFIG_VARIABLE (uint32_t, osc_port, "osc-port", 3819) -CONFIG_VARIABLE (bool, use_osc, "use-osc", false) - -/* crossfades */ - -CONFIG_VARIABLE (CrossfadeModel, xfade_model, "xfade-model", FullCrossfade) -CONFIG_VARIABLE (bool, auto_xfade, "auto-xfade", true) -CONFIG_VARIABLE (float, short_xfade_seconds, "short-xfade-seconds", 0.015) -CONFIG_VARIABLE (bool, xfades_active, "xfades-active", true) -CONFIG_VARIABLE (bool, xfades_visible, "xfades-visible", true) -CONFIG_VARIABLE (uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2) - -/* editing related */ - -CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide) -CONFIG_VARIABLE (LayerModel, layer_model, "layer-model", MoveAddHigher) -CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false) -CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi") - -/* monitoring, mute, solo etc */ - -CONFIG_VARIABLE (bool, mute_affects_pre_fader, "mute-affects-pre-fader", true) -CONFIG_VARIABLE (bool, mute_affects_post_fader, "mute-affects-post-fader", true) -CONFIG_VARIABLE (bool, mute_affects_control_outs, "mute-affects-control-outs", true) -CONFIG_VARIABLE (bool, mute_affects_main_outs, "mute-affects-main-outs", true) -CONFIG_VARIABLE (MonitorModel, monitoring_model, "monitoring-model", ExternalMonitoring) -CONFIG_VARIABLE (SoloModel, solo_model, "solo-model", InverseMute) -CONFIG_VARIABLE (bool, solo_latched, "solo-latched", true) -CONFIG_VARIABLE (bool, latched_record_enable, "latched-record-enable", false) -CONFIG_VARIABLE (bool, all_safe, "all-safe", false) -CONFIG_VARIABLE (bool, show_solo_mutes, "show-solo-mutes", false) -CONFIG_VARIABLE (bool, tape_machine_mode, "tape-machine-mode", false) - -/* click */ - -CONFIG_VARIABLE (bool, clicking, "clicking", false) -CONFIG_VARIABLE (std::string, click_sound, "click-sound", "") -CONFIG_VARIABLE (std::string, click_emphasis_sound, "click-emphasis-sound", "") - -/* transport control and related */ - -CONFIG_VARIABLE (bool, auto_play, "auto-play", false) -CONFIG_VARIABLE (bool, auto_return, "auto-return", false) -CONFIG_VARIABLE (bool, auto_input, "auto-input", true) -CONFIG_VARIABLE (bool, punch_in, "punch-in", false) -CONFIG_VARIABLE (bool, punch_out, "punch-out", false) -CONFIG_VARIABLE (bool, plugins_stop_with_transport, "plugins-stop-with-transport", false) -CONFIG_VARIABLE (bool, do_not_record_plugins, "do-not-record-plugins", false) -CONFIG_VARIABLE (bool, stop_recording_on_xrun, "stop-recording-on-xrun", false) -CONFIG_VARIABLE (bool, create_xrun_marker, "create-xrun-marker", true) -CONFIG_VARIABLE (bool, stop_at_session_end, "stop-at-session-end", true) -CONFIG_VARIABLE (bool, seamless_loop, "seamless-loop", false) -CONFIG_VARIABLE (nframes_t, preroll, "preroll", 0) -CONFIG_VARIABLE (nframes_t, postroll, "postroll", 0) -CONFIG_VARIABLE (float, rf_speed, "rf-speed", 2.0f) -CONFIG_VARIABLE (float, shuttle_speed_factor, "shuttle-speed-factor", 1.0f) -CONFIG_VARIABLE (float, shuttle_speed_threshold, "shuttle-speed-threshold", 5.0f) -CONFIG_VARIABLE (SlaveSource, slave_source, "slave-source", None) -CONFIG_VARIABLE (ShuttleBehaviour, shuttle_behaviour, "shuttle-behaviour", Sprung) -CONFIG_VARIABLE (ShuttleUnits, shuttle_units, "shuttle-units", Percentage) -CONFIG_VARIABLE (bool, quieten_at_speed, "quieten-at-speed", true) -CONFIG_VARIABLE (bool, primary_clock_delta_edit_cursor, "primary-clock-delta-edit-cursor", false) -CONFIG_VARIABLE (bool, secondary_clock_delta_edit_cursor, "secondary-clock-delta-edit-cursor", false) -CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true) - -/* timecode and sync */ - -CONFIG_VARIABLE (bool, jack_time_master, "jack-time-master", true) -CONFIG_VARIABLE (SmpteFormat, smpte_format, "smpte-format", smpte_30) -CONFIG_VARIABLE (bool, use_video_sync, "use-video-sync", false) -CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", true) -CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f) - -/* metering */ - -CONFIG_VARIABLE (float, meter_hold, "meter-hold", 100.0f) -CONFIG_VARIABLE (float, meter_falloff, "meter-falloff", 27.0f) -CONFIG_VARIABLE (nframes_t, over_length_short, "over-length-short", 2) -CONFIG_VARIABLE (nframes_t, over_length_long, "over-length-long", 10) - -/* miscellany */ - -CONFIG_VARIABLE (bool, hiding_groups_deactivates_groups, "hiding-groups-deactivates-groups", true) -CONFIG_VARIABLE (bool, verify_remove_last_capture, "verify-remove-last-capture", true) -CONFIG_VARIABLE (bool, no_new_session_dialog, "no-new-session-dialog", false) -CONFIG_VARIABLE (bool, use_vst, "use-vst", true) -CONFIG_VARIABLE (uint32_t, subframes_per_frame, "subframes-per-frame", 100) -CONFIG_VARIABLE (bool, save_history, "save-history", true) -CONFIG_VARIABLE (int32_t, saved_history_depth, "save-history-depth", 20) -CONFIG_VARIABLE (int32_t, history_depth, "history-depth", 20) -CONFIG_VARIABLE (bool, use_overlap_equivalency, "use-overlap-equivalency", false) -CONFIG_VARIABLE (bool, periodic_safety_backups, "periodic-safety-backups", true) -CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-backup-interval", 120) -CONFIG_VARIABLE (float, automation_interval, "automation-interval", 50) -CONFIG_VARIABLE (bool, sync_all_route_ordering, "sync-all-route-ordering", true) -CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", true) -CONFIG_VARIABLE (std::string, keyboard_layout, "keyboard-layout", "ansi") -CONFIG_VARIABLE (std::string, default_bindings, "default-bindings", "ardour") -CONFIG_VARIABLE (bool, default_narrow_ms, "default-narrow_ms", false) -CONFIG_VARIABLE (bool, rubberbanding_snaps_to_grid, "rubberbanding-snaps-to-grid", false) -CONFIG_VARIABLE (long, font_scale, "font-scale", 102400) - -/* denormal management */ - -CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false) -CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone) - -/* BWAV */ - -CONFIG_VARIABLE (string, bwf_country_code, "bwf-country-code", "US") -CONFIG_VARIABLE (string, bwf_organization_code, "bwf-organization-code", "US") - -/* these variables have custom set() methods (e.g. path globbing) */ - -CONFIG_VARIABLE_SPECIAL(Glib::ustring, raid_path, "raid-path", "", path_expand) - diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h deleted file mode 100644 index c61513e117..0000000000 --- a/libs/ardour/ardour/control_protocol_manager.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef ardour_control_protocol_manager_h -#define ardour_control_protocol_manager_h - -#include -#include - -#include - -#include - -#include - -namespace ARDOUR { - -class ControlProtocol; -class ControlProtocolDescriptor; -class Session; - -struct ControlProtocolInfo { - ControlProtocolDescriptor* descriptor; - ControlProtocol* protocol; - std::string name; - std::string path; - bool requested; - bool mandatory; - bool supports_feedback; - XMLNode* state; - - ControlProtocolInfo() : descriptor (0), protocol (0), state (0) {} - ~ControlProtocolInfo() { if (state) { delete state; } } -}; - - class ControlProtocolManager : public sigc::trackable, public PBD::Stateful -{ - public: - ControlProtocolManager (); - ~ControlProtocolManager (); - - static ControlProtocolManager& instance() { return *_instance; } - - void set_session (Session&); - void discover_control_protocols (); - void foreach_known_protocol (sigc::slot); - void load_mandatory_protocols (); - - ControlProtocol* instantiate (ControlProtocolInfo&); - int teardown (ControlProtocolInfo&); - - std::list control_protocol_info; - - static const std::string state_node_name; - - void set_protocol_states (const XMLNode&); - - int set_state (const XMLNode&); - XMLNode& get_state (void); - - private: - static ControlProtocolManager* _instance; - - Session* _session; - Glib::Mutex protocols_lock; - std::list control_protocols; - - void drop_session (); - - int control_protocol_discover (std::string path); - ControlProtocolDescriptor* get_descriptor (std::string path); - ControlProtocolInfo* cpi_by_name (std::string); -}; - -} // namespace - -#endif // ardour_control_protocol_manager_h diff --git a/libs/ardour/ardour/control_protocol_search_path.h b/libs/ardour/ardour/control_protocol_search_path.h deleted file mode 100644 index f9a8103c0c..0000000000 --- a/libs/ardour/ardour/control_protocol_search_path.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef ARDOUR_CONTROL_PROTOCOL_SEARCH_PATH_INCLUDED -#define ARDOUR_CONTROL_PROTOCOL_SEARCH_PATH_INCLUDED - -#include - -namespace ARDOUR { - - using PBD::SearchPath; - - /** - * return a SearchPath containing directories in which to look for - * control surface plugins. - * - * If ARDOUR_SURFACES_PATH is defined then the SearchPath returned - * will contain only those directories specified in it, otherwise it will - * contain the user and system directories which may contain control - * surface plugins. - */ - SearchPath control_protocol_search_path (); - -} // namespace ARDOUR - -#endif diff --git a/libs/ardour/ardour/coreaudiosource.h b/libs/ardour/ardour/coreaudiosource.h deleted file mode 100644 index d7282b35bd..0000000000 --- a/libs/ardour/ardour/coreaudiosource.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __coreaudio_source_h__ -#define __coreaudio_source_h__ - -#include -#include - -namespace ARDOUR { - -class CoreAudioSource : public AudioFileSource { - public: - CoreAudioSource (ARDOUR::Session&, const XMLNode&); - CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag); - ~CoreAudioSource (); - - float sample_rate() const; - int update_header (nframes_t when, struct tm&, time_t); - - int flush_header () {return 0;}; - void set_header_timeline_position () {}; - - static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg); - - protected: - nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const; - nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; } - - private: - mutable CAAudioFile af; - uint16_t n_channels; - - void init (); - int safe_read (Sample*, nframes_t start, nframes_t cnt, AudioBufferList&) const; -}; - -}; /* namespace ARDOUR */ - -#endif /* __coreaudio_source_h__ */ - diff --git a/libs/ardour/ardour/crossfade.h b/libs/ardour/ardour/crossfade.h deleted file mode 100644 index 9ba3689e82..0000000000 --- a/libs/ardour/ardour/crossfade.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_overlap_h__ -#define __ardour_overlap_h__ - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -namespace ARDOUR { - -class AudioRegion; -class Playlist; - -class Crossfade : public ARDOUR::AudioRegion -{ - public: - - class NoCrossfadeHere: std::exception { - public: - virtual const char *what() const throw() { return "no crossfade should be constructed here"; } - }; - - /* constructor for "fixed" xfades at each end of an internal overlap */ - - Crossfade (boost::shared_ptr in, boost::shared_ptr out, - nframes_t position, - nframes_t initial_length, - AnchorPoint); - - /* constructor for xfade between two regions that are overlapped in any way - except the "internal" case. - */ - - Crossfade (boost::shared_ptr in, boost::shared_ptr out, CrossfadeModel, bool active); - - - /* copy constructor to copy a crossfade with new regions. used (for example) - when a playlist copy is made - */ - Crossfade (boost::shared_ptr, boost::shared_ptr, boost::shared_ptr); - - /* the usual XML constructor */ - - Crossfade (const Playlist&, XMLNode&); - virtual ~Crossfade(); - - bool operator== (const ARDOUR::Crossfade&); - - XMLNode& get_state (void); - int set_state (const XMLNode&); - - boost::shared_ptr in() const { return _in; } - boost::shared_ptr out() const { return _out; } - - nframes_t read_at (Sample *buf, Sample *mixdown_buffer, - float *gain_buffer, nframes_t position, nframes_t cnt, - uint32_t chan_n, - nframes_t read_frames = 0, - nframes_t skip_frames = 0) const; - - bool refresh (); - - uint32_t upper_layer () const { - return std::max (_in->layer(), _out->layer()); - } - - uint32_t lower_layer () const { - return std::min (_in->layer(), _out->layer()); - } - - bool involves (boost::shared_ptr region) const { - return _in == region || _out == region; - } - - bool involves (boost::shared_ptr a, boost::shared_ptr b) const { - return (_in == a && _out == b) || (_in == b && _out == a); - } - - nframes_t overlap_length() const; - - void invalidate(); - - sigc::signal > Invalidated; - sigc::signal StateChanged; - - bool covers (nframes_t frame) const { - return _position <= frame && frame < _position + _length; - } - - OverlapType coverage (nframes_t start, nframes_t end) const; - - static void set_buffer_size (nframes_t); - - bool active () const { return _active; } - void set_active (bool yn); - - bool following_overlap() const { return _follow_overlap; } - bool can_follow_overlap() const; - void set_follow_overlap (bool yn); - - AutomationList& fade_in() { return _fade_in; } - AutomationList& fade_out() { return _fade_out; } - - nframes_t set_length (nframes_t); - - bool is_dependent() const { return true; } - bool depends_on (boost::shared_ptr other) const { - return other == _in || other == _out; - } - - static nframes_t short_xfade_length() { return _short_xfade_length; } - static void set_short_xfade_length (nframes_t n); - - static Change ActiveChanged; - static Change FollowOverlapChanged; - - private: - friend struct CrossfadeComparePtr; - friend class AudioPlaylist; - - static nframes_t _short_xfade_length; - - boost::shared_ptr _in; - boost::shared_ptr _out; - bool _active; - bool _in_update; - OverlapType overlap_type; - AnchorPoint _anchor_point; - bool _follow_overlap; - bool _fixed; - int32_t layer_relation; - - - mutable AutomationList _fade_in; - mutable AutomationList _fade_out; - - static Sample* crossfade_buffer_out; - static Sample* crossfade_buffer_in; - - void initialize (); - int compute (boost::shared_ptr, boost::shared_ptr, CrossfadeModel); - bool update (); - - protected: - nframes_t read_raw_internal (Sample*, nframes_t, nframes_t) const; -}; - - -} // namespace ARDOUR - -#endif /* __ardour_overlap_h__ */ diff --git a/libs/ardour/ardour/crossfade_compare.h b/libs/ardour/ardour/crossfade_compare.h deleted file mode 100644 index b92806a6bb..0000000000 --- a/libs/ardour/ardour/crossfade_compare.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_crossfade_compare_h__ -#define __ardour_crossfade_compare_h__ - -/* this exists so that playlist.h doesn't have to include crossfade.h - */ - -namespace ARDOUR { - -class Crossfade; - -struct CrossfadeComparePtr { - bool operator() (const Crossfade *a, const Crossfade *b) const; -}; - -enum AnchorPoint { - StartOfIn, - EndOfIn, - EndOfOut -}; - -} - -#endif /* __ardour_crossfade_compare_h__ */ diff --git a/libs/ardour/ardour/curve.h b/libs/ardour/ardour/curve.h deleted file mode 100644 index 433b00a270..0000000000 --- a/libs/ardour/ardour/curve.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2001-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_curve_h__ -#define __ardour_curve_h__ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Curve : public boost::noncopyable -{ - public: - Curve (const AutomationList& al); - - bool rt_safe_get_vector (double x0, double x1, float *arg, int32_t veclen); - void get_vector (double x0, double x1, float *arg, int32_t veclen); - - void solve (); - - private: - double unlocked_eval (double where); - double multipoint_eval (double x); - - void _get_vector (double x0, double x1, float *arg, int32_t veclen); - - void on_list_dirty() { _dirty = true; } - - bool _dirty; - const AutomationList& _list; -}; - -} // namespace ARDOUR - -extern "C" { - void curve_get_vector_from_c (void *arg, double, double, float*, int32_t); -} - -#endif /* __ardour_curve_h__ */ diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h deleted file mode 100644 index 4e1a50e602..0000000000 --- a/libs/ardour/ardour/cycle_timer.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_cycle_timer_h__ -#define __ardour_cycle_timer_h__ - -#include -#include - -#include - -class CycleTimer { - private: - static float cycles_per_usec; - cycles_t _entry; - cycles_t _exit; - std::string _name; - - public: - CycleTimer(std::string name) : _name (name){ - if (cycles_per_usec == 0) { - cycles_per_usec = get_mhz (); - } - _entry = get_cycles(); - } - ~CycleTimer() { - _exit = get_cycles(); - std::cerr << _name << ": " << (float) (_exit - _entry) / cycles_per_usec << " (" << _entry << ", " << _exit << ')' << endl; - } - - static float get_mhz (); -}; - -#endif /* __ardour_cycle_timer_h__ */ diff --git a/libs/ardour/ardour/cycles.h b/libs/ardour/ardour/cycles.h deleted file mode 100644 index 0d1ac154dd..0000000000 --- a/libs/ardour/ardour/cycles.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - Code derived from various headers from the Linux kernel - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_cycles_h__ -#define __ardour_cycles_h__ - -#include - -#if defined(__i386__) || defined(__x86_64__) - -/* - * Standard way to access the cycle counter on i586+ CPUs. - * Currently only used on SMP. - * - * If you really have a SMP machine with i486 chips or older, - * compile for that, and this will just always return zero. - * That's ok, it just means that the nicer scheduling heuristics - * won't work for you. - * - * We only use the low 32 bits, and we'd simply better make sure - * that we reschedule before that wraps. Scheduling at least every - * four billion cycles just basically sounds like a good idea, - * regardless of how fast the machine is. - */ -typedef uint64_t cycles_t; - -extern cycles_t cacheflush_time; - -#define rdtscll(val) \ - __asm__ __volatile__("rdtsc" : "=A" (val)) - -static inline cycles_t get_cycles (void) -{ - uint32_t long ret; - - rdtscll(ret); - return ret; -} - -#elif defined(__powerpc__) - -#define CPU_FTR_601 0x00000100 - -typedef uint32_t cycles_t; - -/* - * For the "cycle" counter we use the timebase lower half. - * Currently only used on SMP. - */ - -extern cycles_t cacheflush_time; - -static inline cycles_t get_cycles(void) -{ - cycles_t ret = 0; - - __asm__ __volatile__( - "98: mftb %0\n" - "99:\n" - ".section __ftr_fixup,\"a\"\n" - " .long %1\n" - " .long 0\n" - " .long 98b\n" - " .long 99b\n" - ".previous" - : "=r" (ret) : "i" (CPU_FTR_601)); - return ret; -} - -#elif defined(__ia64__) -/* ia64 */ - -typedef uint32_t cycles_t; -static inline cycles_t -get_cycles (void) -{ - cycles_t ret; - __asm__ __volatile__ ("mov %0=ar.itc" : "=r"(ret)); - return ret; -} - -#elif defined(__alpha__) -/* alpha */ - -/* - * Standard way to access the cycle counter. - * Currently only used on SMP for scheduling. - * - * Only the low 32 bits are available as a continuously counting entity. - * But this only means we'll force a reschedule every 8 seconds or so, - * which isn't an evil thing. - */ - -typedef uint32_t cycles_t; -static inline cycles_t get_cycles (void) -{ - cycles_t ret; - __asm__ __volatile__ ("rpcc %0" : "=r"(ret)); - return ret; -} - -#elif defined(__s390__) -/* s390 */ - -typedef uint32_t long cycles_t; -static inline cycles_t get_cycles(void) -{ - cycles_t cycles; - __asm__("stck 0(%0)" : : "a" (&(cycles)) : "memory", "cc"); - return cycles >> 2; -} - -#elif defined(__hppa__) -/* hppa/parisc */ - -#define mfctl(reg) ({ \ - uint32_t cr; \ - __asm__ __volatile__( \ - "mfctl " #reg ",%0" : \ - "=r" (cr) \ - ); \ - cr; \ -}) - -typedef uint32_t cycles_t; -static inline cycles_t get_cycles (void) -{ - return mfctl(16); -} - -#elif defined(__mips__) -/* mips/mipsel */ - -/* - * Standard way to access the cycle counter. - * Currently only used on SMP for scheduling. - * - * Only the low 32 bits are available as a continuously counting entity. - * But this only means we'll force a reschedule every 8 seconds or so, - * which isn't an evil thing. - * - * We know that all SMP capable CPUs have cycle counters. - */ - -#define __read_32bit_c0_register(source, sel) \ -({ int __res; \ - if (sel == 0) \ - __asm__ __volatile__( \ - "mfc0\t%0, " #source "\n\t" \ - : "=r" (__res)); \ - else \ - __asm__ __volatile__( \ - ".set\tmips32\n\t" \ - "mfc0\t%0, " #source ", " #sel "\n\t" \ - ".set\tmips0\n\t" \ - : "=r" (__res)); \ - __res; \ -}) - -/* #define CP0_COUNT $9 */ -#define read_c0_count() __read_32bit_c0_register($9, 0) - -typedef uint32_t cycles_t; -static inline cycles_t get_cycles (void) -{ - return read_c0_count(); -} - -/* begin mach */ -#elif defined(__APPLE__) - -#include - -typedef UInt64 cycles_t; -static inline cycles_t get_cycles (void) -{ - UInt64 time = AudioGetCurrentHostTime(); - return AudioConvertHostTimeToNanos(time); -} -/* end mach */ - -#else - -/* debian: sparc, arm, m68k */ - -#warning You are compiling libardour on a platform for which ardour/cycles.h needs work - -#include - -typedef long cycles_t; - -extern cycles_t cacheflush_time; - -static inline cycles_t get_cycles(void) -{ - struct timeval tv; - gettimeofday (&tv, NULL); - - return tv.tv_usec; -} - -#endif - -#endif /* __ardour_cycles_h__ */ diff --git a/libs/ardour/ardour/dB.h b/libs/ardour/ardour/dB.h deleted file mode 100644 index b67e581067..0000000000 --- a/libs/ardour/ardour/dB.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_dB_h__ -#define __ardour_dB_h__ - -#include - -static inline float dB_to_coefficient (float dB) { - return dB > -318.8f ? pow (10.0f, dB * 0.05f) : 0.0f; -} - -static inline float coefficient_to_dB (float coeff) { - return 20.0f * fast_log10 (coeff); -} - -#endif /* __ardour_dB_h__ */ diff --git a/libs/ardour/ardour/data_type.h b/libs/ardour/ardour/data_type.h deleted file mode 100644 index 854f52acba..0000000000 --- a/libs/ardour/ardour/data_type.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_data_type_h__ -#define __ardour_data_type_h__ - -#include -#include - -namespace ARDOUR { - - -/** A type of Data Ardour is capable of processing. - * - * The majority of this class is dedicated to conversion to and from various - * other type representations, simple comparison between then, etc. This code - * is deliberately 'ugly' so other code doesn't have to be. - */ -class DataType -{ -public: - /** Numeric symbol for this DataType. - * - * Castable to int for use as an array index (e.g. by ChanCount). - * Note this means NIL is (ntypes-1) and guaranteed to change when - * types are added, so this number is NOT suitable for serialization, - * network, or binary anything. - * - * WARNING: The number of non-NIL entries here must match num_types. - */ - enum Symbol { - AUDIO = 0, - MIDI = 1, - NIL = 2, - }; - - /** Number of types (not including NIL). - * WARNING: make sure this matches Symbol! - */ - static const uint32_t num_types = 2; - - DataType(const Symbol& symbol) - : _symbol(symbol) - {} - - /** Construct from a string (Used for loading from XML and Ports) - * The string can be as in an XML file (eg "audio" or "midi"), or a - * Jack type string (from jack_port_type) */ - DataType(const std::string& str) - : _symbol(NIL) { - if (str == "audio" || str == JACK_DEFAULT_AUDIO_TYPE) - _symbol = AUDIO; - else if (str == "midi" || str == JACK_DEFAULT_MIDI_TYPE) - _symbol = MIDI; - } - - /** Get the Jack type this DataType corresponds to */ - const char* to_jack_type() const { - switch (_symbol) { - case AUDIO: return JACK_DEFAULT_AUDIO_TYPE; - case MIDI: return JACK_DEFAULT_MIDI_TYPE; - default: return ""; - } - } - - /** Inverse of the from-string constructor */ - const char* to_string() const { - switch (_symbol) { - case AUDIO: return "audio"; - case MIDI: return "midi"; - default: return "unknown"; // reeeally shouldn't ever happen - } - } - - inline operator uint32_t() const { return (uint32_t)_symbol; } - - /** DataType iterator, for writing generic loops that iterate over all - * available types. - */ - class iterator { - public: - - iterator(uint32_t index) : _index(index) {} - - DataType operator*() { return DataType((Symbol)_index); } - iterator& operator++() { ++_index; return *this; } // yes, prefix only - bool operator==(const iterator& other) { return (_index == other._index); } - bool operator!=(const iterator& other) { return (_index != other._index); } - - private: - friend class DataType; - - uint32_t _index; - }; - - static iterator begin() { return iterator(0); } - static iterator end() { return iterator(num_types); } - - bool operator==(const Symbol symbol) { return (_symbol == symbol); } - bool operator!=(const Symbol symbol) { return (_symbol != symbol); } - - bool operator==(const DataType other) { return (_symbol == other._symbol); } - bool operator!=(const DataType other) { return (_symbol != other._symbol); } - -private: - Symbol _symbol; // could be const if not for the string constructor -}; - - - -} // namespace ARDOUR - -#endif // __ardour_data_type_h__ - diff --git a/libs/ardour/ardour/directory_names.h b/libs/ardour/ardour/directory_names.h deleted file mode 100644 index 8fabe025d1..0000000000 --- a/libs/ardour/ardour/directory_names.h +++ /dev/null @@ -1,23 +0,0 @@ - -#ifndef __ardour_directory_names_h__ -#define __ardour_directory_names_h__ - -#include - -namespace ARDOUR { - -extern const char* const old_sound_dir_name; -extern const char* const sound_dir_name; -extern const char* const midi_dir_name; -extern const char* const dead_sound_dir_name; -extern const char* const dead_midi_dir_name; -extern const char* const interchange_dir_name; -extern const char* const peak_dir_name; -extern const char* const export_dir_name; -extern const char* const templates_dir_name; -extern const char* const surfaces_dir_name; -extern const char* const user_config_dir_name; - -}; - -#endif diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h deleted file mode 100644 index 824d864663..0000000000 --- a/libs/ardour/ardour/diskstream.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_diskstream_h__ -#define __ardour_diskstream_h__ - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -struct tm; - -namespace ARDOUR { - -class AudioEngine; -class Send; -class Session; -class Playlist; -class IO; - -class Diskstream : public SessionObject -{ - public: - enum Flag { - Recordable = 0x1, - Hidden = 0x2, - Destructive = 0x4 - }; - - Diskstream (Session &, const string& name, Flag f = Recordable); - Diskstream (Session &, const XMLNode&); - virtual ~Diskstream(); - - bool set_name (const string& str); - - ARDOUR::IO* io() const { return _io; } - void set_io (ARDOUR::IO& io); - - virtual float playback_buffer_load() const = 0; - virtual float capture_buffer_load() const = 0; - - void set_flag (Flag f) { _flags = Flag (_flags | f); } - void unset_flag (Flag f) { _flags = Flag (_flags & ~f); } - - AlignStyle alignment_style() const { return _alignment_style; } - void set_align_style (AlignStyle); - void set_persistent_align_style (AlignStyle a) { _persistent_alignment_style = a; } - - nframes_t roll_delay() const { return _roll_delay; } - void set_roll_delay (nframes_t); - - bool record_enabled() const { return g_atomic_int_get (&_record_enabled); } - virtual void set_record_enabled (bool yn) = 0; - - bool destructive() const { return _flags & Destructive; } - virtual int set_destructive (bool yn) { return -1; } - virtual bool can_become_destructive (bool& requires_bounce) const { return false; } - - bool hidden() const { return _flags & Hidden; } - bool recordable() const { return _flags & Recordable; } - bool reversed() const { return _actual_speed < 0.0f; } - double speed() const { return _visible_speed; } - - virtual void punch_in() {} - virtual void punch_out() {} - - void set_speed (double); - void non_realtime_set_speed (); - virtual void non_realtime_locate (nframes_t location) {}; - virtual void playlist_modified (); - - boost::shared_ptr playlist () { return _playlist; } - - virtual int use_playlist (boost::shared_ptr); - virtual int use_new_playlist () = 0; - virtual int use_copy_playlist () = 0; - - nframes_t current_capture_start() const { return capture_start_frame; } - nframes_t current_capture_end() const { return capture_start_frame + capture_captured; } - nframes_t get_capture_start_frame (uint32_t n=0); - nframes_t get_captured_frames (uint32_t n=0); - - ChanCount n_channels() { return _n_channels; } - - static nframes_t disk_io_frames() { return disk_io_chunk_frames; } - static void set_disk_io_chunk_frames (uint32_t n) { disk_io_chunk_frames = n; } - - /* Stateful */ - virtual XMLNode& get_state(void) = 0; - virtual int set_state(const XMLNode& node) = 0; - - virtual void monitor_input (bool) {} - - nframes_t capture_offset() const { return _capture_offset; } - virtual void set_capture_offset (); - - bool slaved() const { return _slaved; } - void set_slaved(bool yn) { _slaved = yn; } - - int set_loop (Location *loc); - - std::list >& last_capture_regions () { return _last_capture_regions; } - - void handle_input_change (IOChange, void *src); - - void remove_region_from_last_capture (boost::weak_ptr wregion); - - sigc::signal RecordEnableChanged; - sigc::signal SpeedChanged; - sigc::signal ReverseChanged; - sigc::signal PlaylistChanged; - sigc::signal AlignmentStyleChanged; - sigc::signal LoopSet; - - static sigc::signal DiskOverrun; - static sigc::signal DiskUnderrun; - - protected: - friend class Session; - - /* the Session is the only point of access for these because they require - * that the Session is "inactive" while they are called. - */ - - virtual void set_pending_overwrite (bool) = 0; - virtual int overwrite_existing_buffers () = 0; - virtual void set_block_size (nframes_t) = 0; - virtual int internal_playback_seek (nframes_t distance) = 0; - virtual int can_internal_playback_seek (nframes_t distance) = 0; - virtual int rename_write_sources () = 0; - virtual void reset_write_sources (bool, bool force = false) = 0; - virtual void non_realtime_input_change () = 0; - - uint32_t read_data_count() const { return _read_data_count; } - uint32_t write_data_count() const { return _write_data_count; } - - protected: - friend class Auditioner; - virtual int seek (nframes_t which_sample, bool complete_refill = false) = 0; - - protected: - friend class Track; - - virtual void prepare (); - virtual int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input) = 0; - virtual bool commit (nframes_t nframes) = 0; - virtual void recover (); /* called if commit will not be called, but process was */ - - //private: - - enum TransitionType { - CaptureStart = 0, - CaptureEnd - }; - - struct CaptureTransition { - TransitionType type; - nframes_t capture_val; ///< The start or end file frame position - }; - - /* The two central butler operations */ - virtual int do_flush (Session::RunContext context, bool force = false) = 0; - virtual int do_refill () = 0; - - /** For non-butler contexts (allocates temporary working buffers) */ - virtual int do_refill_with_alloc() = 0; - - /* XXX fix this redundancy ... */ - - virtual void playlist_changed (Change); - virtual void playlist_deleted (boost::weak_ptr); - - virtual void transport_stopped (struct tm&, time_t, bool abort) = 0; - virtual void transport_looped (nframes_t transport_frame) = 0; - - struct CaptureInfo { - uint32_t start; - uint32_t frames; - }; - - virtual void init (Flag); - - virtual int use_new_write_source (uint32_t n=0) = 0; - - virtual int find_and_use_playlist (const string&) = 0; - - virtual void allocate_temporary_buffers () = 0; - - virtual bool realtime_set_speed (double, bool global_change); - - std::list > _last_capture_regions; - - virtual int use_pending_capture_data (XMLNode& node) = 0; - - virtual void get_input_sources () = 0; - virtual void check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record) = 0; - virtual void set_align_style_from_io() {} - virtual void setup_destructive_playlist () {} - virtual void use_destructive_playlist () {} - - static nframes_t disk_io_chunk_frames; - std::vector capture_info; - Glib::Mutex capture_info_lock; - - uint32_t i_am_the_modifier; - - ARDOUR::IO* _io; - ChanCount _n_channels; - - boost::shared_ptr _playlist; - - mutable gint _record_enabled; - double _visible_speed; - double _actual_speed; - /* items needed for speed change logic */ - bool _buffer_reallocation_required; - bool _seek_required; - - bool force_refill; - nframes_t capture_start_frame; - nframes_t capture_captured; - bool was_recording; - nframes_t adjust_capture_position; - nframes_t _capture_offset; - nframes_t _roll_delay; - nframes_t first_recordable_frame; - nframes_t last_recordable_frame; - int last_possibly_recording; - AlignStyle _alignment_style; - bool _scrubbing; - bool _slaved; - bool _processed; - Location* loop_location; - nframes_t overwrite_frame; - off_t overwrite_offset; - bool pending_overwrite; - bool overwrite_queued; - IOChange input_change_pending; - nframes_t wrap_buffer_size; - nframes_t speed_buffer_size; - - uint64_t last_phase; - uint64_t phi; - uint64_t target_phi; - - nframes_t file_frame; - nframes_t playback_sample; - nframes_t playback_distance; - bool commit_should_unlock; - - uint32_t _read_data_count; - uint32_t _write_data_count; - - bool in_set_state; - AlignStyle _persistent_alignment_style; - bool first_input_change; - - Glib::Mutex state_lock; - - nframes_t scrub_start; - nframes_t scrub_buffer_size; - nframes_t scrub_offset; - - sigc::connection ports_created_c; - sigc::connection plmod_connection; - sigc::connection plgone_connection; - - Flag _flags; -}; - -}; /* namespace ARDOUR */ - -#endif /* __ardour_diskstream_h__ */ diff --git a/libs/ardour/ardour/export.h b/libs/ardour/ardour/export.h deleted file mode 100644 index 141786873d..0000000000 --- a/libs/ardour/ardour/export.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_export_h__ -#define __ardour_export_h__ - -#include -#include -#include - -#include - -#include -#include - -#include -#include - -using std::map; -using std::vector; -using std::string; -using std::pair; - -namespace ARDOUR -{ - class Port; - - typedef pair PortChannelPair; - typedef map > ExportPortMap; - - struct ExportSpecification : public SF_INFO, public sigc::trackable { - - ExportSpecification(); - ~ExportSpecification (); - - void init (); - void clear (); - - - int prepare (nframes_t blocksize, nframes_t frame_rate); - - int process (nframes_t nframes); - - /* set by the user */ - - string path; - nframes_t sample_rate; - - int src_quality; - SNDFILE* out; - uint32_t channels; - ExportPortMap port_map; - nframes_t start_frame; - nframes_t end_frame; - GDitherType dither_type; - bool do_freewheel; - - /* used exclusively during export */ - - nframes_t frame_rate; - GDither dither; - float* dataF; - float* dataF2; - float* leftoverF; - nframes_t leftover_frames; - nframes_t max_leftover_frames; - void* output_data; - nframes_t out_samples_max; - uint32_t sample_bytes; - uint32_t data_width; - - nframes_t total_frames; - SF_INFO sfinfo; - SRC_DATA src_data; - SRC_STATE* src_state; - nframes_t pos; - - sigc::connection freewheel_connection; - - /* shared between UI thread and audio thread */ - - volatile float progress; /* audio thread sets this */ - volatile bool stop; /* UI sets this */ - volatile bool running; /* audio thread sets to false when export is done */ - - int status; - }; - -} // namespace ARDOUR - -#endif /* __ardour_export_h__ */ diff --git a/libs/ardour/ardour/filename_extensions.h b/libs/ardour/ardour/filename_extensions.h deleted file mode 100644 index 3e280d6326..0000000000 --- a/libs/ardour/ardour/filename_extensions.h +++ /dev/null @@ -1,17 +0,0 @@ - -#ifndef __ardour_filename_extensions_h__ -#define __ardour_filename_extensions_h__ - -namespace ARDOUR { - -extern const char* const template_suffix; -extern const char* const statefile_suffix; -extern const char* const pending_suffix; -extern const char* const peakfile_suffix; -extern const char* const backup_suffix; -extern const char* const temp_suffix; -extern const char* const history_suffix; - -} - -#endif diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h deleted file mode 100644 index 12995bd818..0000000000 --- a/libs/ardour/ardour/filesystem_paths.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef ARDOUR_FILESYSTEM_PATHS_INCLUDED -#define ARDOUR_FILESYSTEM_PATHS_INCLUDED - -#include -#include - -namespace ARDOUR { - - using namespace PBD; - - /** - * @return the path to the directory used to store user specific ardour - * configuration files. - */ - sys::path user_config_directory (); - - /** - * @return the path to the directory that contains the system wide ardour - * modules. - */ - sys::path ardour_module_directory (); - - SearchPath ardour_search_path (); - - SearchPath system_config_search_path (); - - SearchPath system_data_search_path (); - -} // namespace ARDOUR - -#endif diff --git a/libs/ardour/ardour/filter.h b/libs/ardour/ardour/filter.h deleted file mode 100644 index b659873bdb..0000000000 --- a/libs/ardour/ardour/filter.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_filter_h__ -#define __ardour_filter_h__ - -#include -#include - -namespace ARDOUR { - -class Region; -class Session; - -class Filter { - - public: - virtual ~Filter() {} - - virtual int run (boost::shared_ptr) = 0; - std::vector > results; - - protected: - Filter (ARDOUR::Session& s) : session(s) {} - - int make_new_sources (boost::shared_ptr, ARDOUR::SourceList&, std::string suffix = ""); - int finish (boost::shared_ptr, ARDOUR::SourceList&, std::string region_name = ""); - - ARDOUR::Session& session; -}; - -} /* namespace */ - -#endif /* __ardour_filter_h__ */ diff --git a/libs/ardour/ardour/gain.h b/libs/ardour/ardour/gain.h deleted file mode 100644 index e57cfdc0d7..0000000000 --- a/libs/ardour/ardour/gain.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_gain_h__ -#define __ardour_gain_h__ - -#include "ardour.h" -#include "curve.h" - -namespace ARDOUR { - -struct Gain : public AutomationList { - - Gain(); - Gain (const Gain&); - Gain& operator= (const Gain&); - - static void fill_linear_fade_in (Gain& curve, nframes_t frames); - static void fill_linear_volume_fade_in (Gain& curve, nframes_t frames); - static void fill_linear_fade_out (Gain& curve, nframes_t frames); - static void fill_linear_volume_fade_out (Gain& curve, nframes_t frames); - -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_gain_h__ */ diff --git a/libs/ardour/ardour/gdither.h b/libs/ardour/ardour/gdither.h deleted file mode 100644 index 67efcc3583..0000000000 --- a/libs/ardour/ardour/gdither.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2002 Steve Harris - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef GDITHER_H -#define GDITHER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "gdither_types.h" - -/* Create and initialise a state structure, takes a dither type, a number of - * channels and a bit depth as input - * - * The Dither type is one of - * - * GDitherNone - straight nearest neighbour rounding. Theres no pressing - * reason to do this at 8 or 16 bit, but you might want to at 24, for some - * reason. At the lest it will save you writing int->float conversion code, - * which is arder than it sounds. - * - * GDitherRect - mathematically most accurate, lowest noise floor, but not - * that good for audio. It is the fastest though. - * - * GDitherTri - a happy medium between Rectangular and Shaped, reasonable - * noise floor, not too obvious, quite fast. - * - * GDitherShaped - should have the least audible impact, but has the highest - * noise floor, fairly CPU intensive. Not advisible if your going to apply - * any frequency manipulation afterwards. - * - * channels, sets the number of channels in the output data, output data will - * be written interleaved into the area given to gdither_run(). Set to 1 - * if you are not working with interleaved buffers. - * - * bit depth, sets the bit width of the output sample data, it can be one of: - * - * GDither8bit - 8 bit unsiged - * GDither16bit - 16 bit signed - * GDither32bit - 24+bits in upper bits of a 32 bit word - * GDitherFloat - IEEE floating point (32bits) - * GDitherDouble - Double precision IEEE floating point (64bits) - * - * dither_depth, set the number of bits before the signal will be truncated to, - * eg. 16 will produce an output stream with 16bits-worth of signal. Setting to - * zero or greater than the width of the output format will dither to the - * maximum precision allowed by the output format. - */ -GDither gdither_new(GDitherType type, uint32_t channels, - - GDitherSize bit_depth, int dither_depth); - -/* Frees memory used by gdither_new. - */ -void gdither_free(GDither s); - -/* Applies dithering to the supplied signal. - * - * channel is the channel number you are processing (0 - channles-1), length is - * the length of the input, in samples, x is the input samples (float), y is - * where the output samples will be written, it should have the approaprate - * type for the chosen bit depth - */ -void gdither_runf(GDither s, uint32_t channel, uint32_t length, - float *x, void *y); - -/* see gdither_runf, vut input argument is double format */ -void gdither_run(GDither s, uint32_t channel, uint32_t length, - double *x, void *y); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libs/ardour/ardour/gdither_types.h b/libs/ardour/ardour/gdither_types.h deleted file mode 100644 index bcc0097d7f..0000000000 --- a/libs/ardour/ardour/gdither_types.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2002 Steve Harris - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef GDITHER_TYPES_H -#define GDITHER_TYPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - GDitherNone = 0, - GDitherRect, - GDitherTri, - GDitherShaped -} GDitherType; - -typedef enum { - GDither8bit = 8, - GDither16bit = 16, - GDither32bit = 32, - GDitherFloat = 25, - GDitherDouble = 54 -} GDitherSize; - -typedef void *GDither; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libs/ardour/ardour/gdither_types_internal.h b/libs/ardour/ardour/gdither_types_internal.h deleted file mode 100644 index e73a256310..0000000000 --- a/libs/ardour/ardour/gdither_types_internal.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2002 Steve Harris - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef GDITHER_TYPES_H -#define GDITHER_TYPES_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define GDITHER_SH_BUF_SIZE 8 -#define GDITHER_SH_BUF_MASK 7 - -/* this must agree with whats in gdither_types.h */ -typedef enum { - GDitherNone = 0, - GDitherRect, - GDitherTri, - GDitherShaped -} GDitherType; - -typedef enum { - GDither8bit = 8, - GDither16bit = 16, - GDither32bit = 32, - GDitherFloat = 25, - GDitherDouble = 54 -} GDitherSize; - -typedef struct { - uint32_t phase; - float buffer[GDITHER_SH_BUF_SIZE]; -} GDitherShapedState; - -typedef struct GDither_s { - GDitherType type; - uint32_t channels; - uint32_t bit_depth; - uint32_t dither_depth; - float scale; - uint32_t post_scale; - float post_scale_fp; - float bias; - - int clamp_u; - - int clamp_l; - float *tri_state; - GDitherShapedState *shaped_state; -} *GDither; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/libs/ardour/ardour/importable_source.h b/libs/ardour/ardour/importable_source.h deleted file mode 100644 index a33cf567e7..0000000000 --- a/libs/ardour/ardour/importable_source.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_importable_source_h__ -#define __ardour_importable_source_h__ - -#include -#include - -namespace ARDOUR { - -class ImportableSource { -public: - ImportableSource () {} - virtual ~ImportableSource() {} - - virtual nframes_t read (Sample* buffer, nframes_t nframes) = 0; - virtual float ratio() const { return 1.0f; } - virtual uint32_t channels() const = 0; - virtual nframes_t length() const = 0; - virtual nframes_t samplerate() const = 0; - virtual void seek (nframes_t pos) = 0; -}; - -} - -#endif /* __ardour_importable_source_h__ */ diff --git a/libs/ardour/ardour/internal_audio_port.h b/libs/ardour/ardour/internal_audio_port.h deleted file mode 100644 index 7b70989d4b..0000000000 --- a/libs/ardour/ardour/internal_audio_port.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_internal_audio_port_h__ -#define __ardour_internal_audio_port_h__ - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class AudioEngine; -class InternalAudioPort : public AudioPort, public InternalPort { - public: - void cycle_start(nframes_t nframes) { - _buffer.silence (nframes); - } - - AudioBuffer& get_audio_buffer(); - - void set_mixdown_function (void (*func)(const std::list&, AudioBuffer&, nframes_t, nframes_t)); - void reset (); - - protected: - friend class AudioEngine; - - InternalAudioPort (const std::string& name, Flags flags); - void (*_mixdown)(const std::list&, AudioBuffer&, nframes_t, nframes_t); - - static void default_mixdown (const std::list&, AudioBuffer&, nframes_t, nframes_t); -}; - -} // namespace ARDOUR - -#endif /* __ardour_internal_audio_port_h__ */ diff --git a/libs/ardour/ardour/internal_port.h b/libs/ardour/ardour/internal_port.h deleted file mode 100644 index e6053c0e58..0000000000 --- a/libs/ardour/ardour/internal_port.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_internal_port_h__ -#define __ardour_internal_port_h__ - -#include - -#include -#include -#include - -namespace ARDOUR { - -class AudioEngine; -class Buffer; - -/** Abstract class representing internal (ardour<->ardour only) ports - */ -class InternalPort : public virtual Port { - public: - - ~InternalPort(); - - std::string short_name(); - - int set_name (std::string str); - - int connected () const; - - int reestablish (); - - bool connected_to (const std::string& portname) const; - - const char ** get_connections () const; - bool monitoring_input () const { return false; } - - void ensure_monitor_input (bool yn) {} - void request_monitor_input (bool yn) {} - - nframes_t latency () const { return _latency; } - nframes_t total_latency() const { return _latency; } - - void set_latency (nframes_t nframes); - - static void connect (InternalPort& src, InternalPort& dst); - static void disconnect (InternalPort& a, InternalPort& b); - - protected: - friend class AudioEngine; - - InternalPort (const std::string&, DataType type, Flags flags); - - int disconnect (); - void recompute_total_latency() const; - - std::list _connections; - nframes_t _latency; - - static AudioEngine* engine; - static void set_engine (AudioEngine* e); -}; - -} // namespace ARDOUR - -#endif /* __ardour_internal_port_h__ */ diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h deleted file mode 100644 index 83b6378dae..0000000000 --- a/libs/ardour/ardour/io.h +++ /dev/null @@ -1,391 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_io_h__ -#define __ardour_io_h__ - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using std::string; -using std::vector; - -class XMLNode; - -namespace ARDOUR { - -class Session; -class AudioEngine; -class Bundle; -class AutoBundle; -class Panner; -class PeakMeter; -class Port; -class AudioPort; -class MidiPort; -class BufferSet; - - -/** A collection of input and output ports with connections. - * - * An IO can contain ports of varying types, making routes/inserts/etc with - * varied combinations of types (eg MIDI and audio) possible. - */ - -class IO : public Automatable, public Latent -{ - public: - static const string state_node_name; - - IO (Session&, const string& name, - int input_min = -1, int input_max = -1, - int output_min = -1, int output_max = -1, - DataType default_type = DataType::AUDIO, - bool public_ports = true); - - IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO); - - virtual ~IO(); - - ChanCount input_minimum() const { return _input_minimum; } - ChanCount input_maximum() const { return _input_maximum; } - ChanCount output_minimum() const { return _output_minimum; } - ChanCount output_maximum() const { return _output_maximum; } - - void set_input_minimum (ChanCount n); - void set_input_maximum (ChanCount n); - void set_output_minimum (ChanCount n); - void set_output_maximum (ChanCount n); - - bool active() const { return _active; } - void set_active (bool yn); - - DataType default_type() const { return _default_type; } - void set_default_type(DataType t) { _default_type = t; } - - bool set_name (const string& str); - - virtual void silence (nframes_t, nframes_t offset); - - void collect_input (BufferSet& bufs, nframes_t nframes, nframes_t offset); - void deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset); - void just_meter_input (nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset); - - gain_t gain () const { return _desired_gain; } - virtual gain_t effective_gain () const; - - void set_denormal_protection (bool yn, void *src); - bool denormal_protection() const { return _denormal_protection; } - - void set_phase_invert (bool yn, void *src); - bool phase_invert() const { return _phase_invert; } - - Panner& panner() { return *_panner; } - PeakMeter& peak_meter() { return *_meter; } - const Panner& panner() const { return *_panner; } - - int ensure_io (ChanCount in, ChanCount out, bool clear, void *src); - - int connect_input_ports_to_bundle (boost::shared_ptr, void *src); - int connect_output_ports_to_bundle (boost::shared_ptr, void *src); - - std::vector > bundles_connected_to_inputs (); - std::vector > bundles_connected_to_outputs (); - - boost::shared_ptr bundle_for_inputs () { return _bundle_for_inputs; } - boost::shared_ptr bundle_for_outputs () { return _bundle_for_outputs; } - - int add_input_port (string source, void *src, DataType type = DataType::NIL); - int add_output_port (string destination, void *src, DataType type = DataType::NIL); - - int remove_input_port (Port *, void *src); - int remove_output_port (Port *, void *src); - - int set_input (Port *, void *src); - - int connect_input (Port *our_port, string other_port, void *src); - int connect_output (Port *our_port, string other_port, void *src); - - int disconnect_input (Port *our_port, string other_port, void *src); - int disconnect_output (Port *our_port, string other_port, void *src); - - int disconnect_inputs (void *src); - int disconnect_outputs (void *src); - - nframes_t signal_latency() const { return _own_latency; } - nframes_t output_latency() const; - nframes_t input_latency() const; - void set_port_latency (nframes_t); - - void update_port_total_latencies (); - - const PortSet& inputs() const { return _inputs; } - const PortSet& outputs() const { return _outputs; } - - Port *output (uint32_t n) const { - if (n < _outputs.num_ports()) { - return _outputs.port(n); - } else { - return 0; - } - } - - Port *input (uint32_t n) const { - if (n < _inputs.num_ports()) { - return _inputs.port(n); - } else { - return 0; - } - } - - AudioPort* audio_input(uint32_t n) const; - AudioPort* audio_output(uint32_t n) const; - MidiPort* midi_input(uint32_t n) const; - MidiPort* midi_output(uint32_t n) const; - - const ChanCount& n_inputs () const { return _inputs.count(); } - const ChanCount& n_outputs () const { return _outputs.count(); } - - void attach_buffers(ChanCount ignored); - - sigc::signal active_changed; - - sigc::signal input_changed; - sigc::signal output_changed; - - virtual XMLNode& state (bool full); - XMLNode& get_state (void); - int set_state (const XMLNode&); - - static int disable_connecting (void); - - static int enable_connecting (void); - - static int disable_ports (void); - - static int enable_ports (void); - - static int disable_panners (void); - - static int reset_panners (void); - - static sigc::signal PortsLegal; - static sigc::signal PannersLegal; - static sigc::signal ConnectingLegal; - /// raised when the number of input or output ports changes - static sigc::signal PortCountChanged; - static sigc::signal PortsCreated; - - static void update_meters(); - - private: - - static sigc::signal Meter; - static Glib::StaticMutex m_meter_signal_lock; - sigc::connection m_meter_connection; - - public: - - /* automation */ - - struct GainControl : public AutomationControl { - GainControl (std::string name, IO& i, boost::shared_ptr al) - : AutomationControl (i._session, al, name) - , _io (i) - {} - - void set_value (float val); - float get_value (void) const; - - IO& _io; - }; - - boost::shared_ptr gain_control() { - return _gain_control; - } - boost::shared_ptr gain_control() const { - return _gain_control; - } - - void clear_automation (); - - void set_parameter_automation_state (Parameter, AutoState); - - virtual void transport_stopped (nframes_t now); - virtual void automation_snapshot (nframes_t now, bool force); - - void start_pan_touch (uint32_t which); - void end_pan_touch (uint32_t which); - - void defer_pan_reset (); - void allow_pan_reset (); - - /* the session calls this for master outs before - anyone else. controls outs too, at some point. - */ - - XMLNode *pending_state_node; - int ports_became_legal (); - - private: - mutable Glib::Mutex io_lock; - - protected: - Panner* _panner; - BufferSet* _output_buffers; //< Set directly to output port buffers - bool _active; - gain_t _gain; - gain_t _effective_gain; - gain_t _desired_gain; - Glib::Mutex declick_lock; - PortSet _outputs; - PortSet _inputs; - PeakMeter* _meter; - bool no_panner_reset; - bool _phase_invert; - bool _denormal_protection; - XMLNode* deferred_state; - DataType _default_type; - bool _public_ports; - - virtual void set_deferred_state() {} - - void reset_panner (); - - virtual uint32_t pans_required() const - { return _inputs.count().n_audio(); } - - boost::shared_ptr _gain_control; - - virtual void set_gain (gain_t g, void *src); - void inc_gain (gain_t delta, void *src); - - bool apply_gain_automation; - - virtual int load_automation (std::string path); - - /* AudioTrack::deprecated_use_diskstream_connections() needs these */ - - int set_inputs (const string& str); - int set_outputs (const string& str); - - static bool connecting_legal; - static bool ports_legal; - - BufferSet& output_buffers() { return *_output_buffers; } - - private: - - friend class Send; - - static bool panners_legal; - - int connecting_became_legal (); - int panners_became_legal (); - sigc::connection connection_legal_c; - sigc::connection port_legal_c; - sigc::connection panner_legal_c; - - ChanCount _input_minimum; ///< minimum number of input channels (0 for no minimum) - ChanCount _input_maximum; ///< maximum number of input channels (ChanCount::INFINITE for no maximum) - ChanCount _output_minimum; ///< minimum number of output channels (0 for no minimum) - ChanCount _output_maximum; ///< maximum number of output channels (ChanCount::INFINITE for no maximum) - - boost::shared_ptr _bundle_for_inputs; ///< a bundle representing our inputs - boost::shared_ptr _bundle_for_outputs; ///< a bundle representing our outputs - - struct UserBundleInfo { - UserBundleInfo (IO*, boost::shared_ptr b); - - boost::shared_ptr bundle; - sigc::connection configuration_will_change; - sigc::connection configuration_has_changed; - sigc::connection ports_will_change; - sigc::connection ports_have_changed; - }; - - std::vector _bundles_connected_to_outputs; ///< user bundles connected to our outputs - std::vector _bundles_connected_to_inputs; ///< user bundles connected to our inputs - - static int parse_io_string (const string&, vector& chns); - - static int parse_gain_string (const string&, vector& chns); - - int set_sources (vector&, void *src, bool add); - int set_destinations (vector&, void *src, bool add); - - int ensure_inputs (ChanCount, bool clear, bool lockit, void *src); - int ensure_outputs (ChanCount, bool clear, bool lockit, void *src); - - void check_bundles_connected_to_inputs (); - void check_bundles_connected_to_outputs (); - void check_bundles (std::vector&, const PortSet&); - - void bundle_configuration_will_change (); - void bundle_configuration_has_changed (); - void bundle_ports_will_change (int); - void bundle_ports_have_changed (int); - - int create_ports (const XMLNode&); - int make_connections (const XMLNode&); - - void setup_peak_meters (); - void meter (); - - bool ensure_inputs_locked (ChanCount, bool clear, void *src); - bool ensure_outputs_locked (ChanCount, bool clear, void *src); - - std::string build_legal_port_name (DataType type, bool for_input); - int32_t find_input_port_hole (const char* base); - int32_t find_output_port_hole (const char* base); - - void create_bundles_for_inputs_and_outputs (); - void setup_bundles_for_inputs_and_outputs (); - - void maybe_add_input_bundle_to_list (boost::shared_ptr, std::vector >*); - void maybe_add_output_bundle_to_list (boost::shared_ptr, std::vector >*); -}; - -} // namespace ARDOUR - -#endif /*__ardour_io_h__ */ diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h deleted file mode 100644 index a535ce3bb4..0000000000 --- a/libs/ardour/ardour/io_processor.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_redirect_h__ -#define __ardour_redirect_h__ - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -using std::map; -using std::set; -using std::string; -using std::vector; - -class XMLNode; - -namespace ARDOUR { - -class Session; - -/** A mixer strip element (Processor) with Jack ports (IO). - */ -class IOProcessor : public Processor -{ - public: - IOProcessor (Session&, const string& name, Placement, - int input_min = -1, int input_max = -1, int output_min = -1, int output_max = -1); - IOProcessor (const IOProcessor&); - virtual ~IOProcessor (); - - virtual ChanCount output_streams() const { return _io->n_outputs(); } - virtual ChanCount input_streams () const { return _io->n_inputs(); } - virtual ChanCount natural_output_streams() const { return _io->n_outputs(); } - virtual ChanCount natural_input_streams () const { return _io->n_inputs(); } - - boost::shared_ptr io() { return _io; } - boost::shared_ptr io() const { return _io; } - - virtual void automation_snapshot (nframes_t now, bool force) { _io->automation_snapshot(now, force); } - - virtual void run_in_place (BufferSet& in, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0; - - void silence (nframes_t nframes, nframes_t offset); - - sigc::signal AutomationPlaybackChanged; - sigc::signal AutomationChanged; - - XMLNode& state (bool full_state); - int set_state (const XMLNode&); - - protected: - boost::shared_ptr _io; -}; - -} // namespace ARDOUR - -#endif /* __ardour_redirect_h__ */ diff --git a/libs/ardour/ardour/jack_audio_port.h b/libs/ardour/ardour/jack_audio_port.h deleted file mode 100644 index 703fb81fa3..0000000000 --- a/libs/ardour/ardour/jack_audio_port.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_jack_audio_port_h__ -#define __ardour_jack_audio_port_h__ - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class AudioEngine; -class JackAudioPort : public JackPort, public BaseAudioPort { - public: - void cycle_start (nframes_t nframes, nframes_t offset) { - _buffer->set_data ((Sample*) jack_port_get_buffer (_port, nframes) + offset, nframes); - } - - int reestablish (); - - protected: - friend class AudioPort; - - JackAudioPort (const std::string& name, Flags flags, AudioBuffer* buf); - - AudioBuffer* _source_buffer; -}; - -} // namespace ARDOUR - -#endif /* __ardour_jack_audio_port_h__ */ diff --git a/libs/ardour/ardour/jack_midi_port.h b/libs/ardour/ardour/jack_midi_port.h deleted file mode 100644 index d1fb5cc4fb..0000000000 --- a/libs/ardour/ardour/jack_midi_port.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_jack_midi_port_h__ -#define __ardour_jack_midi_port_h__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class MidiEngine; - -class JackMidiPort : public JackPort, public BaseMidiPort { - public: - void cycle_start (nframes_t nframes, nframes_t offset); - void cycle_end (nframes_t nframes, nframes_t offset); - void set_buffer (MidiBuffer& buf); - - protected: - friend class MidiPort; - - JackMidiPort (const std::string&, Flags, MidiBuffer*); -}; - -} // namespace ARDOUR - -#endif /* __ardour_jack_midi_port_h__ */ diff --git a/libs/ardour/ardour/jack_port.h b/libs/ardour/ardour/jack_port.h deleted file mode 100644 index 3fa0008e17..0000000000 --- a/libs/ardour/ardour/jack_port.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_jack_port_h__ -#define __ardour_jack_port_h__ - -#include -#include -#include -#include - -namespace ARDOUR { - -class AudioEngine; -class Buffer; - -/** Abstract class representing JACK ports - */ -class JackPort : public virtual Port, public PortConnectableByName { - public: - - ~JackPort(); - - std::string short_name() const { - return jack_port_short_name (_port); - } - - int set_name (const std::string& str); - - bool connected () const { - return jack_port_connected (_port); - } - - int reestablish (); - int reconnect (); - - int connect (Port& other) { - return connect (other.name()); - } - - int disconnect (Port& other) { - return disconnect (other.name()); - } - - int disconnect_all (); - - // connect-by-name API - - int connect (const std::string& other_name); - int disconnect (const std::string& other_name); - - bool connected_to (const std::string& portname) const { - return jack_port_connected_to (_port, portname.c_str()); - } - - int get_connections (std::vector& names) const; - - bool monitoring_input () const { - return jack_port_monitoring_input (_port); - } - - void ensure_monitor_input (bool yn) { - jack_port_ensure_monitor (_port, yn); - } - - /*XXX completely bloody useless imho*/ - void request_monitor_input (bool yn) { - jack_port_request_monitor (_port, yn); - } - - nframes_t latency () const { - return jack_port_get_latency (_port); - } - - nframes_t total_latency() const; - - void set_latency (nframes_t nframes) { - jack_port_set_latency (_port, nframes); - } - - - protected: - friend class AudioEngine; - - JackPort (const std::string&, DataType type, Flags flags); - jack_port_t* _port; - - int disconnect (); - void recompute_total_latency() const; - - std::set _named_connections; -}; - -} // namespace ARDOUR - -#endif /* __ardour_jack_port_h__ */ diff --git a/libs/ardour/ardour/ladspa.h b/libs/ardour/ardour/ladspa.h deleted file mode 100644 index e552f35bb5..0000000000 --- a/libs/ardour/ardour/ladspa.h +++ /dev/null @@ -1,606 +0,0 @@ -/* ladspa.h - - Linux Audio Developer's Simple Plugin API Version 1.1[LGPL]. - Copyright (C) 2000-2002 Richard W.E. Furse, Paul Barton-Davis, - Stefan Westerfeld. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. */ - -#ifndef LADSPA_INCLUDED -#define LADSPA_INCLUDED - -#define LADSPA_VERSION "1.1" -#define LADSPA_VERSION_MAJOR 1 -#define LADSPA_VERSION_MINOR 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/*****************************************************************************/ - -/* Overview: - - There is a large number of synthesis packages in use or development - on the Linux platform at this time. This API (`The Linux Audio - Developer's Simple Plugin API') attempts to give programmers the - ability to write simple `plugin' audio processors in C/C++ and link - them dynamically (`plug') into a range of these packages (`hosts'). - It should be possible for any host and any plugin to communicate - completely through this interface. - - This API is deliberately short and simple. To achieve compatibility - with a range of promising Linux sound synthesis packages it - attempts to find the `greatest common divisor' in their logical - behaviour. Having said this, certain limiting decisions are - implicit, notably the use of a fixed type (LADSPA_Data) for all - data transfer and absence of a parameterised `initialisation' - phase. See below for the LADSPA_Data typedef. - - Plugins are expected to distinguish between control and audio - data. Plugins have `ports' that are inputs or outputs for audio or - control data and each plugin is `run' for a `block' corresponding - to a short time interval measured in samples. Audio data is - communicated using arrays of LADSPA_Data, allowing a block of audio - to be processed by the plugin in a single pass. Control data is - communicated using single LADSPA_Data values. Control data has a - single value at the start of a call to the `run()' or `run_adding()' - function, and may be considered to remain this value for its - duration. The plugin may assume that all its input and output ports - have been connected to the relevant data location (see the - `connect_port()' function below) before it is asked to run. - - Plugins will reside in shared object files suitable for dynamic - linking by dlopen() and family. The file will provide a number of - `plugin types' that can be used to instantiate actual plugins - (sometimes known as `plugin instances') that can be connected - together to perform tasks. - - This API contains very limited error-handling. */ - -/*****************************************************************************/ - -/* Fundamental data type passed in and out of plugin. This data type - is used to communicate audio samples and control values. It is - assumed that the plugin will work sensibly given any numeric input - value although it may have a preferred range (see hints below). - - For audio it is generally assumed that 1.0f is the `0dB' reference - amplitude and is a `normal' signal level. */ - -typedef float LADSPA_Data; - -/*****************************************************************************/ - -/* Special Plugin Properties: - - Optional features of the plugin type are encapsulated in the - LADSPA_Properties type. This is assembled by ORing individual - properties together. */ - - -typedef int LADSPA_Properties; - -/* Property LADSPA_PROPERTY_REALTIME indicates that the plugin has a - real-time dependency (e.g. listens to a MIDI device) and so its - output must not be cached or subject to significant latency. */ -#define LADSPA_PROPERTY_REALTIME 0x1 - -/* Property LADSPA_PROPERTY_INPLACE_BROKEN indicates that the plugin - may cease to work correctly if the host elects to use the same data - location for both input and output (see connect_port()). This - should be avoided as enabling this flag makes it impossible for - hosts to use the plugin to process audio `in-place.' */ -#define LADSPA_PROPERTY_INPLACE_BROKEN 0x2 - -/* Property LADSPA_PROPERTY_HARD_RT_CAPABLE indicates that the plugin - is capable of running not only in a conventional host but also in a - `hard real-time' environment. To qualify for this the plugin must - satisfy all of the following: - - (1) The plugin must not use malloc(), free() or other heap memory - management within its run() or run_adding() functions. All new - memory used in run() must be managed via the stack. These - restrictions only apply to the run() function. - - (2) The plugin will not attempt to make use of any library - functions with the exceptions of functions in the ANSI standard C - and C maths libraries, which the host is expected to provide. - - (3) The plugin will not access files, devices, pipes, sockets, IPC - or any other mechanism that might result in process or thread - blocking. - - (4) The plugin will take an amount of time to execute a run() or - run_adding() call approximately of form (A+B*SampleCount) where A - and B depend on the machine and host in use. This amount of time - may not depend on input signals or plugin state. The host is left - the responsibility to perform timings to estimate upper bounds for - A and B. */ -#define LADSPA_PROPERTY_HARD_RT_CAPABLE 0x4 - -#define LADSPA_IS_REALTIME(x) ((x) & LADSPA_PROPERTY_REALTIME) -#define LADSPA_IS_INPLACE_BROKEN(x) ((x) & LADSPA_PROPERTY_INPLACE_BROKEN) -#define LADSPA_IS_HARD_RT_CAPABLE(x) ((x) & LADSPA_PROPERTY_HARD_RT_CAPABLE) - -/*****************************************************************************/ - -/* Plugin Ports: - - Plugins have `ports' that are inputs or outputs for audio or - data. Ports can communicate arrays of LADSPA_Data (for audio - inputs/outputs) or single LADSPA_Data values (for control - input/outputs). This information is encapsulated in the - LADSPA_PortDescriptor type which is assembled by ORing individual - properties together. - - Note that a port must be an input or an output port but not both - and that a port must be a control or audio port but not both. */ - - -typedef int LADSPA_PortDescriptor; - -/* Property LADSPA_PORT_INPUT indicates that the port is an input. */ -#define LADSPA_PORT_INPUT 0x1 - -/* Property LADSPA_PORT_OUTPUT indicates that the port is an output. */ -#define LADSPA_PORT_OUTPUT 0x2 - -/* Property LADSPA_PORT_CONTROL indicates that the port is a control - port. */ -#define LADSPA_PORT_CONTROL 0x4 - -/* Property LADSPA_PORT_AUDIO indicates that the port is a audio - port. */ -#define LADSPA_PORT_AUDIO 0x8 - -#define LADSPA_IS_PORT_INPUT(x) ((x) & LADSPA_PORT_INPUT) -#define LADSPA_IS_PORT_OUTPUT(x) ((x) & LADSPA_PORT_OUTPUT) -#define LADSPA_IS_PORT_CONTROL(x) ((x) & LADSPA_PORT_CONTROL) -#define LADSPA_IS_PORT_AUDIO(x) ((x) & LADSPA_PORT_AUDIO) - -/*****************************************************************************/ - -/* Plugin Port Range Hints: - - The host may wish to provide a representation of data entering or - leaving a plugin (e.g. to generate a GUI automatically). To make - this more meaningful, the plugin should provide `hints' to the host - describing the usual values taken by the data. - - Note that these are only hints. The host may ignore them and the - plugin must not assume that data supplied to it is meaningful. If - the plugin receives invalid input data it is expected to continue - to run without failure and, where possible, produce a sensible - output (e.g. a high-pass filter given a negative cutoff frequency - might switch to an all-pass mode). - - Hints are meaningful for all input and output ports but hints for - input control ports are expected to be particularly useful. - - More hint information is encapsulated in the - LADSPA_PortRangeHintDescriptor type which is assembled by ORing - individual hint types together. Hints may require further - LowerBound and UpperBound information. - - All the hint information for a particular port is aggregated in the - LADSPA_PortRangeHint structure. */ - - -typedef int LADSPA_PortRangeHintDescriptor; - -/* Hint LADSPA_HINT_BOUNDED_BELOW indicates that the LowerBound field - of the LADSPA_PortRangeHint should be considered meaningful. The - value in this field should be considered the (inclusive) lower - bound of the valid range. If LADSPA_HINT_SAMPLE_RATE is also - specified then the value of LowerBound should be multiplied by the - sample rate. */ -#define LADSPA_HINT_BOUNDED_BELOW 0x1 - -/* Hint LADSPA_HINT_BOUNDED_ABOVE indicates that the UpperBound field - of the LADSPA_PortRangeHint should be considered meaningful. The - value in this field should be considered the (inclusive) upper - bound of the valid range. If LADSPA_HINT_SAMPLE_RATE is also - specified then the value of UpperBound should be multiplied by the - sample rate. */ -#define LADSPA_HINT_BOUNDED_ABOVE 0x2 - -/* Hint LADSPA_HINT_TOGGLED indicates that the data item should be - considered a Boolean toggle. Data less than or equal to zero should - be considered `off' or `false,' and data above zero should be - considered `on' or `true.' LADSPA_HINT_TOGGLED may not be used in - conjunction with any other hint except LADSPA_HINT_DEFAULT_0 or - LADSPA_HINT_DEFAULT_1. */ -#define LADSPA_HINT_TOGGLED 0x4 - -/* Hint LADSPA_HINT_SAMPLE_RATE indicates that any bounds specified - should be interpreted as multiples of the sample rate. For - instance, a frequency range from 0Hz to the Nyquist frequency (half - the sample rate) could be requested by this hint in conjunction - with LowerBound = 0 and UpperBound = 0.5. Hosts that support bounds - at all must support this hint to retain meaning. */ -#define LADSPA_HINT_SAMPLE_RATE 0x8 - -/* Hint LADSPA_HINT_LOGARITHMIC indicates that it is likely that the - user will find it more intuitive to view values using a logarithmic - scale. This is particularly useful for frequencies and gains. */ -#define LADSPA_HINT_LOGARITHMIC 0x10 - -/* Hint LADSPA_HINT_INTEGER indicates that a user interface would - probably wish to provide a stepped control taking only integer - values. Any bounds set should be slightly wider than the actual - integer range required to avoid floating point rounding errors. For - instance, the integer set {0,1,2,3} might be described as [-0.1, - 3.1]. */ -#define LADSPA_HINT_INTEGER 0x20 - -/* The various LADSPA_HINT_HAS_DEFAULT_* hints indicate a `normal' - value for the port that is sensible as a default. For instance, - this value is suitable for use as an initial value in a user - interface or as a value the host might assign to a control port - when the user has not provided one. Defaults are encoded using a - mask so only one default may be specified for a port. Some of the - hints make use of lower and upper bounds, in which case the - relevant bound or bounds must be available and - LADSPA_HINT_SAMPLE_RATE must be applied as usual. The resulting - default must be rounded if LADSPA_HINT_INTEGER is present. Default - values were introduced in LADSPA v1.1. */ -#define LADSPA_HINT_DEFAULT_MASK 0x3C0 - -/* This default values indicates that no default is provided. */ -#define LADSPA_HINT_DEFAULT_NONE 0x0 - -/* This default hint indicates that the suggested lower bound for the - port should be used. */ -#define LADSPA_HINT_DEFAULT_MINIMUM 0x40 - -/* This default hint indicates that a low value between the suggested - lower and upper bounds should be chosen. For ports with - LADSPA_HINT_LOGARITHMIC, this should be exp(log(lower) * 0.75 + - log(upper) * 0.25). Otherwise, this should be (lower * 0.75 + upper - * 0.25). */ -#define LADSPA_HINT_DEFAULT_LOW 0x80 - -/* This default hint indicates that a middle value between the - suggested lower and upper bounds should be chosen. For ports with - LADSPA_HINT_LOGARITHMIC, this should be exp(log(lower) * 0.5 + - log(upper) * 0.5). Otherwise, this should be (lower * 0.5 + upper * - 0.5). */ -#define LADSPA_HINT_DEFAULT_MIDDLE 0xC0 - -/* This default hint indicates that a high value between the suggested - lower and upper bounds should be chosen. For ports with - LADSPA_HINT_LOGARITHMIC, this should be exp(log(lower) * 0.25 + - log(upper) * 0.75). Otherwise, this should be (lower * 0.25 + upper - * 0.75). */ -#define LADSPA_HINT_DEFAULT_HIGH 0x100 - -/* This default hint indicates that the suggested upper bound for the - port should be used. */ -#define LADSPA_HINT_DEFAULT_MAXIMUM 0x140 - -/* This default hint indicates that the number 0 should be used. Note - that this default may be used in conjunction with - LADSPA_HINT_TOGGLED. */ -#define LADSPA_HINT_DEFAULT_0 0x200 - -/* This default hint indicates that the number 1 should be used. Note - that this default may be used in conjunction with - LADSPA_HINT_TOGGLED. */ -#define LADSPA_HINT_DEFAULT_1 0x240 - -/* This default hint indicates that the number 100 should be used. */ -#define LADSPA_HINT_DEFAULT_100 0x280 - -/* This default hint indicates that the Hz frequency of `concert A' - should be used. This will be 440 unless the host uses an unusual - tuning convention, in which case it may be within a few Hz. */ -#define LADSPA_HINT_DEFAULT_440 0x2C0 - -#define LADSPA_IS_HINT_BOUNDED_BELOW(x) ((x) & LADSPA_HINT_BOUNDED_BELOW) -#define LADSPA_IS_HINT_BOUNDED_ABOVE(x) ((x) & LADSPA_HINT_BOUNDED_ABOVE) -#define LADSPA_IS_HINT_TOGGLED(x) ((x) & LADSPA_HINT_TOGGLED) -#define LADSPA_IS_HINT_SAMPLE_RATE(x) ((x) & LADSPA_HINT_SAMPLE_RATE) -#define LADSPA_IS_HINT_LOGARITHMIC(x) ((x) & LADSPA_HINT_LOGARITHMIC) -#define LADSPA_IS_HINT_INTEGER(x) ((x) & LADSPA_HINT_INTEGER) - -#define LADSPA_IS_HINT_HAS_DEFAULT(x) ((x) & LADSPA_HINT_DEFAULT_MASK) -#define LADSPA_IS_HINT_DEFAULT_MINIMUM(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_MINIMUM) -#define LADSPA_IS_HINT_DEFAULT_LOW(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_LOW) -#define LADSPA_IS_HINT_DEFAULT_MIDDLE(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_MIDDLE) -#define LADSPA_IS_HINT_DEFAULT_HIGH(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_HIGH) -#define LADSPA_IS_HINT_DEFAULT_MAXIMUM(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_MAXIMUM) -#define LADSPA_IS_HINT_DEFAULT_0(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_0) -#define LADSPA_IS_HINT_DEFAULT_1(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_1) -#define LADSPA_IS_HINT_DEFAULT_100(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_100) -#define LADSPA_IS_HINT_DEFAULT_440(x) (((x) & LADSPA_HINT_DEFAULT_MASK) \ - == LADSPA_HINT_DEFAULT_440) - -typedef struct _LADSPA_PortRangeHint { - - /* Hints about the port. */ - LADSPA_PortRangeHintDescriptor HintDescriptor; - - /* Meaningful when hint LADSPA_HINT_BOUNDED_BELOW is active. When - LADSPA_HINT_SAMPLE_RATE is also active then this value should be - multiplied by the relevant sample rate. */ - LADSPA_Data LowerBound; - - /* Meaningful when hint LADSPA_HINT_BOUNDED_ABOVE is active. When - LADSPA_HINT_SAMPLE_RATE is also active then this value should be - multiplied by the relevant sample rate. */ - LADSPA_Data UpperBound; - -} LADSPA_PortRangeHint; - -/*****************************************************************************/ - -/* Plugin Handles: - - This plugin handle indicates a particular instance of the plugin - concerned. It is valid to compare this to NULL (0 for C++) but - otherwise the host should not attempt to interpret it. The plugin - may use it to reference internal instance data. */ - -typedef void * LADSPA_Handle; - -/*****************************************************************************/ - -/* Descriptor for a Type of Plugin: - - This structure is used to describe a plugin type. It provides a - number of functions to examine the type, instantiate it, link it to - buffers and workspaces and to run it. */ - -typedef struct _LADSPA_Descriptor { - - /* This numeric identifier indicates the plugin type - uniquely. Plugin programmers may reserve ranges of IDs from a - central body to avoid clashes. Hosts may assume that IDs are - below 0x1000000. */ - unsigned long UniqueID; - - /* This identifier can be used as a unique, case-sensitive - identifier for the plugin type within the plugin file. Plugin - types should be identified by file and label rather than by index - or plugin name, which may be changed in new plugin - versions. Labels must not contain white-space characters. */ - const char * Label; - - /* This indicates a number of properties of the plugin. */ - LADSPA_Properties Properties; - - /* This member points to the null-terminated name of the plugin - (e.g. "Sine Oscillator"). */ - const char * Name; - - /* This member points to the null-terminated string indicating the - maker of the plugin. This can be an empty string but not NULL. */ - const char * Maker; - - /* This member points to the null-terminated string indicating any - copyright applying to the plugin. If no Copyright applies the - string "None" should be used. */ - const char * Copyright; - - /* This indicates the number of ports (input AND output) present on - the plugin. */ - unsigned long PortCount; - - /* This member indicates an array of port descriptors. Valid indices - vary from 0 to PortCount-1. */ - const LADSPA_PortDescriptor * PortDescriptors; - - /* This member indicates an array of null-terminated strings - describing ports (e.g. "Frequency (Hz)"). Valid indices vary from - 0 to PortCount-1. */ - const char * const * PortNames; - - /* This member indicates an array of range hints for each port (see - above). Valid indices vary from 0 to PortCount-1. */ - const LADSPA_PortRangeHint * PortRangeHints; - - /* This may be used by the plugin developer to pass any custom - implementation data into an instantiate call. It must not be used - or interpreted by the host. It is expected that most plugin - writers will not use this facility as LADSPA_Handle should be - used to hold instance data. */ - void * ImplementationData; - - /* This member is a function pointer that instantiates a plugin. A - handle is returned indicating the new plugin instance. The - instantiation function accepts a sample rate as a parameter. The - plugin descriptor from which this instantiate function was found - must also be passed. This function must return NULL if - instantiation fails. - - Note that instance initialisation should generally occur in - activate() rather than here. */ - LADSPA_Handle (*instantiate)(const struct _LADSPA_Descriptor * Descriptor, - unsigned long SampleRate); - - /* This member is a function pointer that connects a port on an - instantiated plugin to a memory location at which a block of data - for the port will be read/written. The data location is expected - to be an array of LADSPA_Data for audio ports or a single - LADSPA_Data value for control ports. Memory issues will be - managed by the host. The plugin must read/write the data at these - locations every time run() or run_adding() is called and the data - present at the time of this connection call should not be - considered meaningful. - - connect_port() may be called more than once for a plugin instance - to allow the host to change the buffers that the plugin is - reading or writing. These calls may be made before or after - activate() or deactivate() calls. - - connect_port() must be called at least once for each port before - run() or run_adding() is called. When working with blocks of - LADSPA_Data the plugin should pay careful attention to the block - size passed to the run function as the block allocated may only - just be large enough to contain the block of samples. - - Plugin writers should be aware that the host may elect to use the - same buffer for more than one port and even use the same buffer - for both input and output (see LADSPA_PROPERTY_INPLACE_BROKEN). - However, overlapped buffers or use of a single buffer for both - audio and control data may result in unexpected behaviour. */ - void (*connect_port)(LADSPA_Handle Instance, - unsigned long Port, - LADSPA_Data * DataLocation); - - /* This member is a function pointer that initialises a plugin - instance and activates it for use. This is separated from - instantiate() to aid real-time support and so that hosts can - reinitialise a plugin instance by calling deactivate() and then - activate(). In this case the plugin instance must reset all state - information dependent on the history of the plugin instance - except for any data locations provided by connect_port() and any - gain set by set_run_adding_gain(). If there is nothing for - activate() to do then the plugin writer may provide a NULL rather - than an empty function. - - When present, hosts must call this function once before run() (or - run_adding()) is called for the first time. This call should be - made as close to the run() call as possible and indicates to - real-time plugins that they are now live. Plugins should not rely - on a prompt call to run() after activate(). activate() may not be - called again unless deactivate() is called first. Note that - connect_port() may be called before or after a call to - activate(). */ - void (*activate)(LADSPA_Handle Instance); - - /* This method is a function pointer that runs an instance of a - plugin for a block. Two parameters are required: the first is a - handle to the particular instance to be run and the second - indicates the block size (in samples) for which the plugin - instance may run. - - Note that if an activate() function exists then it must be called - before run() or run_adding(). If deactivate() is called for a - plugin instance then the plugin instance may not be reused until - activate() has been called again. - - If the plugin has the property LADSPA_PROPERTY_HARD_RT_CAPABLE - then there are various things that the plugin should not do - within the run() or run_adding() functions (see above). */ - void (*run)(LADSPA_Handle Instance, - unsigned long SampleCount); - - /* This method is a function pointer that runs an instance of a - plugin for a block. This has identical behaviour to run() except - in the way data is output from the plugin. When run() is used, - values are written directly to the memory areas associated with - the output ports. However when run_adding() is called, values - must be added to the values already present in the memory - areas. Furthermore, output values written must be scaled by the - current gain set by set_run_adding_gain() (see below) before - addition. - - run_adding() is optional. When it is not provided by a plugin, - this function pointer must be set to NULL. When it is provided, - the function set_run_adding_gain() must be provided also. */ - void (*run_adding)(LADSPA_Handle Instance, - unsigned long SampleCount); - - /* This method is a function pointer that sets the output gain for - use when run_adding() is called (see above). If this function is - never called the gain is assumed to default to 1. Gain - information should be retained when activate() or deactivate() - are called. - - This function should be provided by the plugin if and only if the - run_adding() function is provided. When it is absent this - function pointer must be set to NULL. */ - void (*set_run_adding_gain)(LADSPA_Handle Instance, - LADSPA_Data Gain); - - /* This is the counterpart to activate() (see above). If there is - nothing for deactivate() to do then the plugin writer may provide - a NULL rather than an empty function. - - Hosts must deactivate all activated units after they have been - run() (or run_adding()) for the last time. This call should be - made as close to the last run() call as possible and indicates to - real-time plugins that they are no longer live. Plugins should - not rely on prompt deactivation. Note that connect_port() may be - called before or after a call to deactivate(). - - Deactivation is not similar to pausing as the plugin instance - will be reinitialised when activate() is called to reuse it. */ - void (*deactivate)(LADSPA_Handle Instance); - - /* Once an instance of a plugin has been finished with it can be - deleted using the following function. The instance handle passed - ceases to be valid after this call. - - If activate() was called for a plugin instance then a - corresponding call to deactivate() must be made before cleanup() - is called. */ - void (*cleanup)(LADSPA_Handle Instance); - -} LADSPA_Descriptor; - -/**********************************************************************/ - -/* Accessing a Plugin: */ - -/* The exact mechanism by which plugins are loaded is host-dependent, - however all most hosts will need to know is the name of shared - object file containing the plugin types. To allow multiple hosts to - share plugin types, hosts may wish to check for environment - variable LADSPA_PATH. If present, this should contain a - colon-separated path indicating directories that should be searched - (in order) when loading plugin types. - - A plugin programmer must include a function called - "ladspa_descriptor" with the following function prototype within - the shared object file. This function will have C-style linkage (if - you are using C++ this is taken care of by the `extern "C"' clause - at the top of the file). - - A host will find the plugin shared object file by one means or - another, find the ladspa_descriptor() function, call it, and - proceed from there. - - Plugin types are accessed by index (not ID) using values from 0 - upwards. Out of range indexes must result in this function - returning NULL, so the plugin count can be determined by checking - for the least index that results in NULL being returned. */ - -const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index); - -/* Datatype corresponding to the ladspa_descriptor() function. */ -typedef const LADSPA_Descriptor * -(*LADSPA_Descriptor_Function)(unsigned long Index); - -/**********************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif /* LADSPA_INCLUDED */ - -/* EOF */ diff --git a/libs/ardour/ardour/ladspa_plugin.h b/libs/ardour/ardour/ladspa_plugin.h deleted file mode 100644 index b26e4120b1..0000000000 --- a/libs/ardour/ardour/ladspa_plugin.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_ladspa_plugin_h__ -#define __ardour_ladspa_plugin_h__ - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -namespace ARDOUR { -class AudioEngine; -class Session; - -class LadspaPlugin : public ARDOUR::Plugin -{ - public: - LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, nframes_t sample_rate); - LadspaPlugin (const LadspaPlugin &); - ~LadspaPlugin (); - - /* Plugin interface */ - - std::string unique_id() const; - const char* label() const { return _descriptor->Label; } - const char* name() const { return _descriptor->Name; } - const char* maker() const { return _descriptor->Maker; } - uint32_t parameter_count() const { return _descriptor->PortCount; } - float default_value (uint32_t port); - nframes_t signal_latency() const; - void set_parameter (uint32_t port, float val); - float get_parameter (uint32_t port) const; - int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const; - uint32_t nth_parameter (uint32_t port, bool& ok) const; - - std::set automatable() const; - - void activate () { - if (!_was_activated && _descriptor->activate) - _descriptor->activate (_handle); - - _was_activated = true; - } - - void deactivate () { - if (_was_activated && _descriptor->deactivate) - _descriptor->deactivate (_handle); - - _was_activated = false; - } - - void cleanup () { - activate(); - deactivate(); - - if (_descriptor->cleanup) - _descriptor->cleanup (_handle); - } - - void set_block_size (nframes_t nframes) {} - - int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset); - std::string describe_parameter (Parameter); - std::string state_node_name() const { return "ladspa"; } - void print_parameter (uint32_t, char*, uint32_t len) const; - - bool parameter_is_audio(uint32_t) const; - bool parameter_is_control(uint32_t) const; - bool parameter_is_input(uint32_t) const; - bool parameter_is_output(uint32_t) const; - bool parameter_is_toggled(uint32_t) const; - - XMLNode& get_state(); - int set_state(const XMLNode& node); - bool save_preset(std::string name); - - bool has_editor() const { return false; } - - int require_output_streams (uint32_t); - - /* LADSPA extras */ - - LADSPA_Properties properties() const { return _descriptor->Properties; } - uint32_t index() const { return _index; } - const char * copyright() const { return _descriptor->Copyright; } - LADSPA_PortDescriptor port_descriptor(uint32_t i) const { return _descriptor->PortDescriptors[i]; } - const LADSPA_PortRangeHint* port_range_hints() const { return _descriptor->PortRangeHints; } - const char * const * port_names() const { return _descriptor->PortNames; } - - void set_gain (float gain) { _descriptor->set_run_adding_gain (_handle, gain); } - void run_adding (uint32_t nsamples) { _descriptor->run_adding (_handle, nsamples); } - void connect_port (uint32_t port, float *ptr) { _descriptor->connect_port (_handle, port, ptr); } - - private: - void* _module; - const LADSPA_Descriptor* _descriptor; - LADSPA_Handle _handle; - nframes_t _sample_rate; - LADSPA_Data* _control_data; - LADSPA_Data* _shadow_data; - LADSPA_Data* _latency_control_port; - uint32_t _index; - bool _was_activated; - - void init (void *mod, uint32_t index, nframes_t rate); - void run_in_place (nframes_t nsamples); - void latency_compute_run (); -}; - -class LadspaPluginInfo : public PluginInfo { - public: - LadspaPluginInfo () { }; - ~LadspaPluginInfo () { }; - - PluginPtr load (Session& session); -}; - -typedef boost::shared_ptr LadspaPluginInfoPtr; - -} // namespace ARDOUR - -#endif /* __ardour_ladspa_plugin_h__ */ diff --git a/libs/ardour/ardour/latent.h b/libs/ardour/ardour/latent.h deleted file mode 100644 index 11bdf11370..0000000000 --- a/libs/ardour/ardour/latent.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ardour_latent_h__ -#define __ardour_latent_h__ - -#include - -namespace ARDOUR { - -class Latent { - public: - Latent() : _own_latency (0), _user_latency (0) {} - virtual ~Latent() {} - - virtual nframes_t signal_latency() const = 0; - nframes_t user_latency () const { return _user_latency; } - - virtual void set_latency_delay (nframes_t val) { _own_latency = val; } - virtual void set_user_latency (nframes_t val) { _user_latency = val; } - - protected: - nframes_t _own_latency; - nframes_t _user_latency; -}; - -} - -#endif /* __ardour_latent_h__*/ diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h deleted file mode 100644 index 53d9489823..0000000000 --- a/libs/ardour/ardour/location.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_location_h__ -#define __ardour_location_h__ - -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -#include - -using std::string; - -namespace ARDOUR { - -class Location : public PBD::StatefulDestructible -{ - public: - enum Flags { - IsMark = 0x1, - IsAutoPunch = 0x2, - IsAutoLoop = 0x4, - IsHidden = 0x8, - IsCDMarker = 0x10, - IsEnd = 0x20, - IsRangeMarker = 0x40, - IsStart = 0x80 - }; - - Location (nframes_t sample_start, - nframes_t sample_end, - const string &name, - Flags bits = Flags(0)) - - : _name (name), - _start (sample_start), - _end (sample_end), - _flags (bits), - _locked (false) { } - - Location () { - _start = 0; - _end = 0; - _flags = Flags (0); - _locked = false; - } - - Location (const Location& other); - Location (const XMLNode&); - Location* operator= (const Location& other); - - bool locked() const { return _locked; } - void lock() { _locked = true; changed (this); } - void unlock() { _locked = false; changed (this); } - - nframes_t start() const { return _start; } - nframes_t end() const { return _end; } - nframes_t length() const { return _end - _start; } - - int set_start (nframes_t s); - int set_end (nframes_t e); - int set (nframes_t start, nframes_t end); - - int move_to (nframes_t pos); - - const string& name() { return _name; } - void set_name (const string &str) { _name = str; name_changed(this); } - - void set_auto_punch (bool yn, void *src); - void set_auto_loop (bool yn, void *src); - void set_hidden (bool yn, void *src); - void set_cd (bool yn, void *src); - void set_is_end (bool yn, void* src); - void set_is_start (bool yn, void* src); - - bool is_auto_punch () { return _flags & IsAutoPunch; } - bool is_auto_loop () { return _flags & IsAutoLoop; } - bool is_mark () { return _flags & IsMark; } - bool is_hidden () { return _flags & IsHidden; } - bool is_cd_marker () { return _flags & IsCDMarker; } - bool is_end() { return _flags & IsEnd; } - bool is_start() { return _flags & IsStart; } - bool is_range_marker() { return _flags & IsRangeMarker; } - - sigc::signal name_changed; - sigc::signal end_changed; - sigc::signal start_changed; - - sigc::signal FlagsChanged; - - /* this is sent only when both start&end change at the same time */ - - sigc::signal changed; - - /* CD Track / CD-Text info */ - - std::map cd_info; - XMLNode& cd_info_node (const string &, const string &); - - XMLNode& get_state (void); - int set_state (const XMLNode&); - - private: - string _name; - nframes_t _start; - nframes_t _end; - Flags _flags; - bool _locked; - - void set_mark (bool yn); - bool set_flag_internal (bool yn, Flags flag); -}; - -class Locations : public PBD::StatefulDestructible -{ - public: - typedef std::list LocationList; - - Locations (); - ~Locations (); - - const LocationList& list() { return locations; } - - void add (Location *, bool make_current = false); - void remove (Location *); - void clear (); - void clear_markers (); - void clear_ranges (); - - XMLNode& get_state (void); - int set_state (const XMLNode&); - Location *get_location_by_id(PBD::ID); - - Location* auto_loop_location () const; - Location* auto_punch_location () const; - Location* end_location() const; - Location* start_location() const; - - int next_available_name(string& result,string base); - uint32_t num_range_markers() const; - - int set_current (Location *, bool want_lock = true); - Location *current () const { return current_location; } - - Location *first_location_before (nframes_t, bool include_special_ranges = false); - Location *first_location_after (nframes_t, bool include_special_ranges = false); - - nframes_t first_mark_before (nframes_t, bool include_special_ranges = false); - nframes_t first_mark_after (nframes_t, bool include_special_ranges = false); - - sigc::signal current_changed; - sigc::signal changed; - sigc::signal added; - sigc::signal removed; - sigc::signal StateChanged; - - template void apply (T& obj, void (T::*method)(LocationList&)) { - Glib::Mutex::Lock lm (lock); - (obj.*method)(locations); - } - - template void apply (T1& obj, void (T1::*method)(LocationList&, T2& arg), T2& arg) { - Glib::Mutex::Lock lm (lock); - (obj.*method)(locations, arg); - } - - private: - - LocationList locations; - Location *current_location; - mutable Glib::Mutex lock; - - int set_current_unlocked (Location *); - void location_changed (Location*); -}; - -} // namespace ARDOUR - -#endif /* __ardour_location_h__ */ diff --git a/libs/ardour/ardour/logcurve.h b/libs/ardour/ardour/logcurve.h deleted file mode 100644 index dd58263313..0000000000 --- a/libs/ardour/ardour/logcurve.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright (C) 2001 Steve Harris & Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_logcurve_h__ -#define __ardour_logcurve_h__ - -#include -#include - -namespace ARDOUR { - -class LogCurve { - public: - LogCurve (float steepness = 0.2, uint32_t len = 0) { - l = len; - S = steepness; - a = log(S); - b = 1.0f / log(1.0f + (1.0f / S)); - } - - bool operator== (const LogCurve& other) const { - return S == other.S && l == other.l; - } - - bool operator!= (const LogCurve& other) const { - return S != other.S || l != other.l; - } - - float value (float frac) const { - return (fast_log(frac + S) - a) * b; - } - - float value (uint32_t pos) const { - return (fast_log(((float) pos/l) + S) - a) * b; - } - - float invert_value (float frac) const { - return (a - fast_log(frac + S)) * b; - } - - float invert_value (uint32_t pos) const { - return (a - fast_log(((float) pos/l) + S)) * b; - } - - void fill (float *vec, uint32_t veclen, bool invert) const { - float dx = 1.0f/veclen; - float x; - uint32_t i; - - if (!invert) { - - vec[0] = 0.0; - vec[veclen-1] = 1.0; - - for (i = 1, x = 0; i < veclen - 1; x += dx, i++) { - vec[i] = value (x); - } - - } else { - - vec[0] = 1.0; - vec[veclen-1] = 0.0; - - for (i = veclen-2, x = 0.0f; i > 0; x += dx, i--) { - vec[i] = value (x); - } - } - } - - float steepness() const { return S; } - uint32_t length() const { return l; } - - void set_steepness (float steepness) { - S = steepness; - a = log(S); - b = 1.0f / log(1.0f + (1.0f / S)); - } - void set_length (uint32_t len) { l = len; } - - mutable Glib::Mutex lock; - - protected: - float a; - float b; - float S; - uint32_t l; -}; - -class LogCurveIn : public LogCurve -{ - public: - LogCurveIn (float steepness = 0.2, uint32_t len = 0) - : LogCurve (steepness, len) {} - - float value (float frac) const { - return (fast_log(frac + S) - a) * b; - } - - float value (uint32_t pos) const { - return (fast_log(((float) pos/l) + S) - a) * b; - } -}; - -class LogCurveOut : public LogCurve -{ - public: - LogCurveOut (float steepness = 0.2, uint32_t len = 0) - : LogCurve (steepness, len) {} - -}; - -} // namespace ARDOUR - -#endif /* __ardour_logcurve_h__ */ - - diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h deleted file mode 100644 index d20ece65bd..0000000000 --- a/libs/ardour/ardour/lv2_plugin.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_lv2_plugin_h__ -#define __ardour_lv2_plugin_h__ - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -namespace ARDOUR { -class AudioEngine; -class Session; -struct LV2World; - -class LV2Plugin : public ARDOUR::Plugin -{ - public: - LV2Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&, ARDOUR::LV2World&, SLV2Plugin plugin, nframes_t sample_rate); - LV2Plugin (const LV2Plugin &); - ~LV2Plugin (); - - /* Plugin interface */ - - std::string unique_id() const; - const char* label() const { return slv2_value_as_string(_name); } - const char* name() const { return slv2_value_as_string(_name); } - const char* maker() const { return _author ? slv2_value_as_string(_author) : "Unknown"; } - uint32_t parameter_count() const { return slv2_plugin_get_num_ports(_plugin); } - float default_value (uint32_t port); - nframes_t signal_latency() const; - void set_parameter (uint32_t port, float val); - float get_parameter (uint32_t port) const; - int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const; - uint32_t nth_parameter (uint32_t port, bool& ok) const; - - SLV2Plugin slv2_plugin() { return _plugin; } - SLV2Port slv2_port(uint32_t i) { return slv2_plugin_get_port_by_index(_plugin, i); } - - std::set automatable() const; - - void activate () { - if (!_was_activated) { - slv2_instance_activate(_instance); - _was_activated = true; - } - } - - void deactivate () { - if (_was_activated) { - slv2_instance_deactivate(_instance); - _was_activated = false; - } - } - - void cleanup () { - activate(); - deactivate(); - slv2_instance_free(_instance); - _instance = NULL; - } - - void set_block_size (nframes_t nframes) {} - - int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset); - std::string describe_parameter (Parameter); - std::string state_node_name() const { return "lv2"; } - void print_parameter (uint32_t, char*, uint32_t len) const; - - bool parameter_is_audio(uint32_t) const; - bool parameter_is_control(uint32_t) const; - bool parameter_is_midi(uint32_t) const; - bool parameter_is_input(uint32_t) const; - bool parameter_is_output(uint32_t) const; - bool parameter_is_toggled(uint32_t) const; - - XMLNode& get_state(); - int set_state(const XMLNode& node); - bool save_preset(std::string name); - - bool has_editor() const { return false; } - - int require_output_streams (uint32_t); - - private: - void* _module; - LV2World& _world; - SLV2Plugin _plugin; - SLV2Value _name; - SLV2Value _author; - SLV2Instance _instance; - nframes_t _sample_rate; - float* _control_data; - float* _shadow_data; - float* _defaults; - float* _latency_control_port; - bool _was_activated; - vector _port_is_input; - - void init (LV2World& world, SLV2Plugin plugin, nframes_t rate); - void run (nframes_t nsamples); - void latency_compute_run (); -}; - - -/** The SLV2World, and various cached (as symbols, fast) URIs. - * - * This object represents everything ardour 'knows' about LV2 - * (ie understood extensions/features/etc) - */ -struct LV2World { - LV2World(); - ~LV2World(); - - SLV2World world; - SLV2Value input_class; ///< Input port - SLV2Value output_class; ///< Output port - SLV2Value audio_class; ///< Audio port - SLV2Value control_class; ///< Control port - SLV2Value event_class; ///< Event port - SLV2Value midi_class; ///< MIDI event - SLV2Value in_place_broken; - SLV2Value integer; - SLV2Value toggled; - SLV2Value srate; -}; - - -class LV2PluginInfo : public PluginInfo { -public: - LV2PluginInfo (void* slv2_world, void* slv2_plugin);; - ~LV2PluginInfo ();; - static PluginInfoList discover (void* slv2_world); - - PluginPtr load (Session& session); - - void* _lv2_world; - void* _slv2_plugin; -}; - -typedef boost::shared_ptr LV2PluginInfoPtr; - -} // namespace ARDOUR - -#endif /* __ardour_lv2_plugin_h__ */ diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h deleted file mode 100644 index e19c0a51ca..0000000000 --- a/libs/ardour/ardour/meter.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_meter_h__ -#define __ardour_meter_h__ - -#include -#include -#include -#include - -namespace ARDOUR { - -class BufferSet; -class ChanCount; -class Session; - - -/** Meters peaks on the input and stores them for access. - */ -class PeakMeter : public Processor { -public: - PeakMeter(Session& s) : Processor(s, "meter", PreFader) {} - - void reset (); - void reset_max (); - - bool configure_io (ChanCount in, ChanCount out); - - /** Compute peaks */ - void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset); - - float peak_power (uint32_t n) { - if (n < _visible_peak_power.size()) { - return _visible_peak_power[n]; - } else { - return minus_infinity(); - } - } - - float max_peak_power (uint32_t n) { - if (n < _max_peak_power.size()) { - return _max_peak_power[n]; - } else { - return minus_infinity(); - } - } - -private: - - friend class IO; - void meter(); - - std::vector _peak_power; - std::vector _visible_peak_power; - std::vector _max_peak_power; -}; - - -} // namespace ARDOUR - -#endif // __ardour_meter_h__ diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h deleted file mode 100644 index 699f461b17..0000000000 --- a/libs/ardour/ardour/midi_buffer.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_midi_buffer_h__ -#define __ardour_midi_buffer_h__ - -#include -#include - -namespace ARDOUR { - - -/** Buffer containing 8-bit unsigned char (MIDI) data. */ -class MidiBuffer : public Buffer -{ -public: - MidiBuffer(size_t capacity); - ~MidiBuffer(); - - void silence(nframes_t dur, nframes_t offset=0); - - void read_from(const Buffer& src, nframes_t nframes, nframes_t offset); - - void copy(const MidiBuffer& copy); - - bool push_back(const MIDI::Event& event); - bool push_back(const jack_midi_event_t& event); - uint8_t* reserve(double time, size_t size); - - void resize(size_t); - - bool merge(const MidiBuffer& a, const MidiBuffer& b); - - struct iterator { - iterator(MidiBuffer& b, size_t i) : buffer(b), index(i) {} - - inline MIDI::Event& operator*() const { return buffer[index]; } - inline iterator& operator++() { ++index; return *this; } // prefix - inline bool operator!=(const iterator& other) const { return index != other.index; } - - MidiBuffer& buffer; - size_t index; - }; - - struct const_iterator { - const_iterator(const MidiBuffer& b, size_t i) : buffer(b), index(i) {} - - inline const MIDI::Event& operator*() const { return buffer[index]; } - inline const_iterator& operator++() { ++index; return *this; } // prefix - inline bool operator!=(const const_iterator& other) const { return index != other.index; } - - const MidiBuffer& buffer; - size_t index; - }; - - iterator begin() { return iterator(*this, 0); } - iterator end() { return iterator(*this, _size); } - - const_iterator begin() const { return const_iterator(*this, 0); } - const_iterator end() const { return const_iterator(*this, _size); } - -private: - - friend class iterator; - friend class const_iterator; - - const MIDI::Event& operator[](size_t i) const { assert(i < _size); return _events[i]; } - MIDI::Event& operator[](size_t i) { assert(i < _size); return _events[i]; } - - // FIXME: Eliminate this - static const size_t MAX_EVENT_SIZE = 4; // bytes - - /* We use _size as "number of events", so the size of _data is - * (_size * MAX_EVENT_SIZE) - */ - - /* FIXME: this is utter crap. rewrite as a flat/packed buffer like MidiRingBuffer */ - - MIDI::Event* _events; ///< Event structs that point to offsets in _data - uint8_t* _data; ///< MIDI, straight up. No time stamps. -}; - - -} // namespace ARDOUR - -#endif // __ardour_midi_buffer_h__ diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h deleted file mode 100644 index 28e80816a8..0000000000 --- a/libs/ardour/ardour/midi_diskstream.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: diskstream.h 579 2006-06-12 19:56:37Z essej $ -*/ - -#ifndef __ardour_midi_diskstream_h__ -#define __ardour_midi_diskstream_h__ - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct tm; - -namespace ARDOUR { - -class MidiEngine; -class Send; -class Session; -class MidiPlaylist; -class SMFSource; -class IO; - -class MidiDiskstream : public Diskstream -{ - public: - MidiDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable); - MidiDiskstream (Session &, const XMLNode&); - ~MidiDiskstream(); - - float playback_buffer_load() const; - float capture_buffer_load() const; - - void get_playback(MidiBuffer& dst, nframes_t start, nframes_t end); - - void set_record_enabled (bool yn); - - boost::shared_ptr midi_playlist () { return boost::dynamic_pointer_cast(_playlist); } - - int use_playlist (boost::shared_ptr); - int use_new_playlist (); - int use_copy_playlist (); - - /* stateful */ - XMLNode& get_state(void); - int set_state(const XMLNode& node); - - void monitor_input (bool); - - boost::shared_ptr write_source () { return _write_source; } - - int set_destructive (bool yn); // doom! - - void set_note_mode (NoteMode m); - - uint16_t get_channel_mask() { - uint16_t playback_mask = _playback_buf->get_channel_mask(); -#ifndef NDEBUG - uint16_t capture_mask = _capture_buf->get_channel_mask(); - assert(playback_mask == capture_mask); -#endif - return playback_mask; - } - - void set_channel_mode(ChannelMode mode, uint16_t mask) { - _playback_buf->set_channel_mode(mode, mask); - _capture_buf->set_channel_mode(mode, mask); - } - - ChannelMode get_channel_mode() { - ChannelMode playback_mode = _playback_buf->get_channel_mode(); -#ifndef NDEBUG - ChannelMode capture_mode = _capture_buf->get_channel_mode(); - assert(playback_mode == capture_mode); -#endif - return playback_mode; - } - - protected: - friend class Session; - - /* the Session is the only point of access for these - because they require that the Session is "inactive" - while they are called. - */ - - void set_pending_overwrite(bool); - int overwrite_existing_buffers (); - void set_block_size (nframes_t); - int internal_playback_seek (nframes_t distance); - int can_internal_playback_seek (nframes_t distance); - int rename_write_sources (); - void reset_write_sources (bool, bool force = false); - void non_realtime_input_change (); - void non_realtime_locate (nframes_t location); - - protected: - int seek (nframes_t which_sample, bool complete_refill = false); - - protected: - friend class MidiTrack; - - int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input); - bool commit (nframes_t nframes); - - private: - - /* The two central butler operations */ - int do_flush (Session::RunContext context, bool force = false); - int do_refill (); - - int do_refill_with_alloc(); - - int read (nframes_t& start, nframes_t cnt, bool reversed); - - void finish_capture (bool rec_monitors_input); - void transport_stopped (struct tm&, time_t, bool abort); - void transport_looped (nframes_t transport_frame); - - void init (Diskstream::Flag); - - int use_new_write_source (uint32_t n=0); - - int find_and_use_playlist (const string&); - - void allocate_temporary_buffers (); - - int use_pending_capture_data (XMLNode& node); - - void get_input_sources (); - void check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record); - void set_align_style_from_io(); - - void engage_record_enable (); - void disengage_record_enable (); - - MidiRingBuffer* _playback_buf; - MidiRingBuffer* _capture_buf; - MidiPort* _source_port; - boost::shared_ptr _write_source; - nframes_t _last_flush_frame; - NoteMode _note_mode; -}; - -}; /* namespace ARDOUR */ - -#endif /* __ardour_midi_diskstream_h__ */ diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h deleted file mode 100644 index 2481aa8d34..0000000000 --- a/libs/ardour/ardour/midi_model.h +++ /dev/null @@ -1,252 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_midi_model_h__ -#define __ardour_midi_model_h__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Session; -class MidiSource; - -/** - * This class keeps track of the current x and y for a control - */ -class MidiControlIterator { -public: - boost::shared_ptr automation_list; - double x; - double y; - - MidiControlIterator(boost::shared_ptr a_list, - double a_x, - double a_y) - : automation_list(a_list) - , x(a_x) - , y(a_y) - {} -}; - - -/** This is a higher level (than MidiBuffer) model of MIDI data, with separate - * representations for notes (instead of just unassociated note on/off events) - * and controller data. Controller data is represented as part of the - * Automatable base (i.e. in a map of AutomationList, keyed by Parameter). - */ -class MidiModel : public boost::noncopyable, public Automatable { -public: - MidiModel(MidiSource* s, size_t size=0); - - void write_lock(); - void write_unlock(); - - void read_lock() const; - void read_unlock() const; - - void clear(); - - NoteMode note_mode() const { return _note_mode; } - void set_note_mode(NoteMode mode) { _note_mode = mode; } - - void start_write(); - bool writing() const { return _writing; } - void end_write(bool delete_stuck=false); - - size_t read (MidiRingBuffer& dst, nframes_t start, nframes_t nframes, nframes_t stamp_offset, nframes_t negative_stamp_offset) const; - - /** Resizes vector if necessary (NOT realtime safe) */ - void append(const MIDI::Event& ev); - - inline const boost::shared_ptr note_at(unsigned i) const { return _notes[i]; } - inline const boost::shared_ptr note_at(unsigned i) { return _notes[i]; } - - inline size_t n_notes() const { return _notes.size(); } - inline bool empty() const { return _notes.size() == 0 && _controls.size() == 0; } - - inline static bool note_time_comparator (const boost::shared_ptr a, - const boost::shared_ptr b) { - return a->time() < b->time(); - } - - struct LaterNoteEndComparator { - typedef const Note* value_type; - inline bool operator()(const boost::shared_ptr a, - const boost::shared_ptr b) const { - return a->end_time() > b->end_time(); - } - }; - - typedef std::vector< boost::shared_ptr > Notes; - inline Notes& notes() { return _notes; } - inline const Notes& notes() const { return _notes; } - - /** Add/Remove notes. - * Technically all operations can be implemented as one of these. - */ - class DeltaCommand : public Command - { - public: - DeltaCommand (boost::shared_ptr m, const std::string& name); - DeltaCommand (boost::shared_ptr, const XMLNode& node); - - const std::string& name() const { return _name; } - - void operator()(); - void undo(); - - int set_state (const XMLNode&); - XMLNode& get_state (); - - void add(const boost::shared_ptr note); - void remove(const boost::shared_ptr note); - - private: - XMLNode &marshal_note(const boost::shared_ptr note); - boost::shared_ptr unmarshal_note(XMLNode *xml_note); - - boost::shared_ptr _model; - const std::string _name; - - typedef std::list< boost::shared_ptr > NoteList; - - NoteList _added_notes; - NoteList _removed_notes; - }; - - MidiModel::DeltaCommand* new_delta_command(const std::string name="midi edit"); - void apply_command(Command* cmd); - - bool edited() const { return _edited; } - void set_edited(bool yn) { _edited = yn; } - bool write_to(boost::shared_ptr source); - - // MidiModel doesn't use the normal AutomationList serialisation code - // since controller data is stored in the .mid - XMLNode& get_state(); - int set_state(const XMLNode&) { return 0; } - - sigc::signal ContentsChanged; - - /** Read iterator */ - class const_iterator { - public: - const_iterator(const MidiModel& model, double t); - ~const_iterator(); - - inline bool locked() const { return _locked; } - - const MIDI::Event& operator*() const { return *_event; } - const boost::shared_ptr operator->() const { return _event; } - const boost::shared_ptr get_event_pointer() { return _event; } - - const const_iterator& operator++(); // prefix only - bool operator==(const const_iterator& other) const; - bool operator!=(const const_iterator& other) const { return ! operator==(other); } - - const_iterator& operator=(const const_iterator& other); - - private: - friend class MidiModel; - - const MidiModel* _model; - boost::shared_ptr _event; - - typedef std::priority_queue< - boost::shared_ptr, std::deque< boost::shared_ptr >, - LaterNoteEndComparator> - ActiveNotes; - - mutable ActiveNotes _active_notes; - - bool _is_end; - bool _locked; - Notes::const_iterator _note_iter; - std::vector _control_iters; - std::vector::iterator _control_iter; - }; - - const_iterator begin() const { return const_iterator(*this, 0); } - const const_iterator& end() const { return _end_iter; } - - const MidiSource* midi_source() const { return _midi_source; } - void set_midi_source(MidiSource* source) { _midi_source = source; } - bool control_to_midi_event(boost::shared_ptr& ev, const MidiControlIterator& iter) const; - -private: - friend class DeltaCommand; - void add_note_unlocked(const boost::shared_ptr note); - void remove_note_unlocked(const boost::shared_ptr note); - - friend class const_iterator; - -#ifndef NDEBUG - bool is_sorted() const; -#endif - - void append_note_on_unlocked(uint8_t chan, double time, uint8_t note, uint8_t velocity); - void append_note_off_unlocked(uint8_t chan, double time, uint8_t note); - void append_automation_event_unlocked(AutomationType type, uint8_t chan, double time, uint8_t first_byte, uint8_t second_byte); - void append_pgm_change_unlocked(uint8_t chan, double time, uint8_t number); - - mutable Glib::RWLock _lock; - - Notes _notes; - - NoteMode _note_mode; - - typedef std::vector WriteNotes; - WriteNotes _write_notes[16]; - bool _writing; - bool _edited; - - typedef std::vector< boost::shared_ptr > AutomationLists; - AutomationLists _dirty_automations; - - const const_iterator _end_iter; - - mutable nframes_t _next_read; - mutable const_iterator _read_iter; - - typedef std::priority_queue< - boost::shared_ptr, std::deque< boost::shared_ptr >, - LaterNoteEndComparator> - ActiveNotes; - - // We cannot use a boost::shared_ptr here to avoid a retain cycle - MidiSource* _midi_source; -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_midi_model_h__ */ - diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h deleted file mode 100644 index dcc202bbf4..0000000000 --- a/libs/ardour/ardour/midi_playlist.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_midi_playlist_h__ -#define __ardour_midi_playlist_h__ - -#include -#include - -#include -#include -#include - -namespace ARDOUR -{ - -class Session; -class Region; -class MidiRegion; -class Source; -class MidiRingBuffer; - -class MidiPlaylist : public ARDOUR::Playlist -{ -public: - MidiPlaylist (Session&, const XMLNode&, bool hidden = false); - MidiPlaylist (Session&, string name, bool hidden = false); - MidiPlaylist (boost::shared_ptr other, string name, bool hidden = false); - MidiPlaylist (boost::shared_ptr other, nframes_t start, nframes_t cnt, - string name, bool hidden = false); - - ~MidiPlaylist (); - - nframes_t read (MidiRingBuffer& buf, - nframes_t start, nframes_t cnt, uint32_t chan_n=0); - - int set_state (const XMLNode&); - UndoAction get_memento() const; - - bool destroy_region (boost::shared_ptr); - - void set_note_mode (NoteMode m) { _note_mode = m; } - - std::set contained_automation(); - -protected: - - /* playlist "callbacks" */ - - void finalize_split_region (boost::shared_ptr original, boost::shared_ptr left, boost::shared_ptr right); - - void check_dependents (boost::shared_ptr region, bool norefresh); - void refresh_dependents (boost::shared_ptr region); - void remove_dependents (boost::shared_ptr region); - -private: - void dump () const; - - bool region_changed (Change, boost::shared_ptr); - - NoteMode _note_mode; -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_midi_playlist_h__ */ - - diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h deleted file mode 100644 index 485834aaff..0000000000 --- a/libs/ardour/ardour/midi_port.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: port.h 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#ifndef __ardour_midi_port_h__ -#define __ardour_midi_port_h__ - -#include - -namespace ARDOUR { - -class MidiEngine; - -class MidiPort : public BaseMidiPort, public PortFacade { - public: - ~MidiPort(); - - void reset (); - - void cycle_start (nframes_t nframes, nframes_t offset); - void cycle_end (nframes_t nframes, nframes_t offset); - - protected: - friend class AudioEngine; - - MidiPort (const std::string& name, Flags, bool external, nframes_t bufsize); -}; - -} // namespace ARDOUR - -#endif /* __ardour_midi_port_h__ */ diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h deleted file mode 100644 index cd2b0d6132..0000000000 --- a/libs/ardour/ardour/midi_region.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: midiregion.h 733 2006-08-01 17:19:38Z drobilla $ -*/ - -#ifndef __ardour_midi_region_h__ -#define __ardour_midi_region_h__ - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Route; -class Playlist; -class Session; -class MidiFilter; -class MidiSource; -class MidiRingBuffer; - -class MidiRegion : public Region -{ - public: - ~MidiRegion(); - - boost::shared_ptr midi_source (uint32_t n=0) const; - - /* Stub Readable interface */ - virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const { return 0; } - virtual nframes64_t readable_length() const { return length(); } - - nframes_t read_at (MidiRingBuffer& dst, - nframes_t position, - nframes_t dur, - uint32_t chan_n = 0, - NoteMode mode = Sustained) const; - - nframes_t master_read_at (MidiRingBuffer& dst, - nframes_t position, - nframes_t dur, - uint32_t chan_n = 0, - NoteMode mode = Sustained) const; - - XMLNode& state (bool); - int set_state (const XMLNode&); - - int separate_by_channel (ARDOUR::Session&, vector&) const; - - UndoAction get_memento() const; - - // Act as a proxy for MidiModel automation stuff (for CC) - // Yep, this is pretty ugly... - Controls& controls() { return midi_source()->model()->controls(); } - const Controls& controls() const { return midi_source()->model()->controls(); } - - boost::shared_ptr control(Parameter id, bool create_if_missing=false) - { return midi_source()->model()->control(id, create_if_missing); } - - boost::shared_ptr control(Parameter id) const - { return midi_source()->model()->control(id); } - - int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&); - - private: - friend class RegionFactory; - - MidiRegion (boost::shared_ptr, nframes_t start, nframes_t length); - MidiRegion (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - MidiRegion (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - MidiRegion (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - MidiRegion (boost::shared_ptr); - MidiRegion (boost::shared_ptr, const XMLNode&); - MidiRegion (const SourceList &, const XMLNode&); - - private: - nframes_t _read_at (const SourceList&, MidiRingBuffer& dst, - nframes_t position, - nframes_t dur, - uint32_t chan_n = 0, - NoteMode mode = Sustained) const; - - void recompute_at_start (); - void recompute_at_end (); - - void switch_source(boost::shared_ptr source); - - protected: - - int set_live_state (const XMLNode&, Change&, bool send); -}; - -} /* namespace ARDOUR */ - - -#endif /* __ardour_midi_region_h__ */ diff --git a/libs/ardour/ardour/midi_ring_buffer.h b/libs/ardour/ardour/midi_ring_buffer.h deleted file mode 100644 index ff0be5c997..0000000000 --- a/libs/ardour/ardour/midi_ring_buffer.h +++ /dev/null @@ -1,466 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_midi_ring_buffer_h__ -#define __ardour_midi_ring_buffer_h__ - -#include -#include -#include -#include - -namespace ARDOUR { - - -/* FIXME: this is probably too much inlined code */ - - -/** A RingBuffer. - * Read/Write realtime safe. - * Single-reader Single-writer thread safe. - * - * This is Raul::RingBuffer, lifted for MIDIRingBuffer to inherit from as it works - * a bit differently than PBD::Ringbuffer. This could/should be replaced with - * the PBD ringbuffer to decrease code size, but this code is tested and known to - * work, so here it sits for now... - * - * Ignore this class, use MidiRingBuffer. - */ -template -class MidiRingBufferBase { -public: - - /** @param size Size in bytes. - */ - MidiRingBufferBase(size_t size) - : _size(size) - , _buf(new T[size]) - { - reset(); - assert(read_space() == 0); - assert(write_space() == size - 1); - } - - virtual ~MidiRingBufferBase() { - delete[] _buf; - } - - /** Reset(empty) the ringbuffer. - * NOT thread safe. - */ - void reset() { - g_atomic_int_set(&_write_ptr, 0); - g_atomic_int_set(&_read_ptr, 0); - } - - size_t write_space() const { - - const size_t w = g_atomic_int_get(&_write_ptr); - const size_t r = g_atomic_int_get(&_read_ptr); - - if (w > r) { - return ((r - w + _size) % _size) - 1; - } else if (w < r) { - return (r - w) - 1; - } else { - return _size - 1; - } - } - - size_t read_space() const { - - const size_t w = g_atomic_int_get(&_write_ptr); - const size_t r = g_atomic_int_get(&_read_ptr); - - if (w > r) { - return w - r; - } else { - return (w - r + _size) % _size; - } - } - - size_t capacity() const { return _size; } - - size_t peek(size_t size, T* dst); - bool full_peek(size_t size, T* dst); - - size_t read(size_t size, T* dst); - bool full_read(size_t size, T* dst); - - bool skip(size_t size); - - void write(size_t size, const T* src); - -protected: - mutable int _write_ptr; - mutable int _read_ptr; - - size_t _size; ///< Size (capacity) in bytes - T* _buf; ///< size, event, size, event... -}; - - -/** Peek at the ringbuffer (read w/o advancing read pointer). - * - * Note that a full read may not be done if the data wraps around. - * Caller must check return value and call again if necessary, or use the - * full_peek method which does this automatically. - */ -template -size_t -MidiRingBufferBase::peek(size_t size, T* dst) -{ - const size_t priv_read_ptr = g_atomic_int_get(&_read_ptr); - - const size_t read_size = (priv_read_ptr + size < _size) - ? size - : _size - priv_read_ptr; - - memcpy(dst, &_buf[priv_read_ptr], read_size); - - return read_size; -} - - -template -bool -MidiRingBufferBase::full_peek(size_t size, T* dst) -{ - if (read_space() < size) { - return false; - } - - const size_t read_size = peek(size, dst); - - if (read_size < size) { - peek(size - read_size, dst + read_size); - } - - return true; -} - - -/** Read from the ringbuffer. - * - * Note that a full read may not be done if the data wraps around. - * Caller must check return value and call again if necessary, or use the - * full_read method which does this automatically. - */ -template -size_t -MidiRingBufferBase::read(size_t size, T* dst) -{ - const size_t priv_read_ptr = g_atomic_int_get(&_read_ptr); - - const size_t read_size = (priv_read_ptr + size < _size) - ? size - : _size - priv_read_ptr; - - memcpy(dst, &_buf[priv_read_ptr], read_size); - - g_atomic_int_set(&_read_ptr, (priv_read_ptr + read_size) % _size); - - return read_size; -} - - -template -bool -MidiRingBufferBase::full_read(size_t size, T* dst) -{ - if (read_space() < size) { - return false; - } - - const size_t read_size = read(size, dst); - - if (read_size < size) { - read(size - read_size, dst + read_size); - } - - return true; -} - - -template -bool -MidiRingBufferBase::skip(size_t size) -{ - if (read_space() < size) { - std::cerr << "WARNING: Attempt to skip past end of MIDI ring buffer" << std::endl; - return false; - } - - const size_t priv_read_ptr = g_atomic_int_get(&_read_ptr); - g_atomic_int_set(&_read_ptr, (priv_read_ptr + size) % _size); - - return true; -} - - -template -inline void -MidiRingBufferBase::write(size_t size, const T* src) -{ - const size_t priv_write_ptr = g_atomic_int_get(&_write_ptr); - - if (priv_write_ptr + size <= _size) { - memcpy(&_buf[priv_write_ptr], src, size); - g_atomic_int_set(&_write_ptr, (priv_write_ptr + size) % _size); - } else { - const size_t this_size = _size - priv_write_ptr; - assert(this_size < size); - assert(priv_write_ptr + this_size <= _size); - memcpy(&_buf[priv_write_ptr], src, this_size); - memcpy(&_buf[0], src+this_size, size - this_size); - g_atomic_int_set(&_write_ptr, size - this_size); - } -} - - -/* ******************************************************************** */ - - -/** A MIDI RingBuffer. - * - * This is timestamps and MIDI packed sequentially into a single buffer, similarly - * to LV2 MIDI. The buffer looks like this: - * - * [timestamp][size][size bytes of raw MIDI][timestamp][size][etc..] - */ -class MidiRingBuffer : public MidiRingBufferBase { -public: - /** @param size Size in bytes. - */ - MidiRingBuffer(size_t size) - : MidiRingBufferBase(size), _channel_mask(0x0000FFFF) - {} - - size_t write(double time, size_t size, const uint8_t* buf); - bool read(double* time, size_t* size, uint8_t* buf); - - bool read_prefix(double* time, size_t* size); - bool read_contents(size_t size, uint8_t* buf); - - size_t read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes_t offset=0); - - /** Set the channel filtering mode. - * @param mask If mode is FilterChannels, each bit represents a midi channel: - * bit 0 = channel 0, bit 1 = channel 1 etc. the read and write methods will only - * process events whose channel bit is 1. - * If mode is ForceChannel, mask is simply a channel number which all events will - * be forced to while reading. - */ - void set_channel_mode(ChannelMode mode, uint16_t mask) { - g_atomic_int_set(&_channel_mask, ((uint16_t)mode << 16) | mask); - } - - ChannelMode get_channel_mode() const { - return static_cast((g_atomic_int_get(&_channel_mask) & 0xFFFF0000) >> 16); - } - - uint16_t get_channel_mask() const { - return static_cast((g_atomic_int_get(&_channel_mask) & 0x0000FFFF)); - } - -protected: - inline bool is_channel_event(uint8_t event_type_byte) { - // mask out channel information - event_type_byte &= 0xF0; - // midi channel events range from 0x80 to 0xE0 - return (0x80 <= event_type_byte) && (event_type_byte <= 0xE0); - } - -private: - volatile uint32_t _channel_mask; // 16 bits mode, 16 bits mask -}; - - -inline bool -MidiRingBuffer::read(double* time, size_t* size, uint8_t* buf) -{ - bool success = MidiRingBufferBase::full_read(sizeof(double), (uint8_t*)time); - - if (success) { - success = MidiRingBufferBase::full_read(sizeof(size_t), (uint8_t*)size); - } - if (success) { - success = MidiRingBufferBase::full_read(*size, buf); - } - - return success; -} - - -/** Read the time and size of an event. This call MUST be immediately proceeded - * by a call to read_contents (or the read pointer will be garabage). - */ -inline bool -MidiRingBuffer::read_prefix(double* time, size_t* size) -{ - bool success = MidiRingBufferBase::full_read(sizeof(double), (uint8_t*)time); - if (success) { - success = MidiRingBufferBase::full_read(sizeof(size_t), (uint8_t*)size); - } - - return success; -} - - -/** Read the contenst of an event. This call MUST be immediately preceeded - * by a call to read_prefix (or the returned even will be garabage). - */ -inline bool -MidiRingBuffer::read_contents(size_t size, uint8_t* buf) -{ - return MidiRingBufferBase::full_read(size, buf); -} - - -inline size_t -MidiRingBuffer::write(double time, size_t size, const uint8_t* buf) -{ - /*fprintf(stderr, "MRB %p write (t = %f) ", this, time); - for (size_t i = 0; i < size; ++i) - fprintf(stderr, "%X", (char)buf[i]); - fprintf(stderr, "\n");*/ - - assert(size > 0); - - // Don't write event if it doesn't match channel filter - if (is_channel_event(buf[0]) && get_channel_mode() == FilterChannels) { - uint8_t channel = buf[0] & 0x0F; - if ( !(get_channel_mask() & (1L << channel)) ) { - return 0; - } - } - - if (write_space() < (sizeof(double) + sizeof(size_t) + size)) { - return 0; - } else { - MidiRingBufferBase::write(sizeof(double), (uint8_t*)&time); - MidiRingBufferBase::write(sizeof(size_t), (uint8_t*)&size); - if (is_channel_event(buf[0]) && get_channel_mode() == ForceChannel) { - assert(size == 2 || size == 3); - uint8_t tmp_buf[3]; - // Force event to channel - tmp_buf[0] = (buf[0] & 0xF0) | (get_channel_mask() & 0x0F); - tmp_buf[1] = buf[1]; - if (size == 3) { - tmp_buf[2] = buf[2]; - } - MidiRingBufferBase::write(size, tmp_buf); - } else { - MidiRingBufferBase::write(size, buf); - } - return size; - } - -} - - -/** Read a block of MIDI events from buffer. - * - * Timestamps of events returned are relative to start (ie event with stamp 0 - * occurred at start), with offset added. - */ -inline size_t -MidiRingBuffer::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes_t offset) -{ - if (read_space() == 0) - return 0; - - double ev_time; - uint32_t ev_size; - - size_t count = 0; - - //printf("---- MRB read %u .. %u + %u\n", start, end, offset); - - while (read_space() > sizeof(double) + sizeof(size_t)) { - - full_peek(sizeof(double), (uint8_t*)&ev_time); - - if (ev_time > end) { - break; - } - - bool success = MidiRingBufferBase::full_read(sizeof(double), (uint8_t*)&ev_time); - if (success) { - success = MidiRingBufferBase::full_read(sizeof(size_t), (uint8_t*)&ev_size); - } - - if (!success) { - std::cerr << "MRB: READ ERROR (time/size)" << std::endl; - continue; - } - - uint8_t status; - success = full_peek(sizeof(uint8_t), &status); - assert(success); // If this failed, buffer is corrupt, all hope is lost - - // Ignore event if it doesn't match channel filter - if (is_channel_event(status) && get_channel_mode() == FilterChannels) { - const uint8_t channel = status & 0x0F; - if ( !(get_channel_mask() & (1L << channel)) ) { - skip(ev_size); // Advance read pointer to next event - continue; - } - } - - if (ev_time >= start) { - - /*std::cerr << "MRB " << this << " - Reading event, time = " - << ev_time << " - " << start << " => " << ev_time - start - << ", size = " << ev_size << std::endl;*/ - - ev_time -= start; - - uint8_t* write_loc = dst.reserve(ev_time, ev_size); - if (write_loc == NULL) { - std::cerr << "MRB: Unable to reserve space in buffer, event skipped"; - continue; - } - - success = MidiRingBufferBase::full_read(ev_size, write_loc); - - if (success) { - if (is_channel_event(status) && get_channel_mode() == ForceChannel) { - write_loc[0] = (write_loc[0] & 0xF0) | (get_channel_mask() & 0x0F); - } - ++count; - //printf("MRB - read event at time %lf\n", ev_time); - } else { - std::cerr << "MRB: READ ERROR (data)" << std::endl; - } - - } else { - printf("MRB (start %u) - Skipping event at (too early) time %f\n", start, ev_time); - } - } - - //printf("(R) read space: %zu\n", read_space()); - - return count; -} - - -} // namespace ARDOUR - -#endif // __ardour_midi_ring_buffer_h__ - diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h deleted file mode 100644 index 997f3f9d69..0000000000 --- a/libs/ardour/ardour/midi_source.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_midi_source_h__ -#define __ardour_midi_source_h__ - -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -using std::string; - -namespace ARDOUR { - -class MidiRingBuffer; - -/** Source for MIDI data */ -class MidiSource : public Source -{ - public: - MidiSource (Session& session, string name); - MidiSource (Session& session, const XMLNode&); - virtual ~MidiSource (); - - /* Stub Readable interface */ - virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const { return 0; } - virtual nframes64_t readable_length() const { return length(); } - virtual uint32_t n_channels () const { return 1; } - - // FIXME: integrate this with the Readable::read interface somehow - virtual nframes_t midi_read (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const; - virtual nframes_t midi_write (MidiRingBuffer& src, nframes_t cnt); - - virtual void append_event_unlocked(EventTimeUnit unit, const MIDI::Event& ev) = 0; - - virtual void mark_for_remove() = 0; - virtual void mark_streaming_midi_write_started (NoteMode mode, nframes_t start_time); - virtual void mark_streaming_write_started (); - virtual void mark_streaming_write_completed (); - - uint64_t timeline_position () { return _timeline_position; } - void set_timeline_position (nframes_t when) { _timeline_position = when; } - - virtual void session_saved(); - - string captured_for() const { return _captured_for; } - void set_captured_for (string str) { _captured_for = str; } - - uint32_t read_data_count() const { return _read_data_count; } - uint32_t write_data_count() const { return _write_data_count; } - - static sigc::signal MidiSourceCreated; - - // Signal a range of recorded data is available for reading from model() - mutable sigc::signal ViewDataRangeReady; - - XMLNode& get_state (); - int set_state (const XMLNode&); - - bool length_mutable() const { return true; } - - virtual void load_model(bool lock=true, bool force_reload=false) = 0; - virtual void destroy_model() = 0; - - void set_note_mode(NoteMode mode) { if (_model) _model->set_note_mode(mode); } - - boost::shared_ptr model() { return _model; } - void set_model(boost::shared_ptr m) { _model = m; } - - protected: - virtual int flush_header() = 0; - virtual int flush_footer() = 0; - - virtual nframes_t read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const = 0; - virtual nframes_t write_unlocked (MidiRingBuffer& dst, nframes_t cnt) = 0; - - mutable Glib::Mutex _lock; - string _captured_for; - uint64_t _timeline_position; - mutable uint32_t _read_data_count; ///< modified in read() - mutable uint32_t _write_data_count; ///< modified in write() - - boost::shared_ptr _model; - bool _writing; - - private: - bool file_changed (string path); -}; - -} - -#endif /* __ardour_midi_source_h__ */ diff --git a/libs/ardour/ardour/midi_stretch.h b/libs/ardour/ardour/midi_stretch.h deleted file mode 100644 index f4b8f1c618..0000000000 --- a/libs/ardour/ardour/midi_stretch.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_midi_stretch_h__ -#define __ardour_midi_stretch_h__ - -#include - -namespace ARDOUR { - -class MidiStretch : public Filter { - public: - MidiStretch (ARDOUR::Session&, TimeFXRequest&); - ~MidiStretch (); - - int run (boost::shared_ptr); - - private: - TimeFXRequest& _request; -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_midi_stretch_h__ */ diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h deleted file mode 100644 index 500502ac4b..0000000000 --- a/libs/ardour/ardour/midi_track.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_midi_track_h__ -#define __ardour_midi_track_h__ - -#include -#include - -namespace ARDOUR -{ - -class Session; -class MidiDiskstream; -class MidiPlaylist; -class RouteGroup; - -class MidiTrack : public Track -{ -public: - MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); - MidiTrack (Session&, const XMLNode&); - ~MidiTrack (); - - int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, int declick, bool can_record, bool rec_monitors_input); - - int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input); - - int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool can_record, bool rec_monitors_input); - - void process_output_buffers (BufferSet& bufs, - nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset, bool with_redirects, int declick, - bool meter); - - boost::shared_ptr midi_diskstream() const; - - int use_diskstream (string name); - int use_diskstream (const PBD::ID& id); - - void set_latency_delay (nframes_t); - - int export_stuff (BufferSet& bufs, - nframes_t nframes, nframes_t end_frame); - - void freeze (InterThreadInfo&); - void unfreeze (); - - void bounce (InterThreadInfo&); - void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&); - - int set_state(const XMLNode& node); - - void midi_panic(void); - bool write_immediate_event(size_t size, const uint8_t* buf); - - struct MidiControl : public AutomationControl { - MidiControl(MidiTrack* route, boost::shared_ptr al) - : AutomationControl (route->session(), al, al->parameter().to_string()) - , _route (route) - {} - - void set_value (float val); - - MidiTrack* _route; - }; - - NoteMode note_mode() const { return _note_mode; } - void set_note_mode (NoteMode m); - -protected: - - XMLNode& state (bool full); - - int _set_state (const XMLNode&, bool call_base); - -private: - - void write_controller_messages(MidiBuffer& buf, - nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset); - - int set_diskstream (boost::shared_ptr ds); - void set_state_part_two (); - void set_state_part_three (); - - MidiRingBuffer _immediate_events; - NoteMode _note_mode; -}; - -} /* namespace ARDOUR*/ - -#endif /* __ardour_midi_track_h__ */ diff --git a/libs/ardour/ardour/midi_util.h b/libs/ardour/ardour/midi_util.h deleted file mode 100644 index 6bcc6278e1..0000000000 --- a/libs/ardour/ardour/midi_util.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_midi_util_h__ -#define __ardour_midi_util_h__ - -#include - -namespace ARDOUR { - -/** Return the size of the given event NOT including the status byte, - * or -1 if unknown (eg sysex) - */ -static inline int -midi_event_size(unsigned char status) -{ - // if we have a channel event - if (status >= 0x80 && status < 0xF0) { - status &= 0xF0; // mask off the channel - } - - switch (status) { - case MIDI_CMD_NOTE_OFF: - case MIDI_CMD_NOTE_ON: - case MIDI_CMD_NOTE_PRESSURE: - case MIDI_CMD_CONTROL: - case MIDI_CMD_BENDER: - case MIDI_CMD_COMMON_SONG_POS: - return 2; - - case MIDI_CMD_PGM_CHANGE: - case MIDI_CMD_CHANNEL_PRESSURE: - case MIDI_CMD_COMMON_MTC_QUARTER: - case MIDI_CMD_COMMON_SONG_SELECT: - return 1; - - case MIDI_CMD_COMMON_TUNE_REQUEST: - case MIDI_CMD_COMMON_SYSEX_END: - case MIDI_CMD_COMMON_CLOCK: - case MIDI_CMD_COMMON_START: - case MIDI_CMD_COMMON_CONTINUE: - case MIDI_CMD_COMMON_STOP: - case MIDI_CMD_COMMON_SENSING: - case MIDI_CMD_COMMON_RESET: - return 0; - - case MIDI_CMD_COMMON_SYSEX: - return -1; - } - - return -1; -} - -} // namespace ARDOUR - -#endif /* __ardour_midi_util_h__ */ diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h deleted file mode 100644 index 67779f0e07..0000000000 --- a/libs/ardour/ardour/mix.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2005 Sampo Savolainen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ -#ifndef __ardour_mix_h__ -#define __ardour_mix_h__ - -#include -#include -#include - -#if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS) - -extern "C" { -/* SSE functions */ - float x86_sse_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); - void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); - void x86_sse_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); - void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); -} - -void x86_sse_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); - -/* debug wrappers for SSE functions */ - -float debug_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); -void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); -void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); -void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); - -#endif - -#if defined (__APPLE__) - -float veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); -void veclib_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); -void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); -void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); -void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); - -#endif - -/* non-optimized functions */ - -float default_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); -void default_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); -void default_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); -void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); -void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); - -#endif /* __ardour_mix_h__ */ diff --git a/libs/ardour/ardour/named_selection.h b/libs/ardour/ardour/named_selection.h deleted file mode 100644 index 39ab524d4f..0000000000 --- a/libs/ardour/ardour/named_selection.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_named_selection_h__ -#define __ardour_named_selection_h__ - -#include -#include -#include - -#include - -class XMLNode; - -namespace ARDOUR -{ -class Session; -class Playlist; - -struct NamedSelection : public PBD::Stateful -{ - NamedSelection (std::string, std::list >&); - NamedSelection (Session&, const XMLNode&); - virtual ~NamedSelection (); - - std::string name; - std::list > playlists; - - XMLNode& get_state (void); - - int set_state (const XMLNode&); - - static sigc::signal NamedSelectionCreated; -}; - -}/* namespace ARDOUR */ - -#endif /* __ardour_named_selection_h__ */ - diff --git a/libs/ardour/ardour/noise.h b/libs/ardour/ardour/noise.h deleted file mode 100644 index f775fcce36..0000000000 --- a/libs/ardour/ardour/noise.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef NOISE_H -#define NOISE_H - -/* Can be overrriden with any code that produces whitenoise between 0.0f and - * 1.0f, eg (random() / (float)RAND_MAX) should be a good source of noise, but - * its expensive */ -#ifndef GDITHER_NOISE -#define GDITHER_NOISE gdither_noise() -#endif - -inline static float gdither_noise() -{ - static uint32_t rnd = 23232323; - rnd = (rnd * 196314165) + 907633515; - - return rnd * 2.3283064365387e-10f; -} - -#endif diff --git a/libs/ardour/ardour/note.h b/libs/ardour/ardour/note.h deleted file mode 100644 index 0f649b3370..0000000000 --- a/libs/ardour/ardour/note.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_note_h__ -#define __ardour_note_h__ - -#include -#include - -namespace ARDOUR { - - -/** A MIDI Note. - * - * A note is (unfortunately) special and not just another MIDI::Event as it - * has a duration and two separate MIDI events (on and off). - */ -class Note { -public: - Note(uint8_t chan=0, double time=0, double dur=0, uint8_t note=0, uint8_t vel=0x40); - Note(const Note& copy); - ~Note(); - - const Note& operator=(const Note& copy); - - inline bool operator==(const Note& other) - { return time() == other.time() && - note() == other.note() && - duration() == other.duration() && - velocity() == other.velocity() && - channel() == other.channel(); - } - - inline double time() const { return _on_event.time(); } - inline double end_time() const { return _off_event.time(); } - inline uint8_t note() const { return _on_event.note(); } - inline uint8_t velocity() const { return _on_event.velocity(); } - inline double duration() const { return _off_event.time() - _on_event.time(); } - inline uint8_t channel() const { - assert(_on_event.channel() == _off_event.channel()); - return _on_event.channel(); - } - - inline void set_time(double t) { _off_event.time() = t + duration(); _on_event.time() = t; } - inline void set_note(uint8_t n) { _on_event.buffer()[1] = n; _off_event.buffer()[1] = n; } - inline void set_velocity(uint8_t n) { _on_event.buffer()[2] = n; } - inline void set_duration(double d) { _off_event.time() = _on_event.time() + d; } - inline void set_channel(uint8_t c) { _on_event.set_channel(c); _off_event.set_channel(c); } - - inline MIDI::Event& on_event() { return _on_event; } - inline MIDI::Event& off_event() { return _off_event; } - - inline const MIDI::Event& on_event() const { return _on_event; } - inline const MIDI::Event& off_event() const { return _off_event; } - -private: - // Event buffers are self-contained - MIDI::Event _on_event; - MIDI::Event _off_event; -}; - - -} // namespace ARDOUR - -#endif /* __ardour_note_h__ */ diff --git a/libs/ardour/ardour/osc.h b/libs/ardour/ardour/osc.h deleted file mode 100644 index 3f1ce03445..0000000000 --- a/libs/ardour/ardour/osc.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2006 Paul Davis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef ardour_osc_h -#define ardour_osc_h - -#include - -#include -#include - -#include - -#include - -#include - -#include - -namespace ARDOUR { - class Session; - class Route; - -class OSC : public BasicUI, public sigc::trackable -{ - public: - OSC (uint32_t port); - virtual ~OSC(); - - void set_session (ARDOUR::Session&); - int start (); - int stop (); - - private: - uint32_t _port; - volatile bool _ok; - volatile bool _shutdown; - lo_server _osc_server; - lo_server _osc_unix_server; - std::string _osc_unix_socket_path; - std::string _osc_url_file; - pthread_t _osc_thread; - int _request_pipe[2]; - - static void * _osc_receiver(void * arg); - void osc_receiver(); - - bool init_osc_thread (); - void terminate_osc_thread (); - void poke_osc_thread (); - - void register_callbacks (); - - void session_going_away (); - - std::string get_server_url (); - std::string get_unix_server_url (); - - int current_value (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data); - -#define PATH_CALLBACK(name) \ - static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \ - return static_cast(user_data)->cb_ ## name (path, types, argv, argc, data); \ - } \ - int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \ - name (); \ - return 0; \ - } - - PATH_CALLBACK(add_marker); - PATH_CALLBACK(loop_toggle); - PATH_CALLBACK(goto_start); - PATH_CALLBACK(goto_end); - PATH_CALLBACK(rewind); - PATH_CALLBACK(ffwd); - PATH_CALLBACK(transport_stop); - PATH_CALLBACK(transport_play); - PATH_CALLBACK(save_state); - PATH_CALLBACK(prev_marker); - PATH_CALLBACK(next_marker); - PATH_CALLBACK(undo); - PATH_CALLBACK(redo); - PATH_CALLBACK(toggle_punch_in); - PATH_CALLBACK(toggle_punch_out); - PATH_CALLBACK(rec_enable_toggle); - PATH_CALLBACK(toggle_all_rec_enables); - -#define PATH_CALLBACK1(name,type) \ - static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \ - return static_cast(user_data)->cb_ ## name (path, types, argv, argc, data); \ - } \ - int cb_ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data) { \ - if (argc > 0) { \ - name (argv[0]->type); \ - }\ - return 0; \ - } - - PATH_CALLBACK1(set_transport_speed,f); -}; - -} - -#endif // ardour_osc_h diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h deleted file mode 100644 index 2559eed003..0000000000 --- a/libs/ardour/ardour/panner.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_panner_h__ -#define __ardour_panner_h__ - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -using std::istream; -using std::ostream; - -namespace ARDOUR { - -class Session; -class Panner; -class BufferSet; -class AudioBuffer; - -class StreamPanner : public sigc::trackable, public PBD::Stateful -{ - public: - StreamPanner (Panner& p, Parameter param); - ~StreamPanner (); - - void set_muted (bool yn); - bool muted() const { return _muted; } - - void set_position (float x, bool link_call = false); - void set_position (float x, float y, bool link_call = false); - void set_position (float x, float y, float z, bool link_call = false); - - void get_position (float& xpos) const { xpos = x; } - void get_position (float& xpos, float& ypos) const { xpos = x; ypos = y; } - void get_position (float& xpos, float& ypos, float& zpos) const { xpos = x; ypos = y; zpos = z; } - - void get_effective_position (float& xpos) const { xpos = effective_x; } - void get_effective_position (float& xpos, float& ypos) const { xpos = effective_x; ypos = effective_y; } - void get_effective_position (float& xpos, float& ypos, float& zpos) const { xpos = effective_x; ypos = effective_y; zpos = effective_z; } - - /* the basic StreamPanner API */ - - virtual void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) = 0; - virtual void distribute_automated (AudioBuffer& src, BufferSet& obufs, - nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers) = 0; - - boost::shared_ptr pan_control() { return _control; } - - sigc::signal Changed; /* for position */ - sigc::signal StateChanged; /* for mute */ - - int set_state (const XMLNode&); - virtual XMLNode& state (bool full_state) = 0; - - Panner & get_parent() { return parent; } - - /* old school automation loading */ - - virtual int load (istream&, string path, uint32_t&) = 0; - - protected: - friend class Panner; - Panner& parent; - - float x; - float y; - float z; - - /* these are for automation. they store the last value - used by the most recent process() cycle. - */ - - float effective_x; - float effective_y; - float effective_z; - - bool _muted; - - struct PanControllable : public AutomationControl { - PanControllable (Session& s, std::string name, StreamPanner& p, Parameter param) - : AutomationControl (s, boost::shared_ptr(new AutomationList( - param, 0.0, 1.0, 0.5)), name) - , panner (p) { assert(param.type() != NullAutomation); } - - StreamPanner& panner; - - void set_value (float); - float get_value (void) const; - bool can_send_feedback() const; - }; - - boost::shared_ptr _control; - - void add_state (XMLNode&); - virtual void update () = 0; -}; - -class BaseStereoPanner : public StreamPanner -{ - public: - BaseStereoPanner (Panner&, Parameter param); - ~BaseStereoPanner (); - - /* this class just leaves the pan law itself to be defined - by the update(), distribute_automated() - methods. derived classes also need a factory method - and a type name. See EqualPowerStereoPanner as an example. - */ - - void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes); - - /* old school automation loading */ - - int load (istream&, string path, uint32_t&); - - protected: - float left; - float right; - float desired_left; - float desired_right; - float left_interp; - float right_interp; -}; - -class EqualPowerStereoPanner : public BaseStereoPanner -{ - public: - EqualPowerStereoPanner (Panner&, Parameter param); - ~EqualPowerStereoPanner (); - - void distribute_automated (AudioBuffer& src, BufferSet& obufs, - nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers); - - void get_current_coefficients (pan_t*) const; - void get_desired_coefficients (pan_t*) const; - - static StreamPanner* factory (Panner&, Parameter param); - static string name; - - XMLNode& state (bool full_state); - XMLNode& get_state (void); - int set_state (const XMLNode&); - - private: - void update (); -}; - -class Multi2dPanner : public StreamPanner -{ - public: - Multi2dPanner (Panner& parent, Parameter); - ~Multi2dPanner (); - - void distribute (AudioBuffer& src, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes); - void distribute_automated (AudioBuffer& src, BufferSet& obufs, - nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers); - - static StreamPanner* factory (Panner&, Parameter); - static string name; - - XMLNode& state (bool full_state); - XMLNode& get_state (void); - int set_state (const XMLNode&); - - /* old school automation loading */ - - int load (istream&, string path, uint32_t&); - - private: - void update (); -}; - -class Panner : public std::vector, public PBD::Stateful, public sigc::trackable -{ - public: - struct Output { - float x; - float y; - pan_t current_pan; - pan_t desired_pan; - - Output (float xp, float yp) - : x (xp), y (yp), current_pan (0.0f), desired_pan (0.f) {} - - }; - - Panner (string name, Session&); - virtual ~Panner (); - - /// The fundamental Panner function - void distribute(BufferSet& src, BufferSet& dest, nframes_t start_frame, nframes_t end_frames, nframes_t nframes, nframes_t offset); - - bool bypassed() const { return _bypassed; } - void set_bypassed (bool yn); - - StreamPanner* add (); - void remove (uint32_t which); - void clear (); - void reset (uint32_t noutputs, uint32_t npans); - - void snapshot (nframes_t now); - void transport_stopped (nframes_t frame); - - void clear_automation (); - - void set_automation_state (AutoState); - AutoState automation_state() const; - void set_automation_style (AutoStyle); - AutoStyle automation_style() const; - bool touching() const; - - XMLNode& get_state (void); - XMLNode& state (bool full); - int set_state (const XMLNode&); - - sigc::signal Changed; - - static bool equivalent (pan_t a, pan_t b) { - return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner - } - - void move_output (uint32_t, float x, float y); - uint32_t nouts() const { return outputs.size(); } - Output& output (uint32_t n) { return outputs[n]; } - - std::vector outputs; - Session& session() const { return _session; } - - enum LinkDirection { - SameDirection, - OppositeDirection - }; - - LinkDirection link_direction() const { return _link_direction; } - void set_link_direction (LinkDirection); - - bool linked() const { return _linked; } - void set_linked (bool yn); - - sigc::signal LinkStateChanged; - sigc::signal StateChanged; /* for bypass */ - - /* only StreamPanner should call these */ - - void set_position (float x, StreamPanner& orig); - void set_position (float x, float y, StreamPanner& orig); - void set_position (float x, float y, float z, StreamPanner& orig); - - /* old school automation */ - - int load (); - - private: - void distribute_no_automation(BufferSet& src, BufferSet& dest, nframes_t nframes, nframes_t offset, gain_t gain_coeff); - - Session& _session; - uint32_t current_outs; - bool _linked; - bool _bypassed; - LinkDirection _link_direction; - - static float current_automation_version_number; - - /* old school automation handling */ - - std::string automation_path; - void set_name (std::string); -}; - -} // namespace ARDOUR - -#endif /*__ardour_panner_h__ */ diff --git a/libs/ardour/ardour/parameter.h b/libs/ardour/ardour/parameter.h deleted file mode 100644 index b86174aa0a..0000000000 --- a/libs/ardour/ardour/parameter.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_parameter_h__ -#define __ardour_parameter_h__ - -#include -#include -#include -#include - -namespace ARDOUR { - - -/** ID of an automatable parameter. - * - * A given automatable object has a number of automatable parameters. This is - * the unique ID for those parameters. Anything automatable (AutomationList, - * Curve) must have an ID unique with respect to it's Automatable parent. - * - * A parameter ID has two parts, a type and an int (only used by some types). - * - * This is a bit more ugly than it could be, due to using the existing/legacy - * ARDOUR::AutomationType: GainAutomation, PanAutomation, SoloAutomation, - * and MuteAutomation use only the type(), but PluginAutomation and - * MidiCCAutomation use the id() as port number and CC number, respectively. - * - * Future types may use a string or URI or whatever, as long as these are - * comparable anything may be added. ints are best as these should be fast to - * copy and compare with one another. - */ -class Parameter -{ -public: - Parameter(AutomationType type = NullAutomation, uint32_t id=0, uint8_t channel=0) - : _type(type), _id(id), _channel(channel) - {} - - Parameter(const std::string& str); - - inline AutomationType type() const { return _type; } - inline uint32_t id() const { return _id; } - inline uint8_t channel() const { return _channel; } - - /** - * Equivalence operator - * It is obvious from the definition that this operator - * is transitive, as required by stict weak ordering - * (see: http://www.sgi.com/tech/stl/StrictWeakOrdering.html) - */ - inline bool operator==(const Parameter& id) const { - return (_type == id._type && _id == id._id && _channel == id._channel); - } - - /** Strict weak ordering - * (see: http://www.sgi.com/tech/stl/StrictWeakOrdering.html) - * This is necessary so that std::set works): - * Sort Parameters first according to type then to id and lastly to channel. - * - * Proof: - *
    - *
  1. Irreflexivity: f(x, x) is false because of the irreflexivity of \c < in each branch.
  2. - * - *
  3. Antisymmetry: given x != y, f(x, y) implies !f(y, x) because of the same - * property of \c < in each branch and the symmetry of operator==.
  4. - * - *
  5. Transitivity: let f(x, y) and f(y, z) be true. We prove by assuming the contrary, - * that f(x, z) does not hold. - * That would imply exactly one of the following: - *
      - *
    1. x == z which contradicts the assumption f(x, y) and f(y, x) - * because of antisymmetry. - *
    2. - *
    3. f(z, x) is true. That would imply that one of the ivars (we call it i) - * of x is greater than the same ivar in z while all "previous" ivars - * are equal. That would imply that also in y all those "previous" - * ivars are equal and because if x.i > z.i it is impossible - * that there is an y that satisfies x.i < y.i < z.i at the same - * time which contradicts the assumption. - *
    4. - *
    - *
  6. - *
- */ - - inline bool operator<(const Parameter& id) const { -#ifndef NDEBUG - if (_type == NullAutomation) - PBD::warning << "Uninitialized Parameter compared." << endmsg; -#endif - if (_type < id._type) { - return true; - } else if (_type == id._type && _id < id._id) { - return true; - } else if (_id == id._id && _channel < id._channel) { - return true; - } - - return false; - } - - inline operator bool() const { return (_type != 0); } - - std::string to_string() const; - - /* The below properties are only used for CC right now, but unchanging properties - * of parameters (rather than changing parameters of automation lists themselves) - * should be moved here */ - - inline double min() const { - switch(_type) { - case MidiCCAutomation: - case MidiPgmChangeAutomation: - case MidiPitchBenderAutomation: - case MidiChannelAftertouchAutomation: - return 0.0; - - default: - return DBL_MIN; - } - } - - inline double max() const { - switch(_type) { - case MidiCCAutomation: - case MidiPgmChangeAutomation: - case MidiChannelAftertouchAutomation: - return 127.0; - case MidiPitchBenderAutomation: - return 16383.0; - - default: - return DBL_MAX; - } - } - - inline bool is_integer() const { - return (_type >= MidiCCAutomation && _type <= MidiChannelAftertouchAutomation); - } - -private: - // default copy constructor is ok - AutomationType _type; - uint32_t _id; - uint8_t _channel; -}; - - -} // namespace ARDOUR - -#endif // __ardour_parameter_h__ - diff --git a/libs/ardour/ardour/pcm_utils.h b/libs/ardour/ardour/pcm_utils.h deleted file mode 100644 index 5e6436cc94..0000000000 --- a/libs/ardour/ardour/pcm_utils.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis , portions Erik de Castro Lopo - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_pcm_utils_h__ -#define __ardour_pcm_utils_h__ - -typedef void tribyte ; - -#define SIZEOF_TRIBYTE 3 - -#define BET2H_INT_PTR(x) (((x) [0] << 24) + ((x) [1] << 16) + ((x) [2] << 8)) -#define LET2H_INT_PTR(x) (((x) [0] << 8) + ((x) [1] << 16) + ((x) [2] << 24)) - - - -void pcm_let2f_array (tribyte *src, int count, float *dest); -void pcm_bet2f_array (tribyte *src, int count, float *dest); -void pcm_f2let_array (float *src, tribyte *dest, int count); -void pcm_f2let_clip_array (float *src, tribyte *dest, int count); -void pcm_f2bet_array (const float *src, tribyte *dest, int count); -void pcm_f2bet_clip_array (const float *src, tribyte *dest, int count); - - - -#endif diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h deleted file mode 100644 index bbec40eea7..0000000000 --- a/libs/ardour/ardour/peak.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_peak_h__ -#define __ardour_peak_h__ - -#include -#include -#include - -static inline float -default_compute_peak (const ARDOUR::Sample * const buf, nframes_t nsamples, float current) -{ - for (nframes_t i = 0; i < nsamples; ++i) { - current = f_max (current, fabsf (buf[i])); - } - return current; -} - -#endif /* __ardour_peak_h__ */ diff --git a/libs/ardour/ardour/pitch.h b/libs/ardour/ardour/pitch.h deleted file mode 100644 index 38d8380f5d..0000000000 --- a/libs/ardour/ardour/pitch.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_pitch_h__ -#define __ardour_pitch_h__ - -#include - -namespace ARDOUR { - class AudioRegion; -} - -#ifdef USE_RUBBERBAND - -#include - -namespace ARDOUR { - -class Pitch : public RBEffect { - public: - Pitch (ARDOUR::Session&, TimeFXRequest&); - ~Pitch () {} -}; - -} /* namespace */ - -# else - -namespace ARDOUR { - -class Pitch : public Filter { - public: - Pitch (ARDOUR::Session&, TimeFXRequest&); - ~Pitch () {} - - int run (boost::shared_ptr); - - private: - TimeFXRequest& tsr; -}; - -} /* namespace */ - -#endif - -#endif /* __ardour_pitch_h__ */ diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h deleted file mode 100644 index ad7210f48f..0000000000 --- a/libs/ardour/ardour/playlist.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_playlist_h__ -#define __ardour_playlist_h__ - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Session; -class Region; - -class Playlist : public SessionObject, public boost::enable_shared_from_this { - public: - typedef list > RegionList; - - Playlist (Session&, const XMLNode&, DataType type, bool hidden = false); - Playlist (Session&, string name, DataType type, bool hidden = false); - Playlist (boost::shared_ptr, string name, bool hidden = false); - Playlist (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); - - virtual ~Playlist (); - - void set_region_ownership (); - - virtual void clear (bool with_signals=true); - virtual void dump () const; - - void use(); - void release(); - bool used () const { return _refcnt != 0; } - - bool set_name (const string& str); - - const DataType& data_type() const { return _type; } - - bool frozen() const { return _frozen; } - void set_frozen (bool yn); - - bool hidden() const { return _hidden; } - bool empty() const; - uint32_t n_regions() const; - nframes_t get_maximum_extent () const; - layer_t top_layer() const; - - EditMode get_edit_mode() const { return _edit_mode; } - void set_edit_mode (EditMode); - - /* Editing operations */ - - void add_region (boost::shared_ptr, nframes_t position, float times = 1); - void remove_region (boost::shared_ptr); - void get_equivalent_regions (boost::shared_ptr, std::vector >&); - void get_region_list_equivalent_regions (boost::shared_ptr, std::vector >&); - void replace_region (boost::shared_ptr old, boost::shared_ptr newr, nframes_t pos); - void split_region (boost::shared_ptr, nframes_t position); - void split (nframes64_t at); - void shift (nframes64_t at, nframes64_t distance, bool move_intersected, bool ignore_music_glue); - void partition (nframes_t start, nframes_t end, bool just_top_level); - void duplicate (boost::shared_ptr, nframes_t position, float times); - void nudge_after (nframes_t start, nframes_t distance, bool forwards); - void shuffle (boost::shared_ptr, int dir); - void update_after_tempo_map_change (); - - boost::shared_ptr cut (list&, bool result_is_hidden = true); - boost::shared_ptr copy (list&, bool result_is_hidden = true); - int paste (boost::shared_ptr, nframes_t position, float times); - - RegionList* regions_at (nframes_t frame); - RegionList* regions_touched (nframes_t start, nframes_t end); - RegionList* regions_to_read (nframes_t start, nframes_t end); - boost::shared_ptr find_region (const PBD::ID&) const; - boost::shared_ptr top_region_at (nframes_t frame); - boost::shared_ptr find_next_region (nframes_t frame, RegionPoint point, int dir); - nframes64_t find_next_region_boundary (nframes64_t frame, int dir); - bool region_is_shuffle_constrained (boost::shared_ptr); - - nframes64_t find_next_transient (nframes64_t position, int dir); - - template void foreach_region (T *t, void (T::*func)(boost::shared_ptr, void *), void *arg); - template void foreach_region (T *t, void (T::*func)(boost::shared_ptr)); - - XMLNode& get_state (); - int set_state (const XMLNode&); - XMLNode& get_template (); - - sigc::signal InUse; - sigc::signal Modified; - sigc::signal NameChanged; - sigc::signal LengthChanged; - - static string bump_name (string old_name, Session&); - - void freeze (); - void thaw (); - - void raise_region (boost::shared_ptr); - void lower_region (boost::shared_ptr); - void raise_region_to_top (boost::shared_ptr); - void lower_region_to_bottom (boost::shared_ptr); - - uint32_t read_data_count() const { return _read_data_count; } - - const PBD::ID& get_orig_diskstream_id () const { return _orig_diskstream_id; } - void set_orig_diskstream_id (const PBD::ID& did) { _orig_diskstream_id = did; } - - /* destructive editing */ - - virtual bool destroy_region (boost::shared_ptr) = 0; - - /* special case function used by UI selection objects, which have playlists that actually own the regions - within them. - */ - - void drop_regions (); - - protected: - friend class Session; - - protected: - struct RegionLock { - RegionLock (Playlist *pl, bool do_block_notify = true) : playlist (pl), block_notify (do_block_notify) { - playlist->region_lock.lock(); - if (block_notify) { - playlist->delay_notifications(); - } - } - ~RegionLock() { - playlist->region_lock.unlock(); - if (block_notify) { - playlist->release_notifications (); - } - } - Playlist *playlist; - bool block_notify; - }; - - friend class RegionLock; - - RegionList regions; /* the current list of regions in the playlist */ - std::set > all_regions; /* all regions ever added to this playlist */ - DataType _type; - mutable gint block_notifications; - mutable gint ignore_state_changes; - mutable Glib::Mutex region_lock; - std::set > pending_adds; - std::set > pending_removes; - RegionList pending_bounds; - bool pending_modified; - bool pending_length; - bool save_on_thaw; - string last_save_reason; - uint32_t in_set_state; - bool first_set_state; - bool _hidden; - bool _splicing; - bool _shuffling; - bool _nudging; - uint32_t _refcnt; - EditMode _edit_mode; - bool in_flush; - bool in_partition; - bool _frozen; - uint32_t subcnt; - uint32_t _read_data_count; - PBD::ID _orig_diskstream_id; - uint64_t layer_op_counter; - nframes_t freeze_length; - - void init (bool hide); - - bool holding_state () const { - return g_atomic_int_get (&block_notifications) != 0 || - g_atomic_int_get (&ignore_state_changes) != 0; - } - - /* prevent the compiler from ever generating these */ - - Playlist (const Playlist&); - Playlist (Playlist&); - - void delay_notifications (); - void release_notifications (); - virtual void flush_notifications (); - - void notify_region_removed (boost::shared_ptr); - void notify_region_added (boost::shared_ptr); - void notify_length_changed (); - void notify_layering_changed (); - void notify_modified (); - void notify_state_changed (Change); - - void mark_session_dirty(); - - void region_changed_proxy (Change, boost::weak_ptr); - virtual bool region_changed (Change, boost::shared_ptr); - - void region_bounds_changed (Change, boost::shared_ptr); - void region_deleted (boost::shared_ptr); - - void sort_regions (); - - void possibly_splice (nframes_t at, nframes64_t distance, boost::shared_ptr exclude = boost::shared_ptr()); - void possibly_splice_unlocked(nframes_t at, nframes64_t distance, boost::shared_ptr exclude = boost::shared_ptr()); - - void core_splice (nframes_t at, nframes64_t distance, boost::shared_ptr exclude); - void splice_locked (nframes_t at, nframes64_t distance, boost::shared_ptr exclude); - void splice_unlocked (nframes_t at, nframes64_t distance, boost::shared_ptr exclude); - - virtual void finalize_split_region (boost::shared_ptr original, boost::shared_ptr left, boost::shared_ptr right) {} - - virtual void check_dependents (boost::shared_ptr region, bool norefresh) {} - virtual void refresh_dependents (boost::shared_ptr region) {} - virtual void remove_dependents (boost::shared_ptr region) {} - - virtual XMLNode& state (bool); - - boost::shared_ptr region_by_id (PBD::ID); - - void add_region_internal (boost::shared_ptr, nframes_t position); - - int remove_region_internal (boost::shared_ptr); - RegionList *find_regions_at (nframes_t frame); - void copy_regions (RegionList&) const; - void partition_internal (nframes_t start, nframes_t end, bool cutting, RegionList& thawlist); - - nframes_t _get_maximum_extent() const; - - boost::shared_ptr cut_copy (boost::shared_ptr (Playlist::*pmf)(nframes_t, nframes_t, bool), - list& ranges, bool result_is_hidden); - boost::shared_ptr cut (nframes_t start, nframes_t cnt, bool result_is_hidden); - boost::shared_ptr copy (nframes_t start, nframes_t cnt, bool result_is_hidden); - - int move_region_to_layer (layer_t, boost::shared_ptr r, int dir); - void relayer (); - - void unset_freeze_parent (Playlist*); - void unset_freeze_child (Playlist*); - - void timestamp_layer_op (boost::shared_ptr); - - void _split_region (boost::shared_ptr, nframes_t position); -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_playlist_h__ */ - - diff --git a/libs/ardour/ardour/playlist_factory.h b/libs/ardour/ardour/playlist_factory.h deleted file mode 100644 index a28e2611d9..0000000000 --- a/libs/ardour/ardour/playlist_factory.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_playlist_factory_h__ -#define __ardour_playlist_factory_h__ - -#include - -class XMLNode; - -namespace ARDOUR { - -class Session; - -class PlaylistFactory { - - public: - static sigc::signal > PlaylistCreated; - - static boost::shared_ptr create (Session&, const XMLNode&, bool hidden = false); - static boost::shared_ptr create (DataType type, Session&, string name, bool hidden = false); - static boost::shared_ptr create (boost::shared_ptr, string name, bool hidden = false); - static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); -}; - -} - -#endif /* __ardour_playlist_factory_h__ */ diff --git a/libs/ardour/ardour/playlist_templates.h b/libs/ardour/ardour/playlist_templates.h deleted file mode 100644 index bf072a71c1..0000000000 --- a/libs/ardour/ardour/playlist_templates.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_playlist_templates_h__ -#define __ardour_playlist_templates_h__ - -namespace ARDOUR { - -template void AudioPlaylist::foreach_crossfade (T *t, void (T::*func)(boost::shared_ptr)) { - RegionLock rlock (this, false); - for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); i++) { - (t->*func) (*i); - } -} - -template void Playlist::foreach_region (T *t, void (T::*func)(boost::shared_ptr, void *), void *arg) { - RegionLock rlock (this, false); - for (RegionList::iterator i = regions.begin(); i != regions.end(); i++) { - (t->*func) ((*i), arg); - } - } - -template void Playlist::foreach_region (T *t, void (T::*func)(boost::shared_ptr)) { - RegionLock rlock (this, false); - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); i++) { - (t->*func) (*i); - } -} - -} - -#endif /* __ardour_playlist_templates_h__ */ diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h deleted file mode 100644 index 73f89f1a91..0000000000 --- a/libs/ardour/ardour/plugin.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_plugin_h__ -#define __ardour_plugin_h__ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -using std::string; -using std::vector; -using std::set; -using std::map; - -namespace ARDOUR { - -class AudioEngine; -class Session; -class BufferSet; - -class Plugin; - -typedef boost::shared_ptr PluginPtr; - -class PluginInfo { - public: - PluginInfo () { } - PluginInfo (const PluginInfo &o) - : name(o.name), - category (o.category), - creator (o.creator), - path (o.path), - n_inputs(o.n_inputs), - n_outputs(o.n_outputs), - unique_id(o.unique_id), - index(o.index) {} - virtual ~PluginInfo () { } - - string name; - string category; - Glib::ustring creator; - Glib::ustring path; - ChanCount n_inputs; - ChanCount n_outputs; - ARDOUR::PluginType type; - - std::string unique_id; - - virtual PluginPtr load (Session& session) = 0; - - protected: - friend class PluginManager; - uint32_t index; -}; - -typedef boost::shared_ptr PluginInfoPtr; -typedef std::list PluginInfoList; - -class Plugin : public PBD::StatefulDestructible, public Latent -{ - public: - Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&); - Plugin (const Plugin&); - virtual ~Plugin (); - - struct ParameterDescriptor { - - /* essentially a union of LADSPA and VST info */ - - bool integer_step; - bool toggled; - bool logarithmic; - bool sr_dependent; - string label; - float lower; - float upper; - float step; - float smallstep; - float largestep; - bool min_unbound; - bool max_unbound; - }; - - virtual std::string unique_id() const = 0; - virtual const char * label() const = 0; - virtual const char * name() const = 0; - virtual const char * maker() const = 0; - virtual uint32_t parameter_count () const = 0; - virtual float default_value (uint32_t port) = 0; - virtual float get_parameter(uint32_t which) const = 0; - - virtual int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const = 0; - virtual uint32_t nth_parameter (uint32_t which, bool& ok) const = 0; - virtual void activate () = 0; - virtual void deactivate () = 0; - virtual void set_block_size (nframes_t nframes) = 0; - - virtual int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset) = 0; - - virtual std::set automatable() const = 0; - virtual string describe_parameter (Parameter) = 0; - virtual string state_node_name() const = 0; - virtual void print_parameter (uint32_t, char*, uint32_t len) const = 0; - - virtual bool parameter_is_audio(uint32_t) const = 0; - virtual bool parameter_is_control(uint32_t) const = 0; - virtual bool parameter_is_input(uint32_t) const = 0; - virtual bool parameter_is_output(uint32_t) const = 0; - - virtual bool save_preset(string name) = 0; - virtual bool load_preset (const string preset_label); - virtual std::vector get_presets(); - - virtual bool has_editor() const = 0; - - PluginInfoPtr get_info() { return _info; } - void set_info (const PluginInfoPtr inf) { _info = inf; } - - ARDOUR::AudioEngine& engine() const { return _engine; } - ARDOUR::Session& session() const { return _session; } - - void set_cycles (uint32_t c) { _cycles = c; } - cycles_t cycles() const { return _cycles; } - - protected: - friend class PluginInsert; - friend struct PluginInsert::PluginControl; - virtual void set_parameter (uint32_t which, float val) = 0; - - ARDOUR::AudioEngine& _engine; - ARDOUR::Session& _session; - PluginInfoPtr _info; - uint32_t _cycles; - map presets; - bool save_preset(string name, string domain /* vst, ladspa etc. */); -}; - -PluginPtr find_plugin(ARDOUR::Session&, string unique_id, ARDOUR::PluginType); - -} // namespace ARDOUR - -#endif /* __ardour_plugin_h__ */ diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h deleted file mode 100644 index 42c53c487c..0000000000 --- a/libs/ardour/ardour/plugin_insert.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - Copyright (C) 2000,2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_plugin_insert_h__ -#define __ardour_plugin_insert_h__ - -#include -#include - -#include -#include -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Session; -class Route; -class Plugin; - -/** Plugin inserts: send data through a plugin - */ -class PluginInsert : public Processor -{ - public: - PluginInsert (Session&, boost::shared_ptr, Placement); - PluginInsert (Session&, const XMLNode&); - PluginInsert (const PluginInsert&); - ~PluginInsert (); - - static const string port_automation_node_name; - - XMLNode& state(bool); - XMLNode& get_state(void); - int set_state(const XMLNode&); - - void run_in_place (BufferSet& in, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset); - void silence (nframes_t nframes, nframes_t offset); - - void activate (); - void deactivate (); - - void set_block_size (nframes_t nframes); - - ChanCount output_streams() const; - ChanCount input_streams() const; - ChanCount natural_output_streams() const; - ChanCount natural_input_streams() const; - - bool set_count (uint32_t num); - uint32_t get_count () const { return _plugins.size(); } - - virtual bool can_support_input_configuration (ChanCount in) const; - virtual ChanCount output_for_input_configuration (ChanCount in) const; - virtual bool configure_io (ChanCount in, ChanCount out); - - bool is_generator() const; - - void set_parameter (Parameter param, float val); - float get_parameter (Parameter param); - - float default_parameter_value (Parameter param); - - struct PluginControl : public AutomationControl - { - PluginControl (PluginInsert& p, boost::shared_ptr list); - - void set_value (float val); - float get_value (void) const; - - private: - PluginInsert& _plugin; - boost::shared_ptr _list; - bool _logarithmic; - bool _toggled; - }; - - boost::shared_ptr plugin(uint32_t num=0) const { - if (num < _plugins.size()) { - return _plugins[num]; - } else { - return _plugins[0]; // we always have one - } - } - - PluginType type (); - - string describe_parameter (Parameter param); - - nframes_t signal_latency() const; - - private: - - void parameter_changed (Parameter, float); - - std::vector > _plugins; - - void automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offset); - void connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now = 0); - - void init (); - void set_automatable (); - void auto_state_changed (Parameter which); - - int32_t count_for_configuration (ChanCount in, ChanCount out) const; - - boost::shared_ptr plugin_factory (boost::shared_ptr); -}; - -} // namespace ARDOUR - -#endif /* __ardour_plugin_insert_h__ */ diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h deleted file mode 100644 index 892c8bd75a..0000000000 --- a/libs/ardour/ardour/plugin_manager.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_plugin_manager_h__ -#define __ardour_plugin_manager_h__ - -#include -#include -#include - -#include -#include - -#ifdef HAVE_SLV2 -#include -#endif - -namespace ARDOUR { - -class Plugin; - -class PluginManager { - public: - PluginManager (); - ~PluginManager (); - - /* realtime plugin APIs */ - - ARDOUR::PluginInfoList &vst_plugin_info () { return _vst_plugin_info; } - ARDOUR::PluginInfoList &ladspa_plugin_info () { return _ladspa_plugin_info; } - ARDOUR::PluginInfoList &lv2_plugin_info () { return _lv2_plugin_info; } - ARDOUR::PluginInfoList &au_plugin_info () { return _au_plugin_info; } - - void refresh (); - - int add_ladspa_directory (std::string dirpath); - int add_vst_directory (std::string dirpath); - - static PluginManager* the_manager() { return _manager; } - - private: - ARDOUR::PluginInfoList _vst_plugin_info; - ARDOUR::PluginInfoList _ladspa_plugin_info; - ARDOUR::PluginInfoList _lv2_plugin_info; - ARDOUR::PluginInfoList _au_plugin_info; - -#ifdef HAVE_SLV2 - LV2World* _lv2_world; -#endif - - std::map rdf_type; - - std::string ladspa_path; - std::string vst_path; - - void ladspa_refresh (); - void vst_refresh (); - - void add_lrdf_data (const std::string &path); - void add_ladspa_presets (); - void add_vst_presets (); - void add_presets (std::string domain); - - int au_discover (); - void au_refresh (); - - int lv2_discover (); - void lv2_refresh (); - - int vst_discover_from_path (std::string path); - int vst_discover (std::string path); - - int ladspa_discover_from_path (std::string path); - int ladspa_discover (std::string path); - - std::string get_ladspa_category (uint32_t id); - std::vector ladspa_plugin_whitelist; - - static PluginManager* _manager; // singleton -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_plugin_manager_h__ */ - diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h deleted file mode 100644 index 93c34da16d..0000000000 --- a/libs/ardour/ardour/port.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_port_h__ -#define __ardour_port_h__ - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class AudioEngine; -class Buffer; - -/** Abstract base for ports - */ -class Port : public virtual sigc::trackable { - public: - enum Flags { - IsInput = JackPortIsInput, - IsOutput = JackPortIsOutput, - IsPhysical = JackPortIsPhysical, - IsTerminal = JackPortIsTerminal, - CanMonitor = JackPortCanMonitor - }; - - virtual ~Port(); - - std::string name() const { - return _name; - } - - Flags flags() const { - return _flags; - } - - bool receives_input() const { - return _flags & IsInput; - } - - bool sends_output () const { - return _flags & IsOutput; - } - - bool can_monitor () const { - return _flags & CanMonitor; - } - - void enable_metering() { - _metering++; - } - - void disable_metering () { - if (_metering) { _metering--; } - } - - virtual void cycle_start (nframes_t nframes, nframes_t offset) {} - virtual void cycle_end (nframes_t nframes, nframes_t offset) {} - virtual DataType type() const = 0; - virtual Buffer& get_buffer() = 0; - - virtual bool connected () const; - virtual bool connected_to (const std::string& portname) const; - virtual int get_connections (std::vector&) const; - - virtual int connect (Port& other); - virtual int disconnect (Port& other); - virtual int disconnect_all (); - - virtual void reset (); - virtual int reestablish () {return 0; } - virtual int reconnect () { return 0; } - - virtual int set_name (const std::string& str) { - _name = str; - return 0; - } - - virtual std::string short_name() const = 0; - virtual bool monitoring_input () const = 0; - virtual void ensure_monitor_input (bool yn) = 0; - virtual void request_monitor_input (bool yn) = 0; - virtual nframes_t latency () const = 0; - virtual nframes_t total_latency () const = 0; - virtual void set_latency (nframes_t nframes) = 0; - - sigc::signal MonitorInputChanged; - sigc::signal ClockSyncChanged; - - static void set_engine (AudioEngine*); - - protected: - friend class AudioEngine; - - Port (const std::string& name, Flags flgs); - - virtual void recompute_total_latency() const {} - - /* engine isn't supposed to access below here */ - - Flags _flags; - std::string _type; - std::string _name; - unsigned short _metering; - bool _last_monitor; - nframes_t _latency; - - std::set _connections; - - static AudioEngine* engine; -}; - -class PortConnectableByName { - public: - PortConnectableByName() {} - virtual ~PortConnectableByName() {} - - virtual int connect (const std::string& other_name) = 0; - virtual int disconnect (const std::string& other_name) = 0; -}; - -class PortFacade : public virtual Port, public PortConnectableByName { - public: - PortFacade (const std::string& name, Flags flgs) : Port (name, flgs), _ext_port (0) {} - ~PortFacade() {} - - void reset (); - int reestablish (); - int reconnect (); - - int connect (Port& other); - int disconnect (Port& other); - int disconnect_all (); - - int connect (const std::string& other_name); - int disconnect (const std::string& other_name); - - bool connected () const; - bool connected_to (const std::string& portname) const; - int get_connections (std::vector&) const; - - std::string short_name() const; - int set_name (const std::string& str); - bool monitoring_input () const; - void ensure_monitor_input (bool yn); - void request_monitor_input (bool yn); - nframes_t latency () const; - nframes_t total_latency () const; - void set_latency (nframes_t nframes); - - protected: - Port* _ext_port; -}; - -} // namespace ARDOUR - -#endif /* __ardour_port_h__ */ diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h deleted file mode 100644 index 1743040bf5..0000000000 --- a/libs/ardour/ardour/port_insert.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2000,2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_port_insert_h__ -#define __ardour_port_insert_h__ - -#include -#include -#include - -#include -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Session; - -/** Port inserts: send output to a Jack port, pick up input at a Jack port - */ -class PortInsert : public IOProcessor -{ - public: - PortInsert (Session&, Placement); - PortInsert (Session&, const XMLNode&); - PortInsert (const PortInsert&); - ~PortInsert (); - - XMLNode& state(bool full); - XMLNode& get_state(void); - int set_state(const XMLNode&); - - void init (); - - void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset); - - nframes_t signal_latency() const; - - ChanCount output_streams() const; - ChanCount input_streams() const; - - virtual bool can_support_input_configuration (ChanCount in) const; - virtual ChanCount output_for_input_configuration (ChanCount in) const; - virtual bool configure_io (ChanCount in, ChanCount out); - - uint32_t bit_slot() const { return bitslot; } - - private: - uint32_t bitslot; -}; - -} // namespace ARDOUR - -#endif /* __ardour_port_insert_h__ */ diff --git a/libs/ardour/ardour/port_set.h b/libs/ardour/ardour/port_set.h deleted file mode 100644 index 51673472c3..0000000000 --- a/libs/ardour/ardour/port_set.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_port_set_h__ -#define __ardour_port_set_h__ - -#include -#include -#include -#include -#include - -namespace ARDOUR { - - -/** An ordered list of Ports, possibly of various types. - * - * This allows access to all the ports as a list, ignoring type, or accessing - * the nth port of a given type. Note that port(n) and nth_audio_port(n) may - * NOT return the same port. - */ -class PortSet { -public: - PortSet(); - - size_t num_ports() const; - size_t num_ports(DataType type) const { return _ports[type].size(); } - - void add(Port* port); - bool remove(Port* port); - - /** nth port */ - Port* port(size_t index) const; - - /** nth port of type @a t, or nth port if t = NIL */ - Port* port(DataType t, size_t index) const; - - AudioPort* nth_audio_port(size_t n) const; - - MidiPort* nth_midi_port(size_t n) const; - - bool contains(const Port* port) const; - - /** Remove all ports from the PortSet. Ports are not deregistered with - * the engine, it's the caller's responsibility to not leak here! - */ - void clear() { _ports.clear(); } - - const ChanCount& count() const { return _count; } - - bool empty() const { return (_count.n_total() == 0); } - - // ITERATORS - - // FIXME: this is a filthy copy-and-paste mess - - class iterator { - public: - - Port& operator*() { return *_set.port(_type, _index); } - Port* operator->() { return _set.port(_type, _index); } - iterator& operator++() { ++_index; return *this; } // yes, prefix only - bool operator==(const iterator& other) { return (_index == other._index); } - bool operator!=(const iterator& other) { return (_index != other._index); } - - private: - friend class PortSet; - - iterator(PortSet& list, DataType type, size_t index) - : _set(list), _type(type), _index(index) {} - - PortSet& _set; - DataType _type; ///< Ignored if NIL (to iterator over entire set) - size_t _index; - }; - - iterator begin(DataType type = DataType::NIL) - { return iterator(*this, type, 0); } - - iterator end(DataType type = DataType::NIL) - { - return iterator(*this, type, - (type == DataType::NIL) ? _count.n_total() : _count.get(type)); - } - - // FIXME: typeify - class const_iterator { - public: - - const Port& operator*() { return *_set.port(_index); } - const Port* operator->() { return _set.port(_index); } - const_iterator& operator++() { ++_index; return *this; } // yes, prefix only - bool operator==(const const_iterator& other) { return (_index == other._index); } - bool operator!=(const const_iterator& other) { return (_index != other._index); } - - private: - friend class PortSet; - - const_iterator(const PortSet& list, size_t index) : _set(list), _index(index) {} - - const PortSet& _set; - size_t _index; - }; - - const_iterator begin() const { return const_iterator(*this, 0); } - const_iterator end() const { return const_iterator(*this, _count.n_total()); } - - - class audio_iterator { - public: - - AudioPort& operator*() { return *_set.nth_audio_port(_index); } - AudioPort* operator->() { return _set.nth_audio_port(_index); } - audio_iterator& operator++() { ++_index; return *this; } // yes, prefix only - bool operator==(const audio_iterator& other) { return (_index == other._index); } - bool operator!=(const audio_iterator& other) { return (_index != other._index); } - - private: - friend class PortSet; - - audio_iterator(PortSet& list, size_t index) : _set(list), _index(index) {} - - PortSet& _set; - size_t _index; - }; - - audio_iterator audio_begin() { return audio_iterator(*this, 0); } - audio_iterator audio_end() { return audio_iterator(*this, _count.n_audio()); } - -private: - // Prevent copies (undefined) - PortSet(const PortSet& copy); - void operator=(const PortSet& other); - - typedef std::vector PortVec; - - // Vector of vectors, indexed by DataType::to_index() - std::vector _ports; - - ChanCount _count; -}; - - -} // namespace ARDOUR - -#endif // __ardour_port_set_h__ diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h deleted file mode 100644 index d3e95e8ebf..0000000000 --- a/libs/ardour/ardour/processor.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_processor_h__ -#define __ardour_processor_h__ - -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Session; - -/* A mixer strip element - plugin, send, meter, etc. - */ -class Processor : public Automatable, public Latent -{ - public: - static const string state_node_name; - - Processor(Session&, const string& name, Placement p); // TODO: remove placement in favour of sort key - - virtual ~Processor() { } - - static boost::shared_ptr clone (boost::shared_ptr); - - uint32_t sort_key() const { return _sort_key; } - void set_sort_key (uint32_t key); - - Placement placement() const { return _placement; } - void set_placement (Placement); - - bool active () const { return _active; } - void set_active (bool yn); - - bool get_next_ab_is_active () const { return _next_ab_is_active; } - void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; } - - virtual nframes_t signal_latency() const { return 0; } - - virtual void transport_stopped (nframes_t frame) {} - - virtual void set_block_size (nframes_t nframes) {} - - virtual void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) { assert(is_in_place()); } - - virtual void run_out_of_place (BufferSet& input, BufferSet& output, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) { assert(is_out_of_place()); } - - virtual void silence (nframes_t nframes, nframes_t offset) {} - - virtual void activate () { _active = true; ActiveChanged.emit(); } - virtual void deactivate () { _active = false; ActiveChanged.emit(); } - - virtual bool configure_io (ChanCount in, ChanCount out) { _configured_input = in; return (_configured = true); } - - /* Derived classes should override these, or processor appears as an in-place pass-through */ - - /** In-place processors implement run_in_place and modify thee input buffer parameter */ - virtual bool is_in_place () const { return true; } - - /* Out-Of-Place processors implement run_out_of_place, don't modify the input parameter - * and write to their output parameter */ - virtual bool is_out_of_place () const { return false; } - - virtual bool can_support_input_configuration (ChanCount in) const { return true; } - virtual ChanCount output_for_input_configuration (ChanCount in) const { return in; } - virtual ChanCount output_streams() const { return _configured_input; } - virtual ChanCount input_streams () const { return _configured_input; } - - virtual XMLNode& state (bool full); - virtual XMLNode& get_state (void); - virtual int set_state (const XMLNode&); - - void *get_gui () const { return _gui; } - void set_gui (void *p) { _gui = p; } - - static sigc::signal ProcessorCreated; - - sigc::signal ActiveChanged; - sigc::signal PlacementChanged; - -protected: - bool _active; - bool _next_ab_is_active; - bool _configured; - ChanCount _configured_input; - Placement _placement; - uint32_t _sort_key; - void* _gui; /* generic, we don't know or care what this is */ -}; - -} // namespace ARDOUR - -#endif /* __ardour_processor_h__ */ diff --git a/libs/ardour/ardour/profile.h b/libs/ardour/ardour/profile.h deleted file mode 100644 index b016063c4d..0000000000 --- a/libs/ardour/ardour/profile.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_profile_h__ -#define __ardour_profile_h__ - -#include -#include - -namespace ARDOUR { - -class RuntimeProfile { - public: - enum Element { - SmallScreen, - SAE, - SinglePackage, - LastElement - }; - - RuntimeProfile() { bits.resize (LastElement); } - ~RuntimeProfile() {} - - void set_small_screen() { bits[SmallScreen] = true; } - bool get_small_screen() const { return bits[SmallScreen]; } - - void set_sae () { bits[SAE] = true; } - bool get_sae () const { return bits[SAE]; } - - void set_single_package () { bits[SinglePackage] = true; } - bool get_single_package () const { return bits[SinglePackage]; } - - private: - boost::dynamic_bitset bits; - -}; - -extern RuntimeProfile* Profile; - -}; // namespace ARDOUR - -#endif /* __ardour_profile_h__ */ diff --git a/libs/ardour/ardour/quantize.h b/libs/ardour/ardour/quantize.h deleted file mode 100644 index 143652dc63..0000000000 --- a/libs/ardour/ardour/quantize.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_quantize_h__ -#define __ardour_quantize_h__ - -#include - -namespace ARDOUR { - -class Quantize : public Filter { -public: - Quantize (ARDOUR::Session&, double q); - ~Quantize (); - - int run (boost::shared_ptr); - -private: - double _q; -}; - -} /* namespace */ - -#endif /* __ardour_quantize_h__ */ diff --git a/libs/ardour/ardour/rb_effect.h b/libs/ardour/ardour/rb_effect.h deleted file mode 100644 index a536a309b3..0000000000 --- a/libs/ardour/ardour/rb_effect.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_rbeffect_h__ -#define __ardour_rbeffect_h__ - -#include - -namespace ARDOUR { - -class AudioRegion; - -class RBEffect : public Filter { - public: - RBEffect (ARDOUR::Session&, TimeFXRequest&); - ~RBEffect (); - - int run (boost::shared_ptr); - - private: - TimeFXRequest& tsr; -}; - -} /* namespace */ - -#endif /* __ardour_rbeffect_h__ */ diff --git a/libs/ardour/ardour/readable.h b/libs/ardour/ardour/readable.h deleted file mode 100644 index e072a1c95e..0000000000 --- a/libs/ardour/ardour/readable.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ardour_readable_h__ -#define __ardour_readable_h__ - -#include - -namespace ARDOUR { - -class Readable { - public: - Readable () {} - virtual ~Readable() {} - - virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const = 0; - virtual nframes64_t readable_length() const = 0; - virtual uint32_t n_channels () const = 0; -}; - -} - -#endif /* __ardour_readable_h__ */ diff --git a/libs/ardour/ardour/recent_sessions.h b/libs/ardour/ardour/recent_sessions.h deleted file mode 100644 index e32b67bcd8..0000000000 --- a/libs/ardour/ardour/recent_sessions.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_recent_sessions_h__ -#define __ardour_recent_sessions_h__ - -#include -#include -#include - -using std::deque; -using std::pair; -using std::string; - -namespace ARDOUR { - typedef deque > RecentSessions; - - int read_recent_sessions (RecentSessions& rs); - int store_recent_sessions (string name, string path); - int write_recent_sessions (RecentSessions& rs); -}; // namespace ARDOUR - -#endif // __ardour_recent_sessions_h__ diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h deleted file mode 100644 index 00315846b2..0000000000 --- a/libs/ardour/ardour/region.h +++ /dev/null @@ -1,313 +0,0 @@ -/* - Copyright (C) 2000-2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_region_h__ -#define __ardour_region_h__ - -#include -#include -#include - -#include - -#include -#include -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Playlist; -class Filter; -class ExportSpecification; - -enum RegionEditState { - EditChangesNothing = 0, - EditChangesName = 1, - EditChangesID = 2 -}; - -class Region : public Automatable, public boost::enable_shared_from_this, public Readable -{ - public: - typedef std::vector > SourceList; - - enum Flag { - Muted = 0x1, - Opaque = 0x2, - EnvelopeActive = 0x4, - DefaultFadeIn = 0x8, - DefaultFadeOut = 0x10, - Locked = 0x20, - Automatic = 0x40, - WholeFile = 0x80, - FadeIn = 0x100, - FadeOut = 0x200, - Copied = 0x400, - Import = 0x800, - External = 0x1000, - SyncMarked = 0x2000, - LeftOfSplit = 0x4000, - RightOfSplit = 0x8000, - Hidden = 0x10000, - DoNotSaveState = 0x20000, - PositionLocked = 0x40000, - // - range_guarantoor = USHRT_MAX - }; - - enum PositionLockStyle { - AudioTime, - MusicTime - }; - - static const Flag DefaultFlags = Flag (Opaque|DefaultFadeIn|DefaultFadeOut|FadeIn|FadeOut); - - static Change FadeChanged; - static Change SyncOffsetChanged; - static Change MuteChanged; - static Change OpacityChanged; - static Change LockChanged; - static Change LayerChanged; - static Change HiddenChanged; - - sigc::signal StateChanged; - - virtual ~Region(); - - /** Note: changing the name of a Region does not constitute an edit */ - bool set_name (const std::string& str); - - const DataType& data_type() const { return _type; } - - /** - * Thats how the region parameters play together: - *
-	 * |------------------------------------------------------------------- track
-	 *                    |..........[------------------].....| region
-	 * |-----------------------------| _position
-	 *                               |------------------| _length
-	 *                    |----------| _start
-	 * 
- */ - nframes_t position () const { return _position; } - nframes_t start () const { return _start; } - nframes_t length() const { return _length; } - layer_t layer () const { return _layer; } - - /* these two are valid ONLY during a StateChanged signal handler */ - - nframes_t last_position() const { return _last_position; } - nframes_t last_length() const { return _last_length; } - - nframes64_t ancestral_start () const { return _ancestral_start; } - nframes64_t ancestral_length () const { return _ancestral_length; } - float stretch() const { return _stretch; } - float shift() const { return _shift; } - - void set_ancestral_data (nframes64_t start, nframes64_t length, float stretch, float shift); - - nframes_t sync_offset(int& dir) const; - nframes_t sync_position() const; - - nframes_t adjust_to_sync (nframes_t); - - /* first_frame() is an alias; last_frame() just hides some math */ - - nframes_t first_frame() const { return _position; } - nframes_t last_frame() const { return _position + _length - 1; } - - Flag flags() const { return _flags; } - bool hidden() const { return _flags & Hidden; } - bool muted() const { return _flags & Muted; } - bool opaque () const { return _flags & Opaque; } - bool locked() const { return _flags & Locked; } - bool position_locked() const { return _flags & PositionLocked; } - bool automatic() const { return _flags & Automatic; } - bool whole_file() const { return _flags & WholeFile ; } - bool captured() const { return !(_flags & (Region::Flag (Region::Import|Region::External))); } - bool can_move() const { return !(_flags & (Locked|PositionLocked)); } - - PositionLockStyle positional_lock_style() const { return _positional_lock_style; } - void set_position_lock_style (PositionLockStyle ps); - void recompute_position_from_lock_style (); - - virtual bool should_save_state () const { return !(_flags & DoNotSaveState); }; - - void freeze (); - void thaw (const string& why); - - bool covers (nframes_t frame) const { - return first_frame() <= frame && frame <= last_frame(); - } - - OverlapType coverage (nframes_t start, nframes_t end) const { - return ARDOUR::coverage (first_frame(), last_frame(), start, end); - } - - bool equivalent (boost::shared_ptr) const; - bool size_equivalent (boost::shared_ptr) const; - bool overlap_equivalent (boost::shared_ptr) const; - bool region_list_equivalent (boost::shared_ptr) const; - bool source_equivalent (boost::shared_ptr) const; - - /* EDITING OPERATIONS */ - - void set_length (nframes_t, void *src); - void set_start (nframes_t, void *src); - void set_position (nframes_t, void *src); - void set_position_on_top (nframes_t, void *src); - void special_set_position (nframes_t); - void update_position_after_tempo_map_change (); - void nudge_position (nframes64_t, void *src); - - bool at_natural_position () const; - void move_to_natural_position (void *src); - - void trim_start (nframes_t new_position, void *src); - void trim_front (nframes_t new_position, void *src); - void trim_end (nframes_t new_position, void *src); - void trim_to (nframes_t position, nframes_t length, void *src); - - void set_layer (layer_t l); /* ONLY Playlist can call this */ - void raise (); - void lower (); - void raise_to_top (); - void lower_to_bottom (); - - void set_sync_position (nframes_t n); - void clear_sync_position (); - void set_hidden (bool yn); - void set_muted (bool yn); - void set_opaque (bool yn); - void set_locked (bool yn); - void set_position_locked (bool yn); - - int apply (Filter&); - - virtual uint32_t read_data_count() const { return _read_data_count; } - - boost::shared_ptr playlist() const { return _playlist.lock(); } - virtual void set_playlist (boost::weak_ptr); - - void source_deleted (boost::shared_ptr); - - boost::shared_ptr source (uint32_t n=0) const { return _sources[ (n < _sources.size()) ? n : 0 ]; } - uint32_t n_channels() const { return _sources.size(); } - - const SourceList& sources() const { return _sources; } - const SourceList& master_sources() const { return _master_sources; } - - std::vector master_source_names(); - void set_master_sources (SourceList&); - - /* serialization */ - - XMLNode& get_state (); - virtual XMLNode& state (bool); - virtual int set_state (const XMLNode&); - virtual int set_live_state (const XMLNode&, Change&, bool send); - - virtual boost::shared_ptr get_parent() const; - - uint64_t last_layer_op() const { return _last_layer_op; } - void set_last_layer_op (uint64_t when); - - virtual bool is_dependent() const { return false; } - virtual bool depends_on (boost::shared_ptr other) const { return false; } - - virtual int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) = 0; - - virtual int get_transients (AnalysisFeatureList&, bool force_new = false) { - // no transients, but its OK - return 0; - } - - void invalidate_transients (); - - protected: - friend class RegionFactory; - - Region (boost::shared_ptr src, nframes_t start, nframes_t length, - const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags); - Region (const SourceList& srcs, nframes_t start, nframes_t length, - const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags); - - Region (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags); - Region (boost::shared_ptr); - Region (boost::shared_ptr src, const XMLNode&); - Region (const SourceList& srcs, const XMLNode&); - - Region (Session& s, nframes_t start, nframes_t length, const string& name, DataType, layer_t = 0, Flag flags = DefaultFlags); - - protected: - XMLNode& get_short_state (); /* used only by Session */ - - void send_change (Change); - - void trim_to_internal (nframes_t position, nframes_t length, void *src); - void set_position_internal (nframes_t pos, bool allow_bbt_recompute); - - bool copied() const { return _flags & Copied; } - void maybe_uncopy (); - void first_edit (); - - bool verify_start (nframes_t); - bool verify_start_and_length (nframes_t, nframes_t&); - bool verify_start_mutable (nframes_t&_start); - bool verify_length (nframes_t); - - virtual void recompute_at_start () = 0; - virtual void recompute_at_end () = 0; - - DataType _type; - Flag _flags; - nframes_t _start; - nframes_t _length; - nframes_t _last_length; - nframes_t _position; - nframes_t _last_position; - PositionLockStyle _positional_lock_style; - nframes_t _sync_position; - layer_t _layer; - mutable RegionEditState _first_edit; - int _frozen; - nframes64_t _ancestral_start; - nframes64_t _ancestral_length; - float _stretch; - float _shift; - BBT_Time _bbt_time; - AnalysisFeatureList _transients; - bool _valid_transients; - mutable uint32_t _read_data_count; ///< modified in read() - Change _pending_changed; - uint64_t _last_layer_op; ///< timestamp - Glib::Mutex _lock; - SourceList _sources; - /** Used when timefx are applied, so we can always use the original source */ - SourceList _master_sources; - - boost::weak_ptr _playlist; -}; - -} /* namespace ARDOUR */ - -#endif /* __ardour_region_h__ */ diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h deleted file mode 100644 index 12437ba998..0000000000 --- a/libs/ardour/ardour/region_factory.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_region_factory_h__ -#define __ardour_region_factory_h__ - -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Session; - -class RegionFactory { - - public: - /** This is emitted only when a new id is assigned. Therefore, - in a pure Region copy, it will not be emitted. - - It must be emitted by derived classes, not Region - itself, to permit dynamic_cast<> to be used to - infer the type of Region. - */ - static sigc::signal > CheckNewRegion; - - static boost::shared_ptr create (boost::shared_ptr); - - /* note: both of the first two should use const shared_ptr as well, but - gcc 4.1 doesn't seem to be able to disambiguate them if they do. - */ - - static boost::shared_ptr create (boost::shared_ptr, nframes_t start, - nframes_t length, std::string name, - layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (boost::shared_ptr, nframes_t start, - nframes_t length, std::string name, - layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (Session&, XMLNode&, bool); - static boost::shared_ptr create (SourceList &, const XMLNode&); -}; - -} - -#endif /* __ardour_region_factory_h__ */ diff --git a/libs/ardour/ardour/resampled_source.h b/libs/ardour/ardour/resampled_source.h deleted file mode 100644 index 6eca4cda98..0000000000 --- a/libs/ardour/ardour/resampled_source.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_resampled_source_h__ -#define __ardour_resampled_source_h__ - -#include - -#include -#include - -namespace ARDOUR { - -class ResampledImportableSource : public ImportableSource -{ - public: - ResampledImportableSource (boost::shared_ptr, nframes_t rate, SrcQuality); - - ~ResampledImportableSource (); - - nframes_t read (Sample* buffer, nframes_t nframes); - float ratio() const { return src_data.src_ratio; } - uint32_t channels() const { return source->channels(); } - nframes_t length() const { return source->length(); } - nframes_t samplerate() const { return source->samplerate(); } - void seek (nframes_t pos) { source->seek (pos); } - - static const uint32_t blocksize; - - private: - boost::shared_ptr source; - float* input; - SRC_STATE* src_state; - SRC_DATA src_data; -}; - -} - -#endif /* __ardour_resampled_source_h__ */ diff --git a/libs/ardour/ardour/reverse.h b/libs/ardour/ardour/reverse.h deleted file mode 100644 index 7870b5aa2e..0000000000 --- a/libs/ardour/ardour/reverse.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_reverse_h__ -#define __ardour_reverse_h__ - -#include - -namespace ARDOUR { - -class Reverse : public Filter { - public: - Reverse (ARDOUR::Session&); - ~Reverse (); - - int run (boost::shared_ptr); -}; - -} /* namespace */ - -#endif /* __ardour_reverse_h__ */ diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h deleted file mode 100644 index c7c0b77102..0000000000 --- a/libs/ardour/ardour/route.h +++ /dev/null @@ -1,384 +0,0 @@ -/* - Copyright (C) 2000-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_route_h__ -#define __ardour_route_h__ - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Processor; -class Send; -class RouteGroup; - -enum mute_type { - PRE_FADER = 0x1, - POST_FADER = 0x2, - CONTROL_OUTS = 0x4, - MAIN_OUTS = 0x8 -}; - -class Route : public IO -{ - protected: - - typedef list > ProcessorList; - - public: - - enum Flag { - Hidden = 0x1, - MasterOut = 0x2, - ControlOut = 0x4 - }; - - - Route (Session&, std::string name, int input_min, int input_max, int output_min, int output_max, - Flag flags = Flag(0), DataType default_type = DataType::AUDIO); - Route (Session&, const XMLNode&, DataType default_type = DataType::AUDIO); - virtual ~Route(); - - static std::string ensure_track_or_route_name(std::string, Session &); - - std::string comment() { return _comment; } - void set_comment (std::string str, void *src); - - long order_key (const char* name) const; - void set_order_key (const char* name, long n); - - bool is_hidden() const { return _flags & Hidden; } - bool is_master() const { return _flags & MasterOut; } - bool is_control() const { return _flags & ControlOut; } - - /* these are the core of the API of a Route. see the protected sections as well */ - - - virtual int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, int declick, bool can_record, bool rec_monitors_input); - - virtual int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input); - - virtual int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool can_record, bool rec_monitors_input); - virtual void toggle_monitor_input (); - virtual bool can_record() { return false; } - virtual void set_record_enable (bool yn, void *src) {} - virtual bool record_enabled() const { return false; } - virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_processors); - virtual void set_pending_declick (int); - - /* end of vfunc-based API */ - - /* override IO::set_gain() to provide group control */ - - void set_gain (gain_t val, void *src); - void inc_gain (gain_t delta, void *src); - - void set_solo (bool yn, void *src); - bool soloed() const { return _soloed; } - - void set_solo_safe (bool yn, void *src); - bool solo_safe() const { return _solo_safe; } - - void set_mute (bool yn, void *src); - bool muted() const { return _muted; } - bool solo_muted() const { return desired_solo_gain == 0.0; } - - void set_mute_config (mute_type, bool, void *src); - bool get_mute_config (mute_type); - - void set_edit_group (RouteGroup *, void *); - void drop_edit_group (void *); - RouteGroup *edit_group () { return _edit_group; } - - void set_mix_group (RouteGroup *, void *); - void drop_mix_group (void *); - RouteGroup *mix_group () { return _mix_group; } - - virtual void set_meter_point (MeterPoint, void *src); - MeterPoint meter_point() const { return _meter_point; } - - /* Processors */ - - void flush_processors (); - - template void foreach_processor (T *obj, void (T::*func)(boost::shared_ptr)) { - Glib::RWLock::ReaderLock lm (_processor_lock); - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - (obj->*func) (*i); - } - } - - boost::shared_ptr nth_processor (uint32_t n) { - Glib::RWLock::ReaderLock lm (_processor_lock); - ProcessorList::iterator i; - for (i = _processors.begin(); i != _processors.end() && n; ++i, --n); - if (i == _processors.end()) { - return boost::shared_ptr (); - } else { - return *i; - } - } - - ChanCount max_processor_outs () const { return processor_max_outs; } - ChanCount pre_fader_streams() const; - - /** A record of the stream configuration at some point in the processor list. - * Used to return where and why an processor list configuration request failed. - */ - struct ProcessorStreams { - ProcessorStreams(size_t i=0, ChanCount c=ChanCount()) : index(i), count(c) {} - - size_t index; ///< Index of processor where configuration failed - ChanCount count; ///< Input requested of processor - }; - - int add_processor (boost::shared_ptr, ProcessorStreams* err = 0); - int add_processors (const ProcessorList&, ProcessorStreams* err = 0); - int remove_processor (boost::shared_ptr, ProcessorStreams* err = 0); - int copy_processors (const Route&, Placement, ProcessorStreams* err = 0); - int sort_processors (ProcessorStreams* err = 0); - void disable_processors (Placement); - void disable_processors (); - void disable_plugins (Placement); - void disable_plugins (); - void ab_plugins (bool forward); - void clear_processors (Placement); - void all_processors_flip(); - void all_processors_active (Placement, bool state); - - virtual nframes_t update_total_latency(); - void set_latency_delay (nframes_t); - void set_user_latency (nframes_t); - nframes_t initial_delay() const { return _initial_delay; } - - sigc::signal solo_changed; - sigc::signal solo_safe_changed; - sigc::signal comment_changed; - sigc::signal mute_changed; - sigc::signal pre_fader_changed; - sigc::signal post_fader_changed; - sigc::signal control_outs_changed; - sigc::signal main_outs_changed; - sigc::signal processors_changed; - sigc::signal record_enable_changed; - sigc::signal edit_group_changed; - sigc::signal mix_group_changed; - sigc::signal meter_change; - sigc::signal signal_latency_changed; - sigc::signal initial_delay_changed; - - /* gui's call this for their own purposes. */ - - sigc::signal gui_changed; - - /* stateful */ - - XMLNode& get_state(); - int set_state(const XMLNode& node); - virtual XMLNode& get_template(); - - XMLNode& get_processor_state (); - int set_processor_state (const XMLNode&); - - sigc::signal SelectedChanged; - - int set_control_outs (const vector& ports); - IO* control_outs() { return _control_outs; } - - bool feeds (boost::shared_ptr); - set > fed_by; - - struct ToggleControllable : public PBD::Controllable { - enum ToggleType { - MuteControl = 0, - SoloControl - }; - - ToggleControllable (std::string name, Route&, ToggleType); - void set_value (float); - float get_value (void) const; - - Route& route; - ToggleType type; - }; - - boost::shared_ptr solo_control() { - return _solo_control; - } - - boost::shared_ptr mute_control() { - return _mute_control; - } - - void automation_snapshot (nframes_t now, bool force=false); - void protect_automation (); - - void set_remote_control_id (uint32_t id); - uint32_t remote_control_id () const; - sigc::signal RemoteControlIDChanged; - - void sync_order_keys (); - static sigc::signal SyncOrderKeys; - - protected: - friend class Session; - - void set_solo_mute (bool yn); - void set_block_size (nframes_t nframes); - bool has_external_redirects() const; - void curve_reallocate (); - - protected: - Flag _flags; - - /* tight cache-line access here is more important than sheer speed of - access. - */ - - bool _muted : 1; - bool _soloed : 1; - bool _solo_safe : 1; - bool _recordable : 1; - bool _mute_affects_pre_fader : 1; - bool _mute_affects_post_fader : 1; - bool _mute_affects_control_outs : 1; - bool _mute_affects_main_outs : 1; - bool _silent : 1; - bool _declickable : 1; - int _pending_declick; - - MeterPoint _meter_point; - - gain_t solo_gain; - gain_t mute_gain; - gain_t desired_solo_gain; - gain_t desired_mute_gain; - - - - nframes_t _initial_delay; - nframes_t _roll_delay; - ProcessorList _processors; - Glib::RWLock _processor_lock; - IO *_control_outs; - Glib::Mutex _control_outs_lock; - RouteGroup *_edit_group; - RouteGroup *_mix_group; - std::string _comment; - bool _have_internal_generator; - - boost::shared_ptr _solo_control; - boost::shared_ptr _mute_control; - - nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&); - - void passthru (nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset, int declick, bool meter_inputs); - - virtual void process_output_buffers (BufferSet& bufs, - nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset, bool with_processors, int declick, - bool meter); - - protected: - - virtual XMLNode& state(bool); - - void passthru_silence (nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset, int declick, - bool meter); - - void silence (nframes_t nframes, nframes_t offset); - - sigc::connection input_signal_connection; - - ChanCount processor_max_outs; - uint32_t _remote_control_id; - - uint32_t pans_required() const; - ChanCount n_process_buffers (); - - virtual int _set_state (const XMLNode&, bool call_base); - virtual void _set_processor_states (const XMLNodeList&); - - private: - void init (); - - static uint32_t order_key_cnt; - - struct ltstr - { - bool operator()(const char* s1, const char* s2) const - { - return strcmp(s1, s2) < 0; - } - }; - - typedef std::map OrderKeys; - OrderKeys order_keys; - - void input_change_handler (IOChange, void *src); - void output_change_handler (IOChange, void *src); - - int reset_plugin_counts (ProcessorStreams*); /* locked */ - int _reset_plugin_counts (ProcessorStreams*); /* unlocked */ - - /* processor I/O channels and plugin count handling */ - - struct ProcessorCount { - boost::shared_ptr processor; - ChanCount in; - ChanCount out; - - ProcessorCount (boost::shared_ptr ins) : processor(ins) {} - }; - - int32_t apply_some_plugin_counts (std::list& iclist); - bool check_some_plugin_counts (std::list& iclist, ChanCount required_inputs, ProcessorStreams* err_streams); - - void set_deferred_state (); - void add_processor_from_xml (const XMLNode&); -}; - -} // namespace ARDOUR - -#endif /* __ardour_route_h__ */ diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h deleted file mode 100644 index ae16394289..0000000000 --- a/libs/ardour/ardour/route_group.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_route_group_h__ -#define __ardour_route_group_h__ - -#include -#include -#include -#include -#include -#include -#include - -using std::string; -using std::list; - -namespace ARDOUR { - -class Route; -class Track; -class AudioTrack; -class Session; - -class RouteGroup : public PBD::Stateful, public sigc::trackable { - public: - enum Flag { - Relative = 0x1, - Active = 0x2, - Hidden = 0x4 - }; - - RouteGroup (Session& s, const string &n, Flag f = Flag(0)); - - const string& name() { return _name; } - void set_name (std::string str); - - bool is_active () const { return _flags & Active; } - bool is_relative () const { return _flags & Relative; } - bool is_hidden () const { return _flags & Hidden; } - bool empty() const {return routes.empty();} - - gain_t get_max_factor(gain_t factor); - gain_t get_min_factor(gain_t factor); - - int size() { return routes.size();} - ARDOUR::Route * first () const { return *routes.begin();} - - void set_active (bool yn, void *src); - void set_relative (bool yn, void *src); - void set_hidden (bool yn, void *src); - - int add (Route *); - - int remove (Route *); - - void apply (void (Route::*func)(void *), void *src) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { - ((*i)->*func)(src); - } - } - - template void apply (void (Route::*func)(T, void *), T val, void *src) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { - ((*i)->*func)(val, src); - } - } - - template void foreach_route (T *obj, void (T::*func)(Route&)) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { - (obj->*func)(**i); - } - } - - /* to use these, #include */ - - template void apply (void (Track::*func)(T, void *), T val, void *src); - - /* fills at_set with all members of the group that are AudioTracks */ - - void audio_track_group (std::set& at_set); - - void clear () { - routes.clear (); - changed(); - } - - const list& route_list() { return routes; } - - sigc::signal changed; - sigc::signal FlagsChanged; - - XMLNode& get_state (void); - - int set_state (const XMLNode&); - - private: - Session& _session; - list routes; - string _name; - Flag _flags; - - void remove_when_going_away (Route*); -}; - -} /* namespace */ - -#endif /* __ardour_route_group_h__ */ diff --git a/libs/ardour/ardour/route_group_specialized.h b/libs/ardour/ardour/route_group_specialized.h deleted file mode 100644 index 9e04c46d0e..0000000000 --- a/libs/ardour/ardour/route_group_specialized.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_route_group_specialized_h__ -#define __ardour_route_group_specialized_h__ - -#include -#include - -namespace ARDOUR { - -template void -RouteGroup::apply (void (Track::*func)(T, void *), T val, void *src) -{ - for (list::iterator i = routes.begin(); i != routes.end(); i++) { - Track *at; - if ((at = dynamic_cast(*i)) != 0) { - (at->*func)(val, this); - } - } -} - -} /* namespace ARDOUR */ - -#endif /* __ardour_route_group_specialized_h__ */ diff --git a/libs/ardour/ardour/runtime_functions.h b/libs/ardour/ardour/runtime_functions.h deleted file mode 100644 index c1dab4ebc7..0000000000 --- a/libs/ardour/ardour/runtime_functions.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_runtime_functions_h__ -#define __ardour_runtime_functions_h__ - -#include - -namespace ARDOUR { - - typedef float (*compute_peak_t) (const ARDOUR::Sample *, nframes_t, float); - typedef void (*find_peaks_t) (const ARDOUR::Sample *, nframes_t, float *, float*); - typedef void (*apply_gain_to_buffer_t) (ARDOUR::Sample *, nframes_t, float); - typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, nframes_t, float); - typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, nframes_t); - - extern compute_peak_t compute_peak; - extern find_peaks_t find_peaks; - extern apply_gain_to_buffer_t apply_gain_to_buffer; - extern mix_buffers_with_gain_t mix_buffers_with_gain; - extern mix_buffers_no_gain_t mix_buffers_no_gain; -} - -#endif /* __ardour_runtime_functions_h__ */ diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h deleted file mode 100644 index 1ee8bbceca..0000000000 --- a/libs/ardour/ardour/send.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_send_h__ -#define __ardour_send_h__ - -#include -#include - - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class Send : public IOProcessor -{ - public: - Send (Session&, Placement); - Send (Session&, const XMLNode&); - Send (const Send&); - virtual ~Send (); - - uint32_t bit_slot() const { return bitslot; } - - ChanCount output_streams() const; - ChanCount input_streams () const; - - void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset); - - void activate() {} - void deactivate () {} - - void set_metering (bool yn); - - XMLNode& state(bool full); - XMLNode& get_state(void); - int set_state(const XMLNode& node); - - uint32_t pans_required() const { return _configured_input.n_audio(); } - - virtual bool can_support_input_configuration (ChanCount in) const; - virtual ChanCount output_for_input_configuration (ChanCount in) const; - virtual bool configure_io (ChanCount in, ChanCount out); - - static uint32_t how_many_sends(); - - private: - bool _metering; - uint32_t bitslot; -}; - -} // namespace ARDOUR - -#endif /* __ardour_send_h__ */ diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h deleted file mode 100644 index b718d751b4..0000000000 --- a/libs/ardour/ardour/session.h +++ /dev/null @@ -1,1714 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_session_h__ -#define __ardour_session_h__ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include - -class XMLTree; -class XMLNode; -class AEffect; - -namespace MIDI { - class Port; -} - -namespace PBD { - class Controllable; -} - -namespace ARDOUR { - -class Port; -class AudioEngine; -class Slave; -class Diskstream; -class Route; -class AuxInput; -class Source; -class AudioSource; -class BufferSet; - -class Diskstream; -class AudioDiskstream; -class MidiDiskstream; -class AudioFileSource; -class MidiSource; -class Auditioner; -class Processor; -class Send; -class IOProcessor; -class PortInsert; -class PluginInsert; -class Bundle; -class TempoMap; -class AudioTrack; -class NamedSelection; -class AudioRegion; - -class Region; -class Playlist; -class VSTPlugin; -class ControlProtocolInfo; - -class MidiTrack; -class MidiRegion; -class SMFSource; - -class SessionDirectory; - -struct ExportSpecification; -struct RouteGroup; - -using std::vector; -using std::string; -using std::map; -using std::set; - -class Session : public PBD::StatefulDestructible -{ - private: - typedef std::pair,bool> RouteBooleanState; - typedef vector GlobalRouteBooleanState; - typedef std::pair,MeterPoint> RouteMeterState; - typedef vector GlobalRouteMeterState; - - public: - enum RecordState { - Disabled = 0, - Enabled = 1, - Recording = 2 - }; - - struct Event { - enum Type { - SetTransportSpeed, - SetDiskstreamSpeed, - Locate, - LocateRoll, - LocateRollLocate, - SetLoop, - PunchIn, - PunchOut, - RangeStop, - RangeLocate, - Overwrite, - SetSlaveSource, - Audition, - InputConfigurationChange, - SetAudioRange, - SetPlayRange, - - /* only one of each of these events - can be queued at any one time - */ - - StopOnce, - AutoLoop - }; - - enum Action { - Add, - Remove, - Replace, - Clear - }; - - Type type; - Action action; - nframes_t action_frame; - nframes_t target_frame; - float speed; - - union { - void* ptr; - bool yes_or_no; - nframes_t target2_frame; - SlaveSource slave; - Route* route; - }; - - boost::shared_ptr region; - - list audio_range; - list music_range; - - Event(Type t, Action a, nframes_t when, nframes_t where, float spd, bool yn = false) - : type (t), - action (a), - action_frame (when), - target_frame (where), - speed (spd), - yes_or_no (yn) {} - - void set_ptr (void* p) { - ptr = p; - } - - bool before (const Event& other) const { - return action_frame < other.action_frame; - } - - bool after (const Event& other) const { - return action_frame > other.action_frame; - } - - static bool compare (const Event *e1, const Event *e2) { - return e1->before (*e2); - } - - void *operator new (size_t ignored) { - return pool.alloc (); - } - - void operator delete(void *ptr, size_t size) { - pool.release (ptr); - } - - static const nframes_t Immediate = 0; - - private: - static MultiAllocSingleReleasePool pool; - }; - - /* creating from an XML file */ - - Session (AudioEngine&, - const string& fullpath, - const string& snapshot_name, - string mix_template = ""); - - /* creating a new Session */ - - Session (AudioEngine&, - string fullpath, - string snapshot_name, - AutoConnectOption input_auto_connect, - AutoConnectOption output_auto_connect, - uint32_t control_out_channels, - uint32_t master_out_channels, - uint32_t n_physical_in, - uint32_t n_physical_out, - nframes_t initial_length); - - virtual ~Session (); - - string path() const { return _path; } - string name() const { return _name; } - string snap_name() const { return _current_snapshot_name; } - string raid_path () const; - - void set_snap_name (); - - void set_dirty (); - void set_clean (); - bool dirty() const { return _state_of_the_state & Dirty; } - void set_deletion_in_progress (); - bool deletion_in_progress() const { return _state_of_the_state & Deletion; } - sigc::signal DirtyChanged; - - const SessionDirectory& session_directory () const { return *(_session_dir.get()); } - - static sigc::signal AutoBindingOn; - static sigc::signal AutoBindingOff; - - static sigc::signal Dialog; - - std::string sound_dir (bool with_path = true) const; - std::string peak_dir () const; - std::string dead_sound_dir () const; - std::string automation_dir () const; - std::string analysis_dir() const; - - int ensure_subdirs (); - - Glib::ustring peak_path (Glib::ustring) const; - - static string change_audio_path_by_name (string oldpath, string oldname, string newname, bool destructive); - static string change_midi_path_by_name (string oldpath, string oldname, string newname, bool destructive); - - string peak_path_from_audio_path (string) const; - string audio_path_from_name (string, uint32_t nchans, uint32_t chan, bool destructive); - string midi_path_from_name (string); - - void process (nframes_t nframes); - - BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO); - BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO); - BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO); - - void add_diskstream (boost::shared_ptr); - boost::shared_ptr diskstream_by_id (const PBD::ID& id); - boost::shared_ptr diskstream_by_name (string name); - - bool have_captured() const { return _have_captured; } - - void refill_all_diskstream_buffers (); - uint32_t audio_diskstream_buffer_size() const { return audio_dstream_buffer_size; } - uint32_t midi_diskstream_buffer_size() const { return midi_dstream_buffer_size; } - - uint32_t get_next_diskstream_id() const { return n_diskstreams(); } - uint32_t n_diskstreams() const; - - typedef std::list > DiskstreamList; - typedef std::list > RouteList; - - boost::shared_ptr get_routes() const { - return routes.reader (); - } - - uint32_t nroutes() const { return routes.reader()->size(); } - uint32_t ntracks () const; - uint32_t nbusses () const; - - struct RoutePublicOrderSorter { - bool operator() (boost::shared_ptr, boost::shared_ptr b); - }; - - template void foreach_route (T *obj, void (T::*func)(Route&)); - template void foreach_route (T *obj, void (T::*func)(boost::shared_ptr)); - template void foreach_route (T *obj, void (T::*func)(Route&, A), A arg); - - boost::shared_ptr route_by_name (string); - boost::shared_ptr route_by_id (PBD::ID); - boost::shared_ptr route_by_remote_id (uint32_t id); - - bool route_name_unique (string) const; - - bool get_record_enabled() const { - return (record_status () >= Enabled); - } - - RecordState record_status() const { - return (RecordState) g_atomic_int_get (&_record_status); - } - - bool actively_recording () { - return record_status() == Recording; - } - - bool record_enabling_legal () const; - void maybe_enable_record (); - void disable_record (bool rt_context, bool force = false); - void step_back_from_record (); - - void maybe_write_autosave (); - - /* Proxy signal for region hidden changes */ - - sigc::signal > RegionHiddenChange; - - /* Emitted when all i/o connections are complete */ - - sigc::signal IOConnectionsComplete; - - /* Record status signals */ - - sigc::signal RecordStateChanged; - - /* Transport mechanism signals */ - - sigc::signal TransportStateChange; /* generic */ - sigc::signal PositionChanged; /* sent after any non-sequential motion */ - sigc::signal DurationChanged; - sigc::signal Xrun; - sigc::signal TransportLooped; - - sigc::signal RouteAdded; - - void request_roll_at_and_return (nframes_t start, nframes_t return_to); - void request_bounded_roll (nframes_t start, nframes_t end); - void request_stop (bool abort = false); - void request_locate (nframes_t frame, bool with_roll = false); - - void request_play_loop (bool yn); - bool get_play_loop () const { return play_loop; } - - nframes_t last_transport_start() const { return _last_roll_location; } - void goto_end () { request_locate (end_location->start(), false);} - void goto_start () { request_locate (start_location->start(), false); } - void set_session_start (nframes_t start) { start_location->set_start(start); } - void set_session_end (nframes_t end) { end_location->set_start(end); _end_location_is_free = false; } - void use_rf_shuttle_speed (); - void allow_auto_play (bool yn); - void request_transport_speed (float speed); - void request_overwrite_buffer (Diskstream*); - void request_diskstream_speed (Diskstream&, float speed); - void request_input_change_handling (); - - bool locate_pending() const { return static_cast(post_transport_work&PostTransportLocate); } - bool transport_locked () const; - - int wipe (); - //int wipe_diskstream (AudioDiskstream *); - - int remove_region_from_region_list (boost::shared_ptr); - - nframes_t get_maximum_extent () const; - nframes_t current_end_frame() const { return end_location->start(); } - nframes_t current_start_frame() const { return start_location->start(); } - // "actual" sample rate of session, set by current audioengine rate, pullup/down etc. - nframes_t frame_rate() const { return _current_frame_rate; } - // "native" sample rate of session, regardless of current audioengine rate, pullup/down etc - nframes_t nominal_frame_rate() const { return _nominal_frame_rate; } - nframes_t frames_per_hour() const { return _frames_per_hour; } - - double frames_per_smpte_frame() const { return _frames_per_smpte_frame; } - nframes_t smpte_frames_per_hour() const { return _smpte_frames_per_hour; } - - float smpte_frames_per_second() const; - bool smpte_drop_frames() const; - - /* Locations */ - - Locations *locations() { return &_locations; } - - sigc::signal auto_loop_location_changed; - sigc::signal auto_punch_location_changed; - sigc::signal locations_modified; - - void set_auto_punch_location (Location *); - void set_auto_loop_location (Location *); - int location_name(string& result, string base = string("")); - - void reset_input_monitor_state (); - - void add_event (nframes_t action_frame, Event::Type type, nframes_t target_frame = 0); - void remove_event (nframes_t frame, Event::Type type); - void clear_events (Event::Type type); - - nframes_t get_block_size() const { return current_block_size; } - nframes_t worst_output_latency () const { return _worst_output_latency; } - nframes_t worst_input_latency () const { return _worst_input_latency; } - nframes_t worst_track_latency () const { return _worst_track_latency; } - - int save_state (string snapshot_name, bool pending = false); - int restore_state (string snapshot_name); - int save_template (string template_name); - int save_history (string snapshot_name = ""); - int restore_history (string snapshot_name); - void remove_state (string snapshot_name); - void rename_state (string old_name, string new_name); - void remove_pending_capture_state (); - - sigc::signal StateSaved; - sigc::signal StateReady; - - vector* possible_states() const; - static vector* possible_states(string path); - - XMLNode& get_state(); - int set_state(const XMLNode& node); // not idempotent - XMLNode& get_template(); - - /// The instant xml file is written to the session directory - void add_instant_xml (XMLNode&); - XMLNode * instant_xml (const std::string& str); - - enum StateOfTheState { - Clean = 0x0, - Dirty = 0x1, - CannotSave = 0x2, - Deletion = 0x4, - InitialConnecting = 0x8, - Loading = 0x10, - InCleanup = 0x20 - }; - - StateOfTheState state_of_the_state() const { return _state_of_the_state; } - - RouteGroup* add_edit_group (string); - RouteGroup* add_mix_group (string); - - void remove_edit_group (RouteGroup&); - void remove_mix_group (RouteGroup&); - - RouteGroup *mix_group_by_name (string); - RouteGroup *edit_group_by_name (string); - - sigc::signal edit_group_added; - sigc::signal mix_group_added; - sigc::signal edit_group_removed; - sigc::signal mix_group_removed; - - void foreach_edit_group (sigc::slot sl) { - for (list::iterator i = edit_groups.begin(); i != edit_groups.end(); i++) { - sl (*i); - } - } - - void foreach_mix_group (sigc::slot sl) { - for (list::iterator i = mix_groups.begin(); i != mix_groups.end(); i++) { - sl (*i); - } - } - - /* fundamental operations. duh. */ - - std::list > new_audio_track (int input_channels, int output_channels, TrackMode mode = Normal, uint32_t how_many = 1); - RouteList new_audio_route (int input_channels, int output_channels, uint32_t how_many); - - std::list > new_midi_track (TrackMode mode = Normal, uint32_t how_many = 1); - //boost::shared_ptr new_midi_route (uint32_t how_many = 1); - - void remove_route (boost::shared_ptr); - void resort_routes (); - void resort_routes_using (boost::shared_ptr); - - void set_remote_control_ids(); - - AudioEngine & engine() { return _engine; } - AudioEngine const & engine () const { return _engine; } - - int32_t max_level; - int32_t min_level; - - /* Time */ - - nframes_t transport_frame () const {return _transport_frame; } - nframes_t audible_frame () const; - nframes64_t requested_return_frame() const { return _requested_return_frame; } - - enum PullupFormat { - pullup_Plus4Plus1, - pullup_Plus4, - pullup_Plus4Minus1, - pullup_Plus1, - pullup_None, - pullup_Minus1, - pullup_Minus4Plus1, - pullup_Minus4, - pullup_Minus4Minus1 - }; - - int set_smpte_format (SmpteFormat); - void sync_time_vars(); - - void bbt_time (nframes_t when, BBT_Time&); - void smpte_to_sample( SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes ) const; - void sample_to_smpte( nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const; - void smpte_time (SMPTE::Time &); - void smpte_time (nframes_t when, SMPTE::Time&); - void smpte_time_subframes (nframes_t when, SMPTE::Time&); - - void smpte_duration (nframes_t, SMPTE::Time&) const; - void smpte_duration_string (char *, nframes_t) const; - - void set_smpte_offset (nframes_t); - nframes_t smpte_offset () const { return _smpte_offset; } - void set_smpte_offset_negative (bool); - bool smpte_offset_negative () const { return _smpte_offset_negative; } - - nframes_t convert_to_frames_at (nframes_t position, AnyTime&); - - static sigc::signal StartTimeChanged; - static sigc::signal EndTimeChanged; - static sigc::signal SMPTEOffsetChanged; - - void request_slave_source (SlaveSource); - bool synced_to_jack() const { return Config->get_slave_source() == JACK; } - - float transport_speed() const { return _transport_speed; } - bool transport_stopped() const { return _transport_speed == 0.0f; } - bool transport_rolling() const { return _transport_speed != 0.0f; } - - void set_silent (bool yn); - bool silent () { return _silent; } - - int jack_slave_sync (nframes_t); - - TempoMap& tempo_map() { return *_tempo_map; } - - /* region info */ - - void add_regions (std::vector >&); - - sigc::signal > RegionAdded; - sigc::signal >& > RegionsAdded; - sigc::signal > RegionRemoved; - - int region_name (string& result, string base = string(""), bool newlevel = false) const; - string new_region_name (string); - string path_from_region_name (DataType type, string name, string identifier); - - boost::shared_ptr find_whole_file_parent (boost::shared_ptr); - - void find_equivalent_playlist_regions (boost::shared_ptr, std::vector >& result); - - boost::shared_ptr XMLRegionFactory (const XMLNode&, bool full); - boost::shared_ptr XMLAudioRegionFactory (const XMLNode&, bool full); - boost::shared_ptr XMLMidiRegionFactory (const XMLNode&, bool full); - - template void foreach_region (T *obj, void (T::*func)(boost::shared_ptr)); - - /* source management */ - - struct import_status : public InterThreadInfo { - string doing_what; - - /* control info */ - SrcQuality quality; - volatile bool freeze; - std::vector paths; - bool replace_existing_source; - - /* result */ - SourceList sources; - - }; - - void import_audiofiles (import_status&); - bool sample_rate_convert (import_status&, string infile, string& outfile); - string build_tmp_convert_name (string file); - - SlaveSource post_export_slave; - nframes_t post_export_position; - - int start_export (ARDOUR::ExportSpecification&); - int stop_export (ARDOUR::ExportSpecification&); - void finalize_audio_export (); - - void add_source (boost::shared_ptr); - void remove_source (boost::weak_ptr); - - struct cleanup_report { - vector paths; - int64_t space; - }; - - int cleanup_sources (cleanup_report&); - int cleanup_trash_sources (cleanup_report&); - - int destroy_region (boost::shared_ptr); - int destroy_regions (std::list >); - - int remove_last_capture (); - - /* handlers should return -1 for "stop cleanup", 0 for - "yes, delete this playlist" and 1 for "no, don't delete - this playlist. - */ - - sigc::signal > AskAboutPlaylistDeletion; - - /* handlers should return 0 for "ignore the rate mismatch" - and !0 for "do not use this session" - */ - - static sigc::signal AskAboutSampleRateMismatch; - - /* handlers should return !0 for use pending state, 0 for - ignore it. - */ - - static sigc::signal AskAboutPendingState; - - boost::shared_ptr create_audio_source_for_session (ARDOUR::AudioDiskstream&, uint32_t which_channel, bool destructive); - - boost::shared_ptr create_midi_source_for_session (ARDOUR::MidiDiskstream&); - - boost::shared_ptr source_by_id (const PBD::ID&); - boost::shared_ptr source_by_path_and_channel (const Glib::ustring&, uint16_t); - - /* playlist management */ - - boost::shared_ptr playlist_by_name (string name); - void add_playlist (boost::shared_ptr); - sigc::signal > PlaylistAdded; - sigc::signal > PlaylistRemoved; - - uint32_t n_playlists() const; - - template void foreach_playlist (T *obj, void (T::*func)(boost::shared_ptr)); - void get_playlists (std::vector >&); - - /* named selections */ - - NamedSelection* named_selection_by_name (string name); - void add_named_selection (NamedSelection *); - void remove_named_selection (NamedSelection *); - - template void foreach_named_selection (T& obj, void (T::*func)(NamedSelection&)); - sigc::signal NamedSelectionAdded; - sigc::signal NamedSelectionRemoved; - - /* Curves and AutomationLists (TODO when they go away) */ - void add_curve(Curve*); - void add_automation_list(AutomationList*); - - /* fade curves */ - - float get_default_fade_length () const { return default_fade_msecs; } - float get_default_fade_steepness () const { return default_fade_steepness; } - void set_default_fade (float steepness, float msecs); - - /* auditioning */ - - boost::shared_ptr the_auditioner() { return auditioner; } - void audition_playlist (); - void audition_region (boost::shared_ptr); - void cancel_audition (); - bool is_auditioning () const; - - sigc::signal AuditionActive; - - /* flattening stuff */ - - int write_one_audio_track (AudioTrack&, nframes_t start, nframes_t cnt, bool overwrite, - vector >&, InterThreadInfo& wot); - - int freeze (InterThreadInfo&); - - /* session-wide solo/mute/rec-enable */ - - bool soloing() const { return currently_soloing; } - - void set_all_solo (bool); - void set_all_mute (bool); - - sigc::signal SoloActive; - sigc::signal SoloChanged; - - void record_disenable_all (); - void record_enable_all (); - - /* control/master out */ - - boost::shared_ptr control_out() const { return _control_out; } - boost::shared_ptr master_out() const { return _master_out; } - - /* insert/send management */ - - uint32_t n_port_inserts() const { return _port_inserts.size(); } - uint32_t n_plugin_inserts() const { return _plugin_inserts.size(); } - uint32_t n_sends() const { return _sends.size(); } - - static void set_disable_all_loaded_plugins (bool yn) { - _disable_all_loaded_plugins = yn; - } - static bool get_disable_all_loaded_plugins() { - return _disable_all_loaded_plugins; - } - - uint32_t next_send_id(); - uint32_t next_insert_id(); - void mark_send_id (uint32_t); - void mark_insert_id (uint32_t); - - /* s/w "RAID" management */ - - nframes_t available_capture_duration(); - - /* I/O bundles */ - - void foreach_bundle (sigc::slot >); - void add_bundle (boost::shared_ptr); - void remove_bundle (boost::shared_ptr); - boost::shared_ptr bundle_by_name (string) const; - - sigc::signal > BundleAdded; - sigc::signal > BundleRemoved; - - /* MIDI */ - - void midi_panic(void); - int set_mtc_port (string port_tag); - int set_mmc_port (string port_tag); - int set_midi_port (string port_tag); - MIDI::Port *mtc_port() const { return _mtc_port; } - MIDI::Port *mmc_port() const { return _mmc_port; } - MIDI::Port *midi_port() const { return _midi_port; } - - sigc::signal MTC_PortChanged; - sigc::signal MMC_PortChanged; - sigc::signal MIDI_PortChanged; - - void set_trace_midi_input (bool, MIDI::Port* port = 0); - void set_trace_midi_output (bool, MIDI::Port* port = 0); - - bool get_trace_midi_input(MIDI::Port *port = 0); - bool get_trace_midi_output(MIDI::Port *port = 0); - - void set_mmc_receive_device_id (uint32_t id); - void set_mmc_send_device_id (uint32_t id); - - /* Scrubbing */ - - void start_scrub (nframes_t where); - void stop_scrub (); - void set_scrub_speed (float); - nframes_t scrub_buffer_size() const; - sigc::signal ScrubReady; - - /* History (for editors, mixers, UIs etc.) */ - - /** Undo some transactions. - * @param n Number of transactions to undo. - */ - void undo (uint32_t n) { - _history.undo (n); - } - - void redo (uint32_t n) { - _history.redo (n); - } - - UndoHistory& history() { return _history; } - - uint32_t undo_depth() const { return _history.undo_depth(); } - uint32_t redo_depth() const { return _history.redo_depth(); } - string next_undo() const { return _history.next_undo(); } - string next_redo() const { return _history.next_redo(); } - - void begin_reversible_command (const string& cmd_name); - void commit_reversible_command (Command* cmd = 0); - - void add_command (Command *const cmd) { - current_trans->add_command (cmd); - } - - std::map registry; - - // these commands are implemented in libs/ardour/session_command.cc - Command* memento_command_factory(XMLNode* n); - void register_with_memento_command_factory(PBD::ID, PBD::StatefulThingWithGoingAway*); - - Command* global_state_command_factory (const XMLNode& n); - - class GlobalRouteStateCommand : public Command - { - public: - GlobalRouteStateCommand (Session&, void*); - GlobalRouteStateCommand (Session&, const XMLNode& node); - int set_state (const XMLNode&); - XMLNode& get_state (); - - protected: - GlobalRouteBooleanState before, after; - Session& sess; - void* src; - - }; - - class GlobalSoloStateCommand : public GlobalRouteStateCommand - { - public: - GlobalSoloStateCommand (Session &, void *src); - GlobalSoloStateCommand (Session&, const XMLNode&); - void operator()(); //redo - void undo(); - XMLNode &get_state(); - void mark(); - }; - - class GlobalMuteStateCommand : public GlobalRouteStateCommand - { - public: - GlobalMuteStateCommand(Session &, void *src); - GlobalMuteStateCommand (Session&, const XMLNode&); - void operator()(); // redo - void undo(); - XMLNode &get_state(); - void mark(); - }; - - class GlobalRecordEnableStateCommand : public GlobalRouteStateCommand - { - public: - GlobalRecordEnableStateCommand(Session &, void *src); - GlobalRecordEnableStateCommand (Session&, const XMLNode&); - void operator()(); // redo - void undo(); - XMLNode &get_state(); - void mark(); - }; - - class GlobalMeteringStateCommand : public Command - { - public: - GlobalMeteringStateCommand(Session &, void *src); - GlobalMeteringStateCommand (Session&, const XMLNode&); - void operator()(); - void undo(); - XMLNode &get_state(); - int set_state (const XMLNode&); - void mark(); - - protected: - Session& sess; - void* src; - GlobalRouteMeterState before; - GlobalRouteMeterState after; - }; - - /* clicking */ - - boost::shared_ptr click_io() { return _click_io; } - - /* disk, buffer loads */ - - uint32_t playback_load (); - uint32_t capture_load (); - uint32_t playback_load_min (); - uint32_t capture_load_min (); - - void reset_playback_load_min (); - void reset_capture_load_min (); - - float read_data_rate () const; - float write_data_rate () const; - - /* ranges */ - - void set_audio_range (list&); - void set_music_range (list&); - - void request_play_range (bool yn); - bool get_play_range () const { return _play_range; } - - /* buffers for gain and pan */ - - gain_t* gain_automation_buffer () const { return _gain_automation_buffer; } - pan_t** pan_automation_buffer () const { return _pan_automation_buffer; } - - /* buffers for conversion */ - enum RunContext { - ButlerContext = 0, - TransportContext, - ExportContext - }; - - /* VST support */ - - static long vst_callback (AEffect* effect, - long opcode, - long index, - long value, - void* ptr, - float opt); - - typedef float (*compute_peak_t) (Sample *, nframes_t, float); - typedef void (*find_peaks_t) (Sample *, nframes_t, float *, float*); - typedef void (*apply_gain_to_buffer_t) (Sample *, nframes_t, float); - typedef void (*mix_buffers_with_gain_t) (Sample *, Sample *, nframes_t, float); - typedef void (*mix_buffers_no_gain_t) (Sample *, Sample *, nframes_t); - - static compute_peak_t compute_peak; - static find_peaks_t find_peaks; - static apply_gain_to_buffer_t apply_gain_to_buffer; - static mix_buffers_with_gain_t mix_buffers_with_gain; - static mix_buffers_no_gain_t mix_buffers_no_gain; - - static sigc::signal SendFeedback; - - /* Controllables */ - - boost::shared_ptr controllable_by_id (const PBD::ID&); - - void add_controllable (boost::shared_ptr); - void remove_controllable (PBD::Controllable*); - - protected: - friend class AudioEngine; - void set_block_size (nframes_t nframes); - void set_frame_rate (nframes_t nframes); - - protected: - friend class Diskstream; - void stop_butler (); - void wait_till_butler_finished(); - - protected: - friend class Route; - void schedule_curve_reallocation (); - void update_latency_compensation (bool, bool); - - private: - int create (bool& new_session, const string& mix_template, nframes_t initial_length); - void destroy (); - - nframes_t compute_initial_length (); - - enum SubState { - PendingDeclickIn = 0x1, - PendingDeclickOut = 0x2, - StopPendingCapture = 0x4, - AutoReturning = 0x10, - PendingLocate = 0x20, - PendingSetLoop = 0x40 - }; - - /* stuff used in process() should be close together to - maximise cache hits - */ - - typedef void (Session::*process_function_type)(nframes_t); - - AudioEngine& _engine; - mutable gint processing_prohibited; - process_function_type process_function; - process_function_type last_process_function; - bool waiting_for_sync_offset; - nframes_t _base_frame_rate; - nframes_t _current_frame_rate; //this includes video pullup offset - nframes_t _nominal_frame_rate; //ignores audioengine setting, "native" SR - int transport_sub_state; - mutable gint _record_status; - volatile nframes_t _transport_frame; - Location* end_location; - Location* start_location; - Slave* _slave; - bool _silent; - volatile float _transport_speed; - volatile float _desired_transport_speed; - float _last_transport_speed; - bool auto_play_legal; - nframes_t _last_slave_transport_frame; - nframes_t maximum_output_latency; - nframes_t last_stop_frame; - volatile nframes64_t _requested_return_frame; - BufferSet* _scratch_buffers; - BufferSet* _silent_buffers; - BufferSet* _mix_buffers; - nframes_t current_block_size; - nframes_t _worst_output_latency; - nframes_t _worst_input_latency; - nframes_t _worst_track_latency; - bool _have_captured; - float _meter_hold; - float _meter_falloff; - bool _end_location_is_free; - - void set_worst_io_latencies (); - void set_worst_io_latencies_x (IOChange asifwecare, void *ignored) { - set_worst_io_latencies (); - } - - void update_latency_compensation_proxy (void* ignored); - - void ensure_buffers (ChanCount howmany); - - void process_scrub (nframes_t); - void process_without_events (nframes_t); - void process_with_events (nframes_t); - void process_audition (nframes_t); - int process_export (nframes_t, ARDOUR::ExportSpecification*); - - /* slave tracking */ - - static const int delta_accumulator_size = 25; - int delta_accumulator_cnt; - long delta_accumulator[delta_accumulator_size]; - long average_slave_delta; - int average_dir; - bool have_first_delta_accumulator; - - enum SlaveState { - Stopped, - Waiting, - Running - }; - - SlaveState slave_state; - nframes_t slave_wait_end; - - void reset_slave_state (); - bool follow_slave (nframes_t, nframes_t); - void set_slave_source (SlaveSource); - - bool _exporting; - int prepare_to_export (ARDOUR::ExportSpecification&); - - void prepare_diskstreams (); - void commit_diskstreams (nframes_t, bool& session_requires_butler); - int process_routes (nframes_t, nframes_t); - int silent_process_routes (nframes_t, nframes_t); - - bool get_rec_monitors_input () { - if (actively_recording()) { - return true; - } else { - if (Config->get_auto_input()) { - return false; - } else { - return true; - } - } - } - - int get_transport_declick_required () { - - if (transport_sub_state & PendingDeclickIn) { - transport_sub_state &= ~PendingDeclickIn; - return 1; - } else if (transport_sub_state & PendingDeclickOut) { - return -1; - } else { - return 0; - } - } - - bool maybe_stop (nframes_t limit) { - if ((_transport_speed > 0.0f && _transport_frame >= limit) || (_transport_speed < 0.0f && _transport_frame == 0)) { - stop_transport (); - return true; - } - return false; - } - - bool maybe_sync_start (nframes_t&, nframes_t&); - - void check_declick_out (); - - MIDI::MachineControl* mmc; - MIDI::Port* _mmc_port; - MIDI::Port* _mtc_port; - MIDI::Port* _midi_port; - string _path; - string _name; - bool session_send_mmc; - bool session_send_mtc; - bool session_midi_feedback; - bool play_loop; - bool loop_changing; - nframes_t last_loopend; - - boost::scoped_ptr _session_dir; - - RingBuffer pending_events; - - void hookup_io (); - void when_engine_running (); - void graph_reordered (); - - string _current_snapshot_name; - - XMLTree* state_tree; - bool state_was_pending; - StateOfTheState _state_of_the_state; - - void auto_save(); - int load_options (const XMLNode&); - XMLNode& get_options () const; - int load_state (string snapshot_name); - bool save_config_options_predicate (ConfigVariableBase::Owner owner) const; - - nframes_t _last_roll_location; - nframes_t _last_record_location; - - bool pending_locate_roll; - nframes_t pending_locate_frame; - bool pending_locate_flush; - bool pending_abort; - bool pending_auto_loop; - - Sample* butler_mixdown_buffer; - float* butler_gain_buffer; - pthread_t butler_thread; - Glib::Mutex butler_request_lock; - Glib::Cond butler_paused; - bool butler_should_run; - mutable gint butler_should_do_transport_work; - int butler_request_pipe[2]; - - inline bool transport_work_requested() const { return g_atomic_int_get(&butler_should_do_transport_work); } - - struct ButlerRequest { - enum Type { - Wake, - Run, - Pause, - Quit - }; - }; - - enum PostTransportWork { - PostTransportStop = 0x1, - PostTransportDisableRecord = 0x2, - PostTransportPosition = 0x8, - PostTransportDidRecord = 0x20, - PostTransportDuration = 0x40, - PostTransportLocate = 0x80, - PostTransportRoll = 0x200, - PostTransportAbort = 0x800, - PostTransportOverWrite = 0x1000, - PostTransportSpeed = 0x2000, - PostTransportAudition = 0x4000, - PostTransportScrub = 0x8000, - PostTransportReverse = 0x10000, - PostTransportInputChange = 0x20000, - PostTransportCurveRealloc = 0x40000 - }; - - static const PostTransportWork ProcessCannotProceedMask = - PostTransportWork (PostTransportInputChange| - PostTransportSpeed| - PostTransportReverse| - PostTransportCurveRealloc| - PostTransportScrub| - PostTransportAudition| - PostTransportLocate| - PostTransportStop); - - PostTransportWork post_transport_work; - - void summon_butler (); - void schedule_butler_transport_work (); - int start_butler_thread (); - void terminate_butler_thread (); - static void *_butler_thread_work (void *arg); - void* butler_thread_work (); - - uint32_t cumulative_rf_motion; - uint32_t rf_scale; - - void set_rf_speed (float speed); - void reset_rf_scale (nframes_t frames_moved); - - Locations _locations; - void locations_changed (); - void locations_added (Location*); - void handle_locations_changed (Locations::LocationList&); - - sigc::connection auto_punch_start_changed_connection; - sigc::connection auto_punch_end_changed_connection; - sigc::connection auto_punch_changed_connection; - void auto_punch_start_changed (Location *); - void auto_punch_end_changed (Location *); - void auto_punch_changed (Location *); - - sigc::connection auto_loop_start_changed_connection; - sigc::connection auto_loop_end_changed_connection; - sigc::connection auto_loop_changed_connection; - void auto_loop_changed (Location *); - - typedef list Events; - Events events; - Events immediate_events; - Events::iterator next_event; - - /* there can only ever be one of each of these */ - - Event *auto_loop_event; - Event *punch_out_event; - Event *punch_in_event; - - /* events */ - - void dump_events () const; - void queue_event (Event *ev); - void merge_event (Event*); - void replace_event (Event::Type, nframes_t action_frame, nframes_t target = 0); - bool _replace_event (Event*); - bool _remove_event (Event *); - void _clear_event_type (Event::Type); - - void first_stage_init (string path, string snapshot_name); - int second_stage_init (bool new_tracks); - void find_current_end (); - void remove_empty_sounds (); - - void setup_midi_control (); - int midi_read (MIDI::Port *); - - void enable_record (); - - void increment_transport_position (uint32_t val) { - if (max_frames - val < _transport_frame) { - _transport_frame = max_frames; - } else { - _transport_frame += val; - } - } - - void decrement_transport_position (uint32_t val) { - if (val < _transport_frame) { - _transport_frame -= val; - } else { - _transport_frame = 0; - } - } - - void post_transport_motion (); - static void *session_loader_thread (void *arg); - - void *do_work(); - - void set_next_event (); - void process_event (Event *ev); - - /* MIDI Machine Control */ - - void deliver_mmc (MIDI::MachineControl::Command, nframes_t); - - void spp_start (MIDI::Parser&); - void spp_continue (MIDI::Parser&); - void spp_stop (MIDI::Parser&); - - void mmc_deferred_play (MIDI::MachineControl &); - void mmc_stop (MIDI::MachineControl &); - void mmc_step (MIDI::MachineControl &, int); - void mmc_pause (MIDI::MachineControl &); - void mmc_record_pause (MIDI::MachineControl &); - void mmc_record_strobe (MIDI::MachineControl &); - void mmc_record_exit (MIDI::MachineControl &); - void mmc_track_record_status (MIDI::MachineControl &, uint32_t track, bool enabled); - void mmc_fast_forward (MIDI::MachineControl &); - void mmc_rewind (MIDI::MachineControl &); - void mmc_locate (MIDI::MachineControl &, const MIDI::byte *); - void mmc_shuttle (MIDI::MachineControl &mmc, float speed, bool forw); - void mmc_record_enable (MIDI::MachineControl &mmc, size_t track, bool enabled); - - struct timeval last_mmc_step; - double step_speed; - - typedef sigc::slot MidiTimeoutCallback; - typedef list MidiTimeoutList; - - MidiTimeoutList midi_timeouts; - bool mmc_step_timeout (); - - MIDI::byte mmc_buffer[32]; - MIDI::byte mtc_msg[16]; - MIDI::byte mtc_smpte_bits; /* encoding of SMTPE type for MTC */ - MIDI::byte midi_msg[16]; - nframes_t outbound_mtc_smpte_frame; - SMPTE::Time transmitting_smpte_time; - int next_quarter_frame_to_send; - - double _frames_per_smpte_frame; /* has to be floating point because of drop frame */ - nframes_t _frames_per_hour; - nframes_t _smpte_frames_per_hour; - nframes_t _smpte_offset; - bool _smpte_offset_negative; - - /* cache the most-recently requested time conversions. This helps when we - * have multiple clocks showing the same time (e.g. the transport frame) */ - bool last_smpte_valid; - nframes_t last_smpte_when; - SMPTE::Time last_smpte; - - bool _send_smpte_update; ///< Flag to send a full frame (SMPTE) MTC message this cycle - - int send_full_time_code(nframes_t nframes); - int send_midi_time_code_for_cycle(nframes_t nframes); - - nframes_t adjust_apparent_position (nframes_t frames); - - void reset_record_status (); - - int no_roll (nframes_t nframes, nframes_t offset); - - bool non_realtime_work_pending() const { return static_cast(post_transport_work); } - bool process_can_proceed() const { return !(post_transport_work & ProcessCannotProceedMask); } - - struct MIDIRequest { - - enum Type { - PortChange, - Quit - }; - - Type type; - - MIDIRequest () {} - }; - - Glib::Mutex midi_lock; - pthread_t midi_thread; - int midi_request_pipe[2]; - RingBuffer midi_requests; - - int start_midi_thread (); - void terminate_midi_thread (); - void poke_midi_thread (); - static void *_midi_thread_work (void *arg); - void midi_thread_work (); - void change_midi_ports (); - int use_config_midi_ports (); - - mutable gint butler_active; - bool waiting_to_start; - - void set_play_loop (bool yn); - void overwrite_some_buffers (Diskstream*); - void flush_all_inserts (); - void locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false); - void start_locate (nframes_t, bool with_roll, bool with_flush, bool with_loop=false); - void force_locate (nframes_t frame, bool with_roll = false); - void set_diskstream_speed (Diskstream*, float speed); - void set_transport_speed (float speed, bool abort = false); - void stop_transport (bool abort = false); - void start_transport (); - void actually_start_transport (); - void realtime_stop (bool abort); - void non_realtime_start_scrub (); - void non_realtime_set_speed (); - void non_realtime_locate (); - void non_realtime_stop (bool abort, int entry_request_count, bool& finished); - void non_realtime_overwrite (int entry_request_count, bool& finished); - void butler_transport_work (); - void post_transport (); - void engine_halted (); - void xrun_recovery (); - - TempoMap *_tempo_map; - void tempo_map_changed (Change); - - /* edit/mix groups */ - - int load_route_groups (const XMLNode&, bool is_edit); - int load_edit_groups (const XMLNode&); - int load_mix_groups (const XMLNode&); - - - list edit_groups; - list mix_groups; - - /* disk-streams */ - - SerializedRCUManager diskstreams; - - uint32_t audio_dstream_buffer_size; - uint32_t midi_dstream_buffer_size; - int load_diskstreams (const XMLNode&); - - /* routes stuff */ - - SerializedRCUManager routes; - - void add_routes (RouteList&, bool save); - uint32_t destructive_index; - - int load_routes (const XMLNode&); - boost::shared_ptr XMLRouteFactory (const XMLNode&); - - /* mixer stuff */ - - bool solo_update_disabled; - bool currently_soloing; - - void route_mute_changed (void *src); - void route_solo_changed (void *src, boost::weak_ptr); - void catch_up_on_solo (); - void update_route_solo_state (); - void modify_solo_mute (bool, bool); - void strip_portname_for_solo (string& portname); - - /* REGION MANAGEMENT */ - - mutable Glib::Mutex region_lock; - typedef map > RegionList; - RegionList regions; - - void add_region (boost::shared_ptr); - void region_changed (Change, boost::weak_ptr); - void remove_region (boost::weak_ptr); - - int load_regions (const XMLNode& node); - - /* SOURCES */ - - mutable Glib::Mutex source_lock; - typedef std::map > SourceMap; - - SourceMap sources; - - public: - SourceMap get_sources() { return sources; } - - private: - - - int load_sources (const XMLNode& node); - XMLNode& get_sources_as_xml (); - - boost::shared_ptr XMLSourceFactory (const XMLNode&); - - /* PLAYLISTS */ - - mutable Glib::Mutex playlist_lock; - typedef set > PlaylistList; - PlaylistList playlists; - PlaylistList unused_playlists; - - int load_playlists (const XMLNode&); - int load_unused_playlists (const XMLNode&); - void remove_playlist (boost::weak_ptr); - void track_playlist (bool, boost::weak_ptr); - - boost::shared_ptr playlist_factory (string name); - boost::shared_ptr XMLPlaylistFactory (const XMLNode&); - - void playlist_length_changed (); - void diskstream_playlist_changed (boost::shared_ptr); - - /* NAMED SELECTIONS */ - - mutable Glib::Mutex named_selection_lock; - typedef set NamedSelectionList; - NamedSelectionList named_selections; - - int load_named_selections (const XMLNode&); - - NamedSelection *named_selection_factory (string name); - NamedSelection *XMLNamedSelectionFactory (const XMLNode&); - - /* CURVES and AUTOMATION LISTS */ - std::map curves; - std::map automation_lists; - - /* DEFAULT FADE CURVES */ - - float default_fade_steepness; - float default_fade_msecs; - - /* AUDITIONING */ - - boost::shared_ptr auditioner; - void set_audition (boost::shared_ptr); - void non_realtime_set_audition (); - boost::shared_ptr pending_audition_region; - - /* EXPORT */ - - /* FLATTEN */ - - int flatten_one_track (AudioTrack&, nframes_t start, nframes_t cnt); - - /* INSERT AND SEND MANAGEMENT */ - - list _port_inserts; - list _plugin_inserts; - list _sends; - boost::dynamic_bitset send_bitset; - boost::dynamic_bitset insert_bitset; - uint32_t send_cnt; - uint32_t insert_cnt; - - - void add_processor (Processor *); - void remove_processor (Processor *); - - /* S/W RAID */ - - struct space_and_path { - uint32_t blocks; /* 4kB blocks */ - string path; - - space_and_path() { - blocks = 0; - } - }; - - struct space_and_path_ascending_cmp { - bool operator() (space_and_path a, space_and_path b) { - return a.blocks > b.blocks; - } - }; - - void setup_raid_path (string path); - - vector session_dirs; - vector::iterator last_rr_session_dir; - uint32_t _total_free_4k_blocks; - Glib::Mutex space_lock; - - string get_best_session_directory_for_new_source (); - void refresh_disk_space (); - - mutable gint _playback_load; - mutable gint _capture_load; - mutable gint _playback_load_min; - mutable gint _capture_load_min; - - /* I/O bundles */ - - typedef list > BundleList; - mutable Glib::Mutex bundle_lock; - BundleList _bundles; - XMLNode* _bundle_xml_node; - int load_bundles (XMLNode const &); - - void reverse_diskstream_buffers (); - - UndoHistory _history; - UndoTransaction* current_trans; - - GlobalRouteBooleanState get_global_route_boolean (bool (Route::*method)(void) const); - GlobalRouteMeterState get_global_route_metering (); - - void set_global_route_boolean (GlobalRouteBooleanState s, void (Route::*method)(bool, void*), void *arg); - void set_global_route_metering (GlobalRouteMeterState s, void *arg); - - void set_global_mute (GlobalRouteBooleanState s, void *src); - void set_global_solo (GlobalRouteBooleanState s, void *src); - void set_global_record_enable (GlobalRouteBooleanState s, void *src); - - void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int); - int jack_sync_callback (jack_transport_state_t, jack_position_t*); - void reset_jack_connection (jack_client_t* jack); - void record_enable_change_all (bool yn); - - XMLNode& state(bool); - - /* click track */ - - struct Click { - nframes_t start; - nframes_t duration; - nframes_t offset; - const Sample *data; - - Click (nframes_t s, nframes_t d, const Sample *b) - : start (s), duration (d), data (b) { offset = 0; } - - void *operator new(size_t ignored) { - return pool.alloc (); - }; - - void operator delete(void *ptr, size_t size) { - pool.release (ptr); - } - - private: - static Pool pool; - }; - - typedef list Clicks; - - Clicks clicks; - bool _clicking; - boost::shared_ptr _click_io; - Sample* click_data; - Sample* click_emphasis_data; - nframes_t click_length; - nframes_t click_emphasis_length; - mutable Glib::RWLock click_lock; - - static const Sample default_click[]; - static const nframes_t default_click_length; - static const Sample default_click_emphasis[]; - static const nframes_t default_click_emphasis_length; - - Click *get_click(); - void setup_click_sounds (int which); - void clear_clicks (); - void click (nframes_t start, nframes_t nframes, nframes_t offset); - - vector master_outs; - - /* range playback */ - - list current_audio_range; - bool _play_range; - void set_play_range (bool yn); - void setup_auto_play (); - - /* main outs */ - uint32_t main_outs; - - boost::shared_ptr _master_out; - boost::shared_ptr _control_out; - - gain_t* _gain_automation_buffer; - pan_t** _pan_automation_buffer; - void allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force); - uint32_t _npan_buffers; - - /* VST support */ - - long _vst_callback (VSTPlugin*, - long opcode, - long index, - long value, - void* ptr, - float opt); - - /* number of hardware ports we're using, - based on max (requested,available) - */ - - uint32_t n_physical_outputs; - uint32_t n_physical_inputs; - - - int find_all_sources (std::string path, std::set& result); - int find_all_sources_across_snapshots (std::set& result, bool exclude_this_snapshot); - - LayerModel layer_model; - CrossfadeModel xfade_model; - - typedef std::set > Controllables; - Glib::Mutex controllables_lock; - Controllables controllables; - - void reset_native_file_format(); - bool first_file_data_format_reset; - bool first_file_header_format_reset; - - void config_changed (const char*); - - XMLNode& get_control_protocol_state (); - - void set_history_depth (uint32_t depth); - void sync_order_keys (); - - static bool _disable_all_loaded_plugins; -}; - -} // namespace ARDOUR - -#endif /* __ardour_session_h__ */ diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h deleted file mode 100644 index a4fb7d07c5..0000000000 --- a/libs/ardour/ardour/session_directory.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_session_directory_h__ -#define __ardour_session_directory_h__ - -#include -#include - -#include - -namespace ARDOUR { - -using std::string; -using std::vector; -using PBD::sys::path; - -class SessionDirectory -{ -public: - - /** - * @param session_path An absolute path to a session directory. - */ - SessionDirectory (const path& session_path); - - /** - * @return the absolute path to the root directory of the session - */ - const path root_path() const { return m_root_path; } - - /** - * @return the absolute path to the directory in which - * the session stores audio files. - * - * If the session is an older session with an existing - * "sounds" directory then it will return a path to that - * directory otherwise it will return the new location - * of root_path()/interchange/session_name/audiofiles - */ - const path sound_path () const; - - /** - * @return the absolute path to the directory in which - * the session stores MIDI files, ie - * root_path()/interchange/session_name/midifiles - */ - const path midi_path () const; - - /** - * @return The absolute path to the directory in which all - * peak files are stored for a session. - */ - const path peak_path () const; - - /** - * @return The absolute path to the directory that audio - * files are moved to when they are no longer part of the - * session. - */ - const path dead_sound_path () const; - - /** - * @return The absolute path to the directory that midi - * files are moved to when they are no longer part of the - * session. - */ - const path dead_midi_path () const; - - /** - * @return The absolute path to the directory that audio - * files are created in by default when exporting. - */ - const path export_path () const; - - /** - * @return true if session directory and all the required - * subdirectories exist. - */ - bool is_valid () const; - - /** - * Create the session directory and all the subdirectories. - * - * @throw PBD::sys::filesystem_error if the directories were - * not able to be created. - * - * @return true If a new session directory was created, otherwise - * (if it already existed) false. - * - * @post is_valid () - */ - bool create (); - -protected: - - /** - * @return The path to the old style sound directory. - * It isn't created by create(). - */ - const path old_sound_path () const; - - /** - * @return The path to the directory under which source directories - * are created for different source types. - * i.e root_path()/interchange/session_name - */ - const path sources_root() const; - - /** - * @return a vector containing the fullpath of all subdirectories. - */ - const vector sub_directories () const; - - /// The path to the root of the session directory. - const path m_root_path; -}; - -} // namespace ARDOUR - -#endif diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h deleted file mode 100644 index bb726cb0d0..0000000000 --- a/libs/ardour/ardour/session_object.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_session_object_h__ -#define __ardour_session_object_h__ - -#include -#include - -namespace ARDOUR { - -class Session; - - -/** An object associated with a Session. - * - * This is a few common things factored out of IO which weren't IO specific - * (to fix the problem with e.g. PluginInsert being an IO which it shouldn't be). - * collection of input and output ports with connections. - */ -class SessionObject : public PBD::StatefulDestructible -{ -public: - SessionObject(Session& session, const std::string& name) - : _session(session) - , _name(name) - {} - - Session& session() const { return _session; } - const std::string& name() const { return _name; } - - virtual bool set_name (const std::string& str) { - if (_name != str) { - _name = str; - NameChanged(); - } - return true; - } - - sigc::signal NameChanged; - -protected: - Session& _session; - std::string _name; -}; - -} // namespace ARDOUR - -#endif /*__ardour_io_h__ */ diff --git a/libs/ardour/ardour/session_playlist.h b/libs/ardour/ardour/session_playlist.h deleted file mode 100644 index baeb74916d..0000000000 --- a/libs/ardour/ardour/session_playlist.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_session_playlist_h__ -#define __ardour_session_playlist_h__ - -#include -#include - -namespace ARDOUR { - -template void -Session::foreach_playlist (T *obj, void (T::*func)(boost::shared_ptr)) -{ - Glib::Mutex::Lock lm (playlist_lock); - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); i++) { - if (!(*i)->hidden()) { - (obj->*func) (*i); - } - } - for (PlaylistList::iterator i = unused_playlists.begin(); i != unused_playlists.end(); i++) { - if (!(*i)->hidden()) { - (obj->*func) (*i); - } - } -} - -} /* namespace */ - -#endif /* __ardour_session_playlist_h__ */ diff --git a/libs/ardour/ardour/session_region.h b/libs/ardour/ardour/session_region.h deleted file mode 100644 index 254bbfe1a3..0000000000 --- a/libs/ardour/ardour/session_region.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_session_region_h__ -#define __ardour_session_region_h__ - -#include -#include - -namespace ARDOUR { - -template void Session::foreach_region (T *obj, void (T::*func)(boost::shared_ptr)) -{ - Glib::Mutex::Lock lm (region_lock); - for (RegionList::iterator i = regions.begin(); i != regions.end(); i++) { - (obj->*func) (i->second); - } -} - -} // namespace ARDOUR - -#endif /* __ardour_session_region_h__ */ diff --git a/libs/ardour/ardour/session_route.h b/libs/ardour/ardour/session_route.h deleted file mode 100644 index 0c70bf407d..0000000000 --- a/libs/ardour/ardour/session_route.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_session_route_h__ -#define __ardour_session_route_h__ - -#include - -#include - -#include -#include - -namespace ARDOUR { - -template void -Session::foreach_route (T *obj, void (T::*func)(Route&)) -{ - boost::shared_ptr r = routes.reader(); - RouteList public_order (*r); - RoutePublicOrderSorter cmp; - - public_order.sort (cmp); - - for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) { - (obj->*func) (**i); - } -} - -template void -Session::foreach_route (T *obj, void (T::*func)(boost::shared_ptr)) -{ - boost::shared_ptr r = routes.reader(); - RouteList public_order (*r); - RoutePublicOrderSorter cmp; - - public_order.sort (cmp); - - for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) { - (obj->*func) (*i); - } -} - -template void -Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1) -{ - boost::shared_ptr r = routes.reader(); - RouteList public_order (*r); - RoutePublicOrderSorter cmp; - - public_order.sort (cmp); - - for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) { - (obj->*func) (**i, arg1); - } -} - -} /* namespace */ - -#endif /* __ardour_session_route_h__ */ diff --git a/libs/ardour/ardour/session_selection.h b/libs/ardour/ardour/session_selection.h deleted file mode 100644 index 4169a3a511..0000000000 --- a/libs/ardour/ardour/session_selection.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_session_named_selection_h__ -#define __ardour_session_named_selection_h__ - -#include -#include - -namespace ARDOUR { - -template void -Session::foreach_named_selection (T& obj, void (T::*func)(NamedSelection&)) -{ - Glib::Mutex::Lock lm (named_selection_lock); - for (NamedSelectionList::iterator i = named_selections.begin(); i != named_selections.end(); i++) { - (obj.*func) (**i); - } -} - -} /* namespace */ - -#endif /* __ardour_session_named_selection_h__ */ diff --git a/libs/ardour/ardour/session_state_utils.h b/libs/ardour/ardour/session_state_utils.h deleted file mode 100644 index 8825b041f3..0000000000 --- a/libs/ardour/ardour/session_state_utils.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef ARDOUR_SESSION_STATE_UTILS_INCLUDED -#define ARDOUR_SESSION_STATE_UTILS_INCLUDED - -#include -#include - -#include - -namespace ARDOUR { - -using std::string; -using std::vector; -using namespace PBD; - -/** - * Attempt to create a backup copy of a file. - * - * A copy of the file is created in the same directory using - * the same filename with the backup suffix appended. - * - * @return true if successful, false otherwise. - */ -bool create_backup_file (const sys::path & file_path); - -/** - * Get the absolute paths to all state files in the directory - * at path directory_path. - * - * @param directory_path The absolute path to a directory. - * @param result vector to contain resulting state files. - */ -void get_state_files_in_directory (const sys::path & directory_path, - vector& result); - -/** - * Given a vector of paths to files, return a vector containing - * the filenames without any extension. - * - * @param file_paths a vector containing the file paths - * @return a vector containing a list of file names without any - * filename extension. - */ -vector get_file_names_no_extension (const vector & file_paths); - -} // namespace ARDOUR - -#endif diff --git a/libs/ardour/ardour/session_utils.h b/libs/ardour/ardour/session_utils.h deleted file mode 100644 index 8a9f6f584c..0000000000 --- a/libs/ardour/ardour/session_utils.h +++ /dev/null @@ -1,26 +0,0 @@ - -#ifndef __ardour_session_utils_h__ -#define __ardour_session_utils_h__ - -#include - -namespace ARDOUR { - -using std::string; - -int find_session (string str, string& path, string& snapshot, bool& isnew); - -/** - * Create a SessionDirectory at the path specified by - * session_directory_path, this includes all subdirectories. - * - * @return true if the session directory was able to be created - * or if it already existed, false otherwise. - * - * @see SessionDirectory - */ -bool create_session_directory (const string& session_directory_path); - -}; - -#endif diff --git a/libs/ardour/ardour/silentfilesource.h b/libs/ardour/ardour/silentfilesource.h deleted file mode 100644 index cbb123139a..0000000000 --- a/libs/ardour/ardour/silentfilesource.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_silentfilesource_h__ -#define __ardour_silentfilesource_h__ - -#include -#include - -namespace ARDOUR { - -class SilentFileSource : public AudioFileSource { - public: - virtual ~SilentFileSource (); - - int update_header (nframes_t when, struct tm&, time_t) { return 0; } - int flush_header () { return 0; } - float sample_rate () const { return _sample_rate; } - - void set_length (nframes_t len); - - bool destructive() const { return false; } - bool can_be_analysed() const { return false; } - - protected: - - float _sample_rate; - - SilentFileSource (Session&, const XMLNode&, nframes_t nframes, float sample_rate); - - friend class SourceFactory; - - nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const { - memset (dst, 0, sizeof (Sample) * cnt); - return cnt; - } - - nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; } - - void set_header_timeline_position () {} - - int read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit, nframes_t fpp) const { - memset (peaks, 0, sizeof (PeakData) * npeaks); - return 0; - } - -}; - -} // namespace ARDOUR - -#endif /* __ardour_audiofilesource_h__ */ - diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h deleted file mode 100644 index 509f8fa9d2..0000000000 --- a/libs/ardour/ardour/slave.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_slave_h__ -#define __ardour_slave_h__ - -#include - -#include - -#include -#include -#include -#include - -namespace MIDI { - class Port; -} - -namespace ARDOUR { -class Session; - -class Slave { - public: - Slave() { } - virtual ~Slave() {} - - virtual bool speed_and_position (float&, nframes_t&) = 0; - virtual bool locked() const = 0; - virtual bool ok() const = 0; - virtual bool starting() const { return false; } - virtual nframes_t resolution() const = 0; - virtual bool requires_seekahead () const = 0; - virtual bool is_always_synced() const { return false; } -}; - - -class MTC_Slave : public Slave, public sigc::trackable { - public: - MTC_Slave (Session&, MIDI::Port&); - ~MTC_Slave (); - - void rebind (MIDI::Port&); - bool speed_and_position (float&, nframes_t&); - - bool locked() const; - bool ok() const; - void handle_locate (const MIDI::byte*); - - nframes_t resolution() const; - bool requires_seekahead () const { return true; } - - private: - Session& session; - MIDI::Port* port; - std::vector connections; - bool can_notify_on_unknown_rate; - - struct SafeTime { - - - int guard1; - //SMPTE_Time mtc; - nframes_t position; - nframes_t timestamp; - int guard2; - - SafeTime() { - guard1 = 0; - guard2 = 0; - timestamp = 0; - } - }; - - SafeTime current; - nframes_t mtc_frame; /* current time */ - nframes_t last_inbound_frame; /* when we got it; audio clocked */ - - float mtc_speed; - nframes_t first_mtc_frame; - nframes_t first_mtc_time; - - static const int32_t accumulator_size = 128; - float accumulator[accumulator_size]; - int32_t accumulator_index; - bool have_first_accumulated_speed; - - void reset (); - void update_mtc_qtr (MIDI::Parser&); - void update_mtc_time (const MIDI::byte *, bool); - void update_mtc_status (MIDI::Parser::MTC_Status); - void read_current (SafeTime *) const; -}; - -class ADAT_Slave : public Slave -{ - public: - ADAT_Slave () {} - ~ADAT_Slave () {} - - bool speed_and_position (float& speed, nframes_t& pos) { - speed = 0; - pos = 0; - return false; - } - - bool locked() const { return false; } - bool ok() const { return false; } - nframes_t resolution() const { return 1; } - bool requires_seekahead () const { return true; } -}; - -class JACK_Slave : public Slave -{ - public: - JACK_Slave (jack_client_t*); - ~JACK_Slave (); - - bool speed_and_position (float& speed, nframes_t& pos); - - bool starting() const { return _starting; } - bool locked() const; - bool ok() const; - nframes_t resolution() const { return 1; } - bool requires_seekahead () const { return false; } - void reset_client (jack_client_t* jack); - bool is_always_synced() const { return true; } - - private: - jack_client_t* jack; - float speed; - bool _starting; -}; - -} /* namespace */ - -#endif /* __ardour_slave_h__ */ diff --git a/libs/ardour/ardour/smf_reader.h b/libs/ardour/ardour/smf_reader.h deleted file mode 100644 index e41dcc3bc4..0000000000 --- a/libs/ardour/ardour/smf_reader.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - Written by Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_smf_reader_h__ -#define __ardour_smf_reader_h__ - -#include -#include -#include -#include - -namespace ARDOUR { - - -/** Standard MIDI File (Type 0) Reader - * - * Currently this only reads SMF files with tempo-based timing. - */ -class SMFReader { -public: - class PrematureEOF : public std::exception { - const char* what() const throw() { return "Unexpected end of file"; } - }; - class CorruptFile : public std::exception { - const char* what() const throw() { return "Corrupted file"; } - }; - class UnsupportedTime : public std::exception { - const char* what() const throw() { return "Unsupported time stamp type (SMPTE)"; } - }; - - SMFReader(const std::string filename=""); - ~SMFReader(); - - bool open(const std::string& filename) throw (std::logic_error, UnsupportedTime); - - bool seek_to_track(unsigned track) throw (std::logic_error); - - const std::string& filename() const { return _filename; }; - - uint16_t type() const { return _type; } - uint16_t ppqn() const { return _ppqn; } - uint16_t num_tracks() const { return _num_tracks; } - - int read_event(size_t buf_len, - uint8_t* buf, - uint32_t* ev_size, - uint32_t* ev_delta_time) - throw (std::logic_error, PrematureEOF, CorruptFile); - - void close(); - - static uint32_t read_var_len(FILE* fd) throw (PrematureEOF); - -protected: - /** size of SMF header, including MTrk chunk header */ - static const uint32_t HEADER_SIZE = 22; - - std::string _filename; - FILE* _fd; - uint16_t _type; - uint16_t _ppqn; - uint16_t _num_tracks; - uint32_t _track; - uint32_t _track_size; -}; - - -} // namespace ARDOUR - -#endif /* __ardour_smf_reader_h__ */ - diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h deleted file mode 100644 index 88bf1e5d13..0000000000 --- a/libs/ardour/ardour/smf_source.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_smf_filesource_h__ -#define __ardour_smf_filesource_h__ - -#include -#include - -#include - -namespace ARDOUR { - -class MidiRingBuffer; - -/** Standard Midi File (Type 0) Source */ -class SMFSource : public MidiSource { - public: - enum Flag { - Writable = 0x1, - CanRename = 0x2, - Broadcast = 0x4, - Removable = 0x8, - RemovableIfEmpty = 0x10, - RemoveAtDestroy = 0x20, - BuildPeaks = 0x40 - }; - - /** Constructor for existing external-to-session files */ - SMFSource (Session& session, std::string path, Flag flags = Flag(0)); - - /* Constructor for existing in-session files */ - SMFSource (Session& session, const XMLNode&); - - virtual ~SMFSource (); - - /* this block of methods do nothing for regular file sources, but are significant - for files used in destructive recording. - */ - // FIXME and thus are useless for MIDI.. but make MidiDiskstream compile easier! :) - - virtual nframes_t last_capture_start_frame() const { return 0; } - virtual void mark_capture_start (nframes_t) {} - virtual void mark_capture_end () {} - virtual void clear_capture_marks() {} - - bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); } - int set_source_name (string newname, bool destructive); - - static bool safe_file_extension (const Glib::ustring& path); - - Glib::ustring path() const { return _path; } - - void set_allow_remove_if_empty (bool yn); - void mark_for_remove(); - - void append_event_unlocked(EventTimeUnit unit, const MIDI::Event& ev); - - int flush_header (); - int flush_footer (); - - int move_to_trash (const string trash_dir_name); - - bool is_empty () const; - void mark_streaming_midi_write_started (NoteMode mode, nframes_t start_time); - void mark_streaming_write_completed (); - - void mark_take (string); - string take_id() const { return _take_id; } - - static void set_search_path (string); - static void set_header_position_offset (nframes_t offset, bool negative); - - XMLNode& get_state (); - int set_state (const XMLNode&); - - void seek_to(nframes_t time); - - void load_model(bool lock=true, bool force_reload=false); - void destroy_model(); - - uint16_t ppqn() const { return _ppqn; } - - private: - - int init (string idstr, bool must_exist); - - nframes_t read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cn, nframes_t stamp_offset, nframes_t negative_stamp_offset) const; - nframes_t write_unlocked (MidiRingBuffer& dst, nframes_t cnt); - - bool find (std::string path, bool must_exist, bool& is_new); - bool removable() const; - bool writable() const { return _flags & Writable; } - - int open(); - void close(); - - /** - * This method is only used by flush_footer() to find the right seek position - * for the footer (at the end after recording or -4 offset ro SEEK_END - * if a footer is already present) - */ - void seek_to_footer_position(); - - /** - * write the track footer at the current seek position - */ - void write_footer(); - - void write_chunk_header(const char id[4], uint32_t length); - void write_chunk(const char id[4], uint32_t length, void* data); - size_t write_var_len(uint32_t val); - uint32_t read_var_len() const; - int read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const; - - static const uint16_t _ppqn = 19200; - - Glib::ustring _path; - Flag _flags; - string _take_id; - bool _allow_remove_if_empty; - FILE* _fd; - double _last_ev_time; ///< last frame time written, relative to source start - uint32_t _track_size; - uint32_t _header_size; ///< size of SMF header, including MTrk chunk header - bool _empty; ///< true iff file contains (non-empty) events - - static string _search_path; -}; - -}; /* namespace ARDOUR */ - -#endif /* __ardour_smf_filesource_h__ */ - diff --git a/libs/ardour/ardour/smpte.h b/libs/ardour/ardour/smpte.h deleted file mode 100644 index d0901c372e..0000000000 --- a/libs/ardour/ardour/smpte.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#ifndef __ardour_smpte_h__ -#define __ardour_smpte_h__ - -#include - -namespace SMPTE { - -enum Wrap { - NONE = 0, - FRAMES, - SECONDS, - MINUTES, - HOURS -}; - -/** SMPTE frame rate (in frames per second). - * - * This should be eliminated in favour of a float to support arbitrary rates. - */ -enum FPS { - MTC_24_FPS = 0, - MTC_25_FPS = 1, - MTC_30_FPS_DROP = 2, - MTC_30_FPS = 3 -}; - -struct Time { - bool negative; - uint32_t hours; - uint32_t minutes; - uint32_t seconds; - uint32_t frames; ///< SMPTE frames (not audio samples) - uint32_t subframes; ///< Typically unused - FPS rate; ///< Frame rate of this Time - static FPS default_rate; ///< Rate to use for default constructor - - Time(FPS a_rate = default_rate) { - negative = false; - hours = 0; - minutes = 0; - seconds = 0; - frames = 0; - subframes = 0; - rate = a_rate; - } -}; - -Wrap increment( Time& smpte ); -Wrap decrement( Time& smpte ); -Wrap increment_subframes( Time& smpte ); -Wrap decrement_subframes( Time& smpte ); -Wrap increment_seconds( Time& smpte ); -Wrap increment_minutes( Time& smpte ); -Wrap increment_hours( Time& smpte ); -void frames_floor( Time& smpte ); -void seconds_floor( Time& smpte ); -void minutes_floor( Time& smpte ); -void hours_floor( Time& smpte ); - -} // namespace SMPTE - -#endif // __ardour_smpte_h__ diff --git a/libs/ardour/ardour/sndfile_helpers.h b/libs/ardour/ardour/sndfile_helpers.h deleted file mode 100644 index cf6b15f3a4..0000000000 --- a/libs/ardour/ardour/sndfile_helpers.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __sndfile_helpers_h__ -#define __sndfile_helpers_h__ - -#include -#include - -using std::string; - -// Use this define when initializing arrarys for use in sndfile_*_format() -#define SNDFILE_STR_LENGTH 32 - -#define SNDFILE_HEADER_FORMATS 5 -extern const char * const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1]; -extern const char * const sndfile_file_endings_strings[SNDFILE_HEADER_FORMATS+1]; - -extern int sndfile_header_formats[SNDFILE_HEADER_FORMATS]; - -#define SNDFILE_BITDEPTH_FORMATS 5 -extern const char * const sndfile_bitdepth_formats_strings[SNDFILE_BITDEPTH_FORMATS+1]; - -extern int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS]; - -#define SNDFILE_ENDIAN_FORMATS 2 -extern const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1]; - -extern int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS]; - -int sndfile_bitdepth_format_from_string(string); -int sndfile_header_format_from_string(string); -int sndfile_endian_format_from_string(string); -string sndfile_file_ending_from_string(string); - -int sndfile_data_width (int format); - -// It'd be nice if libsndfile did this for us -string sndfile_major_format(int); -string sndfile_minor_format(int); - -#endif /* __sndfile_helpers_h__ */ diff --git a/libs/ardour/ardour/sndfileimportable.h b/libs/ardour/ardour/sndfileimportable.h deleted file mode 100644 index 5cd84f4f5f..0000000000 --- a/libs/ardour/ardour/sndfileimportable.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_sndfile_importable_source_h__ -#define __ardour_sndfile_importable_source_h__ - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -class SndFileImportableSource : public ImportableSource { - public: - SndFileImportableSource (const std::string& path); - virtual ~SndFileImportableSource(); - - nframes_t read (Sample* buffer, nframes_t nframes); - uint32_t channels() const; - nframes_t length() const; - nframes_t samplerate() const; - void seek (nframes_t pos); - - protected: - SF_INFO sf_info; - boost::shared_ptr in; - -}; - -} - -#endif /* __ardour_sndfile_importable_source_h__ */ diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h deleted file mode 100644 index 4ad967c132..0000000000 --- a/libs/ardour/ardour/sndfilesource.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __sndfile_source_h__ -#define __sndfile_source_h__ - -#include - -#include - -namespace ARDOUR { - -class SndFileSource : public AudioFileSource { - public: - /* constructor to be called for existing external-to-session files */ - - SndFileSource (Session&, Glib::ustring path, int chn, Flag flags); - - /* constructor to be called for new in-session files */ - - SndFileSource (Session&, Glib::ustring path, SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate, - Flag flags = SndFileSource::default_writable_flags); - - /* constructor to be called for existing in-session files */ - - SndFileSource (Session&, const XMLNode&); - - ~SndFileSource (); - - float sample_rate () const; - int update_header (nframes_t when, struct tm&, time_t); - int flush_header (); - - nframes_t natural_position () const; - - nframes_t last_capture_start_frame() const; - void mark_capture_start (nframes_t); - void mark_capture_end (); - void clear_capture_marks(); - - bool set_destructive (bool yn); - - bool one_of_several_channels () const; - - static void setup_standard_crossfades (nframes_t sample_rate); - static const AudioFileSource::Flag default_writable_flags; - - static int get_soundfile_info (const Glib::ustring& path, SoundFileInfo& _info, string& error_msg); - - protected: - void set_header_timeline_position (); - - nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const; - nframes_t write_unlocked (Sample *dst, nframes_t cnt); - - nframes_t write_float (Sample* data, nframes_t pos, nframes_t cnt); - - private: - SNDFILE *sf; - SF_INFO _info; - SF_BROADCAST_INFO *_broadcast_info; - - void init (); - int open(); - int setup_broadcast_info (nframes_t when, struct tm&, time_t); - - /* destructive */ - - static nframes_t xfade_frames; - static gain_t* out_coefficient; - static gain_t* in_coefficient; - - bool _capture_start; - bool _capture_end; - nframes_t capture_start_frame; - nframes_t file_pos; // unit is frames - nframes_t xfade_out_count; - nframes_t xfade_in_count; - Sample* xfade_buf; - - nframes_t crossfade (Sample* data, nframes_t cnt, int dir); - void set_timeline_position (int64_t); - nframes_t destructive_write_unlocked (Sample *dst, nframes_t cnt); - nframes_t nondestructive_write_unlocked (Sample *dst, nframes_t cnt); - void handle_header_position_change (); - - static int64_t get_timecode_info (SNDFILE* sf, SF_BROADCAST_INFO* binfo, bool& exists); -}; - -} // namespace ARDOUR - -#endif /* __sndfile_source_h__ */ - diff --git a/libs/ardour/ardour/soundseq.h b/libs/ardour/ardour/soundseq.h deleted file mode 100644 index c7157428ee..0000000000 --- a/libs/ardour/ardour/soundseq.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __soundseq_h__ -#define __soundseq_h__ - -#include "edl.h" - -namespace ARDOUR { - -typedef gint16 peak_datum; - -struct peak_data_t { - peak_datum min; - peak_datum max; -}; - -const uint32_t frames_per_peak = 2048; - -class Sound : public EDL::Piece { - public: - int peak (peak_data_t& pk, uint32_t start, uint32_t cnt); - int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); - int build_peak (uint32_t first_frame, uint32_t cnt); -}; - -class SoundPlaylist : public EDL::Playlist { - public: - int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt); -}; - -} /* namespace ARDOUR */ - -#endif /* __soundseq_h__ */ - - - diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h deleted file mode 100644 index a2ee96bf63..0000000000 --- a/libs/ardour/ardour/source.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_source_h__ -#define __ardour_source_h__ - -#include -#include - -#include - -#include - -#include -#include -#include -#include - -namespace ARDOUR { - -class Session; -class Playlist; - -class Source : public SessionObject, public ARDOUR::Readable -{ - public: - Source (Session&, const std::string& name, DataType type); - Source (Session&, const XMLNode&); - - virtual ~Source (); - - DataType type() { return _type; } - - time_t timestamp() const { return _timestamp; } - void stamp (time_t when) { _timestamp = when; } - - nframes_t length() const { return _length; } - - virtual Glib::ustring path() const = 0; - - virtual nframes_t natural_position() const { return 0; } - - virtual void mark_for_remove() = 0; - virtual void mark_streaming_write_started () {} - virtual void mark_streaming_write_completed () = 0; - - virtual void session_saved() {} - - XMLNode& get_state (); - int set_state (const XMLNode&); - - virtual bool destructive() const { return false; } - virtual bool length_mutable() const { return false; } - - void use () { _in_use++; } - void disuse () { if (_in_use) { _in_use--; } } - - void add_playlist (boost::shared_ptr); - void remove_playlist (boost::weak_ptr); - - uint32_t used() const; - - static sigc::signal SourceCreated; - sigc::signal > Switched; - - bool has_been_analysed() const; - virtual bool can_be_analysed() const { return false; } - virtual void set_been_analysed (bool yn); - virtual bool check_for_analysis_data_on_disk(); - - sigc::signal AnalysisChanged; - - AnalysisFeatureList transients; - std::string get_transients_path() const; - int load_transients (const std::string&); - - void update_length (nframes_t pos, nframes_t cnt); - - protected: - DataType _type; - time_t _timestamp; - nframes_t _length; - bool _analysed; - mutable Glib::Mutex _analysis_lock; - Glib::Mutex _playlist_lock; - - typedef std::map, uint32_t > PlaylistMap; - PlaylistMap _playlists; - - private: - uint32_t _in_use; -}; - -} - -#endif /* __ardour_source_h__ */ diff --git a/libs/ardour/ardour/source_factory.h b/libs/ardour/ardour/source_factory.h deleted file mode 100644 index 7e9be451e8..0000000000 --- a/libs/ardour/ardour/source_factory.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_source_factory_h__ -#define __ardour_source_factory_h__ - -#include -#include -#include -#include - -#include -#include - -class XMLNode; - -namespace ARDOUR { - -class Session; - -class SourceFactory { - public: - static void init (); - - static sigc::signal > SourceCreated; - - static boost::shared_ptr create (Session&, const XMLNode& node, bool async = false); - static boost::shared_ptr createSilent (Session&, const XMLNode& node, nframes_t nframes, float sample_rate); - - static boost::shared_ptr createReadable (DataType type, Session&, std::string path, int chn, AudioFileSource::Flag flags, - bool announce = true, bool async = false); - static boost::shared_ptr createWritable (DataType type, Session&, std::string name, bool destructive, nframes_t rate, - bool announce = true, bool async = false); - - static Glib::Cond* PeaksToBuild; - static Glib::StaticMutex peak_building_lock; - static std::list > files_with_peaks; - - static int setup_peakfile (boost::shared_ptr, bool async); -}; - -} - -#endif /* __ardour_source_factory_h__ */ diff --git a/libs/ardour/ardour/spline.h b/libs/ardour/ardour/spline.h deleted file mode 100644 index de1ece6edb..0000000000 --- a/libs/ardour/ardour/spline.h +++ /dev/null @@ -1,90 +0,0 @@ -/* This code is based upon work that bore the legend: - * - * Copyright (C) 1997 David Mosberger - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __ardour_spline_h__ -#define __ardour_spline_h__ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _spline Spline; -typedef struct _spline_point SplinePoint; - -struct _spline_point -{ - float x; - float y; -}; - -Spline *spline_new (void); -void spline_free (Spline *); - -void spline_set (Spline *, uint32_t n, SplinePoint *); -void spline_add (Spline *, uint32_t n, SplinePoint *); -void spline_solve (Spline *); -float spline_eval (Spline *, float val); -void spline_fill (Spline *, float x0, float x1, float *vec, uint32_t veclen); -float spline_get_max_x (Spline *); -float spline_get_min_x (Spline *); - -struct _spline -{ - float *deriv2; - float *x; - float *y; - float max_x; - float min_x; - SplinePoint *points; - uint32_t npoints; - uint32_t space; - -#ifdef __cplusplus - - void set (uint32_t n, SplinePoint *points) { - spline_set (this, n, points); - } - - void add (uint32_t n, SplinePoint *points) { - spline_add (this, n, points); - } - - void solve () { - spline_solve (this); - } - - float eval (float val) { - return spline_eval (this, val); - } - - void fill (float x0, float x1, float *vec, uint32_t veclen) { - spline_fill (this, x0, x1, vec, veclen); - } - -#endif /* __cplusplus */ - -}; - - -#ifdef __cplusplus -} -#endif - -#endif /* __ardour_spline_h__ */ diff --git a/libs/ardour/ardour/stretch.h b/libs/ardour/ardour/stretch.h deleted file mode 100644 index b01a9ae208..0000000000 --- a/libs/ardour/ardour/stretch.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_stretch_h__ -#define __ardour_stretch_h__ - -#include - -#ifdef USE_RUBBERBAND - -#include - -namespace ARDOUR { - -class Stretch : public RBEffect { - public: - Stretch (ARDOUR::Session&, TimeFXRequest&); - ~Stretch() {} -}; - -} /* namespace */ - -#else - -#include - -namespace ARDOUR { - -class Stretch : public Filter { - public: - Stretch (ARDOUR::Session&, TimeFXRequest&); - ~Stretch (); - - int run (boost::shared_ptr); - - private: - TimeFXRequest& tsr; - - soundtouch::SoundTouch st; -}; - -} /* namespace */ - -#endif - -#endif /* __ardour_stretch_h__ */ diff --git a/libs/ardour/ardour/tape_file_matcher.h b/libs/ardour/ardour/tape_file_matcher.h deleted file mode 100644 index 59ec18e818..0000000000 --- a/libs/ardour/ardour/tape_file_matcher.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef ARDOUR_TAPE_FILE_MATCHER_INCLUDED -#define ARDOUR_TAPE_FILE_MATCHER_INCLUDED - -#include - -#include - -namespace ARDOUR { - -using std::string; - -class TapeFileMatcher -{ -public: - - TapeFileMatcher(); - - bool matches (const string& filename) const; - -private: - - regex_t m_compiled_pattern; -}; - -} // namespace ARDOUR - -#endif diff --git a/libs/ardour/ardour/template_utils.h b/libs/ardour/ardour/template_utils.h deleted file mode 100644 index 0676d5b245..0000000000 --- a/libs/ardour/ardour/template_utils.h +++ /dev/null @@ -1,20 +0,0 @@ - -#ifndef TEMPLATE_UTILS_INCLUDED -#define TEMPLATE_UTILS_INCLUDED - -#include - -#include - -namespace ARDOUR { - - using std::vector; - using namespace PBD; - - sys::path system_template_directory (); - - sys::path user_template_directory (); - -} // namespace ARDOUR - -#endif diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h deleted file mode 100644 index c4915072c5..0000000000 --- a/libs/ardour/ardour/tempo.h +++ /dev/null @@ -1,322 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_tempo_h__ -#define __ardour_tempo_h__ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -class XMLNode; - -using std::list; -using std::vector; - -namespace ARDOUR { -class Meter; -class Tempo { - public: - Tempo (double bpm, double type=4.0) // defaulting to quarter note - : _beats_per_minute (bpm), _note_type(type) {} - Tempo (const Tempo& other) { - _beats_per_minute = other._beats_per_minute; - _note_type = other._note_type; - } - void operator= (const Tempo& other) { - if (&other != this) { - _beats_per_minute = other._beats_per_minute; - _note_type = other._note_type; - } - } - - double beats_per_minute () const { return _beats_per_minute;} - double note_type () const { return _note_type;} - double frames_per_beat (nframes_t sr, const Meter& meter) const; - - protected: - double _beats_per_minute; - double _note_type; -}; - -class Meter { - public: - static const double ticks_per_beat; - - Meter (double bpb, double bt) - : _beats_per_bar (bpb), _note_type (bt) {} - Meter (const Meter& other) { - _beats_per_bar = other._beats_per_bar; - _note_type = other._note_type; - } - void operator= (const Meter& other) { - if (&other != this) { - _beats_per_bar = other._beats_per_bar; - _note_type = other._note_type; - } - } - - double beats_per_bar () const { return _beats_per_bar; } - double note_divisor() const { return _note_type; } - - double frames_per_bar (const Tempo&, nframes_t sr) const; - - protected: - - /* this is the number of beats in a bar. it is a real value - because there are musical traditions on our planet - that do not limit themselves to integral numbers of beats - per bar. - */ - - double _beats_per_bar; - - /* this is the type of "note" that a beat represents. for example, - 4.0 would be a quarter (crotchet) note, 8.0 would be an eighth - (quaver) note, etc. - */ - - double _note_type; -}; - -class MetricSection { - public: - MetricSection (const BBT_Time& start) - : _start (start), _frame (0), _movable (true) {} - MetricSection (nframes_t start) - : _frame (start), _movable (true) {} - - virtual ~MetricSection() {} - - const BBT_Time& start() const { return _start; } - const nframes_t frame() const { return _frame; } - - void set_movable (bool yn) { _movable = yn; } - bool movable() const { return _movable; } - - virtual void set_frame (nframes_t f) { - _frame = f; - }; - - virtual void set_start (const BBT_Time& w) { - _start = w; - } - - /* MeterSections are not stateful in the full sense, - but we do want them to control their own - XML state information. - */ - - virtual XMLNode& get_state() const = 0; - - private: - BBT_Time _start; - nframes_t _frame; - bool _movable; -}; - -class MeterSection : public MetricSection, public Meter { - public: - MeterSection (const BBT_Time& start, double bpb, double note_type) - : MetricSection (start), Meter (bpb, note_type) {} - MeterSection (nframes_t start, double bpb, double note_type) - : MetricSection (start), Meter (bpb, note_type) {} - MeterSection (const XMLNode&); - - static const string xml_state_node_name; - - XMLNode& get_state() const; -}; - -class TempoSection : public MetricSection, public Tempo { - public: - TempoSection (const BBT_Time& start, double qpm, double note_type) - : MetricSection (start), Tempo (qpm, note_type) {} - TempoSection (nframes_t start, double qpm, double note_type) - : MetricSection (start), Tempo (qpm, note_type) {} - TempoSection (const XMLNode&); - - static const string xml_state_node_name; - - XMLNode& get_state() const; -}; - -typedef list Metrics; - -class TempoMap : public PBD::StatefulDestructible -{ - public: - TempoMap (nframes_t frame_rate); - ~TempoMap(); - - /* measure-based stuff */ - - enum BBTPointType { - Bar, - Beat, - }; - - struct BBTPoint { - BBTPointType type; - nframes_t frame; - const Meter* meter; - const Tempo* tempo; - uint32_t bar; - uint32_t beat; - - BBTPoint (const Meter& m, const Tempo& t, nframes_t f, BBTPointType ty, uint32_t b, uint32_t e) - : type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {} - }; - - typedef vector BBTPointList; - - template void apply_with_metrics (T& obj, void (T::*method)(const Metrics&)) { - Glib::RWLock::ReaderLock lm (lock); - (obj.*method)(*metrics); - } - - BBTPointList *get_points (nframes_t start, nframes_t end) const; - - void bbt_time (nframes_t when, BBT_Time&) const; - nframes_t frame_time (const BBT_Time&) const; - nframes_t bbt_duration_at (nframes_t, const BBT_Time&, int dir) const; - - static const Tempo& default_tempo() { return _default_tempo; } - static const Meter& default_meter() { return _default_meter; } - - const Tempo& tempo_at (nframes_t); - const Meter& meter_at (nframes_t); - - const TempoSection& tempo_section_at (nframes_t); - - void add_tempo(const Tempo&, BBT_Time where); - void add_meter(const Meter&, BBT_Time where); - - void add_tempo(const Tempo&, nframes_t where); - void add_meter(const Meter&, nframes_t where); - - void move_tempo (TempoSection&, const BBT_Time& to); - void move_meter (MeterSection&, const BBT_Time& to); - - void remove_tempo(const TempoSection&); - void remove_meter(const MeterSection&); - - void replace_tempo (TempoSection& existing, const Tempo& replacement); - void replace_meter (MeterSection& existing, const Meter& replacement); - - - nframes_t round_to_bar (nframes_t frame, int dir); - - nframes_t round_to_beat (nframes_t frame, int dir); - - nframes_t round_to_beat_subdivision (nframes_t fr, int sub_num); - - nframes_t round_to_tick (nframes_t frame, int dir); - - void set_length (nframes_t frames); - - XMLNode& get_state (void); - int set_state (const XMLNode&); - - void dump (std::ostream&) const; - void clear (); - - /* this is a helper class that we use to be able to keep - track of which meter *AND* tempo are in effect at - a given point in time. - */ - - class Metric { - public: - Metric (const Meter& m, const Tempo& t) : _meter (&m), _tempo (&t), _frame (0) {} - - void set_tempo (const Tempo& t) { _tempo = &t; } - void set_meter (const Meter& m) { _meter = &m; } - void set_frame (nframes_t f) { _frame = f; } - void set_start (const BBT_Time& t) { _start = t; } - - const Meter& meter() const { return *_meter; } - const Tempo& tempo() const { return *_tempo; } - nframes_t frame() const { return _frame; } - const BBT_Time& start() const { return _start; } - - private: - const Meter* _meter; - const Tempo* _tempo; - nframes_t _frame; - BBT_Time _start; - - }; - - Metric metric_at (BBT_Time bbt) const; - Metric metric_at (nframes_t) const; - void bbt_time_with_metric (nframes_t, BBT_Time&, const Metric&) const; - - void change_existing_tempo_at (nframes_t, double bpm, double note_type); - void change_initial_tempo (double bpm, double note_type); - - int n_tempos () const; - int n_meters () const; - - sigc::signal StateChanged; - - private: - static Tempo _default_tempo; - static Meter _default_meter; - - Metrics* metrics; - nframes_t _frame_rate; - nframes_t last_bbt_when; - bool last_bbt_valid; - BBT_Time last_bbt; - mutable Glib::RWLock lock; - - void timestamp_metrics (bool use_bbt); - - nframes_t round_to_type (nframes_t fr, int dir, BBTPointType); - - nframes_t frame_time_unlocked (const BBT_Time&) const; - - void bbt_time_unlocked (nframes_t, BBT_Time&) const; - - nframes_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const; - - const MeterSection& first_meter() const; - const TempoSection& first_tempo() const; - - nframes_t count_frames_between (const BBT_Time&, const BBT_Time&) const; - nframes_t count_frames_between_metrics (const Meter&, const Tempo&, const BBT_Time&, const BBT_Time&) const; - - int move_metric_section (MetricSection&, const BBT_Time& to); - void do_insert (MetricSection* section, bool with_bbt); -}; - -}; /* namespace ARDOUR */ - -#endif /* __ardour_tempo_h__ */ diff --git a/libs/ardour/ardour/timestamps.h b/libs/ardour/ardour/timestamps.h deleted file mode 100644 index a0aeeae13d..0000000000 --- a/libs/ardour/ardour/timestamps.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_timestamps_h__ -#define __ardour_timestamps_h__ - -#ifdef WITH_JACK_TIMESTAMPS -#include -#else -#define jack_timestamp(s) -#define jack_init_timestamps(n) -#define jack_dump_timestamps(o) -#define jack_reset_timestamps() -#endif - -#endif /* __ardour_timestamps_h__ */ diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h deleted file mode 100644 index 4d5545c0dc..0000000000 --- a/libs/ardour/ardour/track.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ardour_track_h__ -#define __ardour_track_h__ - -#include - -#include - -namespace ARDOUR { - -class Session; -class Diskstream; -class Playlist; -class RouteGroup; - -class Track : public Route -{ - public: - Track (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); - - virtual ~Track (); - - bool set_name (const std::string& str); - - TrackMode mode () const { return _mode; } - virtual int set_mode (TrackMode m) { return false; } - virtual bool can_use_mode (TrackMode m, bool& bounce_required) { return false; } - sigc::signal TrackModeChanged; - - virtual int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, int declick, bool can_record, bool rec_monitors_input) = 0; - - virtual int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input) = 0; - - virtual int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, - nframes_t offset, bool can_record, bool rec_monitors_input) = 0; - - void toggle_monitor_input (); - - bool can_record(); - - boost::shared_ptr diskstream() const { return _diskstream; } - - virtual int use_diskstream (string name) = 0; - virtual int use_diskstream (const PBD::ID& id) = 0; - - nframes_t update_total_latency(); - void set_latency_delay (nframes_t); - - enum FreezeState { - NoFreeze, - Frozen, - UnFrozen - }; - - FreezeState freeze_state() const; - - virtual void freeze (InterThreadInfo&) = 0; - virtual void unfreeze () = 0; - - virtual void bounce (InterThreadInfo&) = 0; - virtual void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&) = 0; - - XMLNode& get_state(); - XMLNode& get_template(); - virtual int set_state(const XMLNode& node) = 0; - - boost::shared_ptr rec_enable_control() { return _rec_enable_control; } - - bool record_enabled() const; - void set_record_enable (bool yn, void *src); - - void set_meter_point (MeterPoint, void* src); - - sigc::signal DiskstreamChanged; - sigc::signal FreezeChange; - - protected: - Track (Session& sess, const XMLNode& node, DataType default_type = DataType::AUDIO); - - virtual XMLNode& state (bool full) = 0; - - boost::shared_ptr _diskstream; - MeterPoint _saved_meter_point; - TrackMode _mode; - - //private: (FIXME) - struct FreezeRecordProcessorInfo { - FreezeRecordProcessorInfo(XMLNode& st, boost::shared_ptr proc) - : state (st), processor (proc) {} - - XMLNode state; - boost::shared_ptr processor; - PBD::ID id; - UndoAction memento; - }; - - struct FreezeRecord { - FreezeRecord() - : have_mementos(false) - {} - - ~FreezeRecord(); - - boost::shared_ptr playlist; - vector processor_info; - bool have_mementos; - FreezeState state; - }; - - struct RecEnableControllable : public PBD::Controllable { - RecEnableControllable (Track&); - - void set_value (float); - float get_value (void) const; - - Track& track; - }; - - virtual void set_state_part_two () = 0; - - FreezeRecord _freeze_record; - XMLNode* pending_state; - sigc::connection recenable_connection; - sigc::connection ic_connection; - bool _destructive; - - boost::shared_ptr _rec_enable_control; -}; - -}; /* namespace ARDOUR*/ - -#endif /* __ardour_track_h__ */ diff --git a/libs/ardour/ardour/transient_detector.h b/libs/ardour/ardour/transient_detector.h deleted file mode 100644 index 259b79176f..0000000000 --- a/libs/ardour/ardour/transient_detector.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_transient_detector_h__ -#define __ardour_transient_detector_h__ - -#include - -namespace ARDOUR { - -class AudioSource; -class Session; - -class TransientDetector : public AudioAnalyser -{ - - public: - TransientDetector (float sample_rate); - ~TransientDetector(); - - static std::string operational_identifier(); - - void set_threshold (float); - void set_sensitivity (float); - - float get_threshold () const; - float get_sensitivity () const; - - int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results); - - static void cleanup_transients (AnalysisFeatureList&, float sr, float gap_msecs); - - protected: - AnalysisFeatureList* current_results; - int use_features (Vamp::Plugin::FeatureSet&, std::ostream*); - - static std::string _op_id; -}; - -} /* namespace */ - -#endif /* __ardour_audioanalyser_h__ */ diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h deleted file mode 100644 index 9bfd93cdbf..0000000000 --- a/libs/ardour/ardour/types.h +++ /dev/null @@ -1,443 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_types_h__ -#define __ardour_types_h__ - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS /* PRI; C++ requires explicit requesting of these */ -#endif - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#if __GNUC__ < 3 - -typedef int intptr_t; -#endif - -/* eventually, we'd like everything (including JACK) to - move to this. for now, its a dedicated type. -*/ - -typedef int64_t nframes64_t; - -namespace ARDOUR { - - class Source; - class AudioSource; - - typedef jack_default_audio_sample_t Sample; - typedef float pan_t; - typedef float gain_t; - typedef uint32_t layer_t; - typedef uint64_t microseconds_t; - typedef uint32_t nframes_t; - - enum IOChange { - NoChange = 0, - ConfigurationChanged = 0x1, - ConnectionsChanged = 0x2 - }; - - enum OverlapType { - OverlapNone, // no overlap - OverlapInternal, // the overlap is 100% with the object - OverlapStart, // overlap covers start, but ends within - OverlapEnd, // overlap begins within and covers end - OverlapExternal // overlap extends to (at least) begin+end - }; - - OverlapType coverage (nframes_t start_a, nframes_t end_a, - nframes_t start_b, nframes_t end_b); - - /** See parameter.h - * XXX: I don't think/hope these hex values matter anymore. - */ - enum AutomationType { - NullAutomation = 0x0, - GainAutomation = 0x1, - PanAutomation = 0x2, - PluginAutomation = 0x4, - SoloAutomation = 0x8, - MuteAutomation = 0x10, - MidiCCAutomation = 0x20, - MidiPgmChangeAutomation = 0x21, - MidiPitchBenderAutomation = 0x22, - MidiChannelAftertouchAutomation = 0x23, - FadeInAutomation = 0x40, - FadeOutAutomation = 0x80, - EnvelopeAutomation = 0x100 - }; - - enum AutoState { - Off = 0x0, - Write = 0x1, - Touch = 0x2, - Play = 0x4 - }; - - std::string auto_state_to_string (AutoState); - AutoState string_to_auto_state (std::string); - - enum AutoStyle { - Absolute = 0x1, - Trim = 0x2 - }; - - std::string auto_style_to_string (AutoStyle); - AutoStyle string_to_auto_style (std::string); - - enum AlignStyle { - CaptureTime, - ExistingMaterial - }; - - enum MeterPoint { - MeterInput, - MeterPreFader, - MeterPostFader - }; - - enum TrackMode { - Normal, - Destructive - }; - - enum NoteMode { - Sustained, - Percussive - }; - - enum ChannelMode { - AllChannels = 0, ///< Pass through all channel information unmodified - FilterChannels, ///< Ignore events on certain channels - ForceChannel ///< Force all events to a certain channel - }; - - enum EventTimeUnit { - Frames, - Beats - }; - - struct BBT_Time { - uint32_t bars; - uint32_t beats; - uint32_t ticks; - - BBT_Time() { - bars = 1; - beats = 1; - ticks = 0; - } - - /* we can't define arithmetic operators for BBT_Time, because - the results depend on a TempoMap, but we can define - a useful check on the less-than condition. - */ - - bool operator< (const BBT_Time& other) const { - return bars < other.bars || - (bars == other.bars && beats < other.beats) || - (bars == other.bars && beats == other.beats && ticks < other.ticks); - } - - bool operator== (const BBT_Time& other) const { - return bars == other.bars && beats == other.beats && ticks == other.ticks; - } - - }; - enum SmpteFormat { - smpte_23976, - smpte_24, - smpte_24976, - smpte_25, - smpte_2997, - smpte_2997drop, - smpte_30, - smpte_30drop, - smpte_5994, - smpte_60 - }; - - struct AnyTime { - enum Type { - SMPTE, - BBT, - Frames, - Seconds - }; - - Type type; - - SMPTE::Time smpte; - BBT_Time bbt; - - union { - nframes_t frames; - double seconds; - }; - - AnyTime() { type = Frames; frames = 0; } - }; - - struct AudioRange { - nframes_t start; - nframes_t end; - uint32_t id; - - AudioRange (nframes_t s, nframes_t e, uint32_t i) : start (s), end (e) , id (i) {} - - nframes_t length() { return end - start + 1; } - - bool operator== (const AudioRange& other) const { - return start == other.start && end == other.end && id == other.id; - } - - bool equal (const AudioRange& other) const { - return start == other.start && end == other.end; - } - - OverlapType coverage (nframes_t s, nframes_t e) const { - return ARDOUR::coverage (start, end, s, e); - } - }; - - struct MusicRange { - BBT_Time start; - BBT_Time end; - uint32_t id; - - MusicRange (BBT_Time& s, BBT_Time& e, uint32_t i) - : start (s), end (e), id (i) {} - - bool operator== (const MusicRange& other) const { - return start == other.start && end == other.end && id == other.id; - } - - bool equal (const MusicRange& other) const { - return start == other.start && end == other.end; - } - }; - - /* - Slowest = 6.6dB/sec falloff at update rate of 40ms - Slow = 6.8dB/sec falloff at update rate of 40ms - */ - - enum MeterFalloff { - MeterFalloffOff = 0, - MeterFalloffSlowest = 1, - MeterFalloffSlow = 2, - MeterFalloffMedium = 3, - MeterFalloffFast = 4, - MeterFalloffFaster = 5, - MeterFalloffFastest = 6 - }; - - enum MeterHold { - MeterHoldOff = 0, - MeterHoldShort = 40, - MeterHoldMedium = 100, - MeterHoldLong = 200 - }; - - enum EditMode { - Slide, - Splice, - Lock - }; - - enum RegionPoint { - Start, - End, - SyncPoint - }; - - enum Change { - range_guarantee = ~0 - }; - - - enum Placement { - PreFader, - PostFader - }; - - enum MonitorModel { - HardwareMonitoring, - SoftwareMonitoring, - ExternalMonitoring - }; - - enum DenormalModel { - DenormalNone, - DenormalFTZ, - DenormalDAZ, - DenormalFTZDAZ - }; - - enum RemoteModel { - UserOrdered, - MixerOrdered, - EditorOrdered - }; - - enum CrossfadeModel { - FullCrossfade, - ShortCrossfade - }; - - enum LayerModel { - LaterHigher, - MoveAddHigher, - AddHigher - }; - - enum SoloModel { - InverseMute, - SoloBus - }; - - enum AutoConnectOption { - AutoConnectPhysical = 0x1, - AutoConnectMaster = 0x2 - }; - - struct InterThreadInfo { - volatile bool done; - volatile bool cancel; - volatile float progress; - pthread_t thread; - }; - - enum SampleFormat { - FormatFloat = 0, - FormatInt24, - FormatInt16 - }; - - - enum HeaderFormat { - BWF, - WAVE, - WAVE64, - CAF, - AIFF, - iXML, - RF64 - }; - - struct PeakData { - typedef Sample PeakDatum; - - PeakDatum min; - PeakDatum max; - }; - - enum PluginType { - AudioUnit, - LADSPA, - LV2, - VST - }; - - enum SlaveSource { - None = 0, - MTC, - JACK - }; - - enum ShuttleBehaviour { - Sprung, - Wheel - }; - - enum ShuttleUnits { - Percentage, - Semitones - }; - - typedef std::vector > SourceList; - - enum SrcQuality { - SrcBest, - SrcGood, - SrcQuick, - SrcFast, - SrcFastest - }; - - struct TimeFXRequest : public InterThreadInfo { - TimeFXRequest() : time_fraction(0), pitch_fraction(0), - quick_seek(false), antialias(false), opts(0) {} - float time_fraction; - float pitch_fraction; - /* SoundTouch */ - bool quick_seek; - bool antialias; - /* RubberBand */ - int opts; // really RubberBandStretcher::Options - }; - - typedef std::list AnalysisFeatureList; - -} // namespace ARDOUR - -std::istream& operator>>(std::istream& o, ARDOUR::SampleFormat& sf); -std::istream& operator>>(std::istream& o, ARDOUR::HeaderFormat& sf); -std::istream& operator>>(std::istream& o, ARDOUR::AutoConnectOption& sf); -std::istream& operator>>(std::istream& o, ARDOUR::EditMode& sf); -std::istream& operator>>(std::istream& o, ARDOUR::MonitorModel& sf); -std::istream& operator>>(std::istream& o, ARDOUR::RemoteModel& sf); -std::istream& operator>>(std::istream& o, ARDOUR::SoloModel& sf); -std::istream& operator>>(std::istream& o, ARDOUR::LayerModel& sf); -std::istream& operator>>(std::istream& o, ARDOUR::CrossfadeModel& sf); -std::istream& operator>>(std::istream& o, ARDOUR::SlaveSource& sf); -std::istream& operator>>(std::istream& o, ARDOUR::ShuttleBehaviour& sf); -std::istream& operator>>(std::istream& o, ARDOUR::ShuttleUnits& sf); -std::istream& operator>>(std::istream& o, ARDOUR::SmpteFormat& sf); -std::istream& operator>>(std::istream& o, ARDOUR::DenormalModel& sf); - -using ARDOUR::nframes_t; - -static inline nframes_t -session_frame_to_track_frame (nframes_t session_frame, double speed) -{ - return (nframes_t)( (double)session_frame * speed ); -} - -static inline nframes_t -track_frame_to_session_frame (nframes_t track_frame, double speed) -{ - return (nframes_t)( (double)track_frame / speed ); -} - - -#endif /* __ardour_types_h__ */ - diff --git a/libs/ardour/ardour/user_bundle.h b/libs/ardour/ardour/user_bundle.h deleted file mode 100644 index 954e93d5d1..0000000000 --- a/libs/ardour/ardour/user_bundle.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_user_bundle_h__ -#define __ardour_user_bundle_h__ - -#include -#include -#include "pbd/stateful.h" -#include "ardour/bundle.h" - -namespace ARDOUR { - -class Session; - -class UserBundle : public Bundle, public PBD::Stateful { - - public: - UserBundle (std::string const &); - UserBundle (XMLNode const &, bool); - - uint32_t nchannels () const; - const ARDOUR::PortList& channel_ports (uint32_t) const; - - void add_channel (); - void set_channels (uint32_t); - void remove_channel (uint32_t); - void add_port_to_channel (uint32_t, std::string const &); - void remove_port_from_channel (uint32_t, std::string const &); - bool port_attached_to_channel (uint32_t, std::string const &) const; - XMLNode& get_state (); - - /// The number of channels is about to change - sigc::signal ConfigurationWillChange; - /// The number of channels has changed - sigc::signal ConfigurationHasChanged; - /// The port set associated with one of our channels is about to change - /// Parameter is the channel number - sigc::signal PortsWillChange; - /// The port set associated with one of our channels has changed - /// Parameter is the channel number - sigc::signal PortsHaveChanged; - - private: - - int set_state (const XMLNode &); - - /// mutex for _ports; - /// XXX: is this necessary? - mutable Glib::Mutex _ports_mutex; - std::vector _ports; -}; - -} - -#endif diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h deleted file mode 100644 index eecde2e85f..0000000000 --- a/libs/ardour/ardour/utils.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 1999 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_utils_h__ -#define __ardour_utils_h__ - -#include -#include -#include - -#if defined(HAVE_COREAUDIO) || defined(HAVE_AUDIOUNITS) -#include -#endif - -#include "ardour.h" - -class XMLNode; - -Glib::ustring legalize_for_path (Glib::ustring str); -std::ostream& operator<< (std::ostream& o, const ARDOUR::BBT_Time& bbt); -XMLNode* find_named_node (const XMLNode& node, std::string name); - -static inline float f_max(float x, float a) { - x -= a; - x += fabsf (x); - x *= 0.5f; - x += a; - - return (x); -} - -std::string bump_name_once(std::string s); - -int cmp_nocase (const std::string& s, const std::string& s2); - -int touch_file(Glib::ustring path); - -Glib::ustring path_expand (Glib::ustring); -Glib::ustring region_name_from_path (Glib::ustring path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); -bool path_is_paired (Glib::ustring path, Glib::ustring& pair_base); - -void compute_equal_power_fades (nframes_t nframes, float* in, float* out); - -const char* slave_source_to_string (ARDOUR::SlaveSource src); -ARDOUR::SlaveSource string_to_slave_source (std::string str); - -const char* edit_mode_to_string (ARDOUR::EditMode); -ARDOUR::EditMode string_to_edit_mode (std::string); - -float meter_falloff_to_float (ARDOUR::MeterFalloff); -ARDOUR::MeterFalloff meter_falloff_from_float (float); -float meter_falloff_to_db_per_sec (float); -float meter_hold_to_float (ARDOUR::MeterHold); - -#if defined(HAVE_COREAUDIO) || defined(HAVE_AUDIOUNITS) -std::string CFStringRefToStdString(CFStringRef stringRef); -#endif // HAVE_COREAUDIO - -#endif /* __ardour_utils_h__ */ - diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h deleted file mode 100644 index e41d000f9c..0000000000 --- a/libs/ardour/ardour/vst_plugin.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __ardour_vst_plugin_h__ -#define __ardour_vst_plugin_h__ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -using std::string; -using std::vector; -using std::list; -using std::map; - -struct _FSTHandle; -struct _FST; -typedef struct _FSTHandle FSTHandle; -typedef struct _FST FST; -class AEffect; - -namespace ARDOUR { -class AudioEngine; -class Session; - -class VSTPlugin : public ARDOUR::Plugin -{ - public: - VSTPlugin (ARDOUR::AudioEngine&, ARDOUR::Session&, FSTHandle* handle); - VSTPlugin (const VSTPlugin &); - ~VSTPlugin (); - - /* Plugin interface */ - - std::string unique_id() const; - const char * label() const; - const char * name() const; - const char * maker() const; - uint32_t parameter_count() const; - float default_value (uint32_t port); - nframes_t signal_latency() const; - void set_parameter (uint32_t port, float val); - float get_parameter (uint32_t port) const; - int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const; - std::set automatable() const; - uint32_t nth_parameter (uint32_t port, bool& ok) const; - void activate (); - void deactivate (); - void set_block_size (nframes_t nframes); - int connect_and_run (BufferSet&, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset); - string describe_parameter (uint32_t); - string state_node_name() const { return "vst"; } - void print_parameter (uint32_t, char*, uint32_t len) const; - - bool parameter_is_audio(uint32_t i) const { return false; } - bool parameter_is_control(uint32_t i) const { return true; } - bool parameter_is_input(uint32_t i) const { return true; } - bool parameter_is_output(uint32_t i) const { return false; } - - bool load_preset (const string preset_label ); - bool save_preset(string name); - - bool has_editor () const; - - XMLNode& get_state(); - int set_state(const XMLNode& node); - - AEffect* plugin() const { return _plugin; } - FST* fst() const { return _fst; } - - - private: - FSTHandle* handle; - FST* _fst; - AEffect* _plugin; - bool been_resumed; -}; - -class VSTPluginInfo : public PluginInfo -{ - public: - VSTPluginInfo () {} - ~VSTPluginInfo () {} - - PluginPtr load (Session& session); -}; - -typedef boost::shared_ptr VSTPluginInfoPtr; - -} // namespace ARDOUR - -#endif /* __ardour_vst_plugin_h__ */ diff --git a/libs/ardour/audio_buffer.cc b/libs/ardour/audio_buffer.cc deleted file mode 100644 index 915fdeb948..0000000000 --- a/libs/ardour/audio_buffer.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2006-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include - -#include "i18n.h" - -#ifdef __x86_64__ -static const int CPU_CACHE_ALIGN = 64; -#else -static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it matters less */ -#endif - -using namespace PBD; - -namespace ARDOUR { - - -AudioBuffer::AudioBuffer(size_t capacity) - : Buffer(DataType::AUDIO, capacity) - , _owns_data (false) - , _data (0) -{ - if (_capacity > 0) { - _owns_data = true; // prevent resize() from gagging - resize (_capacity); - silence (_capacity); - } -} - -AudioBuffer::~AudioBuffer() -{ - if (_owns_data) - free(_data); -} - -void -AudioBuffer::resize (size_t size) -{ - if (!_owns_data || (size < _capacity)) { - return; - } - - if (_data) { - free (_data); - } - - _capacity = size; - _size = size; - _silent = false; - -#ifdef NO_POSIX_MEMALIGN - _data = (Sample *) malloc(sizeof(Sample) * _capacity); -#else - if (posix_memalign((void**)&_data, CPU_CACHE_ALIGN, sizeof(Sample) * _capacity)) { - fatal << string_compose (_("Memory allocation error: posix_memalign (%1 * %2) failed (%3)"), - CPU_CACHE_ALIGN, sizeof (Sample) * _capacity, strerror (errno)) << endmsg; - } -#endif - - _owns_data = true; -} - -} // namespace ARDOUR - diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc deleted file mode 100644 index 091e1df30f..0000000000 --- a/libs/ardour/audio_diskstream.cc +++ /dev/null @@ -1,2490 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -size_t AudioDiskstream::_working_buffers_size = 0; -Sample* AudioDiskstream::_mixdown_buffer = 0; -gain_t* AudioDiskstream::_gain_buffer = 0; - -AudioDiskstream::AudioDiskstream (Session &sess, const string &name, Diskstream::Flag flag) - : Diskstream(sess, name, flag) - , deprecated_io_node(NULL) - , channels (new ChannelList) -{ - /* prevent any write sources from being created */ - - in_set_state = true; - - init(flag); - use_new_playlist (); - - in_set_state = false; -} - -AudioDiskstream::AudioDiskstream (Session& sess, const XMLNode& node) - : Diskstream(sess, node) - , deprecated_io_node(NULL) - , channels (new ChannelList) -{ - in_set_state = true; - init (Recordable); - - if (set_state (node)) { - in_set_state = false; - throw failed_constructor(); - } - - in_set_state = false; - - if (destructive()) { - use_destructive_playlist (); - } -} - -void -AudioDiskstream::init (Diskstream::Flag f) -{ - Diskstream::init(f); - - /* there are no channels at this point, so these - two calls just get speed_buffer_size and wrap_buffer - size setup without duplicating their code. - */ - - set_block_size (_session.get_block_size()); - allocate_temporary_buffers (); - - add_channel (1); - assert(_n_channels == ChanCount(DataType::AUDIO, 1)); -} - -AudioDiskstream::~AudioDiskstream () -{ - notify_callbacks (); - - { - RCUWriter writer (channels); - boost::shared_ptr c = writer.get_copy(); - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - delete *chan; - } - - c->clear(); - } - - channels.flush (); -} - -void -AudioDiskstream::allocate_working_buffers() -{ - assert(disk_io_frames() > 0); - - _working_buffers_size = disk_io_frames(); - _mixdown_buffer = new Sample[_working_buffers_size]; - _gain_buffer = new gain_t[_working_buffers_size]; -} - -void -AudioDiskstream::free_working_buffers() -{ - delete [] _mixdown_buffer; - delete [] _gain_buffer; - _working_buffers_size = 0; - _mixdown_buffer = 0; - _gain_buffer = 0; -} - -void -AudioDiskstream::non_realtime_input_change () -{ - { - Glib::Mutex::Lock lm (state_lock); - - if (input_change_pending == NoChange) { - return; - } - - { - RCUWriter writer (channels); - boost::shared_ptr c = writer.get_copy(); - - _n_channels.set(DataType::AUDIO, c->size()); - - if (_io->n_inputs().n_audio() > _n_channels.n_audio()) { - add_channel_to (c, _io->n_inputs().n_audio() - _n_channels.n_audio()); - } else if (_io->n_inputs().n_audio() < _n_channels.n_audio()) { - remove_channel_from (c, _n_channels.n_audio() - _io->n_inputs().n_audio()); - } - } - - get_input_sources (); - set_capture_offset (); - - if (first_input_change) { - set_align_style (_persistent_alignment_style); - first_input_change = false; - } else { - set_align_style_from_io (); - } - - input_change_pending = NoChange; - - /* implicit unlock */ - } - - /* reset capture files */ - - reset_write_sources (false); - - /* now refill channel buffers */ - - if (speed() != 1.0f || speed() != -1.0f) { - seek ((nframes_t) (_session.transport_frame() * (double) speed())); - } else { - seek (_session.transport_frame()); - } -} - -void -AudioDiskstream::get_input_sources () -{ - boost::shared_ptr c = channels.reader(); - - uint32_t n; - ChannelList::iterator chan; - uint32_t ni = _io->n_inputs().n_audio(); - vector connections; - - for (n = 0, chan = c->begin(); chan != c->end() && n < ni; ++chan, ++n) { - - connections.clear (); - - if (_io->input(n)->get_connections (connections) == 0) { - - if ((*chan)->source) { - // _source->disable_metering (); - } - - (*chan)->source = 0; - - } else { - (*chan)->source = dynamic_cast(_session.engine().get_port_by_name (connections[0]) ); - } - } -} - -int -AudioDiskstream::find_and_use_playlist (const string& name) -{ - boost::shared_ptr playlist; - - if ((playlist = boost::dynamic_pointer_cast (_session.playlist_by_name (name))) == 0) { - playlist = boost::dynamic_pointer_cast (PlaylistFactory::create (DataType::AUDIO, _session, name)); - } - - if (!playlist) { - error << string_compose(_("AudioDiskstream: Playlist \"%1\" isn't an audio playlist"), name) << endmsg; - return -1; - } - - return use_playlist (playlist); -} - -int -AudioDiskstream::use_playlist (boost::shared_ptr playlist) -{ - assert(boost::dynamic_pointer_cast(playlist)); - - Diskstream::use_playlist(playlist); - - return 0; -} - -int -AudioDiskstream::use_new_playlist () -{ - string newname; - boost::shared_ptr playlist; - - if (!in_set_state && destructive()) { - return 0; - } - - if (_playlist) { - newname = Playlist::bump_name (_playlist->name(), _session); - } else { - newname = Playlist::bump_name (_name, _session); - } - - if ((playlist = boost::dynamic_pointer_cast (PlaylistFactory::create (DataType::AUDIO, _session, newname, hidden()))) != 0) { - - playlist->set_orig_diskstream_id (id()); - return use_playlist (playlist); - - } else { - return -1; - } -} - -int -AudioDiskstream::use_copy_playlist () -{ - assert(audio_playlist()); - - if (destructive()) { - return 0; - } - - if (_playlist == 0) { - error << string_compose(_("AudioDiskstream %1: there is no existing playlist to make a copy of!"), _name) << endmsg; - return -1; - } - - string newname; - boost::shared_ptr playlist; - - newname = Playlist::bump_name (_playlist->name(), _session); - - if ((playlist = boost::dynamic_pointer_cast(PlaylistFactory::create (audio_playlist(), newname))) != 0) { - playlist->set_orig_diskstream_id (id()); - return use_playlist (playlist); - } else { - return -1; - } -} - -void -AudioDiskstream::setup_destructive_playlist () -{ - SourceList srcs; - boost::shared_ptr c = channels.reader(); - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - srcs.push_back ((*chan)->write_source); - } - - /* a single full-sized region */ - - boost::shared_ptr region (RegionFactory::create (srcs, 0, max_frames - srcs.front()->natural_position(), _name)); - _playlist->add_region (region, srcs.front()->natural_position()); -} - -void -AudioDiskstream::use_destructive_playlist () -{ - /* this is called from the XML-based constructor or ::set_destructive. when called, - we already have a playlist and a region, but we need to - set up our sources for write. we use the sources associated - with the (presumed single, full-extent) region. - */ - - boost::shared_ptr rp = _playlist->find_next_region (_session.current_start_frame(), Start, 1); - - if (!rp) { - reset_write_sources (false, true); - return; - } - - boost::shared_ptr region = boost::dynamic_pointer_cast (rp); - - if (region == 0) { - throw failed_constructor(); - } - - /* be sure to stretch the region out to the maximum length */ - - region->set_length (max_frames - region->position(), this); - - uint32_t n; - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - - for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) { - (*chan)->write_source = boost::dynamic_pointer_cast(region->source (n)); - assert((*chan)->write_source); - (*chan)->write_source->set_allow_remove_if_empty (false); - - /* this might be false if we switched modes, so force it */ - - (*chan)->write_source->set_destructive (true); - } - - /* the source list will never be reset for a destructive track */ -} - -void -AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record) -{ - int possibly_recording; - int rolling; - int change; - const int transport_rolling = 0x4; - const int track_rec_enabled = 0x2; - const int global_rec_enabled = 0x1; - - /* merge together the 3 factors that affect record status, and compute - what has changed. - */ - - rolling = _session.transport_speed() != 0.0f; - possibly_recording = (rolling << 2) | (record_enabled() << 1) | can_record; - change = possibly_recording ^ last_possibly_recording; - - if (possibly_recording == last_possibly_recording) { - return; - } - - /* change state */ - - /* if per-track or global rec-enable turned on while the other was already on, we've started recording */ - - if (((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record)) || - (((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled())))) { - - /* starting to record: compute first+last frames */ - - first_recordable_frame = transport_frame + _capture_offset; - last_recordable_frame = max_frames; - capture_start_frame = transport_frame; - - if (!(last_possibly_recording & transport_rolling) && (possibly_recording & transport_rolling)) { - - /* was stopped, now rolling (and recording) */ - - if (_alignment_style == ExistingMaterial) { - first_recordable_frame += _session.worst_output_latency(); - } else { - first_recordable_frame += _roll_delay; - } - - } else { - - /* was rolling, but record state changed */ - - if (_alignment_style == ExistingMaterial) { - - if (!Config->get_punch_in()) { - - /* manual punch in happens at the correct transport frame - because the user hit a button. but to get alignment correct - we have to back up the position of the new region to the - appropriate spot given the roll delay. - */ - - capture_start_frame -= _roll_delay; - - /* XXX paul notes (august 2005): i don't know why - this is needed. - */ - - first_recordable_frame += _capture_offset; - - } else { - - /* autopunch toggles recording at the precise - transport frame, and then the DS waits - to start recording for a time that depends - on the output latency. - */ - - first_recordable_frame += _session.worst_output_latency(); - } - - } else { - - if (Config->get_punch_in()) { - first_recordable_frame += _roll_delay; - } else { - capture_start_frame -= _roll_delay; - } - } - - } - - if (recordable() && destructive()) { - boost::shared_ptr c = channels.reader(); - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - RingBufferNPT::rw_vector transvec; - (*chan)->capture_transition_buf->get_write_vector(&transvec); - - if (transvec.len[0] > 0) { - transvec.buf[0]->type = CaptureStart; - transvec.buf[0]->capture_val = capture_start_frame; - (*chan)->capture_transition_buf->increment_write_ptr(1); - } - else { - // bad! - fatal << X_("programming error: capture_transition_buf is full on rec start! inconceivable!") - << endmsg; - } - } - } - - } else if (!record_enabled() || !can_record) { - - /* stop recording */ - - last_recordable_frame = transport_frame + _capture_offset; - - if (_alignment_style == ExistingMaterial) { - last_recordable_frame += _session.worst_output_latency(); - } else { - last_recordable_frame += _roll_delay; - } - } - - last_possibly_recording = possibly_recording; -} - -int -AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input) -{ - uint32_t n; - boost::shared_ptr c = channels.reader(); - ChannelList::iterator chan; - int ret = -1; - nframes_t rec_offset = 0; - nframes_t rec_nframes = 0; - bool nominally_recording; - bool re = record_enabled (); - bool collect_playback = false; - - /* if we've already processed the frames corresponding to this call, - just return. this allows multiple routes that are taking input - from this diskstream to call our ::process() method, but have - this stuff only happen once. more commonly, it allows both - the AudioTrack that is using this AudioDiskstream *and* the Session - to call process() without problems. - */ - - if (_processed) { - return 0; - } - - commit_should_unlock = false; - - if (!_io->active()) { - _processed = true; - return 0; - } - - check_record_status (transport_frame, nframes, can_record); - - nominally_recording = (can_record && re); - - if (nframes == 0) { - _processed = true; - return 0; - } - - /* This lock is held until the end of AudioDiskstream::commit, so these two functions - must always be called as a pair. The only exception is if this function - returns a non-zero value, in which case, ::commit should not be called. - */ - - // If we can't take the state lock return. - if (!state_lock.trylock()) { - return 1; - } - commit_should_unlock = true; - adjust_capture_position = 0; - - for (chan = c->begin(); chan != c->end(); ++chan) { - (*chan)->current_capture_buffer = 0; - (*chan)->current_playback_buffer = 0; - } - - if (nominally_recording || (_session.get_record_enabled() && Config->get_punch_in())) { - OverlapType ot; - - // Safeguard against situations where process() goes haywire when autopunching and last_recordable_frame < first_recordable_frame - if (last_recordable_frame < first_recordable_frame) { - last_recordable_frame = max_frames; - } - - ot = coverage (first_recordable_frame, last_recordable_frame, transport_frame, transport_frame + nframes); - - switch (ot) { - case OverlapNone: - rec_nframes = 0; - break; - - case OverlapInternal: - /* ---------- recrange - |---| transrange - */ - rec_nframes = nframes; - rec_offset = 0; - break; - - case OverlapStart: - /* |--------| recrange - -----| transrange - */ - rec_nframes = transport_frame + nframes - first_recordable_frame; - if (rec_nframes) { - rec_offset = first_recordable_frame - transport_frame; - } - break; - - case OverlapEnd: - /* |--------| recrange - |-------- transrange - */ - rec_nframes = last_recordable_frame - transport_frame; - rec_offset = 0; - break; - - case OverlapExternal: - /* |--------| recrange - -------------- transrange - */ - rec_nframes = last_recordable_frame - first_recordable_frame; - rec_offset = first_recordable_frame - transport_frame; - break; - } - - if (rec_nframes && !was_recording) { - capture_captured = 0; - was_recording = true; - } - } - - - if (can_record && !_last_capture_regions.empty()) { - _last_capture_regions.clear (); - } - - if (nominally_recording || rec_nframes) { - - uint32_t limit = _io->n_inputs ().n_audio(); - - /* one or more ports could already have been removed from _io, but our - channel setup hasn't yet been updated. prevent us from trying to - use channels that correspond to missing ports. note that the - process callback (from which this is called) is always atomic - with respect to port removal/addition. - */ - - for (n = 0, chan = c->begin(); chan != c->end() && n < limit; ++chan, ++n) { - - ChannelInfo* chaninfo (*chan); - - chaninfo->capture_buf->get_write_vector (&chaninfo->capture_vector); - - if (rec_nframes <= chaninfo->capture_vector.len[0]) { - - chaninfo->current_capture_buffer = chaninfo->capture_vector.buf[0]; - - /* note: grab the entire port buffer, but only copy what we were supposed to for recording, and use - rec_offset - */ - - AudioPort* const ap = _io->audio_input(n); - assert(ap); - assert(rec_nframes <= ap->get_audio_buffer().capacity()); - memcpy (chaninfo->current_capture_buffer, ap->get_audio_buffer().data(rec_nframes, offset + rec_offset), sizeof (Sample) * rec_nframes); - - } else { - - nframes_t total = chaninfo->capture_vector.len[0] + chaninfo->capture_vector.len[1]; - - if (rec_nframes > total) { - DiskOverrun (); - goto out; - } - - AudioPort* const ap = _io->audio_input(n); - assert(ap); - - Sample* buf = ap->get_audio_buffer().data(nframes, offset); - nframes_t first = chaninfo->capture_vector.len[0]; - - memcpy (chaninfo->capture_wrap_buffer, buf, sizeof (Sample) * first); - memcpy (chaninfo->capture_vector.buf[0], buf, sizeof (Sample) * first); - memcpy (chaninfo->capture_wrap_buffer+first, buf + first, sizeof (Sample) * (rec_nframes - first)); - memcpy (chaninfo->capture_vector.buf[1], buf + first, sizeof (Sample) * (rec_nframes - first)); - - chaninfo->current_capture_buffer = chaninfo->capture_wrap_buffer; - } - } - - } else { - - if (was_recording) { - finish_capture (rec_monitors_input, c); - } - - } - - if (rec_nframes) { - - /* data will be written to disk */ - - if (rec_nframes == nframes && rec_offset == 0) { - - for (chan = c->begin(); chan != c->end(); ++chan) { - (*chan)->current_playback_buffer = (*chan)->current_capture_buffer; - } - - playback_distance = nframes; - - } else { - - - /* we can't use the capture buffer as the playback buffer, because - we recorded only a part of the current process' cycle data - for capture. - */ - - collect_playback = true; - } - - adjust_capture_position = rec_nframes; - - } else if (nominally_recording) { - - /* can't do actual capture yet - waiting for latency effects to finish before we start*/ - - for (chan = c->begin(); chan != c->end(); ++chan) { - (*chan)->current_playback_buffer = (*chan)->current_capture_buffer; - } - - playback_distance = nframes; - - } else { - - collect_playback = true; - } - - if (collect_playback) { - - /* we're doing playback */ - - nframes_t necessary_samples; - - /* no varispeed playback if we're recording, because the output .... TBD */ - - if (rec_nframes == 0 && _actual_speed != 1.0f) { - necessary_samples = (nframes_t) floor ((nframes * fabs (_actual_speed))) + 1; - } else { - necessary_samples = nframes; - } - - for (chan = c->begin(); chan != c->end(); ++chan) { - (*chan)->playback_buf->get_read_vector (&(*chan)->playback_vector); - } - - n = 0; - - for (chan = c->begin(); chan != c->end(); ++chan, ++n) { - - ChannelInfo* chaninfo (*chan); - - if (necessary_samples <= chaninfo->playback_vector.len[0]) { - - chaninfo->current_playback_buffer = chaninfo->playback_vector.buf[0]; - - } else { - nframes_t total = chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1]; - - if (necessary_samples > total) { - cerr << "underrun for " << _name << endl; - DiskUnderrun (); - goto out; - - } else { - - memcpy ((char *) chaninfo->playback_wrap_buffer, chaninfo->playback_vector.buf[0], - chaninfo->playback_vector.len[0] * sizeof (Sample)); - memcpy (chaninfo->playback_wrap_buffer + chaninfo->playback_vector.len[0], chaninfo->playback_vector.buf[1], - (necessary_samples - chaninfo->playback_vector.len[0]) * sizeof (Sample)); - - chaninfo->current_playback_buffer = chaninfo->playback_wrap_buffer; - } - } - } - - if (rec_nframes == 0 && _actual_speed != 1.0f && _actual_speed != -1.0f) { - - uint64_t phase = last_phase; - int64_t phi_delta; - nframes_t i = 0; - - // Linearly interpolate into the alt buffer - // using 40.24 fixp maths (swh) - - if (phi != target_phi) { - phi_delta = ((int64_t)(target_phi - phi)) / nframes; - } else { - phi_delta = 0; - } - - for (chan = c->begin(); chan != c->end(); ++chan) { - - float fr; - ChannelInfo* chaninfo (*chan); - - i = 0; - phase = last_phase; - - for (nframes_t outsample = 0; outsample < nframes; ++outsample) { - i = phase >> 24; - fr = (phase & 0xFFFFFF) / 16777216.0f; - chaninfo->speed_buffer[outsample] = - chaninfo->current_playback_buffer[i] * (1.0f - fr) + - chaninfo->current_playback_buffer[i+1] * fr; - phase += phi + phi_delta; - } - - chaninfo->current_playback_buffer = chaninfo->speed_buffer; - } - - playback_distance = i; // + 1; - last_phase = (phase & 0xFFFFFF); - - } else { - playback_distance = nframes; - } - - phi = target_phi; - - } - - ret = 0; - - out: - _processed = true; - - if (ret) { - - /* we're exiting with failure, so ::commit will not - be called. unlock the state lock. - */ - - commit_should_unlock = false; - state_lock.unlock(); - } - - return ret; -} - -bool -AudioDiskstream::commit (nframes_t nframes) -{ - bool need_butler = false; - - if (!_io->active()) { - return false; - } - - if (_actual_speed < 0.0) { - playback_sample -= playback_distance; - } else { - playback_sample += playback_distance; - } - - boost::shared_ptr c = channels.reader(); - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - (*chan)->playback_buf->increment_read_ptr (playback_distance); - - if (adjust_capture_position) { - (*chan)->capture_buf->increment_write_ptr (adjust_capture_position); - } - } - - if (adjust_capture_position != 0) { - capture_captured += adjust_capture_position; - adjust_capture_position = 0; - } - - if (_slaved) { - if (_io && _io->active()) { - need_butler = c->front()->playback_buf->write_space() >= c->front()->playback_buf->bufsize() / 2; - } else { - need_butler = false; - } - } else { - if (_io && _io->active()) { - need_butler = c->front()->playback_buf->write_space() >= disk_io_chunk_frames - || c->front()->capture_buf->read_space() >= disk_io_chunk_frames; - } else { - need_butler = c->front()->capture_buf->read_space() >= disk_io_chunk_frames; - } - } - - if (commit_should_unlock) { - state_lock.unlock(); - } - - _processed = false; - - return need_butler; -} - -void -AudioDiskstream::set_pending_overwrite (bool yn) -{ - /* called from audio thread, so we can use the read ptr and playback sample as we wish */ - - pending_overwrite = yn; - - overwrite_frame = playback_sample; - overwrite_offset = channels.reader()->front()->playback_buf->get_read_ptr(); -} - -int -AudioDiskstream::overwrite_existing_buffers () -{ - boost::shared_ptr c = channels.reader(); - Sample* mixdown_buffer; - float* gain_buffer; - int ret = -1; - bool reversed = (_visible_speed * _session.transport_speed()) < 0.0f; - - overwrite_queued = false; - - /* assume all are the same size */ - nframes_t size = c->front()->playback_buf->bufsize(); - - mixdown_buffer = new Sample[size]; - gain_buffer = new float[size]; - - /* reduce size so that we can fill the buffer correctly. */ - size--; - - uint32_t n=0; - nframes_t start; - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++n) { - - start = overwrite_frame; - nframes_t cnt = size; - - /* to fill the buffer without resetting the playback sample, we need to - do it one or two chunks (normally two). - - |----------------------------------------------------------------------| - - ^ - overwrite_offset - |<- second chunk->||<----------------- first chunk ------------------>| - - */ - - nframes_t to_read = size - overwrite_offset; - - if (read ((*chan)->playback_buf->buffer() + overwrite_offset, mixdown_buffer, gain_buffer, start, to_read, *chan, n, reversed)) { - error << string_compose(_("AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"), - _id, size, playback_sample) << endmsg; - goto out; - } - - if (cnt > to_read) { - - cnt -= to_read; - - if (read ((*chan)->playback_buf->buffer(), mixdown_buffer, gain_buffer, - start, cnt, *chan, n, reversed)) { - error << string_compose(_("AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"), - _id, size, playback_sample) << endmsg; - goto out; - } - } - } - - ret = 0; - - out: - pending_overwrite = false; - delete [] gain_buffer; - delete [] mixdown_buffer; - return ret; -} - -int -AudioDiskstream::seek (nframes_t frame, bool complete_refill) -{ - uint32_t n; - int ret = -1; - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - - Glib::Mutex::Lock lm (state_lock); - - for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) { - (*chan)->playback_buf->reset (); - (*chan)->capture_buf->reset (); - } - - /* can't rec-enable in destructive mode if transport is before start */ - - if (destructive() && record_enabled() && frame < _session.current_start_frame()) { - disengage_record_enable (); - } - - playback_sample = frame; - file_frame = frame; - - if (complete_refill) { - while ((ret = do_refill_with_alloc ()) > 0) ; - } else { - ret = do_refill_with_alloc (); - } - - return ret; -} - -int -AudioDiskstream::can_internal_playback_seek (nframes_t distance) -{ - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - - for (chan = c->begin(); chan != c->end(); ++chan) { - if ((*chan)->playback_buf->read_space() < distance) { - return false; - } - } - return true; -} - -int -AudioDiskstream::internal_playback_seek (nframes_t distance) -{ - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - - for (chan = c->begin(); chan != c->end(); ++chan) { - (*chan)->playback_buf->increment_read_ptr (distance); - } - - first_recordable_frame += distance; - playback_sample += distance; - - return 0; -} - -int -AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, nframes_t& start, nframes_t cnt, - ChannelInfo* channel_info, int channel, bool reversed) -{ - nframes_t this_read = 0; - bool reloop = false; - nframes_t loop_end = 0; - nframes_t loop_start = 0; - nframes_t loop_length = 0; - nframes_t offset = 0; - Location *loc = 0; - - /* XXX we don't currently play loops in reverse. not sure why */ - - if (!reversed) { - - /* Make the use of a Location atomic for this read operation. - - Note: Locations don't get deleted, so all we care about - when I say "atomic" is that we are always pointing to - the same one and using a start/length values obtained - just once. - */ - - if ((loc = loop_location) != 0) { - loop_start = loc->start(); - loop_end = loc->end(); - loop_length = loop_end - loop_start; - } - - /* if we are looping, ensure that the first frame we read is at the correct - position within the loop. - */ - - if (loc && start >= loop_end) { - //cerr << "start adjusted from " << start; - start = loop_start + ((start - loop_start) % loop_length); - //cerr << "to " << start << endl; - } - - //cerr << "start is " << start << " loopstart: " << loop_start << " loopend: " << loop_end << endl; - } - - while (cnt) { - - if (reversed) { - start -= cnt; - } - - /* take any loop into account. we can't read past the end of the loop. */ - - if (loc && (loop_end - start < cnt)) { - this_read = loop_end - start; - //cerr << "reloop true: thisread: " << this_read << " cnt: " << cnt << endl; - reloop = true; - } else { - reloop = false; - this_read = cnt; - } - - if (this_read == 0) { - break; - } - - this_read = min(cnt,this_read); - - if (audio_playlist()->read (buf+offset, mixdown_buffer, gain_buffer, start, this_read, channel) != this_read) { - error << string_compose(_("AudioDiskstream %1: cannot read %2 from playlist at frame %3"), _id, this_read, - start) << endmsg; - return -1; - } - - _read_data_count = _playlist->read_data_count(); - - if (reversed) { - - swap_by_ptr (buf, buf + this_read - 1); - - } else { - - /* if we read to the end of the loop, go back to the beginning */ - - if (reloop) { - start = loop_start; - } else { - start += this_read; - } - } - - cnt -= this_read; - offset += this_read; - } - - return 0; -} - -int -AudioDiskstream::do_refill_with_alloc () -{ - Sample* mix_buf = new Sample[disk_io_chunk_frames]; - float* gain_buf = new float[disk_io_chunk_frames]; - - int ret = _do_refill(mix_buf, gain_buf); - - delete [] mix_buf; - delete [] gain_buf; - - return ret; -} - -int -AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer) -{ - int32_t ret = 0; - nframes_t to_read; - RingBufferNPT::rw_vector vector; - bool reversed = (_visible_speed * _session.transport_speed()) < 0.0f; - nframes_t total_space; - nframes_t zero_fill; - uint32_t chan_n; - ChannelList::iterator i; - boost::shared_ptr c = channels.reader(); - nframes_t ts; - - if (c->empty()) { - return 0; - } - - assert(mixdown_buffer); - assert(gain_buffer); - - vector.buf[0] = 0; - vector.len[0] = 0; - vector.buf[1] = 0; - vector.len[1] = 0; - - c->front()->playback_buf->get_write_vector (&vector); - - if ((total_space = vector.len[0] + vector.len[1]) == 0) { - return 0; - } - - /* if there are 2+ chunks of disk i/o possible for - this track, let the caller know so that it can arrange - for us to be called again, ASAP. - */ - - if (total_space >= (_slaved?3:2) * disk_io_chunk_frames) { - ret = 1; - } - - /* if we're running close to normal speed and there isn't enough - space to do disk_io_chunk_frames of I/O, then don't bother. - - at higher speeds, just do it because the sync between butler - and audio thread may not be good enough. - */ - - if ((total_space < disk_io_chunk_frames) && fabs (_actual_speed) < 2.0f) { - return 0; - } - - /* when slaved, don't try to get too close to the read pointer. this - leaves space for the buffer reversal to have something useful to - work with. - */ - - if (_slaved && total_space < (c->front()->playback_buf->bufsize() / 2)) { - return 0; - } - - /* never do more than disk_io_chunk_frames worth of disk input per call (limit doesn't apply for memset) */ - - total_space = min (disk_io_chunk_frames, total_space); - - if (reversed) { - - if (file_frame == 0) { - - /* at start: nothing to do but fill with silence */ - - for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) { - - ChannelInfo* chan (*i); - chan->playback_buf->get_write_vector (&vector); - memset (vector.buf[0], 0, sizeof(Sample) * vector.len[0]); - if (vector.len[1]) { - memset (vector.buf[1], 0, sizeof(Sample) * vector.len[1]); - } - chan->playback_buf->increment_write_ptr (vector.len[0] + vector.len[1]); - } - return 0; - } - - if (file_frame < total_space) { - - /* too close to the start: read what we can, - and then zero fill the rest - */ - - zero_fill = total_space - file_frame; - total_space = file_frame; - file_frame = 0; - - } else { - - zero_fill = 0; - } - - } else { - - if (file_frame == max_frames) { - - /* at end: nothing to do but fill with silence */ - - for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) { - - ChannelInfo* chan (*i); - chan->playback_buf->get_write_vector (&vector); - memset (vector.buf[0], 0, sizeof(Sample) * vector.len[0]); - if (vector.len[1]) { - memset (vector.buf[1], 0, sizeof(Sample) * vector.len[1]); - } - chan->playback_buf->increment_write_ptr (vector.len[0] + vector.len[1]); - } - return 0; - } - - if (file_frame > max_frames - total_space) { - - /* to close to the end: read what we can, and zero fill the rest */ - - zero_fill = total_space - (max_frames - file_frame); - total_space = max_frames - file_frame; - - } else { - zero_fill = 0; - } - } - - nframes_t file_frame_tmp = 0; - - for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) { - - ChannelInfo* chan (*i); - Sample* buf1; - Sample* buf2; - nframes_t len1, len2; - - chan->playback_buf->get_write_vector (&vector); - - if (vector.len[0] > disk_io_chunk_frames) { - - /* we're not going to fill the first chunk, so certainly do not bother with the - other part. it won't be connected with the part we do fill, as in: - - .... => writable space - ++++ => readable space - ^^^^ => 1 x disk_io_chunk_frames that would be filled - - |......|+++++++++++++|...............................| - buf1 buf0 - ^^^^^^^^^^^^^^^ - - - So, just pretend that the buf1 part isn't there. - - */ - - vector.buf[1] = 0; - vector.len[1] = 0; - - } - - ts = total_space; - file_frame_tmp = file_frame; - - buf1 = vector.buf[0]; - len1 = vector.len[0]; - buf2 = vector.buf[1]; - len2 = vector.len[1]; - - to_read = min (ts, len1); - to_read = min (to_read, disk_io_chunk_frames); - - if (to_read) { - - if (read (buf1, mixdown_buffer, gain_buffer, file_frame_tmp, to_read, chan, chan_n, reversed)) { - ret = -1; - goto out; - } - - chan->playback_buf->increment_write_ptr (to_read); - ts -= to_read; - } - - to_read = min (ts, len2); - - if (to_read) { - - /* we read all of vector.len[0], but it wasn't an entire disk_io_chunk_frames of data, - so read some or all of vector.len[1] as well. - */ - - if (read (buf2, mixdown_buffer, gain_buffer, file_frame_tmp, to_read, chan, chan_n, reversed)) { - ret = -1; - goto out; - } - - chan->playback_buf->increment_write_ptr (to_read); - } - - if (zero_fill) { - /* do something */ - } - - } - - file_frame = file_frame_tmp; - - out: - - return ret; -} - -/** Flush pending data to disk. - * - * Important note: this function will write *AT MOST* disk_io_chunk_frames - * of data to disk. it will never write more than that. If it writes that - * much and there is more than that waiting to be written, it will return 1, - * otherwise 0 on success or -1 on failure. - * - * If there is less than disk_io_chunk_frames to be written, no data will be - * written at all unless @a force_flush is true. - */ -int -AudioDiskstream::do_flush (Session::RunContext context, bool force_flush) -{ - uint32_t to_write; - int32_t ret = 0; - RingBufferNPT::rw_vector vector; - RingBufferNPT::rw_vector transvec; - nframes_t total; - - _write_data_count = 0; - - transvec.buf[0] = 0; - transvec.buf[1] = 0; - vector.buf[0] = 0; - vector.buf[1] = 0; - - boost::shared_ptr c = channels.reader(); - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - (*chan)->capture_buf->get_read_vector (&vector); - - total = vector.len[0] + vector.len[1]; - - if (total == 0 || (total < disk_io_chunk_frames && !force_flush && was_recording)) { - goto out; - } - - /* if there are 2+ chunks of disk i/o possible for - this track, let the caller know so that it can arrange - for us to be called again, ASAP. - - if we are forcing a flush, then if there is* any* extra - work, let the caller know. - - if we are no longer recording and there is any extra work, - let the caller know too. - */ - - if (total >= 2 * disk_io_chunk_frames || ((force_flush || !was_recording) && total > disk_io_chunk_frames)) { - ret = 1; - } - - to_write = min (disk_io_chunk_frames, (nframes_t) vector.len[0]); - - // check the transition buffer when recording destructive - // important that we get this after the capture buf - - if (destructive()) { - (*chan)->capture_transition_buf->get_read_vector(&transvec); - size_t transcount = transvec.len[0] + transvec.len[1]; - bool have_start = false; - size_t ti; - - for (ti=0; ti < transcount; ++ti) { - CaptureTransition & captrans = (ti < transvec.len[0]) ? transvec.buf[0][ti] : transvec.buf[1][ti-transvec.len[0]]; - - if (captrans.type == CaptureStart) { - // by definition, the first data we got above represents the given capture pos - - (*chan)->write_source->mark_capture_start (captrans.capture_val); - (*chan)->curr_capture_cnt = 0; - - have_start = true; - } - else if (captrans.type == CaptureEnd) { - - // capture end, the capture_val represents total frames in capture - - if (captrans.capture_val <= (*chan)->curr_capture_cnt + to_write) { - - // shorten to make the write a perfect fit - uint32_t nto_write = (captrans.capture_val - (*chan)->curr_capture_cnt); - - if (nto_write < to_write) { - ret = 1; // should we? - } - to_write = nto_write; - - (*chan)->write_source->mark_capture_end (); - - // increment past this transition, but go no further - ++ti; - break; - } - else { - // actually ends just beyond this chunk, so force more work - ret = 1; - break; - } - } - } - - if (ti > 0) { - (*chan)->capture_transition_buf->increment_read_ptr(ti); - } - } - - if ((!(*chan)->write_source) || (*chan)->write_source->write (vector.buf[0], to_write) != to_write) { - error << string_compose(_("AudioDiskstream %1: cannot write to disk"), _id) << endmsg; - return -1; - } - - (*chan)->capture_buf->increment_read_ptr (to_write); - (*chan)->curr_capture_cnt += to_write; - - if ((to_write == vector.len[0]) && (total > to_write) && (to_write < disk_io_chunk_frames) && !destructive()) { - - /* we wrote all of vector.len[0] but it wasn't an entire - disk_io_chunk_frames of data, so arrange for some part - of vector.len[1] to be flushed to disk as well. - */ - - to_write = min ((nframes_t)(disk_io_chunk_frames - to_write), (nframes_t) vector.len[1]); - - if ((*chan)->write_source->write (vector.buf[1], to_write) != to_write) { - error << string_compose(_("AudioDiskstream %1: cannot write to disk"), _id) << endmsg; - return -1; - } - - _write_data_count += (*chan)->write_source->write_data_count(); - - (*chan)->capture_buf->increment_read_ptr (to_write); - (*chan)->curr_capture_cnt += to_write; - } - } - - out: - return ret; -} - -void -AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_capture) -{ - uint32_t buffer_position; - bool more_work = true; - int err = 0; - boost::shared_ptr region; - nframes_t total_capture; - SourceList srcs; - SourceList::iterator src; - ChannelList::iterator chan; - vector::iterator ci; - boost::shared_ptr c = channels.reader(); - uint32_t n = 0; - bool mark_write_completed = false; - - finish_capture (true, c); - - /* butler is already stopped, but there may be work to do - to flush remaining data to disk. - */ - - while (more_work && !err) { - switch (do_flush (Session::TransportContext, true)) { - case 0: - more_work = false; - break; - case 1: - break; - case -1: - error << string_compose(_("AudioDiskstream \"%1\": cannot flush captured data to disk!"), _name) << endmsg; - err++; - } - } - - /* XXX is there anything we can do if err != 0 ? */ - Glib::Mutex::Lock lm (capture_info_lock); - - if (capture_info.empty()) { - return; - } - - if (abort_capture) { - - if (destructive()) { - goto outout; - } - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - if ((*chan)->write_source) { - - (*chan)->write_source->mark_for_remove (); - (*chan)->write_source->drop_references (); - (*chan)->write_source.reset (); - } - - /* new source set up in "out" below */ - } - - goto out; - } - - for (total_capture = 0, ci = capture_info.begin(); ci != capture_info.end(); ++ci) { - total_capture += (*ci)->frames; - } - - /* figure out the name for this take */ - - for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) { - - boost::shared_ptr s = (*chan)->write_source; - - if (s) { - srcs.push_back (s); - s->update_header (capture_info.front()->start, when, twhen); - s->set_captured_for (_name); - s->mark_immutable (); - if (Config->get_auto_analyse_audio()) { - Analyser::queue_source_for_analysis (s, true); - } - } - } - - /* destructive tracks have a single, never changing region */ - - if (destructive()) { - - /* send a signal that any UI can pick up to do the right thing. there is - a small problem here in that a UI may need the peak data to be ready - for the data that was recorded and this isn't interlocked with that - process. this problem is deferred to the UI. - */ - - _playlist->Modified(); - - } else { - - string whole_file_region_name; - whole_file_region_name = region_name_from_path (c->front()->write_source->name(), true); - - /* Register a new region with the Session that - describes the entire source. Do this first - so that any sub-regions will obviously be - children of this one (later!) - */ - - try { - boost::shared_ptr rx (RegionFactory::create (srcs, c->front()->write_source->last_capture_start_frame(), total_capture, - whole_file_region_name, - 0, AudioRegion::Flag (AudioRegion::DefaultFlags|AudioRegion::Automatic|AudioRegion::WholeFile))); - - region = boost::dynamic_pointer_cast (rx); - region->special_set_position (capture_info.front()->start); - } - - - catch (failed_constructor& err) { - error << string_compose(_("%1: could not create region for complete audio file"), _name) << endmsg; - /* XXX what now? */ - } - - _last_capture_regions.push_back (region); - - // cerr << _name << ": there are " << capture_info.size() << " capture_info records\n"; - - XMLNode &before = _playlist->get_state(); - _playlist->freeze (); - - for (buffer_position = c->front()->write_source->last_capture_start_frame(), ci = capture_info.begin(); ci != capture_info.end(); ++ci) { - - string region_name; - - _session.region_name (region_name, whole_file_region_name, false); - - // cerr << _name << ": based on ci of " << (*ci)->start << " for " << (*ci)->frames << " add region " << region_name << endl; - - try { - boost::shared_ptr rx (RegionFactory::create (srcs, buffer_position, (*ci)->frames, region_name)); - region = boost::dynamic_pointer_cast (rx); - } - - catch (failed_constructor& err) { - error << _("AudioDiskstream: could not create region for captured audio!") << endmsg; - continue; /* XXX is this OK? */ - } - - region->GoingAway.connect (bind (mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr(region))); - - _last_capture_regions.push_back (region); - - i_am_the_modifier++; - _playlist->add_region (region, (*ci)->start); - i_am_the_modifier--; - - buffer_position += (*ci)->frames; - } - - _playlist->thaw (); - XMLNode &after = _playlist->get_state(); - _session.add_command (new MementoCommand(*_playlist, &before, &after)); - } - - mark_write_completed = true; - - out: - reset_write_sources (mark_write_completed); - - outout: - - for (ci = capture_info.begin(); ci != capture_info.end(); ++ci) { - delete *ci; - } - - capture_info.clear (); - capture_start_frame = 0; -} - -void -AudioDiskstream::transport_looped (nframes_t transport_frame) -{ - if (was_recording) { - // all we need to do is finish this capture, with modified capture length - boost::shared_ptr c = channels.reader(); - - // adjust the capture length knowing that the data will be recorded to disk - // only necessary after the first loop where we're recording - if (capture_info.size() == 0) { - capture_captured += _capture_offset; - - if (_alignment_style == ExistingMaterial) { - capture_captured += _session.worst_output_latency(); - } else { - capture_captured += _roll_delay; - } - } - - finish_capture (true, c); - - // the next region will start recording via the normal mechanism - // we'll set the start position to the current transport pos - // no latency adjustment or capture offset needs to be made, as that already happened the first time - capture_start_frame = transport_frame; - first_recordable_frame = transport_frame; // mild lie - last_recordable_frame = max_frames; - was_recording = true; - - if (recordable() && destructive()) { - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - RingBufferNPT::rw_vector transvec; - (*chan)->capture_transition_buf->get_write_vector(&transvec); - - if (transvec.len[0] > 0) { - transvec.buf[0]->type = CaptureStart; - transvec.buf[0]->capture_val = capture_start_frame; - (*chan)->capture_transition_buf->increment_write_ptr(1); - } - else { - // bad! - fatal << X_("programming error: capture_transition_buf is full on rec loop! inconceivable!") - << endmsg; - } - } - } - - } -} - -void -AudioDiskstream::finish_capture (bool rec_monitors_input, boost::shared_ptr c) -{ - was_recording = false; - - if (capture_captured == 0) { - return; - } - - if (recordable() && destructive()) { - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - RingBufferNPT::rw_vector transvec; - (*chan)->capture_transition_buf->get_write_vector(&transvec); - - if (transvec.len[0] > 0) { - transvec.buf[0]->type = CaptureEnd; - transvec.buf[0]->capture_val = capture_captured; - (*chan)->capture_transition_buf->increment_write_ptr(1); - } - else { - // bad! - fatal << string_compose (_("programmer error: %1"), X_("capture_transition_buf is full when stopping record! inconceivable!")) << endmsg; - } - } - } - - - CaptureInfo* ci = new CaptureInfo; - - ci->start = capture_start_frame; - ci->frames = capture_captured; - - /* XXX theoretical race condition here. Need atomic exchange ? - However, the circumstances when this is called right - now (either on record-disable or transport_stopped) - mean that no actual race exists. I think ... - We now have a capture_info_lock, but it is only to be used - to synchronize in the transport_stop and the capture info - accessors, so that invalidation will not occur (both non-realtime). - */ - - // cerr << "Finish capture, add new CI, " << ci->start << '+' << ci->frames << endl; - - capture_info.push_back (ci); - capture_captured = 0; - - /* now we've finished a capture, reset first_recordable_frame for next time */ - first_recordable_frame = max_frames; -} - -void -AudioDiskstream::set_record_enabled (bool yn) -{ - if (!recordable() || !_session.record_enabling_legal() || _io->n_inputs().n_audio() == 0) { - return; - } - - /* can't rec-enable in destructive mode if transport is before start */ - - if (destructive() && yn && _session.transport_frame() < _session.current_start_frame()) { - return; - } - - if (yn && channels.reader()->front()->source == 0) { - - /* pick up connections not initiated *from* the IO object - we're associated with. - */ - - get_input_sources (); - } - - /* yes, i know that this not proof against race conditions, but its - good enough. i think. - */ - - if (record_enabled() != yn) { - if (yn) { - engage_record_enable (); - } else { - disengage_record_enable (); - } - } -} - -void -AudioDiskstream::engage_record_enable () -{ - bool rolling = _session.transport_speed() != 0.0f; - boost::shared_ptr c = channels.reader(); - - g_atomic_int_set (&_record_enabled, 1); - capturing_sources.clear (); - - if (Config->get_monitoring_model() == HardwareMonitoring) { - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - if ((*chan)->source) { - (*chan)->source->ensure_monitor_input (!(Config->get_auto_input() && rolling)); - } - capturing_sources.push_back ((*chan)->write_source); - (*chan)->write_source->mark_streaming_write_started (); - } - - } else { - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - capturing_sources.push_back ((*chan)->write_source); - (*chan)->write_source->mark_streaming_write_started (); - } - } - - RecordEnableChanged (); /* EMIT SIGNAL */ -} - -void -AudioDiskstream::disengage_record_enable () -{ - g_atomic_int_set (&_record_enabled, 0); - boost::shared_ptr c = channels.reader(); - if (Config->get_monitoring_model() == HardwareMonitoring) { - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - if ((*chan)->source) { - (*chan)->source->ensure_monitor_input (false); - } - } - } - capturing_sources.clear (); - RecordEnableChanged (); /* EMIT SIGNAL */ -} - -XMLNode& -AudioDiskstream::get_state () -{ - XMLNode* node = new XMLNode ("AudioDiskstream"); - char buf[64] = ""; - LocaleGuard lg (X_("POSIX")); - boost::shared_ptr c = channels.reader(); - - node->add_property ("flags", enum_2_string (_flags)); - - snprintf (buf, sizeof(buf), "%zd", c->size()); - node->add_property ("channels", buf); - - node->add_property ("playlist", _playlist->name()); - - snprintf (buf, sizeof(buf), "%.12g", _visible_speed); - node->add_property ("speed", buf); - - node->add_property("name", _name); - id().print (buf, sizeof (buf)); - node->add_property("id", buf); - - if (!capturing_sources.empty() && _session.get_record_enabled()) { - - XMLNode* cs_child = new XMLNode (X_("CapturingSources")); - XMLNode* cs_grandchild; - - for (vector >::iterator i = capturing_sources.begin(); i != capturing_sources.end(); ++i) { - cs_grandchild = new XMLNode (X_("file")); - cs_grandchild->add_property (X_("path"), (*i)->path()); - cs_child->add_child_nocopy (*cs_grandchild); - } - - /* store the location where capture will start */ - - Location* pi; - - if (Config->get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) { - snprintf (buf, sizeof (buf), "%" PRIu32, pi->start()); - } else { - snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame()); - } - - cs_child->add_property (X_("at"), buf); - node->add_child_nocopy (*cs_child); - } - - if (_extra_xml) { - node->add_child_copy (*_extra_xml); - } - - return* node; -} - -int -AudioDiskstream::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - uint32_t nchans = 1; - XMLNode* capture_pending_node = 0; - LocaleGuard lg (X_("POSIX")); - - in_set_state = true; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == IO::state_node_name) { - deprecated_io_node = new XMLNode (**niter); - } - - if ((*niter)->name() == X_("CapturingSources")) { - capture_pending_node = *niter; - } - } - - /* prevent write sources from being created */ - - in_set_state = true; - - if ((prop = node.property ("name")) != 0) { - _name = prop->value(); - } - - if (deprecated_io_node) { - if ((prop = deprecated_io_node->property ("id")) != 0) { - _id = prop->value (); - } - } else { - if ((prop = node.property ("id")) != 0) { - _id = prop->value (); - } - } - - if ((prop = node.property ("flags")) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - } - - if ((prop = node.property ("channels")) != 0) { - nchans = atoi (prop->value().c_str()); - } - - // create necessary extra channels - // we are always constructed with one and we always need one - - _n_channels.set(DataType::AUDIO, channels.reader()->size()); - - if (nchans > _n_channels.n_audio()) { - - add_channel (nchans - _n_channels.n_audio()); - IO::PortCountChanged(_n_channels); - - } else if (nchans < _n_channels.n_audio()) { - - remove_channel (_n_channels.n_audio() - nchans); - } - - if ((prop = node.property ("playlist")) == 0) { - return -1; - } - - { - bool had_playlist = (_playlist != 0); - - if (find_and_use_playlist (prop->value())) { - return -1; - } - - if (!had_playlist) { - _playlist->set_orig_diskstream_id (_id); - } - - if (!destructive() && capture_pending_node) { - /* destructive streams have one and only one source per channel, - and so they never end up in pending capture in any useful - sense. - */ - use_pending_capture_data (*capture_pending_node); - } - - } - - if ((prop = node.property ("speed")) != 0) { - double sp = atof (prop->value().c_str()); - - if (realtime_set_speed (sp, false)) { - non_realtime_set_speed (); - } - } - - in_set_state = false; - - /* make sure this is clear before we do anything else */ - - capturing_sources.clear (); - - /* write sources are handled when we handle the input set - up of the IO that owns this DS (::non_realtime_input_change()) - */ - - return 0; -} - -int -AudioDiskstream::use_new_write_source (uint32_t n) -{ - boost::shared_ptr c = channels.reader(); - - if (!recordable()) { - return 1; - } - - if (n >= c->size()) { - error << string_compose (_("AudioDiskstream: channel %1 out of range"), n) << endmsg; - return -1; - } - - ChannelInfo* chan = (*c)[n]; - - if (chan->write_source) { - chan->write_source->done_with_peakfile_writes (); - chan->write_source->set_allow_remove_if_empty (true); - chan->write_source.reset (); - } - - try { - if ((chan->write_source = _session.create_audio_source_for_session (*this, n, destructive())) == 0) { - throw failed_constructor(); - } - } - - catch (failed_constructor &err) { - error << string_compose (_("%1:%2 new capture file not initialized correctly"), _name, n) << endmsg; - chan->write_source.reset (); - return -1; - } - - /* do not remove destructive files even if they are empty */ - - chan->write_source->set_allow_remove_if_empty (!destructive()); - - return 0; -} - -void -AudioDiskstream::reset_write_sources (bool mark_write_complete, bool force) -{ - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - uint32_t n; - - if (!recordable()) { - return; - } - - capturing_sources.clear (); - - for (chan = c->begin(), n = 0; chan != c->end(); ++chan, ++n) { - if (!destructive()) { - - if ((*chan)->write_source && mark_write_complete) { - (*chan)->write_source->mark_streaming_write_completed (); - } - use_new_write_source (n); - - if (record_enabled()) { - capturing_sources.push_back ((*chan)->write_source); - } - - } else { - if ((*chan)->write_source == 0) { - use_new_write_source (n); - } - } - } - - if (destructive()) { - - /* we now have all our write sources set up, so create the - playlist's single region. - */ - - if (_playlist->empty()) { - setup_destructive_playlist (); - } - } -} - -int -AudioDiskstream::rename_write_sources () -{ - ChannelList::iterator chan; - boost::shared_ptr c = channels.reader(); - uint32_t n; - - for (chan = c->begin(), n = 0; chan != c->end(); ++chan, ++n) { - if ((*chan)->write_source != 0) { - (*chan)->write_source->set_source_name (_name, destructive()); - /* XXX what to do if one of them fails ? */ - } - } - - return 0; -} - -void -AudioDiskstream::set_block_size (nframes_t nframes) -{ - if (_session.get_block_size() > speed_buffer_size) { - speed_buffer_size = _session.get_block_size(); - boost::shared_ptr c = channels.reader(); - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - if ((*chan)->speed_buffer) delete [] (*chan)->speed_buffer; - (*chan)->speed_buffer = new Sample[speed_buffer_size]; - } - } - allocate_temporary_buffers (); -} - -void -AudioDiskstream::allocate_temporary_buffers () -{ - /* make sure the wrap buffer is at least large enough to deal - with the speeds up to 1.2, to allow for micro-variation - when slaving to MTC, SMPTE etc. - */ - - double sp = max (fabsf (_actual_speed), 1.2f); - nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() * sp) + 1; - - if (required_wrap_size > wrap_buffer_size) { - - boost::shared_ptr c = channels.reader(); - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - if ((*chan)->playback_wrap_buffer) delete [] (*chan)->playback_wrap_buffer; - (*chan)->playback_wrap_buffer = new Sample[required_wrap_size]; - if ((*chan)->capture_wrap_buffer) delete [] (*chan)->capture_wrap_buffer; - (*chan)->capture_wrap_buffer = new Sample[required_wrap_size]; - } - - wrap_buffer_size = required_wrap_size; - } -} - -void -AudioDiskstream::monitor_input (bool yn) -{ - boost::shared_ptr c = channels.reader(); - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - - if ((*chan)->source) { - (*chan)->source->ensure_monitor_input (yn); - } - } -} - -void -AudioDiskstream::set_align_style_from_io () -{ - bool have_physical = false; - - if (_io == 0) { - return; - } - - get_input_sources (); - - boost::shared_ptr c = channels.reader(); - - for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) { - if ((*chan)->source && (*chan)->source->flags() & JackPortIsPhysical) { - have_physical = true; - break; - } - } - - if (have_physical) { - set_align_style (ExistingMaterial); - } else { - set_align_style (CaptureTime); - } -} - -int -AudioDiskstream::add_channel_to (boost::shared_ptr c, uint32_t how_many) -{ - while (how_many--) { - c->push_back (new ChannelInfo(_session.audio_diskstream_buffer_size(), speed_buffer_size, wrap_buffer_size)); - } - - _n_channels.set(DataType::AUDIO, c->size()); - - return 0; -} - -int -AudioDiskstream::add_channel (uint32_t how_many) -{ - RCUWriter writer (channels); - boost::shared_ptr c = writer.get_copy(); - - return add_channel_to (c, how_many); -} - -int -AudioDiskstream::remove_channel_from (boost::shared_ptr c, uint32_t how_many) -{ - while (how_many-- && !c->empty()) { - delete c->back(); - c->pop_back(); - } - - _n_channels.set(DataType::AUDIO, c->size()); - - return 0; -} - -int -AudioDiskstream::remove_channel (uint32_t how_many) -{ - RCUWriter writer (channels); - boost::shared_ptr c = writer.get_copy(); - - return remove_channel_from (c, how_many); -} - -float -AudioDiskstream::playback_buffer_load () const -{ - boost::shared_ptr c = channels.reader(); - - return (float) ((double) c->front()->playback_buf->read_space()/ - (double) c->front()->playback_buf->bufsize()); -} - -float -AudioDiskstream::capture_buffer_load () const -{ - boost::shared_ptr c = channels.reader(); - - return (float) ((double) c->front()->capture_buf->write_space()/ - (double) c->front()->capture_buf->bufsize()); -} - -int -AudioDiskstream::use_pending_capture_data (XMLNode& node) -{ - const XMLProperty* prop; - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - boost::shared_ptr fs; - boost::shared_ptr first_fs; - SourceList pending_sources; - nframes_t position; - - if ((prop = node.property (X_("at"))) == 0) { - return -1; - } - - if (sscanf (prop->value().c_str(), "%" PRIu32, &position) != 1) { - return -1; - } - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == X_("file")) { - - if ((prop = (*niter)->property (X_("path"))) == 0) { - continue; - } - - // This protects sessions from errant CapturingSources in stored sessions - struct stat sbuf; - if (stat (prop->value().c_str(), &sbuf)) { - continue; - } - - try { - fs = boost::dynamic_pointer_cast ( - SourceFactory::createWritable (DataType::AUDIO, _session, prop->value(), false, _session.frame_rate())); - } - - catch (failed_constructor& err) { - error << string_compose (_("%1: cannot restore pending capture source file %2"), - _name, prop->value()) - << endmsg; - return -1; - } - - pending_sources.push_back (fs); - - if (first_fs == 0) { - first_fs = fs; - } - - fs->set_captured_for (_name); - } - } - - if (pending_sources.size() == 0) { - /* nothing can be done */ - return 1; - } - - if (pending_sources.size() != _n_channels.n_audio()) { - error << string_compose (_("%1: incorrect number of pending sources listed - ignoring them all"), _name) - << endmsg; - return -1; - } - - boost::shared_ptr region; - - try { - region = boost::dynamic_pointer_cast (RegionFactory::create (pending_sources, 0, first_fs->length(), - region_name_from_path (first_fs->name(), true), - 0, AudioRegion::Flag (AudioRegion::DefaultFlags|AudioRegion::Automatic|AudioRegion::WholeFile))); - region->special_set_position (0); - } - - catch (failed_constructor& err) { - error << string_compose (_("%1: cannot create whole-file region from pending capture sources"), - _name) - << endmsg; - - return -1; - } - - try { - region = boost::dynamic_pointer_cast (RegionFactory::create (pending_sources, 0, first_fs->length(), region_name_from_path (first_fs->name(), true))); - } - - catch (failed_constructor& err) { - error << string_compose (_("%1: cannot create region from pending capture sources"), - _name) - << endmsg; - - return -1; - } - - _playlist->add_region (region, position); - - return 0; -} - -int -AudioDiskstream::set_destructive (bool yn) -{ - bool bounce_ignored; - - if (yn != destructive()) { - - if (yn) { - /* requestor should already have checked this and - bounced if necessary and desired - */ - if (!can_become_destructive (bounce_ignored)) { - return -1; - } - _flags = Flag (_flags | Destructive); - use_destructive_playlist (); - } else { - _flags = Flag (_flags & ~Destructive); - reset_write_sources (true, true); - } - } - - return 0; -} - -bool -AudioDiskstream::can_become_destructive (bool& requires_bounce) const -{ - if (!_playlist) { - requires_bounce = false; - return false; - } - - /* is there only one region ? */ - - if (_playlist->n_regions() != 1) { - requires_bounce = true; - return false; - } - - boost::shared_ptr first = _playlist->find_next_region (_session.current_start_frame(), Start, 1); - assert (first); - - /* do the source(s) for the region cover the session start position ? */ - - if (first->position() != _session.current_start_frame()) { - if (first->start() > _session.current_start_frame()) { - requires_bounce = true; - return false; - } - } - - /* is the source used by only 1 playlist ? */ - - boost::shared_ptr afirst = boost::dynamic_pointer_cast (first); - - assert (afirst); - - if (afirst->source()->used() > 1) { - requires_bounce = true; - return false; - } - - requires_bounce = false; - return true; -} - -AudioDiskstream::ChannelInfo::ChannelInfo (nframes_t bufsize, nframes_t speed_size, nframes_t wrap_size) -{ - peak_power = 0.0f; - source = 0; - current_capture_buffer = 0; - current_playback_buffer = 0; - curr_capture_cnt = 0; - - speed_buffer = new Sample[speed_size]; - playback_wrap_buffer = new Sample[wrap_size]; - capture_wrap_buffer = new Sample[wrap_size]; - - playback_buf = new RingBufferNPT (bufsize); - capture_buf = new RingBufferNPT (bufsize); - capture_transition_buf = new RingBufferNPT (256); - - /* touch the ringbuffer buffers, which will cause - them to be mapped into locked physical RAM if - we're running with mlockall(). this doesn't do - much if we're not. - */ - - memset (playback_buf->buffer(), 0, sizeof (Sample) * playback_buf->bufsize()); - memset (capture_buf->buffer(), 0, sizeof (Sample) * capture_buf->bufsize()); - memset (capture_transition_buf->buffer(), 0, sizeof (CaptureTransition) * capture_transition_buf->bufsize()); -} - -AudioDiskstream::ChannelInfo::~ChannelInfo () -{ - if (write_source) { - write_source.reset (); - } - - if (speed_buffer) { - delete [] speed_buffer; - speed_buffer = 0; - } - - if (playback_wrap_buffer) { - delete [] playback_wrap_buffer; - playback_wrap_buffer = 0; - } - - if (capture_wrap_buffer) { - delete [] capture_wrap_buffer; - capture_wrap_buffer = 0; - } - - if (playback_buf) { - delete playback_buf; - playback_buf = 0; - } - - if (capture_buf) { - delete capture_buf; - capture_buf = 0; - } - - if (capture_transition_buf) { - delete capture_transition_buf; - capture_transition_buf = 0; - } -} diff --git a/libs/ardour/audio_library.cc b/libs/ardour/audio_library.cc deleted file mode 100644 index a35846ab29..0000000000 --- a/libs/ardour/audio_library.cc +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 2003-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include - -#include - -#include - -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; - -namespace { - const char* const sfdb_file_name = "sfdb"; -} // anonymous namespace - -static const char* TAG = "http://ardour.org/ontology/Tag"; - -AudioLibrary::AudioLibrary () -{ - sys::path sfdb_file_path(user_config_directory ()); - - sfdb_file_path /= sfdb_file_name; - - src = Glib::filename_to_uri (sfdb_file_path.to_string ()); - - // workaround for possible bug in raptor that crashes when saving to a - // non-existant file. - touch_file(sfdb_file_path.to_string()); - - lrdf_read_file(src.c_str()); -} - -AudioLibrary::~AudioLibrary () -{ -} - -void -AudioLibrary::save_changes () -{ - if (lrdf_export_by_source(src.c_str(), src.substr(5).c_str())) { - PBD::warning << string_compose(_("Could not open %1. Audio Library not saved"), src) << endmsg; - } -} - -void -AudioLibrary::set_tags (string member, vector tags) -{ - sort (tags.begin(), tags.end()); - tags.erase (unique(tags.begin(), tags.end()), tags.end()); - - const string file_uri(Glib::filename_to_uri (member)); - - lrdf_remove_uri_matches (file_uri.c_str()); - - for (vector::iterator i = tags.begin(); i != tags.end(); ++i) { - lrdf_add_triple (src.c_str(), file_uri.c_str(), TAG, (*i).c_str(), lrdf_literal); - } -} - -vector -AudioLibrary::get_tags (string member) -{ - vector tags; - - lrdf_statement pattern; - pattern.subject = strdup(Glib::filename_to_uri(member).c_str()); - pattern.predicate = (char*)TAG; - pattern.object = 0; - pattern.object_type = lrdf_literal; - - lrdf_statement* matches = lrdf_matches (&pattern); - free (pattern.subject); - - lrdf_statement* current = matches; - while (current != 0) { - tags.push_back (current->object); - - current = current->next; - } - - lrdf_free_statements (matches); - - sort (tags.begin(), tags.end()); - - return tags; -} - -void -AudioLibrary::search_members_and (vector& members, const vector tags) -{ - lrdf_statement **head; - lrdf_statement* pattern = 0; - lrdf_statement* old = 0; - head = &pattern; - - vector::const_iterator i; - for (i = tags.begin(); i != tags.end(); ++i){ - pattern = new lrdf_statement; - pattern->subject = (char*)"?"; - pattern->predicate = (char*)TAG; - pattern->object = strdup((*i).c_str()); - pattern->next = old; - - old = pattern; - } - - if (*head != 0) { - lrdf_uris* ulist = lrdf_match_multi(*head); - for (uint32_t j = 0; ulist && j < ulist->count; ++j) { -// cerr << "AND: " << Glib::filename_from_uri(ulist->items[j]) << endl; - members.push_back(Glib::filename_from_uri(ulist->items[j])); - } - lrdf_free_uris(ulist); - - sort(members.begin(), members.end()); - unique(members.begin(), members.end()); - } - - // memory clean up - pattern = *head; - while(pattern){ - free(pattern->object); - old = pattern; - pattern = pattern->next; - delete old; - } -} diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc deleted file mode 100644 index 1506d204f1..0000000000 --- a/libs/ardour/audio_playlist.cc +++ /dev/null @@ -1,788 +0,0 @@ -/* - Copyright (C) 2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace sigc; -using namespace std; -using namespace PBD; - -AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden) - : Playlist (session, node, DataType::AUDIO, hidden) -{ - const XMLProperty* prop = node.property("type"); - assert(!prop || DataType(prop->value()) == DataType::AUDIO); - - in_set_state++; - set_state (node); - in_set_state--; -} - -AudioPlaylist::AudioPlaylist (Session& session, string name, bool hidden) - : Playlist (session, name, DataType::AUDIO, hidden) -{ -} - -AudioPlaylist::AudioPlaylist (boost::shared_ptr other, string name, bool hidden) - : Playlist (other, name, hidden) -{ - RegionList::const_iterator in_o = other->regions.begin(); - RegionList::iterator in_n = regions.begin(); - - while (in_o != other->regions.end()) { - boost::shared_ptr ar = boost::dynamic_pointer_cast(*in_o); - - // We look only for crossfades which begin with the current region, so we don't get doubles - for (Crossfades::const_iterator xfades = other->_crossfades.begin(); xfades != other->_crossfades.end(); ++xfades) { - if ((*xfades)->in() == ar) { - // We found one! Now copy it! - - RegionList::const_iterator out_o = other->regions.begin(); - RegionList::const_iterator out_n = regions.begin(); - - while (out_o != other->regions.end()) { - - boost::shared_ptrar2 = boost::dynamic_pointer_cast(*out_o); - - if ((*xfades)->out() == ar2) { - boost::shared_ptrin = boost::dynamic_pointer_cast(*in_n); - boost::shared_ptrout = boost::dynamic_pointer_cast(*out_n); - boost::shared_ptr new_fade = boost::shared_ptr (new Crossfade (*xfades, in, out)); - add_crossfade(new_fade); - break; - } - - out_o++; - out_n++; - } -// cerr << "HUH!? second region in the crossfade not found!" << endl; - } - } - - in_o++; - in_n++; - } -} - -AudioPlaylist::AudioPlaylist (boost::shared_ptr other, nframes_t start, nframes_t cnt, string name, bool hidden) - : Playlist (other, start, cnt, name, hidden) -{ - /* this constructor does NOT notify others (session) */ -} - -AudioPlaylist::~AudioPlaylist () -{ - GoingAway (); /* EMIT SIGNAL */ - - /* drop connections to signals */ - - notify_callbacks (); - - _crossfades.clear (); -} - -struct RegionSortByLayer { - bool operator() (boost::shared_ptr a, boost::shared_ptr b) { - return a->layer() < b->layer(); - } -}; - -ARDOUR::nframes_t -AudioPlaylist::read (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t start, - nframes_t cnt, unsigned chan_n) -{ - nframes_t ret = cnt; - nframes_t end; - nframes_t read_frames; - nframes_t skip_frames; - - /* optimizing this memset() away involves a lot of conditionals - that may well cause more of a hit due to cache misses - and related stuff than just doing this here. - - it would be great if someone could measure this - at some point. - - one way or another, parts of the requested area - that are not written to by Region::region_at() - for all Regions that cover the area need to be - zeroed. - */ - - memset (buf, 0, sizeof (Sample) * cnt); - - /* this function is never called from a realtime thread, so - its OK to block (for short intervals). - */ - - Glib::Mutex::Lock rm (region_lock); - - end = start + cnt - 1; - read_frames = 0; - skip_frames = 0; - _read_data_count = 0; - - _read_data_count = 0; - - RegionList* rlist = regions_to_read (start, start+cnt); - - if (rlist->empty()) { - delete rlist; - return cnt; - } - - map > > relevant_regions; - map > > relevant_xfades; - vector relevant_layers; - - for (RegionList::iterator i = rlist->begin(); i != rlist->end(); ++i) { - if ((*i)->coverage (start, end) != OverlapNone) { - relevant_regions[(*i)->layer()].push_back (*i); - relevant_layers.push_back ((*i)->layer()); - } - } - - for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) { - if ((*i)->coverage (start, end) != OverlapNone) { - relevant_xfades[(*i)->upper_layer()].push_back (*i); - } - } - -// RegionSortByLayer layer_cmp; -// relevant_regions.sort (layer_cmp); - - /* XXX this whole per-layer approach is a hack that - should be removed once Crossfades become - CrossfadeRegions and we just grab a list of relevant - regions and call read_at() on all of them. - */ - - sort (relevant_layers.begin(), relevant_layers.end()); - - for (vector::iterator l = relevant_layers.begin(); l != relevant_layers.end(); ++l) { - - vector > r (relevant_regions[*l]); - vector >& x (relevant_xfades[*l]); - - for (vector >::iterator i = r.begin(); i != r.end(); ++i) { - boost::shared_ptr ar = boost::dynamic_pointer_cast(*i); - assert(ar); - ar->read_at (buf, mixdown_buffer, gain_buffer, start, cnt, chan_n, read_frames, skip_frames); - _read_data_count += ar->read_data_count(); - } - - for (vector >::iterator i = x.begin(); i != x.end(); ++i) { - (*i)->read_at (buf, mixdown_buffer, gain_buffer, start, cnt, chan_n); - - /* don't JACK up _read_data_count, since its the same data as we just - read from the regions, and the OS should handle that for us. - */ - } - } - - delete rlist; - return ret; -} - - -void -AudioPlaylist::remove_dependents (boost::shared_ptr region) -{ - boost::shared_ptr r = boost::dynamic_pointer_cast (region); - - if (in_set_state) { - return; - } - - if (r == 0) { - fatal << _("programming error: non-audio Region passed to remove_overlap in audio playlist") - << endmsg; - return; - } - - for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ) { - - if ((*i)->involves (r)) { - i = _crossfades.erase (i); - } else { - ++i; - } - } -} - - -void -AudioPlaylist::flush_notifications () -{ - Playlist::flush_notifications(); - - if (in_flush) { - return; - } - - in_flush = true; - - Crossfades::iterator a; - for (a = _pending_xfade_adds.begin(); a != _pending_xfade_adds.end(); ++a) { - NewCrossfade (*a); /* EMIT SIGNAL */ - } - - _pending_xfade_adds.clear (); - - in_flush = false; -} - -void -AudioPlaylist::refresh_dependents (boost::shared_ptr r) -{ - boost::shared_ptr ar = boost::dynamic_pointer_cast(r); - set > updated; - - if (ar == 0) { - return; - } - - for (Crossfades::iterator x = _crossfades.begin(); x != _crossfades.end();) { - - Crossfades::iterator tmp; - - tmp = x; - ++tmp; - - /* only update them once */ - - if ((*x)->involves (ar)) { - - pair >::iterator, bool> const u = updated.insert (*x); - - if (u.second) { - /* x was successfully inserted into the set, so it has not already been updated */ - try { - (*x)->refresh (); - } - - catch (Crossfade::NoCrossfadeHere& err) { - // relax, Invalidated during refresh - } - } - } - - x = tmp; - } -} - -void -AudioPlaylist::finalize_split_region (boost::shared_ptr o, boost::shared_ptr l, boost::shared_ptr r) -{ - boost::shared_ptr orig = boost::dynamic_pointer_cast(o); - boost::shared_ptr left = boost::dynamic_pointer_cast(l); - boost::shared_ptr right = boost::dynamic_pointer_cast(r); - - for (Crossfades::iterator x = _crossfades.begin(); x != _crossfades.end();) { - Crossfades::iterator tmp; - tmp = x; - ++tmp; - - boost::shared_ptr fade; - - if ((*x)->_in == orig) { - if (! (*x)->covers(right->position())) { - fade = boost::shared_ptr (new Crossfade (*x, left, (*x)->_out)); - } else { - // Overlap, the crossfade is copied on the left side of the right region instead - fade = boost::shared_ptr (new Crossfade (*x, right, (*x)->_out)); - } - } - - if ((*x)->_out == orig) { - if (! (*x)->covers(right->position())) { - fade = boost::shared_ptr (new Crossfade (*x, (*x)->_in, right)); - } else { - // Overlap, the crossfade is copied on the right side of the left region instead - fade = boost::shared_ptr (new Crossfade (*x, (*x)->_in, left)); - } - } - - if (fade) { - _crossfades.remove (*x); - add_crossfade (fade); - } - x = tmp; - } -} - -void -AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) -{ - boost::shared_ptr other; - boost::shared_ptr region; - boost::shared_ptr top; - boost::shared_ptr bottom; - boost::shared_ptr xfade; - RegionList* touched_regions; - - if (in_set_state || in_partition) { - return; - } - - if ((region = boost::dynamic_pointer_cast (r)) == 0) { - fatal << _("programming error: non-audio Region tested for overlap in audio playlist") - << endmsg; - return; - } - - if (!norefresh) { - refresh_dependents (r); - } - - - if (!Config->get_auto_xfade()) { - return; - } - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - nframes_t xfade_length; - - other = boost::dynamic_pointer_cast (*i); - - if (other == region) { - continue; - } - - if (other->muted() || region->muted()) { - continue; - } - - - if (other->layer() < region->layer()) { - top = region; - bottom = other; - } else { - top = other; - bottom = region; - } - - if (!top->opaque()) { - continue; - } - - OverlapType c = top->coverage (bottom->position(), bottom->last_frame()); - - try { - switch (c) { - case OverlapNone: - break; - - case OverlapInternal: - /* {=============== top =============} - * [ ----- bottom ------- ] - */ - break; - - case OverlapExternal: - - /* [ -------- top ------- ] - * {=========== bottom =============} - */ - - /* to avoid discontinuities at the region boundaries of an internal - overlap (this region is completely within another), we create - two hidden crossfades at each boundary. this is not dependent - on the auto-xfade option, because we require it as basic - audio engineering. - */ - - xfade_length = min ((nframes_t) 720, top->length()); - - if (top_region_at (top->first_frame()) == top) { - - xfade = boost::shared_ptr (new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn)); - add_crossfade (xfade); - } - - if (top_region_at (top->last_frame() - 1) == top) { - - /* - only add a fade out if there is no region on top of the end of 'top' (which - would cover it). - */ - - xfade = boost::shared_ptr (new Crossfade (bottom, top, xfade_length, top->last_frame() - xfade_length, EndOfOut)); - add_crossfade (xfade); - } - break; - case OverlapStart: - - /* { ==== top ============ } - * [---- bottom -------------------] - */ - - if (Config->get_xfade_model() == FullCrossfade) { - touched_regions = regions_touched (top->first_frame(), bottom->last_frame()); - if (touched_regions->size() <= 2) { - xfade = boost::shared_ptr (new Crossfade (region, other, Config->get_xfade_model(), Config->get_xfades_active())); - add_crossfade (xfade); - } - } else { - - touched_regions = regions_touched (top->first_frame(), - top->first_frame() + min ((nframes_t)Config->get_short_xfade_seconds() * _session.frame_rate(), - top->length())); - if (touched_regions->size() <= 2) { - xfade = boost::shared_ptr (new Crossfade (region, other, Config->get_xfade_model(), Config->get_xfades_active())); - add_crossfade (xfade); - } - } - break; - case OverlapEnd: - - - /* [---- top ------------------------] - * { ==== bottom ============ } - */ - - if (Config->get_xfade_model() == FullCrossfade) { - - touched_regions = regions_touched (bottom->first_frame(), top->last_frame()); - if (touched_regions->size() <= 2) { - xfade = boost::shared_ptr (new Crossfade (region, other, - Config->get_xfade_model(), Config->get_xfades_active())); - add_crossfade (xfade); - } - - } else { - touched_regions = regions_touched (bottom->first_frame(), - bottom->first_frame() + min ((nframes_t)Config->get_short_xfade_seconds() * _session.frame_rate(), - bottom->length())); - if (touched_regions->size() <= 2) { - xfade = boost::shared_ptr (new Crossfade (region, other, Config->get_xfade_model(), Config->get_xfades_active())); - add_crossfade (xfade); - } - } - break; - default: - xfade = boost::shared_ptr (new Crossfade (region, other, - Config->get_xfade_model(), Config->get_xfades_active())); - add_crossfade (xfade); - } - } - - catch (failed_constructor& err) { - continue; - } - - catch (Crossfade::NoCrossfadeHere& err) { - continue; - } - - } -} - -void -AudioPlaylist::add_crossfade (boost::shared_ptr xfade) -{ - Crossfades::iterator ci; - - for (ci = _crossfades.begin(); ci != _crossfades.end(); ++ci) { - if (*(*ci) == *xfade) { // Crossfade::operator==() - break; - } - } - - if (ci != _crossfades.end()) { - // it will just go away - } else { - _crossfades.push_back (xfade); - - xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); - xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed)); - - notify_crossfade_added (xfade); - } -} - -void AudioPlaylist::notify_crossfade_added (boost::shared_ptr x) -{ - if (g_atomic_int_get(&block_notifications)) { - _pending_xfade_adds.insert (_pending_xfade_adds.end(), x); - } else { - - NewCrossfade (x); /* EMIT SIGNAL */ - } -} - -void -AudioPlaylist::crossfade_invalidated (boost::shared_ptr r) -{ - Crossfades::iterator i; - boost::shared_ptr xfade = boost::dynamic_pointer_cast (r); - - xfade->in()->resume_fade_in (); - xfade->out()->resume_fade_out (); - - if ((i = find (_crossfades.begin(), _crossfades.end(), xfade)) != _crossfades.end()) { - _crossfades.erase (i); - } -} - -int -AudioPlaylist::set_state (const XMLNode& node) -{ - XMLNode *child; - XMLNodeList nlist; - XMLNodeConstIterator niter; - - in_set_state++; - freeze (); - - Playlist::set_state (node); - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - child = *niter; - - if (child->name() != "Crossfade") { - continue; - } - - try { - boost::shared_ptr xfade = boost::shared_ptr (new Crossfade (*((const Playlist *)this), *child)); - _crossfades.push_back (xfade); - xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); - xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed)); - NewCrossfade(xfade); - } - - catch (failed_constructor& err) { - // cout << string_compose (_("could not create crossfade object in playlist %1"), - // _name) - // << endl; - continue; - } - } - - thaw (); - in_set_state--; - - return 0; -} - -void -AudioPlaylist::clear (bool with_signals) -{ - _crossfades.clear (); - Playlist::clear (with_signals); -} - -XMLNode& -AudioPlaylist::state (bool full_state) -{ - XMLNode& node = Playlist::state (full_state); - - if (full_state) { - for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) { - node.add_child_nocopy ((*i)->get_state()); - } - } - - return node; -} - -void -AudioPlaylist::dump () const -{ - boost::shared_ptrr; - boost::shared_ptr x; - - cerr << "Playlist \"" << _name << "\" " << endl - << regions.size() << " regions " - << _crossfades.size() << " crossfades" - << endl; - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - r = *i; - cerr << " " << r->name() << " @ " << r << " [" - << r->start() << "+" << r->length() - << "] at " - << r->position() - << " on layer " - << r->layer () - << endl; - } - - for (Crossfades::const_iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) { - x = *i; - cerr << " xfade [" - << x->out()->name() - << ',' - << x->in()->name() - << " @ " - << x->position() - << " length = " - << x->length () - << " active ? " - << (x->active() ? "yes" : "no") - << endl; - } -} - -bool -AudioPlaylist::destroy_region (boost::shared_ptr region) -{ - boost::shared_ptr r = boost::dynamic_pointer_cast (region); - bool changed = false; - Crossfades::iterator c, ctmp; - set > unique_xfades; - - if (r == 0) { - fatal << _("programming error: non-audio Region passed to remove_overlap in audio playlist") - << endmsg; - /*NOTREACHED*/ - return false; - } - - { - RegionLock rlock (this); - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ) { - - RegionList::iterator tmp = i; - ++tmp; - - if ((*i) == region) { - regions.erase (i); - changed = true; - } - - i = tmp; - } - - for (set >::iterator x = all_regions.begin(); x != all_regions.end(); ) { - - set >::iterator xtmp = x; - ++xtmp; - - if ((*x) == region) { - all_regions.erase (x); - changed = true; - } - - x = xtmp; - } - - region->set_playlist (boost::shared_ptr()); - } - - for (c = _crossfades.begin(); c != _crossfades.end(); ) { - ctmp = c; - ++ctmp; - - if ((*c)->involves (r)) { - unique_xfades.insert (*c); - _crossfades.erase (c); - } - - c = ctmp; - } - - if (changed) { - /* overload this, it normally means "removed", not destroyed */ - notify_region_removed (region); - } - - return changed; -} - -void -AudioPlaylist::crossfade_changed (Change ignored) -{ - if (in_flush || in_set_state) { - return; - } - - /* XXX is there a loop here? can an xfade change not happen - due to a playlist change? well, sure activation would - be an example. maybe we should check the type of change - that occured. - */ - - notify_modified (); -} - -bool -AudioPlaylist::region_changed (Change what_changed, boost::shared_ptr region) -{ - if (in_flush || in_set_state) { - return false; - } - - Change our_interests = Change (AudioRegion::FadeInChanged| - AudioRegion::FadeOutChanged| - AudioRegion::FadeInActiveChanged| - AudioRegion::FadeOutActiveChanged| - AudioRegion::EnvelopeActiveChanged| - AudioRegion::ScaleAmplitudeChanged| - AudioRegion::EnvelopeChanged); - bool parent_wants_notify; - - parent_wants_notify = Playlist::region_changed (what_changed, region); - - if ((parent_wants_notify || (what_changed & our_interests))) { - notify_modified (); - } - - return true; -} - -void -AudioPlaylist::crossfades_at (nframes_t frame, Crossfades& clist) -{ - RegionLock rlock (this); - - for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) { - nframes_t start, end; - - start = (*i)->position(); - end = start + (*i)->overlap_length(); // not length(), important difference - - if (frame >= start && frame <= end) { - clist.push_back (*i); - } - } -} - diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc deleted file mode 100644 index 714be28f34..0000000000 --- a/libs/ardour/audio_port.cc +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include - -using namespace ARDOUR; -using namespace std; - -AudioPort::AudioPort (const std::string& name, Flags flags, bool external, nframes_t capacity) - : Port (name, flags) - , BaseAudioPort (name, flags) - , PortFacade (name, flags) -{ - if (!external || receives_input()) { - - /* internal-only and input ports need their own buffers. - external output ports use the external port buffer. - */ - - _buffer = new AudioBuffer (capacity); - _own_buffer = true; - } - - if (!external) { - - _ext_port = 0; - set_name (name); - - } else { - - /* make the JackAudioPort create its own buffer. For input, - we will copy from it during cycle_start(). For output, - we will set up our buffer to point to its buffer, which - will in turn be using the JACK port buffer for data. - */ - - _ext_port = new JackAudioPort (name, flags, 0); - - if (sends_output()) { - _buffer = &dynamic_cast(_ext_port)->get_audio_buffer(); - } - - Port::set_name (_ext_port->name()); - } - - reset (); -} - -AudioPort::~AudioPort() -{ - if (_ext_port) { - delete _ext_port; - _ext_port = 0; - } -} - -void -AudioPort::reset() -{ - BaseAudioPort::reset(); - - if (_ext_port) { - _ext_port->reset (); - } -} - - -void -AudioPort::cycle_start (nframes_t nframes, nframes_t offset) -{ - /* caller must hold process lock */ - - if (_ext_port) { - _ext_port->cycle_start (nframes, offset); - } - - if (_flags & IsInput) { - - if (_ext_port) { - _buffer->read_from (dynamic_cast(_ext_port)->get_audio_buffer(), nframes, offset); - - if (!_connections.empty()) { - (*_mixdown) (_connections, _buffer, nframes, offset, false); - } - - } else { - - if (_connections.empty()) { - _buffer->silence (nframes, offset); - } else { - (*_mixdown) (_connections, _buffer, nframes, offset, true); - } - } - - } else { - - // XXX if we could get the output stage to not purely mix into, but also - // to initially overwrite the buffer, we could avoid this silence step. - - _buffer->silence (nframes, offset); - } -} - -void -AudioPort::cycle_end (nframes_t nframes, nframes_t offset) -{ -} diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc deleted file mode 100644 index 53f918ec4e..0000000000 --- a/libs/ardour/audio_track.cc +++ /dev/null @@ -1,884 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode) - : Track (sess, name, flag, mode) -{ - AudioDiskstream::Flag dflags = AudioDiskstream::Flag (0); - - if (_flags & Hidden) { - dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Hidden); - } else { - dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Recordable); - } - - if (mode == Destructive) { - dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Destructive); - } - - boost::shared_ptr ds (new AudioDiskstream (_session, name, dflags)); - - _session.add_diskstream (ds); - - set_diskstream (boost::dynamic_pointer_cast (ds), this); -} - -AudioTrack::AudioTrack (Session& sess, const XMLNode& node) - : Track (sess, node) -{ - _set_state (node, false); -} - -AudioTrack::~AudioTrack () -{ -} - -int -AudioTrack::set_mode (TrackMode m) -{ - if (m != _mode) { - - if (_diskstream->set_destructive (m == Destructive)) { - return -1; - } - - _mode = m; - - TrackModeChanged (); /* EMIT SIGNAL */ - } - - return 0; -} - -bool -AudioTrack::can_use_mode (TrackMode m, bool& bounce_required) -{ - switch (m) { - case Normal: - bounce_required = false; - return true; - - case Destructive: - default: - return _diskstream->can_become_destructive (bounce_required); - } -} - -int -AudioTrack::deprecated_use_diskstream_connections () -{ - boost::shared_ptr diskstream = audio_diskstream(); - - if (diskstream->deprecated_io_node == 0) { - return 0; - } - - const XMLProperty* prop; - XMLNode& node (*diskstream->deprecated_io_node); - - /* don't do this more than once. */ - - diskstream->deprecated_io_node = 0; - - set_input_minimum (ChanCount::ZERO); - set_input_maximum (ChanCount::INFINITE); - set_output_minimum (ChanCount::ZERO); - set_output_maximum (ChanCount::INFINITE); - - if ((prop = node.property ("gain")) != 0) { - set_gain (atof (prop->value().c_str()), this); - _gain = _desired_gain; - } - - if ((prop = node.property ("input-connection")) != 0) { - boost::shared_ptr c = _session.bundle_by_name (prop->value()); - - if (c == 0) { - error << string_compose(_("Unknown bundle \"%1\" listed for input of %2"), prop->value(), _name) << endmsg; - - if ((c = _session.bundle_by_name (_("in 1"))) == 0) { - error << _("No input bundles available as a replacement") - << endmsg; - return -1; - } else { - info << string_compose (_("Bundle %1 was not available - \"in 1\" used instead"), prop->value()) - << endmsg; - } - } - - connect_input_ports_to_bundle (c, this); - - } else if ((prop = node.property ("inputs")) != 0) { - if (set_inputs (prop->value())) { - error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg; - return -1; - } - } - - return 0; -} - -int -AudioTrack::set_diskstream (boost::shared_ptr ds, void *src) -{ - _diskstream = ds; - _diskstream->set_io (*this); - _diskstream->set_destructive (_mode == Destructive); - - if (audio_diskstream()->deprecated_io_node) { - - if (!connecting_legal) { - ConnectingLegal.connect (mem_fun (*this, &AudioTrack::deprecated_use_diskstream_connections)); - } else { - deprecated_use_diskstream_connections (); - } - } - - _diskstream->set_record_enabled (false); - _diskstream->monitor_input (false); - - ic_connection.disconnect(); - ic_connection = input_changed.connect (mem_fun (*_diskstream, &Diskstream::handle_input_change)); - - DiskstreamChanged (); /* EMIT SIGNAL */ - - return 0; -} - -int -AudioTrack::use_diskstream (string name) -{ - boost::shared_ptr dstream; - - if ((dstream = boost::dynamic_pointer_cast(_session.diskstream_by_name (name))) == 0) { - error << string_compose(_("AudioTrack: audio diskstream \"%1\" not known by session"), name) << endmsg; - return -1; - } - - return set_diskstream (dstream, this); -} - -int -AudioTrack::use_diskstream (const PBD::ID& id) -{ - boost::shared_ptr dstream; - - if ((dstream = boost::dynamic_pointer_cast (_session.diskstream_by_id (id))) == 0) { - error << string_compose(_("AudioTrack: audio diskstream \"%1\" not known by session"), id) << endmsg; - return -1; - } - - return set_diskstream (dstream, this); -} - -boost::shared_ptr -AudioTrack::audio_diskstream() const -{ - return boost::dynamic_pointer_cast(_diskstream); -} - -int -AudioTrack::set_state (const XMLNode& node) -{ - return _set_state (node, true); -} - -int -AudioTrack::_set_state (const XMLNode& node, bool call_base) -{ - const XMLProperty *prop; - XMLNodeConstIterator iter; - - if (call_base) { - if (Route::_set_state (node, call_base)) { - return -1; - } - } - - if ((prop = node.property (X_("mode"))) != 0) { - _mode = TrackMode (string_2_enum (prop->value(), _mode)); - } else { - _mode = Normal; - } - - if ((prop = node.property ("diskstream-id")) == 0) { - - /* some old sessions use the diskstream name rather than the ID */ - - if ((prop = node.property ("diskstream")) == 0) { - fatal << _("programming error: AudioTrack given state without diskstream!") << endmsg; - /*NOTREACHED*/ - return -1; - } - - if (use_diskstream (prop->value())) { - return -1; - } - - } else { - - PBD::ID id (prop->value()); - - if (use_diskstream (id)) { - return -1; - } - } - - - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLNode *child; - - nlist = node.children(); - for (niter = nlist.begin(); niter != nlist.end(); ++niter){ - child = *niter; - - if (child->name() == X_("recenable")) { - _rec_enable_control->set_state (*child); - _session.add_controllable (_rec_enable_control); - } - } - - pending_state = const_cast (&node); - - _session.StateReady.connect (mem_fun (*this, &AudioTrack::set_state_part_two)); - - return 0; -} - -XMLNode& -AudioTrack::state(bool full_state) -{ - XMLNode& root (Route::state(full_state)); - XMLNode* freeze_node; - char buf[64]; - - if (_freeze_record.playlist) { - XMLNode* inode; - - freeze_node = new XMLNode (X_("freeze-info")); - freeze_node->add_property ("playlist", _freeze_record.playlist->name()); - freeze_node->add_property ("state", enum_2_string (_freeze_record.state)); - - for (vector::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) { - inode = new XMLNode (X_("processor")); - (*i)->id.print (buf, sizeof (buf)); - inode->add_property (X_("id"), buf); - inode->add_child_copy ((*i)->state); - - freeze_node->add_child_nocopy (*inode); - } - - root.add_child_nocopy (*freeze_node); - } - - /* Alignment: act as a proxy for the diskstream */ - - XMLNode* align_node = new XMLNode (X_("alignment")); - AlignStyle as = _diskstream->alignment_style (); - align_node->add_property (X_("style"), enum_2_string (as)); - root.add_child_nocopy (*align_node); - - root.add_property (X_("mode"), enum_2_string (_mode)); - - /* we don't return diskstream state because we don't - own the diskstream exclusively. control of the diskstream - state is ceded to the Session, even if we create the - diskstream. - */ - - _diskstream->id().print (buf, sizeof (buf)); - root.add_property ("diskstream-id", buf); - - root.add_child_nocopy (_rec_enable_control->get_state()); - - return root; -} - -void -AudioTrack::set_state_part_two () -{ - XMLNode* fnode; - XMLProperty* prop; - LocaleGuard lg (X_("POSIX")); - - /* This is called after all session state has been restored but before - have been made ports and connections are established. - */ - - if (pending_state == 0) { - return; - } - - if ((fnode = find_named_node (*pending_state, X_("freeze-info"))) != 0) { - - - _freeze_record.have_mementos = false; - _freeze_record.state = Frozen; - - for (vector::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) { - delete *i; - } - _freeze_record.processor_info.clear (); - - if ((prop = fnode->property (X_("playlist"))) != 0) { - boost::shared_ptr pl = _session.playlist_by_name (prop->value()); - if (pl) { - _freeze_record.playlist = boost::dynamic_pointer_cast (pl); - } else { - _freeze_record.playlist.reset (); - _freeze_record.state = NoFreeze; - return; - } - } - - if ((prop = fnode->property (X_("state"))) != 0) { - _freeze_record.state = FreezeState (string_2_enum (prop->value(), _freeze_record.state)); - } - - XMLNodeConstIterator citer; - XMLNodeList clist = fnode->children(); - - for (citer = clist.begin(); citer != clist.end(); ++citer) { - if ((*citer)->name() != X_("processor")) { - continue; - } - - if ((prop = (*citer)->property (X_("id"))) == 0) { - continue; - } - - FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()), - boost::shared_ptr()); - frii->id = prop->value (); - _freeze_record.processor_info.push_back (frii); - } - } - - /* Alignment: act as a proxy for the diskstream */ - - if ((fnode = find_named_node (*pending_state, X_("alignment"))) != 0) { - - if ((prop = fnode->property (X_("style"))) != 0) { - - /* fix for older sessions from before EnumWriter */ - - string pstr; - - if (prop->value() == "capture") { - pstr = "CaptureTime"; - } else if (prop->value() == "existing") { - pstr = "ExistingMaterial"; - } else { - pstr = prop->value(); - } - - AlignStyle as = AlignStyle (string_2_enum (pstr, as)); - _diskstream->set_persistent_align_style (as); - } - } - return; -} - -int -AudioTrack::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, - bool session_state_changing, bool can_record, bool rec_monitors_input) -{ - if (n_outputs().n_total() == 0) { - return 0; - } - - if (!_active) { - silence (nframes, offset); - return 0; - } - - if (session_state_changing) { - - /* XXX is this safe to do against transport state changes? */ - - passthru_silence (start_frame, end_frame, nframes, offset, 0, false); - return 0; - } - - audio_diskstream()->check_record_status (start_frame, nframes, can_record); - - bool send_silence; - - if (_have_internal_generator) { - /* since the instrument has no input streams, - there is no reason to send any signal - into the route. - */ - send_silence = true; - } else { - - if (!Config->get_tape_machine_mode()) { - /* - ADATs work in a strange way.. - they monitor input always when stopped.and auto-input is engaged. - */ - if ((Config->get_monitoring_model() == SoftwareMonitoring) && (Config->get_auto_input () || _diskstream->record_enabled())) { - send_silence = false; - } else { - send_silence = true; - } - } else { - /* - Other machines switch to input on stop if the track is record enabled, - regardless of the auto input setting (auto input only changes the - monitoring state when the transport is rolling) - */ - if ((Config->get_monitoring_model() == SoftwareMonitoring) && _diskstream->record_enabled()) { - send_silence = false; - } else { - send_silence = true; - } - } - } - - apply_gain_automation = false; - - if (send_silence) { - - /* if we're sending silence, but we want the meters to show levels for the signal, - meter right here. - */ - - if (_have_internal_generator) { - passthru_silence (start_frame, end_frame, nframes, offset, 0, true); - } else { - if (_meter_point == MeterInput) { - just_meter_input (start_frame, end_frame, nframes, offset); - } - passthru_silence (start_frame, end_frame, nframes, offset, 0, false); - } - - } else { - - /* we're sending signal, but we may still want to meter the input. - */ - - passthru (start_frame, end_frame, nframes, offset, 0, (_meter_point == MeterInput)); - } - - return 0; -} - -int -AudioTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, int declick, - bool can_record, bool rec_monitors_input) -{ - int dret; - Sample* b; - Sample* tmpb; - nframes_t transport_frame; - boost::shared_ptr diskstream = audio_diskstream(); - - { - Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); - if (lm.locked()) { - // automation snapshot can also be called from the non-rt context - // and it uses the redirect list, so we take the lock out here - automation_snapshot (start_frame, false); - } - } - - - if (n_outputs().n_total() == 0 && _processors.empty()) { - return 0; - } - - if (!_active) { - silence (nframes, offset); - return 0; - } - - transport_frame = _session.transport_frame(); - - if ((nframes = check_initial_delay (nframes, offset, transport_frame)) == 0) { - /* need to do this so that the diskstream sets its - playback distance to zero, thus causing diskstream::commit - to do nothing. - */ - return diskstream->process (transport_frame, 0, 0, can_record, rec_monitors_input); - } - - _silent = false; - apply_gain_automation = false; - - if ((dret = diskstream->process (transport_frame, nframes, offset, can_record, rec_monitors_input)) != 0) { - - silence (nframes, offset); - - return dret; - } - - /* special condition applies */ - - if (_meter_point == MeterInput) { - just_meter_input (start_frame, end_frame, nframes, offset); - } - - if (diskstream->record_enabled() && !can_record && !Config->get_auto_input()) { - - /* not actually recording, but we want to hear the input material anyway, - at least potentially (depending on monitoring options) - */ - - passthru (start_frame, end_frame, nframes, offset, 0, true); - - } else if ((b = diskstream->playback_buffer(0)) != 0) { - - /* - XXX is it true that the earlier test on n_outputs() - means that we can avoid checking it again here? i think - so, because changing the i/o configuration of an IO - requires holding the AudioEngine lock, which we hold - while in the process() tree. - */ - - - /* copy the diskstream data to all output buffers */ - - const size_t limit = n_process_buffers().n_audio(); - BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers()); - - uint32_t n; - uint32_t i; - - for (i = 0, n = 1; i < limit; ++i, ++n) { - memcpy (bufs.get_audio(i).data(), b, sizeof (Sample) * nframes); - if (n < diskstream->n_channels().n_audio()) { - tmpb = diskstream->playback_buffer(n); - if (tmpb!=0) { - b = tmpb; - } - } - } - - /* don't waste time with automation if we're recording or we've just stopped (yes it can happen) */ - - if (!diskstream->record_enabled() && _session.transport_rolling()) { - Glib::Mutex::Lock am (_automation_lock, Glib::TRY_LOCK); - - if (am.locked() && gain_control()->list()->automation_playback()) { - apply_gain_automation = gain_control()->list()->curve().rt_safe_get_vector (start_frame, end_frame, _session.gain_automation_buffer(), nframes); - } - } - - process_output_buffers (bufs, start_frame, end_frame, nframes, offset, (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick, (_meter_point != MeterInput)); - - } else { - /* problem with the diskstream; just be quiet for a bit */ - silence (nframes, offset); - } - - return 0; -} - -int -AudioTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, - bool can_record, bool rec_monitors_input) -{ - if (n_outputs().n_total() == 0 && _processors.empty()) { - return 0; - } - - if (!_active) { - silence (nframes, offset); - return 0; - } - - _silent = true; - apply_gain_automation = false; - - silence (nframes, offset); - - return audio_diskstream()->process (_session.transport_frame() + offset, nframes, offset, can_record, rec_monitors_input); -} - -int -AudioTrack::export_stuff (BufferSet& buffers, nframes_t start, nframes_t nframes) -{ - gain_t gain_automation[nframes]; - gain_t gain_buffer[nframes]; - float mix_buffer[nframes]; - ProcessorList::iterator i; - bool post_fader_work = false; - gain_t this_gain = _gain; - boost::shared_ptr diskstream = audio_diskstream(); - - Glib::RWLock::ReaderLock rlock (_processor_lock); - - boost::shared_ptr apl = boost::dynamic_pointer_cast(diskstream->playlist()); - assert(apl); - - assert(buffers.get_audio(0).capacity() >= nframes); - - if (apl->read (buffers.get_audio(0).data(), mix_buffer, gain_buffer, start, nframes) != nframes) { - return -1; - } - - assert(buffers.count().n_audio() >= 1); - uint32_t n=1; - Sample* b = buffers.get_audio(0).data(); - BufferSet::audio_iterator bi = buffers.audio_begin(); - ++bi; - for ( ; bi != buffers.audio_end(); ++bi, ++n) { - if (n < diskstream->n_channels().n_audio()) { - if (apl->read (bi->data(), mix_buffer, gain_buffer, start, nframes, n) != nframes) { - return -1; - } - b = bi->data(); - } - else { - /* duplicate last across remaining buffers */ - memcpy (bi->data(), b, sizeof (Sample) * nframes); - } - } - - - /* note: only run processors during export. other layers in the machinery - will already have checked that there are no external port processors. - */ - - for (i = _processors.begin(); i != _processors.end(); ++i) { - boost::shared_ptr processor; - - if ((processor = boost::dynamic_pointer_cast(*i)) != 0) { - switch (processor->placement()) { - case PreFader: - processor->run_in_place (buffers, start, start+nframes, nframes, 0); - break; - case PostFader: - post_fader_work = true; - break; - } - } - } - - if (gain_control()->list()->automation_state() == Play) { - - gain_control()->list()->curve().get_vector (start, start + nframes, gain_automation, nframes); - - for (BufferSet::audio_iterator bi = buffers.audio_begin(); bi != buffers.audio_end(); ++bi) { - Sample *b = bi->data(); - for (nframes_t n = 0; n < nframes; ++n) { - b[n] *= gain_automation[n]; - } - } - - } else { - - for (BufferSet::audio_iterator bi = buffers.audio_begin(); bi != buffers.audio_end(); ++bi) { - Sample *b = bi->data(); - for (nframes_t n = 0; n < nframes; ++n) { - b[n] *= this_gain; - } - } - } - - if (post_fader_work) { - - for (i = _processors.begin(); i != _processors.end(); ++i) { - boost::shared_ptr processor; - - if ((processor = boost::dynamic_pointer_cast(*i)) != 0) { - switch ((*i)->placement()) { - case PreFader: - break; - case PostFader: - processor->run_in_place (buffers, start, start+nframes, nframes, 0); - break; - } - } - } - } - - return 0; -} - -void -AudioTrack::bounce (InterThreadInfo& itt) -{ - vector > srcs; - _session.write_one_audio_track (*this, 0, _session.current_end_frame(), false, srcs, itt); - itt.done = true; -} - - -void -AudioTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt) -{ - vector > srcs; - _session.write_one_audio_track (*this, start, end, false, srcs, itt); - itt.done = true; -} - -void -AudioTrack::freeze (InterThreadInfo& itt) -{ - vector > srcs; - string new_playlist_name; - boost::shared_ptr new_playlist; - string dir; - string region_name; - boost::shared_ptr diskstream = audio_diskstream(); - - if ((_freeze_record.playlist = boost::dynamic_pointer_cast(diskstream->playlist())) == 0) { - return; - } - - uint32_t n = 1; - - while (n < (UINT_MAX-1)) { - - string candidate; - - candidate = string_compose ("%1", _freeze_record.playlist->name(), n); - - if (_session.playlist_by_name (candidate) == 0) { - new_playlist_name = candidate; - break; - } - - ++n; - - } - - if (n == (UINT_MAX-1)) { - error << string_compose (X_("There are too many frozen versions of playlist \"%1\"" - " to create another one"), _freeze_record.playlist->name()) - << endmsg; - return; - } - - if (_session.write_one_audio_track (*this, _session.current_start_frame(), _session.current_end_frame(), true, srcs, itt)) { - return; - } - - _freeze_record.processor_info.clear (); - _freeze_record.have_mementos = true; - - { - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator r = _processors.begin(); r != _processors.end(); ++r) { - - boost::shared_ptr processor; - - if ((processor = boost::dynamic_pointer_cast(*r)) != 0) { - - FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo ((*r)->get_state(), processor); - - frii->id = processor->id(); - - _freeze_record.processor_info.push_back (frii); - - /* now deactivate the processor */ - - processor->set_active (false); - _session.set_dirty (); - } - } - } - - new_playlist = PlaylistFactory::create (DataType::AUDIO, _session, new_playlist_name, false); - region_name = new_playlist_name; - - /* create a new region from all filesources, keep it private */ - - boost::shared_ptr region (RegionFactory::create (srcs, 0, srcs[0]->length(), - region_name, 0, - (Region::Flag) (Region::WholeFile|Region::DefaultFlags), - false)); - - new_playlist->set_orig_diskstream_id (diskstream->id()); - new_playlist->add_region (region, _session.current_start_frame()); - new_playlist->set_frozen (true); - region->set_locked (true); - - diskstream->use_playlist (boost::dynamic_pointer_cast(new_playlist)); - diskstream->set_record_enabled (false); - - _freeze_record.state = Frozen; - FreezeChange(); /* EMIT SIGNAL */ -} - -void -AudioTrack::unfreeze () -{ - if (_freeze_record.playlist) { - audio_diskstream()->use_playlist (_freeze_record.playlist); - - if (_freeze_record.have_mementos) { - - for (vector::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) { - (*i)->memento (); - } - - } else { - - Glib::RWLock::ReaderLock lm (_processor_lock); // should this be a write lock? jlc - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - for (vector::iterator ii = _freeze_record.processor_info.begin(); ii != _freeze_record.processor_info.end(); ++ii) { - if ((*ii)->id == (*i)->id()) { - (*i)->set_state (((*ii)->state)); - break; - } - } - } - } - - _freeze_record.playlist.reset (); - } - - _freeze_record.state = UnFrozen; - FreezeChange (); /* EMIT SIGNAL */ -} - diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc deleted file mode 100644 index b941bc10bb..0000000000 --- a/libs/ardour/audio_unit.cc +++ /dev/null @@ -1,924 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace PBD; -using namespace ARDOUR; - -static OSStatus -_render_callback(void *userData, - AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, - AudioBufferList* ioData) -{ - return ((AUPlugin*)userData)->render_callback (ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, ioData); -} - -AUPlugin::AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr _comp) - : Plugin (engine, session), - comp (_comp), - unit (new CAAudioUnit), - initialized (false), - buffers (0), - current_maxbuf (0), - current_offset (0), - current_buffers (0), - frames_processed (0) -{ - init (); -} - -AUPlugin::AUPlugin (const AUPlugin& other) - : Plugin (other) - , comp (other.get_comp()) - , unit (new CAAudioUnit) - , initialized (false) - , buffers (0) - , current_maxbuf (0) - , current_offset (0) - , current_buffers (0) - , frames_processed (0) - -{ - init (); -} - -AUPlugin::~AUPlugin () -{ - if (unit) { - unit->Uninitialize (); - } - - if (buffers) { - free (buffers); - } -} - - -void -AUPlugin::init () -{ - OSErr err = CAAudioUnit::Open (*(comp.get()), *unit); - - if (err != noErr) { - error << _("AudioUnit: Could not convert CAComponent to CAAudioUnit") << endmsg; - throw failed_constructor (); - } - - AURenderCallbackStruct renderCallbackInfo; - - renderCallbackInfo.inputProc = _render_callback; - renderCallbackInfo.inputProcRefCon = this; - - if ((err = unit->SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, - 0, (void*) &renderCallbackInfo, sizeof(renderCallbackInfo))) != 0) { - cerr << "cannot install render callback (err = " << err << ')' << endl; - throw failed_constructor(); - } - - unit->GetElementCount (kAudioUnitScope_Global, global_elements); - unit->GetElementCount (kAudioUnitScope_Input, input_elements); - unit->GetElementCount (kAudioUnitScope_Output, output_elements); - - // set up the basic stream format. these fields do not change - - streamFormat.mSampleRate = _session.frame_rate(); - streamFormat.mFormatID = kAudioFormatLinearPCM; - streamFormat.mFormatFlags = kAudioFormatFlagIsFloat|kAudioFormatFlagIsPacked|kAudioFormatFlagIsNonInterleaved; - -#ifdef __LITTLE_ENDIAN__ - /* relax */ -#else - streamFormat.mFormatFlags |= kAudioFormatFlagIsBigEndian; -#endif - - streamFormat.mBitsPerChannel = 32; - streamFormat.mFramesPerPacket = 1; - - // subject to later modification as we discover channel counts - - streamFormat.mBytesPerPacket = 4; - streamFormat.mBytesPerFrame = 4; - streamFormat.mChannelsPerFrame = 1; - - format_set = 0; - - if (_set_block_size (_session.get_block_size())) { - error << _("AUPlugin: cannot set processing block size") << endmsg; - throw failed_constructor(); - } - - discover_parameters (); - - Plugin::setup_controls (); -} - -void -AUPlugin::discover_parameters () -{ - /* discover writable parameters */ - - AudioUnitScope scopes[] = { - kAudioUnitScope_Global, - kAudioUnitScope_Output, - kAudioUnitScope_Input - }; - - descriptors.clear (); - - for (uint32_t i = 0; i < sizeof (scopes) / sizeof (scopes[0]); ++i) { - - AUParamInfo param_info (unit->AU(), false, false, scopes[i]); - - for (uint32_t i = 0; i < param_info.NumParams(); ++i) { - - AUParameterDescriptor d; - - d.id = param_info.ParamID (i); - - const CAAUParameter* param = param_info.GetParamInfo (d.id); - const AudioUnitParameterInfo& info (param->ParamInfo()); - - const int len = CFStringGetLength (param->GetName());; - char local_buffer[len*2]; - Boolean good = CFStringGetCString(param->GetName(),local_buffer,len*2,kCFStringEncodingMacRoman); - if (!good) { - d.label = "???"; - } else { - d.label = local_buffer; - } - - d.scope = param_info.GetScope (); - d.element = param_info.GetElement (); - - /* info.units to consider */ - /* - kAudioUnitParameterUnit_Generic = 0 - kAudioUnitParameterUnit_Indexed = 1 - kAudioUnitParameterUnit_Boolean = 2 - kAudioUnitParameterUnit_Percent = 3 - kAudioUnitParameterUnit_Seconds = 4 - kAudioUnitParameterUnit_SampleFrames = 5 - kAudioUnitParameterUnit_Phase = 6 - kAudioUnitParameterUnit_Rate = 7 - kAudioUnitParameterUnit_Hertz = 8 - kAudioUnitParameterUnit_Cents = 9 - kAudioUnitParameterUnit_RelativeSemiTones = 10 - kAudioUnitParameterUnit_MIDINoteNumber = 11 - kAudioUnitParameterUnit_MIDIController = 12 - kAudioUnitParameterUnit_Decibels = 13 - kAudioUnitParameterUnit_LinearGain = 14 - kAudioUnitParameterUnit_Degrees = 15 - kAudioUnitParameterUnit_EqualPowerCrossfade = 16 - kAudioUnitParameterUnit_MixerFaderCurve1 = 17 - kAudioUnitParameterUnit_Pan = 18 - kAudioUnitParameterUnit_Meters = 19 - kAudioUnitParameterUnit_AbsoluteCents = 20 - kAudioUnitParameterUnit_Octaves = 21 - kAudioUnitParameterUnit_BPM = 22 - kAudioUnitParameterUnit_Beats = 23 - kAudioUnitParameterUnit_Milliseconds = 24 - kAudioUnitParameterUnit_Ratio = 25 - */ - - /* info.flags to consider */ - - /* - - kAudioUnitParameterFlag_CFNameRelease = (1L << 4) - kAudioUnitParameterFlag_HasClump = (1L << 20) - kAudioUnitParameterFlag_HasName = (1L << 21) - kAudioUnitParameterFlag_DisplayLogarithmic = (1L << 22) - kAudioUnitParameterFlag_IsHighResolution = (1L << 23) - kAudioUnitParameterFlag_NonRealTime = (1L << 24) - kAudioUnitParameterFlag_CanRamp = (1L << 25) - kAudioUnitParameterFlag_ExpertMode = (1L << 26) - kAudioUnitParameterFlag_HasCFNameString = (1L << 27) - kAudioUnitParameterFlag_IsGlobalMeta = (1L << 28) - kAudioUnitParameterFlag_IsElementMeta = (1L << 29) - kAudioUnitParameterFlag_IsReadable = (1L << 30) - kAudioUnitParameterFlag_IsWritable = (1L << 31) - */ - - d.lower = info.minValue; - d.upper = info.maxValue; - d.default_value = info.defaultValue; - - d.integer_step = (info.unit & kAudioUnitParameterUnit_Indexed); - d.toggled = (info.unit & kAudioUnitParameterUnit_Boolean) || - (d.integer_step && ((d.upper - d.lower) == 1.0)); - d.sr_dependent = (info.unit & kAudioUnitParameterUnit_SampleFrames); - d.automatable = !d.toggled && - !(info.flags & kAudioUnitParameterFlag_NonRealTime) && - (info.flags & kAudioUnitParameterFlag_IsWritable); - - d.logarithmic = (info.flags & kAudioUnitParameterFlag_DisplayLogarithmic); - d.unit = info.unit; - - d.step = 1.0; - d.smallstep = 0.1; - d.largestep = 10.0; - d.min_unbound = 0; // lower is bound - d.max_unbound = 0; // upper is bound - - descriptors.push_back (d); - } - } -} - - -string -AUPlugin::unique_id () const -{ - return AUPluginInfo::stringify_descriptor (comp->Desc()); -} - -const char * -AUPlugin::label () const -{ - return _info->name.c_str(); -} - -uint32_t -AUPlugin::parameter_count () const -{ - return descriptors.size(); -} - -float -AUPlugin::default_value (uint32_t port) -{ - if (port < descriptors.size()) { - return descriptors[port].default_value; - } - - return 0; -} - -nframes_t -AUPlugin::signal_latency () const -{ - if (_user_latency) { - return _user_latency; - } - - return unit->Latency() * _session.frame_rate(); -} - -void -AUPlugin::set_parameter (uint32_t which, float val) -{ - if (which < descriptors.size()) { - const AUParameterDescriptor& d (descriptors[which]); - unit->SetParameter (d.id, d.scope, d.element, val); - } -} - -float -AUPlugin::get_parameter (uint32_t which) const -{ - float val = 0.0; - if (which < descriptors.size()) { - const AUParameterDescriptor& d (descriptors[which]); - unit->GetParameter(d.id, d.scope, d.element, val); - } - return val; -} - -int -AUPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& pd) const -{ - if (which < descriptors.size()) { - pd = descriptors[which]; - return 0; - } - return -1; -} - -uint32_t -AUPlugin::nth_parameter (uint32_t which, bool& ok) const -{ - if (which < descriptors.size()) { - ok = true; - return which; - } - ok = false; - return 0; -} - -void -AUPlugin::activate () -{ - if (!initialized) { - OSErr err; - if ((err = unit->Initialize()) != noErr) { - error << string_compose (_("AUPlugin: %1 cannot initialize plugin (err = %2)"), name(), err) << endmsg; - } else { - frames_processed = 0; - initialized = true; - } - } -} - -void -AUPlugin::deactivate () -{ - unit->GlobalReset (); -} - -void -AUPlugin::set_block_size (nframes_t nframes) -{ - _set_block_size (nframes); -} - -int -AUPlugin::_set_block_size (nframes_t nframes) -{ - bool was_initialized = initialized; - UInt32 numFrames = nframes; - OSErr err; - - if (initialized) { - unit->Uninitialize (); - } - - if ((err = unit->SetProperty (kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, - 0, &numFrames, sizeof (numFrames))) != noErr) { - cerr << "cannot set max frames (err = " << err << ')' << endl; - return -1; - } - - if (was_initialized) { - activate (); - } - - return 0; -} - -int32_t -AUPlugin::can_support_input_configuration (int32_t in) -{ - streamFormat.mChannelsPerFrame = in; - /* apple says that for non-interleaved data, these - values always refer to a single channel. - */ - streamFormat.mBytesPerPacket = 4; - streamFormat.mBytesPerFrame = 4; - - if (set_input_format () == 0) { - return 1; - } else { - return -1; - } -} - -int -AUPlugin::set_input_format () -{ - return set_stream_format (kAudioUnitScope_Input, input_elements); -} - -int -AUPlugin::set_output_format () -{ - return set_stream_format (kAudioUnitScope_Output, output_elements); -} - -int -AUPlugin::set_stream_format (int scope, uint32_t cnt) -{ - OSErr result; - - for (uint32_t i = 0; i < cnt; ++i) { - if ((result = unit->SetFormat (scope, i, streamFormat)) != 0) { - error << string_compose (_("AUPlugin: could not set stream format for %1/%2 (err = %3)"), - (scope == kAudioUnitScope_Input ? "input" : "output"), i, result) << endmsg; - return -1; - } - } - - if (scope == kAudioUnitScope_Input) { - format_set |= 0x1; - } else { - format_set |= 0x2; - } - - return 0; -} - -int32_t -AUPlugin::compute_output_streams (int32_t nplugins) -{ - /* we will never replicate AU plugins - either they can do the I/O we need - or not. thus, we can ignore nplugins entirely. - */ - - if (set_output_format() == 0) { - - if (buffers) { - free (buffers); - buffers = 0; - } - - buffers = (AudioBufferList *) malloc (offsetof(AudioBufferList, mBuffers) + - streamFormat.mChannelsPerFrame * sizeof(AudioBuffer)); - - Glib::Mutex::Lock em (_session.engine().process_lock()); - IO::MoreOutputs (streamFormat.mChannelsPerFrame); - - return streamFormat.mChannelsPerFrame; - } else { - return -1; - } -} - -uint32_t -AUPlugin::output_streams() const -{ - if (!(format_set & 0x2)) { - warning << string_compose (_("AUPlugin: %1 output_streams() called without any format set!"), name()) << endmsg; - return 1; - } - - return streamFormat.mChannelsPerFrame; -} - - -uint32_t -AUPlugin::input_streams() const -{ - if (!(format_set & 0x1)) { - warning << _("AUPlugin: input_streams() called without any format set!") << endmsg; - return 1; - } - return streamFormat.mChannelsPerFrame; -} - -OSStatus -AUPlugin::render_callback(AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, - AudioBufferList* ioData) -{ - /* not much to do - the data is already in the buffers given to us in connect_and_run() */ - - if (current_maxbuf == 0) { - error << _("AUPlugin: render callback called illegally!") << endmsg; - return kAudioUnitErr_CannotDoInCurrentContext; - } - - for (uint32_t i = 0; i < current_maxbuf; ++i) { - ioData->mBuffers[i].mNumberChannels = 1; - ioData->mBuffers[i].mDataByteSize = sizeof (Sample) * inNumberFrames; - ioData->mBuffers[i].mData = (*current_buffers)[i] + cb_offset + current_offset; - } - - cb_offset += inNumberFrames; - - return noErr; -} - -int -AUPlugin::connect_and_run (vector& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset) -{ - AudioUnitRenderActionFlags flags = 0; - AudioTimeStamp ts; - - current_buffers = &bufs; - current_maxbuf = maxbuf; - current_offset = offset; - cb_offset = 0; - - buffers->mNumberBuffers = maxbuf; - - for (uint32_t i = 0; i < maxbuf; ++i) { - buffers->mBuffers[i].mNumberChannels = 1; - buffers->mBuffers[i].mDataByteSize = nframes * sizeof (Sample); - buffers->mBuffers[i].mData = 0; - } - - ts.mSampleTime = frames_processed; - ts.mFlags = kAudioTimeStampSampleTimeValid; - - if (unit->Render (&flags, &ts, 0, nframes, buffers) == noErr) { - - current_maxbuf = 0; - frames_processed += nframes; - - for (uint32_t i = 0; i < maxbuf; ++i) { - if (bufs[i] + offset != buffers->mBuffers[i].mData) { - memcpy (bufs[i]+offset, buffers->mBuffers[i].mData, nframes * sizeof (Sample)); - } - } - return 0; - } - - return -1; -} - -set -AUPlugin::automatable() const -{ - set automates; - - for (uint32_t i = 0; i < descriptors.size(); ++i) { - if (descriptors[i].automatable) { - automates.insert (i); - } - } - - return automates; -} - -string -AUPlugin::describe_parameter (uint32_t param) -{ - return descriptors[param].label; -} - -void -AUPlugin::print_parameter (uint32_t param, char* buf, uint32_t len) const -{ - // NameValue stuff here -} - -bool -AUPlugin::parameter_is_audio (uint32_t) const -{ - return false; -} - -bool -AUPlugin::parameter_is_control (uint32_t) const -{ - return true; -} - -bool -AUPlugin::parameter_is_input (uint32_t) const -{ - return false; -} - -bool -AUPlugin::parameter_is_output (uint32_t) const -{ - return false; -} - -XMLNode& -AUPlugin::get_state() -{ - XMLNode *root = new XMLNode (state_node_name()); - LocaleGuard lg (X_("POSIX")); - return *root; -} - -int -AUPlugin::set_state(const XMLNode& node) -{ - return -1; -} - -bool -AUPlugin::save_preset (string name) -{ - return false; -} - -bool -AUPlugin::load_preset (const string preset_label) -{ - return false; -} - -vector -AUPlugin::get_presets () -{ - vector presets; - - return presets; -} - -bool -AUPlugin::has_editor () const -{ - // even if the plugin doesn't have its own editor, the AU API can be used - // to create one that looks native. - return true; -} - -AUPluginInfo::AUPluginInfo (boost::shared_ptr d) - : descriptor (d) -{ - -} - -AUPluginInfo::~AUPluginInfo () -{ -} - -PluginPtr -AUPluginInfo::load (Session& session) -{ - try { - PluginPtr plugin; - - boost::shared_ptr comp (new CAComponent(*descriptor)); - - if (!comp->IsValid()) { - error << ("AudioUnit: not a valid Component") << endmsg; - } else { - plugin.reset (new AUPlugin (session.engine(), session, comp)); - } - - plugin->set_info (PluginInfoPtr (new AUPluginInfo (*this))); - return plugin; - } - - catch (failed_constructor &err) { - return PluginPtr ((Plugin*) 0); - } -} - -PluginInfoList -AUPluginInfo::discover () -{ - PluginInfoList plugs; - - discover_fx (plugs); - discover_music (plugs); - - return plugs; -} - -void -AUPluginInfo::discover_music (PluginInfoList& plugs) -{ - CAComponentDescription desc; - desc.componentFlags = 0; - desc.componentFlagsMask = 0; - desc.componentSubType = 0; - desc.componentManufacturer = 0; - desc.componentType = kAudioUnitType_MusicEffect; - - discover_by_description (plugs, desc); -} - -void -AUPluginInfo::discover_fx (PluginInfoList& plugs) -{ - CAComponentDescription desc; - desc.componentFlags = 0; - desc.componentFlagsMask = 0; - desc.componentSubType = 0; - desc.componentManufacturer = 0; - desc.componentType = kAudioUnitType_Effect; - - discover_by_description (plugs, desc); -} - -void -AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescription& desc) -{ - Component comp = 0; - - comp = FindNextComponent (NULL, &desc); - - while (comp != NULL) { - CAComponentDescription temp; - GetComponentInfo (comp, &temp, NULL, NULL, NULL); - - AUPluginInfoPtr info (new AUPluginInfo - (boost::shared_ptr (new CAComponentDescription(temp)))); - - /* no panners, format converters or i/o AU's for our purposes - */ - - switch (info->descriptor->Type()) { - case kAudioUnitType_Panner: - case kAudioUnitType_OfflineEffect: - case kAudioUnitType_FormatConverter: - continue; - default: - break; - } - - switch (info->descriptor->SubType()) { - case kAudioUnitSubType_DefaultOutput: - case kAudioUnitSubType_SystemOutput: - case kAudioUnitSubType_GenericOutput: - case kAudioUnitSubType_AUConverter: - continue; - break; - - case kAudioUnitSubType_DLSSynth: - info->category = "DLSSynth"; - break; - - case kAudioUnitType_MusicEffect: - info->category = "MusicEffect"; - break; - - case kAudioUnitSubType_Varispeed: - info->category = "Varispeed"; - break; - - case kAudioUnitSubType_Delay: - info->category = "Delay"; - break; - - case kAudioUnitSubType_LowPassFilter: - info->category = "LowPassFilter"; - break; - - case kAudioUnitSubType_HighPassFilter: - info->category = "HighPassFilter"; - break; - - case kAudioUnitSubType_BandPassFilter: - info->category = "BandPassFilter"; - break; - - case kAudioUnitSubType_HighShelfFilter: - info->category = "HighShelfFilter"; - break; - - case kAudioUnitSubType_LowShelfFilter: - info->category = "LowShelfFilter"; - break; - - case kAudioUnitSubType_ParametricEQ: - info->category = "ParametricEQ"; - break; - - case kAudioUnitSubType_GraphicEQ: - info->category = "GraphicEQ"; - break; - - case kAudioUnitSubType_PeakLimiter: - info->category = "PeakLimiter"; - break; - - case kAudioUnitSubType_DynamicsProcessor: - info->category = "DynamicsProcessor"; - break; - - case kAudioUnitSubType_MultiBandCompressor: - info->category = "MultiBandCompressor"; - break; - - case kAudioUnitSubType_MatrixReverb: - info->category = "MatrixReverb"; - break; - - case kAudioUnitType_Mixer: - info->category = "Mixer"; - break; - - case kAudioUnitSubType_StereoMixer: - info->category = "StereoMixer"; - break; - - case kAudioUnitSubType_3DMixer: - info->category = "3DMixer"; - break; - - case kAudioUnitSubType_MatrixMixer: - info->category = "MatrixMixer"; - break; - - default: - info->category = ""; - } - - AUPluginInfo::get_names (temp, info->name, info->creator); - - info->type = ARDOUR::AudioUnit; - info->unique_id = stringify_descriptor (*info->descriptor); - - /* mark the plugin as having flexible i/o */ - - info->n_inputs = -1; - info->n_outputs = -1; - - plugs.push_back (info); - - comp = FindNextComponent (comp, &desc); - } -} - -void -AUPluginInfo::get_names (CAComponentDescription& comp_desc, std::string& name, Glib::ustring& maker) -{ - CFStringRef itemName = NULL; - - // Marc Poirier-style item name - CAComponent auComponent (comp_desc); - if (auComponent.IsValid()) { - CAComponentDescription dummydesc; - Handle nameHandle = NewHandle(sizeof(void*)); - if (nameHandle != NULL) { - OSErr err = GetComponentInfo(auComponent.Comp(), &dummydesc, nameHandle, NULL, NULL); - if (err == noErr) { - ConstStr255Param nameString = (ConstStr255Param) (*nameHandle); - if (nameString != NULL) { - itemName = CFStringCreateWithPascalString(kCFAllocatorDefault, nameString, CFStringGetSystemEncoding()); - } - } - DisposeHandle(nameHandle); - } - } - - // if Marc-style fails, do the original way - if (itemName == NULL) { - CFStringRef compTypeString = UTCreateStringForOSType(comp_desc.componentType); - CFStringRef compSubTypeString = UTCreateStringForOSType(comp_desc.componentSubType); - CFStringRef compManufacturerString = UTCreateStringForOSType(comp_desc.componentManufacturer); - - itemName = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ - %@ - %@"), - compTypeString, compManufacturerString, compSubTypeString); - - if (compTypeString != NULL) - CFRelease(compTypeString); - if (compSubTypeString != NULL) - CFRelease(compSubTypeString); - if (compManufacturerString != NULL) - CFRelease(compManufacturerString); - } - - string str = CFStringRefToStdString(itemName); - string::size_type colon = str.find (':'); - - if (colon) { - name = str.substr (colon+1); - maker = str.substr (0, colon); - // strip_whitespace_edges (maker); - // strip_whitespace_edges (name); - } else { - name = str; - maker = "unknown"; - } -} - -// from CAComponentDescription.cpp (in libs/appleutility in ardour source) -extern char *StringForOSType (OSType t, char *writeLocation); - -std::string -AUPluginInfo::stringify_descriptor (const CAComponentDescription& desc) -{ - char str[24]; - stringstream s; - - s << StringForOSType (desc.Type(), str); - s << " - "; - - s << StringForOSType (desc.SubType(), str); - s << " - "; - - s << StringForOSType (desc.Manu(), str); - - return s.str(); -} diff --git a/libs/ardour/audioanalyser.cc b/libs/ardour/audioanalyser.cc deleted file mode 100644 index 98c4206301..0000000000 --- a/libs/ardour/audioanalyser.cc +++ /dev/null @@ -1,166 +0,0 @@ -#include -#include -#include -#include -#include // for g_remove() - -#include - -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace Vamp; -using namespace PBD; -using namespace ARDOUR; - -AudioAnalyser::AudioAnalyser (float sr, AnalysisPluginKey key) - : sample_rate (sr) - , plugin_key (key) -{ - /* create VAMP plugin and initialize */ - - if (initialize_plugin (plugin_key, sample_rate)) { - error << string_compose (_("cannot load VAMP plugin \"%1\""), key) << endmsg; - throw failed_constructor(); - } -} - -AudioAnalyser::~AudioAnalyser () -{ - delete plugin; -} - -int -AudioAnalyser::initialize_plugin (AnalysisPluginKey key, float sr) -{ - using namespace Vamp::HostExt; - - PluginLoader* loader (PluginLoader::getInstance()); - - plugin = loader->loadPlugin (key, sr, PluginLoader::ADAPT_ALL); - - if (!plugin) { - error << string_compose (_("VAMP Plugin \"%1\" could not be loaded"), key) << endmsg; - return -1; - } - - /* we asked for the buffering adapter, so set the blocksize to - something that makes for efficient disk i/o - */ - - bufsize = 65536; - stepsize = bufsize; - - if (plugin->getMinChannelCount() > 1) { - delete plugin; - return -1; - } - - if (!plugin->initialise (1, stepsize, bufsize)) { - delete plugin; - return -1; - } - - return 0; -} - -void -AudioAnalyser::reset () -{ - if (plugin) { - plugin->reset (); - } -} - -int -AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel) -{ - ofstream ofile; - Plugin::FeatureSet features; - int ret = -1; - bool done = false; - Sample* data = 0; - nframes64_t len = src->readable_length(); - nframes64_t pos = 0; - float* bufs[1] = { 0 }; - string tmp_path; - - if (!path.empty()) { - - /* store data in tmp file, not the real one */ - - tmp_path = path; - tmp_path += ".tmp"; - - ofile.open (tmp_path.c_str()); - if (!ofile) { - goto out; - } - } - - data = new Sample[bufsize]; - bufs[0] = data; - - while (!done) { - - nframes64_t to_read; - - /* read from source */ - - to_read = min ((len - pos), bufsize); - - if (src->read (data, pos, to_read, channel) != to_read) { - goto out; - } - - /* zero fill buffer if necessary */ - - if (to_read != bufsize) { - memset (data + to_read, 0, (bufsize - to_read) * sizeof (Sample)); - } - - features = plugin->process (bufs, RealTime::fromSeconds ((double) pos / sample_rate)); - - if (use_features (features, (path.empty() ? 0 : &ofile))) { - goto out; - } - - pos += min (stepsize, to_read); - - if (pos >= len) { - done = true; - } - } - - /* finish up VAMP plugin */ - - features = plugin->getRemainingFeatures (); - - if (use_features (features, (path.empty() ? &ofile : 0))) { - goto out; - } - - ret = 0; - - out: - /* works even if it has not been opened */ - ofile.close (); - - if (ret) { - g_remove (tmp_path.c_str()); - } else if (!path.empty()) { - /* move the data file to the requested path */ - g_rename (tmp_path.c_str(), path.c_str()); - } - - if (data) { - delete [] data; - } - - return ret; -} - diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc deleted file mode 100644 index 8bbed46733..0000000000 --- a/libs/ardour/audioengine.cc +++ /dev/null @@ -1,1379 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef VST_SUPPORT -#include -#endif - -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -gint AudioEngine::m_meter_exit; - -static void -ardour_jack_error (const char* msg) -{ - error << "JACK: " << msg << endmsg; -} - -AudioEngine::AudioEngine (string client_name) - : ports (new Ports) -{ - session = 0; - session_remove_pending = false; - _running = false; - _has_run = false; - last_monitor_check = 0; - monitor_check_interval = max_frames; - _processed_frames = 0; - _freewheeling = false; - _usecs_per_cycle = 0; - _jack = 0; - _frame_rate = 0; - _buffer_size = 0; - _freewheeling = false; - _freewheel_thread_registered = false; - - m_meter_thread = 0; - g_atomic_int_set (&m_meter_exit, 0); - - if (connect_to_jack (client_name)) { - throw NoBackendAvailable (); - } - Port::set_engine (this); -} - -AudioEngine::~AudioEngine () -{ - { - Glib::Mutex::Lock tm (_process_lock); - session_removed.signal (); - - if (_running) { - jack_client_close (_jack); - } - - stop_metering_thread (); - } -} - -jack_client_t* -AudioEngine::jack() const -{ - return _jack; -} - -void -_thread_init_callback (void *arg) -{ - /* make sure that anybody who needs to know about this thread - knows about it. - */ - - PBD::ThreadCreatedWithRequestSize (pthread_self(), X_("Audioengine"), 4096); - MIDI::JACK_MidiPort::set_process_thread (pthread_self()); -} - -int -AudioEngine::start () -{ - if (!_running) { - - if (session) { - nframes_t blocksize = jack_get_buffer_size (_jack); - - BootMessage (_("Connect session to engine")); - - session->set_block_size (blocksize); - session->set_frame_rate (jack_get_sample_rate (_jack)); - - /* page in as much of the session process code as we - can before we really start running. - */ - - session->process (blocksize); - session->process (blocksize); - session->process (blocksize); - session->process (blocksize); - session->process (blocksize); - session->process (blocksize); - session->process (blocksize); - session->process (blocksize); - } - - _processed_frames = 0; - last_monitor_check = 0; - - jack_on_shutdown (_jack, halted, this); - jack_set_graph_order_callback (_jack, _graph_order_callback, this); - jack_set_thread_init_callback (_jack, _thread_init_callback, this); - jack_set_process_callback (_jack, _process_callback, this); - jack_set_sample_rate_callback (_jack, _sample_rate_callback, this); - jack_set_buffer_size_callback (_jack, _bufsize_callback, this); - jack_set_xrun_callback (_jack, _xrun_callback, this); - jack_set_sync_callback (_jack, _jack_sync_callback, this); - jack_set_freewheel_callback (_jack, _freewheel_callback, this); - - if (Config->get_jack_time_master()) { - jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this); - } - - if (jack_activate (_jack) == 0) { - _running = true; - _has_run = true; - Running(); /* EMIT SIGNAL */ - } else { - // error << _("cannot activate JACK client") << endmsg; - } - - start_metering_thread(); - } - - return _running ? 0 : -1; -} - -int -AudioEngine::stop (bool forever) -{ - if (_running) { - _running = false; - stop_metering_thread (); - if (forever) { - jack_client_t* foo = _jack; - _jack = 0; - jack_client_close (foo); - } else { - jack_deactivate (_jack); - } - Stopped(); /* EMIT SIGNAL */ - } - - return _running ? -1 : 0; -} - - -bool -AudioEngine::get_sync_offset (nframes_t& offset) const -{ - -#ifdef HAVE_JACK_VIDEO_SUPPORT - - jack_position_t pos; - - (void) jack_transport_query (_jack, &pos); - - if (pos.valid & JackVideoFrameOffset) { - offset = pos.video_offset; - return true; - } - -#endif - - return false; -} - -void -AudioEngine::_jack_timebase_callback (jack_transport_state_t state, nframes_t nframes, - jack_position_t* pos, int new_position, void *arg) -{ - static_cast (arg)->jack_timebase_callback (state, nframes, pos, new_position); -} - -void -AudioEngine::jack_timebase_callback (jack_transport_state_t state, nframes_t nframes, - jack_position_t* pos, int new_position) -{ - if (_jack && session && session->synced_to_jack()) { - session->jack_timebase_callback (state, nframes, pos, new_position); - } -} - -int -AudioEngine::_jack_sync_callback (jack_transport_state_t state, jack_position_t* pos, void* arg) -{ - return static_cast (arg)->jack_sync_callback (state, pos); -} - -int -AudioEngine::jack_sync_callback (jack_transport_state_t state, jack_position_t* pos) -{ - if (_jack && session) { - return session->jack_sync_callback (state, pos); - } - - return true; -} - -int -AudioEngine::_xrun_callback (void *arg) -{ - AudioEngine* ae = static_cast (arg); - if (ae->jack()) { - ae->Xrun (); /* EMIT SIGNAL */ - } - return 0; -} - -int -AudioEngine::_graph_order_callback (void *arg) -{ - AudioEngine* ae = static_cast (arg); - if (ae->jack()) { - ae->GraphReordered (); /* EMIT SIGNAL */ - } - return 0; -} - -/** Wrapped which is called by JACK as its process callback. It is just - * here to get us back into C++ land by calling AudioEngine::process_callback() - * @param nframes Number of frames passed by JACK. - * @param arg User argument passed by JACK, which will be the AudioEngine*. - */ -int -AudioEngine::_process_callback (nframes_t nframes, void *arg) -{ - return static_cast (arg)->process_callback (nframes); -} - -void -AudioEngine::_freewheel_callback (int onoff, void *arg) -{ - static_cast(arg)->_freewheeling = onoff; -} - -/** Method called by JACK (via _process_callback) which says that there - * is work to be done. - * @param nframes Number of frames to process. - */ -int -AudioEngine::process_callback (nframes_t nframes) -{ - // CycleTimer ct ("AudioEngine::process"); - Glib::Mutex::Lock tm (_process_lock, Glib::TRY_LOCK); - - /// The number of frames that will have been processed when we've finished - nframes_t next_processed_frames; - - /* handle wrap around of total frames counter */ - - if (max_frames - _processed_frames < nframes) { - next_processed_frames = nframes - (max_frames - _processed_frames); - } else { - next_processed_frames = _processed_frames + nframes; - } - - if (!tm.locked() || session == 0) { - /* return having done nothing */ - _processed_frames = next_processed_frames; - return 0; - } - - if (session_remove_pending) { - /* perform the actual session removal */ - session = 0; - session_remove_pending = false; - session_removed.signal(); - _processed_frames = next_processed_frames; - return 0; - } - - if (_freewheeling) { - /* emit the Freewheel signal and stop freewheeling in the event of trouble */ - if (Freewheel (nframes)) { - cerr << "Freewheeling returned non-zero!\n"; - _freewheeling = false; - jack_set_freewheel (_jack, false); - } - return 0; - } - - boost::shared_ptr p = ports.reader(); - - // Prepare ports (ie read data if necessary) - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - (*i)->cycle_start (nframes, 0); - } - - if (session) { - session->process (nframes); - } - - // Finalize ports (ie write data if necessary) - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - (*i)->cycle_end (nframes, 0); - } - - if (!_running) { - _processed_frames = next_processed_frames; - return 0; - } - - if (last_monitor_check + monitor_check_interval < next_processed_frames) { - - boost::shared_ptr p = ports.reader(); - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - - Port *port = (*i); - bool x; - - if (port->_last_monitor != (x = port->monitoring_input ())) { - port->_last_monitor = x; - /* XXX I think this is dangerous, due to - a likely mutex in the signal handlers ... - */ - port->MonitorInputChanged (x); /* EMIT SIGNAL */ - } - } - last_monitor_check = next_processed_frames; - } - - if (session->silent()) { - - boost::shared_ptr p = ports.reader(); - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - - Port *port = (*i); - - if (port->sends_output()) { - port->get_buffer().silence(nframes); - } - } - } - - _processed_frames = next_processed_frames; - return 0; -} - -int -AudioEngine::_sample_rate_callback (nframes_t nframes, void *arg) -{ - return static_cast (arg)->jack_sample_rate_callback (nframes); -} - -int -AudioEngine::jack_sample_rate_callback (nframes_t nframes) -{ - _frame_rate = nframes; - _usecs_per_cycle = (int) floor ((((double) frames_per_cycle() / nframes)) * 1000000.0); - - /* check for monitor input change every 1/10th of second */ - - monitor_check_interval = nframes / 10; - last_monitor_check = 0; - - if (session) { - session->set_frame_rate (nframes); - } - - SampleRateChanged (nframes); /* EMIT SIGNAL */ - - return 0; -} - -int -AudioEngine::_bufsize_callback (nframes_t nframes, void *arg) -{ - return static_cast (arg)->jack_bufsize_callback (nframes); -} - -int -AudioEngine::jack_bufsize_callback (nframes_t nframes) -{ - _buffer_size = nframes; - _usecs_per_cycle = (int) floor ((((double) nframes / frame_rate())) * 1000000.0); - last_monitor_check = 0; - - boost::shared_ptr p = ports.reader(); - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - (*i)->reset(); - } - - if (session) { - session->set_block_size (_buffer_size); - } - - return 0; -} - -void -AudioEngine::stop_metering_thread () -{ - if (m_meter_thread) { - g_atomic_int_set (&m_meter_exit, 1); - m_meter_thread->join (); - m_meter_thread = 0; - } -} - -void -AudioEngine::start_metering_thread () -{ - if (m_meter_thread == 0) { - g_atomic_int_set (&m_meter_exit, 0); - m_meter_thread = Glib::Thread::create (sigc::mem_fun(this, &AudioEngine::meter_thread), - 500000, true, true, Glib::THREAD_PRIORITY_NORMAL); - } -} - -void -AudioEngine::meter_thread () -{ - while (true) { - Glib::usleep (10000); /* 1/100th sec interval */ - if (g_atomic_int_get(&m_meter_exit)) { - break; - } - IO::update_meters (); - } -} - -void -AudioEngine::set_session (Session *s) -{ - Glib::Mutex::Lock pl (_process_lock); - - if (!session) { - - session = s; - - nframes_t blocksize = jack_get_buffer_size (_jack); - - /* page in as much of the session process code as we - can before we really start running. - */ - - boost::shared_ptr p = ports.reader(); - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - (*i)->cycle_start (blocksize, 0); - } - - s->process (blocksize); - s->process (blocksize); - s->process (blocksize); - s->process (blocksize); - s->process (blocksize); - s->process (blocksize); - s->process (blocksize); - s->process (blocksize); - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - (*i)->cycle_end (blocksize, 0); - } - } -} - -void -AudioEngine::remove_session () -{ - Glib::Mutex::Lock lm (_process_lock); - - if (_running) { - - if (session) { - session_remove_pending = true; - session_removed.wait(_process_lock); - } - - } else { - session = 0; - } - - //FIXME: Preliminary bugfix for http://tracker.ardour.org/view.php?id=1985 - //remove_all_ports (); -} - -void -AudioEngine::port_registration_failure (const std::string& portname) -{ - string full_portname = jack_client_name; - full_portname += ':'; - full_portname += portname; - - - jack_port_t* p = jack_port_by_name (_jack, full_portname.c_str()); - string reason; - - if (p) { - reason = _("a port with this name already exists: check for duplicated track/bus names"); - } else { - reason = _("unknown error"); - } - - throw PortRegistrationFailure (string_compose (_("AudioEngine: cannot register port \"%1\": %2"), portname, reason).c_str()); -} - -Port * -AudioEngine::register_port (DataType dtype, const string& portname, bool input, bool publish) -{ - Port* newport = 0; - - /*cerr << "trying to register port with name " << portname << endl;*/ - try { - if (dtype == DataType::AUDIO) { - newport = new AudioPort (portname, (input ? Port::IsInput : Port::IsOutput), publish, frames_per_cycle()); - } else if (dtype == DataType::MIDI) { - newport = new MidiPort (portname, (input ? Port::IsInput : Port::IsOutput), publish, frames_per_cycle()); - } else { - throw unknown_type(); - } - - /*cerr << "successfully got port " << portname << " with address " << newport << endl;*/ - - RCUWriter writer (ports); - boost::shared_ptr ps = writer.get_copy (); - /*cerr << "Address of ports list: " << ps << endl - << "Ports set size before insert: " << ps->size() << endl;*/ - ps->insert (ps->begin(), newport); - /*cerr << "Ports set size after insert: " << ps->size() << endl;*/ - - /* writer goes out of scope, forces update */ - - return newport; - } - - catch (...) { - throw PortRegistrationFailure("unable to create port (unknown type?)"); - } -} - -Port* -AudioEngine::get_port (const std::string& full_name) -{ - boost::shared_ptr p = ports.reader(); - - for (Ports::iterator i = p->begin(); i != p->end(); ++i) { - //cerr << "comparing port name '" << (*i)->name() << "' with '" << full_name << "'" << endl; - if ((*i)->name() == full_name) { - return *i; - } - } - return 0; -} - - -Port * -AudioEngine::register_input_port (DataType type, const string& portname, bool publish) -{ - return register_port (type, portname, true, publish); -} - -Port * -AudioEngine::register_output_port (DataType type, const string& portname, bool publish) -{ - return register_port (type, portname, false, publish); -} - -int -AudioEngine::unregister_port (Port& port) -{ - /* caller must hold process lock */ - - cerr << "about to unregister Port xx x" << &port << "\n"; - - if (!_running) { - /* probably happening when the engine has been halted by JACK, - in which case, there is nothing we can do here. - */ - cerr << "not running\n"; - return 0; - } - - { - cerr << "before getcopy\n"; - - RCUWriter writer (ports); - boost::shared_ptr ps = writer.get_copy (); - - cerr << "Ports set size: " << ps.get()->size() << endl; - - for (Ports::iterator i = ps->begin(); i != ps->end(); ++i) { - cerr << "before delete" << endl; - if ((*i) == &port) { - cerr << "About to delete " << &port << endl; - delete *i; - ps->erase (i); - cerr << "After erasing ports size: " << ps->size(); - break; - } - } - - /* writer goes out of scope, forces update */ - } - - cerr << "before remove_connections\n"; - remove_connections_for (port); - - return 0; -} - -int -AudioEngine::connect (const string& source, const string& destination) -{ - int ret; - - if (!_running) { - if (!_has_run) { - fatal << _("connect called before engine was started") << endmsg; - /*NOTREACHED*/ - } else { - return -1; - } - } - - string s = make_port_name_non_relative (source); - string d = make_port_name_non_relative (destination); - - //cerr << "Trying to connect source: " << s << " with destination " << d << endl; - - Port* src = get_port (s); - Port* dst = get_port (d); - - if (src && dst) { - - /* both ports are known to us, so do the internal connect stuff */ - - if ((ret = src->connect (*dst)) == 0) { - ret = dst->connect (*src); - } - - } else if (src || dst) { - - /* one port is known to us, try to connect it to something external */ - - PortConnectableByName* pcn; - string other; - - if (src) { - pcn = dynamic_cast(src); - other = d; - } else { - pcn = dynamic_cast(dst); - other = s; - } - - if (pcn) { - ret = pcn->connect (other); - } else { - ret = -1; - } - - } else { - - /* neither port is known to us, and this API isn't intended for use as a general patch bay */ - - ret = -1; - - } - - if (ret > 0) { - error << string_compose(_("AudioEngine: connection already exists: %1 (%2) to %3 (%4)"), - source, s, destination, d) - << endmsg; - } else if (ret < 0) { - error << string_compose(_("AudioEngine: cannot connect %1 (%2) to %3 (%4)"), - source, s, destination, d) - << endmsg; - } - - return ret; -} - -int -AudioEngine::disconnect (const string& source, const string& destination) -{ - int ret; - - if (!_running) { - if (!_has_run) { - fatal << _("disconnect called before engine was started") << endmsg; - /*NOTREACHED*/ - } else { - return -1; - } - } - - string s = make_port_name_non_relative (source); - string d = make_port_name_non_relative (destination); - - //cerr << "trying to disconnect port '" << s << "' from port '" << d << endl; - - Port* src = get_port (s); - Port* dst = get_port (d); - - if (src && dst) { - - /* both ports are known to us, so do the internal connect stuff */ - - if ((ret = src->disconnect (*dst)) == 0) { - ret = dst->disconnect (*src); - } - - } else if (src || dst) { - - /* one port is known to us, try to connect it to something external */ - - - PortConnectableByName* pcn; - string other; - - if (src) { - pcn = dynamic_cast(src); - other = d; - } else { - pcn = dynamic_cast(dst); - other = s; - } - - if (pcn) { - ret = pcn->disconnect (other); - } else { - ret = -1; - } - - } else { - - /* neither port is known to us, and this API isn't intended for use as a general patch bay */ - - ret = -1; - - } - - return ret; -} - -int -AudioEngine::disconnect (Port& port) -{ - if (!_running) { - if (!_has_run) { - fatal << _("disconnect called before engine was started") << endmsg; - /*NOTREACHED*/ - } else { - return -1; - } - } - - return port.disconnect_all (); -} - -ARDOUR::nframes_t -AudioEngine::frame_rate () -{ - if (_jack) { - if (_frame_rate == 0) { - return (_frame_rate = jack_get_sample_rate (_jack)); - } else { - return _frame_rate; - } - } else { - fatal << X_("programming error: AudioEngine::frame_rate() called while disconnected from JACK") - << endmsg; - /*NOTREACHED*/ - return 0; - } -} - -ARDOUR::nframes_t -AudioEngine::frames_per_cycle () -{ - if (_jack) { - if (_buffer_size == 0) { - return (_buffer_size = jack_get_buffer_size (_jack)); - } else { - return _buffer_size; - } - } else { - fatal << X_("programming error: AudioEngine::frame_rate() called while disconnected from JACK") - << endmsg; - /*NOTREACHED*/ - return 0; - } -} - -/** Get a port by name. - * Note this can return NULL, it will NOT create a port if it is not found (any more). - */ -Port * -AudioEngine::get_port_by_name (const string& portname, bool keep) const -{ - Glib::Mutex::Lock lm (_process_lock); - - if (!_running) { - if (!_has_run) { - fatal << _("get_port_by_name() called before engine was started") << endmsg; - /*NOTREACHED*/ - } else { - return 0; - } - } - - boost::shared_ptr pr = ports.reader(); - - for (Ports::iterator i = pr->begin(); i != pr->end(); ++i) { - if (portname == (*i)->name()) { - return (*i); - } - } - - return 0; -} - -const char ** -AudioEngine::get_ports (const string& port_name_pattern, const string& type_name_pattern, uint32_t flags) -{ - if (!_running) { - if (!_has_run) { - fatal << _("get_ports called before engine was started") << endmsg; - /*NOTREACHED*/ - } else { - return 0; - } - } - return jack_get_ports (_jack, port_name_pattern.c_str(), type_name_pattern.c_str(), flags); -} - -void -AudioEngine::halted (void *arg) -{ - AudioEngine* ae = static_cast (arg); - bool was_running = ae->_running; - - ae->stop_metering_thread (); - - ae->_running = false; - ae->_buffer_size = 0; - ae->_frame_rate = 0; - ae->_jack = 0; - - if (was_running) { - ae->Halted(); /* EMIT SIGNAL */ - } -} - -bool -AudioEngine::can_request_hardware_monitoring () -{ - const char ** ports; - - if (!_jack) { - return 0; - } - - if ((ports = jack_get_ports (_jack, NULL, JACK_DEFAULT_AUDIO_TYPE, JackPortCanMonitor)) == 0) { - return false; - } - - free (ports); - - return true; -} - - -uint32_t -AudioEngine::n_physical_outputs () const -{ - const char ** ports; - uint32_t i = 0; - - if (!_jack) { - return 0; - } - - if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsInput)) == 0) { - return 0; - } - - for (i = 0; ports[i]; ++i); - free (ports); - - return i; -} - -uint32_t -AudioEngine::n_physical_inputs () const -{ - const char ** ports; - uint32_t i = 0; - - if (!_jack) { - return 0; - } - - if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsOutput)) == 0) { - return 0; - } - - if (ports) { - for (i = 0; ports[i]; ++i); - free (ports); - } - return i; -} - -void -AudioEngine::get_physical_inputs (vector& ins) -{ - const char ** ports; - uint32_t i = 0; - - if (!_jack) { - return; - } - - if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsOutput)) == 0) { - return; - } - - if (ports) { - for (i = 0; ports[i]; ++i) { - ins.push_back (ports[i]); - } - free (ports); - } -} - -void -AudioEngine::get_physical_outputs (vector& outs) -{ - const char ** ports; - uint32_t i = 0; - - if (!_jack) { - return; - } - - if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsInput)) == 0) { - return; - } - - if (ports) { - for (i = 0; ports[i]; ++i) { - outs.push_back (ports[i]); - } - free (ports); - } -} - -string -AudioEngine::get_nth_physical (DataType type, uint32_t n, int flag) -{ - const char ** ports; - uint32_t i; - string ret; - - assert(type != DataType::NIL); - - if (!_running || !_jack) { - if (!_has_run) { - fatal << _("get_nth_physical called before engine was started") << endmsg; - /*NOTREACHED*/ - } else { - return ""; - } - } - - ports = jack_get_ports (_jack, NULL, type.to_jack_type(), JackPortIsPhysical|flag); - - if (ports == 0) { - return ""; - } - - for (i = 0; i < n && ports[i]; ++i); - - if (ports[i]) { - ret = ports[i]; - } - - free ((char *) ports); - - return ret; -} - -ARDOUR::nframes_t -AudioEngine::get_port_total_latency (const Port& port) -{ - return port.total_latency (); -} - -void -AudioEngine::update_total_latency (const Port& port) -{ - if (!_jack) { - fatal << _("update_total_latency() called with no JACK client connection") << endmsg; - /*NOTREACHED*/ - } - - if (!_running) { - if (!_has_run) { - fatal << _("update_total_latency() called before engine was started") << endmsg; - /*NOTREACHED*/ - } - } - - port.recompute_total_latency (); -} - -void -AudioEngine::transport_stop () -{ - // cerr << "tell JACK to stop\n"; - if (_jack) { - jack_transport_stop (_jack); - } -} - -void -AudioEngine::transport_start () -{ - // cerr << "tell JACK to start\n"; - if (_jack) { - jack_transport_start (_jack); - } -} - -void -AudioEngine::transport_locate (nframes_t where) -{ - // cerr << "tell JACK to locate to " << where << endl; - if (_jack) { - jack_transport_locate (_jack, where); - } -} - -AudioEngine::TransportState -AudioEngine::transport_state () -{ - if (_jack) { - jack_position_t pos; - return (TransportState) jack_transport_query (_jack, &pos); - } else { - return (TransportState) JackTransportStopped; - } -} - -int -AudioEngine::reset_timebase () -{ - if (_jack) { - if (Config->get_jack_time_master()) { - return jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this); - } else { - return jack_release_timebase (_jack); - } - } else { - return -1; - } -} - -int -AudioEngine::freewheel (bool onoff) -{ - if (_jack) { - - if (onoff) { - _freewheel_thread_registered = false; - } - - return jack_set_freewheel (_jack, onoff); - - } else { - return -1; - } -} - -void -AudioEngine::remove_all_ports () -{ - /* process lock MUST be held */ - - { - RCUWriter writer (ports); - boost::shared_ptr ps = writer.get_copy (); - ps->clear (); - } -} - -void -AudioEngine::remove_connections_for (Port& port) -{ - for (PortConnections::iterator i = port_connections.begin(); i != port_connections.end(); ) { - PortConnections::iterator tmp; - - tmp = i; - ++tmp; - - if ((*i).first == port.name()) { - port_connections.erase (i); - } - - i = tmp; - } -} - - -#ifdef HAVE_JACK_CLIENT_OPEN - -int -AudioEngine::connect_to_jack (string client_name) -{ - jack_options_t options = JackNullOption; - jack_status_t status; - const char *server_name = NULL; - - jack_client_name = client_name; /* might be reset below */ - _jack = jack_client_open (jack_client_name.c_str(), options, &status, server_name); - - if (_jack == NULL) { - - if (status & JackServerFailed) { - error << _("Unable to connect to JACK server") << endmsg; - } - - // error message is not useful here - return -1; - } - - if (status & JackServerStarted) { - info << _("JACK server started") << endmsg; - } - - if (status & JackNameNotUnique) { - jack_client_name = jack_get_client_name (_jack); - } - - jack_set_error_function (ardour_jack_error); - - return 0; -} - -#else - -int -AudioEngine::connect_to_jack (string client_name) -{ - jack_client_name = client_name; - - if ((_jack = jack_client_new (client_name.c_str())) == NULL) { - return -1; - } - - return 0; -} - -#endif /* HAVE_JACK_CLIENT_OPEN */ - -int -AudioEngine::disconnect_from_jack () -{ - if (_jack == 0) { - return 0; - } - - jack_client_close (_jack); - - _buffer_size = 0; - _frame_rate = 0; - - if (_running) { - stop_metering_thread (); - _running = false; - Stopped(); /* EMIT SIGNAL */ - } - - _jack = 0; - return 0; -} - -int -AudioEngine::reconnect_to_jack () -{ - if (_jack) { - disconnect_from_jack (); - /* XXX give jackd a chance */ - Glib::usleep (250000); - } - - if (connect_to_jack (jack_client_name)) { - error << _("failed to connect to JACK") << endmsg; - return -1; - } - - Ports::iterator i; - - boost::shared_ptr p = ports.reader (); - - for (i = p->begin(); i != p->end(); ++i) { - if ((*i)->reestablish ()) { - break; - } - } - - if (i != p->end()) { - /* failed */ - remove_all_ports (); - return -1; - } - - - if (session) { - session->reset_jack_connection (_jack); - nframes_t blocksize = jack_get_buffer_size (_jack); - session->set_block_size (blocksize); - session->set_frame_rate (jack_get_sample_rate (_jack)); - } - - last_monitor_check = 0; - - jack_on_shutdown (_jack, halted, this); - jack_set_graph_order_callback (_jack, _graph_order_callback, this); - jack_set_thread_init_callback (_jack, _thread_init_callback, this); - jack_set_process_callback (_jack, _process_callback, this); - jack_set_sample_rate_callback (_jack, _sample_rate_callback, this); - jack_set_buffer_size_callback (_jack, _bufsize_callback, this); - jack_set_xrun_callback (_jack, _xrun_callback, this); - jack_set_sync_callback (_jack, _jack_sync_callback, this); - jack_set_freewheel_callback (_jack, _freewheel_callback, this); - - if (Config->get_jack_time_master()) { - jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this); - } - - if (jack_activate (_jack) == 0) { - _running = true; - _has_run = true; - } else { - return -1; - } - - /* re-establish connections */ - - for (i = p->begin(); i != p->end(); ++i) { - (*i)->reconnect (); - } - - Running (); /* EMIT SIGNAL*/ - - start_metering_thread (); - - return 0; -} - -int -AudioEngine::request_buffer_size (nframes_t nframes) -{ - if (_jack) { - - if (nframes == jack_get_buffer_size (_jack)) { - return 0; - } - - return jack_set_buffer_size (_jack, nframes); - - } else { - return -1; - } -} - -void -AudioEngine::update_total_latencies () -{ -#ifdef HAVE_JACK_RECOMPUTE_LATENCIES - jack_recompute_total_latencies (_jack); -#endif -} - -string -AudioEngine::make_port_name_relative (string portname) -{ - string::size_type len; - string::size_type n; - - len = portname.length(); - - for (n = 0; n < len; ++n) { - if (portname[n] == ':') { - break; - } - } - - if ((n != len) && (portname.substr (0, n) == jack_client_name)) { - return portname.substr (n+1); - } - - return portname; -} - -string -AudioEngine::make_port_name_non_relative (string portname) -{ - string str; - - if (portname.find_first_of (':') != string::npos) { - return portname; - } - - str = jack_client_name; - str += ':'; - str += portname; - - return str; -} - -bool -AudioEngine::is_realtime () const -{ - if (_jack) { - return jack_is_realtime (_jack); - } else { - return false; - } -} diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc deleted file mode 100644 index 026cb3e7c0..0000000000 --- a/libs/ardour/audiofilesource.cc +++ /dev/null @@ -1,759 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include // for rename(), sigh -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -// if these headers come before sigc++ is included -// the parser throws ObjC++ errors. (nil is a keyword) -#ifdef HAVE_COREAUDIO -#include -#include -#include -#endif // HAVE_COREAUDIO - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; -using namespace Glib; - -ustring AudioFileSource::peak_dir = ""; -ustring AudioFileSource::search_path; - -sigc::signal AudioFileSource::HeaderPositionOffsetChanged; -uint64_t AudioFileSource::header_position_offset = 0; - -/* XXX maybe this too */ -char AudioFileSource::bwf_serial_number[13] = "000000000000"; - -struct SizedSampleBuffer { - nframes_t size; - Sample* buf; - - SizedSampleBuffer (nframes_t sz) : size (sz) { - buf = new Sample[size]; - } - - ~SizedSampleBuffer() { - delete [] buf; - } -}; - -Glib::StaticPrivate thread_interleave_buffer = GLIBMM_STATIC_PRIVATE_INIT; - -AudioFileSource::AudioFileSource (Session& s, ustring path, Flag flags) - : AudioSource (s, path), _flags (flags), - _channel (0) -{ - /* constructor used for existing external to session files. file must exist already */ - _is_embedded = AudioFileSource::determine_embeddedness (path); - - if (init (path, true)) { - throw failed_constructor (); - } - -} - -AudioFileSource::AudioFileSource (Session& s, ustring path, Flag flags, SampleFormat samp_format, HeaderFormat hdr_format) - : AudioSource (s, path), _flags (flags), - _channel (0) -{ - /* constructor used for new internal-to-session files. file cannot exist */ - _is_embedded = false; - - if (init (path, false)) { - throw failed_constructor (); - } -} - -AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exist) - : AudioSource (s, node), _flags (Flag (Writable|CanRename)) - /* _channel is set in set_state() or init() */ -{ - /* constructor used for existing internal-to-session files. file must exist */ - - if (set_state (node)) { - throw failed_constructor (); - } - - string foo = _name; - - if (init (foo, must_exist)) { - throw failed_constructor (); - } -} - -AudioFileSource::~AudioFileSource () -{ - if (removable()) { - unlink (_path.c_str()); - unlink (peakpath.c_str()); - } -} - -bool -AudioFileSource::determine_embeddedness (ustring path) -{ - return (path.find("/") == 0); -} - -bool -AudioFileSource::removable () const -{ - return (_flags & Removable) && ((_flags & RemoveAtDestroy) || ((_flags & RemovableIfEmpty) && length() == 0)); -} - -int -AudioFileSource::init (ustring pathstr, bool must_exist) -{ - _length = 0; - timeline_position = 0; - _peaks_built = false; - - if (!find (pathstr, must_exist, file_is_new, _channel)) { - throw non_existent_source (); - } - - if (file_is_new && must_exist) { - return -1; - } - - return 0; -} - - -ustring -AudioFileSource::peak_path (ustring audio_path) -{ - ustring base; - - base = PBD::basename_nosuffix (audio_path); - base += '%'; - base += (char) ('A' + _channel); - - return _session.peak_path (base); -} - -ustring -AudioFileSource::find_broken_peakfile (ustring peak_path, ustring audio_path) -{ - ustring str; - - /* check for the broken location in use by 2.0 for several months */ - - str = broken_peak_path (audio_path); - - if (Glib::file_test (str, Glib::FILE_TEST_EXISTS)) { - - if (is_embedded()) { - - /* it would be nice to rename it but the nature of - the bug means that we can't reliably use it. - */ - - peak_path = str; - - } else { - /* all native files are mono, so we can just rename - it. - */ - ::rename (str.c_str(), peak_path.c_str()); - } - - } else { - /* Nasty band-aid for older sessions that were created before we - used libsndfile for all audio files. - */ - - - str = old_peak_path (audio_path); - if (Glib::file_test (str, Glib::FILE_TEST_EXISTS)) { - peak_path = str; - } - } - - return peak_path; -} - -ustring -AudioFileSource::broken_peak_path (ustring audio_path) -{ - return _session.peak_path (audio_path); -} - -ustring -AudioFileSource::old_peak_path (ustring audio_path) -{ - /* XXX hardly bombproof! fix me */ - - struct stat stat_file; - struct stat stat_mount; - - ustring mp = mountpoint (audio_path); - - stat (audio_path.c_str(), &stat_file); - stat (mp.c_str(), &stat_mount); - - char buf[32]; -#ifdef __APPLE__ - snprintf (buf, sizeof (buf), "%u-%u-%d.peak", stat_mount.st_ino, stat_file.st_ino, _channel); -#else - snprintf (buf, sizeof (buf), "%ld-%ld-%d.peak", stat_mount.st_ino, stat_file.st_ino, _channel); -#endif - - ustring res = peak_dir; - res += buf; - res += peakfile_suffix; - - return res; -} - -bool -AudioFileSource::get_soundfile_info (ustring path, SoundFileInfo& _info, string& error_msg) -{ -#ifdef HAVE_COREAUDIO - if (CoreAudioSource::get_soundfile_info (path, _info, error_msg) == 0) { - return true; - } -#endif // HAVE_COREAUDIO - - if (SndFileSource::get_soundfile_info (path, _info, error_msg) != 0) { - return true; - } - - return false; -} - -XMLNode& -AudioFileSource::get_state () -{ - XMLNode& root (AudioSource::get_state()); - char buf[32]; - root.add_property (X_("flags"), enum_2_string (_flags)); - snprintf (buf, sizeof (buf), "%u", _channel); - root.add_property (X_("channel"), buf); - return root; -} - -int -AudioFileSource::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - - if (AudioSource::set_state (node)) { - return -1; - } - - if ((prop = node.property (X_("flags"))) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - } else { - _flags = Flag (0); - - } - - if ((prop = node.property (X_("channel"))) != 0) { - _channel = atoi (prop->value()); - } else { - _channel = 0; - } - - if ((prop = node.property (X_("name"))) != 0) { - _is_embedded = AudioFileSource::determine_embeddedness (prop->value()); - } else { - _is_embedded = false; - } - - if ((prop = node.property (X_("destructive"))) != 0) { - /* old style, from the period when we had DestructiveFileSource */ - _flags = Flag (_flags | Destructive); - } - - return 0; -} - -void -AudioFileSource::mark_for_remove () -{ - // This operation is not allowed for sources for destructive tracks or embedded files. - // Fortunately mark_for_remove() is never called for embedded files. This function - // must be fixed if that ever happens. - if (_flags & Destructive) { - return; - } - - _flags = Flag (_flags | Removable | RemoveAtDestroy); -} - -void -AudioFileSource::mark_streaming_write_completed () -{ - if (!writable()) { - return; - } - - /* XXX notice that we're readers of _peaks_built - but we must hold a solid lock on PeaksReady. - */ - - Glib::Mutex::Lock lm (_lock); - - if (_peaks_built) { - PeaksReady (); /* EMIT SIGNAL */ - } -} - -void -AudioFileSource::mark_take (ustring id) -{ - if (writable()) { - _take_id = id; - } -} - -int -AudioFileSource::move_to_trash (const ustring& trash_dir_name) -{ - if (is_embedded()) { - cerr << "tried to move an embedded region to trash" << endl; - return -1; - } - - ustring newpath; - - if (!writable()) { - return -1; - } - - /* don't move the file across filesystems, just - stick it in the `trash_dir_name' directory - on whichever filesystem it was already on. - */ - - newpath = Glib::path_get_dirname (_path); - newpath = Glib::path_get_dirname (newpath); - - cerr << "from " << _path << " dead dir looks like " << newpath << endl; - - newpath += '/'; - newpath += trash_dir_name; - newpath += '/'; - newpath += Glib::path_get_basename (_path); - - if (access (newpath.c_str(), F_OK) == 0) { - - /* the new path already exists, try versioning */ - - char buf[PATH_MAX+1]; - int version = 1; - ustring newpath_v; - - snprintf (buf, sizeof (buf), "%s.%d", newpath.c_str(), version); - newpath_v = buf; - - while (access (newpath_v.c_str(), F_OK) == 0 && version < 999) { - snprintf (buf, sizeof (buf), "%s.%d", newpath.c_str(), ++version); - newpath_v = buf; - } - - if (version == 999) { - error << string_compose (_("there are already 1000 files with names like %1; versioning discontinued"), - newpath) - << endmsg; - } else { - newpath = newpath_v; - } - - } else { - - /* it doesn't exist, or we can't read it or something */ - - } - - if (::rename (_path.c_str(), newpath.c_str()) != 0) { - error << string_compose (_("cannot rename audio file source from %1 to %2 (%3)"), - _path, newpath, strerror (errno)) - << endmsg; - return -1; - } - - if (::unlink (peakpath.c_str()) != 0) { - error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"), - peakpath, _path, strerror (errno)) - << endmsg; - /* try to back out */ - rename (newpath.c_str(), _path.c_str()); - return -1; - } - - _path = newpath; - peakpath = ""; - - /* file can not be removed twice, since the operation is not idempotent */ - - _flags = Flag (_flags & ~(RemoveAtDestroy|Removable|RemovableIfEmpty)); - - return 0; -} - -bool -AudioFileSource::find (ustring& pathstr, bool must_exist, bool& isnew, uint16_t& chan) -{ - ustring::size_type pos; - bool ret = false; - - isnew = false; - - if (pathstr[0] != '/') { - - /* non-absolute pathname: find pathstr in search path */ - - vector dirs; - int cnt; - ustring fullpath; - ustring keeppath; - - if (search_path.length() == 0) { - error << _("FileSource: search path not set") << endmsg; - goto out; - } - - split (search_path, dirs, ':'); - - cnt = 0; - - for (vector::iterator i = dirs.begin(); i != dirs.end(); ++i) { - - fullpath = *i; - if (fullpath[fullpath.length()-1] != '/') { - fullpath += '/'; - } - - fullpath += pathstr; - - /* i (paul) made a nasty design error by using ':' as a special character in - Ardour 0.99 .. this hack tries to make things sort of work. - */ - - if ((pos = pathstr.find_last_of (':')) != ustring::npos) { - - if (Glib::file_test (fullpath, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) { - - /* its a real file, no problem */ - - keeppath = fullpath; - ++cnt; - - } else { - - if (must_exist) { - - /* might be an older session using file:channel syntax. see if the version - without the :suffix exists - */ - - ustring shorter = pathstr.substr (0, pos); - fullpath = *i; - - if (fullpath[fullpath.length()-1] != '/') { - fullpath += '/'; - } - - fullpath += shorter; - - if (Glib::file_test (pathstr, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) { - chan = atoi (pathstr.substr (pos+1)); - pathstr = shorter; - keeppath = fullpath; - ++cnt; - } - - } else { - - /* new derived file (e.g. for timefx) being created in a newer session */ - - } - } - - } else { - - if (Glib::file_test (fullpath, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) { - keeppath = fullpath; - ++cnt; - } - } - } - - if (cnt > 1) { - - error << string_compose (_("FileSource: \"%1\" is ambigous when searching %2\n\t"), pathstr, search_path) << endmsg; - goto out; - - } else if (cnt == 0) { - - if (must_exist) { - error << string_compose(_("Filesource: cannot find required file (%1): while searching %2"), pathstr, search_path) << endmsg; - goto out; - } else { - isnew = true; - } - } - - _name = pathstr; - _path = keeppath; - ret = true; - - } else { - - /* external files and/or very very old style sessions include full paths */ - - /* ugh, handle ':' situation */ - - if ((pos = pathstr.find_last_of (':')) != ustring::npos) { - - ustring shorter = pathstr.substr (0, pos); - - if (Glib::file_test (shorter, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) { - chan = atoi (pathstr.substr (pos+1)); - pathstr = shorter; - } - } - - _path = pathstr; - - if (is_embedded()) { - _name = pathstr; - } else { - _name = pathstr.substr (pathstr.find_last_of ('/') + 1); - } - - if (!Glib::file_test (pathstr, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) { - - /* file does not exist or we cannot read it */ - - if (must_exist) { - error << string_compose(_("Filesource: cannot find required file (%1): %2"), _path, strerror (errno)) << endmsg; - goto out; - } - - if (errno != ENOENT) { - error << string_compose(_("Filesource: cannot check for existing file (%1): %2"), _path, strerror (errno)) << endmsg; - goto out; - } - - /* a new file */ - - isnew = true; - ret = true; - - } else { - - /* already exists */ - - ret = true; - - } - } - - out: - return ret; -} - -void -AudioFileSource::set_search_path (ustring p) -{ - search_path = p; -} - -void -AudioFileSource::set_header_position_offset (nframes_t offset) -{ - header_position_offset = offset; - HeaderPositionOffsetChanged (); -} - -void -AudioFileSource::set_timeline_position (int64_t pos) -{ - timeline_position = pos; -} - -void -AudioFileSource::set_allow_remove_if_empty (bool yn) -{ - if (!writable()) { - return; - } - - if (yn) { - _flags = Flag (_flags | RemovableIfEmpty); - } else { - _flags = Flag (_flags & ~RemovableIfEmpty); - } -} - -int -AudioFileSource::set_source_name (ustring newname, bool destructive) -{ - Glib::Mutex::Lock lm (_lock); - ustring oldpath = _path; - ustring newpath = Session::change_audio_path_by_name (oldpath, _name, newname, destructive); - - if (newpath.empty()) { - error << string_compose (_("programming error: %1"), "cannot generate a changed audio path") << endmsg; - return -1; - } - - // Test whether newpath exists, if yes notify the user but continue. - if (access(newpath.c_str(),F_OK) == 0) { - error << _("Programming error! Ardour tried to rename a file over another file! It's safe to continue working, but please report this to the developers.") << endmsg; - return -1; - } - - if (rename (oldpath.c_str(), newpath.c_str()) != 0) { - error << string_compose (_("cannot rename audio file %1 to %2"), _name, newpath) << endmsg; - return -1; - } - - _name = Glib::path_get_basename (newpath); - _path = newpath; - - return rename_peakfile (peak_path (_path)); -} - -bool -AudioFileSource::is_empty (Session& s, ustring path) -{ - SoundFileInfo info; - string err; - - if (!get_soundfile_info (path, info, err)) { - /* dangerous: we can't get info, so assume that its not empty */ - return false; - } - - return info.length == 0; -} - -int -AudioFileSource::setup_peakfile () -{ - if (!(_flags & NoPeakFile)) { - return initialize_peakfile (file_is_new, _path); - } else { - return 0; - } -} - -bool -AudioFileSource::safe_file_extension(ustring file) -{ - const char* suffixes[] = { - ".wav", ".WAV", - ".aiff", ".AIFF", - ".caf", ".CAF", - ".aif", ".AIF", - ".amb", ".AMB", - ".snd", ".SND", - ".au", ".AU", - ".raw", ".RAW", - ".sf", ".SF", - ".cdr", ".CDR", - ".smp", ".SMP", - ".maud", ".MAUD", - ".vwe", ".VWE", - ".paf", ".PAF", - ".voc", ".VOC", -#ifdef HAVE_FLAC - ".flac", ".FLAC", -#endif // HAVE_FLAC -#ifdef HAVE_COREAUDIO - ".mp3", ".MP3", - ".aac", ".AAC", - ".mp4", ".MP4", -#endif // HAVE_COREAUDIO - }; - - for (size_t n = 0; n < sizeof(suffixes)/sizeof(suffixes[0]); ++n) { - if (file.rfind (suffixes[n]) == file.length() - strlen (suffixes[n])) { - return true; - } - } - - return false; -} - -void -AudioFileSource::mark_immutable () -{ - /* destructive sources stay writable, and their other flags don't - change. - */ - - if (!(_flags & Destructive)) { - _flags = Flag (_flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy|CanRename)); - } -} - - -Sample* -AudioFileSource::get_interleave_buffer (nframes_t size) -{ - SizedSampleBuffer* ssb; - - if ((ssb = thread_interleave_buffer.get()) == 0) { - ssb = new SizedSampleBuffer (size); - thread_interleave_buffer.set (ssb); - } - - if (ssb->size < size) { - ssb = new SizedSampleBuffer (size); - thread_interleave_buffer.set (ssb); - } - - return ssb->buf; -} diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc deleted file mode 100644 index f5f04eac6d..0000000000 --- a/libs/ardour/audioregion.cc +++ /dev/null @@ -1,1402 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -/* a Session will reset these to its chosen defaults by calling AudioRegion::set_default_fade() */ - -Change AudioRegion::FadeInChanged = ARDOUR::new_change(); -Change AudioRegion::FadeOutChanged = ARDOUR::new_change(); -Change AudioRegion::FadeInActiveChanged = ARDOUR::new_change(); -Change AudioRegion::FadeOutActiveChanged = ARDOUR::new_change(); -Change AudioRegion::EnvelopeActiveChanged = ARDOUR::new_change(); -Change AudioRegion::ScaleAmplitudeChanged = ARDOUR::new_change(); -Change AudioRegion::EnvelopeChanged = ARDOUR::new_change(); - -void -AudioRegion::init () -{ - _scale_amplitude = 1.0; - - set_default_fades (); - set_default_envelope (); - - listen_to_my_curves (); - listen_to_my_sources (); -} - -/* constructor for use by derived types only */ -AudioRegion::AudioRegion (Session& s, nframes_t start, nframes_t length, string name) - : Region (s, start, length, name, DataType::AUDIO) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - init (); -} - -/** Basic AudioRegion constructor (one channel) */ -AudioRegion::AudioRegion (boost::shared_ptr src, nframes_t start, nframes_t length) - : Region (src, start, length, PBD::basename_nosuffix(src->name()), DataType::AUDIO, 0, Region::Flag(Region::DefaultFlags|Region::External)) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - boost::shared_ptr afs = boost::dynamic_pointer_cast (src); - if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); - } - - init (); -} - -/* Basic AudioRegion constructor (one channel) */ -AudioRegion::AudioRegion (boost::shared_ptr src, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags) - : Region (src, start, length, name, DataType::AUDIO, layer, flags) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - boost::shared_ptr afs = boost::dynamic_pointer_cast (src); - if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); - } - - init (); -} - -/* Basic AudioRegion constructor (many channels) */ -AudioRegion::AudioRegion (const SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags) - : Region (srcs, start, length, name, DataType::AUDIO, layer, flags) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - init (); - listen_to_my_sources (); -} - -/** Create a new AudioRegion, that is part of an existing one */ -AudioRegion::AudioRegion (boost::shared_ptr other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags) - : Region (other, offset, length, name, layer, flags) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - set > unique_srcs; - - for (SourceList::const_iterator i= other->_sources.begin(); i != other->_sources.end(); ++i) { - _sources.push_back (*i); - - pair >::iterator,bool> result; - - result = unique_srcs.insert (*i); - - if (result.second) { - boost::shared_ptr afs = boost::dynamic_pointer_cast (*i); - if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); - } - } - } - - /* return to default fades if the existing ones are too long */ - init (); - - if (_flags & LeftOfSplit) { - if (_fade_in->back()->when >= _length) { - set_default_fade_in (); - } else { - _fade_in_disabled = other->_fade_in_disabled; - } - set_default_fade_out (); - _flags = Flag (_flags & ~Region::LeftOfSplit); - } - - if (_flags & RightOfSplit) { - if (_fade_out->back()->when >= _length) { - set_default_fade_out (); - } else { - _fade_out_disabled = other->_fade_out_disabled; - } - set_default_fade_in (); - _flags = Flag (_flags & ~Region::RightOfSplit); - } - - _scale_amplitude = other->_scale_amplitude; - - assert(_type == DataType::AUDIO); - listen_to_my_sources (); -} - -AudioRegion::AudioRegion (boost::shared_ptr other) - : Region (other) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - assert(_type == DataType::AUDIO); - _scale_amplitude = other->_scale_amplitude; - _envelope = other->_envelope; - - set_default_fades (); - - listen_to_my_curves (); - listen_to_my_sources (); -} - -AudioRegion::AudioRegion (boost::shared_ptr src, const XMLNode& node) - : Region (src, node) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - boost::shared_ptr afs = boost::dynamic_pointer_cast (src); - if (afs) { - afs->HeaderPositionOffsetChanged.connect (mem_fun (*this, &AudioRegion::source_offset_changed)); - } - - init (); - - if (set_state (node)) { - throw failed_constructor(); - } - - assert(_type == DataType::AUDIO); - listen_to_my_sources (); -} - -AudioRegion::AudioRegion (SourceList& srcs, const XMLNode& node) - : Region (srcs, node) - , _fade_in (new AutomationList(Parameter(FadeInAutomation), 0.0, 2.0, 1.0)) - , _fade_out (new AutomationList(Parameter(FadeOutAutomation), 0.0, 2.0, 1.0)) - , _envelope (new AutomationList(Parameter(EnvelopeAutomation), 0.0, 2.0, 1.0)) -{ - init (); - - if (set_state (node)) { - throw failed_constructor(); - } - - assert(_type == DataType::AUDIO); - listen_to_my_sources (); -} - -AudioRegion::~AudioRegion () -{ -} - -void -AudioRegion::listen_to_my_sources () -{ - for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->AnalysisChanged.connect (mem_fun (*this, &AudioRegion::invalidate_transients)); - } -} - -void -AudioRegion::listen_to_my_curves () -{ - _envelope->StateChanged.connect (mem_fun (*this, &AudioRegion::envelope_changed)); - _fade_in->StateChanged.connect (mem_fun (*this, &AudioRegion::fade_in_changed)); - _fade_out->StateChanged.connect (mem_fun (*this, &AudioRegion::fade_out_changed)); -} - -void -AudioRegion::set_envelope_active (bool yn) -{ - if (envelope_active() != yn) { - char buf[64]; - if (yn) { - snprintf (buf, sizeof (buf), "envelope active"); - _flags = Flag (_flags|EnvelopeActive); - } else { - snprintf (buf, sizeof (buf), "envelope off"); - _flags = Flag (_flags & ~EnvelopeActive); - } - send_change (EnvelopeActiveChanged); - } -} - -ARDOUR::nframes_t -AudioRegion::read_peaks (PeakData *buf, nframes_t npeaks, nframes_t offset, nframes_t cnt, uint32_t chan_n, double samples_per_unit) const -{ - if (chan_n >= _sources.size()) { - return 0; - } - - if (audio_source(chan_n)->read_peaks (buf, npeaks, offset, cnt, samples_per_unit)) { - return 0; - } else { - if (_scale_amplitude != 1.0) { - for (nframes_t n = 0; n < npeaks; ++n) { - buf[n].max *= _scale_amplitude; - buf[n].min *= _scale_amplitude; - } - } - return cnt; - } -} - -nframes64_t -AudioRegion::read (Sample* buf, nframes64_t position, nframes64_t cnt, int channel) const -{ - /* raw read, no fades, no gain, nada */ - return _read_at (_sources, _length, buf, 0, 0, _position + position, cnt, channel, 0, 0, true); -} - -nframes_t -AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t position, - nframes_t cnt, - uint32_t chan_n, nframes_t read_frames, nframes_t skip_frames) const -{ - /* regular diskstream/butler read complete with fades etc */ - return _read_at (_sources, _length, buf, mixdown_buffer, gain_buffer, position, cnt, chan_n, read_frames, skip_frames, false); -} - -nframes_t -AudioRegion::master_read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer, nframes_t position, - nframes_t cnt, uint32_t chan_n) const -{ - return _read_at (_master_sources, _master_sources.front()->length(), buf, mixdown_buffer, gain_buffer, position, cnt, chan_n, 0, 0); -} - -nframes_t -AudioRegion::_read_at (const SourceList& srcs, nframes_t limit, - Sample *buf, Sample *mixdown_buffer, float *gain_buffer, - nframes_t position, nframes_t cnt, - uint32_t chan_n, - nframes_t read_frames, - nframes_t skip_frames, - bool raw) const -{ - nframes_t internal_offset; - nframes_t buf_offset; - nframes_t to_read; - - if (muted() && !raw) { - return 0; /* read nothing */ - } - - /* precondition: caller has verified that we cover the desired section */ - - if (position < _position) { - internal_offset = 0; - buf_offset = _position - position; - cnt -= buf_offset; - } else { - internal_offset = position - _position; - buf_offset = 0; - } - - if (internal_offset >= limit) { - return 0; /* read nothing */ - } - - if ((to_read = min (cnt, limit - internal_offset)) == 0) { - return 0; /* read nothing */ - } - - if (opaque() || raw) { - /* overwrite whatever is there */ - mixdown_buffer = buf + buf_offset; - } else { - mixdown_buffer += buf_offset; - } - - if (!raw) { - _read_data_count = 0; - } - - if (chan_n < n_channels()) { - - boost::shared_ptr src = audio_source(chan_n); - if (src->read (mixdown_buffer, _start + internal_offset, to_read) != to_read) { - return 0; /* "read nothing" */ - } - - if (!raw) { - _read_data_count += src->read_data_count(); - } - - } else { - - /* track is N-channel, this region has less channels; silence the ones - we don't have. - */ - - memset (mixdown_buffer, 0, sizeof (Sample) * cnt); - - /* no fades required */ - - if (!raw) { - goto merge; - } - } - - /* fade in */ - - if (!raw) { - - if (_flags & FadeIn) { - - nframes_t fade_in_length = (nframes_t) _fade_in->back()->when; - - /* see if this read is within the fade in */ - - if (internal_offset < fade_in_length) { - - nframes_t fi_limit; - - fi_limit = min (to_read, fade_in_length - internal_offset); - - _fade_in->curve().get_vector (internal_offset, internal_offset+fi_limit, gain_buffer, fi_limit); - - for (nframes_t n = 0; n < fi_limit; ++n) { - mixdown_buffer[n] *= gain_buffer[n]; - } - } - } - - /* fade out */ - - if (_flags & FadeOut) { - - /* see if some part of this read is within the fade out */ - - /* ................. >| REGION - limit - - { } FADE - fade_out_length - ^ - limit - fade_out_length - |--------------| - ^internal_offset - ^internal_offset + to_read - - we need the intersection of [internal_offset,internal_offset+to_read] with - [limit - fade_out_length, limit] - - */ - - - nframes_t fade_out_length = (nframes_t) _fade_out->back()->when; - nframes_t fade_interval_start = max(internal_offset, limit-fade_out_length); - nframes_t fade_interval_end = min(internal_offset + to_read, limit); - - if (fade_interval_end > fade_interval_start) { - /* (part of the) the fade out is in this buffer */ - - nframes_t fo_limit = fade_interval_end - fade_interval_start; - nframes_t curve_offset = fade_interval_start - (limit-fade_out_length); - nframes_t fade_offset = fade_interval_start - internal_offset; - - _fade_out->curve().get_vector (curve_offset, curve_offset+fo_limit, gain_buffer, fo_limit); - - for (nframes_t n = 0, m = fade_offset; n < fo_limit; ++n, ++m) { - mixdown_buffer[m] *= gain_buffer[n]; - } - } - - } - - /* Regular gain curves */ - - if (envelope_active()) { - _envelope->curve().get_vector (internal_offset, internal_offset + to_read, gain_buffer, to_read); - - if (_scale_amplitude != 1.0f) { - for (nframes_t n = 0; n < to_read; ++n) { - mixdown_buffer[n] *= gain_buffer[n] * _scale_amplitude; - } - } else { - for (nframes_t n = 0; n < to_read; ++n) { - mixdown_buffer[n] *= gain_buffer[n]; - } - } - } else if (_scale_amplitude != 1.0f) { - Session::apply_gain_to_buffer (mixdown_buffer, to_read, _scale_amplitude); - } - - merge: - - if (!opaque()) { - - /* gack. the things we do for users. - */ - - buf += buf_offset; - - for (nframes_t n = 0; n < to_read; ++n) { - buf[n] += mixdown_buffer[n]; - } - } - } - - return to_read; -} - -XMLNode& -AudioRegion::state (bool full) -{ - XMLNode& node (Region::state (full)); - XMLNode *child; - char buf[64]; - char buf2[64]; - LocaleGuard lg (X_("POSIX")); - - node.add_property ("flags", enum_2_string (_flags)); - - snprintf (buf, sizeof(buf), "%.12g", _scale_amplitude); - node.add_property ("scale-gain", buf); - - // XXX these should move into Region - - for (uint32_t n=0; n < _sources.size(); ++n) { - snprintf (buf2, sizeof(buf2), "source-%d", n); - _sources[n]->id().print (buf, sizeof (buf)); - node.add_property (buf2, buf); - } - - for (uint32_t n=0; n < _master_sources.size(); ++n) { - snprintf (buf2, sizeof(buf2), "master-source-%d", n); - _master_sources[n]->id().print (buf, sizeof (buf)); - node.add_property (buf2, buf); - } - - snprintf (buf, sizeof (buf), "%u", (uint32_t) _sources.size()); - node.add_property ("channels", buf); - - if (full) { - - child = node.add_child (X_("FadeIn")); - - if ((_flags & DefaultFadeIn)) { - child->add_property (X_("default"), X_("yes")); - } else { - child->add_child_nocopy (_fade_in->get_state ()); - } - - child->add_property (X_("active"), _fade_in_disabled ? X_("no") : X_("yes")); - - child = node.add_child (X_("FadeOut")); - - if ((_flags & DefaultFadeOut)) { - child->add_property (X_("default"), X_("yes")); - } else { - child->add_child_nocopy (_fade_out->get_state ()); - } - - child->add_property (X_("active"), _fade_out_disabled ? X_("no") : X_("yes")); - } - - child = node.add_child ("Envelope"); - - if (full) { - bool default_env = false; - - // If there are only two points, the points are in the start of the region and the end of the region - // so, if they are both at 1.0f, that means the default region. - - if (_envelope->size() == 2 && - _envelope->front()->value == 1.0f && - _envelope->back()->value==1.0f) { - if (_envelope->front()->when == 0 && _envelope->back()->when == _length) { - default_env = true; - } - } - - if (default_env) { - child->add_property ("default", "yes"); - } else { - child->add_child_nocopy (_envelope->get_state ()); - } - - } else { - child->add_property ("default", "yes"); - } - - if (full && _extra_xml) { - node.add_child_copy (*_extra_xml); - } - - return node; -} - -int -AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool send) -{ - const XMLNodeList& nlist = node.children(); - const XMLProperty *prop; - LocaleGuard lg (X_("POSIX")); - - Region::set_live_state (node, what_changed, false); - - uint32_t old_flags = _flags; - - if ((prop = node.property ("flags")) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - - //_flags = Flag (strtol (prop->value().c_str(), (char **) 0, 16)); - - _flags = Flag (_flags & ~Region::LeftOfSplit); - _flags = Flag (_flags & ~Region::RightOfSplit); - } - - if ((old_flags ^ _flags) & Muted) { - what_changed = Change (what_changed|MuteChanged); - } - if ((old_flags ^ _flags) & Opaque) { - what_changed = Change (what_changed|OpacityChanged); - } - if ((old_flags ^ _flags) & Locked) { - what_changed = Change (what_changed|LockChanged); - } - - if ((prop = node.property ("scale-gain")) != 0) { - _scale_amplitude = atof (prop->value().c_str()); - what_changed = Change (what_changed|ScaleAmplitudeChanged); - } else { - _scale_amplitude = 1.0; - } - - /* Now find envelope description and other misc child items */ - - for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) { - - XMLNode *child; - XMLProperty *prop; - - child = (*niter); - - if (child->name() == "Envelope") { - - _envelope->clear (); - - if ((prop = child->property ("default")) != 0 || _envelope->set_state (*child)) { - set_default_envelope (); - } - - _envelope->set_max_xval (_length); - _envelope->truncate_end (_length); - - } else if (child->name() == "FadeIn") { - - _fade_in->clear (); - - if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) { - set_default_fade_in (); - } else { - XMLNode* grandchild = child->child ("AutomationList"); - if (grandchild) { - _fade_in->set_state (*grandchild); - } - } - - if ((prop = child->property ("active")) != 0) { - if (prop->value() == "yes") { - set_fade_in_active (true); - } else { - set_fade_in_active (true); - } - } - - } else if (child->name() == "FadeOut") { - - _fade_out->clear (); - - if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) { - set_default_fade_out (); - } else { - XMLNode* grandchild = child->child ("AutomationList"); - if (grandchild) { - _fade_out->set_state (*grandchild); - } - } - - if ((prop = child->property ("active")) != 0) { - if (prop->value() == "yes") { - set_fade_out_active (true); - } else { - set_fade_out_active (false); - } - } - - } - } - - if (send) { - send_change (what_changed); - } - - return 0; -} - -int -AudioRegion::set_state (const XMLNode& node) -{ - /* Region::set_state() calls the virtual set_live_state(), - which will get us back to AudioRegion::set_live_state() - to handle the relevant stuff. - */ - - return Region::set_state (node); -} - -void -AudioRegion::set_fade_in_shape (FadeShape shape) -{ - set_fade_in (shape, (nframes_t) _fade_in->back()->when); -} - -void -AudioRegion::set_fade_out_shape (FadeShape shape) -{ - set_fade_out (shape, (nframes_t) _fade_out->back()->when); -} - -void -AudioRegion::set_fade_in (FadeShape shape, nframes_t len) -{ - _fade_in->freeze (); - _fade_in->clear (); - - switch (shape) { - case Linear: - _fade_in->fast_simple_add (0.0, 0.0); - _fade_in->fast_simple_add (len, 1.0); - break; - - case Fast: - _fade_in->fast_simple_add (0, 0); - _fade_in->fast_simple_add (len * 0.389401, 0.0333333); - _fade_in->fast_simple_add (len * 0.629032, 0.0861111); - _fade_in->fast_simple_add (len * 0.829493, 0.233333); - _fade_in->fast_simple_add (len * 0.9447, 0.483333); - _fade_in->fast_simple_add (len * 0.976959, 0.697222); - _fade_in->fast_simple_add (len, 1); - break; - - case Slow: - _fade_in->fast_simple_add (0, 0); - _fade_in->fast_simple_add (len * 0.0207373, 0.197222); - _fade_in->fast_simple_add (len * 0.0645161, 0.525); - _fade_in->fast_simple_add (len * 0.152074, 0.802778); - _fade_in->fast_simple_add (len * 0.276498, 0.919444); - _fade_in->fast_simple_add (len * 0.481567, 0.980556); - _fade_in->fast_simple_add (len * 0.767281, 1); - _fade_in->fast_simple_add (len, 1); - break; - - case LogA: - _fade_in->fast_simple_add (0, 0); - _fade_in->fast_simple_add (len * 0.0737327, 0.308333); - _fade_in->fast_simple_add (len * 0.246544, 0.658333); - _fade_in->fast_simple_add (len * 0.470046, 0.886111); - _fade_in->fast_simple_add (len * 0.652074, 0.972222); - _fade_in->fast_simple_add (len * 0.771889, 0.988889); - _fade_in->fast_simple_add (len, 1); - break; - - case LogB: - _fade_in->fast_simple_add (0, 0); - _fade_in->fast_simple_add (len * 0.304147, 0.0694444); - _fade_in->fast_simple_add (len * 0.529954, 0.152778); - _fade_in->fast_simple_add (len * 0.725806, 0.333333); - _fade_in->fast_simple_add (len * 0.847926, 0.558333); - _fade_in->fast_simple_add (len * 0.919355, 0.730556); - _fade_in->fast_simple_add (len, 1); - break; - } - - _fade_in->thaw (); - _fade_in_shape = shape; - - send_change (FadeInChanged); -} - -void -AudioRegion::set_fade_out (FadeShape shape, nframes_t len) -{ - _fade_out->freeze (); - _fade_out->clear (); - - switch (shape) { - case Fast: - _fade_out->fast_simple_add (len * 0, 1); - _fade_out->fast_simple_add (len * 0.023041, 0.697222); - _fade_out->fast_simple_add (len * 0.0553, 0.483333); - _fade_out->fast_simple_add (len * 0.170507, 0.233333); - _fade_out->fast_simple_add (len * 0.370968, 0.0861111); - _fade_out->fast_simple_add (len * 0.610599, 0.0333333); - _fade_out->fast_simple_add (len * 1, 0); - break; - - case LogA: - _fade_out->fast_simple_add (len * 0, 1); - _fade_out->fast_simple_add (len * 0.228111, 0.988889); - _fade_out->fast_simple_add (len * 0.347926, 0.972222); - _fade_out->fast_simple_add (len * 0.529954, 0.886111); - _fade_out->fast_simple_add (len * 0.753456, 0.658333); - _fade_out->fast_simple_add (len * 0.9262673, 0.308333); - _fade_out->fast_simple_add (len * 1, 0); - break; - - case Slow: - _fade_out->fast_simple_add (len * 0, 1); - _fade_out->fast_simple_add (len * 0.305556, 1); - _fade_out->fast_simple_add (len * 0.548611, 0.991736); - _fade_out->fast_simple_add (len * 0.759259, 0.931129); - _fade_out->fast_simple_add (len * 0.918981, 0.68595); - _fade_out->fast_simple_add (len * 0.976852, 0.22865); - _fade_out->fast_simple_add (len * 1, 0); - break; - - case LogB: - _fade_out->fast_simple_add (len * 0, 1); - _fade_out->fast_simple_add (len * 0.080645, 0.730556); - _fade_out->fast_simple_add (len * 0.277778, 0.289256); - _fade_out->fast_simple_add (len * 0.470046, 0.152778); - _fade_out->fast_simple_add (len * 0.695853, 0.0694444); - _fade_out->fast_simple_add (len * 1, 0); - break; - - case Linear: - _fade_out->fast_simple_add (len * 0, 1); - _fade_out->fast_simple_add (len * 1, 0); - break; - } - - _fade_out->thaw (); - _fade_out_shape = shape; - - send_change (FadeOutChanged); -} - -void -AudioRegion::set_fade_in_length (nframes_t len) -{ - if (len > _length) { - len = _length - 1; - } - - bool changed = _fade_in->extend_to (len); - - if (changed) { - _flags = Flag (_flags & ~DefaultFadeIn); - send_change (FadeInChanged); - } -} - -void -AudioRegion::set_fade_out_length (nframes_t len) -{ - if (len > _length) { - len = _length - 1; - } - - bool changed = _fade_out->extend_to (len); - - if (changed) { - _flags = Flag (_flags & ~DefaultFadeOut); - send_change (FadeOutChanged); - } -} - -void -AudioRegion::set_fade_in_active (bool yn) -{ - if (yn == (_flags & FadeIn)) { - return; - } - if (yn) { - _flags = Flag (_flags|FadeIn); - } else { - _flags = Flag (_flags & ~FadeIn); - } - - send_change (FadeInActiveChanged); -} - -void -AudioRegion::set_fade_out_active (bool yn) -{ - if (yn == (_flags & FadeOut)) { - return; - } - if (yn) { - _flags = Flag (_flags | FadeOut); - } else { - _flags = Flag (_flags & ~FadeOut); - } - - send_change (FadeOutActiveChanged); -} - -bool -AudioRegion::fade_in_is_default () const -{ - return _fade_in_shape == Linear && _fade_in->back()->when == 64; -} - -bool -AudioRegion::fade_out_is_default () const -{ - return _fade_out_shape == Linear && _fade_out->back()->when == 64; -} - -void -AudioRegion::set_default_fade_in () -{ - set_fade_in (Linear, 64); -} - -void -AudioRegion::set_default_fade_out () -{ - set_fade_out (Linear, 64); -} - -void -AudioRegion::set_default_fades () -{ - _fade_in_disabled = 0; - _fade_out_disabled = 0; - set_default_fade_in (); - set_default_fade_out (); -} - -void -AudioRegion::set_default_envelope () -{ - _envelope->freeze (); - _envelope->clear (); - _envelope->fast_simple_add (0, 1.0f); - _envelope->fast_simple_add (_length, 1.0f); - _envelope->thaw (); -} - -void -AudioRegion::recompute_at_end () -{ - /* our length has changed. recompute a new final point by interpolating - based on the the existing curve. - */ - - _envelope->freeze (); - _envelope->truncate_end (_length); - _envelope->set_max_xval (_length); - _envelope->thaw (); - - if (_fade_in->back()->when > _length) { - _fade_in->extend_to (_length); - send_change (FadeInChanged); - } - - if (_fade_out->back()->when > _length) { - _fade_out->extend_to (_length); - send_change (FadeOutChanged); - } -} - -void -AudioRegion::recompute_at_start () -{ - /* as above, but the shift was from the front */ - - _envelope->truncate_start (_length); - - if (_fade_in->back()->when > _length) { - _fade_in->extend_to (_length); - send_change (FadeInChanged); - } - - if (_fade_out->back()->when > _length) { - _fade_out->extend_to (_length); - send_change (FadeOutChanged); - } -} - -int -AudioRegion::separate_by_channel (Session& session, vector >& v) const -{ - SourceList srcs; - string new_name; - int n; - - if (_sources.size() < 2) { - return 0; - } - - n = 0; - - for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - - srcs.clear (); - srcs.push_back (*i); - - new_name = _name; - - if (_sources.size() == 2) { - if (n == 0) { - new_name += "-L"; - } else { - new_name += "-R"; - } - } else { - new_name += '-'; - new_name += ('0' + n + 1); - } - - /* create a copy with just one source. prevent if from being thought of as "whole file" even if - it covers the entire source file(s). - */ - - Flag f = Flag (_flags & ~WholeFile); - - boost::shared_ptr r = RegionFactory::create (srcs, _start, _length, new_name, _layer, f); - boost::shared_ptr ar = boost::dynamic_pointer_cast (r); - - v.push_back (ar); - - ++n; - } - - return 0; -} - -nframes_t -AudioRegion::read_raw_internal (Sample* buf, nframes_t pos, nframes_t cnt) const -{ - return audio_source()->read (buf, pos, cnt); -} - -int -AudioRegion::exportme (Session& session, ARDOUR::ExportSpecification& spec) -{ - const nframes_t blocksize = 4096; - nframes_t to_read; - int status = -1; - - spec.channels = _sources.size(); - - if (spec.prepare (blocksize, session.frame_rate())) { - goto out; - } - - spec.pos = 0; - spec.total_frames = _length; - - while (spec.pos < _length && !spec.stop) { - - - /* step 1: interleave */ - - to_read = min (_length - spec.pos, blocksize); - - if (spec.channels == 1) { - - if (read_raw_internal (spec.dataF, _start + spec.pos, to_read) != to_read) { - goto out; - } - - } else { - - Sample buf[blocksize]; - - for (uint32_t chan = 0; chan < spec.channels; ++chan) { - - if (audio_source(chan)->read (buf, _start + spec.pos, to_read) != to_read) { - goto out; - } - - for (nframes_t x = 0; x < to_read; ++x) { - spec.dataF[chan+(x*spec.channels)] = buf[x]; - } - } - } - - if (spec.process (to_read)) { - goto out; - } - - spec.pos += to_read; - spec.progress = (double) spec.pos /_length; - - } - - status = 0; - - out: - spec.running = false; - spec.status = status; - spec.clear(); - - return status; -} - -void -AudioRegion::set_scale_amplitude (gain_t g) -{ - boost::shared_ptr pl (playlist()); - - _scale_amplitude = g; - - /* tell the diskstream we're in */ - - if (pl) { - pl->Modified(); - } - - /* tell everybody else */ - - send_change (ScaleAmplitudeChanged); -} - -void -AudioRegion::normalize_to (float target_dB) -{ - const nframes_t blocksize = 64 * 1024; - Sample buf[blocksize]; - nframes_t fpos; - nframes_t fend; - nframes_t to_read; - double maxamp = 0; - gain_t target = dB_to_coefficient (target_dB); - - if (target == 1.0f) { - /* do not normalize to precisely 1.0 (0 dBFS), to avoid making it appear - that we may have clipped. - */ - target -= FLT_EPSILON; - } - - fpos = _start; - fend = _start + _length; - - /* first pass: find max amplitude */ - - while (fpos < fend) { - - uint32_t n; - - to_read = min (fend - fpos, blocksize); - - for (n = 0; n < n_channels(); ++n) { - - /* read it in */ - - if (read_raw_internal (buf, fpos, to_read) != to_read) { - return; - } - - maxamp = compute_peak (buf, to_read, maxamp); - } - - fpos += to_read; - }; - - if (maxamp == 0.0f) { - /* don't even try */ - return; - } - - if (maxamp == target) { - /* we can't do anything useful */ - return; - } - - /* compute scale factor */ - - _scale_amplitude = target/maxamp; - - /* tell the diskstream we're in */ - - boost::shared_ptr pl (playlist()); - - if (pl) { - pl->Modified(); - } - - /* tell everybody else */ - - send_change (ScaleAmplitudeChanged); -} - -void -AudioRegion::fade_in_changed () -{ - send_change (FadeInChanged); -} - -void -AudioRegion::fade_out_changed () -{ - send_change (FadeOutChanged); -} - -void -AudioRegion::envelope_changed () -{ - send_change (EnvelopeChanged); -} - -void -AudioRegion::suspend_fade_in () -{ - if (++_fade_in_disabled == 1) { - if (fade_in_is_default()) { - set_fade_in_active (false); - } - } -} - -void -AudioRegion::resume_fade_in () -{ - if (--_fade_in_disabled == 0 && _fade_in_disabled) { - set_fade_in_active (true); - } -} - -void -AudioRegion::suspend_fade_out () -{ - if (++_fade_out_disabled == 1) { - if (fade_out_is_default()) { - set_fade_out_active (false); - } - } -} - -void -AudioRegion::resume_fade_out () -{ - if (--_fade_out_disabled == 0 &&_fade_out_disabled) { - set_fade_out_active (true); - } -} - -bool -AudioRegion::speed_mismatch (float sr) const -{ - if (_sources.empty()) { - /* impossible, but ... */ - return false; - } - - float fsr = audio_source()->sample_rate(); - - return fsr != sr; -} - -void -AudioRegion::source_offset_changed () -{ - boost::shared_ptr afs = boost::dynamic_pointer_cast(_sources.front()); - - if (afs && afs->destructive()) { - // set_start (source()->natural_position(), this); - set_position (source()->natural_position(), this); - } -} - -boost::shared_ptr -AudioRegion::audio_source (uint32_t n) const -{ - // Guaranteed to succeed (use a static cast for speed?) - return boost::dynamic_pointer_cast(source(n)); -} - -int -AudioRegion::get_transients (AnalysisFeatureList& results, bool force_new) -{ - boost::shared_ptr pl = playlist(); - - if (!pl) { - return -1; - } - - if (_valid_transients && !force_new) { - results = _transients; - return 0; - } - - SourceList::iterator s; - - for (s = _sources.begin() ; s != _sources.end(); ++s) { - if (!(*s)->has_been_analysed()) { - cerr << "For " << name() << " source " << (*s)->name() << " has not been analyzed\n"; - break; - } - } - - if (s == _sources.end()) { - /* all sources are analyzed, merge data from each one */ - - for (s = _sources.begin() ; s != _sources.end(); ++s) { - - /* find the set of transients within the bounds of this region */ - - AnalysisFeatureList::iterator low = lower_bound ((*s)->transients.begin(), - (*s)->transients.end(), - _start); - - AnalysisFeatureList::iterator high = upper_bound ((*s)->transients.begin(), - (*s)->transients.end(), - _start + _length); - - /* and add them */ - - results.insert (results.end(), low, high); - } - - TransientDetector::cleanup_transients (results, pl->session().frame_rate(), 3.0); - - /* translate all transients to current position */ - - for (AnalysisFeatureList::iterator x = results.begin(); x != results.end(); ++x) { - (*x) -= _start; - (*x) += _position; - } - - _transients = results; - _valid_transients = true; - - return 0; - } - - /* no existing/complete transient info */ - - if (!Config->get_auto_analyse_audio()) { - pl->session().Dialog (_("\ -You have requested an operation that requires audio analysis.\n\n\ -You currently have \"auto-analyse-audio\" disabled, which means\n\ -that transient data must be generated every time it is required.\n\n\ -If you are doing work that will require transient data on a\n\ -regular basis, you should probably enable \"auto-analyse-audio\"\n\ -then quit ardour and restart.")); - } - - TransientDetector t (pl->session().frame_rate()); - bool existing_results = !results.empty(); - - _transients.clear (); - _valid_transients = false; - - for (uint32_t i = 0; i < n_channels(); ++i) { - - AnalysisFeatureList these_results; - - t.reset (); - - if (t.run ("", this, i, these_results)) { - return -1; - } - - /* translate all transients to give absolute position */ - - for (AnalysisFeatureList::iterator i = these_results.begin(); i != these_results.end(); ++i) { - (*i) += _position; - } - - /* merge */ - - _transients.insert (_transients.end(), these_results.begin(), these_results.end()); - } - - if (!results.empty()) { - if (existing_results) { - - /* merge our transients into the existing ones, then clean up - those. - */ - - results.insert (results.end(), _transients.begin(), _transients.end()); - TransientDetector::cleanup_transients (results, pl->session().frame_rate(), 3.0); - } - - /* make sure ours are clean too */ - - TransientDetector::cleanup_transients (_transients, pl->session().frame_rate(), 3.0); - - } else { - - TransientDetector::cleanup_transients (_transients, pl->session().frame_rate(), 3.0); - results = _transients; - } - - _valid_transients = true; - - return 0; -} - -extern "C" { - - int region_read_peaks_from_c (void *arg, uint32_t npeaks, uint32_t start, uint32_t cnt, intptr_t data, uint32_t n_chan, double samples_per_unit) -{ - return ((AudioRegion *) arg)->read_peaks ((PeakData *) data, (nframes_t) npeaks, (nframes_t) start, (nframes_t) cnt, n_chan,samples_per_unit); -} - -uint32_t region_length_from_c (void *arg) -{ - - return ((AudioRegion *) arg)->length(); -} - -uint32_t sourcefile_length_from_c (void *arg, double zoom_factor) -{ - return ( (AudioRegion *) arg)->audio_source()->available_peaks (zoom_factor) ; -} - -} /* extern "C" */ diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc deleted file mode 100644 index 01dea08d3e..0000000000 --- a/libs/ardour/audiosource.cc +++ /dev/null @@ -1,932 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; -using Glib::ustring; - -bool AudioSource::_build_missing_peakfiles = false; -bool AudioSource::_build_peakfiles = false; - -#define _FPP 256 - -AudioSource::AudioSource (Session& s, ustring name) - : Source (s, name, DataType::AUDIO) -{ - _peaks_built = false; - _peak_byte_max = 0; - peakfile = -1; - _read_data_count = 0; - _write_data_count = 0; - peak_leftover_cnt = 0; - peak_leftover_size = 0; - peak_leftovers = 0; -} - -AudioSource::AudioSource (Session& s, const XMLNode& node) - : Source (s, node) -{ - - _peaks_built = false; - _peak_byte_max = 0; - peakfile = -1; - _read_data_count = 0; - _write_data_count = 0; - peak_leftover_cnt = 0; - peak_leftover_size = 0; - peak_leftovers = 0; - - if (set_state (node)) { - throw failed_constructor(); - } -} - -AudioSource::~AudioSource () -{ - /* shouldn't happen but make sure we don't leak file descriptors anyway */ - - if (peak_leftover_cnt) { - cerr << "AudioSource destroyed with leftover peak data pending" << endl; - } - - if (peakfile >= 0) { - ::close (peakfile); - } - - if (peak_leftovers) { - delete [] peak_leftovers; - } -} - -XMLNode& -AudioSource::get_state () -{ - XMLNode& node (Source::get_state()); - - if (_captured_for.length()) { - node.add_property ("captured-for", _captured_for); - } - - return node; -} - -int -AudioSource::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - - Source::set_state (node); - - if ((prop = node.property ("captured-for")) != 0) { - _captured_for = prop->value(); - } - - return 0; -} - -/*********************************************************************** - PEAK FILE STUFF - ***********************************************************************/ - -bool -AudioSource::peaks_ready (sigc::slot the_slot, sigc::connection& conn) const -{ - bool ret; - Glib::Mutex::Lock lm (_peaks_ready_lock); - - /* check to see if the peak data is ready. if not - connect the slot while still holding the lock. - */ - - if (!(ret = _peaks_built)) { - conn = PeaksReady.connect (the_slot); - } - - return ret; -} - -void -AudioSource::touch_peakfile () -{ - struct stat statbuf; - - if (stat (peakpath.c_str(), &statbuf) != 0 || statbuf.st_size == 0) { - return; - } - - struct utimbuf tbuf; - - tbuf.actime = statbuf.st_atime; - tbuf.modtime = time ((time_t) 0); - - utime (peakpath.c_str(), &tbuf); -} - -int -AudioSource::rename_peakfile (ustring newpath) -{ - /* caller must hold _lock */ - - ustring oldpath = peakpath; - - if (access (oldpath.c_str(), F_OK) == 0) { - if (rename (oldpath.c_str(), newpath.c_str()) != 0) { - error << string_compose (_("cannot rename peakfile for %1 from %2 to %3 (%4)"), _name, oldpath, newpath, strerror (errno)) << endmsg; - return -1; - } - } - - peakpath = newpath; - - return 0; -} - -int -AudioSource::initialize_peakfile (bool newfile, ustring audio_path) -{ - struct stat statbuf; - - peakpath = peak_path (audio_path); - - /* if the peak file should be there, but isn't .... */ - - if (!newfile && !Glib::file_test (peakpath.c_str(), Glib::FILE_TEST_EXISTS)) { - peakpath = find_broken_peakfile (peakpath, audio_path); - } - - if (stat (peakpath.c_str(), &statbuf)) { - if (errno != ENOENT) { - /* it exists in the peaks dir, but there is some kind of error */ - - error << string_compose(_("AudioSource: cannot stat peakfile \"%1\""), peakpath) << endmsg; - return -1; - } - - /* peakfile does not exist */ - - _peaks_built = false; - - } else { - - /* we found it in the peaks dir, so check it out */ - - if (statbuf.st_size == 0 || (statbuf.st_size < ((length() / _FPP) * sizeof (PeakData)))) { - // empty - _peaks_built = false; - } else { - // Check if the audio file has changed since the peakfile was built. - struct stat stat_file; - int err = stat (audio_path.c_str(), &stat_file); - - if (err) { - _peaks_built = false; - _peak_byte_max = 0; - } else { - - /* allow 6 seconds slop on checking peak vs. file times because of various - disk action "races" - */ - - if (stat_file.st_mtime > statbuf.st_mtime && (stat_file.st_mtime - statbuf.st_mtime > 6)) { - _peaks_built = false; - _peak_byte_max = 0; - } else { - _peaks_built = true; - _peak_byte_max = statbuf.st_size; - } - } - } - } - - if (!newfile && !_peaks_built && _build_missing_peakfiles && _build_peakfiles) { - build_peaks_from_scratch (); - } - - return 0; -} - -nframes_t -AudioSource::read (Sample *dst, nframes_t start, nframes_t cnt) const -{ - Glib::Mutex::Lock lm (_lock); - return read_unlocked (dst, start, cnt); -} - -nframes_t -AudioSource::write (Sample *dst, nframes_t cnt) -{ - Glib::Mutex::Lock lm (_lock); - return write_unlocked (dst, cnt); -} - -int -AudioSource::read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_visual_peak) const -{ - return read_peaks_with_fpp (peaks, npeaks, start, cnt, samples_per_visual_peak, _FPP); -} - -int -AudioSource::read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, - double samples_per_visual_peak, nframes_t samples_per_file_peak) const -{ - Glib::Mutex::Lock lm (_lock); - double scale; - double expected_peaks; - PeakData::PeakDatum xmax; - PeakData::PeakDatum xmin; - int32_t to_read; - uint32_t nread; - nframes_t zero_fill = 0; - int ret = -1; - PeakData* staging = 0; - Sample* raw_staging = 0; - int _peakfile = -1; - - expected_peaks = (cnt / (double) samples_per_file_peak); - scale = npeaks/expected_peaks; - -#undef DEBUG_READ_PEAKS -#ifdef DEBUG_READ_PEAKS - cerr << "======>RP: npeaks = " << npeaks - << " start = " << start - << " cnt = " << cnt - << " len = " << _length - << " samples_per_visual_peak =" << samples_per_visual_peak - << " expected was " << expected_peaks << " ... scale = " << scale - << " PD ptr = " << peaks - < _length - start) { - // cerr << "too close to end @ " << _length << " given " << start << " + " << cnt << endl; - cnt = _length - start; - nframes_t old = npeaks; - npeaks = min ((nframes_t) floor (cnt / samples_per_visual_peak), npeaks); - zero_fill = old - npeaks; - } - - // cerr << "actual npeaks = " << npeaks << " zf = " << zero_fill << endl; - - if (npeaks == cnt) { - -#ifdef DEBUG_READ_PEAKS - cerr << "RAW DATA\n"; -#endif - /* no scaling at all, just get the sample data and duplicate it for - both max and min peak values. - */ - - Sample* raw_staging = new Sample[cnt]; - - if (read_unlocked (raw_staging, start, cnt) != cnt) { - error << _("cannot read sample data for unscaled peak computation") << endmsg; - return -1; - } - - for (nframes_t i = 0; i < npeaks; ++i) { - peaks[i].max = raw_staging[i]; - peaks[i].min = raw_staging[i]; - } - - delete [] raw_staging; - return 0; - } - - if (scale == 1.0) { - - off_t first_peak_byte = (start / samples_per_file_peak) * sizeof (PeakData); - - /* open, read, close */ - - if ((_peakfile = ::open (peakpath.c_str(), O_RDONLY, 0664)) < 0) { - error << string_compose(_("AudioSource: cannot open peakpath (a) \"%1\" (%2)"), peakpath, strerror (errno)) << endmsg; - return -1; - } - -#ifdef DEBUG_READ_PEAKS - cerr << "DIRECT PEAKS\n"; -#endif - - nread = ::pread (_peakfile, peaks, sizeof (PeakData)* npeaks, first_peak_byte); - close (_peakfile); - - if (nread != sizeof (PeakData) * npeaks) { - cerr << "AudioSource[" - << _name - << "]: cannot read peaks from peakfile! (read only " - << nread - << " not " - << npeaks - << "at sample " - << start - << " = byte " - << first_peak_byte - << ')' - << endl; - return -1; - } - - if (zero_fill) { - memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); - } - - return 0; - } - - - nframes_t tnp; - - if (scale < 1.0) { - -#ifdef DEBUG_READ_PEAKS - cerr << "DOWNSAMPLE\n"; -#endif - /* the caller wants: - - - more frames-per-peak (lower resolution) than the peakfile, or to put it another way, - - less peaks than the peakfile holds for the same range - - So, read a block into a staging area, and then downsample from there. - - to avoid confusion, I'll refer to the requested peaks as visual_peaks and the peakfile peaks as stored_peaks - */ - - const uint32_t chunksize = (uint32_t) min (expected_peaks, 65536.0); - - staging = new PeakData[chunksize]; - - /* compute the rounded up frame position */ - - nframes_t current_frame = start; - nframes_t current_stored_peak = (nframes_t) ceil (current_frame / (double) samples_per_file_peak); - uint32_t next_visual_peak = (uint32_t) ceil (current_frame / samples_per_visual_peak); - double next_visual_peak_frame = next_visual_peak * samples_per_visual_peak; - uint32_t stored_peak_before_next_visual_peak = (nframes_t) next_visual_peak_frame / samples_per_file_peak; - uint32_t nvisual_peaks = 0; - uint32_t stored_peaks_read = 0; - uint32_t i = 0; - - /* handle the case where the initial visual peak is on a pixel boundary */ - - current_stored_peak = min (current_stored_peak, stored_peak_before_next_visual_peak); - - /* open ... close during out: handling */ - - if ((_peakfile = ::open (peakpath.c_str(), O_RDONLY, 0664)) < 0) { - error << string_compose(_("AudioSource: cannot open peakpath (b) \"%1\" (%2)"), peakpath, strerror (errno)) << endmsg; - return 0; - } - - while (nvisual_peaks < npeaks) { - - if (i == stored_peaks_read) { - - uint32_t start_byte = current_stored_peak * sizeof(PeakData); - tnp = min ((_length/samples_per_file_peak - current_stored_peak), (nframes_t) expected_peaks); - to_read = min (chunksize, tnp); - -#ifdef DEBUG_READ_PEAKS - cerr << "read " << sizeof (PeakData) * to_read << " from peakfile @ " << start_byte << endl; -#endif - - if ((nread = ::pread (_peakfile, staging, sizeof (PeakData) * to_read, start_byte)) - != sizeof (PeakData) * to_read) { - - off_t fend = lseek (_peakfile, 0, SEEK_END); - - cerr << "AudioSource[" - << _name - << "]: cannot read peak data from peakfile (" - << (nread / sizeof(PeakData)) - << " peaks instead of " - << to_read - << ") (" - << strerror (errno) - << ')' - << " at start_byte = " << start_byte - << " _length = " << _length << " versus len = " << fend - << " expected maxpeaks = " << (_length - current_frame)/samples_per_file_peak - << " npeaks was " << npeaks - << endl; - goto out; - } - - i = 0; - stored_peaks_read = nread / sizeof(PeakData); - } - - xmax = -1.0; - xmin = 1.0; - - while ((i < stored_peaks_read) && (current_stored_peak <= stored_peak_before_next_visual_peak)) { - - xmax = max (xmax, staging[i].max); - xmin = min (xmin, staging[i].min); - ++i; - ++current_stored_peak; - --expected_peaks; - } - - peaks[nvisual_peaks].max = xmax; - peaks[nvisual_peaks].min = xmin; - ++nvisual_peaks; - ++next_visual_peak; - - //next_visual_peak_frame = min ((next_visual_peak * samples_per_visual_peak), (next_visual_peak_frame+samples_per_visual_peak) ); - next_visual_peak_frame = min ((double) start+cnt, (next_visual_peak_frame+samples_per_visual_peak) ); - stored_peak_before_next_visual_peak = (uint32_t) next_visual_peak_frame / samples_per_file_peak; - } - - if (zero_fill) { - memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); - } - - ret = 0; - - } else { - -#ifdef DEBUG_READ_PEAKS - cerr << "UPSAMPLE\n"; -#endif - /* the caller wants - - - less frames-per-peak (more resolution) - - more peaks than stored in the Peakfile - - So, fetch data from the raw source, and generate peak - data on the fly. - */ - - nframes_t frames_read = 0; - nframes_t current_frame = start; - nframes_t i = 0; - nframes_t nvisual_peaks = 0; - nframes_t chunksize = (nframes_t) min (cnt, (nframes_t) 4096); - raw_staging = new Sample[chunksize]; - - nframes_t frame_pos = start; - double pixel_pos = floor (frame_pos / samples_per_visual_peak); - double next_pixel_pos = ceil (frame_pos / samples_per_visual_peak); - double pixels_per_frame = 1.0 / samples_per_visual_peak; - - xmin = 1.0; - xmax = -1.0; - - while (nvisual_peaks < npeaks) { - - if (i == frames_read) { - - to_read = min (chunksize, (_length - current_frame)); - - if (to_read == 0) { - /* XXX ARGH .. out by one error ... need to figure out why this happens - and fix it rather than do this band-aid move. - */ - zero_fill = npeaks - nvisual_peaks; - break; - } - - if ((frames_read = read_unlocked (raw_staging, current_frame, to_read)) == 0) { - error << string_compose(_("AudioSource[%1]: peak read - cannot read %2 samples at offset %3 of %4 (%5)"), - _name, to_read, current_frame, _length, strerror (errno)) - << endmsg; - goto out; - } - - i = 0; - } - - xmax = max (xmax, raw_staging[i]); - xmin = min (xmin, raw_staging[i]); - ++i; - ++current_frame; - pixel_pos += pixels_per_frame; - - if (pixel_pos >= next_pixel_pos) { - - peaks[nvisual_peaks].max = xmax; - peaks[nvisual_peaks].min = xmin; - ++nvisual_peaks; - xmin = 1.0; - xmax = -1.0; - - next_pixel_pos = ceil (pixel_pos + 0.5); - } - } - - if (zero_fill) { - memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); - } - - ret = 0; - } - - out: - if (_peakfile >= 0) { - close (_peakfile); - } - - if (staging) { - delete [] staging; - } - - if (raw_staging) { - delete [] raw_staging; - } - -#ifdef DEBUG_READ_PEAKS - cerr << "RP DONE\n"; -#endif - - return ret; -} - -#undef DEBUG_PEAK_BUILD - -int -AudioSource::build_peaks_from_scratch () -{ - nframes_t current_frame; - nframes_t cnt; - Sample* buf = 0; - nframes_t frames_read; - nframes_t frames_to_read; - const nframes_t bufsize = 65536; // 256kB per disk read for mono data is about ideal - - int ret = -1; - - { - /* hold lock while building peaks */ - - Glib::Mutex::Lock lp (_lock); - - if (prepare_for_peakfile_writes ()) { - goto out; - } - - current_frame = 0; - cnt = _length; - _peaks_built = false; - buf = new Sample[bufsize]; - - while (cnt) { - - frames_to_read = min (bufsize, cnt); - - if ((frames_read = read_unlocked (buf, current_frame, frames_to_read)) != frames_to_read) { - error << string_compose(_("%1: could not write read raw data for peak computation (%2)"), _name, strerror (errno)) << endmsg; - done_with_peakfile_writes (false); - goto out; - } - - if (compute_and_write_peaks (buf, current_frame, frames_read, true, false, _FPP)) { - break; - } - - current_frame += frames_read; - cnt -= frames_read; - } - - if (cnt == 0) { - /* success */ - truncate_peakfile(); - } - - done_with_peakfile_writes ((cnt == 0)); - } - - { - Glib::Mutex::Lock lm (_peaks_ready_lock); - - if (_peaks_built) { - PeaksReady (); /* EMIT SIGNAL */ - ret = 0; - } - } - - out: - if (ret) { - unlink (peakpath.c_str()); - } - - if (buf) { - delete [] buf; - } - - return ret; -} - -int -AudioSource::prepare_for_peakfile_writes () -{ - if ((peakfile = ::open (peakpath.c_str(), O_RDWR|O_CREAT, 0664)) < 0) { - error << string_compose(_("AudioSource: cannot open peakpath (c) \"%1\" (%2)"), peakpath, strerror (errno)) << endmsg; - return -1; - } - return 0; -} - -void -AudioSource::done_with_peakfile_writes (bool done) -{ - if (peak_leftover_cnt) { - compute_and_write_peaks (0, 0, 0, true, false, _FPP); - } - - if (done) { - _peaks_built = true; - } - - if (peakfile >= 0) { - close (peakfile); - peakfile = -1; - } -} - -int -AudioSource::compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt, bool force, bool intermediate_peaks_ready) -{ - return compute_and_write_peaks (buf, first_frame, cnt, force, intermediate_peaks_ready, _FPP); -} - -int -AudioSource::compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframes_t cnt, bool force, - bool intermediate_peaks_ready, nframes_t fpp) -{ - Sample* buf2 = 0; - nframes_t to_do; - uint32_t peaks_computed; - PeakData* peakbuf = 0; - int ret = -1; - nframes_t current_frame; - nframes_t frames_done; - const size_t blocksize = (128 * 1024); - off_t first_peak_byte; - - if (peakfile < 0) { - prepare_for_peakfile_writes (); - } - - restart: - if (peak_leftover_cnt) { - - if (first_frame != peak_leftover_frame + peak_leftover_cnt) { - - /* uh-oh, ::seek() since the last ::compute_and_write_peaks(), - and we have leftovers. flush a single peak (since the leftovers - never represent more than that, and restart. - */ - - PeakData x; - - x.min = peak_leftovers[0]; - x.max = peak_leftovers[0]; - - off_t byte = (peak_leftover_frame / fpp) * sizeof (PeakData); - - if (::pwrite (peakfile, &x, sizeof (PeakData), byte) != sizeof (PeakData)) { - error << string_compose(_("%1: could not write peak file data (%2)"), _name, strerror (errno)) << endmsg; - goto out; - } - - _peak_byte_max = max (_peak_byte_max, (off_t) (byte + sizeof(PeakData))); - - { - Glib::Mutex::Lock lm (_peaks_ready_lock); - PeakRangeReady (peak_leftover_frame, peak_leftover_cnt); /* EMIT SIGNAL */ - if (intermediate_peaks_ready) { - PeaksReady (); /* EMIT SIGNAL */ - } - } - - /* left overs are done */ - - peak_leftover_cnt = 0; - goto restart; - } - - /* else ... had leftovers, but they immediately preceed the new data, so just - merge them and compute. - */ - - /* make a new contiguous buffer containing leftovers and the new stuff */ - - to_do = cnt + peak_leftover_cnt; - buf2 = new Sample[to_do]; - - /* the remnants */ - memcpy (buf2, peak_leftovers, peak_leftover_cnt * sizeof (Sample)); - - /* the new stuff */ - memcpy (buf2+peak_leftover_cnt, buf, cnt * sizeof (Sample)); - - /* no more leftovers */ - peak_leftover_cnt = 0; - - /* use the temporary buffer */ - buf = buf2; - - /* make sure that when we write into the peakfile, we startup where we left off */ - - first_frame = peak_leftover_frame; - - } else { - to_do = cnt; - } - - peakbuf = new PeakData[(to_do/fpp)+1]; - peaks_computed = 0; - current_frame = first_frame; - frames_done = 0; - - while (to_do) { - - /* if some frames were passed in (i.e. we're not flushing leftovers) - and there are less than fpp to do, save them till - next time - */ - - if (force && (to_do < fpp)) { - /* keep the left overs around for next time */ - - if (peak_leftover_size < to_do) { - delete [] peak_leftovers; - peak_leftovers = new Sample[to_do]; - peak_leftover_size = to_do; - } - memcpy (peak_leftovers, buf, to_do * sizeof (Sample)); - peak_leftover_cnt = to_do; - peak_leftover_frame = current_frame; - - /* done for now */ - - break; - } - - nframes_t this_time = min (fpp, to_do); - - peakbuf[peaks_computed].max = buf[0]; - peakbuf[peaks_computed].min = buf[0]; - - ARDOUR::find_peaks (buf+1, this_time-1, &peakbuf[peaks_computed].min, &peakbuf[peaks_computed].max); - - peaks_computed++; - buf += this_time; - to_do -= this_time; - frames_done += this_time; - current_frame += this_time; - } - - first_peak_byte = (first_frame / fpp) * sizeof (PeakData); - - if (can_truncate_peaks()) { - - /* on some filesystems (ext3, at least) this helps to reduce fragmentation of - the peakfiles. its not guaranteed to do so, and even on ext3 (as of december 2006) - it does not cause single-extent allocation even for peakfiles of - less than BLOCKSIZE bytes. only call ftruncate if we'll make the file larger. - */ - - off_t endpos = lseek (peakfile, 0, SEEK_END); - off_t target_length = blocksize * ((first_peak_byte + blocksize + 1) / blocksize); - - if (endpos < target_length) { - ftruncate (peakfile, target_length); - /* error doesn't actually matter though, so continue on without testing */ - } - } - - if (::pwrite (peakfile, peakbuf, sizeof (PeakData) * peaks_computed, first_peak_byte) != (ssize_t) (sizeof (PeakData) * peaks_computed)) { - error << string_compose(_("%1: could not write peak file data (%2)"), _name, strerror (errno)) << endmsg; - goto out; - } - - _peak_byte_max = max (_peak_byte_max, (off_t) (first_peak_byte + sizeof(PeakData)*peaks_computed)); - - if (frames_done) { - Glib::Mutex::Lock lm (_peaks_ready_lock); - PeakRangeReady (first_frame, frames_done); /* EMIT SIGNAL */ - if (intermediate_peaks_ready) { - PeaksReady (); /* EMIT SIGNAL */ - } - } - - ret = 0; - - out: - delete [] peakbuf; - if (buf2) { - delete [] buf2; - } - return ret; -} - -void -AudioSource::truncate_peakfile () -{ - if (peakfile < 0) { - error << string_compose (_("programming error: %1"), "AudioSource::truncate_peakfile() called without open peakfile descriptor") - << endmsg; - return; - } - - /* truncate the peakfile down to its natural length if necessary */ - - off_t end = lseek (peakfile, 0, SEEK_END); - - if (end > _peak_byte_max) { - ftruncate (peakfile, _peak_byte_max); - } -} - -bool -AudioSource::file_changed (ustring path) -{ - struct stat stat_file; - struct stat stat_peak; - - int e1 = stat (path.c_str(), &stat_file); - int e2 = stat (peak_path(path).c_str(), &stat_peak); - - if (!e1 && !e2 && stat_file.st_mtime > stat_peak.st_mtime){ - return true; - } else { - return false; - } -} - -nframes_t -AudioSource::available_peaks (double zoom_factor) const -{ - off_t end; - - if (zoom_factor < _FPP) { - return length(); // peak data will come from the audio file - } - - /* peak data comes from peakfile, but the filesize might not represent - the valid data due to ftruncate optimizations, so use _peak_byte_max state. - XXX - there might be some atomicity issues here, we should probably add a lock, - but _peak_byte_max only monotonically increases after initialization. - */ - - end = _peak_byte_max; - - return (end/sizeof(PeakData)) * _FPP; -} - -void -AudioSource::update_length (nframes_t pos, nframes_t cnt) -{ - if (pos + cnt > _length) { - _length = pos+cnt; - } -} - diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc deleted file mode 100644 index d6f63c2f9d..0000000000 --- a/libs/ardour/auditioner.cc +++ /dev/null @@ -1,233 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -#include "i18n.h" - -Auditioner::Auditioner (Session& s) - : AudioTrack (s, "auditioner", Route::Hidden) -{ - string left = Config->get_auditioner_output_left(); - string right = Config->get_auditioner_output_right(); - - if (left == "default") { - left = _session.engine().get_nth_physical_output (DataType::AUDIO, 0); - } - - if (right == "default") { - right = _session.engine().get_nth_physical_output (DataType::AUDIO, 1); - } - - if ((left.length() == 0) && (right.length() == 0)) { - warning << _("no outputs available for auditioner - manual connection required") << endmsg; - return; - } - - defer_pan_reset (); - - if (left.length()) { - add_output_port (left, this, DataType::AUDIO); - } - - if (right.length()) { - audio_diskstream()->add_channel (1); - add_output_port (right, this, DataType::AUDIO); - } - - allow_pan_reset (); - - reset_panner (); - - IO::output_changed.connect (mem_fun (*this, &Auditioner::output_changed)); - - the_region.reset ((AudioRegion*) 0); - g_atomic_int_set (&_active, 0); -} - -Auditioner::~Auditioner () -{ -} - -AudioPlaylist& -Auditioner::prepare_playlist () -{ - // FIXME auditioner is still audio-only - boost::shared_ptr apl = boost::dynamic_pointer_cast(_diskstream->playlist()); - assert(apl); - - apl->clear (); - return *apl; -} - -void -Auditioner::audition_current_playlist () -{ - if (g_atomic_int_get (&_active)) { - /* don't go via session for this, because we are going - to remain active. - */ - cancel_audition (); - } - - Glib::Mutex::Lock lm (lock); - _diskstream->seek (0); - length = _diskstream->playlist()->get_maximum_extent(); - current_frame = 0; - - /* force a panner reset now that we have all channels */ - - _panner->reset (n_outputs().n_audio(), _diskstream->n_channels().n_audio()); - - g_atomic_int_set (&_active, 1); -} - -void -Auditioner::audition_region (boost::shared_ptr region) -{ - if (g_atomic_int_get (&_active)) { - /* don't go via session for this, because we are going - to remain active. - */ - cancel_audition (); - } - - if (boost::dynamic_pointer_cast(region) == 0) { - error << _("Auditioning of non-audio regions not yet supported") << endmsg; - return; - } - - Glib::Mutex::Lock lm (lock); - - /* copy it */ - - boost::shared_ptr the_region (boost::dynamic_pointer_cast (RegionFactory::create (region))); - the_region->set_position (0, this); - - _diskstream->playlist()->drop_regions (); - _diskstream->playlist()->add_region (the_region, 0, 1); - - if (_diskstream->n_channels().n_audio() < the_region->n_channels()) { - audio_diskstream()->add_channel (the_region->n_channels() - _diskstream->n_channels().n_audio()); - } else if (_diskstream->n_channels().n_audio() > the_region->n_channels()) { - audio_diskstream()->remove_channel (_diskstream->n_channels().n_audio() - the_region->n_channels()); - } - - /* force a panner reset now that we have all channels */ - - reset_panner(); - - length = the_region->length(); - - int dir; - nframes_t offset = the_region->sync_offset (dir); - - /* can't audition from a negative sync point */ - - if (dir < 0) { - offset = 0; - } - - _diskstream->seek (offset); - current_frame = offset; - - g_atomic_int_set (&_active, 1); -} - -int -Auditioner::play_audition (nframes_t nframes) -{ - bool need_butler; - nframes_t this_nframes; - int ret; - - if (g_atomic_int_get (&_active) == 0) { - silence (nframes, 0); - return 0; - } - - this_nframes = min (nframes, length - current_frame); - - _diskstream->prepare (); - - if ((ret = roll (this_nframes, current_frame, current_frame + nframes, 0, false, false, false)) != 0) { - silence (nframes, 0); - return ret; - } - - need_butler = _diskstream->commit (this_nframes); - current_frame += this_nframes; - - if (current_frame >= length) { - _session.cancel_audition (); - return 0; - } else { - return need_butler ? 1 : 0; - } -} - -void -Auditioner::output_changed (IOChange change, void* src) -{ - string phys; - - if (change & ConnectionsChanged) { - vector connections; - if (output (0)->get_connections (connections)) { - phys = _session.engine().get_nth_physical_output (DataType::AUDIO, 0); - if (phys != connections[0]) { - Config->set_auditioner_output_left (connections[0]); - } else { - Config->set_auditioner_output_left ("default"); - } - } else { - Config->set_auditioner_output_left (""); - } - - connections.clear (); - - if (output (1)->get_connections (connections)) { - phys = _session.engine().get_nth_physical_output (DataType::AUDIO, 1); - if (phys != connections[0]) { - Config->set_auditioner_output_right (connections[0]); - } else { - Config->set_auditioner_output_right ("default"); - } - } else { - Config->set_auditioner_output_right (""); - } - } -} diff --git a/libs/ardour/auto_bundle.cc b/libs/ardour/auto_bundle.cc deleted file mode 100644 index 9da32bbb7a..0000000000 --- a/libs/ardour/auto_bundle.cc +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include "ardour/auto_bundle.h" - -ARDOUR::AutoBundle::AutoBundle (bool i) - : Bundle (i) -{ - -} - -ARDOUR::AutoBundle::AutoBundle (std::string const & n, bool i) - : Bundle (n, i) -{ - -} - -uint32_t -ARDOUR::AutoBundle::nchannels () const -{ - Glib::Mutex::Lock lm (_ports_mutex); - return _ports.size (); -} - -const ARDOUR::PortList& -ARDOUR::AutoBundle::channel_ports (uint32_t c) const -{ - assert (c < nchannels()); - - Glib::Mutex::Lock lm (_ports_mutex); - return _ports[c]; -} - -void -ARDOUR::AutoBundle::set_channels (uint32_t n) -{ - Glib::Mutex::Lock lm (_ports_mutex); - _ports.resize (n); -} - -void -ARDOUR::AutoBundle::set_port (uint32_t c, std::string const & p) -{ - assert (c < nchannels ()); - - Glib::Mutex::Lock lm (_ports_mutex); - _ports[c].resize (1); - _ports[c][0] = p; -} diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc deleted file mode 100644 index 3c076c371a..0000000000 --- a/libs/ardour/automatable.cc +++ /dev/null @@ -1,477 +0,0 @@ -/* - Copyright (C) 2001,2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -nframes_t Automatable::_automation_interval = 0; - -Automatable::Automatable(Session& _session, const string& name) - : SessionObject(_session, name) - , _last_automation_snapshot(0) -{} - -int -Automatable::old_set_automation_state (const XMLNode& node) -{ - const XMLProperty *prop; - - if ((prop = node.property ("path")) != 0) { - load_automation (prop->value()); - } else { - warning << string_compose(_("%1: Automation node has no path property"), _name) << endmsg; - } - - if ((prop = node.property ("visible")) != 0) { - uint32_t what; - stringstream sstr; - - _visible_controls.clear (); - - sstr << prop->value(); - while (1) { - sstr >> what; - if (sstr.fail()) { - break; - } - mark_automation_visible (Parameter(PluginAutomation, what), true); - } - } - - _last_automation_snapshot = 0; - - return 0; -} - -int -Automatable::load_automation (const string& path) -{ - string fullpath; - - if (path[0] == '/') { // legacy - fullpath = path; - } else { - fullpath = _session.automation_dir(); - fullpath += path; - } - ifstream in (fullpath.c_str()); - - if (!in) { - warning << string_compose(_("%1: cannot open %2 to load automation data (%3)"), _name, fullpath, strerror (errno)) << endmsg; - return 1; - } - - Glib::Mutex::Lock lm (_automation_lock); - set tosave; - _controls.clear (); - - _last_automation_snapshot = 0; - - while (in) { - double when; - double value; - uint32_t port; - - in >> port; if (!in) break; - in >> when; if (!in) goto bad; - in >> value; if (!in) goto bad; - - /* FIXME: this is legacy and only used for plugin inserts? I think? */ - boost::shared_ptr c = control (Parameter(PluginAutomation, port), true); - c->list()->add (when, value); - tosave.insert (Parameter(PluginAutomation, port)); - } - - return 0; - - bad: - error << string_compose(_("%1: cannot load automation data from %2"), _name, fullpath) << endmsg; - _controls.clear (); - return -1; -} - -void -Automatable::add_control(boost::shared_ptr ac) -{ - Parameter param = ac->parameter(); - - _controls[param] = ac; - - _can_automate_list.insert(param); - - // Sync everything (derived classes) up to initial values - auto_state_changed(param); -} - -void -Automatable::what_has_automation (set& s) const -{ - Glib::Mutex::Lock lm (_automation_lock); - Controls::const_iterator li; - - // FIXME: correct semantics? - for (li = _controls.begin(); li != _controls.end(); ++li) { - s.insert ((*li).first); - } -} - -void -Automatable::what_has_visible_automation (set& s) const -{ - Glib::Mutex::Lock lm (_automation_lock); - set::const_iterator li; - - for (li = _visible_controls.begin(); li != _visible_controls.end(); ++li) { - s.insert (*li); - } -} - -/** Returns NULL if we don't have an AutomationList for \a parameter. - */ -boost::shared_ptr -Automatable::control (Parameter parameter, bool create_if_missing) -{ - Controls::iterator i = _controls.find(parameter); - - if (i != _controls.end()) { - return i->second; - - } else if (create_if_missing) { - boost::shared_ptr al (new AutomationList ( - parameter, FLT_MIN, FLT_MAX, default_parameter_value (parameter))); - boost::shared_ptr ac(control_factory(al)); - add_control(ac); - return ac; - - } else { - //warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg; - return boost::shared_ptr(); - } -} - -boost::shared_ptr -Automatable::control (Parameter parameter) const -{ - Controls::const_iterator i = _controls.find(parameter); - - if (i != _controls.end()) { - return i->second; - } else { - //warning << "AutomationList " << parameter.to_string() << " not found for " << _name << endmsg; - return boost::shared_ptr(); - } -} - -string -Automatable::describe_parameter (Parameter param) -{ - /* derived classes like PluginInsert should override this */ - - if (param == Parameter(GainAutomation)) { - return _("Fader"); - } else if (param.type() == PanAutomation) { - return (string_compose(_("Pan %1"), param.id())); - } else if (param.type() == MidiCCAutomation) { - return string_compose("CC %1 (%2) [%3]", - param.id(), midi_name(param.id()), int(param.channel()) + 1); - } else if (param.type() == MidiPgmChangeAutomation) { - return string_compose("Program [%1]", int(param.channel()) + 1); - } else if (param.type() == MidiPitchBenderAutomation) { - return string_compose("Bender [%1]", int(param.channel()) + 1); - } else if (param.type() == MidiChannelAftertouchAutomation) { - return string_compose("Aftertouch [%1]", int(param.channel()) + 1); - } else { - return param.to_string(); - } -} - -void -Automatable::can_automate (Parameter what) -{ - _can_automate_list.insert (what); -} - -void -Automatable::mark_automation_visible (Parameter what, bool yn) -{ - if (yn) { - _visible_controls.insert (what); - } else { - set::iterator i; - - if ((i = _visible_controls.find (what)) != _visible_controls.end()) { - _visible_controls.erase (i); - } - } -} - -bool -Automatable::find_next_event (nframes_t now, nframes_t end, ControlEvent& next_event) const -{ - Controls::const_iterator li; - - next_event.when = max_frames; - - for (li = _controls.begin(); li != _controls.end(); ++li) { - - AutomationList::const_iterator i; - boost::shared_ptr alist (li->second->list()); - ControlEvent cp (now, 0.0f); - - for (i = lower_bound (alist->const_begin(), alist->const_end(), &cp, AutomationList::time_comparator); - i != alist->const_end() && (*i)->when < end; ++i) { - if ((*i)->when > now) { - break; - } - } - - if (i != alist->const_end() && (*i)->when < end) { - - if ((*i)->when < next_event.when) { - next_event.when = (*i)->when; - } - } - } - - return next_event.when != max_frames; -} - -/** \a legacy_param is used for loading legacy sessions where an object (IO, Panner) - * had a single automation parameter, with it's type implicit. Derived objects should - * pass that type and it will be used for the untyped AutomationList found. - */ -int -Automatable::set_automation_state (const XMLNode& node, Parameter legacy_param) -{ - Glib::Mutex::Lock lm (_automation_lock); - - /* Don't clear controls, since some may be special derived Controllable classes */ - - _visible_controls.clear (); - - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - /*if (sscanf ((*niter)->name().c_str(), "parameter-%" PRIu32, ¶m) != 1) { - error << string_compose (_("%2: badly formatted node name in XML automation state, ignored"), _name) << endmsg; - continue; - }*/ - - if ((*niter)->name() == "AutomationList") { - - const XMLProperty* id_prop = (*niter)->property("automation-id"); - - Parameter param = (id_prop ? Parameter(id_prop->value()) : legacy_param); - - boost::shared_ptr al (new AutomationList(**niter, param)); - - if (!id_prop) { - warning << "AutomationList node without automation-id property, " - << "using default: " << legacy_param.to_string() << endmsg; - al->set_parameter(legacy_param); - } - - boost::shared_ptr existing = control(param); - if (existing) - existing->set_list(al); - else - add_control(control_factory(al)); - - } else { - error << "Expected AutomationList node, got '" << (*niter)->name() << endmsg; - } - } - - _last_automation_snapshot = 0; - - return 0; -} - -XMLNode& -Automatable::get_automation_state () -{ - Glib::Mutex::Lock lm (_automation_lock); - XMLNode* node = new XMLNode (X_("Automation")); - - if (_controls.empty()) { - return *node; - } - - for (Controls::iterator li = _controls.begin(); li != _controls.end(); ++li) { - node->add_child_nocopy (li->second->list()->get_state ()); - } - - return *node; -} - -void -Automatable::clear_automation () -{ - Glib::Mutex::Lock lm (_automation_lock); - - for (Controls::iterator li = _controls.begin(); li != _controls.end(); ++li) - li->second->list()->clear(); -} - -void -Automatable::set_parameter_automation_state (Parameter param, AutoState s) -{ - Glib::Mutex::Lock lm (_automation_lock); - - boost::shared_ptr c = control (param, true); - - if (s != c->list()->automation_state()) { - c->list()->set_automation_state (s); - _session.set_dirty (); - } -} - -AutoState -Automatable::get_parameter_automation_state (Parameter param, bool lock) -{ - AutoState result = Off; - - if (lock) - _automation_lock.lock(); - - boost::shared_ptr c = control(param); - - if (c) - result = c->list()->automation_state(); - - if (lock) - _automation_lock.unlock(); - - return result; -} - -void -Automatable::set_parameter_automation_style (Parameter param, AutoStyle s) -{ - Glib::Mutex::Lock lm (_automation_lock); - - boost::shared_ptr c = control(param, true); - - if (s != c->list()->automation_style()) { - c->list()->set_automation_style (s); - _session.set_dirty (); - } -} - -AutoStyle -Automatable::get_parameter_automation_style (Parameter param) -{ - Glib::Mutex::Lock lm (_automation_lock); - - boost::shared_ptr c = control(param); - - if (c) { - return c->list()->automation_style(); - } else { - return Absolute; // whatever - } -} - -void -Automatable::protect_automation () -{ - set automated_params; - - what_has_automation (automated_params); - - for (set::iterator i = automated_params.begin(); i != automated_params.end(); ++i) { - - boost::shared_ptr c = control(*i); - - switch (c->list()->automation_state()) { - case Write: - c->list()->set_automation_state (Off); - break; - case Touch: - c->list()->set_automation_state (Play); - break; - default: - break; - } - } -} - -void -Automatable::automation_snapshot (nframes_t now, bool force) -{ - if (force || _last_automation_snapshot > now || (now - _last_automation_snapshot) > _automation_interval) { - - for (Controls::iterator i = _controls.begin(); i != _controls.end(); ++i) { - if (i->second->list()->automation_write()) { - i->second->list()->rt_add (now, i->second->user_value()); - } - } - - _last_automation_snapshot = now; - } -} - -void -Automatable::transport_stopped (nframes_t now) -{ - for (Controls::iterator li = _controls.begin(); li != _controls.end(); ++li) { - - boost::shared_ptr c = li->second; - - c->list()->reposition_for_rt_add (now); - - if (c->list()->automation_state() != Off) { - c->set_value(c->list()->eval(now)); - } - } -} - -/* FIXME: this probably doesn't belong here */ -boost::shared_ptr -Automatable::control_factory(boost::shared_ptr list) -{ - if ( - list->parameter().type() == MidiCCAutomation || - list->parameter().type() == MidiPgmChangeAutomation || - list->parameter().type() == MidiChannelAftertouchAutomation - ) { - // FIXME: this will die horribly if this is not a MidiTrack - return boost::shared_ptr(new MidiTrack::MidiControl((MidiTrack*)this, list)); - } else { - return boost::shared_ptr(new AutomationControl(_session, list)); - } -} - diff --git a/libs/ardour/automation.cc b/libs/ardour/automation.cc deleted file mode 100644 index c6e96cfac8..0000000000 --- a/libs/ardour/automation.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -template -struct AutomationEvent { - uint32_t frame; - AutomatedObject *object; - void (AutomatedObject::*function) (void *); - void *arg; - - void operator() (){ - object->function (arg); - } -}; diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc deleted file mode 100644 index 4885a6fed9..0000000000 --- a/libs/ardour/automation_control.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - - -AutomationControl::AutomationControl(Session& session, boost::shared_ptr list, string name) - : Controllable((name == "unnamed controllable") ? list->parameter().to_string() : name) - , _session(session) - , _list(list) - , _user_value(list->default_value()) -{ -} - - -/** Get the currently effective value (ie the one that corresponds to current output) - */ -float -AutomationControl::get_value() const -{ - if (_list->automation_playback()) - return _list->eval(_session.transport_frame()); - else - return _user_value; -} - - -void -AutomationControl::set_value(float value) -{ - _user_value = value; - - if (_session.transport_stopped() && _list->automation_write()) - _list->add(_session.transport_frame(), value); - - Changed(); /* EMIT SIGNAL */ -} - - -/** Get the latest user-set value, which may not equal get_value() when automation - * is playing back, etc. - * - * Automation write/touch works by periodically sampling this value and adding it - * to the AutomationList. - */ -float -AutomationControl::user_value() const -{ - return _user_value; -} - - -void -AutomationControl::set_list(boost::shared_ptr list) -{ - _list = list; - _user_value = list->default_value(); - Changed(); /* EMIT SIGNAL */ -} - - -Parameter -AutomationControl::parameter() const -{ - return _list->parameter(); -} diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc deleted file mode 100644 index af390953f4..0000000000 --- a/libs/ardour/automation_event.cc +++ /dev/null @@ -1,1666 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace sigc; -using namespace PBD; - -sigc::signal AutomationList::AutomationListCreated; - -static bool sort_events_by_time (ControlEvent* a, ControlEvent* b) -{ - return a->when < b->when; -} - -#if 0 -static void dumpit (const AutomationList& al, string prefix = "") -{ - cerr << prefix << &al << endl; - for (AutomationList::const_iterator i = al.const_begin(); i != al.const_end(); ++i) { - cerr << prefix << '\t' << (*i)->when << ',' << (*i)->value << endl; - } - cerr << "\n"; -} -#endif - -/* XXX: min_val max_val redundant? (param.min() param.max()) */ -AutomationList::AutomationList (Parameter id, double min_val, double max_val, double default_val) - : _parameter(id) - , _interpolation(Linear) - , _curve(new Curve(*this)) -{ - _parameter = id; - _frozen = 0; - _changed_when_thawed = false; - _state = Off; - _style = Absolute; - _min_yval = min_val; - _max_yval = max_val; - _touching = false; - _max_xval = 0; // means "no limit" - _default_value = default_val; - _rt_insertion_point = _events.end(); - _lookup_cache.left = -1; - _lookup_cache.range.first = _events.end(); - _search_cache.left = -1; - _search_cache.range.first = _events.end(); - _sort_pending = false; - - assert(_parameter.type() != NullAutomation); - AutomationListCreated(this); -} - -AutomationList::AutomationList (const AutomationList& other) - : _parameter(other._parameter) - , _interpolation(Linear) - , _curve(new Curve(*this)) -{ - _frozen = 0; - _changed_when_thawed = false; - _style = other._style; - _min_yval = other._min_yval; - _max_yval = other._max_yval; - _max_xval = other._max_xval; - _default_value = other._default_value; - _state = other._state; - _touching = other._touching; - _rt_insertion_point = _events.end(); - _lookup_cache.range.first = _events.end(); - _search_cache.range.first = _events.end(); - _sort_pending = false; - - for (const_iterator i = other._events.begin(); i != other._events.end(); ++i) { - _events.push_back (new ControlEvent (**i)); - } - - mark_dirty (); - assert(_parameter.type() != NullAutomation); - AutomationListCreated(this); -} - -AutomationList::AutomationList (const AutomationList& other, double start, double end) - : _parameter(other._parameter) - , _interpolation(Linear) - , _curve(new Curve(*this)) -{ - _frozen = 0; - _changed_when_thawed = false; - _style = other._style; - _min_yval = other._min_yval; - _max_yval = other._max_yval; - _max_xval = other._max_xval; - _default_value = other._default_value; - _state = other._state; - _touching = other._touching; - _rt_insertion_point = _events.end(); - _lookup_cache.range.first = _events.end(); - _search_cache.range.first = _events.end(); - _sort_pending = false; - - /* now grab the relevant points, and shift them back if necessary */ - - AutomationList* section = const_cast(&other)->copy (start, end); - - if (!section->empty()) { - for (iterator i = section->begin(); i != section->end(); ++i) { - _events.push_back (new ControlEvent ((*i)->when, (*i)->value)); - } - } - - delete section; - - mark_dirty (); - - assert(_parameter.type() != NullAutomation); - AutomationListCreated(this); -} - -/** \a id is used for legacy sessions where the type is not present - * in or below the node. It is used if \a id is non-null. - */ -AutomationList::AutomationList (const XMLNode& node, Parameter id) - : _interpolation(Linear) - , _curve(new Curve(*this)) -{ - _frozen = 0; - _changed_when_thawed = false; - _touching = false; - _min_yval = FLT_MIN; - _max_yval = FLT_MAX; - _max_xval = 0; // means "no limit" - _state = Off; - _style = Absolute; - _rt_insertion_point = _events.end(); - _lookup_cache.range.first = _events.end(); - _search_cache.range.first = _events.end(); - _sort_pending = false; - - set_state (node); - - if (id) - _parameter = id; - - assert(_parameter.type() != NullAutomation); - AutomationListCreated(this); -} - -AutomationList::~AutomationList() -{ - GoingAway (); - - for (EventList::iterator x = _events.begin(); x != _events.end(); ++x) { - delete (*x); - } -} - -bool -AutomationList::operator== (const AutomationList& other) -{ - return _events == other._events; -} - -AutomationList& -AutomationList::operator= (const AutomationList& other) -{ - if (this != &other) { - - _events.clear (); - - for (const_iterator i = other._events.begin(); i != other._events.end(); ++i) { - _events.push_back (new ControlEvent (**i)); - } - - _min_yval = other._min_yval; - _max_yval = other._max_yval; - _max_xval = other._max_xval; - _default_value = other._default_value; - - mark_dirty (); - maybe_signal_changed (); - } - - return *this; -} - -void -AutomationList::maybe_signal_changed () -{ - mark_dirty (); - - if (_frozen) { - _changed_when_thawed = true; - } else { - StateChanged (); - } -} - -void -AutomationList::set_automation_state (AutoState s) -{ - if (s != _state) { - _state = s; - automation_state_changed (); /* EMIT SIGNAL */ - } -} - -void -AutomationList::set_automation_style (AutoStyle s) -{ - if (s != _style) { - _style = s; - automation_style_changed (); /* EMIT SIGNAL */ - } -} - -void -AutomationList::start_touch () -{ - _touching = true; - _new_touch = true; -} - -void -AutomationList::stop_touch () -{ - _touching = false; - _new_touch = false; -} - -void -AutomationList::clear () -{ - { - Glib::Mutex::Lock lm (_lock); - _events.clear (); - mark_dirty (); - } - - maybe_signal_changed (); -} - -void -AutomationList::x_scale (double factor) -{ - Glib::Mutex::Lock lm (_lock); - _x_scale (factor); -} - -bool -AutomationList::extend_to (double when) -{ - Glib::Mutex::Lock lm (_lock); - if (_events.empty() || _events.back()->when == when) { - return false; - } - double factor = when / _events.back()->when; - _x_scale (factor); - return true; -} - -void AutomationList::_x_scale (double factor) -{ - for (iterator i = _events.begin(); i != _events.end(); ++i) { - (*i)->when = floor ((*i)->when * factor); - } - - mark_dirty (); -} - -void -AutomationList::reposition_for_rt_add (double when) -{ - _rt_insertion_point = _events.end(); -} - -void -AutomationList::rt_add (double when, double value) -{ - /* this is for automation recording */ - - if ((_state & Touch) && !_touching) { - return; - } - - // cerr << "RT: alist @ " << this << " add " << value << " @ " << when << endl; - - { - Glib::Mutex::Lock lm (_lock); - - iterator where; - ControlEvent cp (when, 0.0); - bool done = false; - - if ((_rt_insertion_point != _events.end()) && ((*_rt_insertion_point)->when < when) ) { - - /* we have a previous insertion point, so we should delete - everything between it and the position where we are going - to insert this point. - */ - - iterator after = _rt_insertion_point; - - if (++after != _events.end()) { - iterator far = after; - - while (far != _events.end()) { - if ((*far)->when > when) { - break; - } - ++far; - } - - if (_new_touch) { - where = far; - _rt_insertion_point = where; - - if ((*where)->when == when) { - (*where)->value = value; - done = true; - } - } else { - where = _events.erase (after, far); - } - - } else { - - where = after; - - } - - iterator previous = _rt_insertion_point; - --previous; - - if (_rt_insertion_point != _events.begin() && (*_rt_insertion_point)->value == value && (*previous)->value == value) { - (*_rt_insertion_point)->when = when; - done = true; - - } - - } else { - - where = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); - - if (where != _events.end()) { - if ((*where)->when == when) { - (*where)->value = value; - done = true; - } - } - } - - if (!done) { - _rt_insertion_point = _events.insert (where, new ControlEvent (when, value)); - } - - _new_touch = false; - mark_dirty (); - } - - maybe_signal_changed (); -} - -void -AutomationList::fast_simple_add (double when, double value) -{ - /* to be used only for loading pre-sorted data from saved state */ - _events.insert (_events.end(), new ControlEvent (when, value)); - assert(_events.back()); -} - -void -AutomationList::add (double when, double value) -{ - /* this is for graphical editing */ - - { - Glib::Mutex::Lock lm (_lock); - ControlEvent cp (when, 0.0f); - bool insert = true; - iterator insertion_point; - - for (insertion_point = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); insertion_point != _events.end(); ++insertion_point) { - - /* only one point allowed per time point */ - - if ((*insertion_point)->when == when) { - (*insertion_point)->value = value; - insert = false; - break; - } - - if ((*insertion_point)->when >= when) { - break; - } - } - - if (insert) { - - _events.insert (insertion_point, new ControlEvent (when, value)); - reposition_for_rt_add (0); - - } - - mark_dirty (); - } - - maybe_signal_changed (); -} - -void -AutomationList::erase (iterator i) -{ - { - Glib::Mutex::Lock lm (_lock); - _events.erase (i); - reposition_for_rt_add (0); - mark_dirty (); - } - maybe_signal_changed (); -} - -void -AutomationList::erase (iterator start, iterator end) -{ - { - Glib::Mutex::Lock lm (_lock); - _events.erase (start, end); - reposition_for_rt_add (0); - mark_dirty (); - } - maybe_signal_changed (); -} - -void -AutomationList::reset_range (double start, double endt) -{ - bool reset = false; - - { - Glib::Mutex::Lock lm (_lock); - ControlEvent cp (start, 0.0f); - iterator s; - iterator e; - - if ((s = lower_bound (_events.begin(), _events.end(), &cp, time_comparator)) != _events.end()) { - - cp.when = endt; - e = upper_bound (_events.begin(), _events.end(), &cp, time_comparator); - - for (iterator i = s; i != e; ++i) { - (*i)->value = _default_value; - } - - reset = true; - - mark_dirty (); - } - } - - if (reset) { - maybe_signal_changed (); - } -} - -void -AutomationList::erase_range (double start, double endt) -{ - bool erased = false; - - { - Glib::Mutex::Lock lm (_lock); - ControlEvent cp (start, 0.0f); - iterator s; - iterator e; - - if ((s = lower_bound (_events.begin(), _events.end(), &cp, time_comparator)) != _events.end()) { - cp.when = endt; - e = upper_bound (_events.begin(), _events.end(), &cp, time_comparator); - _events.erase (s, e); - reposition_for_rt_add (0); - erased = true; - mark_dirty (); - } - - } - - if (erased) { - maybe_signal_changed (); - } -} - -void -AutomationList::move_range (iterator start, iterator end, double xdelta, double ydelta) -{ - /* note: we assume higher level logic is in place to avoid this - reordering the time-order of control events in the list. ie. all - points after end are later than (end)->when. - */ - - { - Glib::Mutex::Lock lm (_lock); - - while (start != end) { - (*start)->when += xdelta; - (*start)->value += ydelta; - if (isnan ((*start)->value)) { - abort (); - } - ++start; - } - - if (!_frozen) { - _events.sort (sort_events_by_time); - } else { - _sort_pending = true; - } - - mark_dirty (); - } - - maybe_signal_changed (); -} - -void -AutomationList::slide (iterator before, double distance) -{ - { - Glib::Mutex::Lock lm (_lock); - - if (before == _events.end()) { - return; - } - - while (before != _events.end()) { - (*before)->when += distance; - ++before; - } - } - - maybe_signal_changed (); -} - -void -AutomationList::modify (iterator iter, double when, double val) -{ - /* note: we assume higher level logic is in place to avoid this - reordering the time-order of control events in the list. ie. all - points after *iter are later than when. - */ - - { - Glib::Mutex::Lock lm (_lock); - - (*iter)->when = when; - (*iter)->value = val; - - if (isnan (val)) { - abort (); - } - - if (!_frozen) { - _events.sort (sort_events_by_time); - } else { - _sort_pending = true; - } - - mark_dirty (); - } - - maybe_signal_changed (); -} - -std::pair -AutomationList::control_points_adjacent (double xval) -{ - Glib::Mutex::Lock lm (_lock); - iterator i; - ControlEvent cp (xval, 0.0f); - std::pair ret; - - ret.first = _events.end(); - ret.second = _events.end(); - - for (i = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); i != _events.end(); ++i) { - - if (ret.first == _events.end()) { - if ((*i)->when >= xval) { - if (i != _events.begin()) { - ret.first = i; - --ret.first; - } else { - return ret; - } - } - } - - if ((*i)->when > xval) { - ret.second = i; - break; - } - } - - return ret; -} - -void -AutomationList::freeze () -{ - _frozen++; -} - -void -AutomationList::thaw () -{ - if (_frozen == 0) { - PBD::stacktrace (cerr); - fatal << string_compose (_("programming error: %1"), X_("AutomationList::thaw() called while not frozen")) << endmsg; - /*NOTREACHED*/ - } - - if (--_frozen > 0) { - return; - } - - { - Glib::Mutex::Lock lm (_lock); - - if (_sort_pending) { - _events.sort (sort_events_by_time); - _sort_pending = false; - } - } - - if (_changed_when_thawed) { - StateChanged(); /* EMIT SIGNAL */ - } -} - -void -AutomationList::set_max_xval (double x) -{ - _max_xval = x; -} - -void -AutomationList::mark_dirty () -{ - _lookup_cache.left = -1; - _search_cache.left = -1; - Dirty (); /* EMIT SIGNAL */ -} - -void -AutomationList::truncate_end (double last_coordinate) -{ - { - Glib::Mutex::Lock lm (_lock); - ControlEvent cp (last_coordinate, 0); - AutomationList::reverse_iterator i; - double last_val; - - if (_events.empty()) { - return; - } - - if (last_coordinate == _events.back()->when) { - return; - } - - if (last_coordinate > _events.back()->when) { - - /* extending end: - */ - - iterator foo = _events.begin(); - bool lessthantwo; - - if (foo == _events.end()) { - lessthantwo = true; - } else if (++foo == _events.end()) { - lessthantwo = true; - } else { - lessthantwo = false; - } - - if (lessthantwo) { - /* less than 2 points: add a new point */ - _events.push_back (new ControlEvent (last_coordinate, _events.back()->value)); - } else { - - /* more than 2 points: check to see if the last 2 values - are equal. if so, just move the position of the - last point. otherwise, add a new point. - */ - - iterator penultimate = _events.end(); - --penultimate; /* points at last point */ - --penultimate; /* points at the penultimate point */ - - if (_events.back()->value == (*penultimate)->value) { - _events.back()->when = last_coordinate; - } else { - _events.push_back (new ControlEvent (last_coordinate, _events.back()->value)); - } - } - - } else { - - /* shortening end */ - - last_val = unlocked_eval (last_coordinate); - last_val = max ((double) _min_yval, last_val); - last_val = min ((double) _max_yval, last_val); - - i = _events.rbegin(); - - /* make i point to the last control point */ - - ++i; - - /* now go backwards, removing control points that are - beyond the new last coordinate. - */ - - uint32_t sz = _events.size(); - - while (i != _events.rend() && sz > 2) { - AutomationList::reverse_iterator tmp; - - tmp = i; - ++tmp; - - if ((*i)->when < last_coordinate) { - break; - } - - _events.erase (i.base()); - --sz; - - i = tmp; - } - - _events.back()->when = last_coordinate; - _events.back()->value = last_val; - } - - reposition_for_rt_add (0); - mark_dirty(); - } - - maybe_signal_changed (); -} - -void -AutomationList::truncate_start (double overall_length) -{ - { - Glib::Mutex::Lock lm (_lock); - iterator i; - double first_legal_value; - double first_legal_coordinate; - - if (_events.empty()) { - fatal << _("programming error:") - << "AutomationList::truncate_start() called on an empty list" - << endmsg; - /*NOTREACHED*/ - return; - } - - if (overall_length == _events.back()->when) { - /* no change in overall length */ - return; - } - - if (overall_length > _events.back()->when) { - - /* growing at front: duplicate first point. shift all others */ - - double shift = overall_length - _events.back()->when; - uint32_t np; - - for (np = 0, i = _events.begin(); i != _events.end(); ++i, ++np) { - (*i)->when += shift; - } - - if (np < 2) { - - /* less than 2 points: add a new point */ - _events.push_front (new ControlEvent (0, _events.front()->value)); - - } else { - - /* more than 2 points: check to see if the first 2 values - are equal. if so, just move the position of the - first point. otherwise, add a new point. - */ - - iterator second = _events.begin(); - ++second; /* points at the second point */ - - if (_events.front()->value == (*second)->value) { - /* first segment is flat, just move start point back to zero */ - _events.front()->when = 0; - } else { - /* leave non-flat segment in place, add a new leading point. */ - _events.push_front (new ControlEvent (0, _events.front()->value)); - } - } - - } else { - - /* shrinking at front */ - - first_legal_coordinate = _events.back()->when - overall_length; - first_legal_value = unlocked_eval (first_legal_coordinate); - first_legal_value = max (_min_yval, first_legal_value); - first_legal_value = min (_max_yval, first_legal_value); - - /* remove all events earlier than the new "front" */ - - i = _events.begin(); - - while (i != _events.end() && !_events.empty()) { - AutomationList::iterator tmp; - - tmp = i; - ++tmp; - - if ((*i)->when > first_legal_coordinate) { - break; - } - - _events.erase (i); - - i = tmp; - } - - - /* shift all remaining points left to keep their same - relative position - */ - - for (i = _events.begin(); i != _events.end(); ++i) { - (*i)->when -= first_legal_coordinate; - } - - /* add a new point for the interpolated new value */ - - _events.push_front (new ControlEvent (0, first_legal_value)); - } - - reposition_for_rt_add (0); - - mark_dirty(); - } - - maybe_signal_changed (); -} - -double -AutomationList::unlocked_eval (double x) const -{ - pair range; - int32_t npoints; - double lpos, upos; - double lval, uval; - double fraction; - - npoints = _events.size(); - - switch (npoints) { - case 0: - return _default_value; - - case 1: - if (x >= _events.front()->when) { - return _events.front()->value; - } else { - // return _default_value; - return _events.front()->value; - } - - case 2: - if (x >= _events.back()->when) { - return _events.back()->value; - } else if (x == _events.front()->when) { - return _events.front()->value; - } else if (x < _events.front()->when) { - // return _default_value; - return _events.front()->value; - } - - lpos = _events.front()->when; - lval = _events.front()->value; - upos = _events.back()->when; - uval = _events.back()->value; - - if (_interpolation == Discrete) - return lval; - - /* linear interpolation betweeen the two points - */ - - fraction = (double) (x - lpos) / (double) (upos - lpos); - return lval + (fraction * (uval - lval)); - - default: - - if (x >= _events.back()->when) { - return _events.back()->value; - } else if (x == _events.front()->when) { - return _events.front()->value; - } else if (x < _events.front()->when) { - // return _default_value; - return _events.front()->value; - } - - return multipoint_eval (x); - break; - } - - /*NOTREACHED*/ /* stupid gcc */ - return 0.0; -} - -double -AutomationList::multipoint_eval (double x) const -{ - double upos, lpos; - double uval, lval; - double fraction; - - /* "Stepped" lookup (no interpolation) */ - /* FIXME: no cache. significant? */ - if (_interpolation == Discrete) { - const ControlEvent cp (x, 0); - EventList::const_iterator i = lower_bound (_events.begin(), _events.end(), &cp, time_comparator); - - // shouldn't have made it to multipoint_eval - assert(i != _events.end()); - - if (i == _events.begin() || (*i)->when == x) - return (*i)->value; - else - return (*(--i))->value; - } - - /* Only do the range lookup if x is in a different range than last time - * this was called (or if the lookup cache has been marked "dirty" (left<0) */ - if ((_lookup_cache.left < 0) || - ((_lookup_cache.left > x) || - (_lookup_cache.range.first == _events.end()) || - ((*_lookup_cache.range.second)->when < x))) { - - const ControlEvent cp (x, 0); - - _lookup_cache.range = equal_range (_events.begin(), _events.end(), &cp, time_comparator); - } - - pair range = _lookup_cache.range; - - if (range.first == range.second) { - - /* x does not exist within the list as a control point */ - - _lookup_cache.left = x; - - if (range.first != _events.begin()) { - --range.first; - lpos = (*range.first)->when; - lval = (*range.first)->value; - } else { - /* we're before the first point */ - // return _default_value; - return _events.front()->value; - } - - if (range.second == _events.end()) { - /* we're after the last point */ - return _events.back()->value; - } - - upos = (*range.second)->when; - uval = (*range.second)->value; - - /* linear interpolation betweeen the two points - on either side of x - */ - - fraction = (double) (x - lpos) / (double) (upos - lpos); - return lval + (fraction * (uval - lval)); - - } - - /* x is a control point in the data */ - _lookup_cache.left = -1; - return (*range.first)->value; -} - -void -AutomationList::build_search_cache_if_necessary(double start, double end) const -{ - /* Only do the range lookup if x is in a different range than last time - * this was called (or if the search cache has been marked "dirty" (left<0) */ - if (!_events.empty() && ((_search_cache.left < 0) || - ((_search_cache.left > start) || - (_search_cache.right < end)))) { - - const ControlEvent start_point (start, 0); - const ControlEvent end_point (end, 0); - - //cerr << "REBUILD: (" << _search_cache.left << ".." << _search_cache.right << ") := (" - // << start << ".." << end << ")" << endl; - - _search_cache.range.first = lower_bound (_events.begin(), _events.end(), &start_point, time_comparator); - _search_cache.range.second = upper_bound (_events.begin(), _events.end(), &end_point, time_comparator); - - _search_cache.left = start; - _search_cache.right = end; - } -} - -/** Get the earliest event between \a start and \a end, using the current interpolation style. - * - * If an event is found, \a x and \a y are set to its coordinates. - * - * \param inclusive Include events with timestamp exactly equal to \a start - * \return true if event is found (and \a x and \a y are valid). - */ -bool -AutomationList::rt_safe_earliest_event(double start, double end, double& x, double& y, bool inclusive) const -{ - // FIXME: It would be nice if this was unnecessary.. - Glib::Mutex::Lock lm(_lock, Glib::TRY_LOCK); - if (!lm.locked()) { - return false; - } - - return rt_safe_earliest_event_unlocked(start, end, x, y, inclusive); -} - - -/** Get the earliest event between \a start and \a end, using the current interpolation style. - * - * If an event is found, \a x and \a y are set to its coordinates. - * - * \param inclusive Include events with timestamp exactly equal to \a start - * \return true if event is found (and \a x and \a y are valid). - */ -bool -AutomationList::rt_safe_earliest_event_unlocked(double start, double end, double& x, double& y, bool inclusive) const -{ - if (_interpolation == Discrete) - return rt_safe_earliest_event_discrete_unlocked(start, end, x, y, inclusive); - else - return rt_safe_earliest_event_linear_unlocked(start, end, x, y, inclusive); -} - - -/** Get the earliest event between \a start and \a end (Discrete (lack of) interpolation) - * - * If an event is found, \a x and \a y are set to its coordinates. - * - * \param inclusive Include events with timestamp exactly equal to \a start - * \return true if event is found (and \a x and \a y are valid). - */ -bool -AutomationList::rt_safe_earliest_event_discrete_unlocked (double start, double end, double& x, double& y, bool inclusive) const -{ - build_search_cache_if_necessary(start, end); - - const pair& range = _search_cache.range; - - if (range.first != _events.end()) { - const ControlEvent* const first = *range.first; - - const bool past_start = (inclusive ? first->when >= start : first->when > start); - - /* Earliest points is in range, return it */ - if (past_start >= start && first->when < end) { - - x = first->when; - y = first->value; - - /* Move left of cache to this point - * (Optimize for immediate call this cycle within range) */ - _search_cache.left = x; - ++_search_cache.range.first; - - assert(x >= start); - assert(x < end); - return true; - - } else { - return false; - } - - /* No points in range */ - } else { - return false; - } -} - -/** Get the earliest time the line crosses an integer (Linear interpolation). - * - * If an event is found, \a x and \a y are set to its coordinates. - * - * \param inclusive Include events with timestamp exactly equal to \a start - * \return true if event is found (and \a x and \a y are valid). - */ -bool -AutomationList::rt_safe_earliest_event_linear_unlocked (double start, double end, double& x, double& y, bool inclusive) const -{ - //cerr << "earliest_event(" << start << ", " << end << ", " << x << ", " << y << ", " << inclusive << endl; - - if (_events.size() == 0) - return false; - else if (_events.size() == 1) - return rt_safe_earliest_event_discrete_unlocked(start, end, x, y, inclusive); - - // Hack to avoid infinitely repeating the same event - build_search_cache_if_necessary(start, end); - - pair range = _search_cache.range; - - if (range.first != _events.end()) { - - const ControlEvent* first = NULL; - const ControlEvent* next = NULL; - - /* Step is after first */ - if (range.first == _events.begin() || (*range.first)->when == start) { - first = *range.first; - next = *(++range.first); - ++_search_cache.range.first; - - /* Step is before first */ - } else { - const_iterator prev = range.first; - --prev; - first = *prev; - next = *range.first; - } - - if (inclusive && first->when == start) { - x = first->when; - y = first->value; - /* Move left of cache to this point - * (Optimize for immediate call this cycle within range) */ - _search_cache.left = x; - //++_search_cache.range.first; - return true; - } - - if (abs(first->value - next->value) <= 1) { - if (next->when <= end && (!inclusive || next->when > start)) { - x = next->when; - y = next->value; - /* Move left of cache to this point - * (Optimize for immediate call this cycle within range) */ - _search_cache.left = x; - //++_search_cache.range.first; - return true; - } else { - return false; - } - } - - const double slope = (next->value - first->value) / (double)(next->when - first->when); - //cerr << "start y: " << start_y << endl; - - //y = first->value + (slope * fabs(start - first->when)); - y = first->value; - - if (first->value < next->value) // ramping up - y = ceil(y); - else // ramping down - y = floor(y); - - x = first->when + (y - first->value) / (double)slope; - - while ((inclusive && x < start) || (x <= start && y != next->value)) { - - if (first->value < next->value) // ramping up - y += 1.0; - else // ramping down - y -= 1.0; - - x = first->when + (y - first->value) / (double)slope; - } - - /*cerr << first->value << " @ " << first->when << " ... " - << next->value << " @ " << next->when - << " = " << y << " @ " << x << endl;*/ - - assert( (y >= first->value && y <= next->value) - || (y <= first->value && y >= next->value) ); - - - const bool past_start = (inclusive ? x >= start : x > start); - if (past_start && x < end) { - /* Move left of cache to this point - * (Optimize for immediate call this cycle within range) */ - _search_cache.left = x; - - return true; - - } else { - return false; - } - - /* No points in the future, so no steps (towards them) in the future */ - } else { - return false; - } -} - -AutomationList* -AutomationList::cut (iterator start, iterator end) -{ - AutomationList* nal = new AutomationList (_parameter, _min_yval, _max_yval, _default_value); - - { - Glib::Mutex::Lock lm (_lock); - - for (iterator x = start; x != end; ) { - iterator tmp; - - tmp = x; - ++tmp; - - nal->_events.push_back (new ControlEvent (**x)); - _events.erase (x); - - reposition_for_rt_add (0); - - x = tmp; - } - - mark_dirty (); - } - - maybe_signal_changed (); - - return nal; -} - -AutomationList* -AutomationList::cut_copy_clear (double start, double end, int op) -{ - AutomationList* nal = new AutomationList (_parameter, _min_yval, _max_yval, _default_value); - iterator s, e; - ControlEvent cp (start, 0.0); - bool changed = false; - - { - Glib::Mutex::Lock lm (_lock); - - if ((s = lower_bound (_events.begin(), _events.end(), &cp, time_comparator)) == _events.end()) { - return nal; - } - - cp.when = end; - e = upper_bound (_events.begin(), _events.end(), &cp, time_comparator); - - if (op != 2 && (*s)->when != start) { - nal->_events.push_back (new ControlEvent (0, unlocked_eval (start))); - } - - for (iterator x = s; x != e; ) { - iterator tmp; - - tmp = x; - ++tmp; - - changed = true; - - /* adjust new points to be relative to start, which - has been set to zero. - */ - - if (op != 2) { - nal->_events.push_back (new ControlEvent ((*x)->when - start, (*x)->value)); - } - - if (op != 1) { - _events.erase (x); - } - - x = tmp; - } - - if (op != 2 && nal->_events.back()->when != end - start) { - nal->_events.push_back (new ControlEvent (end - start, unlocked_eval (end))); - } - - if (changed) { - reposition_for_rt_add (0); - } - - mark_dirty (); - } - - maybe_signal_changed (); - - return nal; - -} - -AutomationList* -AutomationList::copy (iterator start, iterator end) -{ - AutomationList* nal = new AutomationList (_parameter, _min_yval, _max_yval, _default_value); - - { - Glib::Mutex::Lock lm (_lock); - - for (iterator x = start; x != end; ) { - iterator tmp; - - tmp = x; - ++tmp; - - nal->_events.push_back (new ControlEvent (**x)); - - x = tmp; - } - } - - return nal; -} - -AutomationList* -AutomationList::cut (double start, double end) -{ - return cut_copy_clear (start, end, 0); -} - -AutomationList* -AutomationList::copy (double start, double end) -{ - return cut_copy_clear (start, end, 1); -} - -void -AutomationList::clear (double start, double end) -{ - (void) cut_copy_clear (start, end, 2); -} - -bool -AutomationList::paste (AutomationList& alist, double pos, float times) -{ - if (alist._events.empty()) { - return false; - } - - { - Glib::Mutex::Lock lm (_lock); - iterator where; - iterator prev; - double end = 0; - ControlEvent cp (pos, 0.0); - - where = upper_bound (_events.begin(), _events.end(), &cp, time_comparator); - - for (iterator i = alist.begin();i != alist.end(); ++i) { - _events.insert (where, new ControlEvent( (*i)->when+pos,( *i)->value)); - end = (*i)->when + pos; - } - - - /* move all points after the insertion along the timeline by - the correct amount. - */ - - while (where != _events.end()) { - iterator tmp; - if ((*where)->when <= end) { - tmp = where; - ++tmp; - _events.erase(where); - where = tmp; - - } else { - break; - } - } - - reposition_for_rt_add (0); - mark_dirty (); - } - - maybe_signal_changed (); - return true; -} - -XMLNode& -AutomationList::get_state () -{ - return state (true); -} - -XMLNode& -AutomationList::state (bool full) -{ - XMLNode* root = new XMLNode (X_("AutomationList")); - char buf[64]; - LocaleGuard lg (X_("POSIX")); - - root->add_property ("automation-id", _parameter.to_string()); - - root->add_property ("id", _id.to_s()); - - snprintf (buf, sizeof (buf), "%.12g", _default_value); - root->add_property ("default", buf); - snprintf (buf, sizeof (buf), "%.12g", _min_yval); - root->add_property ("min_yval", buf); - snprintf (buf, sizeof (buf), "%.12g", _max_yval); - root->add_property ("max_yval", buf); - snprintf (buf, sizeof (buf), "%.12g", _max_xval); - root->add_property ("max_xval", buf); - - root->add_property ("interpolation-style", enum_2_string (_interpolation)); - - if (full) { - root->add_property ("state", auto_state_to_string (_state)); - } else { - /* never save anything but Off for automation state to a template */ - root->add_property ("state", auto_state_to_string (Off)); - } - - root->add_property ("style", auto_style_to_string (_style)); - - if (!_events.empty()) { - root->add_child_nocopy (serialize_events()); - } - - return *root; -} - -XMLNode& -AutomationList::serialize_events () -{ - XMLNode* node = new XMLNode (X_("events")); - stringstream str; - - for (iterator xx = _events.begin(); xx != _events.end(); ++xx) { - str << (double) (*xx)->when; - str << ' '; - str <<(double) (*xx)->value; - str << '\n'; - } - - /* XML is a bit wierd */ - - XMLNode* content_node = new XMLNode (X_("foo")); /* it gets renamed by libxml when we set content */ - content_node->set_content (str.str()); - - node->add_child_nocopy (*content_node); - - return *node; -} - -int -AutomationList::deserialize_events (const XMLNode& node) -{ - if (node.children().empty()) { - return -1; - } - - XMLNode* content_node = node.children().front(); - - if (content_node->content().empty()) { - return -1; - } - - freeze (); - clear (); - - stringstream str (content_node->content()); - - double x; - double y; - bool ok = true; - - while (str) { - str >> x; - if (!str) { - break; - } - str >> y; - if (!str) { - ok = false; - break; - } - fast_simple_add (x, y); - } - - if (!ok) { - clear (); - error << _("automation list: cannot load coordinates from XML, all points ignored") << endmsg; - } else { - mark_dirty (); - reposition_for_rt_add (0); - maybe_signal_changed (); - } - - thaw (); - - return 0; -} - -int -AutomationList::set_state (const XMLNode& node) -{ - XMLNodeList nlist = node.children(); - XMLNode* nsos; - XMLNodeIterator niter; - const XMLProperty* prop; - - if (node.name() == X_("events")) { - /* partial state setting*/ - return deserialize_events (node); - } - - if (node.name() == X_("Envelope") || node.name() == X_("FadeOut") || node.name() == X_("FadeIn")) { - - if ((nsos = node.child (X_("AutomationList")))) { - /* new school in old school clothing */ - return set_state (*nsos); - } - - /* old school */ - - const XMLNodeList& elist = node.children(); - XMLNodeConstIterator i; - XMLProperty* prop; - nframes_t x; - double y; - - freeze (); - clear (); - - for (i = elist.begin(); i != elist.end(); ++i) { - - if ((prop = (*i)->property ("x")) == 0) { - error << _("automation list: no x-coordinate stored for control point (point ignored)") << endmsg; - continue; - } - x = atoi (prop->value().c_str()); - - if ((prop = (*i)->property ("y")) == 0) { - error << _("automation list: no y-coordinate stored for control point (point ignored)") << endmsg; - continue; - } - y = atof (prop->value().c_str()); - - fast_simple_add (x, y); - } - - thaw (); - - return 0; - } - - if (node.name() != X_("AutomationList") ) { - error << string_compose (_("AutomationList: passed XML node called %1, not \"AutomationList\" - ignored"), node.name()) << endmsg; - return -1; - } - - if ((prop = node.property ("id")) != 0) { - _id = prop->value (); - /* update session AL list */ - AutomationListCreated(this); - } - - if ((prop = node.property (X_("automation-id"))) != 0){ - _parameter = Parameter(prop->value()); - } else { - warning << "Legacy session: automation list has no automation-id property."; - } - - if ((prop = node.property (X_("interpolation-style"))) != 0) { - _interpolation = (InterpolationStyle)string_2_enum(prop->value(), _interpolation); - } else { - _interpolation = Linear; - } - - if ((prop = node.property (X_("default"))) != 0){ - _default_value = atof (prop->value().c_str()); - } else { - _default_value = 0.0; - } - - if ((prop = node.property (X_("style"))) != 0) { - _style = string_to_auto_style (prop->value()); - } else { - _style = Absolute; - } - - if ((prop = node.property (X_("state"))) != 0) { - _state = string_to_auto_state (prop->value()); - } else { - _state = Off; - } - - if ((prop = node.property (X_("min_yval"))) != 0) { - _min_yval = atof (prop->value ().c_str()); - } else { - _min_yval = FLT_MIN; - } - - if ((prop = node.property (X_("max_yval"))) != 0) { - _max_yval = atof (prop->value ().c_str()); - } else { - _max_yval = FLT_MAX; - } - - if ((prop = node.property (X_("max_xval"))) != 0) { - _max_xval = atof (prop->value ().c_str()); - } else { - _max_xval = 0; // means "no limit ; - } - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == X_("events")) { - deserialize_events (*(*niter)); - } - } - - return 0; -} - diff --git a/libs/ardour/base_audio_port.cc b/libs/ardour/base_audio_port.cc deleted file mode 100644 index ceec4c1d3a..0000000000 --- a/libs/ardour/base_audio_port.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include - -using namespace ARDOUR; -using namespace std; - -nframes_t BaseAudioPort::_short_over_length = 2; -nframes_t BaseAudioPort::_long_over_length = 10; - -BaseAudioPort::BaseAudioPort (const std::string& name, Flags flgs) - : Port (name, flgs) - , _buffer (0) - , _own_buffer (false) -{ - _type = DataType::AUDIO; - _mixdown = default_mixdown; -} - -BaseAudioPort::~BaseAudioPort () -{ - if (_own_buffer && _buffer) { - delete _buffer; - } -} - -void -BaseAudioPort::reset() -{ - Port::reset(); - - if (_own_buffer && _buffer) { - _buffer->resize (engine->frames_per_cycle()); - _buffer->clear (); - } - - _metering = 0; - reset_meters (); -} - -void -BaseAudioPort::default_mixdown (const set& ports, AudioBuffer* dest, nframes_t cnt, nframes_t offset, bool first_overwrite) -{ - set::const_iterator p = ports.begin(); - - if (first_overwrite) { - dest->read_from ((dynamic_cast(*p))->get_audio_buffer(), cnt, offset); - p++; - } - - for (; p != ports.end(); ++p) { - dest->accumulate_from ((dynamic_cast(*p))->get_audio_buffer(), cnt, offset); - } -} - -void -BaseAudioPort::set_mixdown_function (void (*func)(const set&, AudioBuffer*, nframes_t, nframes_t, bool)) -{ - g_atomic_pointer_set(&_mixdown, func); -} - - diff --git a/libs/ardour/base_midi_port.cc b/libs/ardour/base_midi_port.cc deleted file mode 100644 index 49d748dd20..0000000000 --- a/libs/ardour/base_midi_port.cc +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include - -using namespace ARDOUR; -using namespace std; - -BaseMidiPort::BaseMidiPort (const std::string& name, Flags flags) - : Port (name, flags) - , _buffer (0) - , _own_buffer (false) -{ - _type = DataType::MIDI; - _mixdown = default_mixdown; -} - -BaseMidiPort::~BaseMidiPort() -{ - if (_own_buffer && _buffer) { - delete _buffer; - } -} - -void -BaseMidiPort::default_mixdown (const set& ports, MidiBuffer* dest, nframes_t cnt, nframes_t offset, bool first_overwrite) -{ - set::const_iterator p = ports.begin(); - - if (first_overwrite) { - cout << "first overwrite" << endl; - dest->read_from ((dynamic_cast(*p))->get_midi_buffer(), cnt, offset); - p++; - } - - // XXX DAVE: this is just a guess - - for (; p != ports.end(); ++p) { - cout << "merge" << endl; - dest->merge (*dest, (dynamic_cast(*p))->get_midi_buffer()); - } -} - -void -BaseMidiPort::set_mixdown_function (void (*func)(const set&, MidiBuffer*, nframes_t, nframes_t, bool)) -{ - g_atomic_pointer_set(&_mixdown, func); -} diff --git a/libs/ardour/buffer.cc b/libs/ardour/buffer.cc deleted file mode 100644 index 8abe238a47..0000000000 --- a/libs/ardour/buffer.cc +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include - -#ifdef __x86_64__ -static const int CPU_CACHE_ALIGN = 64; -#else -static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it matters less */ -#endif - -namespace ARDOUR { - - -Buffer* -Buffer::create(DataType type, size_t capacity) -{ - if (type == DataType::AUDIO) - return new AudioBuffer(capacity); - else if (type == DataType::MIDI) - return new MidiBuffer(capacity); - else - return NULL; -} - - -} // namespace ARDOUR - diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc deleted file mode 100644 index 65e9f8ac8f..0000000000 --- a/libs/ardour/buffer_set.cc +++ /dev/null @@ -1,177 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include - -namespace ARDOUR { - -/** Create a new, empty BufferSet */ -BufferSet::BufferSet() - : _is_mirror(false) -{ - for (size_t i=0; i < DataType::num_types; ++i) - _buffers.push_back( BufferVec() ); - - _count.reset(); - _available.reset(); -} - -BufferSet::~BufferSet() -{ - clear(); -} - -/** Destroy all contained buffers. - */ -void -BufferSet::clear() -{ - if (!_is_mirror) { - for (std::vector::iterator i = _buffers.begin(); i != _buffers.end(); ++i) { - for (BufferVec::iterator j = (*i).begin(); j != (*i).end(); ++j) { - delete *j; - } - (*i).clear(); - } - } - _buffers.clear(); - _count.reset(); - _available.reset(); -} - -/** Make this BufferSet a direct mirror of a PortSet's buffers. - */ -void -BufferSet::attach_buffers(PortSet& ports) -{ - clear(); - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - _buffers.push_back(BufferVec()); - BufferVec& v = _buffers[*t]; - - for (PortSet::iterator p = ports.begin(*t); p != ports.end(*t); ++p) { - assert(p->type() == *t); - v.push_back(&(p->get_buffer())); - } - - } - - _count = ports.count(); - - _is_mirror = true; -} - -void -BufferSet::ensure_buffers(const ChanCount& count, size_t buffer_capacity) -{ - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - ensure_buffers(*t, count.get(*t), buffer_capacity); - } -} - - -/** Ensure that there are @a num_buffers buffers of type @a type available, - * each of size at least @a buffer_size - */ -void -BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capacity) -{ - assert(type != DataType::NIL); - assert(type < _buffers.size()); - assert(buffer_capacity > 0); - - if (num_buffers == 0) - return; - - // FIXME: Kludge to make MIDI buffers larger (size is bytes, not frames) - // See MidiPort::MidiPort - // We probably need a map parameter for capacity - if (type == DataType::MIDI) - buffer_capacity *= 8; - - // The vector of buffers of the type we care about - BufferVec& bufs = _buffers[type]; - - // If we're a mirror just make sure we're ok - if (_is_mirror) { - assert(_count.get(type) >= num_buffers); - assert(bufs[0]->type() == type); - return; - } - - // If there's not enough or they're too small, just nuke the whole thing and - // rebuild it (so I'm lazy..) - if (bufs.size() < num_buffers - || (bufs.size() > 0 && bufs[0]->capacity() < buffer_capacity)) { - - // Nuke it - for (BufferVec::iterator i = bufs.begin(); i != bufs.end(); ++i) { - delete (*i); - } - bufs.clear(); - - // Rebuild it - for (size_t i=0; i < num_buffers; ++i) { - bufs.push_back(Buffer::create(type, buffer_capacity)); - } - - _available.set(type, num_buffers); - } - - // Post-conditions - assert(bufs[0]->type() == type); - assert(bufs.size() >= num_buffers); - assert(bufs.size() == _available.get(type)); - assert(bufs[0]->capacity() >= buffer_capacity); -} - -/** Get the capacity (size) of the available buffers of the given type. - * - * All buffers of a certain type always have the same capacity. - */ -size_t -BufferSet::buffer_capacity(DataType type) const -{ - assert(_available.get(type) > 0); - return _buffers[type][0]->capacity(); -} - -// FIXME: make 'in' const -void -BufferSet::read_from(BufferSet& in, nframes_t nframes, nframes_t offset) -{ - assert(available() >= in.count()); - - // Copy all buffers 1:1 - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - BufferSet::iterator o = begin(*t); - for (BufferSet::iterator i = in.begin(*t); i != in.end(*t); ++i, ++o) { - o->read_from(*i, nframes, offset); - } - } - - set_count(in.count()); -} - -} // namespace ARDOUR - diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc deleted file mode 100644 index 0d8c36a84f..0000000000 --- a/libs/ardour/bundle.cc +++ /dev/null @@ -1,282 +0,0 @@ -/* - Copyright (C) 2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -/** Construct a Bundle from an XML node. - * @param node XML node. - */ -Bundle::Bundle (const XMLNode& node) -{ - if (set_state (node)) { - throw failed_constructor(); - } -} - -/** Construct an InputBundle from an XML node. - * @param node XML node. - */ -InputBundle::InputBundle (const XMLNode& node) - : Bundle (node) -{ - -} - -/** Construct an OutputBundle from an XML node. - * @param node XML node. - */ -OutputBundle::OutputBundle (const XMLNode& node) - : Bundle (node) -{ - -} - -/** Set the name. - * @param name New name. - */ -void -Bundle::set_name (string name, void *src) -{ - _name = name; - NameChanged (src); -} - -/** Add an association between one of our channels and a JACK port. - * @param ch Channel index. - * @param portname JACK port name to associate with. - */ -void -Bundle::add_port_to_channel (int ch, string portname) -{ - { - Glib::Mutex::Lock lm (channels_lock); - _channels[ch].push_back (portname); - } - - PortsChanged (ch); /* EMIT SIGNAL */ -} - -/** Disassociate a JACK port from one of our channels. - * @param ch Channel index. - * @param portname JACK port name to disassociate from. - */ - -void -Bundle::remove_port_from_channel (int ch, string portname) -{ - bool changed = false; - - { - Glib::Mutex::Lock lm (channels_lock); - PortList& pl = _channels[ch]; - PortList::iterator i = find (pl.begin(), pl.end(), portname); - - if (i != pl.end()) { - pl.erase (i); - changed = true; - } - } - - if (changed) { - PortsChanged (ch); /* EMIT SIGNAL */ - } -} - -/** - * @param ch Channel index. - * @return List of JACK ports that this channel is connected to. - */ -const Bundle::PortList& -Bundle::channel_ports (int ch) const -{ - Glib::Mutex::Lock lm (channels_lock); - return _channels[ch]; -} - -/** operator== for Bundles; they are equal if their channels are the same. - * @param other Bundle to compare with this one. - */ -bool -Bundle::operator== (const Bundle& other) const -{ - return other._channels == _channels; -} - - -/** Set the number of channels. - * @param n New number of channels. - */ - -void -Bundle::set_nchannels (int n) -{ - { - Glib::Mutex::Lock lm (channels_lock); - _channels.clear (); - for (int i = 0; i < n; ++i) { - _channels.push_back (PortList()); - } - } - - ConfigurationChanged (); /* EMIT SIGNAL */ -} - -XMLNode& -Bundle::get_state () -{ - XMLNode *node; - string str; - - if (dynamic_cast (this)) { - node = new XMLNode ("InputConnection"); - } else { - node = new XMLNode ("OutputConnection"); - } - - node->add_property ("name", _name); - - for (vector::iterator i = _channels.begin(); i != _channels.end(); ++i) { - - str += '{'; - - for (vector::iterator ii = (*i).begin(); ii != (*i).end(); ++ii) { - if (ii != (*i).begin()) { - str += ','; - } - str += *ii; - } - str += '}'; - } - - node->add_property ("connections", str); - - return *node; -} - -int -Bundle::set_state (const XMLNode& node) -{ - const XMLProperty *prop; - - if ((prop = node.property ("name")) == 0) { - error << _("Node for Connection has no \"name\" property") << endmsg; - return -1; - } - - _name = prop->value(); - _dynamic = false; - - if ((prop = node.property ("connections")) == 0) { - error << _("Node for Connection has no \"connections\" property") << endmsg; - return -1; - } - - set_channels (prop->value()); - - return 0; -} - -/** Set up channels from an XML property string. - * @param str String. - * @return 0 on success, -1 on error. - */ -int -Bundle::set_channels (const string& str) -{ - vector ports; - int i; - int n; - int nchannels; - - if ((nchannels = count (str.begin(), str.end(), '{')) == 0) { - return 0; - } - - set_nchannels (nchannels); - - string::size_type start, end, ostart; - - ostart = 0; - start = 0; - end = 0; - i = 0; - - while ((start = str.find_first_of ('{', ostart)) != string::npos) { - start += 1; - - if ((end = str.find_first_of ('}', start)) == string::npos) { - error << string_compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg; - return -1; - } - - if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) { - error << string_compose(_("bad input string in XML node \"%1\""), str) << endmsg; - - return -1; - - } else if (n > 0) { - - for (int x = 0; x < n; ++x) { - add_port_to_channel (i, ports[x]); - } - } - - ostart = end+1; - i++; - } - - return 0; -} - -int -Bundle::parse_io_string (const string& str, vector& ports) -{ - string::size_type pos, opos; - - if (str.length() == 0) { - return 0; - } - - pos = 0; - opos = 0; - - ports.clear (); - - while ((pos = str.find_first_of (',', opos)) != string::npos) { - ports.push_back (str.substr (opos, pos - opos)); - opos = pos + 1; - } - - if (opos < str.length()) { - ports.push_back (str.substr(opos)); - } - - return ports.size(); -} - diff --git a/libs/ardour/caimportable.cc b/libs/ardour/caimportable.cc deleted file mode 100644 index 229bfa8809..0000000000 --- a/libs/ardour/caimportable.cc +++ /dev/null @@ -1,118 +0,0 @@ -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace std; -using namespace PBD; - -CAImportableSource::CAImportableSource (const string& path) -{ - try { - af.Open (path.c_str()); - - CAStreamBasicDescription file_format (af.GetFileDataFormat()); - CAStreamBasicDescription client_format (file_format); - - /* set canonial form (PCM, native float packed, 32 bit, with the correct number of channels - and interleaved (since we plan to deinterleave ourselves) - */ - - client_format.SetCanonical(client_format.NumberChannels(), true); - af.SetClientFormat (client_format); - - } catch (CAXException& cax) { - error << string_compose ("CAImportable: %1", cax.mOperation) << endmsg; - throw failed_constructor (); - } - -} - -CAImportableSource::~CAImportableSource () -{ -} - -nframes_t -CAImportableSource::read (Sample* buffer, nframes_t nframes) -{ - nframes_t nread = 0; - AudioBufferList abl; - nframes_t per_channel; - bool at_end = false; - - abl.mNumberBuffers = 1; - abl.mBuffers[0].mNumberChannels = channels(); - - per_channel = nframes / abl.mBuffers[0].mNumberChannels; - - while (nread < per_channel) { - - UInt32 new_cnt = per_channel - nread; - - abl.mBuffers[0].mDataByteSize = new_cnt * abl.mBuffers[0].mNumberChannels * sizeof(Sample); - abl.mBuffers[0].mData = buffer + nread; - - try { - af.Read (new_cnt, &abl); - } catch (CAXException& cax) { - error << string_compose("CAImportable: %1", cax.mOperation); - return -1; - } - - if (new_cnt == 0) { - /* EOF */ - at_end = true; - break; - } - - nread += new_cnt; - } - - if (!at_end && nread < per_channel) { - return 0; - } else { - return nread * abl.mBuffers[0].mNumberChannels; - } -} - -uint -CAImportableSource::channels () const -{ - return af.GetFileDataFormat().NumberChannels(); -} - -nframes_t -CAImportableSource::length () const -{ - return af.GetNumberFrames(); -} - -nframes_t -CAImportableSource::samplerate() const -{ - CAStreamBasicDescription client_asbd; - - try { - client_asbd = af.GetClientDataFormat (); - } catch (CAXException& cax) { - error << string_compose ("CAImportable: %1", cax.mOperation) << endmsg; - return 0.0; - } - - return client_asbd.mSampleRate; -} - -void -CAImportableSource::seek (nframes_t pos) -{ - try { - af.Seek (pos); - } catch (CAXException& cax) { - error << string_compose ("CAImportable: %1 to %2", cax.mOperation, pos) << endmsg; - } -} - - - diff --git a/libs/ardour/chan_count.cc b/libs/ardour/chan_count.cc deleted file mode 100644 index b6f51a4d95..0000000000 --- a/libs/ardour/chan_count.cc +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: insert.cc 712 2006-07-28 01:08:57Z drobilla $ -*/ - -#define __STDC_LIMIT_MACROS 1 -#include -#include - -namespace ARDOUR { - -// infinite/zero chan count stuff, for setting minimums and maximums, etc. -// FIXME: implement this in a less fugly way - -ChanCount -infinity_factory() -{ - ChanCount ret; - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - ret.set(*t, UINT32_MAX); - } - - return ret; -} - - -// Statics -const ChanCount ChanCount::INFINITE = infinity_factory(); -const ChanCount ChanCount::ZERO = ChanCount(); - - -} // namespace ARDOUR diff --git a/libs/ardour/configuration.cc b/libs/ardour/configuration.cc deleted file mode 100644 index b164d418ab..0000000000 --- a/libs/ardour/configuration.cc +++ /dev/null @@ -1,371 +0,0 @@ -/* - Copyright (C) 1999-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include /* for snprintf, grrr */ - -#include -#include /* for g_stat() */ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace std; -using namespace PBD; - -/* this is global so that we do not have to indirect through an object pointer - to reference it. -*/ - -namespace ARDOUR { - float speed_quietning = 0.251189; // -12dB reduction for ffwd or rewind -} - -Configuration::Configuration () - : -/* construct variables */ -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(Type,var,name,value) var (name,value), -#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) var (name,value,mutator), -#include "ardour/configuration_vars.h" -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL - - - current_owner (ConfigVariableBase::Default) -{ - _control_protocol_state = 0; -} - -Configuration::~Configuration () -{ -} - -void -Configuration::set_current_owner (ConfigVariableBase::Owner owner) -{ - current_owner = owner; -} - -int -Configuration::load_state () -{ - bool found = false; - - sys::path system_rc_file; - struct stat statbuf; - - /* load system configuration first */ - - if ( find_file_in_search_path (ardour_search_path() + system_config_search_path(), - "ardour_system.rc", system_rc_file) ) - { - XMLTree tree; - found = true; - - string rcfile = system_rc_file.to_string(); - - /* stupid XML Parser hates empty files */ - - if (g_stat (rcfile.c_str(), &statbuf)) { - return -1; - } - - if (statbuf.st_size != 0) { - cerr << string_compose (_("loading system configuration file %1"), rcfile) << endl; - - if (!tree.read (rcfile.c_str())) { - error << string_compose(_("Ardour: cannot read system configuration file \"%1\""), rcfile) << endmsg; - return -1; - } - - current_owner = ConfigVariableBase::System; - - if (set_state (*tree.root())) { - error << string_compose(_("Ardour: system configuration file \"%1\" not loaded successfully."), rcfile) << endmsg; - return -1; - } - } else { - error << _("your system Ardour configuration file is empty. This probably means that there as an error installing Ardour") << endmsg; - } - } - - /* now load configuration file for user */ - - sys::path user_rc_file; - - if (find_file_in_search_path (ardour_search_path() + user_config_directory(), - "ardour.rc", user_rc_file)) - { - XMLTree tree; - - string rcfile = user_rc_file.to_string(); - - /* stupid XML parser hates empty files */ - - if (g_stat (rcfile.c_str(), &statbuf)) { - return -1; - } - - if (statbuf.st_size != 0) { - cerr << string_compose (_("loading user configuration file %1"), rcfile) << endl; - - if (!tree.read (rcfile)) { - error << string_compose(_("Ardour: cannot read configuration file \"%1\""), rcfile) << endmsg; - return -1; - } - - current_owner = ConfigVariableBase::Config; - - if (set_state (*tree.root())) { - error << string_compose(_("Ardour: user configuration file \"%1\" not loaded successfully."), rcfile) << endmsg; - return -1; - } - } else { - warning << _("your Ardour configuration file is empty. This is not normal.") << endmsg; - } - } - - if (!found) - error << "Ardour: could not find configuration file (ardour.rc), canvas will look broken." << endmsg; - - return 0; -} - -int -Configuration::save_state() -{ - XMLTree tree; - - try - { - sys::create_directories (user_config_directory ()); - } - catch (const sys::filesystem_error& ex) - { - error << "Could not create user configuration directory" << endmsg; - return -1; - } - - sys::path rcfile_path(user_config_directory()); - - rcfile_path /= "ardour.rc"; - const string rcfile = rcfile_path.to_string(); - - // this test seems bogus? - if (rcfile.length()) { - tree.set_root (&get_state()); - if (!tree.write (rcfile.c_str())){ - error << string_compose (_("Config file %1 not saved"), rcfile) << endmsg; - return -1; - } - } - - return 0; -} - -void -Configuration::add_instant_xml(XMLNode& node) -{ - Stateful::add_instant_xml (node, user_config_directory ()); -} - -XMLNode* -Configuration::instant_xml(const string& node_name) -{ - return Stateful::instant_xml (node_name, user_config_directory ()); -} - - -bool -Configuration::save_config_options_predicate (ConfigVariableBase::Owner owner) -{ - /* only save things that were in the config file to start with */ - return owner & ConfigVariableBase::Config; -} - -XMLNode& -Configuration::get_state () -{ - XMLNode* root; - LocaleGuard lg (X_("POSIX")); - - root = new XMLNode("Ardour"); - - MIDI::Manager::PortMap::const_iterator i; - const MIDI::Manager::PortMap& ports = MIDI::Manager::instance()->get_midi_ports(); - - for (i = ports.begin(); i != ports.end(); ++i) { - root->add_child_nocopy(i->second->get_state()); - } - - root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Config")); - - if (_extra_xml) { - root->add_child_copy (*_extra_xml); - } - - root->add_child_nocopy (ControlProtocolManager::instance().get_state()); - - return *root; -} - -XMLNode& -Configuration::get_variables (sigc::slot predicate, std::string which_node) -{ - XMLNode* node; - LocaleGuard lg (X_("POSIX")); - - node = new XMLNode(which_node); - -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(type,var,Name,value) \ - if (node->name() == "Config") { if (predicate (var.owner())) { var.add_to_node (*node); }} -#define CONFIG_VARIABLE_SPECIAL(type,var,Name,value,mutator) \ - if (node->name() == "Config") { if (predicate (var.owner())) { var.add_to_node (*node); }} -#include "ardour/configuration_vars.h" -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL - - return *node; -} - -int -Configuration::set_state (const XMLNode& root) -{ - if (root.name() != "Ardour") { - return -1; - } - - XMLNodeList nlist = root.children(); - XMLNodeConstIterator niter; - XMLNode *node; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - node = *niter; - - if (node->name() == "MIDI-port") { - - try { - - MIDI::Port::Descriptor desc (*node); - map::iterator x; - if ((x = midi_ports.find (desc.tag)) != midi_ports.end()) { - midi_ports.erase (x); - } - midi_ports.insert (pair(desc.tag,*node)); - } - - catch (failed_constructor& err) { - warning << _("ill-formed MIDI port specification in ardour rcfile (ignored)") << endmsg; - } - - } else if (node->name() == "Config") { - - set_variables (*node, ConfigVariableBase::Config); - - } else if (node->name() == "extra") { - _extra_xml = new XMLNode (*node); - - } else if (node->name() == ControlProtocolManager::state_node_name) { - _control_protocol_state = new XMLNode (*node); - } - } - - Diskstream::set_disk_io_chunk_frames (minimum_disk_io_bytes.get() / sizeof (Sample)); - - return 0; -} - -void -Configuration::set_variables (const XMLNode& node, ConfigVariableBase::Owner owner) -{ -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(type,var,name,value) \ - if (var.set_from_node (node, owner)) { \ - ParameterChanged (name); \ - } -#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) \ - if (var.set_from_node (node, owner)) { \ - ParameterChanged (name); \ - } - -#include "ardour/configuration_vars.h" -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL - -} -void -Configuration::map_parameters (sigc::slot theSlot) -{ -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -#define CONFIG_VARIABLE(type,var,name,value) theSlot (name); -#define CONFIG_VARIABLE_SPECIAL(type,var,name,value,mutator) theSlot (name); -#include "ardour/configuration_vars.h" -#undef CONFIG_VARIABLE -#undef CONFIG_VARIABLE_SPECIAL -} - -bool ConfigVariableBase::show_stores = false; - -void -ConfigVariableBase::set_show_stored_values (bool yn) -{ - show_stores = yn; -} - -void -ConfigVariableBase::show_stored_value (const string& str) -{ - if (show_stores) { - cerr << "Config variable " << _name << " stored as " << str << endl; - } -} - -void -ConfigVariableBase::notify () -{ - // placeholder for any debugging desired when a config variable is modified -} - -void -ConfigVariableBase::miss () -{ - // placeholder for any debugging desired when a config variable - // is set but to the same value as it already has -} - diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc deleted file mode 100644 index 11c18175d1..0000000000 --- a/libs/ardour/control_protocol_manager.cc +++ /dev/null @@ -1,390 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -using namespace ARDOUR; -using namespace std; -using namespace PBD; - -#include "i18n.h" - -ControlProtocolManager* ControlProtocolManager::_instance = 0; -const string ControlProtocolManager::state_node_name = X_("ControlProtocols"); - -ControlProtocolManager::ControlProtocolManager () -{ - if (_instance == 0) { - _instance = this; - } - - _session = 0; -} - -ControlProtocolManager::~ControlProtocolManager() -{ - Glib::Mutex::Lock lm (protocols_lock); - - for (list::iterator i = control_protocols.begin(); i != control_protocols.end(); ++i) { - delete (*i); - } - - control_protocols.clear (); - - - for (list::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) { - delete (*p); - } - - control_protocol_info.clear(); -} - -void -ControlProtocolManager::set_session (Session& s) -{ - _session = &s; - _session->GoingAway.connect (mem_fun (*this, &ControlProtocolManager::drop_session)); - - for (list::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { - if ((*i)->requested || (*i)->mandatory) { - instantiate (**i); - (*i)->requested = false; - - if ((*i)->protocol && (*i)->state) { - (*i)->protocol->set_state (*(*i)->state); - } - } - } -} - -void -ControlProtocolManager::drop_session () -{ - _session = 0; - - { - Glib::Mutex::Lock lm (protocols_lock); - for (list::iterator p = control_protocols.begin(); p != control_protocols.end(); ++p) { - delete *p; - } - control_protocols.clear (); - - for (list::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) { - // otherwise the ControlProtocol instances are not recreated in set_session - if ((*p)->protocol) { - (*p)->requested = true; - (*p)->protocol = 0; - } - } - } -} - -ControlProtocol* -ControlProtocolManager::instantiate (ControlProtocolInfo& cpi) -{ - if (_session == 0) { - return 0; - } - - cpi.descriptor = get_descriptor (cpi.path); - - if (cpi.descriptor == 0) { - error << string_compose (_("control protocol name \"%1\" has no descriptor"), cpi.name) << endmsg; - return 0; - } - - if ((cpi.protocol = cpi.descriptor->initialize (cpi.descriptor, _session)) == 0) { - error << string_compose (_("control protocol name \"%1\" could not be initialized"), cpi.name) << endmsg; - return 0; - } - - Glib::Mutex::Lock lm (protocols_lock); - control_protocols.push_back (cpi.protocol); - - return cpi.protocol; -} - -int -ControlProtocolManager::teardown (ControlProtocolInfo& cpi) -{ - if (!cpi.protocol) { - return 0; - } - - if (!cpi.descriptor) { - return 0; - } - - if (cpi.mandatory) { - return 0; - } - - cpi.descriptor->destroy (cpi.descriptor, cpi.protocol); - - { - Glib::Mutex::Lock lm (protocols_lock); - list::iterator p = find (control_protocols.begin(), control_protocols.end(), cpi.protocol); - if (p != control_protocols.end()) { - control_protocols.erase (p); - } else { - cerr << "Programming error: ControlProtocolManager::teardown() called for " << cpi.name << ", but it was not found in control_protocols" << endl; - } - - list::iterator p2 = find (control_protocol_info.begin(), control_protocol_info.end(), &cpi); - if (p2 != control_protocol_info.end()) { - control_protocol_info.erase (p2); - } else { - cerr << "Programming error: ControlProtocolManager::teardown() called for " << cpi.name << ", but it was not found in control_protocol_info" << endl; - } - } - - cpi.protocol = 0; - dlclose (cpi.descriptor->module); - return 0; -} - -void -ControlProtocolManager::load_mandatory_protocols () -{ - if (_session == 0) { - return; - } - - for (list::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { - if ((*i)->mandatory && ((*i)->protocol == 0)) { - info << string_compose (_("Instantiating mandatory control protocol %1"), (*i)->name) << endmsg; - instantiate (**i); - } - } -} - -void -ControlProtocolManager::discover_control_protocols () -{ - vector cp_modules; - - Glib::PatternSpec so_extension_pattern("*.so"); - Glib::PatternSpec dylib_extension_pattern("*.dylib"); - - find_matching_files_in_search_path (control_protocol_search_path (), - so_extension_pattern, cp_modules); - - find_matching_files_in_search_path (control_protocol_search_path (), - dylib_extension_pattern, cp_modules); - - info << string_compose (_("looking for control protocols in %1"), control_protocol_search_path().to_string()) << endmsg; - - for (vector::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) { - control_protocol_discover ((*i).to_string()); - } -} - -int -ControlProtocolManager::control_protocol_discover (string path) -{ - ControlProtocolDescriptor* descriptor; - - if ((descriptor = get_descriptor (path)) != 0) { - - ControlProtocolInfo* cpi = new ControlProtocolInfo (); - - if (!descriptor->probe (descriptor)) { - info << string_compose (_("Control protocol %1 not usable"), descriptor->name) << endmsg; - } else { - - cpi->descriptor = descriptor; - cpi->name = descriptor->name; - cpi->path = path; - cpi->protocol = 0; - cpi->requested = false; - cpi->mandatory = descriptor->mandatory; - cpi->supports_feedback = descriptor->supports_feedback; - cpi->state = 0; - - control_protocol_info.push_back (cpi); - - info << string_compose(_("Control surface protocol discovered: \"%1\""), cpi->name) << endmsg; - } - - dlclose (descriptor->module); - } - - return 0; -} - -ControlProtocolDescriptor* -ControlProtocolManager::get_descriptor (string path) -{ - void *module; - ControlProtocolDescriptor *descriptor = 0; - ControlProtocolDescriptor* (*dfunc)(void); - const char *errstr; - - if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) { - error << string_compose(_("ControlProtocolManager: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg; - return 0; - } - - - dfunc = (ControlProtocolDescriptor* (*)(void)) dlsym (module, "protocol_descriptor"); - - if ((errstr = dlerror()) != 0) { - error << string_compose(_("ControlProtocolManager: module \"%1\" has no descriptor function."), path) << endmsg; - error << errstr << endmsg; - dlclose (module); - return 0; - } - - descriptor = dfunc(); - if (descriptor) { - descriptor->module = module; - } else { - dlclose (module); - } - - return descriptor; -} - -void -ControlProtocolManager::foreach_known_protocol (sigc::slot method) -{ - for (list::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { - method (*i); - } -} - -ControlProtocolInfo* -ControlProtocolManager::cpi_by_name (string name) -{ - for (list::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { - if (name == (*i)->name) { - return *i; - } - } - return 0; -} - -int -ControlProtocolManager::set_state (const XMLNode& node) -{ - XMLNodeList clist; - XMLNodeConstIterator citer; - XMLProperty* prop; - - clist = node.children(); - - for (citer = clist.begin(); citer != clist.end(); ++citer) { - if ((*citer)->name() == X_("Protocol")) { - - prop = (*citer)->property (X_("active")); - - if (prop && prop->value() == X_("yes")) { - if ((prop = (*citer)->property (X_("name"))) != 0) { - ControlProtocolInfo* cpi = cpi_by_name (prop->value()); - if (cpi) { - if (!(*citer)->children().empty()) { - cpi->state = (*citer)->children().front (); - } else { - cpi->state = 0; - } - - if (_session) { - instantiate (*cpi); - } else { - cpi->requested = true; - } - } - } - } - } - } - return 0; -} - -XMLNode& -ControlProtocolManager::get_state (void) -{ - XMLNode* root = new XMLNode (state_node_name); - Glib::Mutex::Lock lm (protocols_lock); - - for (list::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { - - XMLNode * child; - - if ((*i)->protocol) { - child = &((*i)->protocol->get_state()); - child->add_property (X_("active"), "yes"); - // should we update (*i)->state here? probably. - root->add_child_nocopy (*child); - } - else if ((*i)->state) { - // keep ownership clear - root->add_child_copy (*(*i)->state); - } - else { - child = new XMLNode (X_("Protocol")); - child->add_property (X_("name"), (*i)->name); - child->add_property (X_("active"), "no"); - root->add_child_nocopy (*child); - } - } - - return *root; -} - -void -ControlProtocolManager::set_protocol_states (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLProperty* prop; - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - XMLNode* child = (*niter); - - if ((prop = child->property ("name")) == 0) { - error << _("control protocol XML node has no name property. Ignored.") << endmsg; - continue; - } - - ControlProtocolInfo* cpi = cpi_by_name (prop->value()); - - if (!cpi) { - warning << string_compose (_("control protocol \"%1\" is not known. Ignored"), prop->value()) << endmsg; - continue; - } - - /* copy the node so that ownership is clear */ - - cpi->state = new XMLNode (*child); - } -} diff --git a/libs/ardour/control_protocol_search_path.cc b/libs/ardour/control_protocol_search_path.cc deleted file mode 100644 index 713ef30e65..0000000000 --- a/libs/ardour/control_protocol_search_path.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include - -namespace { - const char * const surfaces_env_variable_name = "ARDOUR_SURFACES_PATH"; -} // anonymous - -namespace ARDOUR { - -SearchPath -control_protocol_search_path () -{ - bool surfaces_path_defined = false; - SearchPath spath_env(Glib::getenv(surfaces_env_variable_name, surfaces_path_defined)); - - if (surfaces_path_defined) - { - return spath_env; - } - - SearchPath spath(user_config_directory ()); - - spath += ardour_module_directory (); - - spath.add_subdirectory_to_paths(surfaces_dir_name); - - return spath; -} - -} // namespace ARDOUR diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc deleted file mode 100644 index 4383f1a696..0000000000 --- a/libs/ardour/coreaudiosource.cc +++ /dev/null @@ -1,270 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Taybin Rutkin - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include - -#include -#include - -#include "i18n.h" - -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node) - : AudioFileSource (s, node) -{ - init (); -} - -CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag flags) - /* files created this way are never writable or removable */ - : AudioFileSource (s, path, Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))) -{ - _channel = chn; - init (); -} - -void -CoreAudioSource::init () -{ - /* note that we temporarily truncated _id at the colon */ - try { - af.Open(_path.c_str()); - - CAStreamBasicDescription file_format (af.GetFileDataFormat()); - n_channels = file_format.NumberChannels(); - - if (_channel >= n_channels) { - error << string_compose("CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel number (%3)", n_channels, _channel, name()) << endmsg; - throw failed_constructor(); - } - - _length = af.GetNumberFrames(); - - CAStreamBasicDescription client_format (file_format); - - /* set canonial form (PCM, native float packed, 32 bit, with the correct number of channels - and interleaved (since we plan to deinterleave ourselves) - */ - - client_format.SetCanonical(client_format.NumberChannels(), true); - af.SetClientFormat (client_format); - - } catch (CAXException& cax) { - - error << string_compose(_("CoreAudioSource: cannot open file \"%1\" for %2"), - _path, (writable() ? "read+write" : "reading")) << endmsg; - throw failed_constructor (); - } -} - -CoreAudioSource::~CoreAudioSource () -{ - GoingAway (); /* EMIT SIGNAL */ -} - -int -CoreAudioSource::safe_read (Sample* dst, nframes_t start, nframes_t cnt, AudioBufferList& abl) const -{ - nframes_t nread = 0; - - while (nread < cnt) { - - try { - af.Seek (start+nread); - } catch (CAXException& cax) { - error << string_compose("CoreAudioSource: %1 to %2 (%3)", cax.mOperation, start+nread, _name.substr (1)) << endmsg; - return -1; - } - - UInt32 new_cnt = cnt - nread; - - abl.mBuffers[0].mDataByteSize = new_cnt * n_channels * sizeof(Sample); - abl.mBuffers[0].mData = dst + nread; - - try { - af.Read (new_cnt, &abl); - } catch (CAXException& cax) { - error << string_compose("CoreAudioSource: %1 (%2)", cax.mOperation, _name); - return -1; - } - - if (new_cnt == 0) { - /* EOF */ - if (start+cnt == _length) { - /* we really did hit the end */ - nread = cnt; - } - break; - } - - nread += new_cnt; - } - - if (nread < cnt) { - return -1; - } else { - return 0; - } -} - - -nframes_t -CoreAudioSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const -{ - nframes_t file_cnt; - AudioBufferList abl; - - abl.mNumberBuffers = 1; - abl.mBuffers[0].mNumberChannels = n_channels; - - if (start > _length) { - - /* read starts beyond end of data, just memset to zero */ - - file_cnt = 0; - - } else if (start + cnt > _length) { - - /* read ends beyond end of data, read some, memset the rest */ - - file_cnt = _length - start; - - } else { - - /* read is entirely within data */ - - file_cnt = cnt; - } - - if (file_cnt != cnt) { - nframes_t delta = cnt - file_cnt; - memset (dst+file_cnt, 0, sizeof (Sample) * delta); - } - - if (file_cnt) { - - if (n_channels == 1) { - if (safe_read (dst, start, file_cnt, abl) == 0) { - _read_data_count = cnt * sizeof (Sample); - return cnt; - } - return 0; - } - } - - Sample* interleave_buf = get_interleave_buffer (file_cnt * n_channels); - - if (safe_read (interleave_buf, start, file_cnt, abl) != 0) { - return 0; - } - - _read_data_count = cnt * sizeof(float); - - Sample *ptr = interleave_buf + _channel; - - /* stride through the interleaved data */ - - for (uint32_t n = 0; n < file_cnt; ++n) { - dst[n] = *ptr; - ptr += n_channels; - } - - return cnt; -} - -float -CoreAudioSource::sample_rate() const -{ - CAStreamBasicDescription client_asbd; - - try { - client_asbd = af.GetClientDataFormat (); - } catch (CAXException& cax) { - error << string_compose("CoreAudioSource: %1 (%2)", cax.mOperation, _name); - return 0.0; - } - - return client_asbd.mSampleRate; -} - -int -CoreAudioSource::update_header (nframes_t when, struct tm&, time_t) -{ - return 0; -} - -int -CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg) -{ - FSRef ref; - ExtAudioFileRef af = 0; - size_t size; - CFStringRef name; - int ret = -1; - - if (FSPathMakeRef ((UInt8*)path.c_str(), &ref, 0) != noErr) { - goto out; - } - - if (ExtAudioFileOpen(&ref, &af) != noErr) { - goto out; - } - - AudioStreamBasicDescription absd; - memset(&absd, 0, sizeof(absd)); - size = sizeof(AudioStreamBasicDescription); - if (ExtAudioFileGetProperty (af, kExtAudioFileProperty_FileDataFormat, &size, &absd) != noErr) { - goto out; - } - - _info.samplerate = absd.mSampleRate; - _info.channels = absd.mChannelsPerFrame; - - size = sizeof(_info.length); - if (ExtAudioFileGetProperty(af, kExtAudioFileProperty_FileLengthFrames, &size, &_info.length) != noErr) { - goto out; - } - - size = sizeof(CFStringRef); - if (AudioFormatGetProperty(kAudioFormatProperty_FormatName, sizeof(absd), &absd, &size, &name) != noErr) { - goto out; - } - - _info.format_name = CFStringRefToStdString(name); - - // XXX it would be nice to find a way to get this information if it exists - - _info.timecode = 0; - ret = 0; - - out: - ExtAudioFileDispose (af); - return ret; - -} diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc deleted file mode 100644 index f3dfa28165..0000000000 --- a/libs/ardour/crossfade.cc +++ /dev/null @@ -1,904 +0,0 @@ -/* - Copyright (C) 2003-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -nframes_t Crossfade::_short_xfade_length = 0; -Change Crossfade::ActiveChanged = new_change(); -Change Crossfade::FollowOverlapChanged = new_change(); - -/* XXX if and when we ever implement parallel processing of the process() - callback, these will need to be handled on a per-thread basis. -*/ - -Sample* Crossfade::crossfade_buffer_out = 0; -Sample* Crossfade::crossfade_buffer_in = 0; - -void -Crossfade::set_buffer_size (nframes_t sz) -{ - if (crossfade_buffer_out) { - delete [] crossfade_buffer_out; - crossfade_buffer_out = 0; - } - - if (crossfade_buffer_in) { - delete [] crossfade_buffer_in; - crossfade_buffer_in = 0; - } - - if (sz) { - crossfade_buffer_out = new Sample[sz]; - crossfade_buffer_in = new Sample[sz]; - } -} - -bool -Crossfade::operator== (const Crossfade& other) -{ - return (_in == other._in) && (_out == other._out); -} - -Crossfade::Crossfade (boost::shared_ptr in, boost::shared_ptr out, - nframes_t length, - nframes_t position, - AnchorPoint ap) - : AudioRegion (in->session(), position, length, "foobar"), - _fade_in (Parameter(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB - _fade_out (Parameter(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB - -{ - _in = in; - _out = out; - - _anchor_point = ap; - _follow_overlap = false; - - _active = Config->get_xfades_active (); - _fixed = true; - - initialize (); -} - -Crossfade::Crossfade (boost::shared_ptr a, boost::shared_ptr b, CrossfadeModel model, bool act) - : AudioRegion (a->session(), 0, 0, "foobar"), - _fade_in (Parameter(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB - _fade_out (Parameter(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB -{ - _in_update = false; - _fixed = false; - - if (compute (a, b, model)) { - throw failed_constructor(); - } - - _active = act; - - initialize (); - - -} - -Crossfade::Crossfade (const Playlist& playlist, XMLNode& node) - : AudioRegion (playlist.session(), 0, 0, "foobar"), - _fade_in (Parameter(FadeInAutomation), 0.0, 2.0, 1.0), // linear (gain coefficient) => -inf..+6dB - _fade_out (Parameter(FadeOutAutomation), 0.0, 2.0, 1.0) // linear (gain coefficient) => -inf..+6dB - -{ - boost::shared_ptr r; - XMLProperty* prop; - LocaleGuard lg (X_("POSIX")); - - /* we have to find the in/out regions before we can do anything else */ - - if ((prop = node.property ("in")) == 0) { - error << _("Crossfade: no \"in\" region in state") << endmsg; - throw failed_constructor(); - } - - PBD::ID id (prop->value()); - - if ((r = playlist.find_region (id)) == 0) { - error << string_compose (_("Crossfade: no \"in\" region %1 found in playlist %2"), id, playlist.name()) - << endmsg; - throw failed_constructor(); - } - - if ((_in = boost::dynamic_pointer_cast (r)) == 0) { - throw failed_constructor(); - } - - if ((prop = node.property ("out")) == 0) { - error << _("Crossfade: no \"out\" region in state") << endmsg; - throw failed_constructor(); - } - - PBD::ID id2 (prop->value()); - - if ((r = playlist.find_region (id2)) == 0) { - error << string_compose (_("Crossfade: no \"out\" region %1 found in playlist %2"), id2, playlist.name()) - << endmsg; - throw failed_constructor(); - } - - if ((_out = boost::dynamic_pointer_cast (r)) == 0) { - throw failed_constructor(); - } - - _length = 0; - initialize(); - _active = true; - - if (set_state (node)) { - throw failed_constructor(); - } -} - -Crossfade::Crossfade (boost::shared_ptr orig, boost::shared_ptr newin, boost::shared_ptr newout) - : AudioRegion (boost::dynamic_pointer_cast (orig)), - _fade_in (orig->_fade_in), - _fade_out (orig->_fade_out) -{ - _active = orig->_active; - _in_update = orig->_in_update; - _anchor_point = orig->_anchor_point; - _follow_overlap = orig->_follow_overlap; - _fixed = orig->_fixed; - - _in = newin; - _out = newout; - - // copied from Crossfade::initialize() - _in_update = false; - - _out->suspend_fade_out (); - _in->suspend_fade_in (); - - overlap_type = _in->coverage (_out->position(), _out->last_frame()); - layer_relation = (int32_t) (_in->layer() - _out->layer()); - - // Let's make sure the fade isn't too long - set_length(_length); -} - - -Crossfade::~Crossfade () -{ - notify_callbacks (); -} - -void -Crossfade::initialize () -{ - /* merge source lists from regions */ - - _sources = _in->sources(); - _sources.insert (_sources.end(), _out->sources().begin(), _out->sources().end()); - _master_sources = _in->master_sources(); - _master_sources.insert(_master_sources.end(), _out->master_sources().begin(), _out->master_sources().end()); - - _in_update = false; - - _out->suspend_fade_out (); - _in->suspend_fade_in (); - - _fade_out.freeze (); - _fade_out.clear (); - _fade_out.add (0.0, 1.0); - _fade_out.add ((_length * 0.1), 0.99); - _fade_out.add ((_length * 0.2), 0.97); - _fade_out.add ((_length * 0.8), 0.03); - _fade_out.add ((_length * 0.9), 0.01); - _fade_out.add (_length, 0.0); - _fade_out.thaw (); - - _fade_in.freeze (); - _fade_in.clear (); - _fade_in.add (0.0, 0.0); - _fade_in.add ((_length * 0.1), 0.01); - _fade_in.add ((_length * 0.2), 0.03); - _fade_in.add ((_length * 0.8), 0.97); - _fade_in.add ((_length * 0.9), 0.99); - _fade_in.add (_length, 1.0); - _fade_in.thaw (); - - overlap_type = _in->coverage (_out->position(), _out->last_frame()); - layer_relation = (int32_t) (_in->layer() - _out->layer()); -} - -nframes_t -Crossfade::read_raw_internal (Sample* buf, nframes_t start, nframes_t cnt) const -{ -#if 0 - Sample* mixdown = new Sample[cnt]; - float* gain = new float[cnt]; - nframes_t ret; - - ret = read_at (buf, mixdown, gain, start, cnt, chan_n, cnt); - - delete [] mixdown; - delete [] gain; - - return ret; -#endif - return cnt; -} - -nframes_t -Crossfade::read_at (Sample *buf, Sample *mixdown_buffer, - float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n, - nframes_t read_frames, nframes_t skip_frames) const -{ - nframes_t offset; - nframes_t to_write; - - if (!_active) { - return 0; - } - - if (start < _position) { - - /* handle an initial section of the read area that we do not - cover. - */ - - offset = _position - start; - - if (offset < cnt) { - cnt -= offset; - } else { - return 0; - } - - start = _position; - buf += offset; - to_write = min (_length, cnt); - - } else { - - to_write = min (_length - (start - _position), cnt); - - } - - offset = start - _position; - - /* Prevent data from piling up inthe crossfade buffers when reading a transparent region */ - if (!(_out->opaque())) { - memset (crossfade_buffer_out, 0, sizeof (Sample) * to_write); - } else if (!(_in->opaque())) { - memset (crossfade_buffer_in, 0, sizeof (Sample) * to_write); - } - - _out->read_at (crossfade_buffer_out, mixdown_buffer, gain_buffer, start, to_write, chan_n, read_frames, skip_frames); - _in->read_at (crossfade_buffer_in, mixdown_buffer, gain_buffer, start, to_write, chan_n, read_frames, skip_frames); - - float* fiv = new float[to_write]; - float* fov = new float[to_write]; - - _fade_in.curve().get_vector (offset, offset+to_write, fiv, to_write); - _fade_out.curve().get_vector (offset, offset+to_write, fov, to_write); - - /* note: although we have not explicitly taken into account the return values - from _out->read_at() or _in->read_at(), the length() function does this - implicitly. why? because it computes a value based on the in+out regions' - position and length, and so we know precisely how much data they could return. - */ - - for (nframes_t n = 0; n < to_write; ++n) { - buf[n] = (crossfade_buffer_out[n] * fov[n]) + (crossfade_buffer_in[n] * fiv[n]); - } - - delete [] fov; - delete [] fiv; - - return to_write; -} - -OverlapType -Crossfade::coverage (nframes_t start, nframes_t end) const -{ - nframes_t my_end = _position + _length; - - if ((start >= _position) && (end <= my_end)) { - return OverlapInternal; - } - if ((end >= _position) && (end <= my_end)) { - return OverlapStart; - } - if ((start >= _position) && (start <= my_end)) { - return OverlapEnd; - } - if ((_position >= start) && (_position <= end) && (my_end <= end)) { - return OverlapExternal; - } - return OverlapNone; -} - -void -Crossfade::set_active (bool yn) -{ - if (_active != yn) { - _active = yn; - StateChanged (ActiveChanged); - } -} - -bool -Crossfade::refresh () -{ - /* crossfades must be between non-muted regions */ - - if (_out->muted() || _in->muted()) { - Invalidated (shared_from_this ()); - return false; - } - - /* Top layer shouldn't be transparent */ - - if (!((layer_relation > 0 ? _in : _out)->opaque())) { - Invalidated (shared_from_this()); - return false; - } - - /* layer ordering cannot change */ - - int32_t new_layer_relation = (int32_t) (_in->layer() - _out->layer()); - - if (new_layer_relation * layer_relation < 0) { // different sign, layers rotated - Invalidated (shared_from_this ()); - return false; - } - - OverlapType ot = _in->coverage (_out->first_frame(), _out->last_frame()); - - if (ot == OverlapNone) { - Invalidated (shared_from_this ()); - return false; - } - - bool send_signal; - - if (ot != overlap_type) { - - if (_follow_overlap) { - - try { - compute (_in, _out, Config->get_xfade_model()); - } - - catch (NoCrossfadeHere& err) { - Invalidated (shared_from_this ()); - return false; - } - - send_signal = true; - - } else { - - Invalidated (shared_from_this ()); - return false; - } - - } else { - - send_signal = update (); - } - - if (send_signal) { - StateChanged (BoundsChanged); /* EMIT SIGNAL */ - } - - _in_update = false; - - return true; -} - -bool -Crossfade::update () -{ - nframes_t newlen; - - if (_follow_overlap) { - newlen = _out->first_frame() + _out->length() - _in->first_frame(); - } else { - newlen = _length; - } - - if (newlen == 0) { - Invalidated (shared_from_this ()); - return false; - } - - _in_update = true; - - if ((_follow_overlap && newlen != _length) || (_length > newlen)) { - - double factor = newlen / (double) _length; - - _fade_out.x_scale (factor); - _fade_in.x_scale (factor); - - _length = newlen; - } - - switch (_anchor_point) { - case StartOfIn: - _position = _in->first_frame(); - break; - - case EndOfIn: - _position = _in->last_frame() - _length; - break; - - case EndOfOut: - _position = _out->last_frame() - _length; - } - - return true; -} - -int -Crossfade::compute (boost::shared_ptr a, boost::shared_ptr b, CrossfadeModel model) -{ - boost::shared_ptr top; - boost::shared_ptr bottom; - nframes_t short_xfade_length; - - short_xfade_length = _short_xfade_length; - - if (a->layer() < b->layer()) { - top = b; - bottom = a; - } else { - top = a; - bottom = b; - } - - /* first check for matching ends */ - - if (top->first_frame() == bottom->first_frame()) { - - /* Both regions start at the same point */ - - if (top->last_frame() < bottom->last_frame()) { - - /* top ends before bottom, so put an xfade - in at the end of top. - */ - - /* [-------- top ---------- ] - * {====== bottom =====================} - */ - - _in = bottom; - _out = top; - - if (top->last_frame() < short_xfade_length) { - _position = 0; - } else { - _position = top->last_frame() - short_xfade_length; - } - - _length = min (short_xfade_length, top->length()); - _follow_overlap = false; - _anchor_point = EndOfIn; - _active = true; - _fixed = true; - - } else { - /* top ends after (or same time) as bottom - no xfade - */ - - /* [-------- top ------------------------ ] - * {====== bottom =====================} - */ - - throw NoCrossfadeHere(); - } - - } else if (top->last_frame() == bottom->last_frame()) { - - /* Both regions end at the same point */ - - if (top->first_frame() > bottom->first_frame()) { - - /* top starts after bottom, put an xfade in at the - start of top - */ - - /* [-------- top ---------- ] - * {====== bottom =====================} - */ - - _in = top; - _out = bottom; - _position = top->first_frame(); - _length = min (short_xfade_length, top->length()); - _follow_overlap = false; - _anchor_point = StartOfIn; - _active = true; - _fixed = true; - - } else { - /* top starts before bottom - no xfade - */ - - /* [-------- top ------------------------ ] - * {====== bottom =====================} - */ - - throw NoCrossfadeHere(); - } - - } else { - - /* OK, time to do more regular overlapping */ - - OverlapType ot = top->coverage (bottom->first_frame(), bottom->last_frame()); - - switch (ot) { - case OverlapNone: - /* should be NOTREACHED as a precondition of creating - a new crossfade, but we need to handle it here. - */ - throw NoCrossfadeHere(); - break; - - case OverlapInternal: - case OverlapExternal: - /* should be NOTREACHED because of tests above */ - throw NoCrossfadeHere(); - break; - - case OverlapEnd: /* top covers start of bottom but ends within it */ - - /* [---- top ------------------------] - * { ==== bottom ============ } - */ - - _in = bottom; - _out = top; - _anchor_point = EndOfOut; - - if (model == FullCrossfade) { - _position = bottom->first_frame(); // "{" - _length = _out->first_frame() + _out->length() - _in->first_frame(); - /* leave active alone */ - _follow_overlap = true; - } else { - _length = min (short_xfade_length, top->length()); - _position = top->last_frame() - _length; // "]" - length - _active = true; - _follow_overlap = false; - - } - break; - - case OverlapStart: /* top starts within bottom but covers bottom's end */ - - /* { ==== top ============ } - * [---- bottom -------------------] - */ - - _in = top; - _out = bottom; - _position = top->first_frame(); - _anchor_point = StartOfIn; - - if (model == FullCrossfade) { - _length = _out->first_frame() + _out->length() - _in->first_frame(); - /* leave active alone */ - _follow_overlap = true; - } else { - _length = min (short_xfade_length, top->length()); - _active = true; - _follow_overlap = false; - - } - - break; - } - } - - return 0; -} - -XMLNode& -Crossfade::get_state () -{ - XMLNode* node = new XMLNode (X_("Crossfade")); - XMLNode* child; - char buf[64]; - LocaleGuard lg (X_("POSIX")); - - _out->id().print (buf, sizeof (buf)); - node->add_property ("out", buf); - _in->id().print (buf, sizeof (buf)); - node->add_property ("in", buf); - node->add_property ("active", (_active ? "yes" : "no")); - node->add_property ("follow-overlap", (_follow_overlap ? "yes" : "no")); - node->add_property ("fixed", (_fixed ? "yes" : "no")); - snprintf (buf, sizeof(buf), "%" PRIu32, _length); - node->add_property ("length", buf); - snprintf (buf, sizeof(buf), "%" PRIu32, (uint32_t) _anchor_point); - node->add_property ("anchor-point", buf); - snprintf (buf, sizeof(buf), "%" PRIu32, (uint32_t) _position); - node->add_property ("position", buf); - - child = node->add_child ("FadeIn"); - - for (AutomationList::iterator ii = _fade_in.begin(); ii != _fade_in.end(); ++ii) { - XMLNode* pnode; - - pnode = new XMLNode ("point"); - - snprintf (buf, sizeof (buf), "%" PRIu32, (nframes_t) floor ((*ii)->when)); - pnode->add_property ("x", buf); - snprintf (buf, sizeof (buf), "%.12g", (*ii)->value); - pnode->add_property ("y", buf); - child->add_child_nocopy (*pnode); - } - - child = node->add_child ("FadeOut"); - - for (AutomationList::iterator ii = _fade_out.begin(); ii != _fade_out.end(); ++ii) { - XMLNode* pnode; - - pnode = new XMLNode ("point"); - - snprintf (buf, sizeof (buf), "%" PRIu32, (nframes_t) floor ((*ii)->when)); - pnode->add_property ("x", buf); - snprintf (buf, sizeof (buf), "%.12g", (*ii)->value); - pnode->add_property ("y", buf); - child->add_child_nocopy (*pnode); - } - - return *node; -} - -int -Crossfade::set_state (const XMLNode& node) -{ - XMLNodeConstIterator i; - XMLNodeList children; - XMLNode* fi; - XMLNode* fo; - const XMLProperty* prop; - LocaleGuard lg (X_("POSIX")); - Change what_changed = Change (0); - nframes_t val; - - if ((prop = node.property ("position")) != 0) { - sscanf (prop->value().c_str(), "%" PRIu32, &val); - if (val != _position) { - _position = val; - what_changed = Change (what_changed | PositionChanged); - } - } else { - warning << _("old-style crossfade information - no position information") << endmsg; - _position = _in->first_frame(); - } - - if ((prop = node.property ("active")) != 0) { - bool x = (prop->value() == "yes"); - if (x != _active) { - _active = x; - what_changed = Change (what_changed | ActiveChanged); - } - } else { - _active = true; - } - - if ((prop = node.property ("follow-overlap")) != 0) { - _follow_overlap = (prop->value() == "yes"); - } else { - _follow_overlap = false; - } - - if ((prop = node.property ("fixed")) != 0) { - _fixed = (prop->value() == "yes"); - } else { - _fixed = false; - } - - if ((prop = node.property ("anchor-point")) != 0) { - _anchor_point = AnchorPoint (atoi ((prop->value().c_str()))); - } else { - _anchor_point = StartOfIn; - } - - if ((prop = node.property ("length")) != 0) { - - sscanf (prop->value().c_str(), "%" PRIu32, &val); - if (val != _length) { - _length = atol (prop->value().c_str()); - what_changed = Change (what_changed | LengthChanged); - } - - } else { - - /* XXX this branch is legacy code from before - the point where we stored xfade lengths. - */ - - if ((_length = overlap_length()) == 0) { - throw failed_constructor(); - } - } - - if ((fi = find_named_node (node, "FadeIn")) == 0) { - return -1; - } - - if ((fo = find_named_node (node, "FadeOut")) == 0) { - return -1; - } - - /* fade in */ - - _fade_in.freeze (); - _fade_in.clear (); - - children = fi->children(); - - for (i = children.begin(); i != children.end(); ++i) { - if ((*i)->name() == "point") { - nframes_t x; - float y; - - prop = (*i)->property ("x"); - sscanf (prop->value().c_str(), "%" PRIu32, &x); - - prop = (*i)->property ("y"); - sscanf (prop->value().c_str(), "%f", &y); - - _fade_in.add (x, y); - } - } - - _fade_in.thaw (); - - /* fade out */ - - _fade_out.freeze (); - _fade_out.clear (); - - children = fo->children(); - - for (i = children.begin(); i != children.end(); ++i) { - if ((*i)->name() == "point") { - nframes_t x; - float y; - XMLProperty* prop; - - prop = (*i)->property ("x"); - sscanf (prop->value().c_str(), "%" PRIu32, &x); - - prop = (*i)->property ("y"); - sscanf (prop->value().c_str(), "%f", &y); - - _fade_out.add (x, y); - } - } - - _fade_out.thaw (); - - StateChanged (what_changed); /* EMIT SIGNAL */ - - return 0; -} - -bool -Crossfade::can_follow_overlap () const -{ - return !_fixed; -} - -void -Crossfade::set_follow_overlap (bool yn) -{ - if (yn == _follow_overlap || _fixed) { - return; - } - - _follow_overlap = yn; - - if (!yn) { - set_length (_short_xfade_length); - } else { - set_length (_out->first_frame() + _out->length() - _in->first_frame()); - } - - StateChanged (FollowOverlapChanged); -} - -nframes_t -Crossfade::set_length (nframes_t len) -{ - nframes_t limit; - - switch (_anchor_point) { - case StartOfIn: - limit = _in->length(); - break; - - case EndOfIn: - limit = _in->length(); - break; - - case EndOfOut: - limit = _out->length(); - break; - - } - - len = min (limit, len); - - double factor = len / (double) _length; - - _in_update = true; - _fade_out.x_scale (factor); - _fade_in.x_scale (factor); - _in_update = false; - - _length = len; - - StateChanged (LengthChanged); - - return len; -} - -nframes_t -Crossfade::overlap_length () const -{ - if (_fixed) { - return _length; - } - return _out->first_frame() + _out->length() - _in->first_frame(); -} - -void -Crossfade::set_short_xfade_length (nframes_t n) -{ - _short_xfade_length = n; -} - -void -Crossfade::invalidate () -{ - Invalidated (shared_from_this ()); /* EMIT SIGNAL */ -} diff --git a/libs/ardour/curve.cc b/libs/ardour/curve.cc deleted file mode 100644 index dcce3c0c6c..0000000000 --- a/libs/ardour/curve.cc +++ /dev/null @@ -1,406 +0,0 @@ -/* - Copyright (C) 2001-2007 Paul Davis - - Contains ideas derived from "Constrained Cubic Spline Interpolation" - by CJC Kruger (www.korf.co.uk/spline.pdf). - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "ardour/curve.h" -#include "ardour/automation_event.h" - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace sigc; -using namespace PBD; - -Curve::Curve (const AutomationList& al) - : _dirty (true) - , _list (al) -{ - _list.Dirty.connect(mem_fun(*this, &Curve::on_list_dirty)); -} - -void -Curve::solve () -{ - uint32_t npoints; - - if (!_dirty) { - return; - } - - if ((npoints = _list.events().size()) > 2) { - - /* Compute coefficients needed to efficiently compute a constrained spline - curve. See "Constrained Cubic Spline Interpolation" by CJC Kruger - (www.korf.co.uk/spline.pdf) for more details. - */ - - double x[npoints]; - double y[npoints]; - uint32_t i; - AutomationList::EventList::const_iterator xx; - - for (i = 0, xx = _list.events().begin(); xx != _list.events().end(); ++xx, ++i) { - x[i] = (double) (*xx)->when; - y[i] = (double) (*xx)->value; - } - - double lp0, lp1, fpone; - - lp0 = (x[1] - x[0])/(y[1] - y[0]); - lp1 = (x[2] - x[1])/(y[2] - y[1]); - - if (lp0*lp1 < 0) { - fpone = 0; - } else { - fpone = 2 / (lp1 + lp0); - } - - double fplast = 0; - - for (i = 0, xx = _list.events().begin(); xx != _list.events().end(); ++xx, ++i) { - - double xdelta; /* gcc is wrong about possible uninitialized use */ - double xdelta2; /* ditto */ - double ydelta; /* ditto */ - double fppL, fppR; - double fpi; - - if (i > 0) { - xdelta = x[i] - x[i-1]; - xdelta2 = xdelta * xdelta; - ydelta = y[i] - y[i-1]; - } - - /* compute (constrained) first derivatives */ - - if (i == 0) { - - /* first segment */ - - fplast = ((3 * (y[1] - y[0]) / (2 * (x[1] - x[0]))) - (fpone * 0.5)); - - /* we don't store coefficients for i = 0 */ - - continue; - - } else if (i == npoints - 1) { - - /* last segment */ - - fpi = ((3 * ydelta) / (2 * xdelta)) - (fplast * 0.5); - - } else { - - /* all other segments */ - - double slope_before = ((x[i+1] - x[i]) / (y[i+1] - y[i])); - double slope_after = (xdelta / ydelta); - - if (slope_after * slope_before < 0.0) { - /* slope changed sign */ - fpi = 0.0; - } else { - fpi = 2 / (slope_before + slope_after); - } - - } - - /* compute second derivative for either side of control point `i' */ - - fppL = (((-2 * (fpi + (2 * fplast))) / (xdelta))) + - ((6 * ydelta) / xdelta2); - - fppR = (2 * ((2 * fpi) + fplast) / xdelta) - - ((6 * ydelta) / xdelta2); - - /* compute polynomial coefficients */ - - double b, c, d; - - d = (fppR - fppL) / (6 * xdelta); - c = ((x[i] * fppL) - (x[i-1] * fppR))/(2 * xdelta); - - double xim12, xim13; - double xi2, xi3; - - xim12 = x[i-1] * x[i-1]; /* "x[i-1] squared" */ - xim13 = xim12 * x[i-1]; /* "x[i-1] cubed" */ - xi2 = x[i] * x[i]; /* "x[i] squared" */ - xi3 = xi2 * x[i]; /* "x[i] cubed" */ - - b = (ydelta - (c * (xi2 - xim12)) - (d * (xi3 - xim13))) / xdelta; - - /* store */ - - (*xx)->create_coeffs(); - (*xx)->coeff[0] = y[i-1] - (b * x[i-1]) - (c * xim12) - (d * xim13); - (*xx)->coeff[1] = b; - (*xx)->coeff[2] = c; - (*xx)->coeff[3] = d; - - fplast = fpi; - } - - } - - _dirty = false; -} - -bool -Curve::rt_safe_get_vector (double x0, double x1, float *vec, int32_t veclen) -{ - Glib::Mutex::Lock lm(_list.lock(), Glib::TRY_LOCK); - - if (!lm.locked()) { - return false; - } else { - _get_vector (x0, x1, vec, veclen); - return true; - } -} - -void -Curve::get_vector (double x0, double x1, float *vec, int32_t veclen) -{ - Glib::Mutex::Lock lm(_list.lock()); - _get_vector (x0, x1, vec, veclen); -} - -void -Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen) -{ - double rx, dx, lx, hx, max_x, min_x; - int32_t i; - int32_t original_veclen; - int32_t npoints; - - if ((npoints = _list.events().size()) == 0) { - for (i = 0; i < veclen; ++i) { - vec[i] = _list.default_value(); - } - return; - } - - /* events is now known not to be empty */ - - max_x = _list.events().back()->when; - min_x = _list.events().front()->when; - - lx = max (min_x, x0); - - if (x1 < 0) { - x1 = _list.events().back()->when; - } - - hx = min (max_x, x1); - - original_veclen = veclen; - - if (x0 < min_x) { - - /* fill some beginning section of the array with the - initial (used to be default) value - */ - - double frac = (min_x - x0) / (x1 - x0); - int32_t subveclen = (int32_t) floor (veclen * frac); - - subveclen = min (subveclen, veclen); - - for (i = 0; i < subveclen; ++i) { - vec[i] = _list.events().front()->value; - } - - veclen -= subveclen; - vec += subveclen; - } - - if (veclen && x1 > max_x) { - - /* fill some end section of the array with the default or final value */ - - double frac = (x1 - max_x) / (x1 - x0); - - int32_t subveclen = (int32_t) floor (original_veclen * frac); - - float val; - - subveclen = min (subveclen, veclen); - - val = _list.events().back()->value; - - i = veclen - subveclen; - - for (i = veclen - subveclen; i < veclen; ++i) { - vec[i] = val; - } - - veclen -= subveclen; - } - - if (veclen == 0) { - return; - } - - if (npoints == 1 ) { - - for (i = 0; i < veclen; ++i) { - vec[i] = _list.events().front()->value; - } - return; - } - - - if (npoints == 2) { - - /* linear interpolation between 2 points */ - - /* XXX I'm not sure that this is the right thing to - do here. but its not a common case for the envisaged - uses. - */ - - if (veclen > 1) { - dx = (hx - lx) / (veclen - 1) ; - } else { - dx = 0; // not used - } - - double slope = (_list.events().back()->value - _list.events().front()->value)/ - (_list.events().back()->when - _list.events().front()->when); - double yfrac = dx*slope; - - vec[0] = _list.events().front()->value + slope * (lx - _list.events().front()->when); - - for (i = 1; i < veclen; ++i) { - vec[i] = vec[i-1] + yfrac; - } - - return; - } - - if (_dirty) { - solve (); - } - - rx = lx; - - if (veclen > 1) { - - dx = (hx - lx) / veclen; - - for (i = 0; i < veclen; ++i, rx += dx) { - vec[i] = multipoint_eval (rx); - } - } -} - -double -Curve::unlocked_eval (double x) -{ - // I don't see the point of this... - - if (_dirty) { - solve (); - } - - return _list.unlocked_eval (x); -} - -double -Curve::multipoint_eval (double x) -{ - pair range; - - AutomationList::LookupCache& lookup_cache = _list.lookup_cache(); - - if ((lookup_cache.left < 0) || - ((lookup_cache.left > x) || - (lookup_cache.range.first == _list.events().end()) || - ((*lookup_cache.range.second)->when < x))) { - - ControlEvent cp (x, 0.0); - - lookup_cache.range = equal_range (_list.events().begin(), _list.events().end(), &cp, AutomationList::time_comparator); - } - - range = lookup_cache.range; - - /* EITHER - - a) x is an existing control point, so first == existing point, second == next point - - OR - - b) x is between control points, so range is empty (first == second, points to where - to insert x) - - */ - - if (range.first == range.second) { - - /* x does not exist within the list as a control point */ - - lookup_cache.left = x; - - if (range.first == _list.events().begin()) { - /* we're before the first point */ - // return default_value; - _list.events().front()->value; - } - - if (range.second == _list.events().end()) { - /* we're after the last point */ - return _list.events().back()->value; - } - - double x2 = x * x; - ControlEvent* ev = *range.second; - - return ev->coeff[0] + (ev->coeff[1] * x) + (ev->coeff[2] * x2) + (ev->coeff[3] * x2 * x); - } - - /* x is a control point in the data */ - /* invalidate the cached range because its not usable */ - lookup_cache.left = -1; - return (*range.first)->value; -} - -extern "C" { - -void -curve_get_vector_from_c (void *arg, double x0, double x1, float* vec, int32_t vecsize) -{ - static_cast(arg)->get_vector (x0, x1, vec, vecsize); -} - -} diff --git a/libs/ardour/cycle_timer.cc b/libs/ardour/cycle_timer.cc deleted file mode 100644 index 143cb841ec..0000000000 --- a/libs/ardour/cycle_timer.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002 Andrew Morton - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include "i18n.h" - -using namespace PBD; - -float CycleTimer::cycles_per_usec = 0; - -float -CycleTimer::get_mhz() -{ - FILE *f; - - if ((f = fopen("/proc/cpuinfo", "r")) == 0) { - fatal << _("CycleTimer::get_mhz(): can't open /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ - return 0.0f; - } - - while (true) { - - float mhz; - int ret; - char buf[1000]; - - if (fgets (buf, sizeof(buf), f) == 0) { - fatal << _("CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ - return 0.0f; - } - -#ifdef __powerpc__ - - int imhz; - - /* why can't the PPC crew standardize their /proc/cpuinfo format ? */ - ret = sscanf (buf, "clock\t: %dMHz", &imhz); - mhz = (float) imhz; - -#else /* XXX don't assume its x86 just because its not power pc */ - ret = sscanf (buf, "cpu MHz : %f", &mhz); - -#endif - if (ret == 1) { - fclose(f); - return mhz; - } - } - - fatal << _("cannot locate cpu MHz in /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ - return 0.0f; -} diff --git a/libs/ardour/default_click.cc b/libs/ardour/default_click.cc deleted file mode 100644 index 5bdbeb2ac5..0000000000 --- a/libs/ardour/default_click.cc +++ /dev/null @@ -1,1174 +0,0 @@ -/* - Copyright (C) 20002 Paul Davis - Sounds by Nick Mainsbridge. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -using namespace ARDOUR; - -const Sample Session::default_click_emphasis[] = { - - - 0.011260986, 0.055389404, 0.10488892, 0.14285278, 0.17984009, - 0.20492554, 0.2244873, 0.23187256, 0.23144531, 0.21932983, - 0.19973755, 0.17034912, 0.13473511, 0.09274292, 0.04699707, - -0.0009765625, -0.048919678, -0.095123291, -0.13772583, - -0.17495728, -0.20523071, -0.22750854, -0.24038696, -0.24423218, - -0.23831177, -0.22305298, -0.19918823, -0.16748047, -0.12948608, - -0.086730957, -0.041015625, 0.0060424805, 0.052276611, - 0.09588623, 0.13513184, 0.16827393, 0.19415283, 0.21182251, - 0.22024536, 0.2194519, 0.20932007, 0.19030762, 0.1633606, - 0.1295166, 0.090118408, 0.046844482, 0.0015563965, -0.0440979, - -0.088043213, -0.12854004, -0.16415405, -0.19317627, - -0.21456909, -0.22750854, -0.23141479, -0.22619629, -0.21224976, - -0.18994141, -0.1602478, -0.12457275, -0.084228516, - -0.040893555, 0.0035400391, 0.047485352, 0.08895874, 0.12628174, - 0.15808105, 0.1829834, 0.19998169, 0.20849609, 0.2081604, - 0.19891357, 0.18139648, 0.15621948, 0.12438965, 0.087371826, - 0.046569824, 0.0036621094, -0.039489746, -0.081207275, - -0.11987305, -0.15371704, -0.18154907, -0.20220947, -0.21481323, - -0.21896362, -0.21453857, -0.20159912, -0.18084717, -0.15319824, - -0.11959839, -0.081604004, -0.040771484, 0.001373291, - 0.04296875, 0.082275391, 0.11791992, 0.14828491, 0.17214966, - 0.18869019, 0.19711304, 0.19714355, 0.18896484, 0.17272949, - 0.14916992, 0.11941528, 0.084564209, 0.046081543, 0.005645752, - -0.03527832, -0.074890137, -0.11154175, -0.14389038, - -0.17053223, -0.19036865, -0.20272827, -0.20709229, -0.20321655, - -0.19143677, -0.17221069, -0.14624023, -0.11477661, - -0.079040527, -0.040435791, -0.00064086914, 0.038726807, - 0.076171875, 0.11004639, 0.13900757, 0.16201782, 0.177948, - 0.18634033, 0.18685913, 0.17938232, 0.16436768, 0.14254761, - 0.11459351, 0.081817627, 0.045623779, 0.0073242188, - -0.031402588, -0.068939209, -0.10388184, -0.13473511, - -0.16018677, -0.17938232, -0.19143677, -0.19589233, -0.19271851, - -0.1819458, -0.16400146, -0.13980103, -0.11026001, -0.076507568, - -0.040130615, -0.0024414062, 0.034973145, 0.070465088, - 0.10275269, 0.13052368, 0.15255737, 0.1680603, 0.17642212, - 0.17718506, 0.17056274, 0.15673828, 0.13626099, 0.1100769, - 0.079284668, 0.045013428, 0.0088195801, -0.027862549, - -0.06362915, -0.096862793, -0.12631226, -0.15081787, - -0.16931152, -0.18109131, -0.18579102, -0.18310547, -0.17321777, - -0.15661621, -0.13391113, -0.10604858, -0.074310303, - -0.039794922, -0.0040588379, 0.031433105, 0.065338135, - 0.096191406, 0.1227417, 0.14398193, 0.15905762, 0.16726685, - 0.16845703, 0.16247559, 0.14962769, 0.1305542, 0.10595703, - 0.076812744, 0.044494629, 0.010162354, -0.024719238, - -0.058685303, -0.090423584, -0.11865234, -0.14208984, - -0.15994263, -0.17150879, -0.1762085, -0.17401123, -0.16500854, - -0.1494751, -0.12820435, -0.10205078, -0.071990967, - -0.039398193, -0.0055847168, 0.028198242, 0.060424805, - 0.089782715, 0.11523438, 0.13565063, 0.15014648, 0.1583252, - 0.159729, 0.15438843, 0.14260864, 0.12475586, 0.10162354, - 0.074310303, 0.043762207, 0.011291504, -0.02166748, - -0.053924561, -0.084136963, -0.1109314, -0.13342285, - -0.15060425, -0.16177368, -0.16659546, -0.16485596, -0.15655518, - -0.14221191, -0.12234497, -0.097747803, -0.069519043, - -0.038818359, -0.0067749023, 0.025115967, 0.055633545, - 0.083618164, 0.1078186, 0.12731934, 0.14138794, 0.14935303, - 0.15097046, 0.14630127, 0.13537598, 0.11877441, 0.097259521, - 0.071563721, 0.04284668, 0.012329102, -0.018859863, - -0.049346924, -0.077880859, -0.10342407, -0.12484741, - -0.14126587, -0.15213013, -0.1569519, -0.1555481, -0.14807129, - -0.13479614, -0.11624146, -0.093322754, -0.066864014, - -0.03793335, -0.0078735352, 0.022247314, 0.051116943, - 0.077575684, 0.10055542, 0.11920166, 0.13265991, 0.14047241, - 0.14233398, 0.13812256, 0.12814331, 0.11282349, 0.092681885, - 0.068695068, 0.0418396, 0.013122559, -0.016174316, -0.044891357, - -0.071929932, -0.096038818, -0.11636353, -0.1321106, - -0.14254761, -0.14733887, -0.14633179, -0.13955688, -0.12728882, - -0.11016846, -0.088745117, -0.063995361, -0.036987305, - -0.0087280273, 0.019592285, 0.04675293, 0.071746826, - 0.093536377, 0.11120605, 0.12411499, 0.13171387, 0.13366699, - 0.1300354, 0.12094116, 0.10671997, 0.088104248, 0.065765381, - 0.040588379, 0.013763428, -0.013702393, -0.040740967, - -0.066101074, -0.088897705, -0.10818481, -0.12310791, - -0.13314819, -0.13793945, -0.13720703, -0.13113403, -0.11993408, - -0.10400391, -0.084136963, -0.061126709, -0.035858154, - -0.0094299316, 0.017059326, 0.042633057, 0.066131592, - 0.086669922, 0.10345459, 0.11572266, 0.12304688, 0.12521362, - 0.12203979, 0.11373901, 0.10070801, 0.083435059, 0.062652588, - 0.039276123, 0.014221191, -0.011505127, -0.036773682, - -0.060638428, -0.082092285, -0.10025024, -0.11444092, - -0.12408447, -0.12875366, -0.12835693, -0.1229248, -0.11260986, - -0.097991943, -0.079620361, -0.058166504, -0.034698486, - -0.010040283, 0.014770508, 0.038665771, 0.06072998, 0.080108643, - 0.095916748, 0.10760498, 0.11471558, 0.11691284, 0.11419678, - 0.10671997, 0.094726562, 0.078765869, 0.059570312, 0.037811279, - 0.014465332, -0.0094604492, -0.03314209, -0.055480957, - -0.075592041, -0.09274292, -0.10617065, -0.11532593, -0.1199646, - -0.11981201, -0.11489868, -0.1055603, -0.092102051, - -0.075073242, -0.055267334, -0.033447266, -0.010467529, - 0.012634277, 0.035003662, 0.05569458, 0.073822021, 0.088745117, - 0.099853516, 0.10665894, 0.10894775, 0.10665894, 0.099853516, - 0.088897705, 0.07421875, 0.056427002, 0.0362854, 0.01461792, - -0.0077209473, -0.029754639, -0.050628662, -0.069519043, - -0.085571289, -0.098236084, -0.10702515, -0.11151123, - -0.11157227, -0.1072998, -0.098754883, -0.086364746, - -0.070739746, -0.052368164, -0.032104492, -0.01083374, - 0.01071167, 0.031585693, 0.050872803, 0.067932129, 0.081970215, - 0.092437744, 0.098999023, 0.10134888, 0.099395752, 0.093292236, - 0.083282471, 0.069763184, 0.053375244, 0.034729004, 0.01461792, - -0.0061035156, -0.026641846, -0.046142578, -0.063751221, - -0.078857422, -0.090820312, -0.099121094, -0.10351562, - -0.1038208, -0.099975586, -0.092254639, -0.080932617, - -0.066497803, -0.049560547, -0.030822754, -0.011016846, - 0.0090026855, 0.028411865, 0.046478271, 0.062408447, - 0.075592041, 0.085571289, 0.091827393, 0.094177246, 0.092590332, - 0.087097168, 0.077941895, 0.065582275, 0.050445557, 0.033203125, - 0.014587402, -0.0046691895, -0.023803711, -0.04196167, - -0.05847168, -0.072662354, -0.083892822, -0.091827393, - -0.096099854, -0.0965271, -0.093170166, -0.086181641, - -0.075775146, -0.062530518, -0.046875, -0.029510498, - -0.011169434, 0.0074462891, 0.02557373, 0.042419434, - 0.057342529, 0.069793701, 0.079162598, 0.085174561, 0.087585449, - 0.086273193, 0.081329346, 0.073028564, 0.061645508, 0.047668457, - 0.031768799, 0.014465332, -0.0034484863, -0.021209717, - -0.038208008, -0.053649902, -0.066925049, -0.077575684, - -0.085113525, -0.089233398, -0.08984375, -0.086914062, - -0.080535889, -0.071075439, -0.058837891, -0.044342041, - -0.028289795, -0.011230469, 0.0061340332, 0.023010254, - 0.038787842, 0.05279541, 0.064483643, 0.073394775, 0.079162598, - 0.081542969, 0.080535889, 0.07611084, 0.068481445, 0.058044434, - 0.045166016, 0.03036499, 0.014343262, -0.0023193359, - -0.018951416, -0.034820557, -0.049285889, -0.061828613, - -0.071868896, -0.079040527, -0.083099365, -0.083831787, - -0.081237793, -0.075500488, -0.066772461, -0.055480957, - -0.042114258, -0.027130127, -0.011230469, 0.0049133301, - 0.020751953, 0.035552979, 0.048706055, 0.059783936, 0.068237305, - 0.073760986, 0.076202393, 0.075408936, 0.07144165, 0.064483643, - 0.054840088, 0.042877197, 0.029174805, 0.014190674, - -0.0014038086, -0.016937256, -0.031829834, -0.045501709, - -0.057312012, -0.066864014, -0.073760986, -0.077667236, - -0.078552246, -0.076293945, -0.071044922, -0.063018799, - -0.052581787, -0.040100098, -0.026153564, -0.011291504, - 0.00390625, 0.018768311, 0.032714844, 0.045196533, 0.05569458, - 0.063751221, 0.069152832, 0.071563721, 0.070983887, 0.067443848, - 0.061035156, 0.052093506, 0.040985107, 0.028137207, 0.014099121, - -0.00051879883, -0.015197754, -0.029296875, -0.042205811, - -0.053466797, -0.062591553, -0.069213867, -0.073120117, - -0.07409668, -0.072113037, -0.067321777, -0.059906006, - -0.050140381, -0.038482666, -0.025360107, -0.011322021, - 0.0029907227, 0.017089844, 0.03036499, 0.042236328, 0.052276611, - 0.060089111, 0.0652771, 0.067749023, 0.067382812, 0.064117432, - 0.058227539, 0.04989624, 0.039428711, 0.02734375, 0.014099121, - 0.00021362305, -0.013702393, -0.027099609, -0.039459229, - -0.050231934, -0.058990479, -0.065429688, -0.069244385, - -0.0703125, -0.068634033, -0.064208984, -0.057250977, - -0.048126221, -0.037109375, -0.024688721, -0.011413574, - 0.0021972656, 0.015625, 0.028259277, 0.039642334, 0.049285889, - 0.056793213, 0.061889648, 0.064361572, 0.064117432, 0.061187744, - 0.05569458, 0.047851562, 0.03805542, 0.026611328, 0.014038086, - 0.00088500977, -0.012329102, -0.025146484, -0.03692627, - -0.047241211, -0.055725098, -0.061920166, -0.065673828, - -0.066864014, -0.065338135, -0.061279297, -0.05480957, - -0.046203613, -0.035797119, -0.024078369, -0.011474609, - 0.0014648438, 0.014251709, 0.02633667, 0.037200928, 0.046447754, - 0.053741455, 0.05871582, 0.061157227, 0.061096191, 0.058441162, - 0.053314209, 0.04598999, 0.036712646, 0.025909424, 0.014007568, - 0.0014953613, -0.011138916, -0.02331543, -0.034576416, - -0.044494629, -0.052612305, -0.058654785, -0.06237793, - -0.063598633, -0.062316895, -0.058563232, -0.052490234, - -0.044403076, -0.034606934, -0.023468018, -0.011505127, - 0.00079345703, 0.013000488, 0.024505615, 0.034942627, - 0.04385376, 0.050872803, 0.05569458, 0.058197021, 0.058227539, - 0.055786133, 0.051055908, 0.044158936, 0.035430908, 0.02520752, - 0.013916016, 0.0020141602, -0.009979248, -0.021636963, - -0.032440186, -0.041931152, -0.04977417, -0.055664062, - -0.059265137, -0.060577393, -0.05947876, -0.055999756, - -0.050354004, -0.042724609, -0.033447266, -0.022918701, - -0.011566162, 0.00018310547, 0.011810303, 0.022827148, - 0.032836914, 0.041381836, 0.048187256, 0.05291748, 0.055389404, - 0.055541992, 0.053344727, 0.048919678, 0.042449951, 0.034210205, - 0.024536133, 0.013793945, 0.0025024414, -0.008972168, - -0.020080566, -0.030426025, -0.039581299, -0.047149658, - -0.05279541, -0.056396484, -0.057739258, -0.056793213, - -0.053619385, -0.048309326, -0.041137695, -0.03237915, - -0.022369385, -0.011566162, -0.00039672852, 0.01071167, - 0.02130127, 0.030883789, 0.039123535, 0.045684814, 0.050292969, - 0.052764893, 0.053039551, 0.051055908, 0.046936035, 0.040863037, - 0.033081055, 0.023895264, 0.01373291, 0.0029296875, - -0.0079956055, -0.01864624, -0.028564453, -0.037353516, - -0.044647217, -0.050170898, -0.05368042, -0.055084229, - -0.054290771, -0.051361084, -0.046386719, -0.039642334, - -0.031311035, -0.021820068, -0.011566162, -0.00088500977, - 0.0097351074, 0.019836426, 0.029083252, 0.037017822, - 0.043365479, 0.04788208, 0.050323486, 0.050689697, 0.048919678, - 0.045074463, 0.039367676, 0.032012939, 0.02331543, 0.01361084, - 0.0033569336, -0.0071105957, -0.017303467, -0.026794434, - -0.035247803, -0.042327881, -0.047668457, -0.051147461, - -0.052581787, -0.0519104, -0.049224854, -0.044586182, - -0.03817749, -0.030334473, -0.021331787, -0.011505127, - -0.0013427734, 0.0088195801, 0.01852417, 0.027374268, - 0.03503418, 0.04119873, 0.045593262, 0.048034668, 0.048492432, - 0.046905518, 0.043334961, 0.037963867, 0.031005859, 0.022735596, - 0.013519287, 0.003692627, -0.0062866211, -0.016021729, - -0.025177002, -0.033325195, -0.040130615, -0.045349121, - -0.04876709, -0.050231934, -0.049713135, -0.047210693, - -0.04284668, -0.036834717, -0.029388428, -0.020812988, - -0.011474609, -0.001739502, 0.0079650879, 0.017272949, - 0.025787354, 0.033203125, 0.039154053, 0.043457031, 0.045898438, - 0.046417236, 0.04498291, 0.041687012, 0.036621094, 0.030029297, - 0.022186279, 0.013397217, 0.0040588379, -0.0054931641, - -0.014862061, -0.023651123, -0.031494141, -0.038085938, - -0.043151855, -0.046508789, -0.048034668, -0.047607422, - -0.045318604, -0.041259766, -0.035552979, -0.0284729, - -0.020324707, -0.011413574, -0.0021057129, 0.0071716309, - 0.016113281, 0.02432251, 0.031463623, 0.037231445, 0.041442871, - 0.043884277, 0.044464111, 0.043212891, 0.040100098, 0.035339355, - 0.02911377, 0.021636963, 0.013275146, 0.0043640137, - -0.0048217773, -0.013763428, -0.022216797, -0.029785156, - -0.03616333, -0.041107178, -0.044403076, -0.045928955, - -0.045623779, -0.043548584, -0.039703369, -0.034332275, - -0.027648926, -0.019866943, -0.011352539, -0.0024719238, - 0.0064697266, 0.015045166, 0.022918701, 0.029815674, - 0.035430908, 0.039520264, 0.04196167, 0.042602539, 0.041473389, - 0.038604736, 0.034118652, 0.02822876, 0.021148682, 0.013153076, - 0.0046081543, -0.0041503906, -0.012756348, -0.020874023, - -0.028167725, -0.034332275, -0.039154053, -0.042388916, - -0.043945312, -0.043762207, -0.041809082, -0.038238525, - -0.033172607, -0.026794434, -0.01940918, -0.011291504, - -0.0027770996, 0.0057678223, 0.014007568, 0.021636963, - 0.028259277, 0.033691406, 0.037719727, 0.040100098, 0.04083252, - 0.039825439, 0.03717041, 0.032958984, 0.027374268, 0.020599365, - 0.013000488, 0.0048522949, -0.0035400391, -0.011810303, - -0.019592285, -0.026641846, -0.032623291, -0.03729248, - -0.040466309, -0.042053223, -0.041931152, -0.04019165, - -0.036834717, -0.032012939, -0.026000977, -0.018951416, - -0.011199951, -0.0030517578, 0.0051269531, 0.013061523, - 0.020385742, 0.026794434, 0.032073975, 0.035980225, 0.038360596, - 0.039123535, 0.038238525, 0.035766602, 0.031799316, 0.026489258, - 0.020080566, 0.0128479, 0.0050354004, -0.0029907227, - -0.010894775, -0.018432617, -0.02520752, -0.030975342, - -0.035522461, -0.038635254, -0.040222168, -0.04019165, - -0.038574219, -0.035430908, -0.030914307, -0.025177002, - -0.018493652, -0.011108398, -0.0032958984, 0.0045471191, - 0.012145996, 0.019195557, 0.025390625, 0.030487061, 0.034301758, - 0.036651611, 0.037475586, 0.036712646, 0.034423828, 0.030670166, - 0.025665283, 0.019592285, 0.012664795, 0.0052185059, - -0.0024719238, -0.010070801, -0.017272949, -0.023803711, - -0.029388428, -0.033813477, -0.036865234, -0.038452148, - -0.038513184, -0.03704834, -0.034118652, -0.029815674, - -0.024383545, -0.018035889, -0.010955811, -0.0035400391, - 0.0039978027, 0.011291504, 0.018066406, 0.024047852, - 0.028991699, 0.032684326, 0.035003662, 0.035858154, 0.035217285, - 0.033081055, 0.029571533, 0.024810791, 0.019042969, 0.012481689, - 0.0053405762, -0.0020141602, -0.0092773438, -0.016204834, - -0.022491455, -0.027862549, -0.032165527, -0.03515625, - -0.036743164, -0.036865234, -0.035552979, -0.032775879, - -0.028778076, -0.023620605, -0.017547607, -0.01083374, - -0.0037231445, 0.0034790039, 0.010467529, 0.016967773, - 0.022735596, 0.027526855, 0.03112793, 0.033416748, 0.034301758, - 0.033752441, 0.031768799, 0.0284729, 0.023986816, 0.01852417, - 0.012237549, 0.0054626465, -0.0015563965, -0.0085449219, - -0.015167236, -0.021209717, -0.026428223, -0.030578613, - -0.033508301, -0.035095215, -0.03527832, -0.034057617, - -0.031524658, -0.027709961, -0.022827148, -0.017089844, - -0.010681152, -0.00390625, 0.0029907227, 0.0096740723, - 0.015960693, 0.021484375, 0.026123047, 0.029632568, 0.031890869, - 0.032806396, 0.032348633, 0.030517578, 0.027435303, 0.023193359, - 0.017974854, 0.012023926, 0.0055847168, -0.001159668, - -0.0078125, -0.014190674, -0.020019531, -0.025024414, - -0.029052734, -0.031921387, -0.033477783, -0.033752441, - -0.032653809, -0.030273438, -0.026702881, -0.022094727, - -0.016601562, -0.010498047, -0.0040588379, 0.002532959, - 0.008972168, 0.014953613, 0.020324707, 0.024780273, 0.028198242, - 0.030426025, 0.031341553, 0.030975342, 0.029296875, 0.026397705, - 0.022399902, 0.017486572, 0.011810303, 0.005645752, - -0.00076293945, -0.0071411133, -0.013275146, -0.018859863, - -0.023681641, -0.027587891, -0.03036499, -0.031951904, - -0.03225708, -0.03125, -0.029052734, -0.025695801, -0.02130127, - -0.016113281, -0.010345459, -0.0041503906, 0.0021362305, - 0.0082702637, 0.014068604, 0.019195557, 0.023498535, - 0.026824951, 0.028991699, 0.029937744, 0.029663086, 0.028106689, - 0.025390625, 0.021636963, 0.016967773, 0.011566162, - 0.0057067871, -0.00039672852, -0.0065307617, -0.012359619, - -0.01776123, -0.022399902, -0.026184082, -0.028900146, - -0.030456543, -0.030792236, -0.029937744, -0.027862549, - -0.024688721, -0.020568848, -0.015655518, -0.010131836, - -0.0042419434, 0.001739502, 0.0076599121, 0.013183594, - 0.018127441, 0.022277832, 0.025512695, 0.027618408, 0.028625488, - 0.028381348, 0.026977539, 0.02444458, 0.020874023, 0.016448975, - 0.011352539, 0.0057373047, -9.1552734e-05, -0.0059204102, - -0.011535645, -0.016693115, -0.021179199, -0.024841309, - -0.02746582, -0.029022217, -0.029418945, -0.028625488, - -0.026702881, -0.023742676, -0.019866943, -0.015197754, - -0.0099487305, -0.0043334961, 0.0014038086, 0.007019043, - 0.012329102, 0.017089844, 0.021087646, 0.024230957, 0.026306152, - 0.027282715, 0.027130127, 0.025848389, 0.023468018, 0.020111084, - 0.015930176, 0.011077881, 0.0057678223, 0.00021362305, - -0.0053710938, -0.010742188, -0.015686035, -0.020019531, - -0.023529053, -0.026123047, -0.027648926, -0.028076172, - -0.027374268, -0.025604248, -0.022827148, -0.019134521, - -0.01473999, -0.0097351074, -0.0043945312, 0.0010681152, - 0.0064697266, 0.011535645, 0.016113281, 0.019989014, - 0.023010254, 0.025024414, 0.026031494, 0.025939941, 0.024749756, - 0.02255249, 0.019378662, 0.015411377, 0.01083374, 0.0057678223, - 0.00045776367, -0.0048522949, -0.010009766, -0.01473999, - -0.018890381, -0.02230835, -0.024810791, -0.02633667, - -0.026794434, -0.026184082, -0.024536133, -0.021911621, - -0.018463135, -0.014251709, -0.009552002, -0.0044555664, - 0.00076293945, 0.0059204102, 0.010772705, 0.015167236, - 0.018890381, 0.021820068, 0.023803711, 0.024810791, 0.024749756, - 0.023681641, 0.021606445, 0.01864624, 0.014923096, 0.010559082, - 0.0057373047, 0.0007019043, -0.0043945312, -0.0093078613, - -0.01385498, -0.017852783, -0.021118164, -0.02355957, - -0.025054932, -0.025543213, -0.024993896, -0.023498535, - -0.021057129, -0.01776123, -0.013824463, -0.0093383789, - -0.004486084, 0.00048828125, 0.0054016113, 0.010040283, - 0.014251709, 0.017852783, 0.020690918, 0.022613525, 0.023620605, - 0.023620605, 0.022644043, 0.020721436, 0.017944336, 0.014404297, - 0.010284424, 0.0057373047, 0.00091552734, -0.0039367676, - -0.0086364746, -0.013000488, -0.016815186, -0.019989014, - -0.022338867, -0.023803711, -0.02432251, -0.023864746, - -0.022460938, -0.020172119, -0.017089844, -0.013366699, - -0.0090942383, -0.0045166016, 0.00021362305, 0.0049133301, - 0.0093688965, 0.013397217, 0.016845703, 0.019592285, - 0.021484375, 0.022491455, 0.022521973, 0.021636963, 0.019866943, - 0.017242432, 0.013916016, 0.010009766, 0.0056762695, - 0.0010986328, -0.0035095215, -0.0079956055, -0.012176514, - -0.015838623, -0.018890381, -0.021179199, -0.022613525, - -0.023162842, -0.022766113, -0.021484375, -0.019348145, - -0.016418457, -0.012908936, -0.0088806152, -0.0045166016, 0, - 0.0044555664, 0.0087280273, 0.012573242, 0.015899658, - 0.01852417, 0.020385742, 0.021362305, 0.021484375, 0.0206604, - 0.019012451, 0.016571045, 0.013427734, 0.0097045898, - 0.0056152344, 0.0012817383, -0.003112793, -0.0073852539, - -0.011383057, -0.014923096, -0.017822266, -0.020050049, - -0.021453857, -0.022003174, -0.021697998, -0.020507812, - -0.018493652, -0.015777588, -0.012451172, -0.0086364746, - -0.004486084, -0.00021362305, 0.0040588379, 0.0080871582, - 0.011779785, 0.014984131, 0.01751709, 0.019317627, 0.020294189, - 0.020446777, 0.019714355, 0.018188477, 0.015869141, 0.012908936, - 0.0094299316, 0.0055541992, 0.0014343262, -0.002746582, - -0.0068359375, -0.010620117, -0.014007568, -0.016815186, - -0.018981934, -0.020355225, -0.020904541, -0.020629883, - -0.019561768, -0.017700195, -0.015136719, -0.011993408, - -0.008392334, -0.0044555664, -0.00039672852, 0.0036621094, - 0.0075073242, 0.011047363, 0.014099121, 0.016540527, - 0.018280029, 0.019256592, 0.01940918, 0.018768311, 0.017364502, - 0.015197754, 0.012420654, 0.0091247559, 0.0054626465, - 0.0015563965, -0.0024108887, -0.0062866211, -0.0099182129, - -0.013153076, -0.015838623, -0.017913818, -0.019256592, - -0.019836426, -0.019622803, -0.018615723, -0.016876221, - -0.01449585, -0.011535645, -0.0081176758, -0.0044250488, - -0.00057983398, 0.0032958984, 0.0069580078, 0.010314941, - 0.013244629, 0.015594482, 0.017272949, 0.018249512, 0.018432617, - 0.017852783, 0.016540527, 0.014556885, 0.011932373, - 0.0088195801, 0.0053710938, 0.0016784668, -0.0021057129, - -0.0057678223, -0.0092468262, -0.012329102, -0.014892578, - -0.016906738, -0.018188477, -0.018768311, -0.018615723, - -0.017700195, -0.016082764, -0.01385498, -0.011047363, - -0.0078430176, -0.0043640137, -0.0007019043, 0.0029296875, - 0.006439209, 0.0096435547, 0.012451172, 0.014678955, - 0.016326904, 0.017272949, 0.017486572, 0.016967773, 0.01574707, - 0.013885498, 0.011444092, 0.0085144043, 0.0052490234, - 0.0017700195, -0.0018005371, -0.0053100586, -0.0085754395, - -0.011535645, -0.014007568, -0.015899658, -0.017181396, - -0.01776123, -0.01763916, -0.016815186, -0.015319824, - -0.013214111, -0.0105896, -0.007598877, -0.0042724609, - -0.00082397461, 0.0026245117, 0.0059509277, 0.0090026855, - 0.011657715, 0.013824463, 0.015380859, 0.016296387, 0.016540527, - 0.016082764, 0.014984131, 0.013244629, 0.010955811, - 0.0082092285, 0.0051269531, 0.0018310547, -0.0015258789, - -0.0048522949, -0.0079650879, -0.010772705, -0.013122559, - -0.014953613, -0.016204834, -0.01675415, -0.016693115, - -0.015930176, -0.014556885, -0.01260376, -0.010131836, - -0.0072937012, -0.0042114258, -0.00094604492, 0.0023193359, - 0.0054626465, 0.0083618164, 0.010894775, 0.012939453, - 0.014465332, 0.015380859, 0.015625, 0.015228271, 0.014221191, - 0.012573242, 0.010467529, 0.0078735352, 0.0049743652, - 0.0018920898, -0.0012817383, -0.0044250488, -0.0073852539, - -0.010040283, -0.012298584, -0.014038086, -0.015228271, - -0.015808105, -0.01574707, -0.015075684, -0.013793945, - -0.011962891, -0.0096740723, -0.007019043, -0.004119873, - -0.0010375977, 0.0020446777, 0.0050048828, 0.0077514648, - 0.010162354, 0.012115479, 0.013580322, 0.014465332, 0.01473999, - 0.014373779, 0.013458252, 0.011962891, 0.0099487305, - 0.0075378418, 0.0048522949, 0.0019226074, -0.0010681152, - -0.0040283203, -0.0068054199, -0.0093383789, -0.011474609, - -0.013153076, -0.014312744, -0.014862061, -0.014862061, - -0.014251709, -0.013061523, -0.011352539, -0.0092468262, - -0.0067443848, -0.0039978027, -0.0011291504, 0.0017700195, - 0.0045776367, 0.0071716309, 0.0094604492, 0.011322021, - 0.012695312, 0.013580322, 0.01385498, 0.013549805, 0.012695312, - 0.011322021, 0.0094604492, 0.007232666, 0.0046691895, - 0.001953125, -0.00085449219, -0.0036621094, -0.0062866211, - -0.0086669922, -0.010681152, -0.012298584, -0.013397217, - -0.013946533, -0.013946533, -0.013397217, -0.012329102, - -0.010772705, -0.0087585449, -0.006439209, -0.00390625, - -0.0011901855, 0.0015258789, 0.0041809082, 0.0066223145, - 0.0087585449, 0.010559082, 0.011871338, 0.012695312, - 0.013000488, 0.012756348, 0.011962891, 0.010681152, 0.008972168, - 0.0068664551, 0.0045166016, 0.001953125, -0.00067138672, - -0.0032958984, -0.0057678223, -0.0079956055, -0.0099182129, - -0.011444092, -0.012512207, -0.013061523, -0.013092041, - -0.01260376, -0.01159668, -0.010162354, -0.0083007812, - -0.0061645508, -0.0037536621, -0.0012512207, 0.0013122559, - 0.0037841797, 0.0061035156, 0.0081176758, 0.0097961426, - 0.011077881, 0.011871338, 0.012145996, 0.011932373, 0.011230469, - 0.010070801, 0.0084838867, 0.0065307617, 0.0043334961, - 0.001953125, -0.00051879883, -0.0029602051, -0.005279541, - -0.0073852539, -0.009185791, -0.010620117, -0.011627197, - -0.012176514, -0.012237549, -0.011779785, -0.010894775, - -0.009552002, -0.0078430176, -0.0058288574, -0.0036315918, - -0.0012817383, 0.0011291504, 0.0034179688, 0.0055847168, - 0.0075073242, 0.0090637207, 0.010284424, 0.011047363, - 0.011322021, 0.011169434, 0.010528564, 0.0094604492, - 0.0079956055, 0.0061950684, 0.0041503906, 0.0019226074, - -0.00036621094, -0.0026550293, -0.0048217773, -0.0067749023, - -0.0084838867, -0.0098266602, -0.010803223, -0.011322021, - -0.011383057, -0.010986328, -0.010192871, -0.0089416504, - -0.0073852539, -0.0055236816, -0.0034790039, -0.0012817383, - 0.00094604492, 0.0030822754, 0.0050964355, 0.0068969727, - 0.008392334, 0.0095214844, 0.010223389, 0.010528564, - 0.010406494, 0.0098266602, 0.0088500977, 0.0075073242, - 0.0058288574, 0.0039672852, 0.0018920898, -0.00021362305, - -0.0023498535, -0.0043640137, -0.0061950684, -0.0077819824, - -0.0090637207, -0.009979248, -0.010467529, -0.010559082, - -0.010223389, -0.0094909668, -0.0083618164, -0.0069274902, - -0.0052185059, -0.0032958984, -0.0012817383, 0.00076293945, - 0.0027770996, 0.0046386719, 0.0063171387, 0.0076904297, - 0.0087585449, 0.0094604492, 0.0097351074, 0.0096435547, - 0.0091247559, 0.0082397461, 0.0069885254, 0.0054931641, - 0.0037536621, 0.0018615723, -0.00012207031, -0.0020751953, - -0.0039367676, -0.005645752, -0.0071411133, -0.0083312988, - -0.009185791, -0.0096740723, -0.009765625, -0.0094604492, - -0.0087890625, -0.0077819824, -0.006439209, -0.0048828125, - -0.0031433105, -0.0012817383, 0.00061035156, 0.0024719238, - 0.0042114258, 0.0057373047, 0.0070495605, 0.008026123, - 0.0086975098, 0.008972168, 0.0088806152, 0.0084228516, - 0.0076293945, 0.0065002441, 0.0051269531, 0.0035400391, - 0.0018005371, 0, -0.0018005371, -0.0035400391, -0.0051269531, - -0.0065002441, -0.007598877, -0.008392334, -0.0088500977, - -0.008972168, -0.0086975098, -0.0081176758, -0.0071716309, - -0.0059814453, -0.0045471191, -0.0029602051, -0.0012512207, - 0.00048828125, 0.0021972656, 0.0037841797, 0.0052185059, - 0.0064086914, 0.0073242188, 0.0079345703, 0.0082092285, - 0.0081481934, 0.0077514648, 0.007019043, 0.0060119629, - 0.0047607422, 0.0032958984, 0.0017089844, 6.1035156e-05, - -0.0015869141, -0.0031738281, -0.0046081543, -0.0058898926, - -0.0068969727, -0.0076293945, -0.0080566406, -0.0081787109, - -0.0079650879, -0.0074157715, -0.0065917969, -0.0055236816, - -0.0042114258, -0.0027770996, -0.0012207031, 0.00036621094, - 0.0019226074, 0.0033874512, 0.0046691895, 0.0057678223, - 0.0066223145, 0.0072021484, 0.0074768066, 0.0074157715, - 0.0070800781, 0.0064086914, 0.0055236816, 0.0043945312, - 0.0030822754, 0.0016479492, 0.00015258789, -0.001373291, - -0.0028076172, -0.004119873, -0.005279541, -0.0062255859, - -0.0068969727, -0.0072937012, -0.0074157715, -0.007232666, - -0.0067443848, -0.0060119629, -0.0050354004, -0.0038757324, - -0.0025634766, -0.001159668, 0.0002746582, 0.0016784668, - 0.0029907227, 0.0041809082, 0.0051879883, 0.0059509277, - 0.0064697266, 0.0067443848, 0.0067138672, 0.0064086914, - 0.0058288574, 0.0050048828, 0.0039978027, 0.0028381348, - 0.0015258789, 0.00018310547, -0.001159668, -0.0024719238, - -0.0036621094, -0.004699707, -0.0055541992, -0.0061645508, - -0.0065307617, -0.006652832, -0.0065002441, -0.006072998, - -0.0054321289, -0.0045776367, -0.0035400391, -0.0023498535, - -0.0010986328, 0.00018310547, 0.0014343262, 0.0026245117, - 0.003692627, 0.0046081543, 0.0053100586, 0.0057678223, - 0.0060119629, 0.0060119629, 0.0057373047, 0.0052185059, - 0.0045166016, 0.0036315918, 0.0025634766, 0.0014343262, - 0.00024414062, -0.0009765625, -0.0021362305, -0.0032043457, - -0.0041503906, -0.0049133301, -0.0054626465, -0.0057983398, - -0.0059204102, -0.0057678223, -0.0054321289, -0.0048522949, - -0.0040893555, -0.0031738281, -0.0021362305, -0.0010375977, - 9.1552734e-05, 0.0012207031, 0.0022583008, 0.0032348633, - 0.0040283203, 0.0046691895, 0.0050964355, 0.0053100586, - 0.0053100586, 0.005065918, 0.0046386719, 0.0039978027, - 0.0032348633, 0.0023193359, 0.0013122559, 0.00024414062, - -0.00079345703, -0.0018310547, -0.0027770996, -0.0036010742, - -0.0042724609, -0.0047607422, -0.005065918, -0.0051879883, - -0.005065918, -0.0047607422, -0.0042724609, -0.0036010742, - -0.0028076172, -0.0019226074, -0.00094604492, 3.0517578e-05, - 0.0010070801, 0.0019226074, 0.0027770996, 0.0034790039, - 0.0040283203, 0.0043945312, 0.0046081543, 0.0046081543, - 0.0044250488, 0.0040283203, 0.0035095215, 0.0028381348, - 0.0020446777, 0.001159668, 0.0002746582, -0.00064086914, - -0.0015258789, -0.0023498535, -0.0030517578, -0.0036621094, - -0.0040893555, -0.0043640137, -0.0044555664, -0.0043640137, - -0.0040893555, -0.003692627, -0.003112793, -0.0024414062, - -0.0016784668, -0.00085449219, 0, 0.00082397461, 0.0016174316, - 0.0023193359, 0.0029296875, 0.0034179688, 0.0037536621, - 0.00390625, 0.00390625, 0.0037536621, 0.0034484863, - 0.0029907227, 0.0024414062, 0.0017700195, 0.0010375977, - 0.0002746582, -0.00051879883, -0.0012512207, -0.001953125, - -0.0025634766, -0.0030517578, -0.0034179688, -0.0036621094, - -0.0037231445, -0.0036621094, -0.0034484863, -0.003112793, - -0.0026245117, -0.0020751953, -0.0014343262, -0.00073242188, - -3.0517578e-05, 0.00067138672, 0.0013122559, 0.0019226074, - 0.0024108887, 0.0028076172, 0.0030822754, 0.0032348633, - 0.0032348633, 0.003112793, 0.0028686523, 0.0025024414, - 0.0020141602, 0.0014648438, 0.00088500977, 0.00024414062, - -0.00039672852, -0.0010070801, -0.0015563965, -0.0020446777, - -0.0024719238, -0.0027770996, -0.0029602051, -0.0030212402, - -0.0029602051, -0.0028076172, -0.0025024414, -0.0021362305, - -0.0016784668, -0.001159668, -0.00061035156, -6.1035156e-05, - 0.00048828125, 0.0010375977, 0.0014953613, 0.0018920898, - 0.0022277832, 0.0024414062, 0.0025634766, 0.0025634766, - 0.0024719238, 0.0022583008, 0.0019836426, 0.0016174316, - 0.0011901855, 0.0007019043, 0.00021362305, -0.0002746582, - -0.00076293945, -0.0011901855, -0.0015563965, -0.0018920898, - -0.0021057129, -0.0022583008, -0.0023193359, -0.0022583008, - -0.0021362305, -0.0019226074, -0.0016479492, -0.0012817383, - -0.00091552734, -0.00048828125, -6.1035156e-05, 0.00036621094, - 0.00076293945, 0.0010986328, 0.0014038086, 0.0016479492, - 0.0018005371, 0.0018920898, 0.0018920898, 0.0018005371, - 0.0016479492, 0.0014343262, 0.0011901855, 0.00085449219, - 0.00051879883, 0.00018310547, -0.00018310547, -0.00051879883, - -0.00082397461, -0.0010986328, -0.0013122559, -0.0014953613, - -0.0015869141, -0.0016174316, -0.0015869141, -0.0014953613, - -0.0013427734, -0.0011291504, -0.00088500977, -0.00064086914, - -0.00033569336, -6.1035156e-05, 0.00021362305, 0.00048828125, - 0.00073242188, 0.00091552734, 0.0010681152, 0.001159668, - 0.0012207031, 0.0012207031, 0.001159668, 0.0010681152, - 0.00091552734, 0.00073242188, 0.00054931641, 0.00033569336, - 0.00012207031, -9.1552734e-05, -0.00030517578, -0.00048828125, - -0.00064086914, -0.00076293945, -0.00085449219, -0.00091552734, - -0.00091552734, -0.00088500977, -0.00082397461, -0.00073242188, - -0.00061035156, -0.00048828125, -0.00033569336, -0.00018310547, - -3.0517578e-05, 0.00012207031, 0.00024414062, 0.00033569336, - 0.00042724609, 0.00048828125, 0.00054931641, 0.00054931641, - 0.00054931641, 0.00051879883, 0.00045776367, 0.00039672852, - 0.00030517578, 0.00021362305, 0.00012207031, 6.1035156e-05, - -3.0517578e-05, -9.1552734e-05, -0.00015258789, -0.00018310547, - -0.00021362305, -0.00024414062, -0.00024414062, -0.00021362305, - -0.00021362305, -0.00018310547, -0.00012207031, -9.1552734e-05, - -6.1035156e-05, -3.0517578e-05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -}; - -const nframes_t Session::default_click_emphasis_length = sizeof (default_click_emphasis) / sizeof (default_click_emphasis[0]); - -const Sample Session::default_click[] = { - 0, -0.014312744, -0.03338623, 0.019165039, 0.042541504, - 0.08984375, 0.082611084, 0.13909912, 0.17236328, - 0.19238281, 0.21087646, 0.22238159, 0.23114014, - 0.23321533, 0.23080444, 0.222229, 0.20944214, - 0.19146729, 0.16964722, 0.14352417, 0.11450195, - 0.082489014, 0.049316406, 0.014068604, -0.020507812, - -0.055969238, -0.089233398, -0.1211853, -0.15036011, - -0.1763916, -0.19882202, -0.2170105, -0.23062134, - -0.23916626, -0.24279785, -0.24142456, -0.23483276, - -0.22357178, -0.2074585, -0.18701172, -0.16308594, - -0.1355896, -0.10562134, -0.073547363, -0.040100098, - -0.0061645508, 0.027618408, 0.060394287, 0.091796875, - 0.12072754, 0.14685059, 0.16949463, 0.18804932, - 0.20245361, 0.21212769, 0.21694946, 0.21691895, - 0.21191406, 0.20214844, 0.18786621, 0.16943359, - 0.14706421, 0.12145996, 0.093139648, 0.06262207, - 0.030822754, -0.0018310547, -0.034545898, -0.066467285, - -0.097076416, -0.12564087, -0.15155029, -0.17422485, - -0.19326782, -0.20812988, -0.21862793, -0.22457886, - -0.22567749, -0.22210693, -0.21392822, -0.20120239, - -0.18438721, -0.16381836, -0.13986206, -0.11315918, - -0.084289551, -0.053771973, -0.02243042, 0.0090942383, - 0.040252686, 0.07019043, 0.098297119, 0.12408447, - 0.14685059, 0.16616821, 0.18170166, 0.19302368, - 0.19985962, 0.20230103, 0.20007324, 0.19329834, - 0.18231201, 0.16711426, 0.14819336, 0.1260376, - 0.10095215, 0.073608398, 0.044647217, 0.01461792, - -0.015808105, -0.04586792, -0.075073242, -0.10272217, - -0.12811279, -0.15084839, -0.17041016, -0.1862793, - -0.19827271, -0.20602417, -0.20941162, -0.20846558, - -0.203125, -0.19348145, -0.17990112, -0.16259766, - -0.14190674, -0.11846924, -0.092651367, -0.065002441, - -0.0362854, -0.0069885254, 0.022247314, 0.05065918, - 0.077758789, 0.10296631, 0.12561035, 0.14532471, - 0.16171265, 0.17428589, 0.18289185, 0.18737793, - 0.18756104, 0.18353271, 0.17541504, 0.16329956, - 0.14755249, 0.12854004, 0.10656738, 0.082244873, - 0.056091309, 0.028594971, 0.00045776367, -0.027709961, - -0.055419922, -0.08190918, -0.10665894, -0.12924194, - -0.14901733, -0.1656189, -0.17877197, -0.18811035, - -0.19342041, -0.19473267, -0.19189453, -0.18505859, - -0.17440796, -0.16009521, -0.14245605, -0.12203979, - -0.099121094, -0.07421875, -0.048034668, -0.020935059, - 0.0063781738, 0.033233643, 0.059234619, 0.083709717, - 0.1060791, 0.12600708, 0.14294434, 0.15655518, - 0.16662598, 0.17288208, 0.1751709, 0.17355347, - 0.16802979, 0.15866089, 0.14581299, 0.12966919, - 0.1105957, 0.089080811, 0.065551758, 0.040466309, - 0.014556885, -0.011779785, -0.037963867, -0.063293457, - -0.087341309, -0.10958862, -0.12942505, -0.14654541, - -0.16061401, -0.1711731, -0.17816162, -0.18145752, - -0.18081665, -0.17642212, -0.16836548, -0.15673828, - -0.14193726, -0.12426758, -0.10400391, -0.081695557, - -0.057891846, -0.032928467, -0.0075073242, 0.017791748, - 0.042602539, 0.066192627, 0.088134766, 0.10803223, - 0.12530518, 0.13967896, 0.15087891, 0.15859985, - 0.16265869, 0.16311646, 0.15982056, 0.1529541, - 0.14273071, 0.12921143, 0.11282349, 0.093963623, - 0.072967529, 0.050323486, 0.026580811, 0.002166748, - -0.022369385, -0.046356201, -0.069458008, -0.091094971, - -0.11071777, -0.12808228, -0.1427002, -0.15420532, - -0.16253662, -0.16741943, -0.16867065, -0.16647339, - -0.1607666, -0.15164185, -0.13946533, -0.12438965, - -0.10675049, -0.087036133, -0.065582275, -0.042877197, - -0.019500732, 0.004119873, 0.027496338, 0.049957275, - 0.071228027, 0.090759277, 0.10803223, 0.12283325, - 0.13482666, 0.14364624, 0.14923096, 0.15145874, - 0.150177, 0.14556885, 0.13772583, 0.1267395, 0.11294556, - 0.096679688, 0.078155518, 0.057952881, 0.036499023, - 0.014099121, -0.0085449219, -0.031066895, -0.052978516, - -0.073730469, -0.092895508, -0.11013794, -0.125, - -0.13717651, -0.14648438, -0.15264893, -0.15557861, - -0.15527344, -0.15164185, -0.14486694, -0.13510132, - -0.12252808, -0.10742188, -0.090240479, -0.07119751, - -0.05078125, -0.029510498, -0.0077514648, 0.014007568, - 0.035186768, 0.055480957, 0.074401855, 0.091430664, - 0.10638428, 0.11880493, 0.128479, 0.13525391, - 0.13891602, 0.1394043, 0.1368103, 0.13113403, - 0.12246704, 0.11114502, 0.097320557, 0.081268311, - 0.06350708, 0.044281006, 0.024017334, 0.0032958984, - -0.017578125, -0.038116455, -0.057769775, -0.07623291, - -0.093109131, -0.10791016, -0.12045288, -0.13046265, - -0.13763428, -0.14190674, -0.14321899, -0.14141846, - -0.13674927, -0.12921143, -0.11895752, -0.10629272, - -0.091491699, -0.074798584, -0.05670166, -0.037536621, - -0.017700195, 0.0022888184, 0.022033691, 0.04119873, - 0.059234619, 0.075805664, 0.090606689, 0.10324097, - 0.11346436, 0.12112427, 0.12594604, 0.12796021, - 0.12710571, 0.12335205, 0.11682129, 0.10772705, - 0.096191406, 0.082519531, 0.067077637, 0.050079346, - 0.031982422, 0.013244629, -0.0058898926, -0.024902344, - -0.043334961, -0.060882568, -0.077148438, -0.091674805, - -0.10430908, -0.11471558, -0.12261963, -0.12799072, - -0.13061523, -0.13043213, -0.12759399, -0.12203979, - -0.11392212, -0.10351562, -0.0909729, -0.076568604, - -0.060699463, -0.043640137, -0.025787354, -0.0075683594, - 0.010650635, 0.028503418, 0.045532227, 0.061431885, - 0.075836182, 0.088409424, 0.098968506, 0.10720825, - 0.11297607, 0.11621094, 0.11682129, 0.11471558, - 0.11010742, 0.10305786, 0.093658447, 0.082214355, - 0.068969727, 0.054138184, 0.038146973, 0.021331787, - 0.0039978027, -0.013397217, -0.030517578, -0.047027588, - -0.062469482, -0.076568604, -0.089080811, -0.099609375, - -0.10803223, -0.11419678, -0.1178894, -0.11907959, - -0.11779785, -0.11398315, -0.1078186, -0.099456787, - -0.089019775, -0.076751709, -0.063018799, -0.047973633, - -0.032073975, -0.015655518, 0.0010070801, 0.017456055, - 0.033355713, 0.048431396, 0.062286377, 0.074615479, - 0.085235596, 0.09387207, 0.10031128, 0.10449219, - 0.10629272, 0.10565186, 0.10272217, 0.097442627, - 0.089996338, 0.080566406, 0.069366455, 0.05657959, - 0.042633057, 0.027679443, 0.012115479, -0.003692627, - -0.01940918, -0.034759521, -0.049316406, -0.062835693, - -0.075012207, -0.085510254, -0.094238281, -0.10095215, - -0.10543823, -0.10775757, -0.10778809, -0.10552979, - -0.10107422, -0.094512939, -0.085968018, -0.075714111, - -0.063934326, -0.050842285, -0.036834717, -0.022125244, - -0.0070800781, 0.0079650879, 0.022705078, 0.036865234, - 0.050018311, 0.061981201, 0.072479248, 0.081268311, - 0.088165283, 0.093109131, 0.095855713, 0.096466064, - 0.094940186, 0.091247559, 0.085510254, 0.077911377, - 0.06854248, 0.057678223, 0.045593262, 0.032440186, - 0.018585205, 0.0043640137, -0.010009766, -0.024169922, - -0.037750244, -0.050567627, -0.062286377, -0.072631836, - -0.081451416, -0.088500977, -0.093658447, -0.096862793, - -0.097961426, -0.097015381, -0.094024658, -0.089080811, - -0.082275391, -0.073791504, -0.063812256, -0.052520752, - -0.040252686, -0.027191162, -0.013641357, 0, - 0.013580322, 0.026733398, 0.039154053, 0.050628662, - 0.060913086, 0.069702148, 0.076934814, 0.082366943, - 0.085906982, 0.087524414, 0.087158203, 0.08480835, - 0.080627441, 0.074615479, 0.066925049, 0.057800293, - 0.047393799, 0.035888672, 0.023651123, 0.010894775, - -0.0021362305, -0.015106201, -0.027740479, -0.039825439, - -0.050994873, -0.061096191, -0.069885254, -0.077148438, - -0.082763672, -0.086669922, -0.088684082, -0.088806152, - -0.087097168, -0.083526611, -0.07824707, -0.071350098, - -0.062957764, -0.053314209, -0.042633057, -0.031066895, - -0.018981934, -0.0065917969, 0.0058288574, 0.018035889, - 0.029693604, 0.040649414, 0.050628662, 0.059356689, - 0.066741943, 0.072570801, 0.076721191, 0.079162598, - 0.079772949, 0.078613281, 0.075714111, 0.071105957, - 0.064880371, 0.057281494, 0.048400879, 0.038421631, - 0.027618408, 0.016204834, 0.0043945312, -0.0074768066, - -0.019195557, -0.030548096, -0.041168213, -0.050964355, - -0.059661865, -0.067047119, -0.072998047, -0.077453613, - -0.080169678, -0.081237793, -0.080596924, -0.078216553, - -0.074249268, -0.068725586, -0.061767578, -0.05355835, - -0.044281006, -0.034088135, -0.023284912, -0.012084961, - -0.00067138672, 0.010650635, 0.021606445, 0.032043457, - 0.041687012, 0.050292969, 0.057769775, 0.063903809, - 0.06854248, 0.071655273, 0.073120117, 0.072937012, - 0.071166992, 0.067749023, 0.062835693, 0.056549072, - 0.048980713, 0.040313721, 0.030792236, 0.020568848, - 0.0098571777, -0.0010375977, -0.011932373, -0.022613525, - -0.032745361, -0.042236328, -0.050811768, -0.058288574, - -0.064544678, -0.069396973, -0.072784424, -0.074645996, - -0.074890137, -0.073547363, -0.070709229, -0.066375732, - -0.060638428, -0.05368042, -0.045593262, -0.036590576, - -0.026916504, -0.016693115, -0.0061950684, 0.0043334961, - 0.014709473, 0.024688721, 0.0340271, 0.042572021, - 0.050109863, 0.05645752, 0.061553955, 0.065246582, - 0.06741333, 0.068115234, 0.067260742, 0.064880371, - 0.061065674, 0.055908203, 0.049468994, 0.04196167, - 0.033508301, 0.024291992, 0.014556885, 0.004486084, - -0.0057067871, -0.015777588, -0.025512695, -0.034759521, - -0.043212891, -0.050750732, -0.057250977, -0.062469482, - -0.066375732, -0.068908691, -0.069915771, -0.069488525, - -0.067596436, -0.064239502, -0.05960083, -0.053710938, - -0.046691895, -0.038726807, -0.029998779, -0.020690918, - -0.011016846, -0.001159668, 0.0086364746, 0.018188477, - 0.027252197, 0.035675049, 0.043243408, 0.04977417, - 0.055175781, 0.059326172, 0.062103271, 0.063537598, - 0.063476562, 0.062011719, 0.059173584, 0.054992676, - 0.049591064, 0.043121338, 0.035675049, 0.027404785, - 0.018554688, 0.0092468262, -0.00024414062, - -0.0097351074, -0.019042969, -0.027954102, -0.036254883, - -0.043792725, -0.050415039, -0.055938721, -0.060272217, - -0.063323975, -0.065032959, -0.065368652, -0.064300537, - -0.061889648, -0.058197021, -0.053283691, -0.047241211, - -0.040283203, -0.032470703, -0.024017334, -0.015136719, - -0.0059814453, 0.0032653809, 0.012329102, 0.021087646, - 0.029327393, 0.036834717, 0.043487549, 0.049133301, - 0.053649902, 0.056945801, 0.058959961, 0.059631348, - 0.058990479, 0.057006836, 0.053741455, 0.049316406, - 0.043762207, 0.037231445, 0.029876709, 0.021881104, - 0.013366699, 0.0045471191, -0.0043640137, -0.013214111, - -0.021759033, -0.029876709, -0.037353516, -0.044006348, - -0.049743652, -0.054412842, -0.057922363, -0.060180664, - -0.061187744, -0.060913086, -0.059295654, -0.056488037, - -0.052459717, -0.047363281, -0.041290283, -0.034362793, - -0.026733398, -0.018615723, -0.010131836, -0.0014953613, - 0.0070800781, 0.01550293, 0.023498535, 0.030883789, - 0.037597656, 0.043426514, 0.048217773, 0.051940918, - 0.054473877, 0.055786133, 0.055847168, 0.054656982, - 0.052215576, 0.04864502, 0.04397583, 0.038330078, - 0.031829834, 0.024627686, 0.016845703, 0.0087280273, - 0.00039672852, -0.0079650879, -0.016143799, - -0.024017334, -0.03137207, -0.038024902, -0.043914795, - -0.048828125, -0.052703857, -0.055480957, -0.057067871, - -0.057434082, -0.05657959, -0.05456543, -0.051361084, - -0.047119141, -0.041900635, -0.035797119, -0.028961182, - -0.021575928, -0.013763428, -0.0057067871, 0.0023803711, - 0.010406494, 0.018127441, 0.025390625, 0.032073975, - 0.037994385, 0.043029785, 0.047088623, 0.050048828, - 0.0519104, 0.052581787, 0.052093506, 0.050415039, - 0.047637939, 0.043792725, 0.03894043, 0.03326416, - 0.026824951, 0.019775391, 0.012329102, 0.0045776367, - -0.0032958984, -0.011108398, -0.018676758, -0.025878906, - -0.032501221, -0.038421631, -0.043548584, -0.047729492, - -0.05090332, -0.053009033, -0.053955078, -0.053771973, - -0.052459717, -0.050018311, -0.046539307, -0.042114258, - -0.036773682, -0.030731201, -0.024047852, -0.016876221, - -0.0094299316, -0.0018005371, 0.0058288574, 0.013244629, - 0.020324707, 0.026916504, 0.032867432, 0.03805542, - 0.042388916, 0.04574585, 0.048034668, 0.049285889, - 0.049407959, 0.048400879, 0.046356201, 0.043243408, - 0.03918457, 0.034240723, 0.028533936, 0.022216797, - 0.015380859, 0.0082092285, 0.00082397461, -0.0065612793, - -0.013824463, -0.020812988, -0.02734375, -0.033294678, - -0.038543701, -0.042938232, -0.046478271, -0.048980713, - -0.050445557, -0.050842285, -0.050170898, -0.048431396, - -0.045684814, -0.041992188, -0.037384033, -0.032073975, - -0.026062012, -0.01953125, -0.012634277, -0.0055236816, - 0.0016784668, 0.0087890625, 0.015655518, 0.022125244, - 0.028076172, 0.033355713, 0.037902832, 0.041534424, - 0.044250488, 0.045959473, 0.046630859, 0.046264648, - 0.04486084, 0.042419434, 0.039093018, 0.034851074, - 0.029846191, 0.024200439, 0.018005371, 0.011383057, - 0.0045166016, -0.0024719238, -0.0093994141, - -0.016143799, -0.022521973, -0.0284729, -0.033752441, - -0.038360596, -0.042144775, -0.045013428, -0.046936035, - -0.047851562, -0.04776001, -0.046630859, -0.044555664, - -0.041534424, -0.037628174, -0.032989502, -0.027618408, - -0.021728516, -0.015411377, -0.0087585449, - -0.0020141602, 0.0047607422, 0.011383057, 0.017700195, - 0.023590088, 0.028930664, 0.033569336, 0.037475586, - 0.040527344, 0.042633057, 0.043792725, 0.04397583, - 0.043151855, 0.041381836, 0.038696289, 0.035125732, - 0.030792236, 0.025756836, 0.020172119, 0.014099121, - 0.0077514648, 0.0011901855, -0.0053710938, -0.01184082, - -0.018066406, -0.023925781, -0.02923584, -0.033966064, - -0.037963867, -0.041107178, -0.043426514, -0.044799805, - -0.045196533, -0.044677734, -0.043182373, -0.040802002, - -0.037567139, -0.033538818, -0.028808594, -0.023498535, - -0.017730713, -0.01159668, -0.005279541, 0.0011291504, - 0.0074768066, 0.013580322, 0.019378662, 0.024719238, - 0.02947998, 0.033538818, 0.036865234, 0.039306641, - 0.040893555, 0.041564941, 0.041290283, 0.040100098, - 0.038024902, 0.035064697, 0.031341553, 0.026947021, - 0.021942139, 0.016418457, 0.0105896, 0.0044555664, - -0.001739502, -0.0079345703, -0.013946533, -0.019683838, - -0.024963379, -0.029754639, -0.033905029, -0.03729248, - -0.039916992, -0.041687012, -0.042572021, -0.042541504, - -0.041625977, -0.039794922, -0.03717041, -0.033752441, - -0.029632568, -0.024902344, -0.019683838, -0.014038086, - -0.0081787109, -0.0021362305, 0.00390625, 0.0097961426, - 0.015472412, 0.020751953, 0.025512695, 0.029724121, - 0.033233643, 0.036010742, 0.037963867, 0.039031982, - 0.039245605, 0.038574219, 0.03704834, 0.034698486, - 0.031585693, 0.027740479, 0.02331543, 0.018341064, - 0.012969971, 0.0073242188, 0.0014953613, -0.0043640137, - -0.010162354, -0.015716553, -0.020965576, -0.025756836, - -0.029968262, -0.033569336, -0.036468506, -0.038543701, - -0.039825439, -0.040283203, -0.039825439, -0.038574219, - -0.036499023, -0.033630371, -0.030090332, -0.025939941, - -0.021240234, -0.016113281, -0.010681152, -0.0050354004, - 0.00067138672, 0.0063171387, 0.011810303, 0.016998291, - 0.021759033, 0.026031494, 0.029724121, 0.032684326, - 0.034942627, 0.036407471, 0.03704834, 0.036865234, - 0.035858154, 0.0340271, 0.031463623, 0.028198242, - 0.024291992, 0.019866943, 0.014984131, 0.0097961426, - 0.0043640137, -0.0011901855, -0.0066833496, - -0.012054443, -0.017181396, -0.021942139, -0.0262146, - -0.029937744, -0.03302002, -0.035400391, -0.037017822, - -0.037841797, -0.037872314, -0.037109375, -0.035552979, - -0.033233643, -0.03024292, -0.026611328, -0.02243042, - -0.017791748, -0.012817383, -0.0075683594, - -0.0022277832, 0.0031433105, 0.0084228516, 0.013458252, - 0.018188477, 0.022491455, 0.026245117, 0.029418945, - 0.031921387, 0.033691406, 0.034729004, 0.034973145, - 0.034423828, 0.033111572, 0.031066895, 0.028320312, - 0.024932861, 0.021026611, 0.01663208, 0.011871338, - 0.0068664551, 0.0016784668, -0.0035400391, - -0.0086669922, -0.013641357, -0.018310547, -0.022613525, - -0.026428223, -0.029632568, -0.032226562, -0.03414917, - -0.035339355, -0.035766602, -0.035430908, -0.034362793, - -0.032531738, -0.030059814, -0.026947021, -0.023284912, - -0.019134521, -0.014587402, -0.009765625, -0.0047912598, - 0.00030517578, 0.0053405762, 0.010192871, 0.014831543, - 0.019104004, 0.022918701, 0.0262146, 0.028930664, - 0.030944824, 0.032318115, 0.032928467, 0.032806396, - 0.031951904, 0.030395508, 0.028137207, 0.025268555, - 0.021850586, 0.017944336, 0.013641357, 0.0090332031, - 0.0042114258, -0.0007019043, -0.0056152344, - -0.010406494, -0.014953613, -0.019195557, -0.023040771, - -0.026367188, -0.029144287, -0.031280518, -0.032775879, - -0.033538818, -0.033630371, -0.032958984, -0.031646729, - -0.029632568, -0.027008057, -0.023803711, -0.020141602, - -0.016052246, -0.011627197, -0.007019043, -0.0022583008, - 0.0025024414, 0.0072021484, 0.011688232, 0.015899658, - 0.019744873, 0.023132324, 0.025970459, 0.02822876, - 0.029846191, 0.030792236, 0.031036377, 0.030609131, - 0.02947998, 0.027679443, 0.025299072, 0.022338867, - 0.018890381, 0.015045166, 0.01083374, 0.0063781738, - 0.0018005371, -0.0028381348, -0.0073852539, - -0.011810303, -0.015991211, -0.019805908, -0.023193359, - -0.026092529, -0.028442383, -0.030181885, -0.031280518, - -0.031677246, -0.031433105, -0.030517578, -0.028961182, - -0.026794434, -0.024078369, -0.020843506, -0.017181396, - -0.013183594, -0.0089416504, -0.0045166016, - -3.0517578e-05, 0.0044555664, 0.0087890625, 0.012908936, - 0.016723633, 0.020141602, 0.023071289, 0.025512695, - 0.02734375, 0.028564453, 0.029174805, 0.02911377, - 0.028381348, 0.027038574, 0.025085449, 0.022583008, - 0.019561768, 0.016143799, 0.012329102, 0.0082702637, - 0.0040283203, -0.00033569336, -0.0046691895, - -0.0089111328, -0.012969971, -0.01675415, -0.020172119, - -0.023162842, -0.025634766, -0.027557373, -0.028930664, - -0.029663086, -0.029754639, -0.02923584, -0.028076172, - -0.02633667, -0.024047852, -0.021240234, -0.018005371, - -0.014434814, -0.010528564, -0.006439209, -0.0022583008, - 0.0019836426, 0.0061340332, 0.010101318, 0.01385498, - 0.017272949, 0.020294189, 0.022857666, 0.024871826, - 0.02633667, 0.02722168, 0.027496338, 0.027130127, - 0.026184082, 0.024658203, 0.02255249, 0.019989014, - 0.016967773, 0.013549805, 0.0098571777, 0.0059509277, - 0.0018920898, -0.0021972656, -0.0062561035, - -0.010162354, -0.01385498, -0.017272949, -0.020294189, - -0.022888184, -0.024993896, -0.026550293, -0.027557373, - -0.027954102, -0.027770996, -0.027008057, -0.025665283, - -0.023773193, -0.021392822, -0.018585205, -0.015380859, - -0.01184082, -0.0080871582, -0.0042114258, - -0.00021362305, 0.0037231445, 0.0075378418, 0.011199951, - 0.014587402, 0.01763916, 0.020263672, 0.02243042, - 0.024108887, 0.025238037, 0.025756836, 0.025756836, - 0.025146484, 0.023986816, 0.02230835, 0.020141602, - 0.017486572, 0.01449585, 0.011169434, 0.0075683594, - 0.0038146973, 0, -0.0038452148, -0.007598877, - -0.011169434, -0.014526367, -0.017578125, -0.020233154, - -0.022460938, -0.024200439, -0.025421143, -0.026123047, - -0.026245117, -0.025787354, -0.024810791, -0.02331543, - -0.021331787, -0.018890381, -0.016052246, -0.012908936, - -0.0094909668, -0.0058898926, -0.0021972656, - 0.0015258789, 0.0051879883, 0.0087280273, 0.012054443, - 0.015075684, 0.01776123, 0.020019531, 0.021850586, - 0.023193359, 0.023986816, 0.024261475, 0.023986816, - 0.023162842, 0.021850586, 0.020050049, 0.017791748, - 0.015136719, 0.012176514, 0.0089111328, 0.0054931641, - 0.0019226074, -0.0016784668, -0.0052490234, - -0.0087280273, -0.011993408, -0.014984131, -0.017700195, - -0.019989014, -0.021881104, -0.023284912, -0.024200439, - -0.024597168, -0.024475098, -0.023834229, -0.022674561, - -0.021026611, -0.018981934, -0.01651001, -0.013702393, - -0.010620117, -0.0073242188, -0.00390625, - -0.00042724609, 0.0030517578, 0.006439209, 0.0096740723, - 0.012664795, 0.015350342, 0.017700195, 0.019622803, - 0.021118164, 0.022125244, 0.022644043, 0.022674561, - 0.022155762, 0.021179199, 0.019714355, 0.017822266, - 0.015563965, 0.012908936, 0.010009766, 0.0068664551, - 0.0036010742, 0.00021362305, -0.0031433105, - -0.0064697266, -0.0096130371, -0.012573242, - -0.015258789, -0.01763916, -0.019592285, -0.021148682, - -0.022277832, -0.022888184, -0.023040771, -0.022674561, - -0.021850586, -0.020568848, -0.018829346, -0.016723633, - -0.014251709, -0.011505127, -0.0085144043, - -0.0053710938, -0.0021362305, 0.001159668, 0.0043640137, - 0.0074768066, 0.010406494, 0.013061523, 0.015441895, - 0.017456055, 0.019073486, 0.020263672, 0.020996094, - 0.021270752, 0.021057129, 0.020385742, 0.019226074, - 0.017669678, 0.01574707, 0.013427734, 0.01083374, - 0.008026123, 0.0050048828, 0.0018920898, -0.0012512207, - -0.0043945312, -0.0074462891, -0.010314941, - -0.012969971, -0.015350342, -0.01739502, -0.019073486, - -0.020324707, -0.021148682, -0.021514893, -0.02142334, - -0.020874023, -0.019897461, -0.018493652, -0.016723633, - -0.014587402, -0.012145996, -0.0094604492, - -0.0065917969, -0.0036010742, -0.00054931641, - 0.0025024414, 0.0054626465, 0.0083007812, 0.010925293, - 0.013305664, 0.015380859, 0.017089844, 0.0184021, - 0.019317627, 0.019805908, 0.019836426, 0.019439697, - 0.018585205, 0.017333984, 0.015716553, 0.01373291, - 0.011444092, 0.0089111328, 0.0061950684, 0.003326416, - 0.00039672852, -0.0025634766, -0.0054321289, - -0.0082092285, -0.010803223, -0.013183594, -0.015258789, - -0.016998291, -0.018371582, -0.019378662, -0.019958496, - -0.020080566, -0.019805908, -0.019104004, -0.018005371, - -0.01651001, -0.014709473, -0.012573242, -0.010162354, - -0.007598877, -0.0048522949, -0.0020141602, - 0.00082397461, 0.0036315918, 0.0063476562, 0.0089111328, - 0.011260986, 0.013336182, 0.015106201, 0.016571045, - 0.017608643, 0.018280029, 0.01852417, 0.018371582, - 0.017791748, 0.016845703, 0.01550293, 0.013824463, - 0.01184082, 0.0096130371, 0.0071411133, 0.0045471191, - 0.0018310547, -0.00091552734, -0.0036315918, - -0.0062866211, -0.0087890625, -0.011108398, - -0.013214111, -0.015014648, -0.016479492, -0.017578125, - -0.018341064, -0.018676758, -0.018615723, -0.018188477, - -0.017333984, -0.016143799, -0.01461792, -0.012786865, - -0.010681152, -0.0083618164, -0.005859375, - -0.0032958984, -0.00064086914, 0.0020141602, - 0.0045776367, 0.0070495605, 0.0093383789, 0.011413574, - 0.013214111, 0.01473999, 0.015899658, 0.016723633, - 0.017150879, 0.017211914, 0.016876221, 0.016174316, - 0.015106201, 0.01373291, 0.012023926, 0.010070801, - 0.0078735352, 0.0055236816, 0.0030517578, 0.00051879883, - -0.0020446777, -0.0045471191, -0.0069580078, - -0.0092163086, -0.011260986, -0.013061523, -0.014587402, - -0.015808105, -0.016693115, -0.017211914, -0.017364502, - -0.017150879, -0.016540527, -0.015625, -0.014343262, - -0.012786865, -0.010955811, -0.0089111328, - -0.0066833496, -0.0043334961, -0.0018920898, - 0.00057983398, 0.0029907227, 0.0053405762, 0.0075683594, - 0.0096130371, 0.011413574, 0.012969971, 0.014221191, - 0.015167236, 0.01574707, 0.015991211, 0.015869141, - 0.015411377, 0.014587402, 0.013458252, 0.012023926, - 0.010345459, 0.0084228516, 0.0063171387, 0.0040588379, - 0.001739502, -0.00061035156, -0.0029602051, - -0.0052490234, -0.0074157715, -0.0094299316, - -0.011230469, -0.012786865, -0.014068604, -0.015045166, - -0.015716553, -0.016021729, -0.015991211, -0.015655518, - -0.014953613, -0.013946533, -0.012634277, -0.011077881, - -0.0092773438, -0.0072937012, -0.0051574707, - -0.0029602051, -0.00067138672, 0.0015869141, - 0.0038146973, 0.0059204102, 0.0079040527, 0.0097045898, - 0.011260986, 0.012573242, 0.01361084, 0.014312744, - 0.014709473, 0.014770508, 0.01449585, 0.013916016, - 0.013031006, 0.01184082, 0.010406494, 0.0087585449, - 0.0068969727, 0.0048828125, 0.0027770996, 0.00061035156, - -0.0015869141, -0.0037231445, -0.0057983398, - -0.0077514648, -0.0094909668, -0.011077881, - -0.012390137, -0.013427734, -0.014221191, -0.014678955, - -0.014801025, -0.014648438, -0.014160156, -0.013366699, - -0.012329102, -0.010986328, -0.0094604492, - -0.0077209473, -0.0058288574, -0.0038146973, - -0.001739502, 0.00036621094, 0.0024414062, 0.0044250488, - 0.0063476562, 0.0080871582, 0.0096435547, 0.010986328, - 0.012054443, 0.0128479, 0.013397217, 0.01361084, - 0.013519287, 0.013153076, 0.012481689, 0.011505127, - 0.010314941, 0.0088806152, 0.0072631836, 0.0054931641, - 0.0036010742, 0.0016174316, -0.00039672852, - -0.0023803711, -0.0043334961, -0.0061645508, - -0.0079040527, -0.0094299316, -0.010772705, - -0.011871338, -0.01272583, -0.013275146, -0.013580322, - -0.013580322, -0.013275146, -0.012695312, -0.011871338, - -0.010772705, -0.0094604492, -0.0079650879, - -0.0062866211, -0.004486084, -0.0026245117, - -0.0007019043, 0.0012207031, 0.003112793, 0.0049133301, - 0.0065917969, 0.0080871582, 0.0094299316, 0.010559082, - 0.011413574, 0.012054443, 0.012390137, 0.012451172, - 0.012268066, 0.011779785, 0.011047363, 0.010070801, - 0.0088500977, 0.0074768066, 0.0059204102, 0.0042114258, - 0.0024414062, 0.00061035156, -0.0012207031, - -0.0030212402, -0.0047607422, -0.0064086914, - -0.0079040527, -0.0092163086, -0.010345459, - -0.011260986, -0.011901855, -0.012298584, -0.012451172, - -0.012298584, -0.011901855, -0.011260986, -0.010406494, - -0.0093078613, -0.008026123, -0.0065612793, - -0.0049743652, -0.0032958984, -0.0015563965, - 0.00018310547, 0.0019226074, 0.0036010742, 0.0052185059, - 0.0066833496, 0.0079956055, 0.0091247559, 0.010040283, - 0.01071167, 0.011169434, 0.011352539, 0.011322021, - 0.010986328, 0.010437012, 0.0096740723, 0.0086669922, - 0.0075073242, 0.0061645508, 0.0046691895, 0.003112793, - 0.0014648438, -0.00021362305, -0.0018920898, - -0.0035095215, -0.0050354004, -0.0064697266, - -0.0077514648, -0.0088806152, -0.0098266602, - -0.010528564, -0.011016846, -0.011260986, -0.011260986, - -0.011047363, -0.0105896, -0.0098876953, -0.0090026855, - -0.0079040527, -0.0066833496, -0.005279541, - -0.0038146973, -0.0022583008, -0.00067138672, - 0.00091552734, 0.0024719238, 0.0039672852, 0.0053710938, - 0.0066223145, 0.0077514648, 0.0086669922, 0.0093994141, - 0.0099182129, 0.010223389, 0.010314941, 0.010131836, - 0.009765625, 0.0091552734, 0.0083618164, 0.0073852539, - 0.0062255859, 0.0049438477, 0.0035705566, 0.0021057129, - 0.00061035156, -0.00088500977, -0.0023803711, - -0.0038146973, -0.0051574707, -0.0064086914, - -0.0075073242, -0.0084228516, -0.009185791, - -0.0097351074, -0.010070801, -0.010192871, -0.010101318, - -0.0097961426, -0.0092773438, -0.0085449219, - -0.0076599121, -0.0066223145, -0.0054321289, - -0.0041503906, -0.0027770996, -0.001373291, - 6.1035156e-05, 0.0014953613, 0.0028686523, 0.0041809082, - 0.0053710938, 0.006439209, 0.0073852539, 0.0081481934, - 0.0086975098, 0.0090942383, 0.0092468262, 0.0092163086, - 0.008972168, 0.0085449219, 0.0079040527, 0.0071105957, - 0.0061645508, 0.005065918, 0.0038757324, 0.0025939941, - 0.0012817383, -9.1552734e-05, -0.0014343262, - -0.002746582, -0.0039978027, -0.0051574707, - -0.0062255859, -0.0071105957, -0.0078735352, - -0.0084533691, -0.0088806152, -0.0090637207, - -0.0090942383, -0.0089111328, -0.0085449219, - -0.0079956055, -0.0072937012, -0.006439209, - -0.0054321289, -0.0043334961, -0.0031433105, - -0.0018920898, -0.00061035156, 0.00067138672, - 0.0019226074, 0.003112793, 0.0042419434, 0.0052490234, - 0.0061645508, 0.0069274902, 0.0075073242, 0.0079345703, - 0.0081787109, 0.0082397461, 0.0081176758, 0.0078125, - 0.0073547363, 0.0067138672, 0.0059509277, 0.0050354004, - 0.0040283203, 0.0029296875, 0.0017700195, 0.00057983398, - -0.00064086914, -0.0018310547, -0.0029602051, - -0.0040283203, -0.0050354004, -0.0058898926, - -0.006652832, -0.007232666, -0.0076904297, - -0.0079650879, -0.0080566406, -0.0079956055, - -0.0077514648, -0.0073547363, -0.0068054199, - -0.0061035156, -0.005279541, -0.0043334961, - -0.003326416, -0.0022583008, -0.0011291504, 0, - 0.0010986328, 0.0021972656, 0.0032348633, 0.0041809082, - 0.0050354004, 0.0057678223, 0.0063476562, 0.0068054199, - 0.0071105957, 0.007232666, 0.007232666, 0.0070495605, - 0.0067138672, 0.0062255859, 0.0056152344, 0.0048522949, - 0.0040283203, 0.0030822754, 0.0021057129, 0.0010681152, - 0, -0.0010375977, -0.0020751953, -0.0030517578, - -0.0039367676, -0.0047607422, -0.0054626465, - -0.006072998, -0.0065307617, -0.0068359375, - -0.007019043, -0.007019043, -0.0068969727, - -0.0066223145, -0.0061950684, -0.005645752, - -0.0049743652, -0.0042114258, -0.0033874512, - -0.0024719238, -0.0014953613, -0.00051879883, - 0.00045776367, 0.0014038086, 0.0023193359, 0.0032043457, - 0.0039672852, 0.0046691895, 0.0052490234, 0.0057067871, - 0.0060424805, 0.0062255859, 0.0062866211, 0.0061950684, - 0.0059814453, 0.0056152344, 0.0051269531, 0.0045471191, - 0.0038757324, 0.003112793, 0.0022888184, 0.0014038086, - 0.00048828125, -0.00042724609, -0.0013122559, - -0.002166748, -0.0029907227, -0.0037231445, - -0.0043945312, -0.0049438477, -0.0054016113, - -0.0057373047, -0.0059509277, -0.0060424805, - -0.0059814453, -0.0057983398, -0.0054931641, - -0.0050964355, -0.0045776367, -0.0039672852, - -0.0032653809, -0.002532959, -0.001739502, - -0.00088500977, -6.1035156e-05, 0.00076293945, - 0.0015869141, 0.0023498535, 0.0030517578, 0.0036621094, - 0.0042114258, 0.0046386719, 0.0050048828, 0.0052185059, - 0.0053100586, 0.0053100586, 0.0051879883, 0.0049133301, - 0.0045776367, 0.004119873, 0.0036010742, 0.0029602051, - 0.0022888184, 0.0015869141, 0.00082397461, - 6.1035156e-05, -0.0007019043, -0.0014343262, - -0.002166748, -0.0028076172, -0.0033874512, -0.00390625, - -0.0043334961, -0.0046691895, -0.0049133301, - -0.0050354004, -0.0050354004, -0.0049438477, - -0.0047302246, -0.0044555664, -0.0040588379, - -0.0035705566, -0.0030517578, -0.0024414062, - -0.0018005371, -0.0010986328, -0.00042724609, - 0.0002746582, 0.00094604492, 0.0016174316, 0.0022277832, - 0.0027770996, 0.0032653809, 0.0036621094, 0.0039978027, - 0.0042114258, 0.0043334961, 0.0043945312, 0.0043334961, - 0.0041809082, 0.0039367676, 0.0036010742, 0.0031738281, - 0.0027160645, 0.002166748, 0.0016174316, 0.0010070801, - 0.00039672852, -0.00024414062, -0.00085449219, - -0.0014343262, -0.0020141602, -0.0025024414, - -0.0029602051, -0.0033569336, -0.0036621094, - -0.0038757324, -0.0040283203, -0.0040588379, - -0.0040283203, -0.00390625, -0.0037231445, - -0.0034484863, -0.0030822754, -0.0026855469, - -0.0022277832, -0.0017089844, -0.0011901855, - -0.00064086914, -6.1035156e-05, 0.00048828125, - 0.0010070801, 0.0014953613, 0.0019836426, 0.0023803711, - 0.002746582, 0.0030212402, 0.0032348633, 0.0033874512, - 0.0034484863, 0.0034484863, 0.0033569336, 0.0032043457, - 0.0029602051, 0.0026855469, 0.0023193359, 0.0019226074, - 0.0014953613, 0.0010375977, 0.00054931641, - 6.1035156e-05, -0.00039672852, -0.00088500977, - -0.0013122559, -0.001739502, -0.0021057129, - -0.0024108887, -0.0026855469, -0.0028991699, - -0.0030212402, -0.003112793, -0.003112793, - -0.0030517578, -0.0029296875, -0.0027160645, - -0.0025024414, -0.0021972656, -0.0018615723, - -0.0014953613, -0.0010986328, -0.0007019043, - -0.0002746582, 0.00015258789, 0.00054931641, - 0.00094604492, 0.0012817383, 0.0016174316, 0.0018920898, - 0.0021362305, 0.0023193359, 0.0024414062, 0.002532959, - 0.002532959, 0.0025024414, 0.0024108887, 0.0022583008, - 0.0020751953, 0.0018310547, 0.0015563965, 0.0012512207, - 0.00091552734, 0.00057983398, 0.00024414062, - -0.00012207031, -0.00045776367, -0.00076293945, - -0.0010681152, -0.0013427734, -0.0015869141, - -0.0018005371, -0.001953125, -0.0020751953, - -0.0021362305, -0.002166748, -0.0021362305, - -0.0020751953, -0.001953125, -0.0018005371, - -0.0016174316, -0.0014038086, -0.001159668, - -0.00088500977, -0.00061035156, -0.00033569336, - -6.1035156e-05, 0.00021362305, 0.00048828125, - 0.00073242188, 0.00094604492, 0.001159668, 0.0013122559, - 0.0014648438, 0.0015563965, 0.0016174316, 0.0016479492, - 0.0016174316, 0.0015563965, 0.0014953613, 0.001373291, - 0.0012207031, 0.0010681152, 0.00088500977, - 0.00067138672, 0.00045776367, 0.0002746582, - 6.1035156e-05, -0.00015258789, -0.00036621094, - -0.00054931641, -0.0007019043, -0.00085449219, - -0.0009765625, -0.0010986328, -0.001159668, - -0.0012207031, -0.0012207031, -0.0012207031, - -0.0011901855, -0.0011291504, -0.0010375977, - -0.00094604492, -0.00082397461, -0.00067138672, - -0.00054931641, -0.00039672852, -0.00024414062, - -9.1552734e-05, 3.0517578e-05, 0.00018310547, - 0.00030517578, 0.00042724609, 0.00051879883, - 0.00057983398, 0.00064086914, 0.0007019043, - 0.00073242188, 0.00073242188, 0.00073242188, - 0.0007019043, 0.00067138672, 0.00061035156, - 0.00054931641, 0.00045776367, 0.00039672852, - 0.00030517578, 0.00021362305, 0.00015258789, - 6.1035156e-05, -3.0517578e-05, -9.1552734e-05, - -0.00015258789, -0.00021362305, -0.00024414062, - -0.0002746582, -0.00030517578, -0.00030517578, - -0.00030517578, -0.00030517578, -0.0002746582, - -0.0002746582, -0.00024414062, -0.00021362305, - -0.00018310547, -0.00015258789, -9.1552734e-05, - -9.1552734e-05, -6.1035156e-05, -3.0517578e-05, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -}; - -const nframes_t Session::default_click_length = sizeof (default_click) / sizeof (default_click[0]); diff --git a/libs/ardour/directory_names.cc b/libs/ardour/directory_names.cc deleted file mode 100644 index 2b6dfcbb39..0000000000 --- a/libs/ardour/directory_names.cc +++ /dev/null @@ -1,19 +0,0 @@ -#include - -#include "i18n.h" - -namespace ARDOUR { - -const char* const old_sound_dir_name = X_("sounds"); -const char* const sound_dir_name = X_("audiofiles"); -const char* const midi_dir_name = X_("midifiles"); -const char* const peak_dir_name = X_("peaks"); -const char* const dead_sound_dir_name = X_("dead_sounds"); -const char* const dead_midi_dir_name = X_("dead_midi"); -const char* const interchange_dir_name = X_("interchange"); -const char* const export_dir_name = X_("export"); -const char* const templates_dir_name = X_("templates"); -const char* const surfaces_dir_name = X_("surfaces"); -const char* const user_config_dir_name = X_(".ardour3"); - -} diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc deleted file mode 100644 index 9665176a67..0000000000 --- a/libs/ardour/diskstream.cc +++ /dev/null @@ -1,411 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -/* XXX This goes uninitialized when there is no ~/.ardour3 directory. - * I can't figure out why, so this will do for now (just stole the - * default from configuration_vars.h). 0 is not a good value for - * allocating buffer sizes.. - */ -ARDOUR::nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256; - -sigc::signal Diskstream::DiskOverrun; -sigc::signal Diskstream::DiskUnderrun; - -Diskstream::Diskstream (Session &sess, const string &name, Flag flag) - : SessionObject(sess, name) -{ - init (flag); -} - -Diskstream::Diskstream (Session& sess, const XMLNode& node) - : SessionObject(sess, "unnamed diskstream") -{ - init (Recordable); -} - -void -Diskstream::init (Flag f) -{ - _flags = f; - _io = 0; - _alignment_style = ExistingMaterial; - _persistent_alignment_style = ExistingMaterial; - first_input_change = true; - i_am_the_modifier = 0; - g_atomic_int_set (&_record_enabled, 0); - was_recording = false; - capture_start_frame = 0; - capture_captured = 0; - _visible_speed = 1.0f; - _actual_speed = 1.0f; - _buffer_reallocation_required = false; - _seek_required = false; - first_recordable_frame = max_frames; - last_recordable_frame = max_frames; - _roll_delay = 0; - _capture_offset = 0; - _processed = false; - _slaved = false; - adjust_capture_position = 0; - last_possibly_recording = 0; - loop_location = 0; - wrap_buffer_size = 0; - speed_buffer_size = 0; - last_phase = 0; - phi = (uint64_t) (0x1000000); - target_phi = phi; - file_frame = 0; - playback_sample = 0; - playback_distance = 0; - _read_data_count = 0; - _write_data_count = 0; - commit_should_unlock = false; - - pending_overwrite = false; - overwrite_frame = 0; - overwrite_queued = false; - input_change_pending = NoChange; -} - -Diskstream::~Diskstream () -{ - if (_playlist) - _playlist->release (); -} - -void -Diskstream::set_io (IO& io) -{ - _io = &io; - set_align_style_from_io (); -} - -void -Diskstream::handle_input_change (IOChange change, void *src) -{ - Glib::Mutex::Lock lm (state_lock); - - if (!(input_change_pending & change)) { - input_change_pending = IOChange (input_change_pending|change); - _session.request_input_change_handling (); - } -} - -void -Diskstream::non_realtime_set_speed () -{ - if (_buffer_reallocation_required) - { - Glib::Mutex::Lock lm (state_lock); - allocate_temporary_buffers (); - - _buffer_reallocation_required = false; - } - - if (_seek_required) { - if (speed() != 1.0f || speed() != -1.0f) { - seek ((nframes_t) (_session.transport_frame() * (double) speed()), true); - } - else { - seek (_session.transport_frame(), true); - } - - _seek_required = false; - } -} - -bool -Diskstream::realtime_set_speed (double sp, bool global) -{ - bool changed = false; - double new_speed = sp * _session.transport_speed(); - - if (_visible_speed != sp) { - _visible_speed = sp; - changed = true; - } - - if (new_speed != _actual_speed) { - - nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() * - fabs (new_speed)) + 1; - - if (required_wrap_size > wrap_buffer_size) { - _buffer_reallocation_required = true; - } - - _actual_speed = new_speed; - target_phi = (uint64_t) (0x1000000 * fabs(_actual_speed)); - } - - if (changed) { - if (!global) { - _seek_required = true; - } - SpeedChanged (); /* EMIT SIGNAL */ - } - - return _buffer_reallocation_required || _seek_required; -} - -void -Diskstream::prepare () -{ - _processed = false; - playback_distance = 0; -} - -void -Diskstream::recover () -{ - if (commit_should_unlock) { - state_lock.unlock(); - } - _processed = false; -} - -void -Diskstream::set_capture_offset () -{ - if (_io == 0) { - /* can't capture, so forget it */ - return; - } - - _capture_offset = _io->input_latency(); -} - -void -Diskstream::set_align_style (AlignStyle a) -{ - if (record_enabled() && _session.actively_recording()) { - return; - } - - if (a != _alignment_style) { - _alignment_style = a; - AlignmentStyleChanged (); - } -} - -int -Diskstream::set_loop (Location *location) -{ - if (location) { - if (location->start() >= location->end()) { - error << string_compose(_("Location \"%1\" not valid for track loop (start >= end)"), location->name()) << endl; - return -1; - } - } - - loop_location = location; - - LoopSet (location); /* EMIT SIGNAL */ - return 0; -} - -ARDOUR::nframes_t -Diskstream::get_capture_start_frame (uint32_t n) -{ - Glib::Mutex::Lock lm (capture_info_lock); - - if (capture_info.size() > n) { - return capture_info[n]->start; - } - else { - return capture_start_frame; - } -} - -ARDOUR::nframes_t -Diskstream::get_captured_frames (uint32_t n) -{ - Glib::Mutex::Lock lm (capture_info_lock); - - if (capture_info.size() > n) { - return capture_info[n]->frames; - } - else { - return capture_captured; - } -} - -void -Diskstream::set_roll_delay (ARDOUR::nframes_t nframes) -{ - _roll_delay = nframes; -} - -void -Diskstream::set_speed (double sp) -{ - _session.request_diskstream_speed (*this, sp); - - /* to force a rebuffering at the right place */ - playlist_modified(); -} - -int -Diskstream::use_playlist (boost::shared_ptr playlist) -{ - { - Glib::Mutex::Lock lm (state_lock); - - if (playlist == _playlist) { - return 0; - } - - plmod_connection.disconnect (); - plgone_connection.disconnect (); - - if (_playlist) { - _playlist->release(); - } - - _playlist = playlist; - _playlist->use(); - - if (!in_set_state && recordable()) { - reset_write_sources (false); - } - - plmod_connection = _playlist->Modified.connect (mem_fun (*this, &Diskstream::playlist_modified)); - plgone_connection = _playlist->GoingAway.connect (bind (mem_fun (*this, &Diskstream::playlist_deleted), boost::weak_ptr(_playlist))); - } - - /* don't do this if we've already asked for it *or* if we are setting up - the diskstream for the very first time - the input changed handling will - take care of the buffer refill. - */ - - if (!overwrite_queued && !(_session.state_of_the_state() & Session::CannotSave)) { - _session.request_overwrite_buffer (this); - overwrite_queued = true; - } - - PlaylistChanged (); /* EMIT SIGNAL */ - _session.set_dirty (); - - return 0; -} - -void -Diskstream::playlist_changed (Change ignored) -{ - playlist_modified (); -} - -void -Diskstream::playlist_modified () -{ - if (!i_am_the_modifier && !overwrite_queued) { - _session.request_overwrite_buffer (this); - overwrite_queued = true; - } -} - -void -Diskstream::playlist_deleted (boost::weak_ptr wpl) -{ - boost::shared_ptr pl (wpl.lock()); - - if (pl == _playlist) { - - /* this catches an ordering issue with session destruction. playlists - are destroyed before diskstreams. we have to invalidate any handles - we have to the playlist. - */ - - if (_playlist) { - _playlist.reset (); - } - } -} - -bool -Diskstream::set_name (const string& str) -{ - if (str != _name) { - assert(playlist()); - playlist()->set_name (str); - - SessionObject::set_name(str); - - if (!in_set_state && recordable()) { - /* rename existing capture files so that they have the correct name */ - return rename_write_sources (); - } else { - return false; - } - } - - return true; -} - -void -Diskstream::remove_region_from_last_capture (boost::weak_ptr wregion) -{ - boost::shared_ptr region (wregion.lock()); - - if (!region) { - return; - } - - _last_capture_regions.remove (region); -} - diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc deleted file mode 100644 index 71b699396b..0000000000 --- a/libs/ardour/enums.cc +++ /dev/null @@ -1,388 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace PBD; -using namespace ARDOUR; - -void -setup_enum_writer () -{ - EnumWriter* enum_writer = new EnumWriter(); - vector i; - vector s; - - OverlapType _OverlapType; - AlignStyle _AlignStyle; - MeterPoint _MeterPoint; - TrackMode _TrackMode; - NoteMode _NoteMode; - ChannelMode _ChannelMode; - MeterFalloff _MeterFalloff; - MeterHold _MeterHold; - EditMode _EditMode; - RegionPoint _RegionPoint; - Placement _Placement; - MonitorModel _MonitorModel; - RemoteModel _RemoteModel; - DenormalModel _DenormalModel; - CrossfadeModel _CrossfadeModel; - LayerModel _LayerModel; - SoloModel _SoloModel; - SampleFormat _SampleFormat; - HeaderFormat _HeaderFormat; - PluginType _PluginType; - SlaveSource _SlaveSource; - ShuttleBehaviour _ShuttleBehaviour; - ShuttleUnits _ShuttleUnits; - mute_type _mute_type; - Session::RecordState _Session_RecordState; - Session::Event::Type _Session_Event_Type; - SmpteFormat _Session_SmpteFormat; - Session::PullupFormat _Session_PullupFormat; - AudioRegion::FadeShape _AudioRegion_FadeShape; - Panner::LinkDirection _Panner_LinkDirection; - IOChange _IOChange; - AutomationType _AutomationType; - AutoState _AutoState; - AutoStyle _AutoStyle; - AutoConnectOption _AutoConnectOption; - Session::StateOfTheState _Session_StateOfTheState; - Route::Flag _Route_Flag; - AudioFileSource::Flag _AudioFileSource_Flag; - Diskstream::Flag _Diskstream_Flag; - Location::Flags _Location_Flags; - RouteGroup::Flag _RouteGroup_Flag; - Region::Flag _Region_Flag; - Region::PositionLockStyle _Region_PositionLockStyle; - Track::FreezeState _Track_FreezeState; - AutomationList::InterpolationStyle _AutomationList_InterpolationStyle; - -#define REGISTER(e) enum_writer->register_distinct (typeid(e).name(), i, s); i.clear(); s.clear() -#define REGISTER_BITS(e) enum_writer->register_bits (typeid(e).name(), i, s); i.clear(); s.clear() -#define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e) -#define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e) - - REGISTER_ENUM (NoChange); - REGISTER_ENUM (ConfigurationChanged); - REGISTER_ENUM (ConnectionsChanged); - REGISTER_BITS (_IOChange); - - REGISTER_ENUM (OverlapNone); - REGISTER_ENUM (OverlapInternal); - REGISTER_ENUM (OverlapStart); - REGISTER_ENUM (OverlapEnd); - REGISTER_ENUM (OverlapExternal); - REGISTER (_OverlapType); - - REGISTER_ENUM (GainAutomation); - REGISTER_ENUM (PanAutomation); - REGISTER_ENUM (PluginAutomation); - REGISTER_ENUM (SoloAutomation); - REGISTER_ENUM (MuteAutomation); - REGISTER_ENUM (MidiCCAutomation); - REGISTER_ENUM (FadeInAutomation); - REGISTER_ENUM (FadeOutAutomation); - REGISTER_ENUM (EnvelopeAutomation); - REGISTER_BITS (_AutomationType); - - REGISTER_ENUM (Off); - REGISTER_ENUM (Write); - REGISTER_ENUM (Touch); - REGISTER_ENUM (Play); - REGISTER_BITS (_AutoState); - - REGISTER_ENUM (Absolute); - REGISTER_ENUM (Trim); - REGISTER_BITS (_AutoStyle); - - REGISTER_ENUM (CaptureTime); - REGISTER_ENUM (ExistingMaterial); - REGISTER (_AlignStyle); - - REGISTER_ENUM (MeterInput); - REGISTER_ENUM (MeterPreFader); - REGISTER_ENUM (MeterPostFader); - REGISTER (_MeterPoint); - - REGISTER_ENUM (Normal); - REGISTER_ENUM (Destructive); - REGISTER (_TrackMode); - - REGISTER_ENUM (Sustained); - REGISTER_ENUM (Percussive); - REGISTER (_NoteMode); - - REGISTER_ENUM (AllChannels); - REGISTER_ENUM (FilterChannels); - REGISTER_ENUM (ForceChannel); - REGISTER (_ChannelMode); - - REGISTER_ENUM (MeterFalloffOff); - REGISTER_ENUM (MeterFalloffSlowest); - REGISTER_ENUM (MeterFalloffSlow); - REGISTER_ENUM (MeterFalloffMedium); - REGISTER_ENUM (MeterFalloffFast); - REGISTER_ENUM (MeterFalloffFaster); - REGISTER_ENUM (MeterFalloffFastest); - REGISTER (_MeterFalloff); - - REGISTER_ENUM (MeterHoldOff); - REGISTER_ENUM (MeterHoldShort); - REGISTER_ENUM (MeterHoldMedium); - REGISTER_ENUM (MeterHoldLong); - REGISTER (_MeterHold); - - REGISTER_ENUM (Slide); - REGISTER_ENUM (Splice); - REGISTER (_EditMode); - - REGISTER_ENUM (Start); - REGISTER_ENUM (End); - REGISTER_ENUM (SyncPoint); - REGISTER (_RegionPoint); - - REGISTER_ENUM (PreFader); - REGISTER_ENUM (PostFader); - REGISTER (_Placement); - - REGISTER_ENUM (HardwareMonitoring); - REGISTER_ENUM (SoftwareMonitoring); - REGISTER_ENUM (ExternalMonitoring); - REGISTER (_MonitorModel); - - REGISTER_ENUM (DenormalNone); - REGISTER_ENUM (DenormalFTZ); - REGISTER_ENUM (DenormalDAZ); - REGISTER_ENUM (DenormalFTZDAZ); - REGISTER (_DenormalModel); - - REGISTER_ENUM (UserOrdered); - REGISTER_ENUM (MixerOrdered); - REGISTER_ENUM (EditorOrdered); - REGISTER (_RemoteModel); - - REGISTER_ENUM (FullCrossfade); - REGISTER_ENUM (ShortCrossfade); - REGISTER (_CrossfadeModel); - - REGISTER_ENUM (LaterHigher); - REGISTER_ENUM (MoveAddHigher); - REGISTER_ENUM (AddHigher); - REGISTER (_LayerModel); - - REGISTER_ENUM (InverseMute); - REGISTER_ENUM (SoloBus); - REGISTER (_SoloModel); - - REGISTER_ENUM (AutoConnectPhysical); - REGISTER_ENUM (AutoConnectMaster); - REGISTER_BITS (_AutoConnectOption); - - REGISTER_ENUM (FormatFloat); - REGISTER_ENUM (FormatInt24); - REGISTER_ENUM (FormatInt16); - REGISTER (_SampleFormat); - - REGISTER_ENUM (BWF); - REGISTER_ENUM (WAVE); - REGISTER_ENUM (WAVE64); - REGISTER_ENUM (CAF); - REGISTER_ENUM (AIFF); - REGISTER_ENUM (iXML); - REGISTER_ENUM (RF64); - REGISTER (_HeaderFormat); - - REGISTER_ENUM (AudioUnit); - REGISTER_ENUM (LADSPA); - REGISTER_ENUM (VST); - REGISTER (_PluginType); - - REGISTER_ENUM (None); - REGISTER_ENUM (MTC); - REGISTER_ENUM (JACK); - REGISTER (_SlaveSource); - - REGISTER_ENUM (Sprung); - REGISTER_ENUM (Wheel); - REGISTER (_ShuttleBehaviour); - - REGISTER_ENUM (Percentage); - REGISTER_ENUM (Semitones); - REGISTER (_ShuttleUnits); - - REGISTER_CLASS_ENUM (Session, Disabled); - REGISTER_CLASS_ENUM (Session, Enabled); - REGISTER_CLASS_ENUM (Session, Recording); - REGISTER (_Session_RecordState); - - REGISTER_CLASS_ENUM (Session::Event, SetTransportSpeed); - REGISTER_CLASS_ENUM (Session::Event, SetDiskstreamSpeed); - REGISTER_CLASS_ENUM (Session::Event, Locate); - REGISTER_CLASS_ENUM (Session::Event, LocateRoll); - REGISTER_CLASS_ENUM (Session::Event, LocateRollLocate); - REGISTER_CLASS_ENUM (Session::Event, SetLoop); - REGISTER_CLASS_ENUM (Session::Event, PunchIn); - REGISTER_CLASS_ENUM (Session::Event, PunchOut); - REGISTER_CLASS_ENUM (Session::Event, RangeStop); - REGISTER_CLASS_ENUM (Session::Event, RangeLocate); - REGISTER_CLASS_ENUM (Session::Event, Overwrite); - REGISTER_CLASS_ENUM (Session::Event, SetSlaveSource); - REGISTER_CLASS_ENUM (Session::Event, Audition); - REGISTER_CLASS_ENUM (Session::Event, InputConfigurationChange); - REGISTER_CLASS_ENUM (Session::Event, SetAudioRange); - REGISTER_CLASS_ENUM (Session::Event, SetPlayRange); - REGISTER_CLASS_ENUM (Session::Event, StopOnce); - REGISTER_CLASS_ENUM (Session::Event, AutoLoop); - REGISTER (_Session_Event_Type); - - REGISTER_CLASS_ENUM (Session, Clean); - REGISTER_CLASS_ENUM (Session, Dirty); - REGISTER_CLASS_ENUM (Session, CannotSave); - REGISTER_CLASS_ENUM (Session, Deletion); - REGISTER_CLASS_ENUM (Session, InitialConnecting); - REGISTER_CLASS_ENUM (Session, Loading); - REGISTER_CLASS_ENUM (Session, InCleanup); - REGISTER_BITS (_Session_StateOfTheState); - - REGISTER_ENUM (smpte_23976); - REGISTER_ENUM (smpte_24); - REGISTER_ENUM (smpte_24976); - REGISTER_ENUM (smpte_25); - REGISTER_ENUM (smpte_2997); - REGISTER_ENUM (smpte_2997drop); - REGISTER_ENUM (smpte_30); - REGISTER_ENUM (smpte_30drop); - REGISTER_ENUM (smpte_5994); - REGISTER_ENUM (smpte_60); - REGISTER (_Session_SmpteFormat); - - REGISTER_CLASS_ENUM (Session, pullup_Plus4Plus1); - REGISTER_CLASS_ENUM (Session, pullup_Plus4); - REGISTER_CLASS_ENUM (Session, pullup_Plus4Minus1); - REGISTER_CLASS_ENUM (Session, pullup_Plus1); - REGISTER_CLASS_ENUM (Session, pullup_None); - REGISTER_CLASS_ENUM (Session, pullup_Minus1); - REGISTER_CLASS_ENUM (Session, pullup_Minus4Plus1); - REGISTER_CLASS_ENUM (Session, pullup_Minus4); - REGISTER_CLASS_ENUM (Session, pullup_Minus4Minus1); - REGISTER (_Session_PullupFormat); - - REGISTER_ENUM (PRE_FADER); - REGISTER_ENUM (POST_FADER); - REGISTER_ENUM (CONTROL_OUTS); - REGISTER_ENUM (MAIN_OUTS); - REGISTER (_mute_type); - - REGISTER_CLASS_ENUM (Route, Hidden); - REGISTER_CLASS_ENUM (Route, MasterOut); - REGISTER_CLASS_ENUM (Route, ControlOut); - REGISTER_BITS (_Route_Flag); - - REGISTER_CLASS_ENUM (AudioFileSource, Writable); - REGISTER_CLASS_ENUM (AudioFileSource, CanRename); - REGISTER_CLASS_ENUM (AudioFileSource, Broadcast); - REGISTER_CLASS_ENUM (AudioFileSource, Removable); - REGISTER_CLASS_ENUM (AudioFileSource, RemovableIfEmpty); - REGISTER_CLASS_ENUM (AudioFileSource, RemoveAtDestroy); - REGISTER_CLASS_ENUM (AudioFileSource, NoPeakFile); - REGISTER_CLASS_ENUM (AudioFileSource, Destructive); - REGISTER_BITS (_AudioFileSource_Flag); - - REGISTER_CLASS_ENUM (AudioRegion, Linear); - REGISTER_CLASS_ENUM (AudioRegion, Fast); - REGISTER_CLASS_ENUM (AudioRegion, Slow); - REGISTER_CLASS_ENUM (AudioRegion, LogA); - REGISTER_CLASS_ENUM (AudioRegion, LogB); - REGISTER (_AudioRegion_FadeShape); - - REGISTER_CLASS_ENUM (Diskstream, Recordable); - REGISTER_CLASS_ENUM (Diskstream, Hidden); - REGISTER_CLASS_ENUM (Diskstream, Destructive); - REGISTER_BITS (_Diskstream_Flag); - - REGISTER_CLASS_ENUM (Location, IsMark); - REGISTER_CLASS_ENUM (Location, IsAutoPunch); - REGISTER_CLASS_ENUM (Location, IsAutoLoop); - REGISTER_CLASS_ENUM (Location, IsHidden); - REGISTER_CLASS_ENUM (Location, IsCDMarker); - REGISTER_CLASS_ENUM (Location, IsEnd); - REGISTER_CLASS_ENUM (Location, IsRangeMarker); - REGISTER_CLASS_ENUM (Location, IsStart); - REGISTER_BITS (_Location_Flags); - - - REGISTER_CLASS_ENUM (RouteGroup, Relative); - REGISTER_CLASS_ENUM (RouteGroup, Active); - REGISTER_CLASS_ENUM (RouteGroup, Hidden); - REGISTER_BITS (_RouteGroup_Flag); - - REGISTER_CLASS_ENUM (Panner, SameDirection); - REGISTER_CLASS_ENUM (Panner, OppositeDirection); - REGISTER (_Panner_LinkDirection); - - REGISTER_CLASS_ENUM (Region, Muted); - REGISTER_CLASS_ENUM (Region, Opaque); - REGISTER_CLASS_ENUM (Region, EnvelopeActive); - REGISTER_CLASS_ENUM (Region, DefaultFadeIn); - REGISTER_CLASS_ENUM (Region, DefaultFadeOut); - REGISTER_CLASS_ENUM (Region, Locked); - REGISTER_CLASS_ENUM (Region, PositionLocked); - REGISTER_CLASS_ENUM (Region, Automatic); - REGISTER_CLASS_ENUM (Region, WholeFile); - REGISTER_CLASS_ENUM (Region, FadeIn); - REGISTER_CLASS_ENUM (Region, FadeOut); - REGISTER_CLASS_ENUM (Region, Copied); - REGISTER_CLASS_ENUM (Region, Import); - REGISTER_CLASS_ENUM (Region, External); - REGISTER_CLASS_ENUM (Region, SyncMarked); - REGISTER_CLASS_ENUM (Region, LeftOfSplit); - REGISTER_CLASS_ENUM (Region, RightOfSplit); - REGISTER_CLASS_ENUM (Region, Hidden); - REGISTER_CLASS_ENUM (Region, DoNotSaveState); - REGISTER_BITS (_Region_Flag); - - REGISTER_CLASS_ENUM (Region, AudioTime); - REGISTER_CLASS_ENUM (Region, MusicTime); - REGISTER_BITS (_Region_PositionLockStyle); - - REGISTER_CLASS_ENUM (Track, NoFreeze); - REGISTER_CLASS_ENUM (Track, Frozen); - REGISTER_CLASS_ENUM (Track, UnFrozen); - REGISTER (_Track_FreezeState); - - REGISTER_CLASS_ENUM (AutomationList, Discrete); - REGISTER_CLASS_ENUM (AutomationList, Linear); - REGISTER_CLASS_ENUM (AutomationList, Curved); - REGISTER (_AutomationList_InterpolationStyle); - -} diff --git a/libs/ardour/filename_extensions.cc b/libs/ardour/filename_extensions.cc deleted file mode 100644 index c51e7aa915..0000000000 --- a/libs/ardour/filename_extensions.cc +++ /dev/null @@ -1,15 +0,0 @@ -#include - -#include "i18n.h" - -namespace ARDOUR { - -const char* const template_suffix = X_(".template"); -const char* const statefile_suffix = X_(".ardour"); -const char* const pending_suffix = X_(".pending"); -const char* const peakfile_suffix = X_(".peak"); -const char* const backup_suffix = X_(".bak"); -const char* const temp_suffix = X_(".tmp"); -const char* const history_suffix = X_(".history"); - -} diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc deleted file mode 100644 index d36bce2146..0000000000 --- a/libs/ardour/filesystem_paths.cc +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include - -#include -#include - -#define WITH_STATIC_PATHS 1 - -namespace ARDOUR { - -using std::string; - -sys::path -user_config_directory () -{ - const string home_dir = Glib::get_home_dir (); - - if (home_dir.empty ()) - { - const string error_msg = "Unable to determine home directory"; - - // log the error - error << error_msg << endmsg; - - throw sys::filesystem_error(error_msg); - } - - sys::path p(home_dir); - p /= user_config_dir_name; - - return p; -} - -sys::path -ardour_module_directory () -{ - sys::path module_directory(MODULE_DIR); - module_directory /= "ardour3"; - return module_directory; -} - -SearchPath -ardour_search_path () -{ - SearchPath spath_env(Glib::getenv("ARDOUR_PATH")); - return spath_env; -} - -SearchPath -system_config_search_path () -{ -#ifdef WITH_STATIC_PATHS - - SearchPath config_path(string(CONFIG_DIR)); - -#else - - SearchPath config_path(system_config_directories()); - -#endif - - config_path.add_subdirectory_to_paths("ardour3"); - - return config_path; -} - -SearchPath -system_data_search_path () -{ -#ifdef WITH_STATIC_PATHS - - SearchPath data_path(string(DATA_DIR)); - -#else - - SearchPath data_path(system_data_directories()); - -#endif - - data_path.add_subdirectory_to_paths("ardour3"); - - return data_path; -} - -} // namespace ARDOUR diff --git a/libs/ardour/filter.cc b/libs/ardour/filter.cc deleted file mode 100644 index be382f72da..0000000000 --- a/libs/ardour/filter.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright (C) 2004-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -int -Filter::make_new_sources (boost::shared_ptr region, SourceList& nsrcs, string suffix) -{ - vector names = region->master_source_names(); - - for (uint32_t i = 0; i < region->n_channels(); ++i) { - - string name = PBD::basename_nosuffix (names[i]); - - /* remove any existing version of suffix by assuming it starts - with some kind of "special" character. - */ - - if (!suffix.empty()) { - string::size_type pos = name.find (suffix[0]); - if (pos != string::npos && pos > 2) { - name = name.substr (0, pos - 1); - } - } - - string path = session.path_from_region_name (region->data_type(), - PBD::basename_nosuffix (names[i]), string ("")); - - if (path.length() == 0) { - error << string_compose (_("filter: error creating name for new file based on %1"), region->name()) - << endmsg; - return -1; - } - - try { - nsrcs.push_back (boost::dynamic_pointer_cast ( - SourceFactory::createWritable (region->data_type(), session, path, false, session.frame_rate()))); - } - - catch (failed_constructor& err) { - error << string_compose (_("filter: error creating new file %1 (%2)"), path, strerror (errno)) << endmsg; - return -1; - } - } - - return 0; -} - -int -Filter::finish (boost::shared_ptr region, SourceList& nsrcs, string region_name) -{ - /* update headers on new sources */ - - time_t xnow; - struct tm* now; - - time (&xnow); - now = localtime (&xnow); - - /* this is ugly. */ - for (SourceList::iterator si = nsrcs.begin(); si != nsrcs.end(); ++si) { - boost::shared_ptr afs = boost::dynamic_pointer_cast(*si); - if (afs) { - afs->update_header (region->position(), *now, xnow); - afs->mark_immutable (); - } - - boost::shared_ptr smfs = boost::dynamic_pointer_cast(*si); - if (smfs) { - smfs->set_timeline_position (region->position()); - smfs->flush_footer (); - } - - /* now that there is data there, requeue the file for analysis */ - - Analyser::queue_source_for_analysis (*si, false); - } - - /* create a new region */ - - if (region_name.empty()) { - region_name = session.new_region_name (region->name()); - } - results.clear (); - results.push_back (RegionFactory::create (nsrcs, 0, region->length(), region_name, 0, - Region::Flag (Region::WholeFile|Region::DefaultFlags))); - - return 0; -} - - diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc deleted file mode 100644 index 4388d8e299..0000000000 --- a/libs/ardour/find_session.cc +++ /dev/null @@ -1,167 +0,0 @@ -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "i18n.h" - -using namespace PBD; - -int -ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew) -{ - struct stat statbuf; - char buf[PATH_MAX+1]; - - isnew = false; - - if (!realpath (str.c_str(), buf) && (errno != ENOENT && errno != ENOTDIR)) { - error << string_compose (_("Could not resolve path: %1 (%2)"), buf, strerror(errno)) << endmsg; - return -1; - } - - str = buf; - - /* check to see if it exists, and what it is */ - - if (stat (str.c_str(), &statbuf)) { - if (errno == ENOENT) { - isnew = true; - } else { - error << string_compose (_("cannot check session path %1 (%2)"), str, strerror (errno)) - << endmsg; - return -1; - } - } - - if (!isnew) { - - /* it exists, so it must either be the name - of the directory, or the name of the statefile - within it. - */ - - if (S_ISDIR (statbuf.st_mode)) { - - string::size_type slash = str.find_last_of ('/'); - - if (slash == string::npos) { - - /* a subdirectory of cwd, so statefile should be ... */ - - string tmp; - tmp = str; - tmp += '/'; - tmp += str; - tmp += statefile_suffix; - - /* is it there ? */ - - if (stat (tmp.c_str(), &statbuf)) { - error << string_compose (_("cannot check statefile %1 (%2)"), tmp, strerror (errno)) - << endmsg; - return -1; - } - - path = str; - snapshot = str; - - } else { - - /* some directory someplace in the filesystem. - the snapshot name is the directory name - itself. - */ - - path = str; - snapshot = str.substr (slash+1); - - } - - } else if (S_ISREG (statbuf.st_mode)) { - - string::size_type slash = str.find_last_of ('/'); - string::size_type suffix; - - /* remove the suffix */ - - if (slash != string::npos) { - snapshot = str.substr (slash+1); - } else { - snapshot = str; - } - - suffix = snapshot.find (statefile_suffix); - - if (suffix == string::npos) { - error << string_compose (_("%1 is not an Ardour snapshot file"), str) << endmsg; - return -1; - } - - /* remove suffix */ - - snapshot = snapshot.substr (0, suffix); - - if (slash == string::npos) { - - /* we must be in the directory where the - statefile lives. get it using cwd(). - */ - - char cwd[PATH_MAX+1]; - - if (getcwd (cwd, sizeof (cwd)) == 0) { - error << string_compose (_("cannot determine current working directory (%1)"), strerror (errno)) - << endmsg; - return -1; - } - - path = cwd; - - } else { - - /* full path to the statefile */ - - path = str.substr (0, slash); - } - - } else { - - /* what type of file is it? */ - error << string_compose (_("unknown file type for session %1"), str) << endmsg; - return -1; - } - - } else { - - /* its the name of a new directory. get the name - as "dirname" does. - */ - - string::size_type slash = str.find_last_of ('/'); - - if (slash == string::npos) { - - /* no slash, just use the name, but clean it up */ - - path = legalize_for_path (str); - snapshot = path; - - } else { - - path = str; - snapshot = str.substr (slash+1); - } - } - - return 0; -} diff --git a/libs/ardour/gain.cc b/libs/ardour/gain.cc deleted file mode 100644 index 49596d6614..0000000000 --- a/libs/ardour/gain.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -using namespace ARDOUR; - -Gain::Gain () - : AutomationList (Parameter(GainAutomation), 0.0, 2.0, 1.0f) /* XXX yuck; clamps gain to -inf .. +6db */ -{ -} - -Gain::Gain (const Gain& other) - : AutomationList (other) -{ -} - -Gain& -Gain::operator= (const Gain& other) -{ - if (this != &other) { - AutomationList::operator= (other); - } - return *this; -} - -void -Gain::fill_linear_volume_fade_in (Gain& gain, nframes_t frames) -{ -} - -void -Gain::fill_linear_volume_fade_out (Gain& gain, nframes_t frames) -{ -} - -void -Gain::fill_linear_fade_in (Gain& gain, nframes_t frames) -{ -} - -void -Gain::fill_linear_fade_out (Gain& gain, nframes_t frames) -{ -} diff --git a/libs/ardour/gdither.cc b/libs/ardour/gdither.cc deleted file mode 100644 index ac47a0a61e..0000000000 --- a/libs/ardour/gdither.cc +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (C) 2002 Steve Harris - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include -#include -#include - -/* this monstrosity is necessary to get access to lrintf() and random(). - whoever is writing the glibc headers and should be - hauled off to a programmer re-education camp. for the rest of - their natural lives. or longer. -*/ - -#define _ISOC9X_SOURCE 1 -#define _ISOC99_SOURCE 1 -#ifdef __cplusplus -#include -#else -#include -#endif - -#undef __USE_SVID -#define __USE_SVID 1 -#ifdef __cplusplus -#include -#else -#include -#endif - -#include - -/* Lipshitz's minimally audible FIR, only really works for 46kHz-ish signals */ -static const float shaped_bs[] = { 2.033f, -2.165f, 1.959f, -1.590f, 0.6149f }; - -/* Some useful constants */ -#define MAX_U8 255 -#define MIN_U8 0 -#define SCALE_U8 128.0f - -#define MAX_S16 32767 -#define MIN_S16 -32768 -#define SCALE_S16 32768.0f - -#define MAX_S24 8388607 -#define MIN_S24 -8388608 -#define SCALE_S24 8388608.0f - -GDither gdither_new(GDitherType type, uint32_t channels, - - GDitherSize bit_depth, int dither_depth) -{ - GDither s; - - s = (GDither)calloc(1, sizeof(struct GDither_s)); - s->type = type; - s->channels = channels; - s->bit_depth = (int)bit_depth; - - if (dither_depth <= 0 || dither_depth > (int)bit_depth) { - dither_depth = (int)bit_depth; - } - s->dither_depth = dither_depth; - - s->scale = (float)(1LL << (dither_depth - 1)); - if (bit_depth == GDitherFloat || bit_depth == GDitherDouble) { - s->post_scale_fp = 1.0f / s->scale; - s->post_scale = 0; - } else { - s->post_scale_fp = 0.0f; - s->post_scale = 1 << ((int)bit_depth - dither_depth); - } - - switch (bit_depth) { - case GDither8bit: - /* Unsigned 8 bit */ - s->bias = 1.0f; - s->clamp_u = 255; - s->clamp_l = 0; - break; - case GDither16bit: - /* Signed 16 bit */ - s->bias = 0.0f; - s->clamp_u = 32767; - s->clamp_l = -32768; - break; - case GDither32bit: - /* Signed 24 bit, in upper 24 bits of 32 bit word */ - s->bias = 0.0f; - s->clamp_u = 8388607; - s->clamp_l = -8388608; - break; - case GDitherFloat: - /* normalised float */ - s->bias = 0.0f; - s->clamp_u = lrintf(s->scale); - s->clamp_l = lrintf(-s->scale); - break; - case GDitherDouble: - /* normalised float */ - s->bias = 0.0f; - s->clamp_u = lrintf(s->scale); - s->clamp_l = lrintf(-s->scale); - break; - case 23: - /* special performance test case */ - s->scale = SCALE_S24; - s->post_scale = 256; - s->bias = 0.0f; - s->clamp_u = 8388607; - s->clamp_l = -8388608; - break; - default: - /* Not a bit depth we can handle */ - free(s); - - return NULL; - break; - } - - switch (type) { - case GDitherNone: - case GDitherRect: - /* No state */ - break; - - case GDitherTri: - /* The last whitenoise sample */ - s->tri_state = (float *) calloc(channels, sizeof(float)); - break; - - case GDitherShaped: - /* The error from the last few samples encoded */ - s->shaped_state = (GDitherShapedState*) - calloc(channels, sizeof(GDitherShapedState)); - break; - } - - return s; -} - -void gdither_free(GDither s) -{ - if (s) { - free(s->tri_state); - free(s->shaped_state); - free(s); - } -} - -inline static void gdither_innner_loop(const GDitherType dt, - const uint32_t stride, const float bias, const float scale, - - const uint32_t post_scale, const int bit_depth, - const uint32_t channel, const uint32_t length, float *ts, - - GDitherShapedState *ss, float *x, void *y, const int clamp_u, - - const int clamp_l) -{ - uint32_t pos, i; - uint8_t *o8 = (uint8_t*) y; - int16_t *o16 = (int16_t*) y; - int32_t *o32 = (int32_t*) y; - float tmp, r, ideal; - int64_t clamped; - - i = channel; - for (pos = 0; pos < length; pos++, i += stride) { - tmp = x[i] * scale + bias; - - switch (dt) { - case GDitherNone: - break; - case GDitherRect: - tmp -= GDITHER_NOISE; - break; - case GDitherTri: - r = GDITHER_NOISE - 0.5f; - tmp -= r - ts[channel]; - ts[channel] = r; - break; - case GDitherShaped: - /* Save raw value for error calculations */ - ideal = tmp; - - /* Run FIR and add white noise */ - ss->buffer[ss->phase] = GDITHER_NOISE * 0.5f; - tmp += ss->buffer[ss->phase] * shaped_bs[0] - + ss->buffer[(ss->phase - 1) & GDITHER_SH_BUF_MASK] - * shaped_bs[1] - + ss->buffer[(ss->phase - 2) & GDITHER_SH_BUF_MASK] - * shaped_bs[2] - + ss->buffer[(ss->phase - 3) & GDITHER_SH_BUF_MASK] - * shaped_bs[3] - + ss->buffer[(ss->phase - 4) & GDITHER_SH_BUF_MASK] - * shaped_bs[4]; - - /* Roll buffer and store last error */ - ss->phase = (ss->phase + 1) & GDITHER_SH_BUF_MASK; - ss->buffer[ss->phase] = (float)lrintf(tmp) - ideal; - break; - } - - clamped = lrintf(tmp); - if (clamped > clamp_u) { - clamped = clamp_u; - } else if (clamped < clamp_l) { - clamped = clamp_l; - } - - switch (bit_depth) { - case GDither8bit: - o8[i] = (u_int8_t) (clamped * post_scale); - break; - case GDither16bit: - o16[i] = (int16_t) (clamped * post_scale); - break; - case GDither32bit: - o32[i] = (int32_t) (clamped * post_scale); - break; - } - } -} - -/* floating pint version of the inner loop function */ -inline static void gdither_innner_loop_fp(const GDitherType dt, - const uint32_t stride, const float bias, const float scale, - - const float post_scale, const int bit_depth, - const uint32_t channel, const uint32_t length, float *ts, - - GDitherShapedState *ss, float *x, void *y, const int clamp_u, - - const int clamp_l) -{ - uint32_t pos, i; - float *oflt = (float*) y; - double *odbl = (double*) y; - float tmp, r, ideal; - double clamped; - - i = channel; - for (pos = 0; pos < length; pos++, i += stride) { - tmp = x[i] * scale + bias; - - switch (dt) { - case GDitherNone: - break; - case GDitherRect: - tmp -= GDITHER_NOISE; - break; - case GDitherTri: - r = GDITHER_NOISE - 0.5f; - tmp -= r - ts[channel]; - ts[channel] = r; - break; - case GDitherShaped: - /* Save raw value for error calculations */ - ideal = tmp; - - /* Run FIR and add white noise */ - ss->buffer[ss->phase] = GDITHER_NOISE * 0.5f; - tmp += ss->buffer[ss->phase] * shaped_bs[0] - + ss->buffer[(ss->phase - 1) & GDITHER_SH_BUF_MASK] - * shaped_bs[1] - + ss->buffer[(ss->phase - 2) & GDITHER_SH_BUF_MASK] - * shaped_bs[2] - + ss->buffer[(ss->phase - 3) & GDITHER_SH_BUF_MASK] - * shaped_bs[3] - + ss->buffer[(ss->phase - 4) & GDITHER_SH_BUF_MASK] - * shaped_bs[4]; - - /* Roll buffer and store last error */ - ss->phase = (ss->phase + 1) & GDITHER_SH_BUF_MASK; - ss->buffer[ss->phase] = (float)lrintf(tmp) - ideal; - break; - } - - clamped = rintf(tmp); - if (clamped > clamp_u) { - clamped = clamp_u; - } else if (clamped < clamp_l) { - clamped = clamp_l; - } - - switch (bit_depth) { - case GDitherFloat: - oflt[i] = (float) (clamped * post_scale); - break; - case GDitherDouble: - odbl[i] = (double) (clamped * post_scale); - break; - } - } -} - -#define GDITHER_CONV_BLOCK 512 - -void gdither_run(GDither s, uint32_t channel, uint32_t length, - double *x, void *y) -{ - float conv[GDITHER_CONV_BLOCK]; - uint32_t i, pos; - char *ycast = (char *)y; - - int step; - - switch (s->bit_depth) { - case GDither8bit: - step = 1; - break; - case GDither16bit: - step = 2; - break; - case GDither32bit: - case GDitherFloat: - step = 4; - break; - case GDitherDouble: - step = 8; - break; - default: - step = 0; - break; - } - - pos = 0; - while (pos < length) { - for (i=0; (i + pos) < length && i < GDITHER_CONV_BLOCK; i++) { - conv[i] = x[pos + i]; - } - gdither_runf(s, channel, i, conv, ycast + s->channels * step); - pos += i; - } -} - -void gdither_runf(GDither s, uint32_t channel, uint32_t length, - float *x, void *y) -{ - uint32_t pos, i; - float tmp; - int64_t clamped; - GDitherShapedState *ss = NULL; - - if (!s || channel >= s->channels) { - return; - } - - if (s->shaped_state) { - ss = s->shaped_state + channel; - } - - if (s->type == GDitherNone && s->bit_depth == 23) { - int32_t *o32 = (int32_t*) y; - - for (pos = 0; pos < length; pos++) { - i = channel + (pos * s->channels); - tmp = x[i] * 8388608.0f; - - clamped = lrintf(tmp); - if (clamped > 8388607) { - clamped = 8388607; - } else if (clamped < -8388608) { - clamped = -8388608; - } - - o32[i] = (int32_t) (clamped * 256); - } - - return; - } - - /* some common case handling code - looks a bit wierd, but it allows - * the compiler to optimise out the branches in the inner loop */ - if (s->bit_depth == 8 && s->dither_depth == 8) { - switch (s->type) { - case GDitherNone: - gdither_innner_loop(GDitherNone, s->channels, 128.0f, SCALE_U8, - 1, 8, channel, length, NULL, NULL, x, y, - MAX_U8, MIN_U8); - break; - case GDitherRect: - gdither_innner_loop(GDitherRect, s->channels, 128.0f, SCALE_U8, - 1, 8, channel, length, NULL, NULL, x, y, - MAX_U8, MIN_U8); - break; - case GDitherTri: - gdither_innner_loop(GDitherTri, s->channels, 128.0f, SCALE_U8, - 1, 8, channel, length, s->tri_state, - NULL, x, y, MAX_U8, MIN_U8); - break; - case GDitherShaped: - gdither_innner_loop(GDitherShaped, s->channels, 128.0f, SCALE_U8, - 1, 8, channel, length, NULL, - ss, x, y, MAX_U8, MIN_U8); - break; - } - } else if (s->bit_depth == 16 && s->dither_depth == 16) { - switch (s->type) { - case GDitherNone: - gdither_innner_loop(GDitherNone, s->channels, 0.0f, SCALE_S16, - 1, 16, channel, length, NULL, NULL, x, y, - MAX_S16, MIN_S16); - break; - case GDitherRect: - gdither_innner_loop(GDitherRect, s->channels, 0.0f, SCALE_S16, - 1, 16, channel, length, NULL, NULL, x, y, - MAX_S16, MIN_S16); - break; - case GDitherTri: - gdither_innner_loop(GDitherTri, s->channels, 0.0f, SCALE_S16, - 1, 16, channel, length, s->tri_state, - NULL, x, y, MAX_S16, MIN_S16); - break; - case GDitherShaped: - gdither_innner_loop(GDitherShaped, s->channels, 0.0f, - SCALE_S16, 1, 16, channel, length, NULL, - ss, x, y, MAX_S16, MIN_S16); - break; - } - } else if (s->bit_depth == 32 && s->dither_depth == 24) { - switch (s->type) { - case GDitherNone: - gdither_innner_loop(GDitherNone, s->channels, 0.0f, SCALE_S24, - 256, 32, channel, length, NULL, NULL, x, - y, MAX_S24, MIN_S24); - break; - case GDitherRect: - gdither_innner_loop(GDitherRect, s->channels, 0.0f, SCALE_S24, - 256, 32, channel, length, NULL, NULL, x, - y, MAX_S24, MIN_S24); - break; - case GDitherTri: - gdither_innner_loop(GDitherTri, s->channels, 0.0f, SCALE_S24, - 256, 32, channel, length, s->tri_state, - NULL, x, y, MAX_S24, MIN_S24); - break; - case GDitherShaped: - gdither_innner_loop(GDitherShaped, s->channels, 0.0f, SCALE_S24, - 256, 32, channel, length, - NULL, ss, x, y, MAX_S24, MIN_S24); - break; - } - } else if (s->bit_depth == GDitherFloat || s->bit_depth == GDitherDouble) { - gdither_innner_loop_fp(s->type, s->channels, s->bias, s->scale, - s->post_scale_fp, s->bit_depth, channel, length, - s->tri_state, ss, x, y, s->clamp_u, s->clamp_l); - } else { - /* no special case handling, just process it from the struct */ - - gdither_innner_loop(s->type, s->channels, s->bias, s->scale, - s->post_scale, s->bit_depth, channel, - length, s->tri_state, ss, x, y, s->clamp_u, - s->clamp_l); - } -} - -/* vi:set ts=8 sts=4 sw=4: */ diff --git a/libs/ardour/gettext.h b/libs/ardour/gettext.h deleted file mode 100644 index 339c74ffe7..0000000000 --- a/libs/ardour/gettext.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ - -/* other headers may have included libintl.h */ - -# undef gettext -# undef dgettext -# undef dcgettext -# undef ngettext -# undef dngettext -# undef dcngettext -# undef textdomain -# undef bindtextdomain -# undef bind_textdomain_codeset - -# define gettext(Msgid) ((const char *) (Msgid)) -# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) -# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define textdomain(Domainname) ((const char *) (Domainname)) -# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) -# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) - -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -#endif /* _LIBGETTEXT_H */ diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc deleted file mode 100644 index 02c4a5ced6..0000000000 --- a/libs/ardour/globals.cc +++ /dev/null @@ -1,619 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include // Needed so that libraptor (included in lrdf) won't complain -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef VST_SUPPORT -#include -#endif - -#ifdef __SSE__ -#include -#endif - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_LIBLO -#include -#endif - -#include -#include - -#if defined (__APPLE__) - #include // For Gestalt -#endif - -#include "i18n.h" - -ARDOUR::Configuration* ARDOUR::Config = 0; -ARDOUR::RuntimeProfile* ARDOUR::Profile = 0; -ARDOUR::AudioLibrary* ARDOUR::Library = 0; - -#ifdef HAVE_LIBLO -ARDOUR::OSC* ARDOUR::osc = 0; -#endif - -using namespace ARDOUR; -using namespace std; -using namespace PBD; - -MIDI::Port *default_mmc_port = 0; -MIDI::Port *default_mtc_port = 0; -MIDI::Port *default_midi_port = 0; - -Change ARDOUR::StartChanged = ARDOUR::new_change (); -Change ARDOUR::LengthChanged = ARDOUR::new_change (); -Change ARDOUR::PositionChanged = ARDOUR::new_change (); -Change ARDOUR::NameChanged = ARDOUR::new_change (); -Change ARDOUR::BoundsChanged = Change (0); // see init(), below - -compute_peak_t ARDOUR::compute_peak = 0; -find_peaks_t ARDOUR::find_peaks = 0; -apply_gain_to_buffer_t ARDOUR::apply_gain_to_buffer = 0; -mix_buffers_with_gain_t ARDOUR::mix_buffers_with_gain = 0; -mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0; - -sigc::signal ARDOUR::BootMessage; - -#ifdef HAVE_LIBLO -static int -setup_osc () -{ - /* no real cost to creating this object, and it avoids - conditionals anywhere that uses it - */ - - osc = new OSC (Config->get_osc_port()); - - if (Config->get_use_osc ()) { - BootMessage (_("Starting OSC")); - return osc->start (); - } else { - return 0; - } -} -#endif - -int -setup_midi () -{ - if (Config->midi_ports.size() == 0) { - warning << _("no MIDI ports specified: no MMC or MTC control possible") << endmsg; - return 0; - } - - BootMessage (_("Configuring MIDI ports")); - - for (std::map::iterator i = Config->midi_ports.begin(); i != Config->midi_ports.end(); ++i) { - MIDI::Manager::instance()->add_port (i->second); - } - - MIDI::Port* first; - const MIDI::Manager::PortMap& ports = MIDI::Manager::instance()->get_midi_ports(); - - if (ports.size() > 1) { - - first = ports.begin()->second; - - /* More than one port, so try using specific names for each port */ - - if (Config->get_mmc_port_name() != N_("default")) { - default_mmc_port = MIDI::Manager::instance()->port (Config->get_mmc_port_name()); - } - - if (Config->get_mtc_port_name() != N_("default")) { - default_mtc_port = MIDI::Manager::instance()->port (Config->get_mtc_port_name()); - } - - if (Config->get_midi_port_name() != N_("default")) { - default_midi_port = MIDI::Manager::instance()->port (Config->get_midi_port_name()); - } - - /* If that didn't work, just use the first listed port */ - - if (default_mmc_port == 0) { - default_mmc_port = first; - } - - if (default_mtc_port == 0) { - default_mtc_port = first; - } - - if (default_midi_port == 0) { - default_midi_port = first; - } - - } else if (ports.size() == 1) { - - first = ports.begin()->second; - - /* Only one port described, so use it for both MTC and MMC */ - - default_mmc_port = first; - default_mtc_port = default_mmc_port; - default_midi_port = default_mmc_port; - } - - if (default_mmc_port == 0) { - warning << string_compose (_("No MMC control (MIDI port \"%1\" not available)"), Config->get_mmc_port_name()) - << endmsg; - return 0; - } - - if (default_mtc_port == 0) { - warning << string_compose (_("No MTC support (MIDI port \"%1\" not available)"), Config->get_mtc_port_name()) - << endmsg; - } - - if (default_midi_port == 0) { - warning << string_compose (_("No MIDI parameter support (MIDI port \"%1\" not available)"), Config->get_midi_port_name()) - << endmsg; - } - - return 0; -} - -void -setup_hardware_optimization (bool try_optimization) -{ - bool generic_mix_functions = true; - - if (try_optimization) { - - FPU fpu; - -#if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS) - - if (fpu.has_sse()) { - - info << "Using SSE optimized routines" << endmsg; - - // SSE SET - compute_peak = x86_sse_compute_peak; - find_peaks = x86_sse_find_peaks; - apply_gain_to_buffer = x86_sse_apply_gain_to_buffer; - mix_buffers_with_gain = x86_sse_mix_buffers_with_gain; - mix_buffers_no_gain = x86_sse_mix_buffers_no_gain; - - generic_mix_functions = false; - - } - -#elif defined (__APPLE__) && defined (BUILD_VECLIB_OPTIMIZATIONS) - long sysVersion = 0; - - if (noErr != Gestalt(gestaltSystemVersion, &sysVersion)) - sysVersion = 0; - - if (sysVersion >= 0x00001040) { // Tiger at least - compute_peak = veclib_compute_peak; - find_peaks = veclib_find_peaks; - apply_gain_to_buffer = veclib_apply_gain_to_buffer; - mix_buffers_with_gain = veclib_mix_buffers_with_gain; - mix_buffers_no_gain = veclib_mix_buffers_no_gain; - - generic_mix_functions = false; - - info << "Apple VecLib H/W specific optimizations in use" << endmsg; - } -#endif - - /* consider FPU denormal handling to be "h/w optimization" */ - - setup_fpu (); - } - - if (generic_mix_functions) { - - compute_peak = default_compute_peak; - find_peaks = default_find_peaks; - apply_gain_to_buffer = default_apply_gain_to_buffer; - mix_buffers_with_gain = default_mix_buffers_with_gain; - mix_buffers_no_gain = default_mix_buffers_no_gain; - - info << "No H/W specific optimizations in use" << endmsg; - } -} - -static void -lotsa_files_please () -{ - struct rlimit rl; - - if (getrlimit (RLIMIT_NOFILE, &rl) == 0) { - - rl.rlim_cur = rl.rlim_max; - - if (setrlimit (RLIMIT_NOFILE, &rl) != 0) { - if (rl.rlim_cur == RLIM_INFINITY) { - error << _("Could not set system open files limit to \"unlimited\"") << endmsg; - } else { - error << string_compose (_("Could not set system open files limit to %1"), rl.rlim_cur) << endmsg; - } - } else { - if (rl.rlim_cur == RLIM_INFINITY) { - info << _("Removed open file count limit. Excellent!") << endmsg; - } else { - info << string_compose (_("Ardour will be limited to %1 open files"), rl.rlim_cur) << endmsg; - } - } - } else { - error << string_compose (_("Could not get system open files limit (%1)"), strerror (errno)) << endmsg; - } -} - -int -ARDOUR::init (bool use_vst, bool try_optimization) -{ - extern void setup_enum_writer (); - - (void) bindtextdomain(PACKAGE, LOCALEDIR); - - setup_enum_writer (); - - // allow ardour the absolute maximum number of open files - lotsa_files_please (); - - lrdf_init(); - Library = new AudioLibrary; - - BootMessage (_("Loading configuration")); - - Config = new Configuration; - - if (Config->load_state ()) { - return -1; - } - - Config->set_use_vst (use_vst); - - Profile = new RuntimeProfile; - -#ifdef HAVE_LIBLO - if (setup_osc ()) { - return -1; - } -#endif - -#ifdef VST_SUPPORT - if (Config->get_use_vst() && fst_init ()) { - return -1; - } -#endif - - /* Make VAMP look in our library ahead of anything else */ - - char *p = getenv ("VAMP_PATH"); - string vamppath = VAMP_DIR; - if (p) { - vamppath += ':'; - vamppath += p; - } - setenv ("VAMP_PATH", vamppath.c_str(), 1); - - - setup_hardware_optimization (try_optimization); - - SourceFactory::init (); - Analyser::init (); - - /* singleton - first object is "it" */ - new PluginManager (); - - /* singleton - first object is "it" */ - new ControlProtocolManager (); - ControlProtocolManager::instance().discover_control_protocols (); - - XMLNode* node; - if ((node = Config->control_protocol_state()) != 0) { - ControlProtocolManager::instance().set_state (*node); - } - - BoundsChanged = Change (StartChanged|PositionChanged|LengthChanged); - - return 0; -} - -int -ARDOUR::cleanup () -{ - delete Library; - lrdf_cleanup (); - delete &ControlProtocolManager::instance(); - return 0; -} - - -microseconds_t -ARDOUR::get_microseconds () -{ - /* XXX need JACK to export its functionality */ - - struct timeval now; - gettimeofday (&now, 0); - return now.tv_sec * 1000000ULL + now.tv_usec; -} - -ARDOUR::Change -ARDOUR::new_change () -{ - Change c; - static uint32_t change_bit = 1; - - /* catch out-of-range */ - if (!change_bit) - { - fatal << _("programming error: ") - << "change_bit out of range in ARDOUR::new_change()" - << endmsg; - /*NOTREACHED*/ - } - - c = Change (change_bit); - change_bit <<= 1; // if it shifts too far, change_bit == 0 - - return c; -} - -string -ARDOUR::get_ardour_revision () -{ - return "$Rev$"; -} - -void -ARDOUR::find_bindings_files (map& files) -{ - vector found; - - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); - - if (getenv ("ARDOUR_SAE")) { - Glib::PatternSpec pattern("*SAE-*.bindings"); - find_matching_files_in_search_path (spath, pattern, found); - } else { - Glib::PatternSpec pattern("*.bindings"); - find_matching_files_in_search_path (spath, pattern, found); - } - - if (found.empty()) { - return; - } - - for (vector::iterator x = found.begin(); x != found.end(); ++x) { - sys::path path = *x; - pair namepath; - namepath.second = path.to_string(); - namepath.first = path.leaf().substr (0, path.leaf().find_first_of ('.')); - files.insert (namepath); - } -} - -ARDOUR::LocaleGuard::LocaleGuard (const char* str) -{ - old = strdup (setlocale (LC_NUMERIC, NULL)); - if (strcmp (old, str)) { - setlocale (LC_NUMERIC, str); - } -} - -ARDOUR::LocaleGuard::~LocaleGuard () -{ - setlocale (LC_NUMERIC, old); - free ((char*)old); -} - -void -ARDOUR::setup_fpu () -{ - - if (getenv ("ARDOUR_RUNNING_UNDER_VALGRIND")) { - // valgrind doesn't understand this assembler stuff - // September 10th, 2007 - return; - } - -#if defined(ARCH_X86) && defined(USE_XMMINTRIN) - - int MXCSR; - FPU fpu; - - /* XXX use real code to determine if the processor supports - DenormalsAreZero and FlushToZero - */ - - if (!fpu.has_flush_to_zero() && !fpu.has_denormals_are_zero()) { - return; - } - - MXCSR = _mm_getcsr(); - - switch (Config->get_denormal_model()) { - case DenormalNone: - MXCSR &= ~(_MM_FLUSH_ZERO_ON|0x8000); - break; - - case DenormalFTZ: - if (fpu.has_flush_to_zero()) { - MXCSR |= _MM_FLUSH_ZERO_ON; - } - break; - - case DenormalDAZ: - MXCSR &= ~_MM_FLUSH_ZERO_ON; - if (fpu.has_denormals_are_zero()) { - MXCSR |= 0x8000; - } - break; - - case DenormalFTZDAZ: - if (fpu.has_flush_to_zero()) { - if (fpu.has_denormals_are_zero()) { - MXCSR |= _MM_FLUSH_ZERO_ON | 0x8000; - } else { - MXCSR |= _MM_FLUSH_ZERO_ON; - } - } - break; - } - - _mm_setcsr (MXCSR); - -#endif -} - -ARDOUR::OverlapType -ARDOUR::coverage (nframes_t sa, nframes_t ea, - nframes_t sb, nframes_t eb) -{ - /* OverlapType returned reflects how the second (B) - range overlaps the first (A). - - The diagrams show various relative placements - of A and B for each OverlapType. - - Notes: - Internal: the start points cannot coincide - External: the start and end points can coincide - Start: end points can coincide - End: start points can coincide - - XXX Logically, Internal should disallow end - point equality. - */ - - /* - |--------------------| A - |------| B - |-----------------| B - - - "B is internal to A" - - */ -#ifdef OLD_COVERAGE - if ((sb >= sa) && (eb <= ea)) { -#else - if ((sb > sa) && (eb <= ea)) { -#endif - return OverlapInternal; - } - - /* - |--------------------| A - ----| B - -----------------------| B - --| B - - "B overlaps the start of A" - - */ - - if ((eb >= sa) && (eb <= ea)) { - return OverlapStart; - } - /* - |---------------------| A - |----------------- B - |----------------------- B - |- B - - "B overlaps the end of A" - - */ - if ((sb > sa) && (sb <= ea)) { - return OverlapEnd; - } - /* - |--------------------| A - -------------------------- B - |----------------------- B - ----------------------| B - |--------------------| B - - - "B overlaps all of A" - */ - if ((sa >= sb) && (sa <= eb) && (ea <= eb)) { - return OverlapExternal; - } - - return OverlapNone; -} - -/* not sure where to put these */ - -template -std::istream& int_to_type (std::istream& o, T& hf) { - int val; - o >> val; - hf = (T) val; - return o; -} - -std::istream& operator>>(std::istream& o, HeaderFormat& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, SampleFormat& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, AutoConnectOption& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, MonitorModel& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, RemoteModel& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, EditMode& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, SoloModel& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, LayerModel& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, CrossfadeModel& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, SlaveSource& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, ShuttleBehaviour& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, ShuttleUnits& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, SmpteFormat& var) { return int_to_type (o, var); } -std::istream& operator>>(std::istream& o, DenormalModel& var) { return int_to_type (o, var); } - diff --git a/libs/ardour/i18n.h b/libs/ardour/i18n.h deleted file mode 100644 index 5d68c79edd..0000000000 --- a/libs/ardour/i18n.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __i18n_h__ -#define __i18n_h__ - -#include -#include -#include "gettext.h" - -#include -#include - -#define _(Text) dgettext (PACKAGE,Text) -#define N_(Text) gettext_noop (Text) -#define X_(Text) Text -#define I18N(Array) PBD::internationalize (PACKAGE, Array) - -#endif // __i18n_h__ diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc deleted file mode 100644 index d79c930e6d..0000000000 --- a/libs/ardour/import.cc +++ /dev/null @@ -1,491 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_COREAUDIO -#include -#endif - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - - -static boost::shared_ptr -open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQuality quality) -{ -#ifdef HAVE_COREAUDIO - - /* see if we can use CoreAudio to handle the IO */ - - try { - boost::shared_ptr source(new CAImportableSource(path)); - - if (source->samplerate() == samplerate) { - return source; - } - - /* rewrap as a resampled source */ - - return boost::shared_ptr(new ResampledImportableSource(source, samplerate, quality)); - } - - catch (...) { - - /* fall back to SndFile */ - -#endif - - try { - boost::shared_ptr source(new SndFileImportableSource(path)); - - if (source->samplerate() == samplerate) { - return source; - } - - /* rewrap as a resampled source */ - - return boost::shared_ptr(new ResampledImportableSource(source, samplerate, quality)); - } - - catch (...) { - throw; // rethrow - } - -#ifdef HAVE_COREAUDIO - } -#endif -} - -static std::string -get_non_existent_filename (DataType type, const bool allow_replacing, const std::string destdir, const std::string& basename, uint channel, uint channels) -{ - char buf[PATH_MAX+1]; - bool goodfile = false; - string base(basename); - const char* ext = (type == DataType::AUDIO) ? "wav" : "mid"; - - do { - - if (type == DataType::AUDIO && channels == 2) { - if (channel == 0) { - snprintf (buf, sizeof(buf), "%s-L.wav", base.c_str()); - } else { - snprintf (buf, sizeof(buf), "%s-R.wav", base.c_str()); - } - } else if (channels > 1) { - snprintf (buf, sizeof(buf), "%s-c%d.%s", base.c_str(), channel, ext); - } else { - snprintf (buf, sizeof(buf), "%s.%s", base.c_str(), ext); - } - - - string tempname = destdir + "/" + buf; - if (!allow_replacing && Glib::file_test (tempname, Glib::FILE_TEST_EXISTS)) { - - /* if the file already exists, we must come up with - * a new name for it. for now we just keep appending - * _ to basename - */ - - base += "_"; - - } else { - - goodfile = true; - } - - } while ( !goodfile); - - return buf; -} - -static vector -get_paths_for_new_sources (const bool allow_replacing, const string& import_file_path, const string& session_dir, uint channels) -{ - vector new_paths; - const string basename = basename_nosuffix (import_file_path); - - SessionDirectory sdir(session_dir); - - for (uint n = 0; n < channels; ++n) { - - const DataType type = (import_file_path.rfind(".mid") != string::npos) - ? DataType::MIDI : DataType::AUDIO; - - std::string filepath = (type == DataType::MIDI) - ? sdir.midi_path().to_string() : sdir.sound_path().to_string(); - - filepath += '/'; - filepath += get_non_existent_filename (type, allow_replacing, filepath, basename, n, channels); - new_paths.push_back (filepath); - } - - return new_paths; -} - -static bool -map_existing_mono_sources (const vector& new_paths, Session& sess, - uint samplerate, vector >& newfiles, Session *session) -{ - for (vector::const_iterator i = new_paths.begin(); - i != new_paths.end(); ++i) - { - boost::shared_ptr source = session->source_by_path_and_channel(*i, 0); - - if (source == 0) { - error << string_compose(_("Could not find a source for %1 even though we are updating this file!"), (*i)) << endl; - return false; - } - - newfiles.push_back(boost::dynamic_pointer_cast(source)); - } - return true; -} - -static bool -create_mono_sources_for_writing (const vector& new_paths, Session& sess, - uint samplerate, vector >& newfiles) -{ - for (vector::const_iterator i = new_paths.begin(); - i != new_paths.end(); ++i) - { - boost::shared_ptr source; - - try - { - const DataType type = ((*i).rfind(".mid") != string::npos) - ? DataType::MIDI : DataType::AUDIO; - - source = SourceFactory::createWritable ( - type, - sess, - i->c_str(), - false, // destructive - samplerate - ); - } - catch (const failed_constructor& err) - { - error << string_compose (_("Unable to create file %1 during import"), *i) << endmsg; - return false; - } - - newfiles.push_back(boost::dynamic_pointer_cast(source)); - } - return true; -} - -static Glib::ustring -compose_status_message (const string& path, - uint file_samplerate, - uint session_samplerate, - uint current_file, - uint total_files) -{ - if (file_samplerate != session_samplerate) { - return string_compose (_("converting %1\n(resample from %2KHz to %3KHz)\n(%4 of %5)"), - Glib::path_get_basename (path), - file_samplerate/1000.0f, - session_samplerate/1000.0f, - current_file, total_files); - } - - return string_compose (_("converting %1\n(%2 of %3)"), - Glib::path_get_basename (path), - current_file, total_files); -} - -static void -write_audio_data_to_new_files (ImportableSource* source, Session::import_status& status, - vector >& newfiles) -{ - const nframes_t nframes = ResampledImportableSource::blocksize; - boost::shared_ptr afs; - uint channels = source->channels(); - - boost::scoped_array data(new float[nframes * channels]); - vector > channel_data; - - for (uint n = 0; n < channels; ++n) { - channel_data.push_back(boost::shared_array(new Sample[nframes])); - } - - uint read_count = 0; - status.progress = 0.0f; - - while (!status.cancel) { - - nframes_t nread, nfread; - uint x; - uint chn; - - if ((nread = source->read (data.get(), nframes)) == 0) { - break; - } - nfread = nread / channels; - - /* de-interleave */ - - for (chn = 0; chn < channels; ++chn) { - - nframes_t n; - for (x = chn, n = 0; n < nfread; x += channels, ++n) { - channel_data[chn][n] = (Sample) data[x]; - } - } - - /* flush to disk */ - - for (chn = 0; chn < channels; ++chn) { - if ((afs = boost::dynamic_pointer_cast(newfiles[chn])) != 0) { - afs->write (channel_data[chn].get(), nfread); - } - } - - read_count += nread; - status.progress = read_count / (source->ratio () * source->length() * channels); - } -} - -static void -write_midi_data_to_new_files (SMFReader* source, Session::import_status& status, - vector >& newfiles) -{ - MIDI::Event ev(0.0, 4, NULL, true); - - status.progress = 0.0f; - - try { - - for (unsigned i = 1; i <= source->num_tracks(); ++i) { - - boost::shared_ptr smfs = boost::dynamic_pointer_cast(newfiles[i-1]); - - source->seek_to_track(i); - - uint64_t t = 0; - uint32_t delta_t = 0; - uint32_t size = 0; - - while (!status.cancel) { - - if (source->read_event(4, ev.buffer(), &size, &delta_t) < 0) - break; - - t += delta_t; - ev.time() = (double)t / (double)source->ppqn(); - ev.size() = size; - - smfs->append_event_unlocked(Beats, ev); - if (status.progress < 0.99) - status.progress += 0.01; - } - - nframes_t timeline_position = 0; // FIXME: ? - - // FIXME: kluuuuudge: assumes tempo never changes after start - const double frames_per_beat = smfs->session().tempo_map().tempo_at( - timeline_position).frames_per_beat( - smfs->session().engine().frame_rate(), - smfs->session().tempo_map().meter_at(timeline_position)); - - smfs->update_length(0, (nframes_t) ceil ((t / (double)source->ppqn()) * frames_per_beat)); - - smfs->flush_header(); - smfs->flush_footer(); - - if (status.cancel) - break; - } - - } catch (...) { - error << "Corrupt MIDI file " << source->filename() << endl; - } -} - -static void -remove_file_source (boost::shared_ptr source) -{ - ::unlink (source->path().c_str()); -} - -// This function is still unable to cleanly update an existing source, even though -// it is possible to set the import_status flag accordingly. The functinality -// is disabled at the GUI until the Source implementations are able to provide -// the necessary API. -void -Session::import_audiofiles (import_status& status) -{ - uint32_t cnt = 1; - typedef vector > Sources; - Sources all_new_sources; - boost::shared_ptr afs; - boost::shared_ptr smfs; - uint channels = 0; - - status.sources.clear (); - - for (vector::iterator p = status.paths.begin(); - p != status.paths.end() && !status.cancel; - ++p, ++cnt) - { - boost::shared_ptr source; - std::auto_ptr smf_reader; - const DataType type = ((*p).rfind(".mid") != string::npos) ? - DataType::MIDI : DataType::AUDIO; - - if (type == DataType::AUDIO) { - try { - source = open_importable_source (*p, frame_rate(), status.quality); - channels = source->channels(); - } catch (const failed_constructor& err) { - error << string_compose(_("Import: cannot open input sound file \"%1\""), (*p)) << endmsg; - status.done = status.cancel = true; - return; - } - - } else { - try { - smf_reader = std::auto_ptr(new SMFReader(*p)); - channels = smf_reader->num_tracks(); - } catch (const SMFReader::UnsupportedTime& err) { - error << _("Import: unsupported MIDI time stamp format") << endmsg; - status.done = status.cancel = true; - return; - } catch (...) { - error << _("Import: error reading MIDI file") << endmsg; - status.done = status.cancel = true; - return; - } - } - - vector new_paths = get_paths_for_new_sources (status.replace_existing_source, *p, - get_best_session_directory_for_new_source (), - channels); - Sources newfiles; - - if (status.replace_existing_source) { - fatal << "THIS IS NOT IMPLEMENTED YET, IT SHOULD NEVER GET CALLED!!! DYING!" << endl; - status.cancel = !map_existing_mono_sources (new_paths, *this, frame_rate(), newfiles, this); - } else { - status.cancel = !create_mono_sources_for_writing (new_paths, *this, frame_rate(), newfiles); - } - - // copy on cancel/failure so that any files that were created will be removed below - std::copy (newfiles.begin(), newfiles.end(), std::back_inserter(all_new_sources)); - - if (status.cancel) break; - - for (Sources::iterator i = newfiles.begin(); i != newfiles.end(); ++i) { - if ((afs = boost::dynamic_pointer_cast(*i)) != 0) { - afs->prepare_for_peakfile_writes (); - } - } - - if (source) { // audio - status.doing_what = compose_status_message (*p, source->samplerate(), - frame_rate(), cnt, status.paths.size()); - write_audio_data_to_new_files (source.get(), status, newfiles); - } else if (smf_reader.get()) { // midi - status.doing_what = string_compose(_("loading MIDI file %1"), *p); - write_midi_data_to_new_files (smf_reader.get(), status, newfiles); - } - } - - if (!status.cancel) { - struct tm* now; - time_t xnow; - time (&xnow); - now = localtime (&xnow); - status.freeze = true; - - /* flush the final length(s) to the header(s) */ - - for (Sources::iterator x = all_new_sources.begin(); x != all_new_sources.end(); ) { - if ((afs = boost::dynamic_pointer_cast(*x)) != 0) { - afs->update_header(0, *now, xnow); - afs->done_with_peakfile_writes (); - } - - /* now that there is data there, requeue the file for analysis */ - - if (Config->get_auto_analyse_audio()) { - Analyser::queue_source_for_analysis (boost::static_pointer_cast(*x), false); - } - - /* don't create tracks for empty MIDI sources (channels) */ - if ((smfs = boost::dynamic_pointer_cast(*x)) != 0 && smfs->is_empty()) { - x = all_new_sources.erase(x); - } else { - ++x; - } - } - - /* save state so that we don't lose these new Sources */ - - save_state (_name); - - std::copy (all_new_sources.begin(), all_new_sources.end(), - std::back_inserter(status.sources)); - } else { - // this can throw...but it seems very unlikely - std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source); - } - - status.done = true; -} - diff --git a/libs/ardour/internal_audio_port.cc b/libs/ardour/internal_audio_port.cc deleted file mode 100644 index e5362cde95..0000000000 --- a/libs/ardour/internal_audio_port.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include - -using namespace ARDOUR; -using namespace std; - -void -InternalAudioPort::default_mixdown (const list& ports, AudioBuffer& dest, nframes_t cnt, nframes_t offset) -{ - list::const_iterator p = ports.begin(); - - dest.read_from ((dynamic_cast(*p))->get_audio_buffer(), cnt, offset); - - for (; p != ports.end(); ++p) { - dest.accumulate_from ((dynamic_cast(*p))->get_audio_buffer(), cnt, offset); - } -} - -InternalAudioPort::InternalAudioPort(const string& name, Flags flags) - : Port (DataType::AUDIO, flags) - , AudioPort (flags, engine->frames_per_cycle()) - , InternalPort (name, DataType::AUDIO, flags) -{ - _mixdown = default_mixdown; -} - -void -InternalAudioPort::set_mixdown_function (void (*func)(const list&, AudioBuffer&, nframes_t, nframes_t)) -{ - _mixdown = func; -} - -void -InternalAudioPort::reset () -{ - _buffer.resize (engine->frames_per_cycle()); - _buffer.silence (_buffer.size()); -} - -AudioBuffer& -InternalAudioPort::get_audio_buffer () -{ - if (_connections.empty()) { - return AudioPort::get_audio_buffer(); - } - - /* XXX what about offset/size being more dynamic ? */ - - (*_mixdown) (_connections, _buffer, _buffer.size(), 0); - - return _buffer; -} diff --git a/libs/ardour/internal_port.cc b/libs/ardour/internal_port.cc deleted file mode 100644 index cec11742e0..0000000000 --- a/libs/ardour/internal_port.cc +++ /dev/null @@ -1,163 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace std; - -AudioEngine* InternalPort::engine = 0; - -void -InternalPort::set_engine (AudioEngine* e) -{ - engine = e; -} - -InternalPort::InternalPort (const string& str, DataType type, Flags flags) - : Port (type, flags) -{ - set_name (str); -} - -InternalPort::~InternalPort () -{ - disconnect (); -} - -void -InternalPort::set_latency (nframes_t val) -{ - _latency = val; -} - -bool -InternalPort::connected_to (const string& portname) const -{ - /* caller must hold process lock */ - - for (list::const_iterator p = _connections.begin(); p != _connections.end(); ++p) { - if ((*p)->name() == portname) { - return true; - } - } - - return false; -} - -const char** -InternalPort::get_connections () const -{ - /* caller must hold process lock */ - - int i; - list::const_iterator p; - - if (_connections.empty()) { - return 0; - } - - char **names = (char**) malloc (sizeof (char*) * ( _connections.size() + 1)); - - - for (i = 0, p = _connections.begin(); p != _connections.end(); ++p, ++i) { - names[i] = (char*) (*p)->name().c_str(); - } - - names[i] = 0; - - return (const char**) names; -} - -int -InternalPort::connected() const -{ - /* caller must hold process lock */ - return !_connections.empty(); -} - -int -InternalPort::set_name (string str) -{ - _name = "internal:"; - _name += str; - - return 0; -} - -string -InternalPort::short_name () -{ - return _name.substr (9); -} - -void -InternalPort::connect (InternalPort& src, InternalPort& dst) -{ - /* caller must hold process lock */ - - src._connections.push_back (&dst); - dst._connections.push_back (&src); -} - -void -InternalPort::disconnect (InternalPort& a, InternalPort& b) -{ - /* caller must hold process lock */ - a._connections.remove (&b); - b._connections.remove (&a); -} - -int -InternalPort::disconnect () -{ - /* caller must hold process lock */ - - for (list::const_iterator p = _connections.begin(); p != _connections.end(); ) { - list::const_iterator tmp; - - tmp = p; - ++tmp; - - disconnect (*this, **p); - - p = tmp; - } - - _connections.clear (); - - return 0; -} - -int -InternalPort::reestablish () -{ - return 0; -} - -void -InternalPort::recompute_total_latency () const -{ - return; -} - diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc deleted file mode 100644 index 5d4b41cf32..0000000000 --- a/libs/ardour/io.cc +++ /dev/null @@ -1,2612 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -#include - -/* - A bug in OS X's cmath that causes isnan() and isinf() to be - "undeclared". the following works around that -*/ - -#if defined(__APPLE__) && defined(__MACH__) -extern "C" int isnan (double); -extern "C" int isinf (double); -#endif - -#define BLOCK_PROCESS_CALLBACK() Glib::Mutex::Lock em (_session.engine().process_lock()) - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -const string IO::state_node_name = "IO"; -bool IO::connecting_legal = false; -bool IO::ports_legal = false; -bool IO::panners_legal = false; -sigc::signal IO::Meter; -sigc::signal IO::ConnectingLegal; -sigc::signal IO::PortsLegal; -sigc::signal IO::PannersLegal; -sigc::signal IO::PortCountChanged; -sigc::signal IO::PortsCreated; - -Glib::StaticMutex IO::m_meter_signal_lock = GLIBMM_STATIC_MUTEX_INIT; - -/* this is a default mapper of [0 .. 1.0] control values to a gain coefficient. - others can be imagined. -*/ - -#if 0 -static gain_t direct_control_to_gain (double fract) { - /* XXX Marcus writes: this doesn't seem right to me. but i don't have a better answer ... */ - /* this maxes at +6dB */ - return pow (2.0,(sqrt(sqrt(sqrt(fract)))*198.0-192.0)/6.0); -} - -static double direct_gain_to_control (gain_t gain) { - /* XXX Marcus writes: this doesn't seem right to me. but i don't have a better answer ... */ - if (gain == 0) return 0.0; - - return pow((6.0*log(gain)/log(2.0)+192.0)/198.0, 8.0); -} -#endif - -/** @param default_type The type of port that will be created by ensure_io - * and friends if no type is explicitly requested (to avoid breakage). - */ -IO::IO (Session& s, const string& name, - int input_min, int input_max, int output_min, int output_max, - DataType default_type, bool public_ports) - : Automatable (s, name), - _output_buffers (new BufferSet()), - _active(true), - _default_type (default_type), - _public_ports (public_ports), - _input_minimum (ChanCount::ZERO), - _input_maximum (ChanCount::INFINITE), - _output_minimum (ChanCount::ZERO), - _output_maximum (ChanCount::INFINITE) -{ - _panner = new Panner (name, _session); - _meter = new PeakMeter (_session); - - if (input_min > 0) { - _input_minimum = ChanCount(_default_type, input_min); - } - if (input_max >= 0) { - _input_maximum = ChanCount(_default_type, input_max); - } - if (output_min > 0) { - _output_minimum = ChanCount(_default_type, output_min); - } - if (output_max >= 0) { - _output_maximum = ChanCount(_default_type, output_max); - } - - _gain = 1.0; - _desired_gain = 1.0; - pending_state_node = 0; - no_panner_reset = false; - _phase_invert = false; - deferred_state = 0; - - boost::shared_ptr gl( - new AutomationList(Parameter(GainAutomation), 0.0, 2.0, 1.0)); - - _gain_control = boost::shared_ptr( - new GainControl(X_("gaincontrol"), *this, gl)); - - add_control(_gain_control); - - apply_gain_automation = false; - - { - // IO::Meter is emitted from another thread so the - // Meter signal must be protected. - Glib::Mutex::Lock guard (m_meter_signal_lock); - m_meter_connection = Meter.connect (mem_fun (*this, &IO::meter)); - } - - // Connect to our own PortCountChanged signal to connect output buffers - IO::PortCountChanged.connect (mem_fun (*this, &IO::attach_buffers)); - - _session.add_controllable (_gain_control); - - create_bundles_for_inputs_and_outputs (); -} - -IO::IO (Session& s, const XMLNode& node, DataType dt) - : Automatable (s, "unnamed io"), - _output_buffers (new BufferSet()), - _active(true), - _default_type (dt) -{ - _meter = new PeakMeter (_session); - _public_ports = true; // XXX get this from node - _panner = 0; - deferred_state = 0; - no_panner_reset = false; - _desired_gain = 1.0; - _gain = 1.0; - - apply_gain_automation = false; - - boost::shared_ptr gl( - new AutomationList(Parameter(GainAutomation), 0.0, 2.0, 1.0)); - - _gain_control = boost::shared_ptr( - new GainControl(X_("gaincontrol"), *this, gl)); - - add_control(_gain_control); - - set_state (node); - - { - // IO::Meter is emitted from another thread so the - // Meter signal must be protected. - Glib::Mutex::Lock guard (m_meter_signal_lock); - m_meter_connection = Meter.connect (mem_fun (*this, &IO::meter)); - } - - // Connect to our own PortCountChanged signal to connect output buffers - IO::PortCountChanged.connect (mem_fun (*this, &IO::attach_buffers)); - - _session.add_controllable (_gain_control); - - create_bundles_for_inputs_and_outputs (); -} - -IO::~IO () -{ - Glib::Mutex::Lock guard (m_meter_signal_lock); - Glib::Mutex::Lock lm (io_lock); - - BLOCK_PROCESS_CALLBACK (); - - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - _session.engine().unregister_port (*i); - } - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - _session.engine().unregister_port (*i); - } - - m_meter_connection.disconnect(); - - delete _meter; - delete _panner; - delete _output_buffers; -} - -void -IO::silence (nframes_t nframes, nframes_t offset) -{ - /* io_lock, not taken: function must be called from Session::process() calltree */ - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - i->get_buffer().silence (nframes, offset); - } -} - -/** Deliver bufs to the IO's output ports - * - * This function should automatically do whatever it necessary to correctly deliver bufs - * to the outputs, eg applying gain or pan or whatever else needs to be done. - */ -void -IO::deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) -{ - // FIXME: type specific code doesn't actually need to be here, it will go away in time - - /* ********** AUDIO ********** */ - - // Apply gain if gain automation isn't playing - if ( ! apply_gain_automation) { - - gain_t dg = _gain; // desired gain - - { - Glib::Mutex::Lock dm (declick_lock, Glib::TRY_LOCK); - - if (dm.locked()) { - dg = _desired_gain; - } - - } - - if (dg != _gain || dg != 1.0) - Amp::run_in_place(bufs, nframes, _gain, dg, _phase_invert); - } - - // Use the panner to distribute audio to output port buffers - if (_panner && !_panner->empty() && !_panner->bypassed()) { - _panner->distribute (bufs, output_buffers(), start_frame, end_frame, nframes, offset); - } else { - const DataType type = DataType::AUDIO; - - // Copy any audio 1:1 to outputs - - BufferSet::iterator o = output_buffers().begin(type); - BufferSet::iterator i = bufs.begin(type); - BufferSet::iterator prev = i; - - while (i != bufs.end(type) && o != output_buffers().end (type)) { - o->read_from(*i, nframes, offset); - prev = i; - ++i; - ++o; - } - - /* extra outputs get a copy of the last buffer */ - - while (o != output_buffers().end(type)) { - o->read_from(*prev, nframes, offset); - ++o; - } - } - - /* ********** MIDI ********** */ - - // No MIDI, we're done here - if (bufs.count().n_midi() == 0) { - return; - } - - const DataType type = DataType::MIDI; - - // Copy any MIDI 1:1 to outputs - assert(bufs.count().n_midi() == output_buffers().count().n_midi()); - BufferSet::iterator o = output_buffers().begin(type); - for (BufferSet::iterator i = bufs.begin(type); i != bufs.end(type); ++i, ++o) { - o->read_from(*i, nframes, offset); - } -} - -void -IO::collect_input (BufferSet& outs, nframes_t nframes, nframes_t offset) -{ - assert(outs.available() >= n_inputs()); - - if (n_inputs() == ChanCount::ZERO) - return; - - outs.set_count(n_inputs()); - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - - BufferSet::iterator o = outs.begin(*t); - for (PortSet::iterator i = _inputs.begin(*t); i != _inputs.end(*t); ++i, ++o) { - o->read_from(i->get_buffer(), nframes, offset); - } - - } -} - -void -IO::just_meter_input (nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset) -{ - BufferSet& bufs = _session.get_scratch_buffers (n_inputs()); - - collect_input (bufs, nframes, offset); - - _meter->run_in_place(bufs, start_frame, end_frame, nframes, offset); -} - - -void -IO::check_bundles_connected_to_inputs () -{ - check_bundles (_bundles_connected_to_inputs, inputs()); -} - -void -IO::check_bundles_connected_to_outputs () -{ - check_bundles (_bundles_connected_to_outputs, outputs()); -} - -void -IO::check_bundles (std::vector& list, const PortSet& ports) -{ - std::vector new_list; - - for (std::vector::iterator i = list.begin(); i != list.end(); ++i) { - - uint32_t const N = i->bundle->nchannels (); - - if (ports.num_ports() < N) { - continue; - } - - bool ok = true; - for (uint32_t j = 0; j < N; ++j) { - /* Every port on bundle channel j must be connected to our input j */ - PortList const pl = i->bundle->channel_ports (j); - for (uint32_t k = 0; k < pl.size(); ++k) { - if (ports.port(j)->connected_to (pl[k]) == false) { - ok = false; - break; - } - } - - if (ok == false) { - break; - } - } - - if (ok) { - new_list.push_back (*i); - } else { - i->configuration_will_change.disconnect (); - i->configuration_has_changed.disconnect (); - i->ports_will_change.disconnect (); - i->ports_have_changed.disconnect (); - } - } - - list = new_list; -} - - -int -IO::disconnect_input (Port* our_port, string other_port, void* src) -{ - if (other_port.length() == 0 || our_port == 0) { - return 0; - } - - { - BLOCK_PROCESS_CALLBACK (); - - { - Glib::Mutex::Lock lm (io_lock); - - /* check that our_port is really one of ours */ - - if ( ! _inputs.contains(our_port)) { - return -1; - } - - /* disconnect it from the source */ - - if (_session.engine().disconnect (other_port, our_port->name())) { - error << string_compose(_("IO: cannot disconnect input port %1 from %2"), our_port->name(), other_port) << endmsg; - return -1; - } - - check_bundles_connected_to_inputs (); - } - } - - input_changed (ConnectionsChanged, src); /* EMIT SIGNAL */ - _session.set_dirty (); - - return 0; -} - -int -IO::connect_input (Port* our_port, string other_port, void* src) -{ - if (other_port.length() == 0 || our_port == 0) { - return 0; - } - - { - BLOCK_PROCESS_CALLBACK (); - - { - Glib::Mutex::Lock lm (io_lock); - - /* check that our_port is really one of ours */ - - if ( ! _inputs.contains(our_port) ) { - return -1; - } - - /* connect it to the source */ - - if (_session.engine().connect (other_port, our_port->name())) { - return -1; - } - } - } - - input_changed (ConnectionsChanged, src); /* EMIT SIGNAL */ - _session.set_dirty (); - return 0; -} - -int -IO::disconnect_output (Port* our_port, string other_port, void* src) -{ - if (other_port.length() == 0 || our_port == 0) { - return 0; - } - - { - BLOCK_PROCESS_CALLBACK (); - - { - Glib::Mutex::Lock lm (io_lock); - - /* check that our_port is really one of ours */ - - if ( ! _outputs.contains(our_port) ) { - return -1; - } - - /* disconnect it from the destination */ - - if (_session.engine().disconnect (our_port->name(), other_port)) { - error << string_compose(_("IO: cannot disconnect output port %1 from %2"), our_port->name(), other_port) << endmsg; - return -1; - } - - check_bundles_connected_to_outputs (); - } - } - - output_changed (ConnectionsChanged, src); /* EMIT SIGNAL */ - _session.set_dirty (); - return 0; -} - -int -IO::connect_output (Port* our_port, string other_port, void* src) -{ - if (other_port.length() == 0 || our_port == 0) { - return 0; - } - - { - BLOCK_PROCESS_CALLBACK (); - - - { - Glib::Mutex::Lock lm (io_lock); - - /* check that our_port is really one of ours */ - - if ( ! _outputs.contains(our_port) ) { - return -1; - } - - /* connect it to the destination */ - - if (_session.engine().connect (our_port->name(), other_port)) { - return -1; - } - } - } - - output_changed (ConnectionsChanged, src); /* EMIT SIGNAL */ - _session.set_dirty (); - return 0; -} - -int -IO::set_input (Port* other_port, void* src) -{ - /* this removes all but one ports, and connects that one port - to the specified source. - */ - - if (_input_minimum.n_total() > 1) { - /* sorry, you can't do this */ - return -1; - } - - if (other_port == 0) { - if (_input_minimum == ChanCount::ZERO) { - return ensure_inputs (ChanCount::ZERO, false, true, src); - } else { - return -1; - } - } - - if (ensure_inputs (ChanCount(other_port->type(), 1), true, true, src)) { - return -1; - } - - return connect_input (_inputs.port(0), other_port->name(), src); -} - -int -IO::remove_output_port (Port* port, void* src) -{ - IOChange change (NoChange); - - { - BLOCK_PROCESS_CALLBACK (); - - - { - Glib::Mutex::Lock lm (io_lock); - - if (n_outputs() <= _output_minimum) { - /* sorry, you can't do this */ - return -1; - } - - if (_outputs.remove(port)) { - change = IOChange (change|ConfigurationChanged); - - if (port->connected()) { - change = IOChange (change|ConnectionsChanged); - } - - _session.engine().unregister_port (*port); - check_bundles_connected_to_outputs (); - - setup_peak_meters (); - reset_panner (); - } - } - - PortCountChanged (n_outputs()); /* EMIT SIGNAL */ - } - - if (change == ConnectionsChanged) { - setup_bundles_for_inputs_and_outputs (); - } - - if (change != NoChange) { - output_changed (change, src); - _session.set_dirty (); - return 0; - } - - return -1; -} - -/** Add an output port. - * - * @param destination Name of input port to connect new port to. - * @param src Source for emitted ConfigurationChanged signal. - * @param type Data type of port. Default value (NIL) will use this IO's default type. - */ -int -IO::add_output_port (string destination, void* src, DataType type) -{ - Port* our_port; - - if (type == DataType::NIL) - type = _default_type; - - { - BLOCK_PROCESS_CALLBACK (); - - - { - Glib::Mutex::Lock lm (io_lock); - - if (n_outputs() >= _output_maximum) { - return -1; - } - - /* Create a new output port */ - - string portname = build_legal_port_name (type, false); - - if ((our_port = _session.engine().register_output_port (type, portname, _public_ports)) == 0) { - error << string_compose(_("IO: cannot register output port %1"), portname) << endmsg; - return -1; - } - - _outputs.add (our_port); - setup_peak_meters (); - reset_panner (); - } - - PortCountChanged (n_outputs()); /* EMIT SIGNAL */ - } - - if (destination.length()) { - if (_session.engine().connect (our_port->name(), destination)) { - return -1; - } - } - - // pan_changed (src); /* EMIT SIGNAL */ - output_changed (ConfigurationChanged, src); /* EMIT SIGNAL */ - setup_bundles_for_inputs_and_outputs (); - _session.set_dirty (); - - return 0; -} - -int -IO::remove_input_port (Port* port, void* src) -{ - IOChange change (NoChange); - - { - BLOCK_PROCESS_CALLBACK (); - - - { - Glib::Mutex::Lock lm (io_lock); - - if (n_inputs() <= _input_minimum) { - /* sorry, you can't do this */ - return -1; - } - - if (_inputs.remove(port)) { - change = IOChange (change|ConfigurationChanged); - - if (port->connected()) { - change = IOChange (change|ConnectionsChanged); - } - - _session.engine().unregister_port (*port); - check_bundles_connected_to_inputs (); - - setup_peak_meters (); - reset_panner (); - } - } - - PortCountChanged (n_inputs ()); /* EMIT SIGNAL */ - } - - if (change == ConfigurationChanged) { - setup_bundles_for_inputs_and_outputs (); - } - - if (change != NoChange) { - input_changed (change, src); - _session.set_dirty (); - return 0; - } - - return -1; -} - - -/** Add an input port. - * - * @param type Data type of port. The appropriate port type, and @ref Port will be created. - * @param destination Name of input port to connect new port to. - * @param src Source for emitted ConfigurationChanged signal. - */ -int -IO::add_input_port (string source, void* src, DataType type) -{ - Port* our_port; - - if (type == DataType::NIL) - type = _default_type; - - { - BLOCK_PROCESS_CALLBACK (); - - { - Glib::Mutex::Lock lm (io_lock); - - if (n_inputs() >= _input_maximum) { - return -1; - } - - /* Create a new input port */ - - string portname = build_legal_port_name (type, true); - - if ((our_port = _session.engine().register_input_port (type, portname, _public_ports)) == 0) { - error << string_compose(_("IO: cannot register input port %1"), portname) << endmsg; - return -1; - } - - _inputs.add (our_port); - setup_peak_meters (); - reset_panner (); - } - - PortCountChanged (n_inputs()); /* EMIT SIGNAL */ - } - - if (source.length()) { - - if (_session.engine().connect (source, our_port->name())) { - return -1; - } - } - - // pan_changed (src); /* EMIT SIGNAL */ - input_changed (ConfigurationChanged, src); /* EMIT SIGNAL */ - setup_bundles_for_inputs_and_outputs (); - _session.set_dirty (); - - return 0; -} - -int -IO::disconnect_inputs (void* src) -{ - { - BLOCK_PROCESS_CALLBACK (); - - { - Glib::Mutex::Lock lm (io_lock); - - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - _session.engine().disconnect (*i); - } - - check_bundles_connected_to_inputs (); - } - } - - input_changed (ConnectionsChanged, src); /* EMIT SIGNAL */ - - return 0; -} - -int -IO::disconnect_outputs (void* src) -{ - { - BLOCK_PROCESS_CALLBACK (); - - { - Glib::Mutex::Lock lm (io_lock); - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - _session.engine().disconnect (*i); - } - - check_bundles_connected_to_outputs (); - } - } - - output_changed (ConnectionsChanged, src); /* EMIT SIGNAL */ - _session.set_dirty (); - - return 0; -} - -bool -IO::ensure_inputs_locked (ChanCount count, bool clear, void* src) -{ - Port* input_port = 0; - bool changed = false; - - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - - const size_t n = count.get(*t); - - /* remove unused ports */ - for (size_t i = n_inputs().get(*t); i > n; --i) { - input_port = _inputs.port(*t, i-1); - - assert(input_port); - _inputs.remove(input_port); - _session.engine().unregister_port (*input_port); - - changed = true; - } - - /* create any necessary new ports */ - while (n_inputs().get(*t) < n) { - - string portname = build_legal_port_name (*t, true); - - try { - - if ((input_port = _session.engine().register_input_port (*t, portname, _public_ports)) == 0) { - error << string_compose(_("IO: cannot register input port %1"), portname) << endmsg; - return -1; - } - } - - catch (AudioEngine::PortRegistrationFailure& err) { - setup_peak_meters (); - reset_panner (); - /* pass it on */ - throw AudioEngine::PortRegistrationFailure(); - } - - _inputs.add (input_port); - changed = true; - } - } - - if (changed) { - check_bundles_connected_to_inputs (); - setup_peak_meters (); - reset_panner (); - PortCountChanged (n_inputs()); /* EMIT SIGNAL */ - _session.set_dirty (); - } - - if (clear) { - /* disconnect all existing ports so that we get a fresh start */ - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - _session.engine().disconnect (*i); - } - } - - return changed; -} - -/** Attach output_buffers to port buffers. - * - * Connected to IO's own PortCountChanged signal. - */ -void -IO::attach_buffers(ChanCount ignored) -{ - _output_buffers->attach_buffers(_outputs); -} - -int -IO::ensure_io (ChanCount in, ChanCount out, bool clear, void* src) -{ - bool in_changed = false; - bool out_changed = false; - bool need_pan_reset = false; - - in = min (_input_maximum, in); - - out = min (_output_maximum, out); - - if (in == n_inputs() && out == n_outputs() && !clear) { - return 0; - } - - { - BLOCK_PROCESS_CALLBACK (); - Glib::Mutex::Lock lm (io_lock); - - Port* port; - - if (n_outputs() != out) { - need_pan_reset = true; - } - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - - const size_t nin = in.get(*t); - const size_t nout = out.get(*t); - - Port* output_port = 0; - Port* input_port = 0; - - /* remove unused output ports */ - for (size_t i = n_outputs().get(*t); i > nout; --i) { - output_port = _outputs.port(*t, i-1); - - assert(output_port); - _outputs.remove(output_port); - _session.engine().unregister_port (*output_port); - - out_changed = true; - } - - /* remove unused input ports */ - for (size_t i = n_inputs().get(*t); i > nin; --i) { - input_port = _inputs.port(*t, i-1); - - assert(input_port); - _inputs.remove(input_port); - _session.engine().unregister_port (*input_port); - - in_changed = true; - } - - /* create any necessary new input ports */ - - while (n_inputs().get(*t) < nin) { - - string portname = build_legal_port_name (*t, true); - - try { - if ((port = _session.engine().register_input_port (*t, portname, _public_ports)) == 0) { - error << string_compose(_("IO: cannot register input port %1"), portname) << endmsg; - return -1; - } - } - - catch (AudioEngine::PortRegistrationFailure& err) { - setup_peak_meters (); - reset_panner (); - /* pass it on */ - throw AudioEngine::PortRegistrationFailure(); - } - - _inputs.add (port); - in_changed = true; - } - - /* create any necessary new output ports */ - - while (n_outputs().get(*t) < nout) { - - string portname = build_legal_port_name (*t, false); - - try { - if ((port = _session.engine().register_output_port (*t, portname, _public_ports)) == 0) { - error << string_compose(_("IO: cannot register output port %1"), portname) << endmsg; - return -1; - } - } - - catch (AudioEngine::PortRegistrationFailure& err) { - setup_peak_meters (); - reset_panner (); - /* pass it on */ - throw AudioEngine::PortRegistrationFailure (); - } - - _outputs.add (port); - out_changed = true; - } - } - - if (clear) { - - /* disconnect all existing ports so that we get a fresh start */ - - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - _session.engine().disconnect (*i); - } - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - _session.engine().disconnect (*i); - } - } - - if (in_changed || out_changed) { - setup_peak_meters (); - reset_panner (); - } - } - - if (out_changed) { - check_bundles_connected_to_outputs (); - output_changed (ConfigurationChanged, src); /* EMIT SIGNAL */ - } - - if (in_changed) { - check_bundles_connected_to_inputs (); - input_changed (ConfigurationChanged, src); /* EMIT SIGNAL */ - } - - if (in_changed || out_changed) { - PortCountChanged (max (n_outputs(), n_inputs())); /* EMIT SIGNAL */ - setup_bundles_for_inputs_and_outputs (); - _session.set_dirty (); - } - - return 0; -} - -int -IO::ensure_inputs (ChanCount count, bool clear, bool lockit, void* src) -{ - bool changed = false; - - count = min (_input_maximum, count); - - if (count == n_inputs() && !clear) { - return 0; - } - - if (lockit) { - BLOCK_PROCESS_CALLBACK (); - Glib::Mutex::Lock im (io_lock); - changed = ensure_inputs_locked (count, clear, src); - } else { - changed = ensure_inputs_locked (count, clear, src); - } - - if (changed) { - input_changed (ConfigurationChanged, src); /* EMIT SIGNAL */ - setup_bundles_for_inputs_and_outputs (); - _session.set_dirty (); - } - return 0; -} - -bool -IO::ensure_outputs_locked (ChanCount count, bool clear, void* src) -{ - Port* output_port = 0; - bool changed = false; - bool need_pan_reset = false; - - if (n_outputs() != count) { - need_pan_reset = true; - } - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - - const size_t n = count.get(*t); - - /* remove unused ports */ - for (size_t i = n_outputs().get(*t); i > n; --i) { - output_port = _outputs.port(*t, i-1); - - assert(output_port); - _outputs.remove(output_port); - _session.engine().unregister_port (*output_port); - - changed = true; - } - - /* create any necessary new ports */ - while (n_outputs().get(*t) < n) { - - string portname = build_legal_port_name (*t, false); - - if ((output_port = _session.engine().register_output_port (*t, portname, _public_ports)) == 0) { - error << string_compose(_("IO: cannot register output port %1"), portname) << endmsg; - return -1; - } - - _outputs.add (output_port); - changed = true; - setup_peak_meters (); - - if (need_pan_reset) { - reset_panner (); - } - } - } - - if (changed) { - check_bundles_connected_to_outputs (); - PortCountChanged (n_outputs()); /* EMIT SIGNAL */ - _session.set_dirty (); - } - - if (clear) { - /* disconnect all existing ports so that we get a fresh start */ - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - _session.engine().disconnect (*i); - } - } - - return changed; -} - -int -IO::ensure_outputs (ChanCount count, bool clear, bool lockit, void* src) -{ - bool changed = false; - - if (_output_maximum < ChanCount::INFINITE) { - count = min (_output_maximum, count); - if (count == n_outputs() && !clear) { - return 0; - } - } - - /* XXX caller should hold io_lock, but generally doesn't */ - - if (lockit) { - BLOCK_PROCESS_CALLBACK (); - Glib::Mutex::Lock im (io_lock); - changed = ensure_outputs_locked (count, clear, src); - } else { - changed = ensure_outputs_locked (count, clear, src); - } - - if (changed) { - output_changed (ConfigurationChanged, src); /* EMIT SIGNAL */ - setup_bundles_for_inputs_and_outputs (); - } - - return 0; -} - -gain_t -IO::effective_gain () const -{ - if (_gain_control->list()->automation_playback()) { - return _gain_control->get_value(); - } else { - return _desired_gain; - } -} - -void -IO::reset_panner () -{ - if (panners_legal) { - if (!no_panner_reset) { - _panner->reset (n_outputs().n_audio(), pans_required()); - } - } else { - panner_legal_c.disconnect (); - panner_legal_c = PannersLegal.connect (mem_fun (*this, &IO::panners_became_legal)); - } -} - -int -IO::panners_became_legal () -{ - _panner->reset (n_outputs().n_audio(), pans_required()); - _panner->load (); // automation - panner_legal_c.disconnect (); - return 0; -} - -void -IO::defer_pan_reset () -{ - no_panner_reset = true; -} - -void -IO::allow_pan_reset () -{ - no_panner_reset = false; - reset_panner (); -} - - -XMLNode& -IO::get_state (void) -{ - return state (true); -} - -XMLNode& -IO::state (bool full_state) -{ - XMLNode* node = new XMLNode (state_node_name); - char buf[64]; - string str; - vector::iterator ci; - int n; - LocaleGuard lg (X_("POSIX")); - Glib::Mutex::Lock lm (io_lock); - - node->add_property("name", _name); - id().print (buf, sizeof (buf)); - node->add_property("id", buf); - - for ( - std::vector::iterator i = _bundles_connected_to_inputs.begin(); - i != _bundles_connected_to_inputs.end(); - ++i - ) - { - XMLNode* n = new XMLNode ("InputBundle"); - n->add_property ("name", i->bundle->name ()); - node->add_child_nocopy (*n); - } - - for ( - std::vector::iterator i = _bundles_connected_to_outputs.begin(); - i != _bundles_connected_to_outputs.end(); - ++i - ) - { - XMLNode* n = new XMLNode ("OutputBundle"); - n->add_property ("name", i->bundle->name ()); - node->add_child_nocopy (*n); - } - - str = ""; - - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - - vector connections; - - if (i->get_connections (connections)) { - - str += '{'; - - for (n = 0, ci = connections.begin(); ci != connections.end(); ++ci, ++n) { - if (n) { - str += ','; - } - - /* if its a connection to our own port, - return only the port name, not the - whole thing. this allows connections - to be re-established even when our - client name is different. - */ - - str += _session.engine().make_port_name_relative (*ci); - } - - str += '}'; - - } else { - str += "{}"; - } - } - - node->add_property ("inputs", str); - - str = ""; - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - - vector connections; - - if (i->get_connections (connections)) { - - str += '{'; - - for (n = 0, ci = connections.begin(); ci != connections.end(); ++ci, ++n) { - if (n) { - str += ','; - } - - str += _session.engine().make_port_name_relative (*ci); - } - - str += '}'; - - } else { - str += "{}"; - } - } - - node->add_property ("outputs", str); - - node->add_child_nocopy (_panner->state (full_state)); - node->add_child_nocopy (_gain_control->get_state ()); - - snprintf (buf, sizeof(buf), "%2.12f", gain()); - node->add_property ("gain", buf); - - /* To make backwards compatibility a bit easier, write ChanCount::INFINITE to the session file - as -1. - */ - - int const in_max = _input_maximum == ChanCount::INFINITE ? -1 : _input_maximum.get(_default_type); - int const out_max = _output_maximum == ChanCount::INFINITE ? -1 : _output_maximum.get(_default_type); - - snprintf (buf, sizeof(buf)-1, "%d,%d,%d,%d", _input_minimum.get(_default_type), in_max, _output_minimum.get(_default_type), out_max); - - node->add_property ("iolimits", buf); - - /* automation */ - - if (full_state) - node->add_child_nocopy (get_automation_state()); - - return *node; -} - -int -IO::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - XMLNodeConstIterator iter; - LocaleGuard lg (X_("POSIX")); - - /* force use of non-localized representation of decimal point, - since we use it a lot in XML files and so forth. - */ - - if (node.name() != state_node_name) { - error << string_compose(_("incorrect XML node \"%1\" passed to IO object"), node.name()) << endmsg; - return -1; - } - - if ((prop = node.property ("name")) != 0) { - _name = prop->value(); - /* used to set panner name with this, but no more */ - } - - if ((prop = node.property ("id")) != 0) { - _id = prop->value (); - } - - int in_min = -1; - int in_max = -1; - int out_min = -1; - int out_max = -1; - - if ((prop = node.property ("iolimits")) != 0) { - sscanf (prop->value().c_str(), "%d,%d,%d,%d", - &in_min, &in_max, &out_min, &out_max); - - /* Correct for the difference between the way we write things to session files and the - way things are described by ChanCount; see comments in io.h about what the different - ChanCount values mean. */ - - if (in_min < 0) { - _input_minimum = ChanCount::ZERO; - } else { - _input_minimum = ChanCount (_default_type, in_min); - } - - if (in_max < 0) { - _input_maximum = ChanCount::INFINITE; - } else { - _input_maximum = ChanCount (_default_type, in_max); - } - - if (out_min < 0) { - _output_minimum = ChanCount::ZERO; - } else { - _output_minimum = ChanCount (_default_type, out_min); - } - - if (out_max < 0) { - _output_maximum = ChanCount::INFINITE; - } else { - _output_maximum = ChanCount (_default_type, out_max); - } - } - - if ((prop = node.property ("gain")) != 0) { - set_gain (atof (prop->value().c_str()), this); - _gain = _desired_gain; - } - - if ((prop = node.property ("automation-state")) != 0 || (prop = node.property ("automation-style")) != 0) { - /* old school automation handling */ - } - - for (iter = node.children().begin(); iter != node.children().end(); ++iter) { - - if ((*iter)->name() == "Panner") { - if (_panner == 0) { - _panner = new Panner (_name, _session); - } - _panner->set_state (**iter); - } - - if ((*iter)->name() == X_("Automation")) { - - set_automation_state (*(*iter), Parameter(GainAutomation)); - } - - if ((*iter)->name() == X_("controllable")) { - if ((prop = (*iter)->property("name")) != 0 && prop->value() == "gaincontrol") { - _gain_control->set_state (**iter); - } - } - } - - if (ports_legal) { - - if (create_ports (node)) { - return -1; - } - - } else { - - port_legal_c = PortsLegal.connect (mem_fun (*this, &IO::ports_became_legal)); - } - - if (panners_legal) { - reset_panner (); - } else { - panner_legal_c = PannersLegal.connect (mem_fun (*this, &IO::panners_became_legal)); - } - - if (connecting_legal) { - - if (make_connections (node)) { - return -1; - } - - } else { - - connection_legal_c = ConnectingLegal.connect (mem_fun (*this, &IO::connecting_became_legal)); - } - - if (!ports_legal || !connecting_legal) { - pending_state_node = new XMLNode (node); - } - - return 0; -} - -int -IO::load_automation (string path) -{ - string fullpath; - ifstream in; - char line[128]; - uint32_t linecnt = 0; - float version; - LocaleGuard lg (X_("POSIX")); - - fullpath = _session.automation_dir(); - fullpath += path; - - in.open (fullpath.c_str()); - - if (!in) { - fullpath = _session.automation_dir(); - fullpath += _session.snap_name(); - fullpath += '-'; - fullpath += path; - - in.open (fullpath.c_str()); - - if (!in) { - error << string_compose(_("%1: cannot open automation event file \"%2\""), _name, fullpath) << endmsg; - return -1; - } - } - - clear_automation (); - - while (in.getline (line, sizeof(line), '\n')) { - char type; - nframes_t when; - double value; - - if (++linecnt == 1) { - if (memcmp (line, "version", 7) == 0) { - if (sscanf (line, "version %f", &version) != 1) { - error << string_compose(_("badly formed version number in automation event file \"%1\""), path) << endmsg; - return -1; - } - } else { - error << string_compose(_("no version information in automation event file \"%1\""), path) << endmsg; - return -1; - } - - continue; - } - - if (sscanf (line, "%c %" PRIu32 " %lf", &type, &when, &value) != 3) { - warning << string_compose(_("badly formatted automation event record at line %1 of %2 (ignored)"), linecnt, path) << endmsg; - continue; - } - - switch (type) { - case 'g': - _gain_control->list()->fast_simple_add (when, value); - break; - - case 's': - break; - - case 'm': - break; - - case 'p': - /* older (pre-1.0) versions of ardour used this */ - break; - - default: - warning << _("dubious automation event found (and ignored)") << endmsg; - } - } - - return 0; -} - -int -IO::connecting_became_legal () -{ - int ret; - - if (pending_state_node == 0) { - fatal << _("IO::connecting_became_legal() called without a pending state node") << endmsg; - /*NOTREACHED*/ - return -1; - } - - connection_legal_c.disconnect (); - - ret = make_connections (*pending_state_node); - - if (ports_legal) { - delete pending_state_node; - pending_state_node = 0; - } - - return ret; -} -int -IO::ports_became_legal () -{ - int ret; - - if (pending_state_node == 0) { - fatal << _("IO::ports_became_legal() called without a pending state node") << endmsg; - /*NOTREACHED*/ - return -1; - } - - port_legal_c.disconnect (); - - ret = create_ports (*pending_state_node); - - if (connecting_legal) { - delete pending_state_node; - pending_state_node = 0; - } - - return ret; -} - -int -IO::create_ports (const XMLNode& node) -{ - XMLProperty const * prop; - int num_inputs = 0; - int num_outputs = 0; - - if ((prop = node.property ("inputs")) != 0) { - num_inputs = count (prop->value().begin(), prop->value().end(), '{'); - } else if ((prop = node.property ("outputs")) != 0) { - num_outputs = count (prop->value().begin(), prop->value().end(), '{'); - } - - no_panner_reset = true; - - // FIXME: audio-only - if (ensure_io (ChanCount(DataType::AUDIO, num_inputs), ChanCount(DataType::AUDIO, num_outputs), true, this)) { - error << string_compose(_("%1: cannot create I/O ports"), _name) << endmsg; - return -1; - } - - no_panner_reset = false; - - set_deferred_state (); - - PortsCreated(); - return 0; -} - - -int -IO::make_connections (const XMLNode& node) -{ - XMLProperty const * prop; - - if ((prop = node.property ("inputs")) != 0) { - if (set_inputs (prop->value())) { - error << string_compose(_("improper input channel list in XML node (%1)"), prop->value()) << endmsg; - return -1; - } - } - - - if ((prop = node.property ("outputs")) != 0) { - if (set_outputs (prop->value())) { - error << string_compose(_("improper output channel list in XML node (%1)"), prop->value()) << endmsg; - return -1; - } - } - - for (XMLNodeConstIterator i = node.children().begin(); i != node.children().end(); ++i) { - - if ((*i)->name() == "InputBundle") { - XMLProperty const * prop = (*i)->property ("name"); - if (prop) { - boost::shared_ptr b = _session.bundle_by_name (prop->value()); - if (b) { - connect_input_ports_to_bundle (b, this); - } else { - error << string_compose(_("Unknown bundle \"%1\" listed for input of %2"), prop->value(), _name) << endmsg; - } - } - - } else if ((*i)->name() == "OutputBundle") { - XMLProperty const * prop = (*i)->property ("name"); - if (prop) { - boost::shared_ptr b = _session.bundle_by_name (prop->value()); - if (b) { - connect_output_ports_to_bundle (b, this); - } else { - error << string_compose(_("Unknown bundle \"%1\" listed for output of %2"), prop->value(), _name) << endmsg; - } - } - } - } - - return 0; -} - -int -IO::set_inputs (const string& str) -{ - vector ports; - int i; - int n; - uint32_t nports; - - if ((nports = count (str.begin(), str.end(), '{')) == 0) { - return 0; - } - - // FIXME: audio-only - if (ensure_inputs (ChanCount(DataType::AUDIO, nports), true, true, this)) { - return -1; - } - - string::size_type start, end, ostart; - - ostart = 0; - start = 0; - end = 0; - i = 0; - - while ((start = str.find_first_of ('{', ostart)) != string::npos) { - start += 1; - - if ((end = str.find_first_of ('}', start)) == string::npos) { - error << string_compose(_("IO: badly formed string in XML node for inputs \"%1\""), str) << endmsg; - return -1; - } - - if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) { - error << string_compose(_("bad input string in XML node \"%1\""), str) << endmsg; - - return -1; - - } else if (n > 0) { - - for (int x = 0; x < n; ++x) { - connect_input (input (i), ports[x], this); - } - } - - ostart = end+1; - i++; - } - - return 0; -} - -int -IO::set_outputs (const string& str) -{ - vector ports; - int i; - int n; - uint32_t nports; - - if ((nports = count (str.begin(), str.end(), '{')) == 0) { - return 0; - } - - // FIXME: audio-only - if (ensure_outputs (ChanCount(DataType::AUDIO, nports), true, true, this)) { - return -1; - } - - string::size_type start, end, ostart; - - ostart = 0; - start = 0; - end = 0; - i = 0; - - while ((start = str.find_first_of ('{', ostart)) != string::npos) { - start += 1; - - if ((end = str.find_first_of ('}', start)) == string::npos) { - error << string_compose(_("IO: badly formed string in XML node for outputs \"%1\""), str) << endmsg; - return -1; - } - - if ((n = parse_io_string (str.substr (start, end - start), ports)) < 0) { - error << string_compose(_("IO: bad output string in XML node \"%1\""), str) << endmsg; - - return -1; - - } else if (n > 0) { - - for (int x = 0; x < n; ++x) { - connect_output (output (i), ports[x], this); - } - } - - ostart = end+1; - i++; - } - - return 0; -} - -int -IO::parse_io_string (const string& str, vector& ports) -{ - string::size_type pos, opos; - - if (str.length() == 0) { - return 0; - } - - pos = 0; - opos = 0; - - ports.clear (); - - while ((pos = str.find_first_of (',', opos)) != string::npos) { - ports.push_back (str.substr (opos, pos - opos)); - opos = pos + 1; - } - - if (opos < str.length()) { - ports.push_back (str.substr(opos)); - } - - return ports.size(); -} - -int -IO::parse_gain_string (const string& str, vector& ports) -{ - string::size_type pos, opos; - - pos = 0; - opos = 0; - ports.clear (); - - while ((pos = str.find_first_of (',', opos)) != string::npos) { - ports.push_back (str.substr (opos, pos - opos)); - opos = pos + 1; - } - - if (opos < str.length()) { - ports.push_back (str.substr(opos)); - } - - return ports.size(); -} - -bool -IO::set_name (const string& requested_name) -{ - if (requested_name == _name) { - return true; - } - - string name; - Route *rt; - if ( (rt = dynamic_cast(this))) { - name = Route::ensure_track_or_route_name(requested_name, _session); - } else { - name = requested_name; - } - - - /* replace all colons in the name. i wish we didn't have to do this */ - - if (replace_all (name, ":", "-")) { - warning << _("you cannot use colons to name objects with I/O connections") << endmsg; - } - - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - string current_name = i->short_name(); - current_name.replace (current_name.find (_name), _name.length(), name); - i->set_name (current_name); - } - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - string current_name = i->short_name(); - current_name.replace (current_name.find (_name), _name.length(), name); - i->set_name (current_name); - } - - bool const r = SessionObject::set_name(name); - - setup_bundles_for_inputs_and_outputs (); - - return r; -} - -void -IO::set_input_minimum (ChanCount n) -{ - _input_minimum = n; -} - -void -IO::set_input_maximum (ChanCount n) -{ - _input_maximum = n; -} - -void -IO::set_output_minimum (ChanCount n) -{ - _output_minimum = n; -} - -void -IO::set_output_maximum (ChanCount n) -{ - _output_maximum = n; -} - -void -IO::set_port_latency (nframes_t nframes) -{ - Glib::Mutex::Lock lm (io_lock); - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - i->set_latency (nframes); - } -} - -nframes_t -IO::output_latency () const -{ - nframes_t max_latency; - nframes_t latency; - - max_latency = 0; - - /* io lock not taken - must be protected by other means */ - - for (PortSet::const_iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - if ((latency = _session.engine().get_port_total_latency (*i)) > max_latency) { - max_latency = latency; - } - } - - return max_latency; -} - -nframes_t -IO::input_latency () const -{ - nframes_t max_latency; - nframes_t latency; - - max_latency = 0; - - /* io lock not taken - must be protected by other means */ - - for (PortSet::const_iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - if ((latency = _session.engine().get_port_total_latency (*i)) > max_latency) { - max_latency = latency; - } - } - - return max_latency; -} - -int -IO::connect_input_ports_to_bundle (boost::shared_ptr c, void* src) -{ - { - BLOCK_PROCESS_CALLBACK (); - Glib::Mutex::Lock lm2 (io_lock); - - /* Connect to the bundle, not worrying about any connections - that are already made. */ - - uint32_t const channels = c->nchannels (); - - for (uint32_t n = 0; n < channels; ++n) { - const PortList& pl = c->channel_ports (n); - - for (PortList::const_iterator i = pl.begin(); i != pl.end(); ++i) { - - if (!_inputs.port(n)->connected_to (*i)) { - - if (_session.engine().connect (*i, _inputs.port(n)->name())) { - return -1; - } - } - - } - } - - /* If this is a UserBundle, make a note of what we've done */ - - boost::shared_ptr ub = boost::dynamic_pointer_cast (c); - if (ub) { - - /* See if we already know about this one */ - std::vector::iterator i = _bundles_connected_to_inputs.begin(); - while (i != _bundles_connected_to_inputs.end() && i->bundle != ub) { - ++i; - } - - if (i == _bundles_connected_to_inputs.end()) { - /* We don't, so make a note */ - _bundles_connected_to_inputs.push_back (UserBundleInfo (this, ub)); - } - } - } - - input_changed (IOChange (ConfigurationChanged|ConnectionsChanged), src); /* EMIT SIGNAL */ - return 0; -} - -int -IO::connect_output_ports_to_bundle (boost::shared_ptr c, void* src) -{ - { - BLOCK_PROCESS_CALLBACK (); - Glib::Mutex::Lock lm2 (io_lock); - - /* Connect to the bundle, not worrying about any connections - that are already made. */ - - uint32_t const channels = c->nchannels (); - - for (uint32_t n = 0; n < channels; ++n) { - - const PortList& pl = c->channel_ports (n); - - for (PortList::const_iterator i = pl.begin(); i != pl.end(); ++i) { - - if (!_outputs.port(n)->connected_to (*i)) { - - if (_session.engine().connect (_outputs.port(n)->name(), *i)) { - return -1; - } - } - } - } - - /* If this is a UserBundle, make a note of what we've done */ - - boost::shared_ptr ub = boost::dynamic_pointer_cast (c); - if (ub) { - - /* See if we already know about this one */ - std::vector::iterator i = _bundles_connected_to_outputs.begin(); - while (i != _bundles_connected_to_outputs.end() && i->bundle != ub) { - ++i; - } - - if (i == _bundles_connected_to_outputs.end()) { - /* We don't, so make a note */ - _bundles_connected_to_outputs.push_back (UserBundleInfo (this, ub)); - } - } - } - - output_changed (IOChange (ConnectionsChanged|ConfigurationChanged), src); /* EMIT SIGNAL */ - - return 0; -} - -int -IO::disable_connecting () -{ - connecting_legal = false; - return 0; -} - -int -IO::enable_connecting () -{ - connecting_legal = true; - return ConnectingLegal (); -} - -int -IO::disable_ports () -{ - ports_legal = false; - return 0; -} - -int -IO::enable_ports () -{ - ports_legal = true; - return PortsLegal (); -} - -int -IO::disable_panners (void) -{ - panners_legal = false; - return 0; -} - -int -IO::reset_panners () -{ - panners_legal = true; - return PannersLegal (); -} - -void -IO::bundle_configuration_will_change () -{ - //XXX -// connect_input_ports_to_bundle (_input_bundle, this); -} - -void -IO::bundle_configuration_has_changed () -{ - //XXX -// connect_input_ports_to_bundle (_input_bundle, this); -} - -void -IO::bundle_ports_will_change (int ignored) -{ -//XXX -// connect_output_ports_to_bundle (_output_bundle, this); -} - -void -IO::bundle_ports_have_changed (int ignored) -{ - //XXX -// connect_output_ports_to_bundle (_output_bundle, this); -} - -void -IO::GainControl::set_value (float val) -{ - // max gain at about +6dB (10.0 ^ ( 6 dB * 0.05)) - if (val > 1.99526231f) - val = 1.99526231f; - - _user_value = val; - _io.set_gain (val, this); - - Changed(); /* EMIT SIGNAL */ -} - -float -IO::GainControl::get_value (void) const -{ - return AutomationControl::get_value(); -} - -void -IO::setup_peak_meters() -{ - ChanCount max_streams = std::max(_inputs.count(), _outputs.count()); - _meter->configure_io(max_streams, max_streams); -} - -/** - Update the peak meters. - - The meter signal lock is taken to prevent modification of the - Meter signal while updating the meters, taking the meter signal - lock prior to taking the io_lock ensures that all IO will remain - valid while metering. -*/ -void -IO::update_meters() -{ - Glib::Mutex::Lock guard (m_meter_signal_lock); - Meter(); /* EMIT SIGNAL */ -} - -void -IO::meter () -{ - // FIXME: Ugly. Meter should manage the lock, if it's necessary - - Glib::Mutex::Lock lm (io_lock); // READER: meter thread. - _meter->meter(); -} - -void -IO::clear_automation () -{ - Automatable::clear_automation (); // clears gain automation - _panner->clear_automation (); -} - -void -IO::set_parameter_automation_state (Parameter param, AutoState state) -{ - // XXX: would be nice to get rid of this special hack - - if (param.type() == GainAutomation) { - - bool changed = false; - - { - Glib::Mutex::Lock lm (_automation_lock); - - boost::shared_ptr gain_auto = _gain_control->list(); - - if (state != gain_auto->automation_state()) { - changed = true; - _last_automation_snapshot = 0; - gain_auto->set_automation_state (state); - - if (state != Off) { - // FIXME: shouldn't this use Curve? - set_gain (gain_auto->eval (_session.transport_frame()), this); - } - } - } - - if (changed) { - _session.set_dirty (); - } - - } else { - Automatable::set_parameter_automation_state(param, state); - } -} - -void -IO::inc_gain (gain_t factor, void *src) -{ - if (_desired_gain == 0.0f) - set_gain (0.000001f + (0.000001f * factor), src); - else - set_gain (_desired_gain + (_desired_gain * factor), src); -} - -void -IO::set_gain (gain_t val, void *src) -{ - // max gain at about +6dB (10.0 ^ ( 6 dB * 0.05)) - if (val > 1.99526231f) - val = 1.99526231f; - - if (src != _gain_control.get()) { - _gain_control->set_value(val); - // bit twisty, this will come back and call us again - // (this keeps control in sync with reality) - return; - } - - { - Glib::Mutex::Lock dm (declick_lock); - _desired_gain = val; - } - - if (_session.transport_stopped()) { - _gain = val; - } - - if (_session.transport_stopped() && src != 0 && src != this && _gain_control->list()->automation_write()) { - _gain_control->list()->add (_session.transport_frame(), val); - - } - - _session.set_dirty(); -} - -void -IO::start_pan_touch (uint32_t which) -{ - if (which < _panner->size()) { - (*_panner)[which]->pan_control()->list()->start_touch(); - } -} - -void -IO::end_pan_touch (uint32_t which) -{ - if (which < _panner->size()) { - (*_panner)[which]->pan_control()->list()->stop_touch(); - } - -} - -void -IO::automation_snapshot (nframes_t now, bool force) -{ - Automatable::automation_snapshot (now, force); - - if (_last_automation_snapshot > now || (now - _last_automation_snapshot) > _automation_interval) { - _panner->snapshot (now); - } - - _panner->snapshot (now); - _last_automation_snapshot = now; -} - -void -IO::transport_stopped (nframes_t frame) -{ - _gain_control->list()->reposition_for_rt_add (frame); - - if (_gain_control->list()->automation_state() != Off) { - - /* the src=0 condition is a special signal to not propagate - automation gain changes into the mix group when locating. - */ - - // FIXME: shouldn't this use Curve? - set_gain (_gain_control->list()->eval (frame), 0); - } - - _panner->transport_stopped (frame); -} - -string -IO::build_legal_port_name (DataType type, bool in) -{ - const int name_size = jack_port_name_size(); - int limit; - string suffix; - int maxports; - - if (type == DataType::AUDIO) { - suffix = _("audio"); - } else if (type == DataType::MIDI) { - suffix = _("midi"); - } else { - throw unknown_type(); - } - - if (in) { - suffix += _("_in"); - maxports = _input_maximum.get(type); - } else { - suffix += _("_out"); - maxports = _output_maximum.get(type); - } - - if (maxports == 1) { - // allow space for the slash + the suffix - limit = name_size - _session.engine().client_name().length() - (suffix.length() + 1); - char buf[name_size+1]; - snprintf (buf, name_size+1, ("%.*s/%s"), limit, _name.c_str(), suffix.c_str()); - return string (buf); - } - - // allow up to 4 digits for the output port number, plus the slash, suffix and extra space - - limit = name_size - _session.engine().client_name().length() - (suffix.length() + 5); - - char buf1[name_size+1]; - char buf2[name_size+1]; - - snprintf (buf1, name_size+1, ("%.*s/%s"), limit, _name.c_str(), suffix.c_str()); - - int port_number; - - if (in) { - port_number = find_input_port_hole (buf1); - } else { - port_number = find_output_port_hole (buf1); - } - - snprintf (buf2, name_size+1, "%s %d", buf1, port_number); - - return string (buf2); -} - -int32_t -IO::find_input_port_hole (const char* base) -{ - /* CALLER MUST HOLD IO LOCK */ - - uint32_t n; - - if (_inputs.empty()) { - return 1; - } - - /* we only allow up to 4 characters for the port number - */ - - for (n = 1; n < 9999; ++n) { - char buf[jack_port_name_size()]; - PortSet::iterator i = _inputs.begin(); - - snprintf (buf, jack_port_name_size(), _("%s %u"), base, n); - - for ( ; i != _inputs.end(); ++i) { - if (i->short_name() == buf) { - break; - } - } - - if (i == _inputs.end()) { - break; - } - } - return n; -} - -int32_t -IO::find_output_port_hole (const char* base) -{ - /* CALLER MUST HOLD IO LOCK */ - - uint32_t n; - - if (_outputs.empty()) { - return 1; - } - - /* we only allow up to 4 characters for the port number - */ - - for (n = 1; n < 9999; ++n) { - char buf[jack_port_name_size()]; - PortSet::iterator i = _outputs.begin(); - - snprintf (buf, jack_port_name_size(), _("%s %u"), base, n); - - for ( ; i != _outputs.end(); ++i) { - if (i->short_name() == buf) { - break; - } - } - - if (i == _outputs.end()) { - break; - } - } - - return n; -} - -void -IO::set_active (bool yn) -{ - _active = yn; - active_changed(); /* EMIT SIGNAL */ -} - - -AudioPort* -IO::audio_input(uint32_t n) const -{ - return dynamic_cast(input(n)); -} - -AudioPort* -IO::audio_output(uint32_t n) const -{ - return dynamic_cast(output(n)); -} - -MidiPort* -IO::midi_input(uint32_t n) const -{ - return dynamic_cast(input(n)); -} - -MidiPort* -IO::midi_output(uint32_t n) const -{ - return dynamic_cast(output(n)); -} - -void -IO::set_phase_invert (bool yn, void *src) -{ - if (_phase_invert != yn) { - _phase_invert = yn; - // phase_invert_changed (src); /* EMIT SIGNAL */ - } -} - -void -IO::set_denormal_protection (bool yn, void *src) -{ - if (_denormal_protection != yn) { - _denormal_protection = yn; - // denormal_protection_changed (src); /* EMIT SIGNAL */ - } -} - -void -IO::update_port_total_latencies () -{ - /* io_lock, not taken: function must be called from Session::process() calltree */ - - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - _session.engine().update_total_latency (*i); - } - - for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) { - _session.engine().update_total_latency (*i); - } -} - - -/** - * Setup bundles that describe our inputs and outputs. - */ - -void -IO::setup_bundles_for_inputs_and_outputs () -{ - char buf[32]; - - snprintf(buf, sizeof (buf), _("%s in"), _name.c_str()); - _bundle_for_inputs->set_name (buf); - uint32_t const ni = inputs().num_ports(); - _bundle_for_inputs->set_channels (ni); - for (uint32_t i = 0; i < ni; ++i) { - _bundle_for_inputs->set_port (i, inputs().port(i)->name()); - } - - snprintf(buf, sizeof (buf), _("%s out"), _name.c_str()); - _bundle_for_outputs->set_name (buf); - uint32_t const no = outputs().num_ports(); - _bundle_for_outputs->set_channels (no); - for (uint32_t i = 0; i < no; ++i) { - _bundle_for_outputs->set_port (i, outputs().port(i)->name()); - } -} - - -/** - * Create and setup bundles that describe our inputs and outputs. - */ - -void -IO::create_bundles_for_inputs_and_outputs () -{ - _bundle_for_inputs = boost::shared_ptr (new AutoBundle (true)); - _bundle_for_outputs = boost::shared_ptr (new AutoBundle (false)); - setup_bundles_for_inputs_and_outputs (); -} - -/** Add a bundle to a list if is connected to our inputs. - * @param b Bundle to check. - * @param bundles List to add to. - */ -void -IO::maybe_add_input_bundle_to_list (boost::shared_ptr b, std::vector >* bundles) -{ - boost::shared_ptr ab = boost::dynamic_pointer_cast (b); - if (ab == 0 || ab->ports_are_outputs() == false) { - return; - } - - if (ab->nchannels () != n_inputs().n_total ()) { - return; - } - - for (uint32_t i = 0; i < n_inputs().n_total (); ++i) { - - PortList const & pl = b->channel_ports (i); - - if (pl.empty()) { - return; - } - - if (!input(i)->connected_to (pl[0])) { - return; - } - } - - bundles->push_back (b); -} - -/** @return Bundles connected to our inputs */ -std::vector > -IO::bundles_connected_to_inputs () -{ - std::vector > bundles; - - /* User bundles */ - for (std::vector::iterator i = _bundles_connected_to_inputs.begin(); i != _bundles_connected_to_inputs.end(); ++i) { - bundles.push_back (i->bundle); - } - - /* Auto bundles */ - _session.foreach_bundle ( - sigc::bind (sigc::mem_fun (*this, &IO::maybe_add_input_bundle_to_list), &bundles) - ); - - return bundles; -} - - -/** Add a bundle to a list if is connected to our outputs. - * @param b Bundle to check. - * @param bundles List to add to. - */ -void -IO::maybe_add_output_bundle_to_list (boost::shared_ptr b, std::vector >* bundles) -{ - boost::shared_ptr ab = boost::dynamic_pointer_cast (b); - if (ab == 0 || ab->ports_are_inputs() == false) { - return; - } - - if (ab->nchannels () != n_outputs().n_total ()) { - return; - } - - for (uint32_t i = 0; i < n_outputs().n_total (); ++i) { - - PortList const & pl = b->channel_ports (i); - - if (pl.empty()) { - return; - } - - if (!output(i)->connected_to (pl[0])) { - return; - } - } - - bundles->push_back (b); -} - - -/* @return Bundles connected to our outputs */ -std::vector > -IO::bundles_connected_to_outputs () -{ - std::vector > bundles; - - /* User bundles */ - for (std::vector::iterator i = _bundles_connected_to_outputs.begin(); i != _bundles_connected_to_outputs.end(); ++i) { - bundles.push_back (i->bundle); - } - - /* Auto bundles */ - _session.foreach_bundle ( - sigc::bind (sigc::mem_fun (*this, &IO::maybe_add_output_bundle_to_list), &bundles) - ); - - return bundles; -} - - -IO::UserBundleInfo::UserBundleInfo (IO* io, boost::shared_ptr b) -{ - bundle = b; - configuration_will_change = b->ConfigurationWillChange.connect ( - sigc::mem_fun (*io, &IO::bundle_configuration_will_change) - ); - configuration_has_changed = b->ConfigurationHasChanged.connect ( - sigc::mem_fun (*io, &IO::bundle_configuration_has_changed) - ); - ports_will_change = b->PortsWillChange.connect ( - sigc::mem_fun (*io, &IO::bundle_ports_will_change) - ); - ports_have_changed = b->PortsHaveChanged.connect ( - sigc::mem_fun (*io, &IO::bundle_ports_have_changed) - ); -} - diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc deleted file mode 100644 index 9802c83330..0000000000 --- a/libs/ardour/io_processor.cc +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2001 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -IOProcessor::IOProcessor (Session& s, const string& name, Placement p, - int input_min, int input_max, - int output_min, int output_max) - : Processor(s, name, p) - , _io(new IO(s, name, input_min, input_max, output_min, output_max)) -{ - _active = false; - _sort_key = 0; - _gui = 0; - _extra_xml = 0; -} - -IOProcessor::~IOProcessor () -{ - notify_callbacks (); -} - -XMLNode& -IOProcessor::state (bool full_state) -{ - XMLNode& node = Processor::state(full_state); - - node.add_child_nocopy (_io->state (full_state)); - - return node; -} - -int -IOProcessor::set_state (const XMLNode& node) -{ - const XMLProperty *prop; - - Processor::set_state(node); - - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - bool have_io = false; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == IO::state_node_name) { - have_io = true; - _io->set_state(**niter); - - // legacy sessions: use IO name - if ((prop = node.property ("name")) == 0) { - set_name(_io->name()); - } - } - } - - if (!have_io) { - error << _("XML node describing a redirect is missing an IO node") << endmsg; - return -1; - } - - return 0; -} - -void -IOProcessor::silence (nframes_t nframes, nframes_t offset) -{ - _io->silence(nframes, offset); -} diff --git a/libs/ardour/jack_audio_port.cc b/libs/ardour/jack_audio_port.cc deleted file mode 100644 index 7ce00b8f11..0000000000 --- a/libs/ardour/jack_audio_port.cc +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include - -using namespace ARDOUR; - -JackAudioPort::JackAudioPort (const std::string& name, Flags flgs, AudioBuffer* buf) - : Port (name, flgs) - , JackPort (name, DataType::AUDIO, flgs) - , BaseAudioPort (name, flgs) -{ - if (buf) { - - _buffer = buf; - _own_buffer = false; - - } else { - - /* data space will be provided by JACK */ - - _buffer = new AudioBuffer (0); - _own_buffer = true; - } -} - -int -JackAudioPort::reestablish () -{ - int ret = JackPort::reestablish (); - - if (ret == 0 && _flags & IsOutput) { - _buffer->clear (); - } - - return ret; -} - diff --git a/libs/ardour/jack_midi_port.cc b/libs/ardour/jack_midi_port.cc deleted file mode 100644 index 6d8e4c8c5d..0000000000 --- a/libs/ardour/jack_midi_port.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include - -using namespace ARDOUR; -JackMidiPort::JackMidiPort (const std::string& name, Flags flgs, MidiBuffer* buf) - : Port (name, flgs) - , JackPort (name, DataType::MIDI, flgs) - , BaseMidiPort (name, flgs) -{ - // MIDI ports always need a buffer since jack buffer format is different - assert(buf); - - _buffer = buf; - _own_buffer = false; -} - -void -JackMidiPort::cycle_start (nframes_t nframes, nframes_t offset) -{ - /* FIXME: offset */ - - _buffer->clear(); - assert(_buffer->size() == 0); - - if (_flags & IsOutput) { - return; - } - - // We're an input - copy Jack events to internal buffer - - void* jack_buffer = jack_port_get_buffer(_port, nframes); - const nframes_t event_count = jack_midi_get_event_count(jack_buffer); - - assert(event_count < _buffer->capacity()); - - jack_midi_event_t ev; - - for (nframes_t i=0; i < event_count; ++i) { - - jack_midi_event_get (&ev, jack_buffer, i); - - _buffer->push_back (ev); - } - - assert(_buffer->size() == event_count); - - /*if (_buffer->size() > 0) - cerr << "JackMIDIPort got " << event_count << " events (buf " << _buffer << ")" << endl;*/ -} - -void -JackMidiPort::cycle_end (nframes_t nframes, nframes_t offset) -{ - /* FIXME: offset */ - - if (_flags & IsInput) { - return; - } - - // We're an output - copy events from source buffer to Jack buffer - - void* jack_buffer = jack_port_get_buffer (_port, nframes); - - jack_midi_clear_buffer (jack_buffer); - - for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) { - const MIDI::Event& ev = *i; - // event times should be frames, relative to cycle start - assert(ev.time() >= 0); - assert(ev.time() < nframes); - jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size()); - } -} diff --git a/libs/ardour/jack_port.cc b/libs/ardour/jack_port.cc deleted file mode 100644 index 5fac52af68..0000000000 --- a/libs/ardour/jack_port.cc +++ /dev/null @@ -1,179 +0,0 @@ -/* - Copyright (C) 2002-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; -using namespace std; - -JackPort::JackPort (const std::string& name, DataType type, Flags flgs) - : Port (name, flgs), _port (0) -{ - _port = jack_port_register (engine->jack(), name.c_str(), type.to_jack_type(), flgs, 0); - - if (_port == 0) { - throw failed_constructor(); - } - - _flags = flgs; - _type = type; - _name = jack_port_name (_port); -} - -JackPort::~JackPort () -{ - cerr << "deleting jack port " << _name << endl; - - jack_port_unregister (engine->jack(), _port); -} - -int -JackPort::set_name (const string& str) -{ - int ret; - - if ((ret = jack_port_set_name (_port, str.c_str())) == 0) { - _name = str; - } - - return ret; -} - -int -JackPort::disconnect () -{ - return jack_port_disconnect (engine->jack(), _port); -} - -nframes_t -JackPort::total_latency () const -{ - return jack_port_get_total_latency (engine->jack(), _port); -} - -int -JackPort::reestablish () -{ - string short_name; - - short_name = _name.substr (_name.find_last_of (':') + 1); - - _port = jack_port_register (engine->jack(), short_name.c_str(), type().to_jack_type(), _flags, 0); - - if (_port == 0) { - error << string_compose (_("could not reregister %1"), _name) << endmsg; - return -1; - } - - reset (); - - - return 0; -} - -void -JackPort::recompute_total_latency () const -{ -#ifdef HAVE_JACK_RECOMPUTE_LATENCY - jack_recompute_total_latency (engine->jack(), _port); -#endif -} - -int -JackPort::reconnect () -{ - /* caller must hold process lock; intended to be used only after reestablish() */ - - for (set::iterator i = _named_connections.begin(); i != _named_connections.end(); ++i) { - if (connect (*i)) { - return -1; - } - } - - return 0; -} - -int -JackPort::connect (const std::string& other) -{ - int ret; - - if (_flags & IsOutput) { - /* this is the source */ - ret = jack_connect (engine->jack(), _name.c_str(), other.c_str()); - } else { - ret = jack_connect (engine->jack(), other.c_str(), _name.c_str()); - } - - if (ret == 0) { - _named_connections.insert (other); - } - - return ret; -} - -int -JackPort::disconnect (const std::string& other) -{ - int ret; - - if (_flags & IsInput) { - ret = jack_disconnect (engine->jack(), other.c_str(), _name.c_str()); - } else { - ret = jack_disconnect (engine->jack(), _name.c_str(), other.c_str()); - } - - set::iterator i = _named_connections.find (other); - - if (i != _named_connections.end()) { - _named_connections.erase (i); - } - - return ret; -} - -int -JackPort::disconnect_all () -{ - _named_connections.clear (); - return jack_port_disconnect (engine->jack(), _port); -} - -int -JackPort::get_connections (vector& names) const -{ - const char** cstrs = jack_port_get_connections (_port); - int i; - - if (!cstrs) { - return 0; - } - - for (i = 0; cstrs[i]; ++i) { - names.push_back (string (cstrs[i])); - } - - return i; -} diff --git a/libs/ardour/jack_slave.cc b/libs/ardour/jack_slave.cc deleted file mode 100644 index f65be1deea..0000000000 --- a/libs/ardour/jack_slave.cc +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include - -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace sigc; - -JACK_Slave::JACK_Slave (jack_client_t* j) - : jack (j) -{ - float x; - nframes_t p; - /* call this to initialize things */ - speed_and_position (x, p); -} - -JACK_Slave::~JACK_Slave () -{ -} - -void -JACK_Slave::reset_client (jack_client_t* j) -{ - jack = j; -} - -bool -JACK_Slave::locked() const -{ - return true; -} - -bool -JACK_Slave::ok() const -{ - return true; -} - -bool -JACK_Slave::speed_and_position (float& sp, nframes_t& position) -{ - jack_position_t pos; - jack_transport_state_t state; - - state = jack_transport_query (jack, &pos); - - switch (state) { - case JackTransportStopped: - speed = 0; - _starting = false; - break; - case JackTransportRolling: - speed = 1.0; - _starting = false; - break; - case JackTransportLooping: - speed = 1.0; - _starting = false; - break; - case JackTransportStarting: - _starting = true; - // don't adjust speed here, just leave it as it was - break; - } - - sp = speed; - position = pos.frame; - return true; -} diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc deleted file mode 100644 index 29f2d16767..0000000000 --- a/libs/ardour/ladspa_plugin.cc +++ /dev/null @@ -1,663 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define __STDC_FORMAT_MACROS 1 -#include - -#include -#include - -#include -#include // so libraptor doesn't complain -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -LadspaPlugin::LadspaPlugin (void *mod, AudioEngine& e, Session& session, uint32_t index, nframes_t rate) - : Plugin (e, session) -{ - init (mod, index, rate); -} - -LadspaPlugin::LadspaPlugin (const LadspaPlugin &other) - : Plugin (other) -{ - init (other._module, other._index, other._sample_rate); - - for (uint32_t i = 0; i < parameter_count(); ++i) { - _control_data[i] = other._shadow_data[i]; - _shadow_data[i] = other._shadow_data[i]; - } -} - -void -LadspaPlugin::init (void *mod, uint32_t index, nframes_t rate) -{ - LADSPA_Descriptor_Function dfunc; - uint32_t i, port_cnt; - const char *errstr; - - _module = mod; - _control_data = 0; - _shadow_data = 0; - _latency_control_port = 0; - _was_activated = false; - - dfunc = (LADSPA_Descriptor_Function) dlsym (_module, "ladspa_descriptor"); - - if ((errstr = dlerror()) != NULL) { - error << _("LADSPA: module has no descriptor function.") << endmsg; - throw failed_constructor(); - } - - if ((_descriptor = dfunc (index)) == 0) { - error << _("LADSPA: plugin has gone away since discovery!") << endmsg; - throw failed_constructor(); - } - - _index = index; - - if (LADSPA_IS_INPLACE_BROKEN(_descriptor->Properties)) { - error << string_compose(_("LADSPA: \"%1\" cannot be used, since it cannot do inplace processing"), _descriptor->Name) << endmsg; - throw failed_constructor(); - } - - _sample_rate = rate; - - if (_descriptor->instantiate == 0) { - throw failed_constructor(); - } - - if ((_handle = _descriptor->instantiate (_descriptor, rate)) == 0) { - throw failed_constructor(); - } - - port_cnt = parameter_count(); - - _control_data = new LADSPA_Data[port_cnt]; - _shadow_data = new LADSPA_Data[port_cnt]; - - for (i = 0; i < port_cnt; ++i) { - if (LADSPA_IS_PORT_CONTROL(port_descriptor (i))) { - connect_port (i, &_control_data[i]); - - if (LADSPA_IS_PORT_OUTPUT(port_descriptor (i)) && - strcmp (port_names()[i], X_("latency")) == 0) { - _latency_control_port = &_control_data[i]; - *_latency_control_port = 0; - } - - if (!LADSPA_IS_PORT_INPUT(port_descriptor (i))) { - continue; - } - - _shadow_data[i] = default_value (i); - } - } - - latency_compute_run (); -} - -LadspaPlugin::~LadspaPlugin () -{ - deactivate (); - cleanup (); - - GoingAway (); /* EMIT SIGNAL */ - - /* XXX who should close a plugin? */ - - // dlclose (module); - - if (_control_data) { - delete [] _control_data; - } - - if (_shadow_data) { - delete [] _shadow_data; - } -} - -string -LadspaPlugin::unique_id() const -{ - char buf[32]; - snprintf (buf, sizeof (buf), "%lu", _descriptor->UniqueID); - return string (buf); -} - -float -LadspaPlugin::default_value (uint32_t port) -{ - const LADSPA_PortRangeHint *prh = port_range_hints(); - float ret = 0.0f; - bool bounds_given = false; - bool sr_scaling = false; - bool earlier_hint = false; - - /* defaults - case 1 */ - - if (LADSPA_IS_HINT_HAS_DEFAULT(prh[port].HintDescriptor)) { - if (LADSPA_IS_HINT_DEFAULT_MINIMUM(prh[port].HintDescriptor)) { - ret = prh[port].LowerBound; - bounds_given = true; - sr_scaling = true; - earlier_hint = true; - } - - /* FIXME: add support for logarithmic defaults */ - - else if (LADSPA_IS_HINT_DEFAULT_LOW(prh[port].HintDescriptor)) { - ret = prh[port].LowerBound * 0.75f + prh[port].UpperBound * 0.25f; - bounds_given = true; - sr_scaling = true; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(prh[port].HintDescriptor)) { - ret = prh[port].LowerBound * 0.50f + prh[port].UpperBound * 0.50f; - bounds_given = true; - sr_scaling = true; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_HIGH(prh[port].HintDescriptor)) { - ret = prh[port].LowerBound * 0.25f + prh[port].UpperBound * 0.75f; - bounds_given = true; - sr_scaling = true; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_MAXIMUM(prh[port].HintDescriptor)) { - ret = prh[port].UpperBound; - bounds_given = true; - sr_scaling = true; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_0(prh[port].HintDescriptor)) { - ret = 0.0f; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_1(prh[port].HintDescriptor)) { - ret = 1.0f; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_100(prh[port].HintDescriptor)) { - ret = 100.0f; - earlier_hint = true; - } - else if (LADSPA_IS_HINT_DEFAULT_440(prh[port].HintDescriptor)) { - ret = 440.0f; - earlier_hint = true; - } - else { - /* no hint found */ - ret = 0.0f; - } - } - - /* defaults - case 2 */ - else if (LADSPA_IS_HINT_BOUNDED_BELOW(prh[port].HintDescriptor) && - !LADSPA_IS_HINT_BOUNDED_ABOVE(prh[port].HintDescriptor)) { - - if (prh[port].LowerBound < 0) { - ret = 0.0f; - } else { - ret = prh[port].LowerBound; - } - - bounds_given = true; - sr_scaling = true; - } - - /* defaults - case 3 */ - else if (!LADSPA_IS_HINT_BOUNDED_BELOW(prh[port].HintDescriptor) && - LADSPA_IS_HINT_BOUNDED_ABOVE(prh[port].HintDescriptor)) { - - if (prh[port].UpperBound > 0) { - ret = 0.0f; - } else { - ret = prh[port].UpperBound; - } - - bounds_given = true; - sr_scaling = true; - } - - /* defaults - case 4 */ - else if (LADSPA_IS_HINT_BOUNDED_BELOW(prh[port].HintDescriptor) && - LADSPA_IS_HINT_BOUNDED_ABOVE(prh[port].HintDescriptor)) { - - if (prh[port].LowerBound < 0 && prh[port].UpperBound > 0) { - ret = 0.0f; - } else if (prh[port].LowerBound < 0 && prh[port].UpperBound < 0) { - ret = prh[port].UpperBound; - } else { - ret = prh[port].LowerBound; - } - bounds_given = true; - sr_scaling = true; - } - - /* defaults - case 5 */ - - if (LADSPA_IS_HINT_SAMPLE_RATE(prh[port].HintDescriptor) && !earlier_hint) { - if (bounds_given) { - if (sr_scaling) { - ret *= _sample_rate; - } - } else { - ret = _sample_rate; - } - } - - return ret; -} - -void -LadspaPlugin::set_parameter (uint32_t which, float val) -{ - if (which < _descriptor->PortCount) { - _shadow_data[which] = (LADSPA_Data) val; -#if 0 - ParameterChanged (Parameter(PluginAutomation, which), val); /* EMIT SIGNAL */ - - if (which < parameter_count() && controls[which]) { - controls[which]->Changed (); - } -#endif - - } else { - warning << string_compose (_("illegal parameter number used with plugin \"%1\". This may" - "indicate a change in the plugin design, and presets may be" - "invalid"), name()) - << endmsg; - } -} - -float -LadspaPlugin::get_parameter (uint32_t which) const -{ - if (LADSPA_IS_PORT_INPUT(port_descriptor (which))) { - return (float) _shadow_data[which]; - } else { - return (float) _control_data[which]; - } -} - -uint32_t -LadspaPlugin::nth_parameter (uint32_t n, bool& ok) const -{ - uint32_t x, c; - - ok = false; - - for (c = 0, x = 0; x < _descriptor->PortCount; ++x) { - if (LADSPA_IS_PORT_CONTROL (port_descriptor (x))) { - if (c++ == n) { - ok = true; - return x; - } - } - } - return 0; -} - -XMLNode& -LadspaPlugin::get_state() -{ - XMLNode *root = new XMLNode(state_node_name()); - XMLNode *child; - char buf[16]; - LocaleGuard lg (X_("POSIX")); - - for (uint32_t i = 0; i < parameter_count(); ++i){ - - if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) && - LADSPA_IS_PORT_CONTROL(port_descriptor (i))){ - - child = new XMLNode("port"); - snprintf(buf, sizeof(buf), "%u", i); - child->add_property("number", string(buf)); - snprintf(buf, sizeof(buf), "%+f", _shadow_data[i]); - child->add_property("value", string(buf)); - root->add_child_nocopy (*child); - } - } - - return *root; -} - -bool -LadspaPlugin::save_preset (string name) -{ - return Plugin::save_preset (name, "ladspa"); -} - -int -LadspaPlugin::set_state(const XMLNode& node) -{ - XMLNodeList nodes; - XMLProperty *prop; - XMLNodeConstIterator iter; - XMLNode *child; - const char *port; - const char *data; - uint32_t port_id; - LocaleGuard lg (X_("POSIX")); - - if (node.name() != state_node_name()) { - error << _("Bad node sent to LadspaPlugin::set_state") << endmsg; - return -1; - } - - nodes = node.children ("port"); - - for(iter = nodes.begin(); iter != nodes.end(); ++iter){ - - child = *iter; - - if ((prop = child->property("number")) != 0) { - port = prop->value().c_str(); - } else { - warning << _("LADSPA: no ladspa port number") << endmsg; - continue; - } - if ((prop = child->property("value")) != 0) { - data = prop->value().c_str(); - } else { - warning << _("LADSPA: no ladspa port data") << endmsg; - continue; - } - - sscanf (port, "%" PRIu32, &port_id); - set_parameter (port_id, atof(data)); - } - - latency_compute_run (); - - return 0; -} - -int -LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) const -{ - LADSPA_PortRangeHint prh; - - prh = port_range_hints()[which]; - - - if (LADSPA_IS_HINT_BOUNDED_BELOW(prh.HintDescriptor)) { - desc.min_unbound = false; - if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) { - desc.lower = prh.LowerBound * _session.frame_rate(); - } else { - desc.lower = prh.LowerBound; - } - } else { - desc.min_unbound = true; - desc.lower = 0; - } - - - if (LADSPA_IS_HINT_BOUNDED_ABOVE(prh.HintDescriptor)) { - desc.max_unbound = false; - if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) { - desc.upper = prh.UpperBound * _session.frame_rate(); - } else { - desc.upper = prh.UpperBound; - } - } else { - desc.max_unbound = true; - desc.upper = 4; /* completely arbitrary */ - } - - if (LADSPA_IS_HINT_INTEGER (prh.HintDescriptor)) { - desc.step = 1.0; - desc.smallstep = 0.1; - desc.largestep = 10.0; - } else { - float delta = desc.upper - desc.lower; - desc.step = delta / 1000.0f; - desc.smallstep = delta / 10000.0f; - desc.largestep = delta/10.0f; - } - - desc.toggled = LADSPA_IS_HINT_TOGGLED (prh.HintDescriptor); - desc.logarithmic = LADSPA_IS_HINT_LOGARITHMIC (prh.HintDescriptor); - desc.sr_dependent = LADSPA_IS_HINT_SAMPLE_RATE (prh.HintDescriptor); - desc.integer_step = LADSPA_IS_HINT_INTEGER (prh.HintDescriptor); - - desc.label = port_names()[which]; - - return 0; -} - -string -LadspaPlugin::describe_parameter (Parameter which) -{ - if (which.type() == PluginAutomation && which.id() < parameter_count()) { - return port_names()[which.id()]; - } else { - return "??"; - } -} - -ARDOUR::nframes_t -LadspaPlugin::signal_latency () const -{ - if (_user_latency) { - return _user_latency; - } - - if (_latency_control_port) { - return (nframes_t) floor (*_latency_control_port); - } else { - return 0; - } -} - -set -LadspaPlugin::automatable () const -{ - set ret; - - for (uint32_t i = 0; i < parameter_count(); ++i){ - if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) && - LADSPA_IS_PORT_CONTROL(port_descriptor (i))){ - - ret.insert (ret.end(), Parameter(PluginAutomation, i)); - } - } - - return ret; -} - -int -LadspaPlugin::connect_and_run (BufferSet& bufs, uint32_t& in_index, uint32_t& out_index, nframes_t nframes, nframes_t offset) -{ - uint32_t port_index = 0; - cycles_t then, now; - - then = get_cycles (); - - const uint32_t nbufs = bufs.count().n_audio(); - - while (port_index < parameter_count()) { - if (LADSPA_IS_PORT_AUDIO (port_descriptor(port_index))) { - if (LADSPA_IS_PORT_INPUT (port_descriptor(port_index))) { - const size_t index = min(in_index, nbufs - 1); - connect_port (port_index, bufs.get_audio(index).data(nframes, offset)); - //cerr << this << ' ' << name() << " @ " << offset << " inport " << in_index << " = buf " - // << min((uint32_t)in_index,nbufs) << " = " << &bufs[min((uint32_t)in_index,nbufs)][offset] << endl; - in_index++; - - - } else if (LADSPA_IS_PORT_OUTPUT (port_descriptor (port_index))) { - const size_t index = min(out_index,nbufs - 1); - connect_port (port_index, bufs.get_audio(index).data(nframes, offset)); - // cerr << this << ' ' << name() << " @ " << offset << " outport " << out_index << " = buf " - // << min((uint32_t)out_index,nbufs) << " = " << &bufs[min((uint32_t)out_index,nbufs)][offset] << endl; - out_index++; - } - } - port_index++; - } - - run_in_place (nframes); - now = get_cycles (); - set_cycles ((uint32_t) (now - then)); - - return 0; -} - -bool -LadspaPlugin::parameter_is_control (uint32_t param) const -{ - return LADSPA_IS_PORT_CONTROL(port_descriptor (param)); -} - -bool -LadspaPlugin::parameter_is_audio (uint32_t param) const -{ - return LADSPA_IS_PORT_AUDIO(port_descriptor (param)); -} - -bool -LadspaPlugin::parameter_is_output (uint32_t param) const -{ - return LADSPA_IS_PORT_OUTPUT(port_descriptor (param)); -} - -bool -LadspaPlugin::parameter_is_input (uint32_t param) const -{ - return LADSPA_IS_PORT_INPUT(port_descriptor (param)); -} - -void -LadspaPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const -{ - if (buf && len) { - if (param < parameter_count()) { - snprintf (buf, len, "%.3f", get_parameter (param)); - } else { - strcat (buf, "0"); - } - } -} - -void -LadspaPlugin::run_in_place (nframes_t nframes) -{ - for (uint32_t i = 0; i < parameter_count(); ++i) { - if (LADSPA_IS_PORT_INPUT(port_descriptor (i)) && LADSPA_IS_PORT_CONTROL(port_descriptor (i))) { - _control_data[i] = _shadow_data[i]; - } - } - _descriptor->run (_handle, nframes); -} - -void -LadspaPlugin::latency_compute_run () -{ - if (!_latency_control_port) { - return; - } - - /* we need to run the plugin so that it can set its latency - parameter. - */ - - activate (); - - uint32_t port_index = 0; - uint32_t in_index = 0; - uint32_t out_index = 0; - const nframes_t bufsize = 1024; - LADSPA_Data buffer[bufsize]; - - memset(buffer,0,sizeof(LADSPA_Data)*bufsize); - - /* Note that we've already required that plugins - be able to handle in-place processing. - */ - - port_index = 0; - - while (port_index < parameter_count()) { - if (LADSPA_IS_PORT_AUDIO (port_descriptor (port_index))) { - if (LADSPA_IS_PORT_INPUT (port_descriptor (port_index))) { - connect_port (port_index, buffer); - in_index++; - } else if (LADSPA_IS_PORT_OUTPUT (port_descriptor (port_index))) { - connect_port (port_index, buffer); - out_index++; - } - } - port_index++; - } - - run_in_place (bufsize); - deactivate (); -} - -PluginPtr -LadspaPluginInfo::load (Session& session) -{ - try { - PluginPtr plugin; - void *module; - - if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) { - error << string_compose(_("LADSPA: cannot load module from \"%1\""), path) << endmsg; - error << dlerror() << endmsg; - } else { - plugin.reset (new LadspaPlugin (module, session.engine(), session, index, session.frame_rate())); - } - - plugin->set_info(PluginInfoPtr(new LadspaPluginInfo(*this))); - return plugin; - } - - catch (failed_constructor &err) { - return PluginPtr ((Plugin*) 0); - } -} diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc deleted file mode 100644 index 0da75810ca..0000000000 --- a/libs/ardour/location.cc +++ /dev/null @@ -1,915 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include /* for sprintf */ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "i18n.h" - -#define SUFFIX_MAX 32 - -using namespace std; -using namespace ARDOUR; -using namespace sigc; -using namespace PBD; - -Location::Location (const Location& other) - : _name (other._name), - _start (other._start), - _end (other._end), - _flags (other._flags) -{ - /* start and end flags can never be copied, because there can only ever be one of each */ - - _flags = Flags (_flags & ~IsStart); - _flags = Flags (_flags & ~IsEnd); - - /* copy is not locked even if original was */ - - _locked = false; -} - -Location::Location (const XMLNode& node) -{ - if (set_state (node)) { - throw failed_constructor (); - } -} - -Location* -Location::operator= (const Location& other) -{ - if (this == &other) { - return this; - } - - _name = other._name; - _start = other._start; - _end = other._end; - _flags = other._flags; - - /* copy is not locked even if original was */ - - _locked = false; - - /* "changed" not emitted on purpose */ - - return this; -} - -int -Location::set_start (nframes_t s) -{ - if (_locked) { - return -1; - } - - if (is_mark()) { - if (_start != s) { - - _start = s; - _end = s; - - start_changed(this); /* EMIT SIGNAL */ - - if ( is_start() ) { - - Session::StartTimeChanged (); /* EMIT SIGNAL */ - AudioFileSource::set_header_position_offset ( s ); - } - - if ( is_end() ) { - Session::EndTimeChanged (); /* EMIT SIGNAL */ - } - } - return 0; - } - - if (((is_auto_punch() || is_auto_loop()) && s >= _end) || s > _end) { - return -1; - } - - if (s != _start) { - _start = s; - start_changed(this); /* EMIT SIGNAL */ - } - - return 0; -} - -int -Location::set_end (nframes_t e) -{ - if (_locked) { - return -1; - } - - if (is_mark()) { - if (_start != e) { - _start = e; - _end = e; - end_changed(this); /* EMIT SIGNAL */ - } - return 0; - } - - if (((is_auto_punch() || is_auto_loop()) && e <= _start) || e < _start) { - return -1; - } - - if (e != _end) { - _end = e; - end_changed(this); /* EMIT SIGNAL */ - } - return 0; -} - -int -Location::set (nframes_t start, nframes_t end) -{ - if (_locked) { - return -1; - } - - if (is_mark() && start != end) { - return -1; - } else if (((is_auto_punch() || is_auto_loop()) && start >= end) || (start > end)) { - return -1; - } - - if (_start != start) { - _start = start; - start_changed(this); /* EMIT SIGNAL */ - } - - if (_end != end) { - _end = end; - end_changed(this); /* EMIT SIGNAL */ - } - return 0; -} - -int -Location::move_to (nframes_t pos) -{ - if (_locked) { - return -1; - } - - if (_start != pos) { - _start = pos; - _end = _start + length(); - - changed (this); /* EMIT SIGNAL */ - } - - return 0; -} - -void -Location::set_hidden (bool yn, void *src) -{ - if (set_flag_internal (yn, IsHidden)) { - FlagsChanged (this, src); /* EMIT SIGNAL */ - } -} - -void -Location::set_cd (bool yn, void *src) -{ - // XXX this really needs to be session start - // but its not available here - leave to GUI - - if (_start == 0) { - error << _("You cannot put a CD marker at this position") << endmsg; - return; - } - - if (set_flag_internal (yn, IsCDMarker)) { - FlagsChanged (this, src); /* EMIT SIGNAL */ - } -} - -void -Location::set_is_end (bool yn, void *src) -{ - if (set_flag_internal (yn, IsEnd)) { - FlagsChanged (this, src); /* EMIT SIGNAL */ - } -} - -void -Location::set_is_start (bool yn, void *src) -{ - if (set_flag_internal (yn, IsStart)) { - FlagsChanged (this, src); /* EMIT SIGNAL */ - } -} - -void -Location::set_auto_punch (bool yn, void *src) -{ - if (is_mark() || _start == _end) { - return; - } - - if (set_flag_internal (yn, IsAutoPunch)) { - FlagsChanged (this, src); /* EMIT SIGNAL */ - } -} - -void -Location::set_auto_loop (bool yn, void *src) -{ - if (is_mark() || _start == _end) { - return; - } - - if (set_flag_internal (yn, IsAutoLoop)) { - FlagsChanged (this, src); /* EMIT SIGNAL */ - } -} - -bool -Location::set_flag_internal (bool yn, Flags flag) -{ - if (yn) { - if (!(_flags & flag)) { - _flags = Flags (_flags | flag); - return true; - } - } else { - if (_flags & flag) { - _flags = Flags (_flags & ~flag); - return true; - } - } - return false; -} - -void -Location::set_mark (bool yn) -{ - /* This function is private, and so does not emit signals */ - - if (_start != _end) { - return; - } - - set_flag_internal (yn, IsMark); -} - - -XMLNode& -Location::cd_info_node(const string & name, const string & value) -{ - XMLNode* root = new XMLNode("CD-Info"); - - root->add_property("name", name); - root->add_property("value", value); - - return *root; -} - - -XMLNode& -Location::get_state (void) -{ - XMLNode *node = new XMLNode ("Location"); - char buf[64]; - - typedef map::const_iterator CI; - - for(CI m = cd_info.begin(); m != cd_info.end(); ++m){ - node->add_child_nocopy(cd_info_node(m->first, m->second)); - } - - id().print (buf, sizeof (buf)); - node->add_property("id", buf); - node->add_property ("name", name()); - snprintf (buf, sizeof (buf), "%u", start()); - node->add_property ("start", buf); - snprintf (buf, sizeof (buf), "%u", end()); - node->add_property ("end", buf); - node->add_property ("flags", enum_2_string (_flags)); - node->add_property ("locked", (_locked ? "yes" : "no")); - - return *node; -} - -int -Location::set_state (const XMLNode& node) -{ - const XMLProperty *prop; - - XMLNodeList cd_list = node.children(); - XMLNodeConstIterator cd_iter; - XMLNode *cd_node; - - string cd_name; - string cd_value; - - if (node.name() != "Location") { - error << _("incorrect XML node passed to Location::set_state") << endmsg; - return -1; - } - - if ((prop = node.property ("id")) == 0) { - warning << _("XML node for Location has no ID information") << endmsg; - } else { - _id = prop->value (); - } - - if ((prop = node.property ("name")) == 0) { - error << _("XML node for Location has no name information") << endmsg; - return -1; - } - - set_name (prop->value()); - - if ((prop = node.property ("start")) == 0) { - error << _("XML node for Location has no start information") << endmsg; - return -1; - } - - /* can't use set_start() here, because _end - may make the value of _start illegal. - */ - - _start = atoi (prop->value().c_str()); - - if ((prop = node.property ("end")) == 0) { - error << _("XML node for Location has no end information") << endmsg; - return -1; - } - - _end = atoi (prop->value().c_str()); - - if ((prop = node.property ("flags")) == 0) { - error << _("XML node for Location has no flags information") << endmsg; - return -1; - } - - _flags = Flags (string_2_enum (prop->value(), _flags)); - - if ((prop = node.property ("locked")) != 0) { - _locked = (prop->value() == "yes"); - } else { - _locked = false; - } - - for (cd_iter = cd_list.begin(); cd_iter != cd_list.end(); ++cd_iter) { - - cd_node = *cd_iter; - - if (cd_node->name() != "CD-Info") { - continue; - } - - if ((prop = cd_node->property ("name")) != 0) { - cd_name = prop->value(); - } else { - throw failed_constructor (); - } - - if ((prop = cd_node->property ("value")) != 0) { - cd_value = prop->value(); - } else { - throw failed_constructor (); - } - - - cd_info[cd_name] = cd_value; - - } - - changed(this); /* EMIT SIGNAL */ - - return 0; -} - -/*---------------------------------------------------------------------- */ - -Locations::Locations () - -{ - current_location = 0; -} - -Locations::~Locations () -{ - for (LocationList::iterator i = locations.begin(); i != locations.end(); ) { - LocationList::iterator tmp = i; - ++tmp; - delete *i; - i = tmp; - } -} - -int -Locations::set_current (Location *loc, bool want_lock) - -{ - int ret; - - if (want_lock) { - Glib::Mutex::Lock lm (lock); - ret = set_current_unlocked (loc); - } else { - ret = set_current_unlocked (loc); - } - - if (ret == 0) { - current_changed (current_location); /* EMIT SIGNAL */ - } - return ret; -} - -int -Locations::next_available_name(string& result,string base) -{ - LocationList::iterator i; - Location* location; - string temp; - string::size_type l; - int suffix; - char buf[32]; - bool available[SUFFIX_MAX+1]; - - result = base; - for (int k=1; kname(); - if (l && !temp.find(base,0)) { - suffix = atoi(temp.substr(l,3).c_str()); - if (suffix) available[suffix] = false; - } - } - for (int k=1; k<=SUFFIX_MAX; k++) { - if (available[k]) { - snprintf (buf, 31, "%d", k); - result += buf; - return 1; - } - } - return 0; -} - -int -Locations::set_current_unlocked (Location *loc) -{ - if (find (locations.begin(), locations.end(), loc) == locations.end()) { - error << _("Locations: attempt to use unknown location as selected location") << endmsg; - return -1; - } - - current_location = loc; - return 0; -} - -void -Locations::clear () -{ - { - Glib::Mutex::Lock lm (lock); - - for (LocationList::iterator i = locations.begin(); i != locations.end(); ) { - - LocationList::iterator tmp = i; - ++tmp; - - if (!(*i)->is_end() && !(*i)->is_start()) { - locations.erase (i); - } - - i = tmp; - } - - current_location = 0; - } - - changed (); /* EMIT SIGNAL */ - current_changed (0); /* EMIT SIGNAL */ -} - -void -Locations::clear_markers () -{ - { - Glib::Mutex::Lock lm (lock); - LocationList::iterator tmp; - - for (LocationList::iterator i = locations.begin(); i != locations.end(); ) { - tmp = i; - ++tmp; - - if ((*i)->is_mark() && !(*i)->is_end() && !(*i)->is_start()) { - locations.erase (i); - } - - i = tmp; - } - } - - changed (); /* EMIT SIGNAL */ -} - -void -Locations::clear_ranges () -{ - { - Glib::Mutex::Lock lm (lock); - LocationList::iterator tmp; - - for (LocationList::iterator i = locations.begin(); i != locations.end(); ) { - - tmp = i; - ++tmp; - - if (!(*i)->is_mark()) { - locations.erase (i); - - } - - i = tmp; - } - - current_location = 0; - } - - changed (); /* EMIT SIGNAL */ - current_changed (0); /* EMIT SIGNAL */ -} - -void -Locations::add (Location *loc, bool make_current) -{ - { - Glib::Mutex::Lock lm (lock); - locations.push_back (loc); - - if (make_current) { - current_location = loc; - } - } - - added (loc); /* EMIT SIGNAL */ - - if (make_current) { - current_changed (current_location); /* EMIT SIGNAL */ - } -} - -void -Locations::remove (Location *loc) - -{ - bool was_removed = false; - bool was_current = false; - LocationList::iterator i; - - if (loc->is_end() || loc->is_start()) { - return; - } - - { - Glib::Mutex::Lock lm (lock); - - for (i = locations.begin(); i != locations.end(); ++i) { - if ((*i) == loc) { - locations.erase (i); - was_removed = true; - if (current_location == loc) { - current_location = 0; - was_current = true; - } - break; - } - } - } - - if (was_removed) { - - removed (loc); /* EMIT SIGNAL */ - - if (was_current) { - current_changed (0); /* EMIT SIGNAL */ - } - - changed (); /* EMIT_SIGNAL */ - } -} - -void -Locations::location_changed (Location* loc) -{ - changed (); /* EMIT SIGNAL */ -} - -XMLNode& -Locations::get_state () -{ - XMLNode *node = new XMLNode ("Locations"); - LocationList::iterator iter; - Glib::Mutex::Lock lm (lock); - - for (iter = locations.begin(); iter != locations.end(); ++iter) { - node->add_child_nocopy ((*iter)->get_state ()); - } - - return *node; -} - -int -Locations::set_state (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - - if (node.name() != "Locations") { - error << _("incorrect XML mode passed to Locations::set_state") << endmsg; - return -1; - } - - nlist = node.children(); - - locations.clear (); - current_location = 0; - - { - Glib::Mutex::Lock lm (lock); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - try { - - Location *loc = new Location (**niter); - locations.push_back (loc); - } - - catch (failed_constructor& err) { - error << _("could not load location from session file - ignored") << endmsg; - } - } - - if (locations.size()) { - - current_location = locations.front(); - } else { - current_location = 0; - } - } - - changed (); /* EMIT SIGNAL */ - - return 0; -} - -struct LocationStartEarlierComparison -{ - bool operator() (Location *a, Location *b) { - return a->start() < b->start(); - } -}; - -struct LocationStartLaterComparison -{ - bool operator() (Location *a, Location *b) { - return a->start() > b->start(); - } -}; - -Location * -Locations::first_location_before (nframes_t frame, bool include_special_ranges) -{ - LocationList locs; - - { - Glib::Mutex::Lock lm (lock); - locs = locations; - } - - LocationStartLaterComparison cmp; - locs.sort (cmp); - - /* locs is now sorted latest..earliest */ - - for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) { - if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) { - continue; - } - if (!(*i)->is_hidden() && (*i)->start() < frame) { - return (*i); - } - } - - return 0; -} - -Location * -Locations::first_location_after (nframes_t frame, bool include_special_ranges) -{ - LocationList locs; - - { - Glib::Mutex::Lock lm (lock); - locs = locations; - } - - LocationStartEarlierComparison cmp; - locs.sort (cmp); - - /* locs is now sorted earliest..latest */ - - for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) { - if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) { - continue; - } - if (!(*i)->is_hidden() && (*i)->start() > frame) { - return (*i); - } - } - - return 0; -} - -nframes_t -Locations::first_mark_before (nframes_t frame, bool include_special_ranges) -{ - LocationList locs; - - { - Glib::Mutex::Lock lm (lock); - locs = locations; - } - - LocationStartLaterComparison cmp; - locs.sort (cmp); - - /* locs is now sorted latest..earliest */ - - for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) { - if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) { - continue; - } - if (!(*i)->is_hidden()) { - if ((*i)->is_mark()) { - /* MARK: start == end */ - if ((*i)->start() < frame) { - return (*i)->start(); - } - } else { - /* RANGE: start != end, compare start and end */ - if ((*i)->end() < frame) { - return (*i)->end(); - } - if ((*i)->start () < frame) { - return (*i)->start(); - } - } - } - } - - return 0; -} - -nframes_t -Locations::first_mark_after (nframes_t frame, bool include_special_ranges) -{ - LocationList locs; - - { - Glib::Mutex::Lock lm (lock); - locs = locations; - } - - LocationStartEarlierComparison cmp; - locs.sort (cmp); - - /* locs is now sorted earliest..latest */ - - for (LocationList::iterator i = locs.begin(); i != locs.end(); ++i) { - if (!include_special_ranges && ((*i)->is_auto_loop() || (*i)->is_auto_punch())) { - continue; - } - if (!(*i)->is_hidden()) { - if ((*i)->is_mark()) { - /* MARK, start == end so just compare start */ - if ((*i)->start() > frame) { - return (*i)->start(); - } - } else { - /* RANGE, start != end, compare start and end */ - if ((*i)->start() > frame ) { - return (*i)->start (); - } - if ((*i)->end() > frame) { - return (*i)->end (); - } - } - } - } - - return max_frames; -} - -Location* -Locations::end_location () const -{ - for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { - if ((*i)->is_end()) { - return const_cast (*i); - } - } - return 0; -} - -Location* -Locations::start_location () const -{ - for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { - if ((*i)->is_start()) { - return const_cast (*i); - } - } - return 0; -} - -Location* -Locations::auto_loop_location () const -{ - for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { - if ((*i)->is_auto_loop()) { - return const_cast (*i); - } - } - return 0; -} - -Location* -Locations::auto_punch_location () const -{ - for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { - if ((*i)->is_auto_punch()) { - return const_cast (*i); - } - } - return 0; -} - -uint32_t -Locations::num_range_markers () const -{ - uint32_t cnt = 0; - Glib::Mutex::Lock lm (lock); - for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { - if ((*i)->is_range_marker()) { - ++cnt; - } - } - return cnt; -} - -Location * -Locations::get_location_by_id(PBD::ID id) -{ - LocationList::iterator it; - for (it = locations.begin(); it != locations.end(); it++) - if (id == (*it)->id()) - return *it; - - return 0; -} diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc deleted file mode 100644 index 4553458831..0000000000 --- a/libs/ardour/lv2_plugin.cc +++ /dev/null @@ -1,625 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -LV2Plugin::LV2Plugin (AudioEngine& e, Session& session, LV2World& world, SLV2Plugin plugin, nframes_t rate) - : Plugin (e, session) - , _world(world) -{ - init (world, plugin, rate); -} - -LV2Plugin::LV2Plugin (const LV2Plugin &other) - : Plugin (other) - , _world(other._world) -{ - init (other._world, other._plugin, other._sample_rate); - - for (uint32_t i = 0; i < parameter_count(); ++i) { - _control_data[i] = other._shadow_data[i]; - _shadow_data[i] = other._shadow_data[i]; - } -} - -void -LV2Plugin::init (LV2World& world, SLV2Plugin plugin, nframes_t rate) -{ - _world = world; - _plugin = plugin; - _control_data = 0; - _shadow_data = 0; - _latency_control_port = 0; - _was_activated = false; - - _instance = slv2_plugin_instantiate(plugin, rate, NULL); - _name = slv2_plugin_get_name(plugin); - assert(_name); - _author = slv2_plugin_get_author_name(plugin); - - if (_instance == 0) { - error << _("LV2: Failed to instantiate plugin ") << slv2_plugin_get_uri(plugin) << endl; - throw failed_constructor(); - } - - if (slv2_plugin_has_feature(plugin, world.in_place_broken)) { - error << string_compose(_("LV2: \"%1\" cannot be used, since it cannot do inplace processing"), - slv2_value_as_string(_name)); - slv2_value_free(_name); - slv2_value_free(_author); - throw failed_constructor(); - } - - _sample_rate = rate; - - const uint32_t num_ports = slv2_plugin_get_num_ports(plugin); - - _control_data = new float[num_ports]; - _shadow_data = new float[num_ports]; - _defaults = new float[num_ports]; - - const bool latent = slv2_plugin_has_latency(plugin); - uint32_t latency_port = (latent ? slv2_plugin_get_latency_port_index(plugin) : 0); - - for (uint32_t i = 0; i < num_ports; ++i) { - if (parameter_is_control(i)) { - SLV2Port port = slv2_plugin_get_port_by_index(plugin, i); - SLV2Value def; - slv2_port_get_range(plugin, port, &def, NULL, NULL); - _defaults[i] = def ? slv2_value_as_float(def) : 0.0f; - slv2_value_free(def); - - slv2_instance_connect_port (_instance, i, &_control_data[i]); - - if (latent && i == latency_port) { - _latency_control_port = &_control_data[i]; - *_latency_control_port = 0; - } - - if (parameter_is_input(i)) { - _shadow_data[i] = default_value (i); - } - } else { - _defaults[i] = 0.0f; - } - } - - latency_compute_run (); -} - -LV2Plugin::~LV2Plugin () -{ - deactivate (); - cleanup (); - - GoingAway (); /* EMIT SIGNAL */ - - slv2_instance_free(_instance); - slv2_value_free(_name); - slv2_value_free(_author); - - if (_control_data) { - delete [] _control_data; - } - - if (_shadow_data) { - delete [] _shadow_data; - } -} - -string -LV2Plugin::unique_id() const -{ - return slv2_value_as_uri(slv2_plugin_get_uri(_plugin)); -} - - -float -LV2Plugin::default_value (uint32_t port) -{ - return _defaults[port]; -} - -void -LV2Plugin::set_parameter (uint32_t which, float val) -{ - if (which < slv2_plugin_get_num_ports(_plugin)) { - _shadow_data[which] = val; -#if 0 - ParameterChanged (which, val); /* EMIT SIGNAL */ - - if (which < parameter_count() && controls[which]) { - controls[which]->Changed (); - } -#endif - - } else { - warning << string_compose (_("Illegal parameter number used with plugin \"%1\"." - "This is a bug in either Ardour or the LV2 plugin (%2)"), - name(), unique_id()) << endmsg; - } -} - -float -LV2Plugin::get_parameter (uint32_t which) const -{ - if (parameter_is_input(which)) { - return (float) _shadow_data[which]; - } else { - return (float) _control_data[which]; - } - return 0.0f; -} - -uint32_t -LV2Plugin::nth_parameter (uint32_t n, bool& ok) const -{ - uint32_t x, c; - - ok = false; - - for (c = 0, x = 0; x < slv2_plugin_get_num_ports(_plugin); ++x) { - if (parameter_is_control (x)) { - if (c++ == n) { - ok = true; - return x; - } - } - } - - return 0; -} - -XMLNode& -LV2Plugin::get_state() -{ - XMLNode *root = new XMLNode(state_node_name()); - XMLNode *child; - char buf[16]; - LocaleGuard lg (X_("POSIX")); - - for (uint32_t i = 0; i < parameter_count(); ++i){ - - if (parameter_is_input(i) && parameter_is_control(i)) { - child = new XMLNode("port"); - snprintf(buf, sizeof(buf), "%u", i); - child->add_property("number", string(buf)); - snprintf(buf, sizeof(buf), "%+f", _shadow_data[i]); - child->add_property("value", string(buf)); - root->add_child_nocopy (*child); - - /*if (i < controls.size() && controls[i]) { - root->add_child_nocopy (controls[i]->get_state()); - }*/ - } - } - - return *root; -} - -bool -LV2Plugin::save_preset (string name) -{ - return Plugin::save_preset (name, "lv2"); -} - -int -LV2Plugin::set_state(const XMLNode& node) -{ - XMLNodeList nodes; - XMLProperty *prop; - XMLNodeConstIterator iter; - XMLNode *child; - const char *port; - const char *data; - uint32_t port_id; - LocaleGuard lg (X_("POSIX")); - - if (node.name() != state_node_name()) { - error << _("Bad node sent to LV2Plugin::set_state") << endmsg; - return -1; - } - - nodes = node.children ("port"); - - for(iter = nodes.begin(); iter != nodes.end(); ++iter){ - - child = *iter; - - if ((prop = child->property("number")) != 0) { - port = prop->value().c_str(); - } else { - warning << _("LV2: no lv2 port number") << endmsg; - continue; - } - - if ((prop = child->property("value")) != 0) { - data = prop->value().c_str(); - } else { - warning << _("LV2: no lv2 port data") << endmsg; - continue; - } - - sscanf (port, "%" PRIu32, &port_id); - set_parameter (port_id, atof(data)); - } - - latency_compute_run (); - - return 0; -} - -int -LV2Plugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) const -{ - SLV2Port port = slv2_plugin_get_port_by_index(_plugin, which); - - SLV2Value def, min, max; - slv2_port_get_range(_plugin, port, &def, &min, &max); - - desc.integer_step = slv2_port_has_property(_plugin, port, _world.integer); - desc.toggled = slv2_port_has_property(_plugin, port, _world.toggled); - desc.logarithmic = false; // TODO (LV2 extension) - desc.sr_dependent = slv2_port_has_property(_plugin, port, _world.srate); - desc.label = slv2_value_as_string(slv2_port_get_name(_plugin, port)); - desc.lower = min ? slv2_value_as_float(min) : 0.0f; - desc.upper = max ? slv2_value_as_float(max) : 1.0f; - desc.min_unbound = false; // TODO (LV2 extension) - desc.max_unbound = false; // TODO (LV2 extension) - - if (desc.integer_step) { - desc.step = 1.0; - desc.smallstep = 0.1; - desc.largestep = 10.0; - } else { - const float delta = desc.upper - desc.lower; - desc.step = delta / 1000.0f; - desc.smallstep = delta / 10000.0f; - desc.largestep = delta/10.0f; - } - - slv2_value_free(def); - slv2_value_free(min); - slv2_value_free(max); - - return 0; -} - - -string -LV2Plugin::describe_parameter (Parameter which) -{ - if (which.type() == PluginAutomation && which.id() < parameter_count()) { - SLV2Value name = slv2_port_get_name(_plugin, - slv2_plugin_get_port_by_index(_plugin, which)); - string ret(slv2_value_as_string(name)); - slv2_value_free(name); - return ret; - } else { - return "??"; - } -} - -nframes_t -LV2Plugin::signal_latency () const -{ - if (_latency_control_port) { - return (nframes_t) floor (*_latency_control_port); - } else { - return 0; - } -} - -set -LV2Plugin::automatable () const -{ - set ret; - - for (uint32_t i = 0; i < parameter_count(); ++i){ - if (parameter_is_input(i) && parameter_is_control(i)) { - ret.insert (ret.end(), Parameter(PluginAutomation, i)); - } - } - - return ret; -} - -int -LV2Plugin::connect_and_run (BufferSet& bufs, uint32_t& in_index, uint32_t& out_index, nframes_t nframes, nframes_t offset) -{ - uint32_t port_index; - cycles_t then, now; - - port_index = 0; - - then = get_cycles (); - - const uint32_t nbufs = bufs.count().n_audio(); - - while (port_index < parameter_count()) { - if (parameter_is_audio(port_index)) { - if (parameter_is_input(port_index)) { - const size_t index = min(in_index, nbufs - 1); - slv2_instance_connect_port(_instance, port_index, - bufs.get_audio(index).data(nframes, offset)); - in_index++; - } else if (parameter_is_output(port_index)) { - const size_t index = min(out_index,nbufs - 1); - slv2_instance_connect_port(_instance, port_index, - bufs.get_audio(index).data(nframes, offset)); - out_index++; - } - } else if (parameter_is_midi(port_index)) { - // FIXME: Switch MIDI buffer format to LV2 event buffer - if (parameter_is_input(port_index)) { - //const size_t index = min(in_index, nbufs - 1); - //slv2_instance_connect_port(_instance, port_index, - // bufs.get_midi(index).data(nframes, offset)); - // FIXME: hope it's connection optional... - slv2_instance_connect_port(_instance, port_index, NULL); - in_index++; - } else if (parameter_is_output(port_index)) { - //const size_t index = min(out_index,nbufs - 1); - //slv2_instance_connect_port(_instance, port_index, - // bufs.get_midi(index).data(nframes, offset)); - // FIXME: hope it's connection optional... - slv2_instance_connect_port(_instance, port_index, NULL); - out_index++; - } - } - port_index++; - } - - run (nframes); - now = get_cycles (); - set_cycles ((uint32_t) (now - then)); - - return 0; -} - -bool -LV2Plugin::parameter_is_control (uint32_t param) const -{ - SLV2Port port = slv2_plugin_get_port_by_index(_plugin, param); - return slv2_port_is_a(_plugin, port, _world.control_class); -} - -bool -LV2Plugin::parameter_is_audio (uint32_t param) const -{ - SLV2Port port = slv2_plugin_get_port_by_index(_plugin, param); - return slv2_port_is_a(_plugin, port, _world.audio_class); -} - -bool -LV2Plugin::parameter_is_midi (uint32_t param) const -{ - SLV2Port port = slv2_plugin_get_port_by_index(_plugin, param); - return slv2_port_is_a(_plugin, port, _world.event_class) - && slv2_port_supports_event(_plugin, port, _world.midi_class); -} - -bool -LV2Plugin::parameter_is_output (uint32_t param) const -{ - SLV2Port port = slv2_plugin_get_port_by_index(_plugin, param); - return slv2_port_is_a(_plugin, port, _world.output_class); -} - -bool -LV2Plugin::parameter_is_input (uint32_t param) const -{ - SLV2Port port = slv2_plugin_get_port_by_index(_plugin, param); - return slv2_port_is_a(_plugin, port, _world.input_class); -} - -void -LV2Plugin::print_parameter (uint32_t param, char *buf, uint32_t len) const -{ - if (buf && len) { - if (param < parameter_count()) { - snprintf (buf, len, "%.3f", get_parameter (param)); - } else { - strcat (buf, "0"); - } - } -} - -void -LV2Plugin::run (nframes_t nframes) -{ - for (uint32_t i = 0; i < parameter_count(); ++i) { - if (parameter_is_control(i) && parameter_is_input(i)) { - _control_data[i] = _shadow_data[i]; - } - } - - slv2_instance_run(_instance, nframes); -} - -void -LV2Plugin::latency_compute_run () -{ - if (!_latency_control_port) { - return; - } - - /* we need to run the plugin so that it can set its latency - parameter. - */ - - activate (); - - uint32_t port_index = 0; - uint32_t in_index = 0; - uint32_t out_index = 0; - const nframes_t bufsize = 1024; - float buffer[bufsize]; - - memset(buffer,0,sizeof(float)*bufsize); - - /* Note that we've already required that plugins - be able to handle in-place processing. - */ - - port_index = 0; - - while (port_index < parameter_count()) { - if (parameter_is_audio (port_index)) { - if (parameter_is_input (port_index)) { - slv2_instance_connect_port (_instance, port_index, buffer); - in_index++; - } else if (parameter_is_output (port_index)) { - slv2_instance_connect_port (_instance, port_index, buffer); - out_index++; - } - } - port_index++; - } - - run (bufsize); - deactivate (); -} - -LV2World::LV2World() - : world(slv2_world_new()) -{ - slv2_world_load_all(world); - input_class = slv2_value_new_uri(world, SLV2_PORT_CLASS_INPUT); - output_class = slv2_value_new_uri(world, SLV2_PORT_CLASS_OUTPUT); - control_class = slv2_value_new_uri(world, SLV2_PORT_CLASS_CONTROL); - audio_class = slv2_value_new_uri(world, SLV2_PORT_CLASS_AUDIO); - event_class = slv2_value_new_uri(world, SLV2_PORT_CLASS_EVENT); - midi_class = slv2_value_new_uri(world, SLV2_EVENT_CLASS_MIDI); - in_place_broken = slv2_value_new_uri(world, SLV2_NAMESPACE_LV2 "inPlaceBroken"); - integer = slv2_value_new_uri(world, SLV2_NAMESPACE_LV2 "integer"); - toggled = slv2_value_new_uri(world, SLV2_NAMESPACE_LV2 "toggled"); - srate = slv2_value_new_uri(world, SLV2_NAMESPACE_LV2 "sampleRate"); -} - -LV2World::~LV2World() -{ - slv2_value_free(input_class); - slv2_value_free(output_class); - slv2_value_free(control_class); - slv2_value_free(audio_class); - slv2_value_free(event_class); - slv2_value_free(midi_class); - slv2_value_free(in_place_broken); -} - -LV2PluginInfo::LV2PluginInfo (void* lv2_world, void* slv2_plugin) - : _lv2_world(lv2_world) - , _slv2_plugin(slv2_plugin) -{ -} - -LV2PluginInfo::~LV2PluginInfo() -{ -} - -PluginPtr -LV2PluginInfo::load (Session& session) -{ - try { - PluginPtr plugin; - - plugin.reset (new LV2Plugin (session.engine(), session, - *(LV2World*)_lv2_world, (SLV2Plugin)_slv2_plugin, session.frame_rate())); - - plugin->set_info(PluginInfoPtr(new LV2PluginInfo(*this))); - return plugin; - } - - catch (failed_constructor &err) { - return PluginPtr ((Plugin*) 0); - } - - return PluginPtr(); -} - -PluginInfoList -LV2PluginInfo::discover (void* lv2_world) -{ - PluginInfoList plugs; - - LV2World* world = (LV2World*)lv2_world; - SLV2Plugins plugins = slv2_world_get_all_plugins(world->world); - - for (unsigned i=0; i < slv2_plugins_size(plugins); ++i) { - SLV2Plugin p = slv2_plugins_get_at(plugins, i); - LV2PluginInfoPtr info (new LV2PluginInfo(lv2_world, p)); - - SLV2Value name = slv2_plugin_get_name(p); - info->name = string(slv2_value_as_string(name)); - slv2_value_free(name); - - SLV2PluginClass pclass = slv2_plugin_get_class(p); - SLV2Value label = slv2_plugin_class_get_label(pclass); - info->category = slv2_value_as_string(label); - - SLV2Value author_name = slv2_plugin_get_author_name(p); - info->creator = author_name ? string(slv2_value_as_string(author_name)) : "Unknown"; - slv2_value_free(author_name); - - info->path = "/NOPATH"; // Meaningless for LV2 - - info->n_inputs.set_audio(slv2_plugin_get_num_ports_of_class(p, - world->input_class, world->audio_class, NULL)); - info->n_inputs.set_midi(slv2_plugin_get_num_ports_of_class(p, - world->input_class, world->event_class, NULL)); - - info->n_outputs.set_audio(slv2_plugin_get_num_ports_of_class(p, - world->output_class, world->audio_class, NULL)); - info->n_outputs.set_midi(slv2_plugin_get_num_ports_of_class(p, - world->output_class, world->event_class, NULL)); - - info->unique_id = slv2_value_as_uri(slv2_plugin_get_uri(p)); - info->index = 0; // Meaningless for LV2 - - plugs.push_back (info); - } - - return plugs; -} - diff --git a/libs/ardour/macosx/English.lproj/InfoPlist.strings b/libs/ardour/macosx/English.lproj/InfoPlist.strings deleted file mode 100644 index 0c0cacad8b35375e251c188024071f18053d5726..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142 zcmW-Z(F%e<5Jk^(U$OY;gML8tk{}4uKS(M_*2Zc$p9_Er;%N#vmhb+k9S(YfHc^9!r#P5QG_IVA^QMa`L)bT2n>@&CITI9Zu4xrq`< Hcl6>9v(p&@ diff --git a/libs/ardour/macosx/Info.plist b/libs/ardour/macosx/Info.plist deleted file mode 100644 index 931491039f..0000000000 --- a/libs/ardour/macosx/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ardour - CFBundleIconFile - - CFBundleIdentifier - com.apple.carbonframeworktemplate - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleSignature - ???? - CFBundleVersion - 1.0 - CFBundleShortVersionString - 1.01 - CSResourcesFileMapped - - - diff --git a/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj b/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj deleted file mode 100644 index 4026b65f59..0000000000 --- a/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1214 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXBuildFile section */ - 696149E90B97CEF500ECBDF0 /* glib in Frameworks */ = {isa = PBXBuildFile; fileRef = 696149E50B97CEF500ECBDF0 /* glib */; }; - 696149EA0B97CEF500ECBDF0 /* gmodule in Frameworks */ = {isa = PBXBuildFile; fileRef = 696149E60B97CEF500ECBDF0 /* gmodule */; }; - 696149EB0B97CEF500ECBDF0 /* gobject in Frameworks */ = {isa = PBXBuildFile; fileRef = 696149E70B97CEF500ECBDF0 /* gobject */; }; - 696149EC0B97CEF500ECBDF0 /* gthread in Frameworks */ = {isa = PBXBuildFile; fileRef = 696149E80B97CEF500ECBDF0 /* gthread */; }; - 6964FECA0B8E7A7900799BAE /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = 6964FEC80B8E7A7900799BAE /* version.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6964FECB0B8E7A7900799BAE /* version.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6964FEC90B8E7A7900799BAE /* version.cc */; }; - 696C90530B8D526000D66CAF /* ardour.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FAF0B8D526000D66CAF /* ardour.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90540B8D526000D66CAF /* audio_diskstream.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB00B8D526000D66CAF /* audio_diskstream.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90550B8D526000D66CAF /* audio_library.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB10B8D526000D66CAF /* audio_library.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90560B8D526000D66CAF /* audio_track.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB20B8D526000D66CAF /* audio_track.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90580B8D526000D66CAF /* audioengine.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB40B8D526000D66CAF /* audioengine.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90590B8D526000D66CAF /* audiofilesource.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB50B8D526000D66CAF /* audiofilesource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C905A0B8D526000D66CAF /* audiofilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB60B8D526000D66CAF /* audiofilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C905B0B8D526000D66CAF /* audioplaylist.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB70B8D526000D66CAF /* audioplaylist.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C905C0B8D526000D66CAF /* audioregion.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB80B8D526000D66CAF /* audioregion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C905D0B8D526000D66CAF /* audiosource.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FB90B8D526000D66CAF /* audiosource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C905E0B8D526000D66CAF /* auditioner.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FBA0B8D526000D66CAF /* auditioner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C905F0B8D526000D66CAF /* automation_event.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FBB0B8D526000D66CAF /* automation_event.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90600B8D526000D66CAF /* buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FBC0B8D526000D66CAF /* buffer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90610B8D526000D66CAF /* click.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FBD0B8D526000D66CAF /* click.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90620B8D526000D66CAF /* configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FBE0B8D526000D66CAF /* configuration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90630B8D526000D66CAF /* configuration_variable.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FBF0B8D526000D66CAF /* configuration_variable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90640B8D526000D66CAF /* configuration_vars.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC00B8D526000D66CAF /* configuration_vars.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90650B8D526000D66CAF /* connection.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC10B8D526000D66CAF /* connection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90660B8D526000D66CAF /* control_protocol_manager.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC20B8D526000D66CAF /* control_protocol_manager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90680B8D526000D66CAF /* crossfade.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC40B8D526000D66CAF /* crossfade.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90690B8D526000D66CAF /* crossfade_compare.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC50B8D526000D66CAF /* crossfade_compare.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C906A0B8D526000D66CAF /* curve.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC60B8D526000D66CAF /* curve.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C906B0B8D526000D66CAF /* cycle_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC70B8D526000D66CAF /* cycle_timer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C906C0B8D526000D66CAF /* cycles.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC80B8D526000D66CAF /* cycles.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C906D0B8D526000D66CAF /* data_type.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FC90B8D526000D66CAF /* data_type.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C906E0B8D526000D66CAF /* dB.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FCA0B8D526000D66CAF /* dB.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90700B8D526000D66CAF /* diskstream.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FCC0B8D526000D66CAF /* diskstream.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90710B8D526000D66CAF /* export.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FCD0B8D526000D66CAF /* export.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90720B8D526000D66CAF /* gain.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FCE0B8D526000D66CAF /* gain.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90730B8D526000D66CAF /* gdither.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FCF0B8D526000D66CAF /* gdither.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90740B8D526000D66CAF /* gdither_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD00B8D526000D66CAF /* gdither_types.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90750B8D526000D66CAF /* gdither_types_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD10B8D526000D66CAF /* gdither_types_internal.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90760B8D526000D66CAF /* insert.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD20B8D526000D66CAF /* insert.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90770B8D526000D66CAF /* io.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD30B8D526000D66CAF /* io.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90780B8D526000D66CAF /* ladspa.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD40B8D526000D66CAF /* ladspa.h */; settings = {ATTRIBUTES = (); }; }; - 696C90790B8D526000D66CAF /* ladspa_plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD50B8D526000D66CAF /* ladspa_plugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C907A0B8D526000D66CAF /* location.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD60B8D526000D66CAF /* location.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C907B0B8D526000D66CAF /* logcurve.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD70B8D526000D66CAF /* logcurve.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C907C0B8D526000D66CAF /* mix.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD80B8D526000D66CAF /* mix.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C907D0B8D526000D66CAF /* named_selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FD90B8D526000D66CAF /* named_selection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C907E0B8D526000D66CAF /* noise.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FDA0B8D526000D66CAF /* noise.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C907F0B8D526000D66CAF /* osc.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FDB0B8D526000D66CAF /* osc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90800B8D526000D66CAF /* panner.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FDC0B8D526000D66CAF /* panner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90810B8D526000D66CAF /* pcm_utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FDD0B8D526000D66CAF /* pcm_utils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90820B8D526000D66CAF /* peak.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FDE0B8D526000D66CAF /* peak.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90830B8D526000D66CAF /* playlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FDF0B8D526000D66CAF /* playlist.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90840B8D526000D66CAF /* playlist_factory.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE00B8D526000D66CAF /* playlist_factory.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90850B8D526000D66CAF /* playlist_templates.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE10B8D526000D66CAF /* playlist_templates.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90860B8D526000D66CAF /* plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE20B8D526000D66CAF /* plugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90870B8D526000D66CAF /* plugin_manager.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE30B8D526000D66CAF /* plugin_manager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90880B8D526000D66CAF /* port.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE40B8D526000D66CAF /* port.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90890B8D526000D66CAF /* recent_sessions.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE50B8D526000D66CAF /* recent_sessions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C908A0B8D526000D66CAF /* redirect.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE60B8D526000D66CAF /* redirect.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C908B0B8D526000D66CAF /* region.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE70B8D526000D66CAF /* region.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C908C0B8D526000D66CAF /* region_factory.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE80B8D526000D66CAF /* region_factory.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C908D0B8D526000D66CAF /* reverse.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FE90B8D526000D66CAF /* reverse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C908E0B8D526000D66CAF /* route.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FEA0B8D526000D66CAF /* route.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C908F0B8D526000D66CAF /* route_group.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FEB0B8D526000D66CAF /* route_group.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90900B8D526000D66CAF /* route_group_specialized.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FEC0B8D526000D66CAF /* route_group_specialized.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90910B8D526000D66CAF /* send.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FED0B8D526000D66CAF /* send.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90920B8D526000D66CAF /* session.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FEE0B8D526000D66CAF /* session.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90930B8D526000D66CAF /* session_connection.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FEF0B8D526000D66CAF /* session_connection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90940B8D526000D66CAF /* session_playlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF00B8D526000D66CAF /* session_playlist.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90950B8D526000D66CAF /* session_region.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF10B8D526000D66CAF /* session_region.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90960B8D526000D66CAF /* session_route.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF20B8D526000D66CAF /* session_route.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90970B8D526000D66CAF /* session_selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF30B8D526000D66CAF /* session_selection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90980B8D526000D66CAF /* silentfilesource.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF40B8D526000D66CAF /* silentfilesource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90990B8D526000D66CAF /* slave.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF50B8D526000D66CAF /* slave.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C909A0B8D526000D66CAF /* sndfile_helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF60B8D526000D66CAF /* sndfile_helpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C909B0B8D526000D66CAF /* sndfilesource.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF70B8D526000D66CAF /* sndfilesource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C909C0B8D526000D66CAF /* soundseq.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF80B8D526000D66CAF /* soundseq.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C909D0B8D526000D66CAF /* source.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FF90B8D526000D66CAF /* source.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C909E0B8D526000D66CAF /* source_factory.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FFA0B8D526000D66CAF /* source_factory.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C909F0B8D526000D66CAF /* spline.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FFB0B8D526000D66CAF /* spline.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90A00B8D526000D66CAF /* tempo.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FFC0B8D526000D66CAF /* tempo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90A10B8D526000D66CAF /* timestamps.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FFD0B8D526000D66CAF /* timestamps.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90A20B8D526000D66CAF /* track.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FFE0B8D526000D66CAF /* track.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90A30B8D526000D66CAF /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C8FFF0B8D526000D66CAF /* types.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90A40B8D526000D66CAF /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C90000B8D526000D66CAF /* utils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 696C90A60B8D526000D66CAF /* audio_diskstream.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90020B8D526000D66CAF /* audio_diskstream.cc */; }; - 696C90A70B8D526000D66CAF /* audio_library.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90030B8D526000D66CAF /* audio_library.cc */; }; - 696C90A80B8D526000D66CAF /* audio_playlist.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90040B8D526000D66CAF /* audio_playlist.cc */; }; - 696C90A90B8D526000D66CAF /* audio_track.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90050B8D526000D66CAF /* audio_track.cc */; }; - 696C90AB0B8D526000D66CAF /* audioengine.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90070B8D526000D66CAF /* audioengine.cc */; }; - 696C90AC0B8D526000D66CAF /* audiofilesource.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90080B8D526000D66CAF /* audiofilesource.cc */; }; - 696C90AD0B8D526000D66CAF /* audiofilter.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90090B8D526000D66CAF /* audiofilter.cc */; }; - 696C90AE0B8D526000D66CAF /* audioregion.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C900A0B8D526000D66CAF /* audioregion.cc */; }; - 696C90AF0B8D526000D66CAF /* audiosource.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C900B0B8D526000D66CAF /* audiosource.cc */; }; - 696C90B00B8D526000D66CAF /* auditioner.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C900C0B8D526000D66CAF /* auditioner.cc */; }; - 696C90B10B8D526000D66CAF /* automation.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C900D0B8D526000D66CAF /* automation.cc */; }; - 696C90B20B8D526000D66CAF /* automation_event.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C900E0B8D526000D66CAF /* automation_event.cc */; }; - 696C90B30B8D526000D66CAF /* configuration.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C900F0B8D526000D66CAF /* configuration.cc */; }; - 696C90B40B8D526000D66CAF /* connection.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90100B8D526000D66CAF /* connection.cc */; }; - 696C90B50B8D526000D66CAF /* control_protocol_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90110B8D526000D66CAF /* control_protocol_manager.cc */; }; - 696C90B70B8D526000D66CAF /* crossfade.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90130B8D526000D66CAF /* crossfade.cc */; }; - 696C90B80B8D526000D66CAF /* curve.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90140B8D526000D66CAF /* curve.cc */; }; - 696C90B90B8D526000D66CAF /* cycle_timer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90150B8D526000D66CAF /* cycle_timer.cc */; }; - 696C90BA0B8D526000D66CAF /* default_click.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90160B8D526000D66CAF /* default_click.cc */; }; - 696C90BC0B8D526000D66CAF /* diskstream.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90180B8D526000D66CAF /* diskstream.cc */; }; - 696C90BD0B8D526000D66CAF /* enums.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90190B8D526000D66CAF /* enums.cc */; }; - 696C90BE0B8D526000D66CAF /* gain.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C901A0B8D526000D66CAF /* gain.cc */; }; - 696C90BF0B8D526000D66CAF /* gdither.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C901B0B8D526000D66CAF /* gdither.cc */; }; - 696C90C00B8D526000D66CAF /* gettext.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C901C0B8D526000D66CAF /* gettext.h */; settings = {ATTRIBUTES = (); }; }; - 696C90C10B8D526000D66CAF /* globals.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C901D0B8D526000D66CAF /* globals.cc */; }; - 696C90C20B8D526000D66CAF /* i18n.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C901E0B8D526000D66CAF /* i18n.h */; settings = {ATTRIBUTES = (); }; }; - 696C90C30B8D526000D66CAF /* import.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C901F0B8D526000D66CAF /* import.cc */; }; - 696C90C40B8D526000D66CAF /* insert.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90200B8D526000D66CAF /* insert.cc */; }; - 696C90C50B8D526000D66CAF /* io.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90210B8D526000D66CAF /* io.cc */; }; - 696C90C60B8D526000D66CAF /* jack_slave.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90220B8D526000D66CAF /* jack_slave.cc */; }; - 696C90C70B8D526000D66CAF /* ladspa_plugin.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90230B8D526000D66CAF /* ladspa_plugin.cc */; }; - 696C90C80B8D526000D66CAF /* location.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90240B8D526000D66CAF /* location.cc */; }; - 696C90C90B8D526000D66CAF /* mix.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90250B8D526000D66CAF /* mix.cc */; }; - 696C90CA0B8D526000D66CAF /* mtc_slave.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90260B8D526000D66CAF /* mtc_slave.cc */; }; - 696C90CB0B8D526000D66CAF /* named_selection.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90270B8D526000D66CAF /* named_selection.cc */; }; - 696C90CC0B8D526000D66CAF /* osc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90280B8D526000D66CAF /* osc.cc */; }; - 696C90CD0B8D526000D66CAF /* panner.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90290B8D526000D66CAF /* panner.cc */; }; - 696C90CE0B8D526000D66CAF /* pcm_utils.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C902A0B8D526000D66CAF /* pcm_utils.cc */; }; - 696C90CF0B8D526000D66CAF /* playlist.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C902B0B8D526000D66CAF /* playlist.cc */; }; - 696C90D00B8D526000D66CAF /* playlist_factory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C902C0B8D526000D66CAF /* playlist_factory.cc */; }; - 696C90D10B8D526000D66CAF /* plugin.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C902D0B8D526000D66CAF /* plugin.cc */; }; - 696C90D20B8D526000D66CAF /* plugin_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C902E0B8D526000D66CAF /* plugin_manager.cc */; }; - 696C90D30B8D526000D66CAF /* port.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C902F0B8D526000D66CAF /* port.cc */; }; - 696C90D40B8D526000D66CAF /* recent_sessions.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90300B8D526000D66CAF /* recent_sessions.cc */; }; - 696C90D50B8D526000D66CAF /* redirect.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90310B8D526000D66CAF /* redirect.cc */; }; - 696C90D60B8D526000D66CAF /* region.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90320B8D526000D66CAF /* region.cc */; }; - 696C90D70B8D526000D66CAF /* region_factory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90330B8D526000D66CAF /* region_factory.cc */; }; - 696C90D80B8D526000D66CAF /* reverse.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90340B8D526000D66CAF /* reverse.cc */; }; - 696C90D90B8D526000D66CAF /* route.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90350B8D526000D66CAF /* route.cc */; }; - 696C90DA0B8D526000D66CAF /* route_group.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90360B8D526000D66CAF /* route_group.cc */; }; - 696C90DB0B8D526000D66CAF /* send.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90370B8D526000D66CAF /* send.cc */; }; - 696C90DC0B8D526000D66CAF /* session.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90380B8D526000D66CAF /* session.cc */; }; - 696C90DD0B8D526000D66CAF /* session_butler.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90390B8D526000D66CAF /* session_butler.cc */; }; - 696C90DE0B8D526000D66CAF /* session_click.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C903A0B8D526000D66CAF /* session_click.cc */; }; - 696C90DF0B8D526000D66CAF /* session_command.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C903B0B8D526000D66CAF /* session_command.cc */; }; - 696C90E10B8D526000D66CAF /* session_events.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C903D0B8D526000D66CAF /* session_events.cc */; }; - 696C90E20B8D526000D66CAF /* session_export.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C903E0B8D526000D66CAF /* session_export.cc */; }; - 696C90E30B8D526000D66CAF /* session_feedback.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C903F0B8D526000D66CAF /* session_feedback.cc */; }; - 696C90E40B8D526000D66CAF /* session_midi.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90400B8D526000D66CAF /* session_midi.cc */; }; - 696C90E50B8D526000D66CAF /* session_process.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90410B8D526000D66CAF /* session_process.cc */; }; - 696C90E60B8D526000D66CAF /* session_state.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90420B8D526000D66CAF /* session_state.cc */; }; - 696C90E70B8D526000D66CAF /* session_time.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90430B8D526000D66CAF /* session_time.cc */; }; - 696C90E80B8D526000D66CAF /* session_timefx.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90440B8D526000D66CAF /* session_timefx.cc */; }; - 696C90E90B8D526000D66CAF /* session_transport.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90450B8D526000D66CAF /* session_transport.cc */; }; - 696C90EB0B8D526000D66CAF /* silentfilesource.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90470B8D526000D66CAF /* silentfilesource.cc */; }; - 696C90EC0B8D526000D66CAF /* sndfile_helpers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90480B8D526000D66CAF /* sndfile_helpers.cc */; }; - 696C90ED0B8D526000D66CAF /* sndfilesource.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90490B8D526000D66CAF /* sndfilesource.cc */; }; - 696C90EE0B8D526000D66CAF /* source.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C904A0B8D526000D66CAF /* source.cc */; }; - 696C90EF0B8D526000D66CAF /* source_factory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C904B0B8D526000D66CAF /* source_factory.cc */; }; - 696C90F20B8D526000D66CAF /* tempo.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C904E0B8D526000D66CAF /* tempo.cc */; }; - 696C90F30B8D526000D66CAF /* track.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C904F0B8D526000D66CAF /* track.cc */; }; - 696C90F40B8D526000D66CAF /* utils.cc in Sources */ = {isa = PBXBuildFile; fileRef = 696C90500B8D526000D66CAF /* utils.cc */; }; - 696C91000B8D52F300D66CAF /* glibmm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90F70B8D52F300D66CAF /* glibmm.framework */; }; - 696C91010B8D52F300D66CAF /* Jack.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90F80B8D52F300D66CAF /* Jack.framework */; }; - 696C91020B8D52F300D66CAF /* lo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90F90B8D52F300D66CAF /* lo.framework */; }; - 696C91030B8D52F300D66CAF /* LRdf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90FA0B8D52F300D66CAF /* LRdf.framework */; }; - 696C91040B8D52F300D66CAF /* Raptor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90FB0B8D52F300D66CAF /* Raptor.framework */; }; - 696C91050B8D52F300D66CAF /* SampleRate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90FC0B8D52F300D66CAF /* SampleRate.framework */; }; - 696C91060B8D52F300D66CAF /* sigc.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90FD0B8D52F300D66CAF /* sigc.framework */; }; - 696C91070B8D52F300D66CAF /* Sndfile-ardour.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90FE0B8D52F300D66CAF /* Sndfile-ardour.framework */; }; - 696C91080B8D52F300D66CAF /* soundtouch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 696C90FF0B8D52F300D66CAF /* soundtouch.framework */; }; - 697D98090B8DCD8C0006A892 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 697D98080B8DCD8C0006A892 /* libxml2.dylib */; }; - 698D9AB60B969A6F00C53B63 /* midi++.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 698D9AB50B969A5B00C53B63 /* midi++.framework */; }; - 69AD45850B97D10600806E7E /* FLAC in Frameworks */ = {isa = PBXBuildFile; fileRef = 69AD45840B97D10600806E7E /* FLAC */; }; - 69B1B5210B8E7DFD007E41C1 /* pbd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 691B3B7C0B8D5508009155B5 /* pbd.framework */; }; - 69B1B5500B8E80AD007E41C1 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69B1B54F0B8E80AD007E41C1 /* CoreAudio.framework */; }; - 69DBC41B0BA794A500C19E65 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DBC41A0BA794A500C19E65 /* Accelerate.framework */; }; - 69DBC42B0BA7992800C19E65 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DBC42A0BA7992800C19E65 /* Carbon.framework */; }; - 69F7CE5A0B8DCB3300D76871 /* basic_ui.cc in Sources */ = {isa = PBXBuildFile; fileRef = 69F7CE520B8DCB3300D76871 /* basic_ui.cc */; }; - 69F7CE5B0B8DCB3300D76871 /* basic_ui.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F7CE540B8DCB3300D76871 /* basic_ui.h */; }; - 69F7CE5C0B8DCB3300D76871 /* control_protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F7CE550B8DCB3300D76871 /* control_protocol.h */; }; - 69F7CE5D0B8DCB3300D76871 /* smpte.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F7CE560B8DCB3300D76871 /* smpte.h */; }; - 69F7CE5E0B8DCB3300D76871 /* control_protocol.cc in Sources */ = {isa = PBXBuildFile; fileRef = 69F7CE570B8DCB3300D76871 /* control_protocol.cc */; }; - 69F7CE600B8DCB3300D76871 /* smpte.cc in Sources */ = {isa = PBXBuildFile; fileRef = 69F7CE590B8DCB3300D76871 /* smpte.cc */; }; - 8D07F2BE0486CC7A007CD1D0 /* ardour_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32BAE0B70371A74B00C91783 /* ardour_Prefix.pch */; settings = {ATTRIBUTES = (); }; }; - 8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 691B3B7B0B8D5508009155B5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 691B3B770B8D5508009155B5 /* pbd.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0; - remoteInfo = pbd; - }; - 698D9AB40B969A5B00C53B63 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 698D9AB00B969A5B00C53B63 /* midi++.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 8D07F2C80486CC7A007CD1D0; - remoteInfo = "midi++"; - }; - 698D9AB90B969ADC00C53B63 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 698D9AB00B969A5B00C53B63 /* midi++.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0; - remoteInfo = "midi++"; - }; - 69D5F6250B8D58A500301E71 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 691B3B770B8D5508009155B5 /* pbd.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0; - remoteInfo = pbd; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 32BAE0B70371A74B00C91783 /* ardour_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ardour_Prefix.pch; sourceTree = ""; }; - 691B3B770B8D5508009155B5 /* pbd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = pbd.xcodeproj; path = ../../pbd/macosx/pbd.xcodeproj; sourceTree = SOURCE_ROOT; }; - 696149E50B97CEF500ECBDF0 /* glib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = glib; path = /Library/Frameworks/GLib.framework/Versions/2.12.3/Libraries/glib; sourceTree = ""; }; - 696149E60B97CEF500ECBDF0 /* gmodule */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = gmodule; path = /Library/Frameworks/GLib.framework/Versions/2.12.3/Libraries/gmodule; sourceTree = ""; }; - 696149E70B97CEF500ECBDF0 /* gobject */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = gobject; path = /Library/Frameworks/GLib.framework/Versions/2.12.3/Libraries/gobject; sourceTree = ""; }; - 696149E80B97CEF500ECBDF0 /* gthread */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = gthread; path = /Library/Frameworks/GLib.framework/Versions/2.12.3/Libraries/gthread; sourceTree = ""; }; - 6964FEC80B8E7A7900799BAE /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; - 6964FEC90B8E7A7900799BAE /* version.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = version.cc; sourceTree = ""; }; - 696C8FAF0B8D526000D66CAF /* ardour.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ardour.h; sourceTree = ""; }; - 696C8FB00B8D526000D66CAF /* audio_diskstream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audio_diskstream.h; sourceTree = ""; }; - 696C8FB10B8D526000D66CAF /* audio_library.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audio_library.h; sourceTree = ""; }; - 696C8FB20B8D526000D66CAF /* audio_track.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audio_track.h; sourceTree = ""; }; - 696C8FB40B8D526000D66CAF /* audioengine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audioengine.h; sourceTree = ""; }; - 696C8FB50B8D526000D66CAF /* audiofilesource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audiofilesource.h; sourceTree = ""; }; - 696C8FB60B8D526000D66CAF /* audiofilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audiofilter.h; sourceTree = ""; }; - 696C8FB70B8D526000D66CAF /* audioplaylist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audioplaylist.h; sourceTree = ""; }; - 696C8FB80B8D526000D66CAF /* audioregion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audioregion.h; sourceTree = ""; }; - 696C8FB90B8D526000D66CAF /* audiosource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = audiosource.h; sourceTree = ""; }; - 696C8FBA0B8D526000D66CAF /* auditioner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = auditioner.h; sourceTree = ""; }; - 696C8FBB0B8D526000D66CAF /* automation_event.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = automation_event.h; sourceTree = ""; }; - 696C8FBC0B8D526000D66CAF /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = ""; }; - 696C8FBD0B8D526000D66CAF /* click.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = click.h; sourceTree = ""; }; - 696C8FBE0B8D526000D66CAF /* configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = configuration.h; sourceTree = ""; }; - 696C8FBF0B8D526000D66CAF /* configuration_variable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = configuration_variable.h; sourceTree = ""; }; - 696C8FC00B8D526000D66CAF /* configuration_vars.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = configuration_vars.h; sourceTree = ""; }; - 696C8FC10B8D526000D66CAF /* connection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = connection.h; sourceTree = ""; }; - 696C8FC20B8D526000D66CAF /* control_protocol_manager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = control_protocol_manager.h; sourceTree = ""; }; - 696C8FC40B8D526000D66CAF /* crossfade.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = crossfade.h; sourceTree = ""; }; - 696C8FC50B8D526000D66CAF /* crossfade_compare.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = crossfade_compare.h; sourceTree = ""; }; - 696C8FC60B8D526000D66CAF /* curve.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = curve.h; sourceTree = ""; }; - 696C8FC70B8D526000D66CAF /* cycle_timer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cycle_timer.h; sourceTree = ""; }; - 696C8FC80B8D526000D66CAF /* cycles.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cycles.h; sourceTree = ""; }; - 696C8FC90B8D526000D66CAF /* data_type.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = data_type.h; sourceTree = ""; }; - 696C8FCA0B8D526000D66CAF /* dB.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dB.h; sourceTree = ""; }; - 696C8FCC0B8D526000D66CAF /* diskstream.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = diskstream.h; sourceTree = ""; }; - 696C8FCD0B8D526000D66CAF /* export.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = export.h; sourceTree = ""; }; - 696C8FCE0B8D526000D66CAF /* gain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gain.h; sourceTree = ""; }; - 696C8FCF0B8D526000D66CAF /* gdither.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gdither.h; sourceTree = ""; }; - 696C8FD00B8D526000D66CAF /* gdither_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gdither_types.h; sourceTree = ""; }; - 696C8FD10B8D526000D66CAF /* gdither_types_internal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gdither_types_internal.h; sourceTree = ""; }; - 696C8FD20B8D526000D66CAF /* insert.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = insert.h; sourceTree = ""; }; - 696C8FD30B8D526000D66CAF /* io.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = ""; }; - 696C8FD40B8D526000D66CAF /* ladspa.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ladspa.h; sourceTree = ""; }; - 696C8FD50B8D526000D66CAF /* ladspa_plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ladspa_plugin.h; sourceTree = ""; }; - 696C8FD60B8D526000D66CAF /* location.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = location.h; sourceTree = ""; }; - 696C8FD70B8D526000D66CAF /* logcurve.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = logcurve.h; sourceTree = ""; }; - 696C8FD80B8D526000D66CAF /* mix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mix.h; sourceTree = ""; }; - 696C8FD90B8D526000D66CAF /* named_selection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = named_selection.h; sourceTree = ""; }; - 696C8FDA0B8D526000D66CAF /* noise.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = noise.h; sourceTree = ""; }; - 696C8FDB0B8D526000D66CAF /* osc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = osc.h; sourceTree = ""; }; - 696C8FDC0B8D526000D66CAF /* panner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = panner.h; sourceTree = ""; }; - 696C8FDD0B8D526000D66CAF /* pcm_utils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pcm_utils.h; sourceTree = ""; }; - 696C8FDE0B8D526000D66CAF /* peak.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = peak.h; sourceTree = ""; }; - 696C8FDF0B8D526000D66CAF /* playlist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = playlist.h; sourceTree = ""; }; - 696C8FE00B8D526000D66CAF /* playlist_factory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = playlist_factory.h; sourceTree = ""; }; - 696C8FE10B8D526000D66CAF /* playlist_templates.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = playlist_templates.h; sourceTree = ""; }; - 696C8FE20B8D526000D66CAF /* plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = plugin.h; sourceTree = ""; }; - 696C8FE30B8D526000D66CAF /* plugin_manager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = plugin_manager.h; sourceTree = ""; }; - 696C8FE40B8D526000D66CAF /* port.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = port.h; sourceTree = ""; }; - 696C8FE50B8D526000D66CAF /* recent_sessions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = recent_sessions.h; sourceTree = ""; }; - 696C8FE60B8D526000D66CAF /* redirect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = redirect.h; sourceTree = ""; }; - 696C8FE70B8D526000D66CAF /* region.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = region.h; sourceTree = ""; }; - 696C8FE80B8D526000D66CAF /* region_factory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = region_factory.h; sourceTree = ""; }; - 696C8FE90B8D526000D66CAF /* reverse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = reverse.h; sourceTree = ""; }; - 696C8FEA0B8D526000D66CAF /* route.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = route.h; sourceTree = ""; }; - 696C8FEB0B8D526000D66CAF /* route_group.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = route_group.h; sourceTree = ""; }; - 696C8FEC0B8D526000D66CAF /* route_group_specialized.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = route_group_specialized.h; sourceTree = ""; }; - 696C8FED0B8D526000D66CAF /* send.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = send.h; sourceTree = ""; }; - 696C8FEE0B8D526000D66CAF /* session.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = session.h; sourceTree = ""; }; - 696C8FEF0B8D526000D66CAF /* session_connection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = session_connection.h; sourceTree = ""; }; - 696C8FF00B8D526000D66CAF /* session_playlist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = session_playlist.h; sourceTree = ""; }; - 696C8FF10B8D526000D66CAF /* session_region.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = session_region.h; sourceTree = ""; }; - 696C8FF20B8D526000D66CAF /* session_route.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = session_route.h; sourceTree = ""; }; - 696C8FF30B8D526000D66CAF /* session_selection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = session_selection.h; sourceTree = ""; }; - 696C8FF40B8D526000D66CAF /* silentfilesource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = silentfilesource.h; sourceTree = ""; }; - 696C8FF50B8D526000D66CAF /* slave.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = slave.h; sourceTree = ""; }; - 696C8FF60B8D526000D66CAF /* sndfile_helpers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sndfile_helpers.h; sourceTree = ""; }; - 696C8FF70B8D526000D66CAF /* sndfilesource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = sndfilesource.h; sourceTree = ""; }; - 696C8FF80B8D526000D66CAF /* soundseq.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = soundseq.h; sourceTree = ""; }; - 696C8FF90B8D526000D66CAF /* source.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = source.h; sourceTree = ""; }; - 696C8FFA0B8D526000D66CAF /* source_factory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = source_factory.h; sourceTree = ""; }; - 696C8FFB0B8D526000D66CAF /* spline.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = spline.h; sourceTree = ""; }; - 696C8FFC0B8D526000D66CAF /* tempo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = tempo.h; sourceTree = ""; }; - 696C8FFD0B8D526000D66CAF /* timestamps.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = timestamps.h; sourceTree = ""; }; - 696C8FFE0B8D526000D66CAF /* track.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = track.h; sourceTree = ""; }; - 696C8FFF0B8D526000D66CAF /* types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; - 696C90000B8D526000D66CAF /* utils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = ""; }; - 696C90020B8D526000D66CAF /* audio_diskstream.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audio_diskstream.cc; path = ../audio_diskstream.cc; sourceTree = SOURCE_ROOT; }; - 696C90030B8D526000D66CAF /* audio_library.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audio_library.cc; path = ../audio_library.cc; sourceTree = SOURCE_ROOT; }; - 696C90040B8D526000D66CAF /* audio_playlist.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audio_playlist.cc; path = ../audio_playlist.cc; sourceTree = SOURCE_ROOT; }; - 696C90050B8D526000D66CAF /* audio_track.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audio_track.cc; path = ../audio_track.cc; sourceTree = SOURCE_ROOT; }; - 696C90070B8D526000D66CAF /* audioengine.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audioengine.cc; path = ../audioengine.cc; sourceTree = SOURCE_ROOT; }; - 696C90080B8D526000D66CAF /* audiofilesource.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audiofilesource.cc; path = ../audiofilesource.cc; sourceTree = SOURCE_ROOT; }; - 696C90090B8D526000D66CAF /* audiofilter.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audiofilter.cc; path = ../audiofilter.cc; sourceTree = SOURCE_ROOT; }; - 696C900A0B8D526000D66CAF /* audioregion.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audioregion.cc; path = ../audioregion.cc; sourceTree = SOURCE_ROOT; }; - 696C900B0B8D526000D66CAF /* audiosource.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = audiosource.cc; path = ../audiosource.cc; sourceTree = SOURCE_ROOT; }; - 696C900C0B8D526000D66CAF /* auditioner.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = auditioner.cc; path = ../auditioner.cc; sourceTree = SOURCE_ROOT; }; - 696C900D0B8D526000D66CAF /* automation.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = automation.cc; path = ../automation.cc; sourceTree = SOURCE_ROOT; }; - 696C900E0B8D526000D66CAF /* automation_event.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = automation_event.cc; path = ../automation_event.cc; sourceTree = SOURCE_ROOT; }; - 696C900F0B8D526000D66CAF /* configuration.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = configuration.cc; path = ../configuration.cc; sourceTree = SOURCE_ROOT; }; - 696C90100B8D526000D66CAF /* connection.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = connection.cc; path = ../connection.cc; sourceTree = SOURCE_ROOT; }; - 696C90110B8D526000D66CAF /* control_protocol_manager.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = control_protocol_manager.cc; path = ../control_protocol_manager.cc; sourceTree = SOURCE_ROOT; }; - 696C90130B8D526000D66CAF /* crossfade.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = crossfade.cc; path = ../crossfade.cc; sourceTree = SOURCE_ROOT; }; - 696C90140B8D526000D66CAF /* curve.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = curve.cc; path = ../curve.cc; sourceTree = SOURCE_ROOT; }; - 696C90150B8D526000D66CAF /* cycle_timer.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = cycle_timer.cc; path = ../cycle_timer.cc; sourceTree = SOURCE_ROOT; }; - 696C90160B8D526000D66CAF /* default_click.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = default_click.cc; path = ../default_click.cc; sourceTree = SOURCE_ROOT; }; - 696C90180B8D526000D66CAF /* diskstream.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = diskstream.cc; path = ../diskstream.cc; sourceTree = SOURCE_ROOT; }; - 696C90190B8D526000D66CAF /* enums.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = enums.cc; path = ../enums.cc; sourceTree = SOURCE_ROOT; }; - 696C901A0B8D526000D66CAF /* gain.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gain.cc; path = ../gain.cc; sourceTree = SOURCE_ROOT; }; - 696C901B0B8D526000D66CAF /* gdither.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gdither.cc; path = ../gdither.cc; sourceTree = SOURCE_ROOT; }; - 696C901C0B8D526000D66CAF /* gettext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = gettext.h; path = ../gettext.h; sourceTree = SOURCE_ROOT; }; - 696C901D0B8D526000D66CAF /* globals.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = globals.cc; path = ../globals.cc; sourceTree = SOURCE_ROOT; }; - 696C901E0B8D526000D66CAF /* i18n.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i18n.h; path = ../i18n.h; sourceTree = SOURCE_ROOT; }; - 696C901F0B8D526000D66CAF /* import.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = import.cc; path = ../import.cc; sourceTree = SOURCE_ROOT; }; - 696C90200B8D526000D66CAF /* insert.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = insert.cc; path = ../insert.cc; sourceTree = SOURCE_ROOT; }; - 696C90210B8D526000D66CAF /* io.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = io.cc; path = ../io.cc; sourceTree = SOURCE_ROOT; }; - 696C90220B8D526000D66CAF /* jack_slave.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = jack_slave.cc; path = ../jack_slave.cc; sourceTree = SOURCE_ROOT; }; - 696C90230B8D526000D66CAF /* ladspa_plugin.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ladspa_plugin.cc; path = ../ladspa_plugin.cc; sourceTree = SOURCE_ROOT; }; - 696C90240B8D526000D66CAF /* location.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = location.cc; path = ../location.cc; sourceTree = SOURCE_ROOT; }; - 696C90250B8D526000D66CAF /* mix.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mix.cc; path = ../mix.cc; sourceTree = SOURCE_ROOT; }; - 696C90260B8D526000D66CAF /* mtc_slave.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mtc_slave.cc; path = ../mtc_slave.cc; sourceTree = SOURCE_ROOT; }; - 696C90270B8D526000D66CAF /* named_selection.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = named_selection.cc; path = ../named_selection.cc; sourceTree = SOURCE_ROOT; }; - 696C90280B8D526000D66CAF /* osc.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = osc.cc; path = ../osc.cc; sourceTree = SOURCE_ROOT; }; - 696C90290B8D526000D66CAF /* panner.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = panner.cc; path = ../panner.cc; sourceTree = SOURCE_ROOT; }; - 696C902A0B8D526000D66CAF /* pcm_utils.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = pcm_utils.cc; path = ../pcm_utils.cc; sourceTree = SOURCE_ROOT; }; - 696C902B0B8D526000D66CAF /* playlist.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = playlist.cc; path = ../playlist.cc; sourceTree = SOURCE_ROOT; }; - 696C902C0B8D526000D66CAF /* playlist_factory.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = playlist_factory.cc; path = ../playlist_factory.cc; sourceTree = SOURCE_ROOT; }; - 696C902D0B8D526000D66CAF /* plugin.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = plugin.cc; path = ../plugin.cc; sourceTree = SOURCE_ROOT; }; - 696C902E0B8D526000D66CAF /* plugin_manager.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = plugin_manager.cc; path = ../plugin_manager.cc; sourceTree = SOURCE_ROOT; }; - 696C902F0B8D526000D66CAF /* port.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = port.cc; path = ../port.cc; sourceTree = SOURCE_ROOT; }; - 696C90300B8D526000D66CAF /* recent_sessions.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = recent_sessions.cc; path = ../recent_sessions.cc; sourceTree = SOURCE_ROOT; }; - 696C90310B8D526000D66CAF /* redirect.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = redirect.cc; path = ../redirect.cc; sourceTree = SOURCE_ROOT; }; - 696C90320B8D526000D66CAF /* region.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = region.cc; path = ../region.cc; sourceTree = SOURCE_ROOT; }; - 696C90330B8D526000D66CAF /* region_factory.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = region_factory.cc; path = ../region_factory.cc; sourceTree = SOURCE_ROOT; }; - 696C90340B8D526000D66CAF /* reverse.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = reverse.cc; path = ../reverse.cc; sourceTree = SOURCE_ROOT; }; - 696C90350B8D526000D66CAF /* route.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = route.cc; path = ../route.cc; sourceTree = SOURCE_ROOT; }; - 696C90360B8D526000D66CAF /* route_group.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = route_group.cc; path = ../route_group.cc; sourceTree = SOURCE_ROOT; }; - 696C90370B8D526000D66CAF /* send.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = send.cc; path = ../send.cc; sourceTree = SOURCE_ROOT; }; - 696C90380B8D526000D66CAF /* session.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session.cc; path = ../session.cc; sourceTree = SOURCE_ROOT; }; - 696C90390B8D526000D66CAF /* session_butler.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_butler.cc; path = ../session_butler.cc; sourceTree = SOURCE_ROOT; }; - 696C903A0B8D526000D66CAF /* session_click.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_click.cc; path = ../session_click.cc; sourceTree = SOURCE_ROOT; }; - 696C903B0B8D526000D66CAF /* session_command.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_command.cc; path = ../session_command.cc; sourceTree = SOURCE_ROOT; }; - 696C903D0B8D526000D66CAF /* session_events.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_events.cc; path = ../session_events.cc; sourceTree = SOURCE_ROOT; }; - 696C903E0B8D526000D66CAF /* session_export.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_export.cc; path = ../session_export.cc; sourceTree = SOURCE_ROOT; }; - 696C903F0B8D526000D66CAF /* session_feedback.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_feedback.cc; path = ../session_feedback.cc; sourceTree = SOURCE_ROOT; }; - 696C90400B8D526000D66CAF /* session_midi.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_midi.cc; path = ../session_midi.cc; sourceTree = SOURCE_ROOT; }; - 696C90410B8D526000D66CAF /* session_process.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_process.cc; path = ../session_process.cc; sourceTree = SOURCE_ROOT; }; - 696C90420B8D526000D66CAF /* session_state.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_state.cc; path = ../session_state.cc; sourceTree = SOURCE_ROOT; }; - 696C90430B8D526000D66CAF /* session_time.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_time.cc; path = ../session_time.cc; sourceTree = SOURCE_ROOT; }; - 696C90440B8D526000D66CAF /* session_timefx.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_timefx.cc; path = ../session_timefx.cc; sourceTree = SOURCE_ROOT; }; - 696C90450B8D526000D66CAF /* session_transport.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = session_transport.cc; path = ../session_transport.cc; sourceTree = SOURCE_ROOT; }; - 696C90470B8D526000D66CAF /* silentfilesource.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = silentfilesource.cc; path = ../silentfilesource.cc; sourceTree = SOURCE_ROOT; }; - 696C90480B8D526000D66CAF /* sndfile_helpers.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sndfile_helpers.cc; path = ../sndfile_helpers.cc; sourceTree = SOURCE_ROOT; }; - 696C90490B8D526000D66CAF /* sndfilesource.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sndfilesource.cc; path = ../sndfilesource.cc; sourceTree = SOURCE_ROOT; }; - 696C904A0B8D526000D66CAF /* source.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = source.cc; path = ../source.cc; sourceTree = SOURCE_ROOT; }; - 696C904B0B8D526000D66CAF /* source_factory.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = source_factory.cc; path = ../source_factory.cc; sourceTree = SOURCE_ROOT; }; - 696C904E0B8D526000D66CAF /* tempo.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = tempo.cc; path = ../tempo.cc; sourceTree = SOURCE_ROOT; }; - 696C904F0B8D526000D66CAF /* track.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = track.cc; path = ../track.cc; sourceTree = SOURCE_ROOT; }; - 696C90500B8D526000D66CAF /* utils.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cc; path = ../utils.cc; sourceTree = SOURCE_ROOT; }; - 696C90F70B8D52F300D66CAF /* glibmm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = glibmm.framework; path = /Library/Frameworks/glibmm.framework; sourceTree = ""; }; - 696C90F80B8D52F300D66CAF /* Jack.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Jack.framework; path = /Library/Frameworks/Jack.framework; sourceTree = ""; }; - 696C90F90B8D52F300D66CAF /* lo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = lo.framework; path = /Library/Frameworks/lo.framework; sourceTree = ""; }; - 696C90FA0B8D52F300D66CAF /* LRdf.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LRdf.framework; path = /Library/Frameworks/LRdf.framework; sourceTree = ""; }; - 696C90FB0B8D52F300D66CAF /* Raptor.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Raptor.framework; path = /Library/Frameworks/Raptor.framework; sourceTree = ""; }; - 696C90FC0B8D52F300D66CAF /* SampleRate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SampleRate.framework; path = /Library/Frameworks/SampleRate.framework; sourceTree = ""; }; - 696C90FD0B8D52F300D66CAF /* sigc.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = sigc.framework; path = /Library/Frameworks/sigc.framework; sourceTree = ""; }; - 696C90FE0B8D52F300D66CAF /* Sndfile-ardour.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Sndfile-ardour.framework"; path = "/Library/Frameworks/Sndfile-ardour.framework"; sourceTree = ""; }; - 696C90FF0B8D52F300D66CAF /* soundtouch.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = soundtouch.framework; path = /Library/Frameworks/soundtouch.framework; sourceTree = ""; }; - 697D98080B8DCD8C0006A892 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = ""; }; - 698D9AB00B969A5B00C53B63 /* midi++.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "midi++.xcodeproj"; path = "../../midi++2/macosx/midi++.xcodeproj"; sourceTree = SOURCE_ROOT; }; - 69AD45840B97D10600806E7E /* FLAC */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = FLAC; path = "/Library/Frameworks/Sndfile-ardour.framework/Versions/A/Libraries/FLAC"; sourceTree = ""; }; - 69B1B54F0B8E80AD007E41C1 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; - 69DBC41A0BA794A500C19E65 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Accelerate.framework; sourceTree = ""; }; - 69DBC42A0BA7992800C19E65 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; - 69F7CE520B8DCB3300D76871 /* basic_ui.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = basic_ui.cc; sourceTree = ""; }; - 69F7CE540B8DCB3300D76871 /* basic_ui.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = basic_ui.h; sourceTree = ""; }; - 69F7CE550B8DCB3300D76871 /* control_protocol.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = control_protocol.h; sourceTree = ""; }; - 69F7CE560B8DCB3300D76871 /* smpte.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = smpte.h; sourceTree = ""; }; - 69F7CE570B8DCB3300D76871 /* control_protocol.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = control_protocol.cc; sourceTree = ""; }; - 69F7CE590B8DCB3300D76871 /* smpte.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = smpte.cc; sourceTree = ""; }; - 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 8D07F2C80486CC7A007CD1D0 /* ardour.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ardour.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D07F2C30486CC7A007CD1D0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 698D9AB60B969A6F00C53B63 /* midi++.framework in Frameworks */, - 69B1B5500B8E80AD007E41C1 /* CoreAudio.framework in Frameworks */, - 696C91000B8D52F300D66CAF /* glibmm.framework in Frameworks */, - 696C91010B8D52F300D66CAF /* Jack.framework in Frameworks */, - 696C91020B8D52F300D66CAF /* lo.framework in Frameworks */, - 696C91030B8D52F300D66CAF /* LRdf.framework in Frameworks */, - 696C91040B8D52F300D66CAF /* Raptor.framework in Frameworks */, - 696C91050B8D52F300D66CAF /* SampleRate.framework in Frameworks */, - 696C91060B8D52F300D66CAF /* sigc.framework in Frameworks */, - 696C91070B8D52F300D66CAF /* Sndfile-ardour.framework in Frameworks */, - 696C91080B8D52F300D66CAF /* soundtouch.framework in Frameworks */, - 697D98090B8DCD8C0006A892 /* libxml2.dylib in Frameworks */, - 69B1B5210B8E7DFD007E41C1 /* pbd.framework in Frameworks */, - 696149E90B97CEF500ECBDF0 /* glib in Frameworks */, - 696149EA0B97CEF500ECBDF0 /* gmodule in Frameworks */, - 696149EB0B97CEF500ECBDF0 /* gobject in Frameworks */, - 696149EC0B97CEF500ECBDF0 /* gthread in Frameworks */, - 69AD45850B97D10600806E7E /* FLAC in Frameworks */, - 69DBC41B0BA794A500C19E65 /* Accelerate.framework in Frameworks */, - 69DBC42B0BA7992800C19E65 /* Carbon.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 034768DDFF38A45A11DB9C8B /* Products */ = { - isa = PBXGroup; - children = ( - 8D07F2C80486CC7A007CD1D0 /* ardour.framework */, - ); - name = Products; - sourceTree = ""; - }; - 0867D691FE84028FC02AAC07 /* ardour */ = { - isa = PBXGroup; - children = ( - 6964FEC80B8E7A7900799BAE /* version.h */, - 6964FEC90B8E7A7900799BAE /* version.cc */, - 08FB77ACFE841707C02AAC07 /* Source */, - 089C1665FE841158C02AAC07 /* Resources */, - 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, - 034768DDFF38A45A11DB9C8B /* Products */, - ); - name = ardour; - sourceTree = ""; - }; - 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - 69DBC42A0BA7992800C19E65 /* Carbon.framework */, - 69DBC41A0BA794A500C19E65 /* Accelerate.framework */, - 69AD45840B97D10600806E7E /* FLAC */, - 696149E50B97CEF500ECBDF0 /* glib */, - 696149E60B97CEF500ECBDF0 /* gmodule */, - 696149E70B97CEF500ECBDF0 /* gobject */, - 696149E80B97CEF500ECBDF0 /* gthread */, - 698D9AB00B969A5B00C53B63 /* midi++.xcodeproj */, - 69B1B54F0B8E80AD007E41C1 /* CoreAudio.framework */, - 697D98080B8DCD8C0006A892 /* libxml2.dylib */, - 691B3B770B8D5508009155B5 /* pbd.xcodeproj */, - 696C90F70B8D52F300D66CAF /* glibmm.framework */, - 696C90F80B8D52F300D66CAF /* Jack.framework */, - 696C90F90B8D52F300D66CAF /* lo.framework */, - 696C90FA0B8D52F300D66CAF /* LRdf.framework */, - 696C90FB0B8D52F300D66CAF /* Raptor.framework */, - 696C90FC0B8D52F300D66CAF /* SampleRate.framework */, - 696C90FD0B8D52F300D66CAF /* sigc.framework */, - 696C90FE0B8D52F300D66CAF /* Sndfile-ardour.framework */, - 696C90FF0B8D52F300D66CAF /* soundtouch.framework */, - ); - name = "External Frameworks and Libraries"; - sourceTree = ""; - }; - 089C1665FE841158C02AAC07 /* Resources */ = { - isa = PBXGroup; - children = ( - 8D07F2C70486CC7A007CD1D0 /* Info.plist */, - 089C1666FE841158C02AAC07 /* InfoPlist.strings */, - ); - name = Resources; - sourceTree = ""; - }; - 08FB77ACFE841707C02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 69F7CE510B8DCB3300D76871 /* control_protocol */, - 696C8FAD0B8D526000D66CAF /* ardour */, - 696C90020B8D526000D66CAF /* audio_diskstream.cc */, - 696C90030B8D526000D66CAF /* audio_library.cc */, - 696C90040B8D526000D66CAF /* audio_playlist.cc */, - 696C90050B8D526000D66CAF /* audio_track.cc */, - 696C90070B8D526000D66CAF /* audioengine.cc */, - 696C90080B8D526000D66CAF /* audiofilesource.cc */, - 696C90090B8D526000D66CAF /* audiofilter.cc */, - 696C900A0B8D526000D66CAF /* audioregion.cc */, - 696C900B0B8D526000D66CAF /* audiosource.cc */, - 696C900C0B8D526000D66CAF /* auditioner.cc */, - 696C900D0B8D526000D66CAF /* automation.cc */, - 696C900E0B8D526000D66CAF /* automation_event.cc */, - 696C900F0B8D526000D66CAF /* configuration.cc */, - 696C90100B8D526000D66CAF /* connection.cc */, - 696C90110B8D526000D66CAF /* control_protocol_manager.cc */, - 696C90130B8D526000D66CAF /* crossfade.cc */, - 696C90140B8D526000D66CAF /* curve.cc */, - 696C90150B8D526000D66CAF /* cycle_timer.cc */, - 696C90160B8D526000D66CAF /* default_click.cc */, - 696C90180B8D526000D66CAF /* diskstream.cc */, - 696C90190B8D526000D66CAF /* enums.cc */, - 696C901A0B8D526000D66CAF /* gain.cc */, - 696C901B0B8D526000D66CAF /* gdither.cc */, - 696C901C0B8D526000D66CAF /* gettext.h */, - 696C901D0B8D526000D66CAF /* globals.cc */, - 696C901E0B8D526000D66CAF /* i18n.h */, - 696C901F0B8D526000D66CAF /* import.cc */, - 696C90200B8D526000D66CAF /* insert.cc */, - 696C90210B8D526000D66CAF /* io.cc */, - 696C90220B8D526000D66CAF /* jack_slave.cc */, - 696C90230B8D526000D66CAF /* ladspa_plugin.cc */, - 696C90240B8D526000D66CAF /* location.cc */, - 696C90250B8D526000D66CAF /* mix.cc */, - 696C90260B8D526000D66CAF /* mtc_slave.cc */, - 696C90270B8D526000D66CAF /* named_selection.cc */, - 696C90280B8D526000D66CAF /* osc.cc */, - 696C90290B8D526000D66CAF /* panner.cc */, - 696C902A0B8D526000D66CAF /* pcm_utils.cc */, - 696C902B0B8D526000D66CAF /* playlist.cc */, - 696C902C0B8D526000D66CAF /* playlist_factory.cc */, - 696C902D0B8D526000D66CAF /* plugin.cc */, - 696C902E0B8D526000D66CAF /* plugin_manager.cc */, - 696C902F0B8D526000D66CAF /* port.cc */, - 696C90300B8D526000D66CAF /* recent_sessions.cc */, - 696C90310B8D526000D66CAF /* redirect.cc */, - 696C90320B8D526000D66CAF /* region.cc */, - 696C90330B8D526000D66CAF /* region_factory.cc */, - 696C90340B8D526000D66CAF /* reverse.cc */, - 696C90350B8D526000D66CAF /* route.cc */, - 696C90360B8D526000D66CAF /* route_group.cc */, - 696C90370B8D526000D66CAF /* send.cc */, - 696C90380B8D526000D66CAF /* session.cc */, - 696C90390B8D526000D66CAF /* session_butler.cc */, - 696C903A0B8D526000D66CAF /* session_click.cc */, - 696C903B0B8D526000D66CAF /* session_command.cc */, - 696C903D0B8D526000D66CAF /* session_events.cc */, - 696C903E0B8D526000D66CAF /* session_export.cc */, - 696C903F0B8D526000D66CAF /* session_feedback.cc */, - 696C90400B8D526000D66CAF /* session_midi.cc */, - 696C90410B8D526000D66CAF /* session_process.cc */, - 696C90420B8D526000D66CAF /* session_state.cc */, - 696C90430B8D526000D66CAF /* session_time.cc */, - 696C90440B8D526000D66CAF /* session_timefx.cc */, - 696C90450B8D526000D66CAF /* session_transport.cc */, - 696C90470B8D526000D66CAF /* silentfilesource.cc */, - 696C90480B8D526000D66CAF /* sndfile_helpers.cc */, - 696C90490B8D526000D66CAF /* sndfilesource.cc */, - 696C904A0B8D526000D66CAF /* source.cc */, - 696C904B0B8D526000D66CAF /* source_factory.cc */, - 696C904E0B8D526000D66CAF /* tempo.cc */, - 696C904F0B8D526000D66CAF /* track.cc */, - 696C90500B8D526000D66CAF /* utils.cc */, - 32BAE0B70371A74B00C91783 /* ardour_Prefix.pch */, - ); - name = Source; - sourceTree = ""; - }; - 691B3B780B8D5508009155B5 /* Products */ = { - isa = PBXGroup; - children = ( - 691B3B7C0B8D5508009155B5 /* pbd.framework */, - ); - name = Products; - sourceTree = ""; - }; - 696C8FAD0B8D526000D66CAF /* ardour */ = { - isa = PBXGroup; - children = ( - 696C8FAF0B8D526000D66CAF /* ardour.h */, - 696C8FB00B8D526000D66CAF /* audio_diskstream.h */, - 696C8FB10B8D526000D66CAF /* audio_library.h */, - 696C8FB20B8D526000D66CAF /* audio_track.h */, - 696C8FB40B8D526000D66CAF /* audioengine.h */, - 696C8FB50B8D526000D66CAF /* audiofilesource.h */, - 696C8FB60B8D526000D66CAF /* audiofilter.h */, - 696C8FB70B8D526000D66CAF /* audioplaylist.h */, - 696C8FB80B8D526000D66CAF /* audioregion.h */, - 696C8FB90B8D526000D66CAF /* audiosource.h */, - 696C8FBA0B8D526000D66CAF /* auditioner.h */, - 696C8FBB0B8D526000D66CAF /* automation_event.h */, - 696C8FBC0B8D526000D66CAF /* buffer.h */, - 696C8FBD0B8D526000D66CAF /* click.h */, - 696C8FBE0B8D526000D66CAF /* configuration.h */, - 696C8FBF0B8D526000D66CAF /* configuration_variable.h */, - 696C8FC00B8D526000D66CAF /* configuration_vars.h */, - 696C8FC10B8D526000D66CAF /* connection.h */, - 696C8FC20B8D526000D66CAF /* control_protocol_manager.h */, - 696C8FC40B8D526000D66CAF /* crossfade.h */, - 696C8FC50B8D526000D66CAF /* crossfade_compare.h */, - 696C8FC60B8D526000D66CAF /* curve.h */, - 696C8FC70B8D526000D66CAF /* cycle_timer.h */, - 696C8FC80B8D526000D66CAF /* cycles.h */, - 696C8FC90B8D526000D66CAF /* data_type.h */, - 696C8FCA0B8D526000D66CAF /* dB.h */, - 696C8FCC0B8D526000D66CAF /* diskstream.h */, - 696C8FCD0B8D526000D66CAF /* export.h */, - 696C8FCE0B8D526000D66CAF /* gain.h */, - 696C8FCF0B8D526000D66CAF /* gdither.h */, - 696C8FD00B8D526000D66CAF /* gdither_types.h */, - 696C8FD10B8D526000D66CAF /* gdither_types_internal.h */, - 696C8FD20B8D526000D66CAF /* insert.h */, - 696C8FD30B8D526000D66CAF /* io.h */, - 696C8FD40B8D526000D66CAF /* ladspa.h */, - 696C8FD50B8D526000D66CAF /* ladspa_plugin.h */, - 696C8FD60B8D526000D66CAF /* location.h */, - 696C8FD70B8D526000D66CAF /* logcurve.h */, - 696C8FD80B8D526000D66CAF /* mix.h */, - 696C8FD90B8D526000D66CAF /* named_selection.h */, - 696C8FDA0B8D526000D66CAF /* noise.h */, - 696C8FDB0B8D526000D66CAF /* osc.h */, - 696C8FDC0B8D526000D66CAF /* panner.h */, - 696C8FDD0B8D526000D66CAF /* pcm_utils.h */, - 696C8FDE0B8D526000D66CAF /* peak.h */, - 696C8FDF0B8D526000D66CAF /* playlist.h */, - 696C8FE00B8D526000D66CAF /* playlist_factory.h */, - 696C8FE10B8D526000D66CAF /* playlist_templates.h */, - 696C8FE20B8D526000D66CAF /* plugin.h */, - 696C8FE30B8D526000D66CAF /* plugin_manager.h */, - 696C8FE40B8D526000D66CAF /* port.h */, - 696C8FE50B8D526000D66CAF /* recent_sessions.h */, - 696C8FE60B8D526000D66CAF /* redirect.h */, - 696C8FE70B8D526000D66CAF /* region.h */, - 696C8FE80B8D526000D66CAF /* region_factory.h */, - 696C8FE90B8D526000D66CAF /* reverse.h */, - 696C8FEA0B8D526000D66CAF /* route.h */, - 696C8FEB0B8D526000D66CAF /* route_group.h */, - 696C8FEC0B8D526000D66CAF /* route_group_specialized.h */, - 696C8FED0B8D526000D66CAF /* send.h */, - 696C8FEE0B8D526000D66CAF /* session.h */, - 696C8FEF0B8D526000D66CAF /* session_connection.h */, - 696C8FF00B8D526000D66CAF /* session_playlist.h */, - 696C8FF10B8D526000D66CAF /* session_region.h */, - 696C8FF20B8D526000D66CAF /* session_route.h */, - 696C8FF30B8D526000D66CAF /* session_selection.h */, - 696C8FF40B8D526000D66CAF /* silentfilesource.h */, - 696C8FF50B8D526000D66CAF /* slave.h */, - 696C8FF60B8D526000D66CAF /* sndfile_helpers.h */, - 696C8FF70B8D526000D66CAF /* sndfilesource.h */, - 696C8FF80B8D526000D66CAF /* soundseq.h */, - 696C8FF90B8D526000D66CAF /* source.h */, - 696C8FFA0B8D526000D66CAF /* source_factory.h */, - 696C8FFB0B8D526000D66CAF /* spline.h */, - 696C8FFC0B8D526000D66CAF /* tempo.h */, - 696C8FFD0B8D526000D66CAF /* timestamps.h */, - 696C8FFE0B8D526000D66CAF /* track.h */, - 696C8FFF0B8D526000D66CAF /* types.h */, - 696C90000B8D526000D66CAF /* utils.h */, - ); - name = ardour; - path = ../ardour; - sourceTree = SOURCE_ROOT; - }; - 698D9AB10B969A5B00C53B63 /* Products */ = { - isa = PBXGroup; - children = ( - 698D9AB50B969A5B00C53B63 /* midi++.framework */, - ); - name = Products; - sourceTree = ""; - }; - 69F7CE510B8DCB3300D76871 /* control_protocol */ = { - isa = PBXGroup; - children = ( - 69F7CE520B8DCB3300D76871 /* basic_ui.cc */, - 69F7CE530B8DCB3300D76871 /* control_protocol */, - 69F7CE570B8DCB3300D76871 /* control_protocol.cc */, - 69F7CE590B8DCB3300D76871 /* smpte.cc */, - ); - name = control_protocol; - path = ../../surfaces/control_protocol; - sourceTree = SOURCE_ROOT; - }; - 69F7CE530B8DCB3300D76871 /* control_protocol */ = { - isa = PBXGroup; - children = ( - 69F7CE540B8DCB3300D76871 /* basic_ui.h */, - 69F7CE550B8DCB3300D76871 /* control_protocol.h */, - 69F7CE560B8DCB3300D76871 /* smpte.h */, - ); - path = control_protocol; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 8D07F2BD0486CC7A007CD1D0 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D07F2BE0486CC7A007CD1D0 /* ardour_Prefix.pch in Headers */, - 696C90530B8D526000D66CAF /* ardour.h in Headers */, - 696C90540B8D526000D66CAF /* audio_diskstream.h in Headers */, - 696C90550B8D526000D66CAF /* audio_library.h in Headers */, - 696C90560B8D526000D66CAF /* audio_track.h in Headers */, - 696C90580B8D526000D66CAF /* audioengine.h in Headers */, - 696C90590B8D526000D66CAF /* audiofilesource.h in Headers */, - 696C905A0B8D526000D66CAF /* audiofilter.h in Headers */, - 696C905B0B8D526000D66CAF /* audioplaylist.h in Headers */, - 696C905C0B8D526000D66CAF /* audioregion.h in Headers */, - 696C905D0B8D526000D66CAF /* audiosource.h in Headers */, - 696C905E0B8D526000D66CAF /* auditioner.h in Headers */, - 696C905F0B8D526000D66CAF /* automation_event.h in Headers */, - 696C90600B8D526000D66CAF /* buffer.h in Headers */, - 696C90610B8D526000D66CAF /* click.h in Headers */, - 696C90620B8D526000D66CAF /* configuration.h in Headers */, - 696C90630B8D526000D66CAF /* configuration_variable.h in Headers */, - 696C90640B8D526000D66CAF /* configuration_vars.h in Headers */, - 696C90650B8D526000D66CAF /* connection.h in Headers */, - 696C90660B8D526000D66CAF /* control_protocol_manager.h in Headers */, - 696C90680B8D526000D66CAF /* crossfade.h in Headers */, - 696C90690B8D526000D66CAF /* crossfade_compare.h in Headers */, - 696C906A0B8D526000D66CAF /* curve.h in Headers */, - 696C906B0B8D526000D66CAF /* cycle_timer.h in Headers */, - 696C906C0B8D526000D66CAF /* cycles.h in Headers */, - 696C906D0B8D526000D66CAF /* data_type.h in Headers */, - 696C906E0B8D526000D66CAF /* dB.h in Headers */, - 696C90700B8D526000D66CAF /* diskstream.h in Headers */, - 696C90710B8D526000D66CAF /* export.h in Headers */, - 696C90720B8D526000D66CAF /* gain.h in Headers */, - 696C90730B8D526000D66CAF /* gdither.h in Headers */, - 696C90740B8D526000D66CAF /* gdither_types.h in Headers */, - 696C90750B8D526000D66CAF /* gdither_types_internal.h in Headers */, - 696C90760B8D526000D66CAF /* insert.h in Headers */, - 696C90770B8D526000D66CAF /* io.h in Headers */, - 696C90780B8D526000D66CAF /* ladspa.h in Headers */, - 696C90790B8D526000D66CAF /* ladspa_plugin.h in Headers */, - 696C907A0B8D526000D66CAF /* location.h in Headers */, - 696C907B0B8D526000D66CAF /* logcurve.h in Headers */, - 696C907C0B8D526000D66CAF /* mix.h in Headers */, - 696C907D0B8D526000D66CAF /* named_selection.h in Headers */, - 696C907E0B8D526000D66CAF /* noise.h in Headers */, - 696C907F0B8D526000D66CAF /* osc.h in Headers */, - 696C90800B8D526000D66CAF /* panner.h in Headers */, - 696C90810B8D526000D66CAF /* pcm_utils.h in Headers */, - 696C90820B8D526000D66CAF /* peak.h in Headers */, - 696C90830B8D526000D66CAF /* playlist.h in Headers */, - 696C90840B8D526000D66CAF /* playlist_factory.h in Headers */, - 696C90850B8D526000D66CAF /* playlist_templates.h in Headers */, - 696C90860B8D526000D66CAF /* plugin.h in Headers */, - 696C90870B8D526000D66CAF /* plugin_manager.h in Headers */, - 696C90880B8D526000D66CAF /* port.h in Headers */, - 696C90890B8D526000D66CAF /* recent_sessions.h in Headers */, - 696C908A0B8D526000D66CAF /* redirect.h in Headers */, - 696C908B0B8D526000D66CAF /* region.h in Headers */, - 696C908C0B8D526000D66CAF /* region_factory.h in Headers */, - 696C908D0B8D526000D66CAF /* reverse.h in Headers */, - 696C908E0B8D526000D66CAF /* route.h in Headers */, - 696C908F0B8D526000D66CAF /* route_group.h in Headers */, - 696C90900B8D526000D66CAF /* route_group_specialized.h in Headers */, - 696C90910B8D526000D66CAF /* send.h in Headers */, - 696C90920B8D526000D66CAF /* session.h in Headers */, - 696C90930B8D526000D66CAF /* session_connection.h in Headers */, - 696C90940B8D526000D66CAF /* session_playlist.h in Headers */, - 696C90950B8D526000D66CAF /* session_region.h in Headers */, - 696C90960B8D526000D66CAF /* session_route.h in Headers */, - 696C90970B8D526000D66CAF /* session_selection.h in Headers */, - 696C90980B8D526000D66CAF /* silentfilesource.h in Headers */, - 696C90990B8D526000D66CAF /* slave.h in Headers */, - 696C909A0B8D526000D66CAF /* sndfile_helpers.h in Headers */, - 696C909B0B8D526000D66CAF /* sndfilesource.h in Headers */, - 696C909C0B8D526000D66CAF /* soundseq.h in Headers */, - 696C909D0B8D526000D66CAF /* source.h in Headers */, - 696C909E0B8D526000D66CAF /* source_factory.h in Headers */, - 696C909F0B8D526000D66CAF /* spline.h in Headers */, - 696C90A00B8D526000D66CAF /* tempo.h in Headers */, - 696C90A10B8D526000D66CAF /* timestamps.h in Headers */, - 696C90A20B8D526000D66CAF /* track.h in Headers */, - 696C90A30B8D526000D66CAF /* types.h in Headers */, - 696C90A40B8D526000D66CAF /* utils.h in Headers */, - 696C90C00B8D526000D66CAF /* gettext.h in Headers */, - 696C90C20B8D526000D66CAF /* i18n.h in Headers */, - 69F7CE5B0B8DCB3300D76871 /* basic_ui.h in Headers */, - 69F7CE5C0B8DCB3300D76871 /* control_protocol.h in Headers */, - 69F7CE5D0B8DCB3300D76871 /* smpte.h in Headers */, - 6964FECA0B8E7A7900799BAE /* version.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 8D07F2BC0486CC7A007CD1D0 /* ardour */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "ardour" */; - buildPhases = ( - 8D07F2BD0486CC7A007CD1D0 /* Headers */, - 8D07F2BF0486CC7A007CD1D0 /* Resources */, - 8D07F2C10486CC7A007CD1D0 /* Sources */, - 8D07F2C30486CC7A007CD1D0 /* Frameworks */, - 8D07F2C50486CC7A007CD1D0 /* Rez */, - ); - buildRules = ( - ); - dependencies = ( - 69D5F6260B8D58A500301E71 /* PBXTargetDependency */, - 698D9ABA0B969ADC00C53B63 /* PBXTargetDependency */, - ); - name = ardour; - productInstallPath = "$(HOME)/Library/Frameworks"; - productName = ardour; - productReference = 8D07F2C80486CC7A007CD1D0 /* ardour.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 "ardour" */; - hasScannedForEncodings = 1; - mainGroup = 0867D691FE84028FC02AAC07 /* ardour */; - productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 698D9AB10B969A5B00C53B63 /* Products */; - ProjectRef = 698D9AB00B969A5B00C53B63 /* midi++.xcodeproj */; - }, - { - ProductGroup = 691B3B780B8D5508009155B5 /* Products */; - ProjectRef = 691B3B770B8D5508009155B5 /* pbd.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D07F2BC0486CC7A007CD1D0 /* ardour */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 691B3B7C0B8D5508009155B5 /* pbd.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = pbd.framework; - remoteRef = 691B3B7B0B8D5508009155B5 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 698D9AB50B969A5B00C53B63 /* midi++.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = "midi++.framework"; - remoteRef = 698D9AB40B969A5B00C53B63 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D07F2BF0486CC7A007CD1D0 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */, - ); - 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 = ( - 696C90A60B8D526000D66CAF /* audio_diskstream.cc in Sources */, - 696C90A70B8D526000D66CAF /* audio_library.cc in Sources */, - 696C90A80B8D526000D66CAF /* audio_playlist.cc in Sources */, - 696C90A90B8D526000D66CAF /* audio_track.cc in Sources */, - 696C90AB0B8D526000D66CAF /* audioengine.cc in Sources */, - 696C90AC0B8D526000D66CAF /* audiofilesource.cc in Sources */, - 696C90AD0B8D526000D66CAF /* audiofilter.cc in Sources */, - 696C90AE0B8D526000D66CAF /* audioregion.cc in Sources */, - 696C90AF0B8D526000D66CAF /* audiosource.cc in Sources */, - 696C90B00B8D526000D66CAF /* auditioner.cc in Sources */, - 696C90B10B8D526000D66CAF /* automation.cc in Sources */, - 696C90B20B8D526000D66CAF /* automation_event.cc in Sources */, - 696C90B30B8D526000D66CAF /* configuration.cc in Sources */, - 696C90B40B8D526000D66CAF /* connection.cc in Sources */, - 696C90B50B8D526000D66CAF /* control_protocol_manager.cc in Sources */, - 696C90B70B8D526000D66CAF /* crossfade.cc in Sources */, - 696C90B80B8D526000D66CAF /* curve.cc in Sources */, - 696C90B90B8D526000D66CAF /* cycle_timer.cc in Sources */, - 696C90BA0B8D526000D66CAF /* default_click.cc in Sources */, - 696C90BC0B8D526000D66CAF /* diskstream.cc in Sources */, - 696C90BD0B8D526000D66CAF /* enums.cc in Sources */, - 696C90BE0B8D526000D66CAF /* gain.cc in Sources */, - 696C90BF0B8D526000D66CAF /* gdither.cc in Sources */, - 696C90C10B8D526000D66CAF /* globals.cc in Sources */, - 696C90C30B8D526000D66CAF /* import.cc in Sources */, - 696C90C40B8D526000D66CAF /* insert.cc in Sources */, - 696C90C50B8D526000D66CAF /* io.cc in Sources */, - 696C90C60B8D526000D66CAF /* jack_slave.cc in Sources */, - 696C90C70B8D526000D66CAF /* ladspa_plugin.cc in Sources */, - 696C90C80B8D526000D66CAF /* location.cc in Sources */, - 696C90C90B8D526000D66CAF /* mix.cc in Sources */, - 696C90CA0B8D526000D66CAF /* mtc_slave.cc in Sources */, - 696C90CB0B8D526000D66CAF /* named_selection.cc in Sources */, - 696C90CC0B8D526000D66CAF /* osc.cc in Sources */, - 696C90CD0B8D526000D66CAF /* panner.cc in Sources */, - 696C90CE0B8D526000D66CAF /* pcm_utils.cc in Sources */, - 696C90CF0B8D526000D66CAF /* playlist.cc in Sources */, - 696C90D00B8D526000D66CAF /* playlist_factory.cc in Sources */, - 696C90D10B8D526000D66CAF /* plugin.cc in Sources */, - 696C90D20B8D526000D66CAF /* plugin_manager.cc in Sources */, - 696C90D30B8D526000D66CAF /* port.cc in Sources */, - 696C90D40B8D526000D66CAF /* recent_sessions.cc in Sources */, - 696C90D50B8D526000D66CAF /* redirect.cc in Sources */, - 696C90D60B8D526000D66CAF /* region.cc in Sources */, - 696C90D70B8D526000D66CAF /* region_factory.cc in Sources */, - 696C90D80B8D526000D66CAF /* reverse.cc in Sources */, - 696C90D90B8D526000D66CAF /* route.cc in Sources */, - 696C90DA0B8D526000D66CAF /* route_group.cc in Sources */, - 696C90DB0B8D526000D66CAF /* send.cc in Sources */, - 696C90DC0B8D526000D66CAF /* session.cc in Sources */, - 696C90DD0B8D526000D66CAF /* session_butler.cc in Sources */, - 696C90DE0B8D526000D66CAF /* session_click.cc in Sources */, - 696C90DF0B8D526000D66CAF /* session_command.cc in Sources */, - 696C90E10B8D526000D66CAF /* session_events.cc in Sources */, - 696C90E20B8D526000D66CAF /* session_export.cc in Sources */, - 696C90E30B8D526000D66CAF /* session_feedback.cc in Sources */, - 696C90E40B8D526000D66CAF /* session_midi.cc in Sources */, - 696C90E50B8D526000D66CAF /* session_process.cc in Sources */, - 696C90E60B8D526000D66CAF /* session_state.cc in Sources */, - 696C90E70B8D526000D66CAF /* session_time.cc in Sources */, - 696C90E80B8D526000D66CAF /* session_timefx.cc in Sources */, - 696C90E90B8D526000D66CAF /* session_transport.cc in Sources */, - 696C90EB0B8D526000D66CAF /* silentfilesource.cc in Sources */, - 696C90EC0B8D526000D66CAF /* sndfile_helpers.cc in Sources */, - 696C90ED0B8D526000D66CAF /* sndfilesource.cc in Sources */, - 696C90EE0B8D526000D66CAF /* source.cc in Sources */, - 696C90EF0B8D526000D66CAF /* source_factory.cc in Sources */, - 696C90F20B8D526000D66CAF /* tempo.cc in Sources */, - 696C90F30B8D526000D66CAF /* track.cc in Sources */, - 696C90F40B8D526000D66CAF /* utils.cc in Sources */, - 69F7CE5A0B8DCB3300D76871 /* basic_ui.cc in Sources */, - 69F7CE5E0B8DCB3300D76871 /* control_protocol.cc in Sources */, - 69F7CE600B8DCB3300D76871 /* smpte.cc in Sources */, - 6964FECB0B8E7A7900799BAE /* version.cc in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 698D9ABA0B969ADC00C53B63 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "midi++"; - targetProxy = 698D9AB90B969ADC00C53B63 /* PBXContainerItemProxy */; - }; - 69D5F6260B8D58A500301E71 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = pbd; - targetProxy = 69D5F6250B8D58A500301E71 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C1667FE841158C02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 4FADC24408B4156D00ABE55E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = ( - ppc, - i386, - ); - DEBUG_INFORMATION_FORMAT = stabs; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\""; - FRAMEWORK_VERSION = A; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ardour_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_2)", - ); - LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/GLib.framework/Versions/2.12.3/Libraries\""; - LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/Sndfile-ardour.framework/Versions/A/Libraries\""; - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/GLib.framework/Versions/2.12.3/Libraries\""; - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/Sndfile-ardour.framework/Versions/A/Libraries\""; - LIBRARY_STYLE = DYNAMIC; - MACH_O_TYPE = mh_dylib; - PRODUCT_NAME = ardour; - WRAPPER_EXTENSION = framework; - }; - name = Release; - }; - 4FADC24808B4156D00ABE55E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - "$(NATIVE_ARCH)", - ppc, - ); - FRAMEWORK_SEARCH_PATHS = /opt/ardour/build; - GCC_FAST_OBJC_DISPATCH = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G4; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = ( - BUILD_VECLIB_OPTIMIZATIONS, - HAVE_WORDEXP, - HAVE_WEAK_COREAUDIO, - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)", - NO_POSIX_MEMALIGN, - ); - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3 = "MODULE_DIR=\"\\\"/Library/Application\\ Support/Ardour/modules\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4 = "DATA_DIR=\"\\\"/Library/Application\\ Support/Ardour/data\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5 = "LOCALEDIR=\"\\\"/Library/Application\\ Support/Ardour/locales\\\"\""; - GCC_STRICT_ALIASING = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - /usr/include/libxml2, - /Library/Frameworks/sigc.framework/Headers, - /Library/Frameworks/GLib.framework/Headers, - /Library/Frameworks/glibmm.framework/Headers, - "/Library/Frameworks/Sndfile-ardour.framework/Headers", - /Library/Frameworks/SampleRate.framework/Headers, - /Library/Frameworks/Raptor.framework/Headers, - /Library/Frameworks/LRdf.framework/Headers, - /opt/ardour/src/ardour2/libs/surfaces/control_protocol, - ); - INSTALL_PATH = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = ""; - PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; - }; - name = Release; - }; - 694E7C8A0B97B0FE0018D03D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(NATIVE_ARCH)"; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = /opt/ardour/build; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_ENABLE_OBJC_EXCEPTIONS = NO; - GCC_FAST_OBJC_DISPATCH = NO; - GCC_MODEL_TUNING = G4; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - BUILD_VECLIB_OPTIMIZATIONS, - HAVE_WORDEXP, - HAVE_WEAK_COREAUDIO, - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)", - "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)", - NO_POSIX_MEMALIGN, - ); - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3 = "MODULE_DIR=\"\\\"/Library/Application\\ Support/Ardour/modules\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4 = "DATA_DIR=\"\\\"/Library/Application\\ Support/Ardour/data\\\"\""; - GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5 = "LOCALEDIR=\"\\\"/Library/Application\\ Support/Ardour/locales\\\"\""; - GCC_STRICT_ALIASING = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO; - GCC_WARN_MISSING_PARENTHESES = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - /usr/include/libxml2, - /Library/Frameworks/sigc.framework/Headers, - /Library/Frameworks/GLib.framework/Headers, - /Library/Frameworks/glibmm.framework/Headers, - "/Library/Frameworks/Sndfile-ardour.framework/Headers", - /Library/Frameworks/SampleRate.framework/Headers, - /Library/Frameworks/Raptor.framework/Headers, - /Library/Frameworks/LRdf.framework/Headers, - /opt/ardour/src/ardour2/libs/surfaces/control_protocol, - ); - INSTALL_PATH = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = ""; - PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; - STRIP_INSTALLED_PRODUCT = NO; - }; - name = Debug; - }; - 694E7C8B0B97B0FE0018D03D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = i386; - DEBUG_INFORMATION_FORMAT = stabs; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\""; - FRAMEWORK_VERSION = A; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ardour_Prefix.pch; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", - "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", - ); - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/GLib.framework/Versions/2.12.3/Libraries\""; - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/Sndfile-ardour.framework/Versions/A/Libraries\""; - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/GLib.framework/Versions/2.12.3/Libraries\""; - LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/Sndfile-ardour.framework/Versions/A/Libraries\""; - LIBRARY_STYLE = DYNAMIC; - MACH_O_TYPE = mh_dylib; - PRODUCT_NAME = ardour; - WRAPPER_EXTENSION = framework; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "ardour" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4FADC24408B4156D00ABE55E /* Release */, - 694E7C8B0B97B0FE0018D03D /* Debug */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "ardour" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4FADC24808B4156D00ABE55E /* Release */, - 694E7C8A0B97B0FE0018D03D /* Debug */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 0867D690FE84028FC02AAC07 /* Project object */; -} diff --git a/libs/ardour/macosx/ardour_Prefix.pch b/libs/ardour/macosx/ardour_Prefix.pch deleted file mode 100644 index b03e5d3d98..0000000000 --- a/libs/ardour/macosx/ardour_Prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -// -// Prefix header for all source files of the 'ardour' target in the 'ardour' project. -// - diff --git a/libs/ardour/macosx/version.cc b/libs/ardour/macosx/version.cc deleted file mode 100644 index 9da3d2c359..0000000000 --- a/libs/ardour/macosx/version.cc +++ /dev/null @@ -1,3 +0,0 @@ -int libardour_major_version = 2; -int libardour_minor_version = 0; -int libardour_micro_version = 0; diff --git a/libs/ardour/macosx/version.h b/libs/ardour/macosx/version.h deleted file mode 100644 index 9c575ee077..0000000000 --- a/libs/ardour/macosx/version.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * version.h - * ardour - * - * Created by Taybin Rutkin on 2/22/07. - * Copyright 2007 Paul Davis. All rights reserved. - * - */ - -#ifndef __libardour_version_h__ -#define __libardour_version_h__ - -extern int libardour_major_version; -extern int libardour_minor_version; -extern int libardour_micro_version; - -#endif /* __libardour_version_h__ */ diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc deleted file mode 100644 index e75c1d89ca..0000000000 --- a/libs/ardour/meter.cc +++ /dev/null @@ -1,165 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include - -namespace ARDOUR { - - -/** Get peaks from @a bufs - * Input acceptance is lenient - the first n buffers from @a bufs will - * be metered, where n was set by the last call to setup(), excess meters will - * be set to 0. - */ -void -PeakMeter::run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) -{ - size_t meterable = std::min((size_t)bufs.count().n_total(), _peak_power.size()); - - size_t n = 0; - - // Meter what we have (midi) - for ( ; n < meterable && n < bufs.count().n_midi(); ++n) { - - float val = 0; - - // GUI needs a better MIDI meter, not much information can be - // expressed through peaks alone - for (MidiBuffer::iterator i = bufs.get_midi(n).begin(); i != bufs.get_midi(n).end(); ++i) { - const MIDI::Event& ev = *i; - if (ev.is_note_on()) { - const float this_vel = log(ev.buffer()[2] / 127.0 * (M_E*M_E-M_E) + M_E) - 1.0; - //printf("V %d -> %f\n", (int)((Byte)ev.buffer[2]), this_vel); - if (this_vel > val) - val = this_vel; - } else { - val += 1.0 / bufs.get_midi(n).capacity(); - if (val > 1.0) - val = 1.0; - } - } - - _peak_power[n] = val; - - } - - // Meter what we have (audio) - for ( ; n < meterable && n < bufs.count().n_audio(); ++n) { - _peak_power[n] = compute_peak (bufs.get_audio(n).data(nframes, offset), nframes, _peak_power[n]); - } - - // Zero any excess peaks - for (size_t n = meterable; n < _peak_power.size(); ++n) { - _peak_power[n] = 0; - } -} - -void -PeakMeter::reset () -{ - for (size_t i = 0; i < _peak_power.size(); ++i) { - _peak_power[i] = 0; - } -} - -void -PeakMeter::reset_max () -{ - for (size_t i = 0; i < _max_peak_power.size(); ++i) { - _max_peak_power[i] = -INFINITY; - } -} - -bool -PeakMeter::configure_io (ChanCount in, ChanCount out) -{ - /* we're transparent no matter what. fight the power. */ - if (out != in) - return false; - - uint32_t limit = in.n_total(); - - while (_peak_power.size() > limit) { - _peak_power.pop_back(); - _visible_peak_power.pop_back(); - _max_peak_power.pop_back(); - } - - while (_peak_power.size() < limit) { - _peak_power.push_back(0); - _visible_peak_power.push_back(minus_infinity()); - _max_peak_power.push_back(minus_infinity()); - } - - assert(_peak_power.size() == limit); - assert(_visible_peak_power.size() == limit); - assert(_max_peak_power.size() == limit); - - Processor::configure_io(in, out); - - return true; -} - -/** To be driven by the Meter signal from IO. - * Caller MUST hold io_lock! - */ -void -PeakMeter::meter () -{ - assert(_visible_peak_power.size() == _peak_power.size()); - - const size_t limit = _peak_power.size(); - - for (size_t n = 0; n < limit; ++n) { - - /* XXX we should use atomic exchange here */ - - /* grab peak since last read */ - - float new_peak = _peak_power[n]; - _peak_power[n] = 0; - - /* compute new visible value using falloff */ - - if (new_peak > 0.0) { - new_peak = coefficient_to_dB (new_peak); - } else { - new_peak = minus_infinity(); - } - - /* update max peak */ - - _max_peak_power[n] = std::max (new_peak, _max_peak_power[n]); - - if (Config->get_meter_falloff() == 0.0f || new_peak > _visible_peak_power[n]) { - _visible_peak_power[n] = new_peak; - } else { - // do falloff - new_peak = _visible_peak_power[n] - (Config->get_meter_falloff() * 0.01f); - _visible_peak_power[n] = std::max (new_peak, -INFINITY); - } - } -} - -} // namespace ARDOUR diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc deleted file mode 100644 index 1530babe34..0000000000 --- a/libs/ardour/midi_buffer.cc +++ /dev/null @@ -1,282 +0,0 @@ -/* - Copyright (C) 2006-2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include - -#ifdef __x86_64__ -static const int CPU_CACHE_ALIGN = 64; -#else -static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it matters less */ -#endif - -using namespace std; -using namespace ARDOUR; - - -// FIXME: mirroring for MIDI buffers? -MidiBuffer::MidiBuffer(size_t capacity) - : Buffer(DataType::MIDI, capacity) - , _events(0) - , _data(0) -// , _owns_data(false) -{ - if (capacity) { - resize (_capacity); - silence(_capacity); - } -} - -MidiBuffer::~MidiBuffer() -{ - if (_events) { - free(_events); - } - if (_data) { - free(_data); - } -} - -void -MidiBuffer::resize (size_t size) -{ - assert(size > 0); - - if (size < _capacity) { - return; - } - - if (_data) { - free (_data); - } - - if (_events) { - free (_events); - } - - _size = 0; - _capacity = size; - -#ifdef NO_POSIX_MEMALIGN - _events = (MIDI::Event *) malloc(sizeof(MIDI::Event) * _capacity); - _data = (uint8_t *) malloc(sizeof(uint8_t) * _capacity * MAX_EVENT_SIZE); -#else - posix_memalign((void**)&_events, CPU_CACHE_ALIGN, sizeof(MIDI::Event) * _capacity); - posix_memalign((void**)&_data, CPU_CACHE_ALIGN, sizeof(uint8_t) * _capacity * MAX_EVENT_SIZE); -#endif - assert(_data); - assert(_events); -} - -void -MidiBuffer::copy(const MidiBuffer& copy) -{ - assert(_capacity >= copy._capacity); - _size = 0; - - for (size_t i = 0; i < copy.size(); ++i) - push_back(copy[i]); -} - - -/** Read events from @a src starting at time @a offset into the START of this buffer, for - * time direction @a nframes. Relative time, where 0 = start of buffer. - * - * Note that offset and nframes refer to sample time, NOT buffer offsets or event counts. - */ -void -MidiBuffer::read_from(const Buffer& src, nframes_t nframes, nframes_t offset) -{ - assert(src.type() == DataType::MIDI); - assert(&src != this); - - const MidiBuffer& msrc = (MidiBuffer&)src; - - assert(_capacity >= msrc.size()); - - clear(); - assert(_size == 0); - - // FIXME: slow - for (size_t i=0; i < msrc.size(); ++i) { - const MIDI::Event& ev = msrc[i]; - if (ev.time() >= offset && ev.time() < offset+nframes) { - //cout << "MidiBuffer::read_from got event, " << int(ev.type()) << " time: " << ev.time() << " buffer size: " << _size << endl; - push_back(ev); - } else { - cerr << "MidiBuffer event out of range, " << ev.time() << endl; - } - } - - _silent = src.silent(); -} - - -/** Push an event into the buffer. - * - * Note that the raw MIDI pointed to by ev will be COPIED and unmodified. - * That is, the caller still owns it, if it needs freeing it's Not My Problem(TM). - * Realtime safe. - * @return false if operation failed (not enough room) - */ -bool -MidiBuffer::push_back(const MIDI::Event& ev) -{ - if (_size == _capacity) - return false; - - uint8_t* const write_loc = _data + (_size * MAX_EVENT_SIZE); - - memcpy(write_loc, ev.buffer(), ev.size()); - _events[_size] = ev; - _events[_size].set_buffer(ev.size(), write_loc, false); - ++_size; - - //cerr << "MidiBuffer: pushed, size = " << _size << endl; - - _silent = false; - - return true; -} - - -/** Push an event into the buffer. - * - * Note that the raw MIDI pointed to by ev will be COPIED and unmodified. - * That is, the caller still owns it, if it needs freeing it's Not My Problem(TM). - * Realtime safe. - * @return false if operation failed (not enough room) - */ -bool -MidiBuffer::push_back(const jack_midi_event_t& ev) -{ - if (_size == _capacity) - return false; - - uint8_t* const write_loc = _data + (_size * MAX_EVENT_SIZE); - - memcpy(write_loc, ev.buffer, ev.size); - _events[_size].time() = (double)ev.time; - _events[_size].set_buffer(ev.size, write_loc, false); - ++_size; - - //cerr << "MidiBuffer: pushed, size = " << _size << endl; - - _silent = false; - - return true; -} - - -/** Reserve space for a new event in the buffer. - * - * This call is for copying MIDI directly into the buffer, the data location - * (of sufficient size to write \a size bytes) is returned, or 0 on failure. - * This call MUST be immediately followed by a write to the returned data - * location, or the buffer will be corrupted and very nasty things will happen. - */ -uint8_t* -MidiBuffer::reserve(double time, size_t size) -{ - if (size > MAX_EVENT_SIZE) { - cerr << "WARNING: Failed to reserve " << size << " bytes for event"; - return 0; - } - - if (_size == _capacity) - return 0; - - uint8_t* const write_loc = _data + (_size * MAX_EVENT_SIZE); - - _events[_size].time() = time; - _events[_size].set_buffer(size, write_loc, false); - ++_size; - - //cerr << "MidiBuffer: reserved, size = " << _size << endl; - - _silent = false; - - return write_loc; -} - - -void -MidiBuffer::silence(nframes_t dur, nframes_t offset) -{ - // FIXME use parameters - if (offset != 0) - cerr << "WARNING: MidiBuffer::silence w/ offset != 0 (not implemented)" << endl; - - memset(_events, 0, sizeof(MIDI::Event) * _capacity); - memset(_data, 0, sizeof(uint8_t) * _capacity * MAX_EVENT_SIZE); - _size = 0; - _silent = true; -} - - -/** Clear, and merge \a a and \a b into this buffer. - * - * FIXME: This is slow. - * - * \return true if complete merge was successful - */ -bool -MidiBuffer::merge(const MidiBuffer& a, const MidiBuffer& b) -{ - _size = 0; - - // Die if a merge isn't necessary as it's expensive - assert(a.size() > 0 && b.size() > 0); - - size_t a_index = 0; - size_t b_index = 0; - size_t count = a.size() + b.size(); - - while (count > 0 && a_index < a.size() && b_index < b.size()) { - - if (size() == capacity()) { - cerr << "WARNING: MIDI buffer overrun, events lost!" << endl; - return false; - } - - if (a_index == a.size()) { - push_back(a[a_index]); - ++a_index; - } else if (b_index == b.size()) { - push_back(b[b_index]); - ++b_index; - } else { - const MIDI::Event& a_ev = a[a_index]; - const MIDI::Event& b_ev = b[b_index]; - - if (a_ev.time() <= b_ev.time()) { - push_back(a_ev); - ++a_index; - } else { - push_back(b_ev); - ++b_index; - } - } - - --count; - } - - return true; -} - diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc deleted file mode 100644 index 5b4716d51e..0000000000 --- a/libs/ardour/midi_diskstream.cc +++ /dev/null @@ -1,1461 +0,0 @@ -/* - Copyright (C) 2000-2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -MidiDiskstream::MidiDiskstream (Session &sess, const string &name, Diskstream::Flag flag) - : Diskstream(sess, name, flag) - , _playback_buf(0) - , _capture_buf(0) - , _source_port(0) - , _last_flush_frame(0) - , _note_mode(Sustained) -{ - /* prevent any write sources from being created */ - - in_set_state = true; - - init(flag); - use_new_playlist (); - - in_set_state = false; - - assert(!destructive()); -} - -MidiDiskstream::MidiDiskstream (Session& sess, const XMLNode& node) - : Diskstream(sess, node) - , _playback_buf(0) - , _capture_buf(0) - , _source_port(0) - , _last_flush_frame(0) - , _note_mode(Sustained) -{ - in_set_state = true; - init (Recordable); - - if (set_state (node)) { - in_set_state = false; - throw failed_constructor(); - } - - in_set_state = false; - - if (destructive()) { - use_destructive_playlist (); - } -} - -void -MidiDiskstream::init (Diskstream::Flag f) -{ - Diskstream::init(f); - - /* there are no channels at this point, so these - two calls just get speed_buffer_size and wrap_buffer - size setup without duplicating their code. - */ - - set_block_size (_session.get_block_size()); - allocate_temporary_buffers (); - - _playback_buf = new MidiRingBuffer (_session.midi_diskstream_buffer_size()); - _capture_buf = new MidiRingBuffer (_session.midi_diskstream_buffer_size()); - - _n_channels = ChanCount(DataType::MIDI, 1); - - assert(recordable()); -} - -MidiDiskstream::~MidiDiskstream () -{ - Glib::Mutex::Lock lm (state_lock); -} - - -void -MidiDiskstream::non_realtime_locate (nframes_t position) -{ - assert(_write_source); - _write_source->set_timeline_position (position); - seek(position, false); -} - - -void -MidiDiskstream::non_realtime_input_change () -{ - { - Glib::Mutex::Lock lm (state_lock); - - if (input_change_pending == NoChange) { - return; - } - - if (input_change_pending & ConfigurationChanged) { - assert(_io->n_inputs() == _n_channels); - } - - get_input_sources (); - set_capture_offset (); - - if (first_input_change) { - set_align_style (_persistent_alignment_style); - first_input_change = false; - } else { - set_align_style_from_io (); - } - - input_change_pending = NoChange; - - /* implicit unlock */ - } - - /* reset capture files */ - - reset_write_sources (false); - - /* now refill channel buffers */ - - if (speed() != 1.0f || speed() != -1.0f) { - seek ((nframes_t) (_session.transport_frame() * (double) speed())); - } - else { - seek (_session.transport_frame()); - } - - _last_flush_frame = _session.transport_frame(); -} - -void -MidiDiskstream::get_input_sources () -{ - uint32_t ni = _io->n_inputs().n_midi(); - - if (ni == 0) { - return; - } - - // This is all we do for now at least - assert(ni == 1); - - _source_port = _io->midi_input(0); - - // do... stuff? -} - -int -MidiDiskstream::find_and_use_playlist (const string& name) -{ - boost::shared_ptr playlist; - - if ((playlist = boost::dynamic_pointer_cast (_session.playlist_by_name (name))) == 0) { - playlist = boost::dynamic_pointer_cast (PlaylistFactory::create (DataType::MIDI, _session, name)); - } - - if (!playlist) { - error << string_compose(_("MidiDiskstream: Playlist \"%1\" isn't an midi playlist"), name) << endmsg; - return -1; - } - - return use_playlist (playlist); -} - -int -MidiDiskstream::use_playlist (boost::shared_ptr playlist) -{ - assert(boost::dynamic_pointer_cast(playlist)); - - Diskstream::use_playlist(playlist); - - return 0; -} - -int -MidiDiskstream::use_new_playlist () -{ - string newname; - boost::shared_ptr playlist; - - if (!in_set_state && destructive()) { - return 0; - } - - if (_playlist) { - newname = Playlist::bump_name (_playlist->name(), _session); - } else { - newname = Playlist::bump_name (_name, _session); - } - - if ((playlist = boost::dynamic_pointer_cast (PlaylistFactory::create ( - DataType::MIDI, _session, newname, hidden()))) != 0) { - - playlist->set_orig_diskstream_id (id()); - return use_playlist (playlist); - - } else { - return -1; - } -} - -int -MidiDiskstream::use_copy_playlist () -{ - assert(midi_playlist()); - - if (destructive()) { - return 0; - } - - if (_playlist == 0) { - error << string_compose(_("MidiDiskstream %1: there is no existing playlist to make a copy of!"), _name) << endmsg; - return -1; - } - - string newname; - boost::shared_ptr playlist; - - newname = Playlist::bump_name (_playlist->name(), _session); - - if ((playlist = boost::dynamic_pointer_cast(PlaylistFactory::create (midi_playlist(), newname))) != 0) { - playlist->set_orig_diskstream_id (id()); - return use_playlist (playlist); - } else { - return -1; - } -} - -/** Overloaded from parent to die horribly - */ -int -MidiDiskstream::set_destructive (bool yn) -{ - assert( ! destructive()); - assert( ! yn); - return -1; -} - -void -MidiDiskstream::set_note_mode (NoteMode m) -{ - _note_mode = m; - midi_playlist()->set_note_mode(m); - if (_write_source && _write_source->model()) - _write_source->model()->set_note_mode(m); -} - -void -MidiDiskstream::check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record) -{ - // FIXME: waaay too much code to duplicate (AudioDiskstream) - - int possibly_recording; - int rolling; - int change; - const int transport_rolling = 0x4; - const int track_rec_enabled = 0x2; - const int global_rec_enabled = 0x1; - - /* merge together the 3 factors that affect record status, and compute - what has changed. - */ - - rolling = _session.transport_speed() != 0.0f; - possibly_recording = (rolling << 2) | (record_enabled() << 1) | can_record; - change = possibly_recording ^ last_possibly_recording; - - if (possibly_recording == last_possibly_recording) { - return; - } - - /* change state */ - - /* if per-track or global rec-enable turned on while the other was already on, we've started recording */ - - if (((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record)) || - ((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled()))) { - - /* starting to record: compute first+last frames */ - - first_recordable_frame = transport_frame + _capture_offset; - last_recordable_frame = max_frames; - capture_start_frame = transport_frame; - - if (!(last_possibly_recording & transport_rolling) && (possibly_recording & transport_rolling)) { - - /* was stopped, now rolling (and recording) */ - - if (_alignment_style == ExistingMaterial) { - first_recordable_frame += _session.worst_output_latency(); - } else { - first_recordable_frame += _roll_delay; - } - - } else { - - /* was rolling, but record state changed */ - - if (_alignment_style == ExistingMaterial) { - - - if (!Config->get_punch_in()) { - - /* manual punch in happens at the correct transport frame - because the user hit a button. but to get alignment correct - we have to back up the position of the new region to the - appropriate spot given the roll delay. - */ - - capture_start_frame -= _roll_delay; - - /* XXX paul notes (august 2005): i don't know why - this is needed. - */ - - first_recordable_frame += _capture_offset; - - } else { - - /* autopunch toggles recording at the precise - transport frame, and then the DS waits - to start recording for a time that depends - on the output latency. - */ - - first_recordable_frame += _session.worst_output_latency(); - } - - } else { - - if (Config->get_punch_in()) { - first_recordable_frame += _roll_delay; - } else { - capture_start_frame -= _roll_delay; - } - } - - } - - } else if (!record_enabled() || !can_record) { - - /* stop recording */ - - last_recordable_frame = transport_frame + _capture_offset; - - if (_alignment_style == ExistingMaterial) { - last_recordable_frame += _session.worst_output_latency(); - } else { - last_recordable_frame += _roll_delay; - } - } - - last_possibly_recording = possibly_recording; -} - -int -MidiDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input) -{ - // FIXME: waay too much code to duplicate (AudioDiskstream::process) - int ret = -1; - nframes_t rec_offset = 0; - nframes_t rec_nframes = 0; - bool nominally_recording; - bool re = record_enabled (); - bool collect_playback = false; - - /* if we've already processed the frames corresponding to this call, - just return. this allows multiple routes that are taking input - from this diskstream to call our ::process() method, but have - this stuff only happen once. more commonly, it allows both - the AudioTrack that is using this AudioDiskstream *and* the Session - to call process() without problems. - */ - - if (_processed) { - return 0; - } - - commit_should_unlock = false; - - check_record_status (transport_frame, nframes, can_record); - - nominally_recording = (can_record && re); - - if (nframes == 0) { - _processed = true; - return 0; - } - - /* This lock is held until the end of ::commit, so these two functions - must always be called as a pair. The only exception is if this function - returns a non-zero value, in which case, ::commit should not be called. - */ - - // If we can't take the state lock return. - if (!state_lock.trylock()) { - return 1; - } - commit_should_unlock = true; - adjust_capture_position = 0; - - if (nominally_recording || (_session.get_record_enabled() && Config->get_punch_in())) { - OverlapType ot; - - ot = coverage (first_recordable_frame, last_recordable_frame, transport_frame, transport_frame + nframes); - - switch (ot) { - case OverlapNone: - rec_nframes = 0; - break; - - case OverlapInternal: - /* ---------- recrange - |---| transrange - */ - rec_nframes = nframes; - rec_offset = 0; - break; - - case OverlapStart: - /* |--------| recrange - -----| transrange - */ - rec_nframes = transport_frame + nframes - first_recordable_frame; - if (rec_nframes) { - rec_offset = first_recordable_frame - transport_frame; - } - break; - - case OverlapEnd: - /* |--------| recrange - |-------- transrange - */ - rec_nframes = last_recordable_frame - transport_frame; - rec_offset = 0; - break; - - case OverlapExternal: - /* |--------| recrange - -------------- transrange - */ - rec_nframes = last_recordable_frame - last_recordable_frame; - rec_offset = first_recordable_frame - transport_frame; - break; - } - - if (rec_nframes && !was_recording) { - capture_captured = 0; - was_recording = true; - } - } - - - if (can_record && !_last_capture_regions.empty()) { - _last_capture_regions.clear (); - } - - if (nominally_recording || rec_nframes) { - - assert(_source_port); - - // Pump entire port buffer into the ring buffer (FIXME: split cycles?) - //_capture_buf->write(_source_port->get_midi_buffer(), transport_frame); - size_t num_events = _source_port->get_midi_buffer().size(); - size_t to_write = std::min(_capture_buf->write_space(), num_events); - - MidiBuffer::iterator port_iter = _source_port->get_midi_buffer().begin(); - - for (size_t i=0; i < to_write; ++i) { - const MIDI::Event& ev = *port_iter; - assert(ev.buffer()); - _capture_buf->write(ev.time() + transport_frame, ev.size(), ev.buffer()); - ++port_iter; - } - - } else { - - if (was_recording) { - finish_capture (rec_monitors_input); - } - - } - - if (rec_nframes) { - - /* XXX XXX XXX XXX XXX XXX XXX XXX */ - - /* data will be written to disk */ - - if (rec_nframes == nframes && rec_offset == 0) { - - playback_distance = nframes; - } else { - - collect_playback = true; - } - - adjust_capture_position = rec_nframes; - - } else if (nominally_recording) { - - /* can't do actual capture yet - waiting for latency effects to finish before we start*/ - - playback_distance = nframes; - - } else { - - collect_playback = true; - } - - if (collect_playback) { - - /* we're doing playback */ - - nframes_t necessary_samples; - - /* no varispeed playback if we're recording, because the output .... TBD */ - - if (rec_nframes == 0 && _actual_speed != 1.0f) { - necessary_samples = (nframes_t) floor ((nframes * fabs (_actual_speed))) + 1; - } else { - necessary_samples = nframes; - } - - // XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX - // Write into playback buffer here, and whatnot? - //cerr << "MDS FIXME: collect playback" << endl; - - } - - ret = 0; - - _processed = true; - - if (ret) { - - /* we're exiting with failure, so ::commit will not - be called. unlock the state lock. - */ - - commit_should_unlock = false; - state_lock.unlock(); - } - - return ret; -} - -bool -MidiDiskstream::commit (nframes_t nframes) -{ - bool need_butler = false; - - if (_actual_speed < 0.0) { - playback_sample -= playback_distance; - } else { - playback_sample += playback_distance; - } - - if (adjust_capture_position != 0) { - capture_captured += adjust_capture_position; - adjust_capture_position = 0; - } - - /* what audio does: - * can't do this with midi: write space is in bytes, chunk_frames is in frames - if (_slaved) { - need_butler = _playback_buf->write_space() >= _playback_buf->capacity() / 2; - } else { - need_butler = _playback_buf->write_space() >= disk_io_chunk_frames - || _capture_buf->read_space() >= disk_io_chunk_frames; - }*/ - - /* we'll just keep the playback buffer full for now. - * this should be decreased to reduce edit latency */ - need_butler = _playback_buf->write_space() >= _playback_buf->capacity() / 2; - - if (commit_should_unlock) { - state_lock.unlock(); - } - - _processed = false; - - return need_butler; -} - -void -MidiDiskstream::set_pending_overwrite (bool yn) -{ - /* called from audio thread, so we can use the read ptr and playback sample as we wish */ - - pending_overwrite = yn; - - overwrite_frame = playback_sample; -} - -int -MidiDiskstream::overwrite_existing_buffers () -{ - read(overwrite_frame, disk_io_chunk_frames, false); - overwrite_queued = false; - pending_overwrite = false; - - return 0; -} - -int -MidiDiskstream::seek (nframes_t frame, bool complete_refill) -{ - Glib::Mutex::Lock lm (state_lock); - int ret = -1; - - _playback_buf->reset(); - _capture_buf->reset(); - - playback_sample = frame; - file_frame = frame; - - if (complete_refill) { - while ((ret = do_refill_with_alloc ()) > 0) ; - } else { - ret = do_refill_with_alloc (); - } - - return ret; -} - -int -MidiDiskstream::can_internal_playback_seek (nframes_t distance) -{ - if (_playback_buf->read_space() < distance) { - return false; - } else { - return true; - } -} - -int -MidiDiskstream::internal_playback_seek (nframes_t distance) -{ - cerr << "MDS: internal_playback_seek " << distance << endl; - - first_recordable_frame += distance; - playback_sample += distance; - - return 0; -} - -/** @a start is set to the new frame position (TIME) read up to */ -int -MidiDiskstream::read (nframes_t& start, nframes_t dur, bool reversed) -{ - nframes_t this_read = 0; - bool reloop = false; - nframes_t loop_end = 0; - nframes_t loop_start = 0; - nframes_t loop_length = 0; - Location *loc = 0; - - if (!reversed) { - /* Make the use of a Location atomic for this read operation. - - Note: Locations don't get deleted, so all we care about - when I say "atomic" is that we are always pointing to - the same one and using a start/length values obtained - just once. - */ - - if ((loc = loop_location) != 0) { - loop_start = loc->start(); - loop_end = loc->end(); - loop_length = loop_end - loop_start; - } - - /* if we are looping, ensure that the first frame we read is at the correct - position within the loop. - */ - - if (loc && start >= loop_end) { - //cerr << "start adjusted from " << start; - start = loop_start + ((start - loop_start) % loop_length); - //cerr << "to " << start << endl; - } - //cerr << "start is " << start << " loopstart: " << loop_start << " loopend: " << loop_end << endl; - } - - while (dur) { - - /* take any loop into account. we can't read past the end of the loop. */ - - if (loc && (loop_end - start < dur)) { - this_read = loop_end - start; - //cerr << "reloop true: thisread: " << this_read << " dur: " << dur << endl; - reloop = true; - } else { - reloop = false; - this_read = dur; - } - - if (this_read == 0) { - break; - } - - this_read = min(dur,this_read); - - if (midi_playlist()->read (*_playback_buf, start, this_read) != this_read) { - error << string_compose(_("MidiDiskstream %1: cannot read %2 from playlist at frame %3"), _id, this_read, - start) << endmsg; - return -1; - } - - _read_data_count = _playlist->read_data_count(); - - if (reversed) { - - // Swap note ons with note offs here. etc? - // Fully reversing MIDI required look-ahead (well, behind) to find previous - // CC values etc. hard. - - } else { - - /* if we read to the end of the loop, go back to the beginning */ - - if (reloop) { - start = loop_start; - } else { - start += this_read; - } - } - - dur -= this_read; - //offset += this_read; - } - - return 0; -} - -int -MidiDiskstream::do_refill_with_alloc () -{ - return do_refill(); -} - -int -MidiDiskstream::do_refill () -{ - int ret = 0; - size_t write_space = _playback_buf->write_space(); - bool reversed = (_visible_speed * _session.transport_speed()) < 0.0f; - - if (write_space == 0) { - return 0; - } - - if (reversed) { - return 0; - } - - /* at end: nothing to do */ - if (file_frame == max_frames) { - return 0; - } - - // At this point we... - assert(_playback_buf->write_space() > 0); // ... have something to write to, and - assert(file_frame <= max_frames); // ... something to write - - nframes_t to_read = min(disk_io_chunk_frames, (max_frames - file_frame)); - - if (read (file_frame, to_read, reversed)) { - ret = -1; - } - - return ret; -} - -/** Flush pending data to disk. - * - * Important note: this function will write *AT MOST* disk_io_chunk_frames - * of data to disk. it will never write more than that. If it writes that - * much and there is more than that waiting to be written, it will return 1, - * otherwise 0 on success or -1 on failure. - * - * If there is less than disk_io_chunk_frames to be written, no data will be - * written at all unless @a force_flush is true. - */ -int -MidiDiskstream::do_flush (Session::RunContext context, bool force_flush) -{ - uint32_t to_write; - int32_t ret = 0; - nframes_t total; - - _write_data_count = 0; - - if (_last_flush_frame > _session.transport_frame() - || _last_flush_frame < capture_start_frame) { - _last_flush_frame = _session.transport_frame(); - } - - total = _session.transport_frame() - _last_flush_frame; - - if (total == 0 || (_capture_buf->read_space() == 0 && _session.transport_speed() == 0) || (total < disk_io_chunk_frames && !force_flush && was_recording)) { - goto out; - } - - /* if there are 2+ chunks of disk i/o possible for - this track, let the caller know so that it can arrange - for us to be called again, ASAP. - - if we are forcing a flush, then if there is* any* extra - work, let the caller know. - - if we are no longer recording and there is any extra work, - let the caller know too. - */ - - if (total >= 2 * disk_io_chunk_frames || ((force_flush || !was_recording) && total > disk_io_chunk_frames)) { - ret = 1; - } - - to_write = disk_io_chunk_frames; - - assert(!destructive()); - - if (record_enabled() && _session.transport_frame() - _last_flush_frame > disk_io_chunk_frames) { - if ((!_write_source) || _write_source->midi_write (*_capture_buf, to_write) != to_write) { - error << string_compose(_("MidiDiskstream %1: cannot write to disk"), _id) << endmsg; - return -1; - } else { - _last_flush_frame = _session.transport_frame(); - } - } - -out: - return ret; -} - -void -MidiDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_capture) -{ - uint32_t buffer_position; - bool more_work = true; - int err = 0; - boost::shared_ptr region; - nframes_t total_capture; - MidiRegion::SourceList srcs; - MidiRegion::SourceList::iterator src; - vector::iterator ci; - bool mark_write_completed = false; - - finish_capture (true); - - /* butler is already stopped, but there may be work to do - to flush remaining data to disk. - */ - - while (more_work && !err) { - switch (do_flush (Session::TransportContext, true)) { - case 0: - more_work = false; - break; - case 1: - break; - case -1: - error << string_compose(_("MidiDiskstream \"%1\": cannot flush captured data to disk!"), _name) << endmsg; - err++; - } - } - - /* XXX is there anything we can do if err != 0 ? */ - Glib::Mutex::Lock lm (capture_info_lock); - - if (capture_info.empty()) { - return; - } - - if (abort_capture) { - - if (_write_source) { - - _write_source->mark_for_remove (); - _write_source->drop_references (); - _write_source.reset(); - } - - /* new source set up in "out" below */ - - } else { - - assert(_write_source); - - for (total_capture = 0, ci = capture_info.begin(); ci != capture_info.end(); ++ci) { - total_capture += (*ci)->frames; - } - - /* figure out the name for this take */ - - srcs.push_back (_write_source); - _write_source->set_timeline_position (capture_info.front()->start); - _write_source->set_captured_for (_name); - - string whole_file_region_name; - whole_file_region_name = region_name_from_path (_write_source->name(), true); - - /* Register a new region with the Session that - describes the entire source. Do this first - so that any sub-regions will obviously be - children of this one (later!) - */ - - try { - boost::shared_ptr rx (RegionFactory::create (srcs, _write_source->last_capture_start_frame(), total_capture, - whole_file_region_name, - 0, Region::Flag (Region::DefaultFlags|Region::Automatic|Region::WholeFile))); - - region = boost::dynamic_pointer_cast (rx); - region->special_set_position (capture_info.front()->start); - } - - - catch (failed_constructor& err) { - error << string_compose(_("%1: could not create region for complete midi file"), _name) << endmsg; - /* XXX what now? */ - } - - _last_capture_regions.push_back (region); - - // cerr << _name << ": there are " << capture_info.size() << " capture_info records\n"; - - XMLNode &before = _playlist->get_state(); - _playlist->freeze (); - - for (buffer_position = _write_source->last_capture_start_frame(), ci = capture_info.begin(); ci != capture_info.end(); ++ci) { - - string region_name; - - _session.region_name (region_name, _write_source->name(), false); - - // cerr << _name << ": based on ci of " << (*ci)->start << " for " << (*ci)->frames << " add a region\n"; - - try { - boost::shared_ptr rx (RegionFactory::create (srcs, buffer_position, (*ci)->frames, region_name)); - region = boost::dynamic_pointer_cast (rx); - } - - catch (failed_constructor& err) { - error << _("MidiDiskstream: could not create region for captured midi!") << endmsg; - continue; /* XXX is this OK? */ - } - - region->GoingAway.connect (bind (mem_fun (*this, &Diskstream::remove_region_from_last_capture), boost::weak_ptr(region))); - - _last_capture_regions.push_back (region); - - // cerr << "add new region, buffer position = " << buffer_position << " @ " << (*ci)->start << endl; - - i_am_the_modifier++; - _playlist->add_region (region, (*ci)->start); - i_am_the_modifier--; - - buffer_position += (*ci)->frames; - } - - _playlist->thaw (); - XMLNode &after = _playlist->get_state(); - _session.add_command (new MementoCommand(*_playlist, &before, &after)); - - } - - mark_write_completed = true; - - reset_write_sources (mark_write_completed); - - for (ci = capture_info.begin(); ci != capture_info.end(); ++ci) { - delete *ci; - } - - capture_info.clear (); - capture_start_frame = 0; -} - -void -MidiDiskstream::transport_looped (nframes_t transport_frame) -{ - if (was_recording) { - - // adjust the capture length knowing that the data will be recorded to disk - // only necessary after the first loop where we're recording - if (capture_info.size() == 0) { - capture_captured += _capture_offset; - - if (_alignment_style == ExistingMaterial) { - capture_captured += _session.worst_output_latency(); - } else { - capture_captured += _roll_delay; - } - } - - finish_capture (true); - - // the next region will start recording via the normal mechanism - // we'll set the start position to the current transport pos - // no latency adjustment or capture offset needs to be made, as that already happened the first time - capture_start_frame = transport_frame; - first_recordable_frame = transport_frame; // mild lie - last_recordable_frame = max_frames; - was_recording = true; - } -} - -void -MidiDiskstream::finish_capture (bool rec_monitors_input) -{ - was_recording = false; - - if (capture_captured == 0) { - return; - } - - // Why must we destroy? - assert(!destructive()); - - CaptureInfo* ci = new CaptureInfo; - - ci->start = capture_start_frame; - ci->frames = capture_captured; - - /* XXX theoretical race condition here. Need atomic exchange ? - However, the circumstances when this is called right - now (either on record-disable or transport_stopped) - mean that no actual race exists. I think ... - We now have a capture_info_lock, but it is only to be used - to synchronize in the transport_stop and the capture info - accessors, so that invalidation will not occur (both non-realtime). - */ - - // cerr << "Finish capture, add new CI, " << ci->start << '+' << ci->frames << endl; - - capture_info.push_back (ci); - capture_captured = 0; -} - -void -MidiDiskstream::set_record_enabled (bool yn) -{ - if (!recordable() || !_session.record_enabling_legal()) { - return; - } - - assert(!destructive()); - - if (yn && _source_port == 0) { - - /* pick up connections not initiated *from* the IO object - we're associated with. - */ - - get_input_sources (); - } - - /* yes, i know that this not proof against race conditions, but its - good enough. i think. - */ - - if (record_enabled() != yn) { - if (yn) { - engage_record_enable (); - } else { - disengage_record_enable (); - } - } -} - -void -MidiDiskstream::engage_record_enable () -{ - bool rolling = _session.transport_speed() != 0.0f; - - g_atomic_int_set (&_record_enabled, 1); - - if (_source_port && Config->get_monitoring_model() == HardwareMonitoring) { - _source_port->request_monitor_input (!(Config->get_auto_input() && rolling)); - } - - // FIXME: Why is this necessary? Isn't needed for AudioDiskstream... - if (!_write_source) - use_new_write_source(); - - _write_source->mark_streaming_midi_write_started (_note_mode, _session.transport_frame()); - - RecordEnableChanged (); /* EMIT SIGNAL */ -} - -void -MidiDiskstream::disengage_record_enable () -{ - g_atomic_int_set (&_record_enabled, 0); - if (_source_port && Config->get_monitoring_model() == HardwareMonitoring) { - if (_source_port) { - _source_port->request_monitor_input (false); - } - } - - RecordEnableChanged (); /* EMIT SIGNAL */ -} - -XMLNode& -MidiDiskstream::get_state () -{ - XMLNode* node = new XMLNode ("MidiDiskstream"); - char buf[64]; - LocaleGuard lg (X_("POSIX")); - - snprintf (buf, sizeof(buf), "0x%x", _flags); - node->add_property ("flags", buf); - - node->add_property("channel-mode", enum_2_string(get_channel_mode())); - - snprintf (buf, sizeof(buf), "0x%x", get_channel_mask()); - node->add_property("channel-mask", buf); - - node->add_property ("playlist", _playlist->name()); - - snprintf (buf, sizeof(buf), "%f", _visible_speed); - node->add_property ("speed", buf); - - node->add_property("name", _name); - id().print(buf, sizeof(buf)); - node->add_property("id", buf); - - if (_write_source && _session.get_record_enabled()) { - - XMLNode* cs_child = new XMLNode (X_("CapturingSources")); - XMLNode* cs_grandchild; - - cs_grandchild = new XMLNode (X_("file")); - cs_grandchild->add_property (X_("path"), _write_source->path()); - cs_child->add_child_nocopy (*cs_grandchild); - - /* store the location where capture will start */ - - Location* pi; - - if (Config->get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) { - snprintf (buf, sizeof (buf), "%" PRIu32, pi->start()); - } else { - snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame()); - } - - cs_child->add_property (X_("at"), buf); - node->add_child_nocopy (*cs_child); - } - - if (_extra_xml) { - node->add_child_copy (*_extra_xml); - } - - return* node; -} - -int -MidiDiskstream::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - uint32_t nchans = 1; - XMLNode* capture_pending_node = 0; - LocaleGuard lg (X_("POSIX")); - - in_set_state = true; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - /*if ((*niter)->name() == IO::state_node_name) { - deprecated_io_node = new XMLNode (**niter); - }*/ - assert ((*niter)->name() != IO::state_node_name); - - if ((*niter)->name() == X_("CapturingSources")) { - capture_pending_node = *niter; - } - } - - /* prevent write sources from being created */ - - in_set_state = true; - - if ((prop = node.property ("name")) != 0) { - _name = prop->value(); - } - - if ((prop = node.property ("id")) != 0) { - _id = prop->value (); - } - - if ((prop = node.property ("flags")) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - } - - ChannelMode channel_mode = AllChannels; - if ((prop = node.property ("channel-mode")) != 0) { - channel_mode = ChannelMode (string_2_enum(prop->value(), channel_mode)); - } - - unsigned int channel_mask = 0xFFFF; - if ((prop = node.property ("channel-mask")) != 0) { - sscanf (prop->value().c_str(), "0x%x", &channel_mask); - if (channel_mask & (~0xFFFF)) { - warning << _("MidiDiskstream: XML property channel-mask out of range") << endmsg; - } - } - - set_channel_mode(channel_mode, channel_mask); - - if ((prop = node.property ("channels")) != 0) { - nchans = atoi (prop->value().c_str()); - } - - if ((prop = node.property ("playlist")) == 0) { - return -1; - } - - { - bool had_playlist = (_playlist != 0); - - if (find_and_use_playlist (prop->value())) { - return -1; - } - - if (!had_playlist) { - _playlist->set_orig_diskstream_id (_id); - } - - if (capture_pending_node) { - use_pending_capture_data (*capture_pending_node); - } - - } - - if ((prop = node.property ("speed")) != 0) { - double sp = atof (prop->value().c_str()); - - if (realtime_set_speed (sp, false)) { - non_realtime_set_speed (); - } - } - - in_set_state = false; - - /* make sure this is clear before we do anything else */ - - // FIXME? - //_capturing_source = 0; - - /* write sources are handled when we handle the input set - up of the IO that owns this DS (::non_realtime_input_change()) - */ - - in_set_state = false; - - return 0; -} - -int -MidiDiskstream::use_new_write_source (uint32_t n) -{ - if (!recordable()) { - return 1; - } - - assert(n == 0); - - if (_write_source) { - - if (_write_source->is_empty ()) { - _write_source->mark_for_remove (); - _write_source.reset(); - } else { - _write_source.reset(); - } - } - - try { - _write_source = boost::dynamic_pointer_cast(_session.create_midi_source_for_session (*this)); - if (!_write_source) { - throw failed_constructor(); - } - } - - catch (failed_constructor &err) { - error << string_compose (_("%1:%2 new capture file not initialized correctly"), _name, n) << endmsg; - _write_source.reset(); - return -1; - } - - _write_source->set_allow_remove_if_empty (true); - - return 0; -} - -void -MidiDiskstream::reset_write_sources (bool mark_write_complete, bool force) -{ - if (!recordable()) { - return; - } - - if (_write_source && mark_write_complete) { - _write_source->mark_streaming_write_completed (); - } - - use_new_write_source (0); - - if (record_enabled()) { - //_capturing_sources.push_back (_write_source); - } -} - -int -MidiDiskstream::rename_write_sources () -{ - if (_write_source != 0) { - _write_source->set_source_name (_name, destructive()); - /* XXX what to do if this fails ? */ - } - return 0; -} - -void -MidiDiskstream::set_block_size (nframes_t nframes) -{ -} - -void -MidiDiskstream::allocate_temporary_buffers () -{ -} - -void -MidiDiskstream::monitor_input (bool yn) -{ - if (_source_port) - _source_port->request_monitor_input (yn); - else - cerr << "MidiDiskstream NO SOURCE PORT TO MONITOR\n"; -} - -void -MidiDiskstream::set_align_style_from_io () -{ - bool have_physical = false; - - if (_io == 0) { - return; - } - - get_input_sources (); - - if (_source_port && _source_port->flags() & JackPortIsPhysical) { - have_physical = true; - } - - if (have_physical) { - set_align_style (ExistingMaterial); - } else { - set_align_style (CaptureTime); - } -} - - -float -MidiDiskstream::playback_buffer_load () const -{ - return (float) ((double) _playback_buf->read_space()/ - (double) _playback_buf->capacity()); -} - -float -MidiDiskstream::capture_buffer_load () const -{ - return (float) ((double) _capture_buf->write_space()/ - (double) _capture_buf->capacity()); -} - - -int -MidiDiskstream::use_pending_capture_data (XMLNode& node) -{ - return 0; -} - -/** Writes playback events in the given range to \a dst, translating time stamps - * so that an event at \a start has time = 0 - */ -void -MidiDiskstream::get_playback(MidiBuffer& dst, nframes_t start, nframes_t end) -{ - dst.clear(); - assert(dst.size() == 0); - - // Reverse. ... We just don't do reverse, ok? Back off. - if (end <= start) { - return; - } - - // Translates stamps to be relative to start - _playback_buf->read(dst, start, end); -} diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc deleted file mode 100644 index b21bf38873..0000000000 --- a/libs/ardour/midi_model.cc +++ /dev/null @@ -1,953 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Written by Dave Robillard, 2007 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - */ - -#define __STDC_LIMIT_MACROS 1 - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -using namespace std; -using namespace ARDOUR; - -void MidiModel::write_lock() { - _lock.writer_lock(); - _automation_lock.lock(); -} - -void MidiModel::write_unlock() { - _lock.writer_unlock(); - _automation_lock.unlock(); -} - -void MidiModel::read_lock() const { - _lock.reader_lock(); - /*_automation_lock.lock();*/ -} - -void MidiModel::read_unlock() const { - _lock.reader_unlock(); - /*_automation_lock.unlock();*/ -} - -// Read iterator (const_iterator) - -MidiModel::const_iterator::const_iterator(const MidiModel& model, double t) - : _model(&model) - , _is_end( (t == DBL_MAX) || model.empty() ) - , _locked( !_is_end ) -{ - //cerr << "Created MIDI iterator @ " << t << " (is end: " << _is_end << ")" << endl; - - if (_is_end) { - return; - } - - model.read_lock(); - - _note_iter = model.notes().end(); - // find first note which begins after t - for (MidiModel::Notes::const_iterator i = model.notes().begin(); i != model.notes().end(); ++i) { - if ((*i)->time() >= t) { - _note_iter = i; - break; - } - } - - MidiControlIterator earliest_control(boost::shared_ptr(), DBL_MAX, 0.0); - - _control_iters.reserve(model.controls().size()); - - // find the earliest control event available - for (Automatable::Controls::const_iterator i = model.controls().begin(); - i != model.controls().end(); ++i) { - - assert( - i->first.type() == MidiCCAutomation || - i->first.type() == MidiPgmChangeAutomation || - i->first.type() == MidiPitchBenderAutomation || - i->first.type() == MidiChannelAftertouchAutomation); - - double x, y; - bool ret = i->second->list()->rt_safe_earliest_event_unlocked(t, DBL_MAX, x, y); - if (!ret) { - //cerr << "MIDI Iterator: CC " << i->first.id() << " (size " << i->second->list()->size() - // << ") has no events past " << t << endl; - continue; - } - - assert(x >= 0); - - if (y < i->first.min() || y > i->first.max()) { - cerr << "ERROR: Controller (" << i->first.to_string() << ") value '" << y - << "' out of range [" << i->first.min() << "," << i->first.max() - << "], event ignored" << endl; - continue; - } - - const MidiControlIterator new_iter(i->second->list(), x, y); - - //cerr << "MIDI Iterator: CC " << i->first.id() << " added (" << x << ", " << y << ")" << endl; - _control_iters.push_back(new_iter); - - // if the x of the current control is less than earliest_control - // we have a new earliest_control - if (x < earliest_control.x) { - earliest_control = new_iter; - _control_iter = _control_iters.end(); - --_control_iter; - // now _control_iter points to the last Element in _control_iters - } - } - - if (_note_iter != model.notes().end()) { - _event = boost::shared_ptr(new MIDI::Event((*_note_iter)->on_event(), true)); - } - - double time = DBL_MAX; - // in case we have no notes in the region, we still want to get controller messages - if (_event.get()) { - time = _event->time(); - // if the note is going to make it this turn, advance _note_iter - if (earliest_control.x > time) { - _active_notes.push(*_note_iter); - ++_note_iter; - } - } - - // <=, because we probably would want to send control events first - if (earliest_control.automation_list.get() && earliest_control.x <= time) { - model.control_to_midi_event(_event, earliest_control); - } else { - _control_iter = _control_iters.end(); - } - - if ( (! _event.get()) || _event->size() == 0) { - //cerr << "Created MIDI iterator @ " << t << " is at end." << endl; - _is_end = true; - - // eliminate possible race condition here (ugly) - static Glib::Mutex mutex; - Glib::Mutex::Lock lock(mutex); - if (_locked) { - _model->read_unlock(); - _locked = false; - } - } else { - //printf("New MIDI Iterator = %X @ %lf\n", _event->type(), _event->time()); - } - - assert(_is_end || (_event->buffer() && _event->buffer()[0] != '\0')); -} - -MidiModel::const_iterator::~const_iterator() -{ - if (_locked) { - _model->read_unlock(); - } -} - -const MidiModel::const_iterator& MidiModel::const_iterator::operator++() -{ - if (_is_end) { - throw std::logic_error("Attempt to iterate past end of MidiModel"); - } - - assert(_event->buffer() && _event->buffer()[0] != '\0'); - - /*cerr << "const_iterator::operator++: " << _event->to_string() << endl;*/ - - if (! (_event->is_note() || _event->is_cc() || _event->is_pgm_change() || _event->is_pitch_bender() || _event->is_channel_aftertouch()) ) { - cerr << "FAILED event buffer: " << hex << int(_event->buffer()[0]) << int(_event->buffer()[1]) << int(_event->buffer()[2]) << endl; - } - assert((_event->is_note() || _event->is_cc() || _event->is_pgm_change() || _event->is_pitch_bender() || _event->is_channel_aftertouch())); - - // Increment past current control event - if (!_event->is_note() && _control_iter != _control_iters.end() && _control_iter->automation_list.get()) { - double x = 0.0, y = 0.0; - const bool ret = _control_iter->automation_list->rt_safe_earliest_event_unlocked( - _control_iter->x, DBL_MAX, x, y, false); - - if (ret) { - _control_iter->x = x; - _control_iter->y = y; - } else { - _control_iter->automation_list.reset(); - _control_iter->x = DBL_MAX; - } - } - - const std::vector::iterator old_control_iter = _control_iter; - _control_iter = _control_iters.begin(); - - // find the _control_iter with the earliest event time - for (std::vector::iterator i = _control_iters.begin(); - i != _control_iters.end(); ++i) { - if (i->x < _control_iter->x) { - _control_iter = i; - } - } - - enum Type {NIL, NOTE_ON, NOTE_OFF, AUTOMATION}; - - Type type = NIL; - double t = 0; - - // Next earliest note on - if (_note_iter != _model->notes().end()) { - type = NOTE_ON; - t = (*_note_iter)->time(); - } - - // Use the next earliest note off iff it's earlier than the note on - if (_model->note_mode() == Sustained && (! _active_notes.empty())) { - if (type == NIL || _active_notes.top()->end_time() <= (*_note_iter)->time()) { - type = NOTE_OFF; - t = _active_notes.top()->end_time(); - } - } - - // Use the next earliest controller iff it's earlier than the note event - if (_control_iter != _control_iters.end() && _control_iter->x != DBL_MAX /*&& _control_iter != old_control_iter */) { - if (type == NIL || _control_iter->x < t) { - type = AUTOMATION; - } - } - - if (type == NOTE_ON) { - //cerr << "********** MIDI Iterator = note on" << endl; - *_event = (*_note_iter)->on_event(); - cerr << "Event contents on note on: " << _event->to_string() << endl; - _active_notes.push(*_note_iter); - ++_note_iter; - } else if (type == NOTE_OFF) { - //cerr << "********** MIDI Iterator = note off" << endl; - *_event = _active_notes.top()->off_event(); - _active_notes.pop(); - } else if (type == AUTOMATION) { - //cerr << "********** MIDI Iterator = Automation" << endl; - _model->control_to_midi_event(_event, *_control_iter); - } else { - //cerr << "********** MIDI Iterator = End" << endl; - _is_end = true; - } - - assert(_is_end || _event->size() > 0); - - return *this; -} - -bool MidiModel::const_iterator::operator==(const const_iterator& other) const -{ - if (_is_end || other._is_end) { - return (_is_end == other._is_end); - } else { - return (_event == other._event); - } -} - -MidiModel::const_iterator& MidiModel::const_iterator::operator=(const const_iterator& other) -{ - if (_locked && _model != other._model) { - _model->read_unlock(); - } - - _model = other._model; - _active_notes = other._active_notes; - _is_end = other._is_end; - _locked = other._locked; - _note_iter = other._note_iter; - _control_iters = other._control_iters; - size_t index = other._control_iter - other._control_iters.begin(); - _control_iter = _control_iters.begin() + index; - - if (!_is_end) { - _event = boost::shared_ptr(new MIDI::Event(*other._event, true)); - } - - return *this; -} - -// MidiModel - -MidiModel::MidiModel(MidiSource *s, size_t size) - : Automatable(s->session(), "midi model") - , _notes(size) - , _note_mode(Sustained) - , _writing(false) - , _edited(false) - , _end_iter(*this, DBL_MAX) - , _next_read(UINT32_MAX) - , _read_iter(*this, DBL_MAX) - , _midi_source(s) -{ - assert(_end_iter._is_end); - assert( ! _end_iter._locked); -} - -/** Read events in frame range \a start .. \a start+cnt into \a dst, - * adding \a stamp_offset to each event's timestamp. - * \return number of events written to \a dst - */ -size_t MidiModel::read(MidiRingBuffer& dst, nframes_t start, nframes_t nframes, - nframes_t stamp_offset, nframes_t negative_stamp_offset) const -{ - //cerr << this << " MM::read @ " << start << " frames: " << nframes << " -> " << stamp_offset << endl; - //cerr << this << " MM # notes: " << n_notes() << endl; - - size_t read_events = 0; - - if (start != _next_read) { - _read_iter = const_iterator(*this, (double)start); - //cerr << "Repositioning iterator from " << _next_read << " to " << start << endl; - } else { - //cerr << "Using cached iterator at " << _next_read << endl; - } - - _next_read = start + nframes; - - while (_read_iter != end() && _read_iter->time() < start + nframes) { - assert(_read_iter->size() > 0); - assert(_read_iter->buffer()); - dst.write(_read_iter->time() + stamp_offset - negative_stamp_offset, - _read_iter->size(), - _read_iter->buffer()); - - /*cerr << this << " MidiModel::read event @ " << _read_iter->time() - << " type: " << hex << int(_read_iter->type()) << dec - << " note: " << int(_read_iter->note()) - << " velocity: " << int(_read_iter->velocity()) - << endl;*/ - - ++_read_iter; - ++read_events; - } - - return read_events; -} - -/** Write the controller event pointed to by \a iter to \a ev. - * The buffer of \a ev will be allocated or resized as necessary. - * \return true on success - */ -bool -MidiModel::control_to_midi_event(boost::shared_ptr& ev, const MidiControlIterator& iter) const -{ - assert(iter.automation_list.get()); - if (!ev) { - ev = boost::shared_ptr(new MIDI::Event(0, 3, NULL, true)); - } - - switch (iter.automation_list->parameter().type()) { - case MidiCCAutomation: - assert(iter.automation_list.get()); - assert(iter.automation_list->parameter().channel() < 16); - assert(iter.automation_list->parameter().id() <= INT8_MAX); - assert(iter.y <= INT8_MAX); - - ev->time() = iter.x; - ev->realloc(3); - ev->buffer()[0] = MIDI_CMD_CONTROL + iter.automation_list->parameter().channel(); - ev->buffer()[1] = (uint8_t)iter.automation_list->parameter().id(); - ev->buffer()[2] = (uint8_t)iter.y; - break; - - case MidiPgmChangeAutomation: - assert(iter.automation_list.get()); - assert(iter.automation_list->parameter().channel() < 16); - assert(iter.automation_list->parameter().id() == 0); - assert(iter.y <= INT8_MAX); - - ev->time() = iter.x; - ev->realloc(2); - ev->buffer()[0] = MIDI_CMD_PGM_CHANGE + iter.automation_list->parameter().channel(); - ev->buffer()[1] = (uint8_t)iter.y; - break; - - case MidiPitchBenderAutomation: - assert(iter.automation_list.get()); - assert(iter.automation_list->parameter().channel() < 16); - assert(iter.automation_list->parameter().id() == 0); - assert(iter.y < (1<<14)); - - ev->time() = iter.x; - ev->realloc(3); - ev->buffer()[0] = MIDI_CMD_BENDER + iter.automation_list->parameter().channel(); - ev->buffer()[1] = uint16_t(iter.y) & 0x7F; // LSB - ev->buffer()[2] = (uint16_t(iter.y) >> 7) & 0x7F; // MSB - //cerr << "Pitch bender event: " << ev->to_string() << " value: " << ev->pitch_bender_value() << " original value: " << iter.y << std::endl; - break; - - case MidiChannelAftertouchAutomation: - assert(iter.automation_list.get()); - assert(iter.automation_list->parameter().channel() < 16); - assert(iter.automation_list->parameter().id() == 0); - assert(iter.y <= INT8_MAX); - - ev->time() = iter.x; - ev->realloc(2); - ev->buffer()[0] - = MIDI_CMD_CHANNEL_PRESSURE + iter.automation_list->parameter().channel(); - ev->buffer()[1] = (uint8_t)iter.y; - break; - - default: - return false; - } - - return true; -} - - -/** Clear all events from the model. - */ -void MidiModel::clear() -{ - _lock.writer_lock(); - _notes.clear(); - clear_automation(); - _next_read = 0; - _read_iter = end(); - _lock.writer_unlock(); -} - - -/** Begin a write of events to the model. - * - * If \a mode is Sustained, complete notes with duration are constructed as note - * on/off events are received. Otherwise (Percussive), only note on events are - * stored; note off events are discarded entirely and all contained notes will - * have duration 0. - */ -void MidiModel::start_write() -{ - //cerr << "MM " << this << " START WRITE, MODE = " << enum_2_string(_note_mode) << endl; - write_lock(); - _writing = true; - for (int i = 0; i < 16; ++i) - _write_notes[i].clear(); - - _dirty_automations.clear(); - write_unlock(); -} - -/** Finish a write of events to the model. - * - * If \a delete_stuck is true and the current mode is Sustained, note on events - * that were never resolved with a corresonding note off will be deleted. - * Otherwise they will remain as notes with duration 0. - */ -void MidiModel::end_write(bool delete_stuck) -{ - write_lock(); - assert(_writing); - - //cerr << "MM " << this << " END WRITE: " << _notes.size() << " NOTES\n"; - - if (_note_mode == Sustained && delete_stuck) { - for (Notes::iterator n = _notes.begin(); n != _notes.end() ;) { - if ((*n)->duration() == 0) { - cerr << "WARNING: Stuck note lost: " << (*n)->note() << endl; - n = _notes.erase(n); - // we have to break here because erase invalidates the iterator - break; - } else { - ++n; - } - } - } - - for (int i = 0; i < 16; ++i) { - if (!_write_notes[i].empty()) { - cerr << "WARNING: MidiModel::end_write: Channel " << i << " has " - << _write_notes[i].size() << " stuck notes" << endl; - } - _write_notes[i].clear(); - } - - for (AutomationLists::const_iterator i = _dirty_automations.begin(); i != _dirty_automations.end(); ++i) { - (*i)->Dirty.emit(); - (*i)->lookup_cache().left = -1; - (*i)->search_cache().left = -1; - } - - _writing = false; - write_unlock(); -} - -/** Append \a in_event to model. NOT realtime safe. - * - * Timestamps of events in \a buf are expected to be relative to - * the start of this model (t=0) and MUST be monotonically increasing - * and MUST be >= the latest event currently in the model. - */ -void MidiModel::append(const MIDI::Event& ev) -{ - write_lock(); - _edited = true; - - assert(_notes.empty() || ev.time() >= _notes.back()->time()); - assert(_writing); - - if (ev.is_note_on()) { - append_note_on_unlocked(ev.channel(), ev.time(), ev.note(), - ev.velocity()); - } else if (ev.is_note_off()) { - append_note_off_unlocked(ev.channel(), ev.time(), ev.note()); - } else if (ev.is_cc()) { - append_automation_event_unlocked(MidiCCAutomation, ev.channel(), - ev.time(), ev.cc_number(), ev.cc_value()); - } else if (ev.is_pgm_change()) { - append_automation_event_unlocked(MidiPgmChangeAutomation, ev.channel(), - ev.time(), ev.pgm_number(), 0); - } else if (ev.is_pitch_bender()) { - append_automation_event_unlocked(MidiPitchBenderAutomation, - ev.channel(), ev.time(), ev.pitch_bender_lsb(), - ev.pitch_bender_msb()); - } else if (ev.is_channel_aftertouch()) { - append_automation_event_unlocked(MidiChannelAftertouchAutomation, - ev.channel(), ev.time(), ev.channel_aftertouch(), 0); - } else { - printf("WARNING: MidiModel: Unknown event type %X\n", ev.type()); - } - - write_unlock(); -} - -void MidiModel::append_note_on_unlocked(uint8_t chan, double time, - uint8_t note_num, uint8_t velocity) -{ - /*cerr << "MidiModel " << this << " chan " << (int)chan << - " note " << (int)note_num << " on @ " << time << endl;*/ - - assert(note_num <= 127); - assert(chan < 16); - assert(_writing); - _edited = true; - - boost::shared_ptr new_note(new Note(chan, time, 0, note_num, velocity)); - _notes.push_back(new_note); - if (_note_mode == Sustained) { - //cerr << "MM Sustained: Appending active note on " << (unsigned)(uint8_t)note_num << endl; - _write_notes[chan].push_back(_notes.size() - 1); - }/* else { - cerr << "MM Percussive: NOT appending active note on" << endl; - }*/ -} - -void MidiModel::append_note_off_unlocked(uint8_t chan, double time, - uint8_t note_num) -{ - /*cerr << "MidiModel " << this << " chan " << (int)chan << - " note " << (int)note_num << " off @ " << time << endl;*/ - - assert(note_num <= 127); - assert(chan < 16); - assert(_writing); - _edited = true; - - if (_note_mode == Percussive) { - cerr << "MidiModel Ignoring note off (percussive mode)" << endl; - return; - } - - /* FIXME: make _write_notes fixed size (127 noted) for speed */ - - /* FIXME: note off velocity for that one guy out there who actually has - * keys that send it */ - - bool resolved = false; - - for (WriteNotes::iterator n = _write_notes[chan].begin(); n - != _write_notes[chan].end(); ++n) { - Note& note = *_notes[*n].get(); - if (note.note() == note_num) { - assert(time >= note.time()); - note.set_duration(time - note.time()); - _write_notes[chan].erase(n); - //cerr << "MM resolved note, duration: " << note.duration() << endl; - resolved = true; - break; - } - } - - if (!resolved) { - cerr << "MidiModel " << this << " spurious note off chan " << (int)chan - << ", note " << (int)note_num << " @ " << time << endl; - } -} - -void MidiModel::append_automation_event_unlocked(AutomationType type, - uint8_t chan, double time, uint8_t first_byte, uint8_t second_byte) -{ - //cerr << "MidiModel " << this << " chan " << (int)chan << - // " CC " << (int)number << " = " << (int)value << " @ " << time << endl; - - assert(chan < 16); - assert(_writing); - _edited = true; - double value; - - uint32_t id = 0; - - switch (type) { - case MidiCCAutomation: - id = first_byte; - value = double(second_byte); - break; - case MidiChannelAftertouchAutomation: - case MidiPgmChangeAutomation: - id = 0; - value = double(first_byte); - break; - case MidiPitchBenderAutomation: - id = 0; - value = double((0x7F & second_byte) << 7 | (0x7F & first_byte)); - break; - default: - assert(false); - } - - Parameter param(type, id, chan); - boost::shared_ptr control = Automatable::control(param, true); - control->list()->rt_add(time, value); -} - -void MidiModel::add_note_unlocked(const boost::shared_ptr note) -{ - //cerr << "MidiModel " << this << " add note " << (int)note.note() << " @ " << note.time() << endl; - _edited = true; - Notes::iterator i = upper_bound(_notes.begin(), _notes.end(), note, - note_time_comparator); - _notes.insert(i, note); -} - -void MidiModel::remove_note_unlocked(const boost::shared_ptr note) -{ - _edited = true; - //cerr << "MidiModel " << this << " remove note " << (int)note.note() << " @ " << note.time() << endl; - for (Notes::iterator n = _notes.begin(); n != _notes.end(); ++n) { - Note& _n = *(*n); - const Note& _note = *note; - // TODO: There is still the issue, that after restarting ardour - // persisted undo does not work, because of rounding errors in the - // event times after saving/restoring to/from MIDI files - /*cerr << "======================================= " << endl; - cerr << int(_n.note()) << "@" << int(_n.time()) << "[" << int(_n.channel()) << "] --" << int(_n.duration()) << "-- #" << int(_n.velocity()) << endl; - cerr << int(_note.note()) << "@" << int(_note.time()) << "[" << int(_note.channel()) << "] --" << int(_note.duration()) << "-- #" << int(_note.velocity()) << endl; - cerr << "Equal: " << bool(_n == _note) << endl; - cerr << endl << endl;*/ - if (_n == _note) { - _notes.erase(n); - // we have to break here, because erase invalidates all iterators, ie. n itself - break; - } - } -} - -/** Slow! for debugging only. */ -#ifndef NDEBUG -bool MidiModel::is_sorted() const { - bool t = 0; - for (Notes::const_iterator n = _notes.begin(); n != _notes.end(); ++n) - if ((*n)->time() < t) - return false; - else - t = (*n)->time(); - - return true; -} -#endif - -/** Start a new command. - * - * This has no side-effects on the model or Session, the returned command - * can be held on to for as long as the caller wishes, or discarded without - * formality, until apply_command is called and ownership is taken. - */ -MidiModel::DeltaCommand* MidiModel::new_delta_command(const string name) -{ - DeltaCommand* cmd = new DeltaCommand(_midi_source->model(), name); - return cmd; -} - -/** Apply a command. - * - * Ownership of cmd is taken, it must not be deleted by the caller. - * The command will constitute one item on the undo stack. - */ -void MidiModel::apply_command(Command* cmd) -{ - _session.begin_reversible_command(cmd->name()); - (*cmd)(); - assert(is_sorted()); - _session.commit_reversible_command(cmd); - _edited = true; -} - -// MidiEditCommand - -MidiModel::DeltaCommand::DeltaCommand(boost::shared_ptr m, - const std::string& name) - : Command(name) - , _model(m) - , _name(name) -{ -} - -MidiModel::DeltaCommand::DeltaCommand(boost::shared_ptr m, - const XMLNode& node) - : _model(m) -{ - set_state(node); -} - -void MidiModel::DeltaCommand::add(const boost::shared_ptr note) -{ - //cerr << "MEC: apply" << endl; - _removed_notes.remove(note); - _added_notes.push_back(note); -} - -void MidiModel::DeltaCommand::remove(const boost::shared_ptr note) -{ - //cerr << "MEC: remove" << endl; - _added_notes.remove(note); - _removed_notes.push_back(note); -} - -void MidiModel::DeltaCommand::operator()() -{ - // This could be made much faster by using a priority_queue for added and - // removed notes (or sort here), and doing a single iteration over _model - - // Need to reset iterator to drop the read lock it holds, or we'll deadlock - const bool reset_iter = (_model->_read_iter.locked()); - double iter_time = -1.0; - - if (reset_iter) { - if (_model->_read_iter.get_event_pointer().get()) { - iter_time = _model->_read_iter->time(); - } else { - cerr << "MidiModel::DeltaCommand::operator(): WARNING: _read_iter points to no event" << endl; - } - _model->_read_iter = _model->end(); // drop read lock - } - - assert( ! _model->_read_iter.locked()); - - _model->write_lock(); - - for (std::list< boost::shared_ptr >::iterator i = _added_notes.begin(); i != _added_notes.end(); ++i) - _model->add_note_unlocked(*i); - - for (std::list< boost::shared_ptr >::iterator i = _removed_notes.begin(); i != _removed_notes.end(); ++i) - _model->remove_note_unlocked(*i); - - _model->write_unlock(); - - if (reset_iter && iter_time != -1.0) { - _model->_read_iter = const_iterator(*_model.get(), iter_time); - } - - _model->ContentsChanged(); /* EMIT SIGNAL */ -} - -void MidiModel::DeltaCommand::undo() -{ - // This could be made much faster by using a priority_queue for added and - // removed notes (or sort here), and doing a single iteration over _model - - // Need to reset iterator to drop the read lock it holds, or we'll deadlock - const bool reset_iter = (_model->_read_iter.locked()); - double iter_time = -1.0; - - if (reset_iter) { - if (_model->_read_iter.get_event_pointer().get()) { - iter_time = _model->_read_iter->time(); - } else { - cerr << "MidiModel::DeltaCommand::undo(): WARNING: _read_iter points to no event" << endl; - } - _model->_read_iter = _model->end(); // drop read lock - } - - assert( ! _model->_read_iter.locked()); - - _model->write_lock(); - - for (std::list< boost::shared_ptr >::iterator i = _added_notes.begin(); i - != _added_notes.end(); ++i) - _model->remove_note_unlocked(*i); - - for (std::list< boost::shared_ptr >::iterator i = - _removed_notes.begin(); i != _removed_notes.end(); ++i) - _model->add_note_unlocked(*i); - - _model->write_unlock(); - - if (reset_iter && iter_time != -1.0) { - _model->_read_iter = const_iterator(*_model.get(), iter_time); - } - - _model->ContentsChanged(); /* EMIT SIGNAL */ -} - -XMLNode & MidiModel::DeltaCommand::marshal_note(const boost::shared_ptr note) -{ - XMLNode *xml_note = new XMLNode("note"); - ostringstream note_str(ios::ate); - note_str << int(note->note()); - xml_note->add_property("note", note_str.str()); - - ostringstream channel_str(ios::ate); - channel_str << int(note->channel()); - xml_note->add_property("channel", channel_str.str()); - - ostringstream time_str(ios::ate); - time_str << int(note->time()); - xml_note->add_property("time", time_str.str()); - - ostringstream duration_str(ios::ate); - duration_str <<(unsigned int) note->duration(); - xml_note->add_property("duration", duration_str.str()); - - ostringstream velocity_str(ios::ate); - velocity_str << (unsigned int) note->velocity(); - xml_note->add_property("velocity", velocity_str.str()); - - return *xml_note; -} - -boost::shared_ptr MidiModel::DeltaCommand::unmarshal_note(XMLNode *xml_note) -{ - unsigned int note; - istringstream note_str(xml_note->property("note")->value()); - note_str >> note; - - unsigned int channel; - istringstream channel_str(xml_note->property("channel")->value()); - channel_str >> channel; - - unsigned int time; - istringstream time_str(xml_note->property("time")->value()); - time_str >> time; - - unsigned int duration; - istringstream duration_str(xml_note->property("duration")->value()); - duration_str >> duration; - - unsigned int velocity; - istringstream velocity_str(xml_note->property("velocity")->value()); - velocity_str >> velocity; - - boost::shared_ptr note_ptr(new Note(channel, time, duration, note, velocity)); - return note_ptr; -} - -#define ADDED_NOTES_ELEMENT "added_notes" -#define REMOVED_NOTES_ELEMENT "removed_notes" -#define DELTA_COMMAND_ELEMENT "DeltaCommand" - -int MidiModel::DeltaCommand::set_state(const XMLNode& delta_command) -{ - if (delta_command.name() != string(DELTA_COMMAND_ELEMENT)) { - return 1; - } - - _added_notes.clear(); - XMLNode *added_notes = delta_command.child(ADDED_NOTES_ELEMENT); - XMLNodeList notes = added_notes->children(); - transform(notes.begin(), notes.end(), back_inserter(_added_notes), - sigc::mem_fun(*this, &DeltaCommand::unmarshal_note)); - - _removed_notes.clear(); - XMLNode *removed_notes = delta_command.child(REMOVED_NOTES_ELEMENT); - notes = removed_notes->children(); - transform(notes.begin(), notes.end(), back_inserter(_removed_notes), - sigc::mem_fun(*this, &DeltaCommand::unmarshal_note)); - - return 0; -} - -XMLNode& MidiModel::DeltaCommand::get_state() -{ - XMLNode *delta_command = new XMLNode(DELTA_COMMAND_ELEMENT); - delta_command->add_property("midi_source", _model->midi_source()->id().to_s()); - - XMLNode *added_notes = delta_command->add_child(ADDED_NOTES_ELEMENT); - for_each(_added_notes.begin(), _added_notes.end(), sigc::compose( - sigc::mem_fun(*added_notes, &XMLNode::add_child_nocopy), - sigc::mem_fun(*this, &DeltaCommand::marshal_note))); - - XMLNode *removed_notes = delta_command->add_child(REMOVED_NOTES_ELEMENT); - for_each(_removed_notes.begin(), _removed_notes.end(), sigc::compose( - sigc::mem_fun(*removed_notes, &XMLNode::add_child_nocopy), - sigc::mem_fun(*this, &DeltaCommand::marshal_note))); - - return *delta_command; -} - -struct EventTimeComparator { - typedef const MIDI::Event* value_type; - inline bool operator()(const MIDI::Event& a, const MIDI::Event& b) const { - return a.time() >= b.time(); - } -}; - -/** Write the model to a MidiSource (i.e. save the model). - * This is different from manually using read to write to a source in that - * note off events are written regardless of the track mode. This is so the - * user can switch a recorded track (with note durations from some instrument) - * to percussive, save, reload, then switch it back to sustained without - * destroying the original note durations. - */ -bool MidiModel::write_to(boost::shared_ptr source) -{ - read_lock(); - - const NoteMode old_note_mode = _note_mode; - _note_mode = Sustained; - - for (const_iterator i = begin(); i != end(); ++i) { - source->append_event_unlocked(Frames, *i); - } - - _note_mode = old_note_mode; - - read_unlock(); - _edited = false; - - return true; -} - -XMLNode& MidiModel::get_state() -{ - XMLNode *node = new XMLNode("MidiModel"); - return *node; -} - diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc deleted file mode 100644 index d258d49524..0000000000 --- a/libs/ardour/midi_playlist.cc +++ /dev/null @@ -1,318 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace sigc; -using namespace std; - -MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) - : Playlist (session, node, DataType::MIDI, hidden) - , _note_mode(Sustained) -{ - const XMLProperty* prop = node.property("type"); - assert(prop && DataType(prop->value()) == DataType::MIDI); - - in_set_state++; - set_state (node); - in_set_state--; -} - -MidiPlaylist::MidiPlaylist (Session& session, string name, bool hidden) - : Playlist (session, name, DataType::MIDI, hidden) -{ -} - -MidiPlaylist::MidiPlaylist (boost::shared_ptr other, string name, bool hidden) - : Playlist (other, name, hidden) -{ - throw; // nope - - /* - list::const_iterator in_o = other.regions.begin(); - list::iterator in_n = regions.begin(); - - while (in_o != other.regions.end()) { - MidiRegion *ar = dynamic_cast( (*in_o) ); - - for (list::const_iterator xfades = other._crossfades.begin(); xfades != other._crossfades.end(); ++xfades) { - if ( &(*xfades)->in() == ar) { - // We found one! Now copy it! - - list::const_iterator out_o = other.regions.begin(); - list::const_iterator out_n = regions.begin(); - - while (out_o != other.regions.end()) { - - MidiRegion *ar2 = dynamic_cast( (*out_o) ); - - if ( &(*xfades)->out() == ar2) { - MidiRegion *in = dynamic_cast( (*in_n) ); - MidiRegion *out = dynamic_cast( (*out_n) ); - Crossfade *new_fade = new Crossfade( *(*xfades), in, out); - add_crossfade(*new_fade); - break; - } - - out_o++; - out_n++; - } - // cerr << "HUH!? second region in the crossfade not found!" << endl; - } - } - - in_o++; - in_n++; - } -*/ -} - -MidiPlaylist::MidiPlaylist (boost::shared_ptr other, nframes_t start, nframes_t dur, string name, bool hidden) - : Playlist (other, start, dur, name, hidden) -{ - /* this constructor does NOT notify others (session) */ -} - -MidiPlaylist::~MidiPlaylist () -{ - GoingAway (); /* EMIT SIGNAL */ - - /* drop connections to signals */ - - notify_callbacks (); -} - -struct RegionSortByLayer { - bool operator() (boost::shared_ptr a, boost::shared_ptr b) { - return a->layer() < b->layer(); - } -}; - -/** Returns the number of frames in time duration read (eg could be large when 0 events are read) */ -nframes_t -MidiPlaylist::read (MidiRingBuffer& dst, nframes_t start, - nframes_t dur, unsigned chan_n) -{ - /* this function is never called from a realtime thread, so - its OK to block (for short intervals). - */ - - Glib::Mutex::Lock rm (region_lock); - - nframes_t end = start + dur - 1; - - _read_data_count = 0; - - // relevent regions overlapping start <--> end - vector > regs; - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - if ((*i)->coverage (start, end) != OverlapNone) { - regs.push_back(*i); - } - } - - RegionSortByLayer layer_cmp; - sort(regs.begin(), regs.end(), layer_cmp); - - for (vector >::iterator i = regs.begin(); i != regs.end(); ++i) { - // FIXME: ensure time is monotonic here? - boost::shared_ptr mr = boost::dynamic_pointer_cast(*i); - if (mr) { - mr->read_at (dst, start, dur, chan_n, _note_mode); - _read_data_count += mr->read_data_count(); - } - } - - return dur; -} - - -void -MidiPlaylist::remove_dependents (boost::shared_ptr region) -{ - /* MIDI regions have no dependents (crossfades) */ -} - - -void -MidiPlaylist::refresh_dependents (boost::shared_ptr r) -{ - /* MIDI regions have no dependents (crossfades) */ -} - -void -MidiPlaylist::finalize_split_region (boost::shared_ptr original, boost::shared_ptr left, boost::shared_ptr right) -{ - /* No MIDI crossfading (yet?), so nothing to do here */ -} - -void -MidiPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) -{ - /* MIDI regions have no dependents (crossfades) */ -} - - -int -MidiPlaylist::set_state (const XMLNode& node) -{ - in_set_state++; - freeze (); - - Playlist::set_state (node); - - thaw(); - in_set_state--; - - return 0; -} - -void -MidiPlaylist::dump () const -{ - boost::shared_ptr r; - - cerr << "Playlist \"" << _name << "\" " << endl - << regions.size() << " regions " - << endl; - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - r = *i; - cerr << " " << r->name() << " @ " << r << " [" - << r->start() << "+" << r->length() - << "] at " - << r->position() - << " on layer " - << r->layer () - << endl; - } -} - -bool -MidiPlaylist::destroy_region (boost::shared_ptr region) -{ - boost::shared_ptr r = boost::dynamic_pointer_cast (region); - bool changed = false; - - if (r == 0) { - PBD::fatal << _("programming error: non-midi Region passed to remove_overlap in midi playlist") - << endmsg; - /*NOTREACHED*/ - return false; - } - - { - RegionLock rlock (this); - RegionList::iterator i; - RegionList::iterator tmp; - - for (i = regions.begin(); i != regions.end(); ) { - - tmp = i; - ++tmp; - - if ((*i) == region) { - regions.erase (i); - changed = true; - } - - i = tmp; - } - } - - - if (changed) { - /* overload this, it normally means "removed", not destroyed */ - notify_region_removed (region); - } - - return changed; -} - -set -MidiPlaylist::contained_automation() -{ - /* this function is never called from a realtime thread, so - its OK to block (for short intervals). - */ - - Glib::Mutex::Lock rm (region_lock); - - set ret; - - for (RegionList::const_iterator r = regions.begin(); r != regions.end(); ++r) { - boost::shared_ptr mr = boost::dynamic_pointer_cast(*r); - - for (Automatable::Controls::iterator c = mr->controls().begin(); - c != mr->controls().end(); ++c) { - ret.insert(c->first); - } - } - - return ret; -} - - -bool -MidiPlaylist::region_changed (Change what_changed, boost::shared_ptr region) -{ - if (in_flush || in_set_state) { - return false; - } - - // Feeling rather uninterested today, but thanks for the heads up anyway! - - Change our_interests = Change (/*MidiRegion::FadeInChanged| - MidiRegion::FadeOutChanged| - MidiRegion::FadeInActiveChanged| - MidiRegion::FadeOutActiveChanged| - MidiRegion::EnvelopeActiveChanged| - MidiRegion::ScaleAmplitudeChanged| - MidiRegion::EnvelopeChanged*/); - bool parent_wants_notify; - - parent_wants_notify = Playlist::region_changed (what_changed, region); - - if ((parent_wants_notify || (what_changed & our_interests))) { - notify_modified (); - } - - return true; -} - diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc deleted file mode 100644 index 14f88f2ad5..0000000000 --- a/libs/ardour/midi_port.cc +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include - -#include -#include -#include - -using namespace ARDOUR; -using namespace std; - -MidiPort::MidiPort (const std::string& name, Flags flags, bool external, nframes_t capacity) - : Port (name, flags) - , BaseMidiPort (name, flags) - , PortFacade (name, flags) -{ - // FIXME: size kludge (see BufferSet::ensure_buffers) - // Jack needs to tell us this - _buffer = new MidiBuffer (capacity * 8); - - if (external) { - /* external ports use the same buffer for the jack port (_ext_port) - * and internal ports (this) */ - _ext_port = new JackMidiPort (name, flags, _buffer); - Port::set_name (_ext_port->name()); - } else { - /* internal ports just have a single buffer, no jack port */ - _ext_port = 0; - set_name (name); - } - - reset (); -} - -MidiPort::~MidiPort() -{ - if (_ext_port) { - delete _ext_port; - _ext_port = 0; - } -} - -void -MidiPort::reset() -{ - BaseMidiPort::reset(); - - if (_ext_port) { - _ext_port->reset (); - } -} - -void -MidiPort::cycle_start (nframes_t nframes, nframes_t offset) -{ - if (_ext_port) { - _ext_port->cycle_start (nframes, offset); - } - - if (_flags & IsInput) { - - if (_ext_port) { - - BaseMidiPort* mprt = dynamic_cast(_ext_port); - assert(mprt); - assert(&mprt->get_midi_buffer() == _buffer); - - if (!_connections.empty()) { - (*_mixdown) (_connections, _buffer, nframes, offset, false); - } - - } else { - - if (_connections.empty()) { - _buffer->silence (nframes, offset); - } else { - (*_mixdown) (_connections, _buffer, nframes, offset, true); - } - } - - } else { - - _buffer->silence (nframes, offset); - } -} - - -void -MidiPort::cycle_end (nframes_t nframes, nframes_t offset) -{ - if (_ext_port) { - _ext_port->cycle_end (nframes, offset); - } -} - diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc deleted file mode 100644 index e29fb1e659..0000000000 --- a/libs/ardour/midi_region.cc +++ /dev/null @@ -1,363 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: midiregion.cc 746 2006-08-02 02:44:23Z drobilla $ -*/ - -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; - -/** Basic MidiRegion constructor (one channel) */ -MidiRegion::MidiRegion (boost::shared_ptr src, nframes_t start, nframes_t length) - : Region (src, start, length, PBD::basename_nosuffix(src->name()), DataType::MIDI, 0, Region::Flag(Region::DefaultFlags|Region::External)) -{ - assert(_name.find("/") == string::npos); - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); -} - -/* Basic MidiRegion constructor (one channel) */ -MidiRegion::MidiRegion (boost::shared_ptr src, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags) - : Region (src, start, length, name, DataType::MIDI, layer, flags) -{ - assert(_name.find("/") == string::npos); - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); -} - -/* Basic MidiRegion constructor (many channels) */ -MidiRegion::MidiRegion (const SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Flag flags) - : Region (srcs, start, length, name, DataType::MIDI, layer, flags) -{ - assert(_name.find("/") == string::npos); - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); -} - - -/** Create a new MidiRegion, that is part of an existing one */ -MidiRegion::MidiRegion (boost::shared_ptr other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags) - : Region (other, offset, length, name, layer, flags) -{ - assert(_name.find("/") == string::npos); - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); -} - -MidiRegion::MidiRegion (boost::shared_ptr other) - : Region (other) -{ - assert(_name.find("/") == string::npos); - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); -} - -MidiRegion::MidiRegion (boost::shared_ptr src, const XMLNode& node) - : Region (src, node) -{ - if (set_state (node)) { - throw failed_constructor(); - } - - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); - assert(_name.find("/") == string::npos); - assert(_type == DataType::MIDI); -} - -MidiRegion::MidiRegion (const SourceList& srcs, const XMLNode& node) - : Region (srcs, node) -{ - if (set_state (node)) { - throw failed_constructor(); - } - - midi_source(0)->Switched.connect(sigc::mem_fun(this, &MidiRegion::switch_source)); - assert(_name.find("/") == string::npos); - assert(_type == DataType::MIDI); -} - -MidiRegion::~MidiRegion () -{ -} - -nframes_t -MidiRegion::read_at (MidiRingBuffer& out, nframes_t position, nframes_t dur, uint32_t chan_n, NoteMode mode) const -{ - return _read_at (_sources, out, position, dur, chan_n, mode); -} - -nframes_t -MidiRegion::master_read_at (MidiRingBuffer& out, nframes_t position, nframes_t dur, uint32_t chan_n, NoteMode mode) const -{ - return _read_at (_master_sources, out, position, dur, chan_n, mode); -} - -nframes_t -MidiRegion::_read_at (const SourceList& srcs, MidiRingBuffer& dst, nframes_t position, nframes_t dur, uint32_t chan_n, NoteMode mode) const -{ - /*cerr << "MidiRegion " << _name << "._read_at(" << position << ") - " - << position << " duration: " << dur << endl;*/ - - nframes_t internal_offset = 0; - nframes_t src_offset = 0; - nframes_t to_read = 0; - - /* precondition: caller has verified that we cover the desired section */ - - assert(chan_n == 0); - - if (position < _position) { - internal_offset = 0; - src_offset = _position - position; - dur -= src_offset; - } else { - internal_offset = position - _position; - src_offset = 0; - } - - if (internal_offset >= _length) { - return 0; /* read nothing */ - } - - - if ((to_read = min (dur, _length - internal_offset)) == 0) { - return 0; /* read nothing */ - } - - // FIXME: non-opaque MIDI regions not yet supported - assert(opaque()); - - if (muted()) { - return 0; /* read nothing */ - } - - _read_data_count = 0; - - boost::shared_ptr src = midi_source(chan_n); - src->set_note_mode(mode); - - nframes_t output_buffer_position = 0; - nframes_t negative_output_buffer_position = 0; - if (_position >= _start) { - // handle resizing of beginnings of regions correctly - output_buffer_position = _position - _start; - } else { - // when _start is greater than _position, we have to subtract - // _start from the note times in the midi source - negative_output_buffer_position = _start; - } - - if (src->midi_read ( - // the destination buffer - dst, - // where to start reading in the region - _start + internal_offset, - // how many bytes - to_read, - // the offset in the output buffer - output_buffer_position, - // what to substract from note times written in the output buffer - negative_output_buffer_position - ) != to_read) { - return 0; /* "read nothing" */ - } - - _read_data_count += src->read_data_count(); - - return to_read; -} - -XMLNode& -MidiRegion::state (bool full) -{ - XMLNode& node (Region::state (full)); - char buf[64]; - char buf2[64]; - LocaleGuard lg (X_("POSIX")); - - node.add_property ("flags", enum_2_string (_flags)); - - // XXX these should move into Region - - for (uint32_t n=0; n < _sources.size(); ++n) { - snprintf (buf2, sizeof(buf2), "source-%d", n); - _sources[n]->id().print (buf, sizeof(buf)); - node.add_property (buf2, buf); - } - - for (uint32_t n=0; n < _master_sources.size(); ++n) { - snprintf (buf2, sizeof(buf2), "master-source-%d", n); - _master_sources[n]->id().print (buf, sizeof (buf)); - node.add_property (buf2, buf); - } - - if (full && _extra_xml) { - node.add_child_copy (*_extra_xml); - } - - return node; -} - -int -MidiRegion::set_live_state (const XMLNode& node, Change& what_changed, bool send) -{ - const XMLProperty *prop; - LocaleGuard lg (X_("POSIX")); - - Region::set_live_state (node, what_changed, false); - - uint32_t old_flags = _flags; - - if ((prop = node.property ("flags")) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - - //_flags = Flag (strtol (prop->value().c_str(), (char **) 0, 16)); - - _flags = Flag (_flags & ~Region::LeftOfSplit); - _flags = Flag (_flags & ~Region::RightOfSplit); - } - - if ((old_flags ^ _flags) & Muted) { - what_changed = Change (what_changed|MuteChanged); - } - if ((old_flags ^ _flags) & Opaque) { - what_changed = Change (what_changed|OpacityChanged); - } - if ((old_flags ^ _flags) & Locked) { - what_changed = Change (what_changed|LockChanged); - } - - if (send) { - send_change (what_changed); - } - - return 0; -} - -int -MidiRegion::set_state (const XMLNode& node) -{ - /* Region::set_state() calls the virtual set_live_state(), - which will get us back to AudioRegion::set_live_state() - to handle the relevant stuff. - */ - - return Region::set_state (node); -} - -void -MidiRegion::recompute_at_end () -{ - /* our length has changed - * (non destructively) "chop" notes that pass the end boundary, to - * prevent stuck notes. - */ -} - -void -MidiRegion::recompute_at_start () -{ - /* as above, but the shift was from the front - * maybe bump currently active note's note-ons up so they sound here? - * that could be undesireable in certain situations though.. maybe - * remove the note entirely, including it's note off? something needs to - * be done to keep the played MIDI sane to avoid messing up voices of - * polyhonic things etc........ - */ -} - -int -MidiRegion::separate_by_channel (Session& session, vector& v) const -{ - // Separate by MIDI channel? bit different from audio since this is separating based - // on the actual contained data and destructively modifies and creates new sources.. - -#if 0 - SourceList srcs; - string new_name; - - for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) { - - srcs.clear (); - srcs.push_back (*i); - - /* generate a new name */ - - if (session.region_name (new_name, _name)) { - return -1; - } - - /* create a copy with just one source */ - - v.push_back (new MidiRegion (srcs, _start, _length, new_name, _layer, _flags)); - } -#endif - - // Actually, I would prefer not if that's alright - return -1; -} - -int -MidiRegion::exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) -{ - return -1; -} - -boost::shared_ptr -MidiRegion::midi_source (uint32_t n) const -{ - // Guaranteed to succeed (use a static cast?) - return boost::dynamic_pointer_cast(source(n)); -} - - -void -MidiRegion::switch_source(boost::shared_ptr src) -{ - boost::shared_ptr msrc = boost::dynamic_pointer_cast(src); - if (!msrc) - return; - - // MIDI regions have only one source - _sources.clear(); - _sources.push_back(msrc); - - set_name(msrc->name()); -} - diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc deleted file mode 100644 index 4e83413c13..0000000000 --- a/libs/ardour/midi_source.cc +++ /dev/null @@ -1,206 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -sigc::signal MidiSource::MidiSourceCreated; - -MidiSource::MidiSource (Session& s, string name) - : Source (s, name, DataType::MIDI) - , _timeline_position(0) - , _model(new MidiModel(this)) - , _writing (false) -{ - _read_data_count = 0; - _write_data_count = 0; -} - -MidiSource::MidiSource (Session& s, const XMLNode& node) - : Source (s, node) - , _timeline_position(0) - , _model(new MidiModel(this)) - , _writing (false) -{ - _read_data_count = 0; - _write_data_count = 0; - - if (set_state (node)) { - throw failed_constructor(); - } -} - -MidiSource::~MidiSource () -{ -} - -XMLNode& -MidiSource::get_state () -{ - XMLNode& node (Source::get_state()); - - if (_captured_for.length()) { - node.add_property ("captured-for", _captured_for); - } - - return node; -} - -int -MidiSource::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - - Source::set_state (node); - - if ((prop = node.property ("captured-for")) != 0) { - _captured_for = prop->value(); - } - - return 0; -} - -nframes_t -MidiSource::midi_read (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const -{ - Glib::Mutex::Lock lm (_lock); - if (_model) { - //const size_t n_events = - _model->read(dst, start, cnt, stamp_offset, negative_stamp_offset); - //cout << "Read " << n_events << " events from model." << endl; - return cnt; - } else { - return read_unlocked (dst, start, cnt, stamp_offset, negative_stamp_offset); - } -} - -nframes_t -MidiSource::midi_write (MidiRingBuffer& dst, nframes_t cnt) -{ - Glib::Mutex::Lock lm (_lock); - return write_unlocked (dst, cnt); -} - -bool -MidiSource::file_changed (string path) -{ - struct stat stat_file; - - int e1 = stat (path.c_str(), &stat_file); - - return ( !e1 ); -} - -void -MidiSource::mark_streaming_midi_write_started (NoteMode mode, nframes_t start_frame) -{ - set_timeline_position(start_frame); // why do I have a feeling this can break somehow... - - if (_model) { - _model->set_note_mode(mode); - _model->start_write(); - } - - _writing = true; -} - -void -MidiSource::mark_streaming_write_started () -{ - if (_model) - _model->start_write(); - - _writing = true; -} - -void -MidiSource::mark_streaming_write_completed () -{ - if (_model) - _model->end_write(false); // FIXME: param? - - _writing = false; -} - -void -MidiSource::session_saved() -{ - flush_header(); - flush_footer(); - - if (_model && _model->edited()) { - string newname; - const string basename = PBD::basename_nosuffix(_name); - string::size_type last_dash = basename.find_last_of("-"); - if (last_dash == string::npos || last_dash == basename.find_first_of("-")) { - newname = basename + "-1"; - } else { - stringstream ss(basename.substr(last_dash+1)); - unsigned write_count = 0; - ss >> write_count; - cerr << "WRITE COUNT: " << write_count << endl; - ++write_count; // start at 1 - ss.clear(); - ss << basename.substr(0, last_dash) << "-" << write_count; - newname = ss.str(); - } - - string newpath = _session.session_directory().midi_path().to_string() +"/"+ newname + ".mid"; - - boost::shared_ptr newsrc = boost::dynamic_pointer_cast( - SourceFactory::createWritable(DataType::MIDI, _session, newpath, 1, 0, true)); - - newsrc->set_timeline_position(_timeline_position); - _model->write_to(newsrc); - - // cyclic dependency here, ugly :( - newsrc->set_model(_model); - _model->set_midi_source(newsrc.get()); - - newsrc->flush_header(); - newsrc->flush_footer(); - - Switched.emit(newsrc); - } -} - diff --git a/libs/ardour/midi_stretch.cc b/libs/ardour/midi_stretch.cc deleted file mode 100644 index f33c58a0fd..0000000000 --- a/libs/ardour/midi_stretch.cc +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -MidiStretch::MidiStretch (Session& s, TimeFXRequest& req) - : Filter (s) - , _request (req) -{ -} - -MidiStretch::~MidiStretch () -{ -} - -int -MidiStretch::run (boost::shared_ptr r) -{ - SourceList nsrcs; - char suffix[32]; - - boost::shared_ptr region = boost::dynamic_pointer_cast(r); - if (!region) - return -1; - - /* the name doesn't need to be super-precise, but allow for 2 fractional - digits just to disambiguate close but not identical stretches. - */ - - snprintf (suffix, sizeof (suffix), "@%d", (int) floor (_request.time_fraction * 100.0f)); - - string new_name = region->name(); - string::size_type at = new_name.find ('@'); - - // remove any existing stretch indicator - - if (at != string::npos && at > 2) { - new_name = new_name.substr (0, at - 1); - } - - new_name += suffix; - - /* create new sources */ - - if (make_new_sources (region, nsrcs, suffix)) - return -1; - - // FIXME: how to make a whole file region if it isn't? - //assert(region->whole_file()); - - boost::shared_ptr src = region->midi_source(0); - src->load_model(); - - boost::shared_ptr old_model = src->model(); - - boost::shared_ptr new_src = boost::dynamic_pointer_cast(nsrcs[0]); - assert(new_src); - - boost::shared_ptr new_model = new_src->model(); - new_model->start_write(); - - for (MidiModel::const_iterator i = old_model->begin(); i != old_model->end(); ++i) { - const double new_time = i->time() * _request.time_fraction; - - // FIXME: double copy - MIDI::Event ev = MIDI::Event(*i, true); - ev.time() = new_time; - new_model->append(ev); - } - - new_model->end_write(); - new_model->set_edited(true); - - const int ret = finish (region, nsrcs, new_name); - - results[0]->set_length((nframes_t) floor (r->length() * _request.time_fraction), NULL); - - return ret; -} - diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc deleted file mode 100644 index 1000e68ba6..0000000000 --- a/libs/ardour/midi_track.cc +++ /dev/null @@ -1,769 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - By Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mode) - : Track (sess, name, flag, mode, DataType::MIDI) - , _immediate_events(1024) // FIXME: size? - , _note_mode(Sustained) -{ - MidiDiskstream::Flag dflags = MidiDiskstream::Flag (0); - - if (_flags & Hidden) { - dflags = MidiDiskstream::Flag (dflags | MidiDiskstream::Hidden); - } else { - dflags = MidiDiskstream::Flag (dflags | MidiDiskstream::Recordable); - } - - assert(mode != Destructive); - - boost::shared_ptr ds (new MidiDiskstream (_session, name, dflags)); - _session.add_diskstream (ds); - - set_diskstream (boost::dynamic_pointer_cast (ds)); - - _declickable = true; - _freeze_record.state = NoFreeze; - _saved_meter_point = _meter_point; - _mode = mode; - - set_input_minimum(ChanCount(DataType::MIDI, 1)); - set_input_maximum(ChanCount(DataType::MIDI, 1)); - set_output_minimum(ChanCount(DataType::MIDI, 1)); - set_output_maximum(ChanCount(DataType::MIDI, 1)); - - PortCountChanged(ChanCount(DataType::MIDI, 2)); /* EMIT SIGNAL */ -} - -MidiTrack::MidiTrack (Session& sess, const XMLNode& node) - : Track (sess, node) - , _immediate_events(1024) // FIXME: size? - , _note_mode(Sustained) -{ - _set_state(node, false); - - set_input_minimum(ChanCount(DataType::MIDI, 1)); - set_input_maximum(ChanCount(DataType::MIDI, 1)); - set_output_minimum(ChanCount(DataType::MIDI, 1)); - set_output_maximum(ChanCount(DataType::MIDI, 1)); - - PortCountChanged(ChanCount(DataType::MIDI, 2)); /* EMIT SIGNAL */ -} - -MidiTrack::~MidiTrack () -{ -} - - -int -MidiTrack::set_diskstream (boost::shared_ptr ds) -{ - _diskstream = ds; - _diskstream->set_io (*this); - _diskstream->set_destructive (_mode == Destructive); - - _diskstream->set_record_enabled (false); - //_diskstream->monitor_input (false); - - ic_connection.disconnect(); - ic_connection = input_changed.connect (mem_fun (*_diskstream, &MidiDiskstream::handle_input_change)); - - DiskstreamChanged (); /* EMIT SIGNAL */ - - return 0; -} - -int -MidiTrack::use_diskstream (string name) -{ - boost::shared_ptr dstream; - - if ((dstream = boost::dynamic_pointer_cast(_session.diskstream_by_name (name))) == 0) { - error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), name) << endmsg; - return -1; - } - - return set_diskstream (dstream); -} - -int -MidiTrack::use_diskstream (const PBD::ID& id) -{ - boost::shared_ptr dstream; - - if ((dstream = boost::dynamic_pointer_cast (_session.diskstream_by_id (id))) == 0) { - error << string_compose(_("MidiTrack: midi diskstream \"%1\" not known by session"), id) << endmsg; - return -1; - } - - return set_diskstream (dstream); -} - -boost::shared_ptr -MidiTrack::midi_diskstream() const -{ - return boost::dynamic_pointer_cast(_diskstream); -} - -int -MidiTrack::set_state (const XMLNode& node) -{ - return _set_state (node, true); -} - -int -MidiTrack::_set_state (const XMLNode& node, bool call_base) -{ - const XMLProperty *prop; - XMLNodeConstIterator iter; - - if (Route::_set_state (node, call_base)) { - return -1; - } - - // No destructive MIDI tracks (yet?) - _mode = Normal; - - if ((prop = node.property (X_("note-mode"))) != 0) { - _note_mode = NoteMode (string_2_enum (prop->value(), _note_mode)); - } else { - _note_mode = Sustained; - } - - if ((prop = node.property ("diskstream-id")) == 0) { - - /* some old sessions use the diskstream name rather than the ID */ - - if ((prop = node.property ("diskstream")) == 0) { - fatal << _("programming error: MidiTrack given state without diskstream!") << endmsg; - /*NOTREACHED*/ - return -1; - } - - if (use_diskstream (prop->value())) { - return -1; - } - - } else { - - PBD::ID id (prop->value()); - - if (use_diskstream (id)) { - return -1; - } - } - - - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLNode *child; - - nlist = node.children(); - for (niter = nlist.begin(); niter != nlist.end(); ++niter){ - child = *niter; - - if (child->name() == X_("recenable")) { - _rec_enable_control->set_state (*child); - _session.add_controllable (_rec_enable_control); - } - } - - pending_state = const_cast (&node); - - _session.StateReady.connect (mem_fun (*this, &MidiTrack::set_state_part_two)); - - return 0; -} - -XMLNode& -MidiTrack::state(bool full_state) -{ - XMLNode& root (Route::state(full_state)); - XMLNode* freeze_node; - char buf[64]; - - if (_freeze_record.playlist) { - XMLNode* inode; - - freeze_node = new XMLNode (X_("freeze-info")); - freeze_node->add_property ("playlist", _freeze_record.playlist->name()); - freeze_node->add_property ("state", enum_2_string (_freeze_record.state)); - - for (vector::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) { - inode = new XMLNode (X_("processor")); - (*i)->id.print (buf, sizeof(buf)); - inode->add_property (X_("id"), buf); - inode->add_child_copy ((*i)->state); - - freeze_node->add_child_nocopy (*inode); - } - - root.add_child_nocopy (*freeze_node); - } - - /* Alignment: act as a proxy for the diskstream */ - - XMLNode* align_node = new XMLNode (X_("alignment")); - AlignStyle as = _diskstream->alignment_style (); - align_node->add_property (X_("style"), enum_2_string (as)); - root.add_child_nocopy (*align_node); - - root.add_property (X_("note-mode"), enum_2_string (_note_mode)); - - /* we don't return diskstream state because we don't - own the diskstream exclusively. control of the diskstream - state is ceded to the Session, even if we create the - diskstream. - */ - - _diskstream->id().print (buf, sizeof(buf)); - root.add_property ("diskstream-id", buf); - - root.add_child_nocopy (_rec_enable_control->get_state()); - - return root; -} - -void -MidiTrack::set_state_part_two () -{ - XMLNode* fnode; - XMLProperty* prop; - LocaleGuard lg (X_("POSIX")); - - /* This is called after all session state has been restored but before - have been made ports and connections are established. - */ - - if (pending_state == 0) { - return; - } - - if ((fnode = find_named_node (*pending_state, X_("freeze-info"))) != 0) { - - - _freeze_record.have_mementos = false; - _freeze_record.state = Frozen; - - for (vector::iterator i = _freeze_record.processor_info.begin(); i != _freeze_record.processor_info.end(); ++i) { - delete *i; - } - _freeze_record.processor_info.clear (); - - if ((prop = fnode->property (X_("playlist"))) != 0) { - boost::shared_ptr pl = _session.playlist_by_name (prop->value()); - if (pl) { - _freeze_record.playlist = boost::dynamic_pointer_cast (pl); - } else { - _freeze_record.playlist.reset(); - _freeze_record.state = NoFreeze; - return; - } - } - - if ((prop = fnode->property (X_("state"))) != 0) { - _freeze_record.state = FreezeState (string_2_enum (prop->value(), _freeze_record.state)); - } - - XMLNodeConstIterator citer; - XMLNodeList clist = fnode->children(); - - for (citer = clist.begin(); citer != clist.end(); ++citer) { - if ((*citer)->name() != X_("processor")) { - continue; - } - - if ((prop = (*citer)->property (X_("id"))) == 0) { - continue; - } - - FreezeRecordProcessorInfo* frii = new FreezeRecordProcessorInfo (*((*citer)->children().front()), - boost::shared_ptr()); - frii->id = prop->value (); - _freeze_record.processor_info.push_back (frii); - } - } - - /* Alignment: act as a proxy for the diskstream */ - - if ((fnode = find_named_node (*pending_state, X_("alignment"))) != 0) { - - if ((prop = fnode->property (X_("style"))) != 0) { - - /* fix for older sessions from before EnumWriter */ - - string pstr; - - if (prop->value() == "capture") { - pstr = "CaptureTime"; - } else if (prop->value() == "existing") { - pstr = "ExistingMaterial"; - } else { - pstr = prop->value(); - } - - AlignStyle as = AlignStyle (string_2_enum (pstr, as)); - _diskstream->set_persistent_align_style (as); - } - } - return; -} - -int -MidiTrack::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, - bool session_state_changing, bool can_record, bool rec_monitors_input) -{ - if (n_outputs().n_midi() == 0) { - return 0; - } - - if (!_active) { - silence (nframes, offset); - } - - if (session_state_changing) { - - /* XXX is this safe to do against transport state changes? */ - - passthru_silence (start_frame, end_frame, nframes, offset, 0, false); - return 0; - } - - midi_diskstream()->check_record_status (start_frame, nframes, can_record); - - bool send_silence; - - if (_have_internal_generator) { - /* since the instrument has no input streams, - there is no reason to send any signal - into the route. - */ - send_silence = true; - } else { - - if (Config->get_auto_input()) { - if (Config->get_monitoring_model() == SoftwareMonitoring) { - send_silence = false; - } else { - send_silence = true; - } - } else { - if (_diskstream->record_enabled()) { - if (Config->get_monitoring_model() == SoftwareMonitoring) { - send_silence = false; - } else { - send_silence = true; - } - } else { - send_silence = true; - } - } - } - - apply_gain_automation = false; - - if (send_silence) { - - /* if we're sending silence, but we want the meters to show levels for the signal, - meter right here. - */ - - if (_have_internal_generator) { - passthru_silence (start_frame, end_frame, nframes, offset, 0, true); - } else { - if (_meter_point == MeterInput) { - just_meter_input (start_frame, end_frame, nframes, offset); - } - passthru_silence (start_frame, end_frame, nframes, offset, 0, false); - } - - } else { - - /* we're sending signal, but we may still want to meter the input. - */ - - passthru (start_frame, end_frame, nframes, offset, 0, (_meter_point == MeterInput)); - } - - return 0; -} - -int -MidiTrack::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, int declick, - bool can_record, bool rec_monitors_input) -{ - int dret; - boost::shared_ptr diskstream = midi_diskstream(); - - { - Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); - if (lm.locked()) { - // automation snapshot can also be called from the non-rt context - // and it uses the redirect list, so we take the lock out here - automation_snapshot (start_frame); - } - } - - if (n_outputs().n_total() == 0 && _processors.empty()) { - return 0; - } - - if (!_active) { - silence (nframes, offset); - return 0; - } - - nframes_t transport_frame = _session.transport_frame(); - - if ((nframes = check_initial_delay (nframes, offset, transport_frame)) == 0) { - /* need to do this so that the diskstream sets its - playback distance to zero, thus causing diskstream::commit - to do nothing. - */ - return diskstream->process (transport_frame, 0, 0, can_record, rec_monitors_input); - } - - _silent = false; - - if ((dret = diskstream->process (transport_frame, nframes, offset, can_record, rec_monitors_input)) != 0) { - - silence (nframes, offset); - - return dret; - } - - /* special condition applies */ - - if (_meter_point == MeterInput) { - just_meter_input (start_frame, end_frame, nframes, offset); - } - - if (diskstream->record_enabled() && !can_record && !Config->get_auto_input()) { - - /* not actually recording, but we want to hear the input material anyway, - at least potentially (depending on monitoring options) - */ - - passthru (start_frame, end_frame, nframes, offset, 0, true); - - } else { - /* - XXX is it true that the earlier test on n_outputs() - means that we can avoid checking it again here? i think - so, because changing the i/o configuration of an IO - requires holding the AudioEngine lock, which we hold - while in the process() tree. - */ - - - /* copy the diskstream data to all output buffers */ - - //const size_t limit = n_process_buffers().n_audio(); - BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers()); - - diskstream->get_playback(bufs.get_midi(0), start_frame, end_frame); - - process_output_buffers (bufs, start_frame, end_frame, nframes, offset, - (!_session.get_record_enabled() || !Config->get_do_not_record_plugins()), declick, (_meter_point != MeterInput)); - - } - - return 0; -} - -int -MidiTrack::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, - bool can_record, bool rec_monitors_input) -{ - if (n_outputs().n_midi() == 0 && _processors.empty()) { - return 0; - } - - if (!_active) { - silence (nframes, offset); - return 0; - } - - _silent = true; - apply_gain_automation = false; - - silence (nframes, offset); - - return midi_diskstream()->process (_session.transport_frame() + offset, nframes, offset, can_record, rec_monitors_input); -} - -void -MidiTrack::process_output_buffers (BufferSet& bufs, - nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset, bool with_processors, int declick, - bool meter) -{ - /* There's no such thing as a MIDI bus for the time being. - * We'll do all the MIDI route work here for now, but the long-term goal is to have - * Route::process_output_buffers handle everything */ - - if (meter && (_meter_point == MeterInput || _meter_point == MeterPreFader)) { - _meter->run_in_place(bufs, start_frame, end_frame, nframes, offset); - } - - // Run all processors - if (with_processors) { - Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK); - if (rm.locked()) { - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - (*i)->run_in_place (bufs, start_frame, end_frame, nframes, offset); - } - } - } - - if (meter && (_meter_point == MeterPostFader)) { - _meter->run_in_place(bufs, start_frame, end_frame, nframes, offset); - } - - // Main output stage - if (muted()) { - IO::silence(nframes, offset); - } else { - - // Write 'automation' controllers (e.g. CC events from a UI slider) - write_controller_messages(bufs.get_midi(0), start_frame, end_frame, nframes, offset); - - deliver_output(bufs, start_frame, end_frame, nframes, offset); - } -} - -void -MidiTrack::write_controller_messages(MidiBuffer& output_buf, nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset) -{ -#if 0 - BufferSet& mix_buffers = _session.get_mix_buffers(ChanCount(DataType::MIDI, 2)); - - /* FIXME: this could be more realtimey */ - - // Write immediate events (UI controls) - MidiBuffer& cc_buf = mix_buffers.get_midi(0); - cc_buf.silence(nframes, offset); - - uint8_t buf[3]; // CC = 3 bytes - buf[0] = MIDI_CMD_CONTROL; - MIDI::Event ev(0, 3, buf, false); - - // Write track controller automation - // This now lives in MidiModel. Any need for track automation like this? - // Relative Velocity? - if (_session.transport_rolling()) { - for (Controls::const_iterator i = _controls.begin(); i != _controls.end(); ++i) { - const boost::shared_ptr list = (*i).second->list(); - - if ( (!list->automation_playback()) - || (list->parameter().type() != MidiCCAutomation)) - continue; - - double start = start_frame; - double x, y; - while ((*i).second->list()->rt_safe_earliest_event(start, end_frame, x, y)) { - assert(x >= start_frame); - assert(x <= end_frame); - - const nframes_t stamp = (nframes_t)floor(x - start_frame); - assert(stamp < nframes); - - assert(y >= 0.0); - assert(y <= 127.0); - - ev.time() = stamp; - ev.buffer()[1] = (uint8_t)list->parameter().id(); - ev.buffer()[2] = (uint8_t)y; - - cc_buf.push_back(ev); - - start = x + 1; // FIXME? maybe? - } - } - } - - /* FIXME: too much copying! */ - - // Merge cc buf into output - if (cc_buf.size() > 0) { - - // Both CC and route, must merge - if (output_buf.size() > 0) { - - MidiBuffer& mix_buf = mix_buffers.get_midi(1); - mix_buf.merge(output_buf, cc_buf); - output_buf.copy(mix_buf); - - } else { - output_buf.copy(cc_buf); - } - } -#endif - - // Append immediate events (UI controls) - _immediate_events.read(output_buf, 0, 0, offset + nframes-1); // all stamps = 0 -} - -int -MidiTrack::export_stuff (BufferSet& bufs, nframes_t nframes, nframes_t end_frame) -{ - return -1; -} - -void -MidiTrack::set_latency_delay (nframes_t longest_session_latency) -{ - Route::set_latency_delay (longest_session_latency); - _diskstream->set_roll_delay (_roll_delay); -} - -void -MidiTrack::bounce (InterThreadInfo& itt) -{ - throw; - //vector srcs; - //_session.write_one_midi_track (*this, 0, _session.current_end_frame(), false, srcs, itt); -} - - -void -MidiTrack::bounce_range (nframes_t start, nframes_t end, InterThreadInfo& itt) -{ - throw; - //vector srcs; - //_session.write_one_midi_track (*this, start, end, false, srcs, itt); -} - -void -MidiTrack::freeze (InterThreadInfo& itt) -{ -} - -void -MidiTrack::unfreeze () -{ - _freeze_record.state = UnFrozen; - FreezeChange (); /* EMIT SIGNAL */ -} - -void -MidiTrack::set_note_mode (NoteMode m) -{ - cout << _name << " SET NOTE MODE " << m << endl; - _note_mode = m; - midi_diskstream()->set_note_mode(m); -} - -void -MidiTrack::midi_panic() -{ - for (uint8_t channel = 0; channel <= 0xF; channel++) { - uint8_t ev[3] = { MIDI_CMD_CONTROL | channel, MIDI_CTL_SUSTAIN, 0 }; - write_immediate_event(3, ev); - ev[1] = MIDI_CTL_ALL_NOTES_OFF; - write_immediate_event(3, ev); - ev[1] = MIDI_CTL_RESET_CONTROLLERS; - write_immediate_event(3, ev); - } -} - -/** \return true on success, false on failure (no buffer space left) - */ -bool -MidiTrack::write_immediate_event(size_t size, const uint8_t* buf) -{ - printf("Write immediate event: "); - for (size_t i=0; i < size; ++i) { - printf("%X ", buf[i]); - } - printf("\n"); - return (_immediate_events.write(0, size, buf) == size); -} - -void -MidiTrack::MidiControl::set_value(float val) -{ - assert(val >= _list->parameter().min()); - assert(val <= _list->parameter().max()); - size_t size = 3; - - if ( ! _list->automation_playback()) { - uint8_t ev[3] = { _list->parameter().channel(), int(val), 0.0 }; - switch(_list->parameter().type()) { - case MidiCCAutomation: - ev[0] += MIDI_CMD_CONTROL; - ev[1] = _list->parameter().id(); - ev[2] = int(val); - break; - - case MidiPgmChangeAutomation: - size = 2; - ev[0] += MIDI_CMD_PGM_CHANGE; - ev[1] = int(val); - break; - - case MidiChannelAftertouchAutomation: - size = 2; - ev[0] += MIDI_CMD_CHANNEL_PRESSURE; - ev[1] = int(val); - break; - - case MidiPitchBenderAutomation: - ev[0] += MIDI_CMD_BENDER; - ev[1] = 0x7F & int(val); - ev[2] = 0x7F & (int(val) >> 7); - break; - - default: - assert(false); - } - _route->write_immediate_event(size, ev); - } - - AutomationControl::set_value(val); -} - diff --git a/libs/ardour/mix.cc b/libs/ardour/mix.cc deleted file mode 100644 index 726d375453..0000000000 --- a/libs/ardour/mix.cc +++ /dev/null @@ -1,176 +0,0 @@ -/* - Copyright (C) 2000-2005 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include - -using namespace ARDOUR; - -#if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS) -// Debug wrappers - -float -debug_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) -{ - if ( ((intptr_t)buf % 16) != 0) { - cerr << "compute_peak(): buffer unaligned!" << endl; - } - - return x86_sse_compute_peak(buf, nsamples, current); -} - -void -debug_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain) -{ - if ( ((intptr_t)buf % 16) != 0) { - cerr << "apply_gain_to_buffer(): buffer unaligned!" << endl; - } - - x86_sse_apply_gain_to_buffer(buf, nframes, gain); -} - -void -debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain) -{ - if ( ((intptr_t)dst & 15) != 0) { - cerr << "mix_buffers_with_gain(): dst unaligned!" << endl; - } - - if ( ((intptr_t)dst & 15) != ((intptr_t)src & 15) ) { - cerr << "mix_buffers_with_gain(): dst & src don't have the same alignment!" << endl; - mix_buffers_with_gain(dst, src, nframes, gain); - } else { - x86_sse_mix_buffers_with_gain(dst, src, nframes, gain); - } -} - -void -debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes) -{ - if ( ((intptr_t)dst & 15) != 0) { - cerr << "mix_buffers_no_gain(): dst unaligned!" << endl; - } - - if ( ((intptr_t)dst & 15) != ((intptr_t)src & 15) ) { - cerr << "mix_buffers_no_gain(): dst & src don't have the same alignment!" << endl; - mix_buffers_no_gain(dst, src, nframes); - } else { - x86_sse_mix_buffers_no_gain(dst, src, nframes); - } -} - -#endif - - -float -default_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current) -{ - for (nframes_t i = 0; i < nsamples; ++i) { - current = f_max (current, fabsf (buf[i])); - } - - return current; -} - -void -default_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max) -{ - nframes_t i; - float a, b; - - a = *max; - b = *min; - - for (i = 0; i < nframes; i++) - { - a = fmax (buf[i], a); - b = fmin (buf[i], b); - } - - *max = a; - *min = b; -} - -void -default_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain) -{ - for (nframes_t i=0; i - -float -veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current) -{ - float tmpmax = 0.0f; - vDSP_maxmgv(buf, 1, &tmpmax, nsamples); - return f_max(current, tmpmax); -} - -void -veclib_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max) -{ - vDSP_maxv (const_cast(buf), 1, max, nframes); - vDSP_minv (const_cast(buf), 1, min, nframes); -} - -void -veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain) -{ - vDSP_vsmul(buf, 1, &gain, buf, 1, nframes); -} - -void -veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain) -{ - vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes); -} - -void -veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes) -{ - // It seems that a vector mult only operation does not exist... - float gain = 1.0f; - vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes); -} - -#endif - - diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc deleted file mode 100644 index 0a0fbc1529..0000000000 --- a/libs/ardour/mtc_slave.cc +++ /dev/null @@ -1,357 +0,0 @@ -/* - Copyright (C) 2002-4 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace sigc; -using namespace MIDI; -using namespace PBD; - -MTC_Slave::MTC_Slave (Session& s, MIDI::Port& p) - : session (s) -{ - can_notify_on_unknown_rate = true; - - rebind (p); - reset (); -} - -MTC_Slave::~MTC_Slave() -{ -} - -void -MTC_Slave::rebind (MIDI::Port& p) -{ - for (vector::iterator i = connections.begin(); i != connections.end(); ++i) { - (*i).disconnect (); - } - - port = &p; - - connections.push_back (port->input()->mtc_time.connect (mem_fun (*this, &MTC_Slave::update_mtc_time))); - connections.push_back (port->input()->mtc_qtr.connect (mem_fun (*this, &MTC_Slave::update_mtc_qtr))); - connections.push_back (port->input()->mtc_status.connect (mem_fun (*this, &MTC_Slave::update_mtc_status))); -} - -void -MTC_Slave::update_mtc_qtr (Parser& p) -{ - cycles_t cnow = get_cycles (); - nframes_t now = session.engine().frame_time(); - nframes_t qtr; - static cycles_t last_qtr = 0; - - qtr = (long) (session.frames_per_smpte_frame() / 4); - mtc_frame += qtr; - last_qtr = cnow; - - current.guard1++; - current.position = mtc_frame; - current.timestamp = now; - current.guard2++; - - last_inbound_frame = now; -} - -void -MTC_Slave::update_mtc_time (const byte *msg, bool was_full) -{ - nframes_t now = session.engine().frame_time(); - SMPTE::Time smpte; - - smpte.hours = msg[3]; - smpte.minutes = msg[2]; - smpte.seconds = msg[1]; - smpte.frames = msg[0]; - - switch (msg[4]) { - case MTC_24_FPS: - smpte.rate = 24; - smpte.drop = false; - can_notify_on_unknown_rate = true; - break; - case MTC_25_FPS: - smpte.rate = 25; - smpte.drop = false; - can_notify_on_unknown_rate = true; - break; - case MTC_30_FPS_DROP: - smpte.rate = 30; - smpte.drop = true; - can_notify_on_unknown_rate = true; - break; - case MTC_30_FPS: - smpte.rate = 30; - smpte.drop = false; - can_notify_on_unknown_rate = true; - break; - default: - /* throttle error messages about unknown MTC rates */ - if (can_notify_on_unknown_rate) { - error << _("Unknown rate/drop value in incoming MTC stream, session values used instead") << endmsg; - can_notify_on_unknown_rate = false; - } - smpte.rate = session.smpte_frames_per_second(); - smpte.drop = session.smpte_drop_frames(); - } - - session.smpte_to_sample (smpte, mtc_frame, true, false); - - if (was_full) { - - current.guard1++; - current.position = mtc_frame; - current.timestamp = 0; - current.guard2++; - - session.request_locate (mtc_frame, false); - session.request_transport_speed (0); - update_mtc_status (MIDI::Parser::MTC_Stopped); - - reset (); - - } else { - - /* We received the last quarter frame 7 quarter frames (1.75 mtc - frames) after the instance when the contents of the mtc quarter - frames were decided. Add time to compensate for the elapsed 1.75 - frames. - Also compensate for audio latency. - */ - - mtc_frame += (long) (1.75 * session.frames_per_smpte_frame()) + session.worst_output_latency(); - - if (first_mtc_frame == 0) { - first_mtc_frame = mtc_frame; - first_mtc_time = now; - } - - current.guard1++; - current.position = mtc_frame; - current.timestamp = now; - current.guard2++; - } - - last_inbound_frame = now; -} - -void -MTC_Slave::handle_locate (const MIDI::byte* mmc_tc) -{ - MIDI::byte mtc[4]; - - mtc[3] = mmc_tc[0] & 0xf; /* hrs only */ - mtc[2] = mmc_tc[1]; - mtc[1] = mmc_tc[2]; - mtc[0] = mmc_tc[3]; - - update_mtc_time (mtc, true); -} - -void -MTC_Slave::update_mtc_status (MIDI::Parser::MTC_Status status) -{ - - switch (status) { - case MTC_Stopped: - mtc_speed = 0.0f; - mtc_frame = 0; - - current.guard1++; - current.position = mtc_frame; - current.timestamp = 0; - current.guard2++; - - break; - - case MTC_Forward: - mtc_speed = 0.0f; - mtc_frame = 0; - - current.guard1++; - current.position = mtc_frame; - current.timestamp = 0; - current.guard2++; - - break; - - case MTC_Backward: - mtc_speed = 0.0f; - mtc_frame = 0; - - current.guard1++; - current.position = mtc_frame; - current.timestamp = 0; - current.guard2++; - - break; - } -} - -void -MTC_Slave::read_current (SafeTime *st) const -{ - int tries = 0; - do { - if (tries == 10) { - error << _("MTC Slave: atomic read of current time failed, sleeping!") << endmsg; - usleep (20); - tries = 0; - } - - *st = current; - tries++; - - } while (st->guard1 != st->guard2); -} - -bool -MTC_Slave::locked () const -{ - return port->input()->mtc_locked(); -} - -bool -MTC_Slave::ok() const -{ - return true; -} - -bool -MTC_Slave::speed_and_position (float& speed, nframes_t& pos) -{ - nframes_t now = session.engine().frame_time(); - SafeTime last; - nframes_t frame_rate; - nframes_t elapsed; - float speed_now; - - read_current (&last); - - if (first_mtc_time == 0) { - speed = 0; - pos = last.position; - return true; - } - - /* no timecode for 1/4 second ? conclude that its stopped */ - - if (last_inbound_frame && now > last_inbound_frame && now - last_inbound_frame > session.frame_rate() / 4) { - mtc_speed = 0; - pos = last.position; - session.request_locate (pos, false); - session.request_transport_speed (0); - update_mtc_status (MIDI::Parser::MTC_Stopped); - reset(); - return false; - } - - frame_rate = session.frame_rate(); - - speed_now = (float) ((last.position - first_mtc_frame) / (double) (now - first_mtc_time)); - - accumulator[accumulator_index++] = speed_now; - - if (accumulator_index >= accumulator_size) { - have_first_accumulated_speed = true; - accumulator_index = 0; - } - - if (have_first_accumulated_speed) { - float total = 0; - - for (int32_t i = 0; i < accumulator_size; ++i) { - total += accumulator[i]; - } - - mtc_speed = total / accumulator_size; - - } else { - - mtc_speed = speed_now; - - } - - if (mtc_speed == 0.0f) { - - elapsed = 0; - - } else { - - /* scale elapsed time by the current MTC speed */ - - if (last.timestamp && (now > last.timestamp)) { - elapsed = (nframes_t) floor (mtc_speed * (now - last.timestamp)); - } else { - elapsed = 0; /* XXX is this right? */ - } - } - - /* now add the most recent timecode value plus the estimated elapsed interval */ - - pos = elapsed + last.position; - - speed = mtc_speed; - return true; -} - -ARDOUR::nframes_t -MTC_Slave::resolution() const -{ - return (nframes_t) session.frames_per_smpte_frame(); -} - -void -MTC_Slave::reset () -{ - /* XXX massive thread safety issue here. MTC could - be being updated as we call this. but this - supposed to be a realtime-safe call. - */ - - port->input()->reset_mtc_state (); - - last_inbound_frame = 0; - current.guard1++; - current.position = 0; - current.timestamp = 0; - current.guard2++; - first_mtc_frame = 0; - first_mtc_time = 0; - - accumulator_index = 0; - have_first_accumulated_speed = false; - mtc_speed = 0; -} diff --git a/libs/ardour/named_selection.cc b/libs/ardour/named_selection.cc deleted file mode 100644 index fbb4b748df..0000000000 --- a/libs/ardour/named_selection.cc +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright (C) 2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -sigc::signal NamedSelection::NamedSelectionCreated; - -typedef std::list > PlaylistList; - -NamedSelection::NamedSelection (string n, PlaylistList& l) - : name (n) -{ - playlists = l; - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - string new_name; - - /* rename playlists to reflect our ownership */ - - new_name = name; - new_name += '/'; - new_name += (*i)->name(); - - (*i)->set_name (new_name); - (*i)->use(); - } - - NamedSelectionCreated (this); -} - -NamedSelection::NamedSelection (Session& session, const XMLNode& node) -{ - XMLNode* lists_node; - const XMLProperty* property; - - if ((property = node.property ("name")) == 0) { - throw failed_constructor(); - } - - name = property->value(); - - if ((lists_node = find_named_node (node, "Playlists")) == 0) { - return; - } - - XMLNodeList nlist = lists_node->children(); - XMLNodeConstIterator niter; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - const XMLNode* plnode; - string playlist_name; - boost::shared_ptr playlist; - - plnode = *niter; - - if ((property = plnode->property ("name")) != 0) { - if ((playlist = session.playlist_by_name (property->value())) != 0) { - playlist->use(); - playlists.push_back (playlist); - } else { - warning << string_compose (_("Chunk %1 uses an unknown playlist \"%2\""), name, property->value()) << endmsg; - } - } else { - error << string_compose (_("Chunk %1 contains misformed playlist information"), name) << endmsg; - throw failed_constructor(); - } - } - - NamedSelectionCreated (this); -} - -NamedSelection::~NamedSelection () -{ - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - (*i)->release (); - (*i)->GoingAway (); - } -} - -int -NamedSelection::set_state (const XMLNode& node) -{ - return 0; -} - -XMLNode& -NamedSelection::get_state () -{ - XMLNode* root = new XMLNode ("NamedSelection"); - XMLNode* child; - - root->add_property ("name", name); - child = root->add_child ("Playlists"); - - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - XMLNode* plnode = new XMLNode ("Playlist"); - - plnode->add_property ("name", (*i)->name()); - child->add_child_nocopy (*plnode); - } - - return *root; -} diff --git a/libs/ardour/note.cc b/libs/ardour/note.cc deleted file mode 100644 index ea1e7133af..0000000000 --- a/libs/ardour/note.cc +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - Author: Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -namespace ARDOUR { - -Note::Note(uint8_t chan, double t, double d, uint8_t n, uint8_t v) - : _on_event(t, 3, NULL, true) - , _off_event(t + d, 3, NULL, true) -{ - assert(chan < 16); - - _on_event.buffer()[0] = MIDI_CMD_NOTE_ON + chan; - _on_event.buffer()[1] = n; - _on_event.buffer()[2] = v; - - _off_event.buffer()[0] = MIDI_CMD_NOTE_OFF + chan; - _off_event.buffer()[1] = n; - _off_event.buffer()[2] = 0x40; - - assert(time() == t); - assert(duration() == d); - assert(note() == n); - assert(velocity() == v); - assert(_on_event.channel() == _off_event.channel()); - assert(channel() == chan); -} - - -Note::Note(const Note& copy) - : _on_event(copy._on_event, true) - , _off_event(copy._off_event, true) -{ - assert(_on_event.buffer()); - assert(_off_event.buffer()); - /* - assert(copy._on_event.size == 3); - _on_event.buffer = _on_event_buffer; - memcpy(_on_event_buffer, copy._on_event_buffer, 3); - - assert(copy._off_event.size == 3); - _off_event.buffer = _off_event_buffer; - memcpy(_off_event_buffer, copy._off_event_buffer, 3); - */ - - assert(time() == copy.time()); - assert(end_time() == copy.end_time()); - assert(note() == copy.note()); - assert(velocity() == copy.velocity()); - assert(duration() == copy.duration()); - assert(_on_event.channel() == _off_event.channel()); - assert(channel() == copy.channel()); -} - -Note::~Note() -{ - std::cerr << "Note::~Note() Note time: " << time() - << " pitch: " << int(note()) - << " duration: " << duration() - << " end-time: " << end_time() - << " velocity: " << int(velocity()) - << std::endl; -} - - -const Note& -Note::operator=(const Note& copy) -{ - _on_event = copy._on_event; - _off_event = copy._off_event; - /*_on_event.time = copy._on_event.time; - assert(copy._on_event.size == 3); - memcpy(_on_event_buffer, copy._on_event_buffer, 3); - - _off_event.time = copy._off_event.time; - assert(copy._off_event.size == 3); - memcpy(_off_event_buffer, copy._off_event_buffer, 3); - */ - - assert(time() == copy.time()); - assert(end_time() == copy.end_time()); - assert(note() == copy.note()); - assert(velocity() == copy.velocity()); - assert(duration() == copy.duration()); - assert(_on_event.channel() == _off_event.channel()); - assert(channel() == copy.channel()); - - return *this; -} - -} // namespace ARDOUR diff --git a/libs/ardour/osc.cc b/libs/ardour/osc.cc deleted file mode 100644 index b0bd35b8c6..0000000000 --- a/libs/ardour/osc.cc +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright (C) 2006 Paul Davis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace sigc; -using namespace std; - -static void error_callback(int num, const char *m, const char *path) -{ -#ifdef DEBUG - fprintf(stderr, "liblo server error %d in path %s: %s\n", num, path, m); -#endif -} - -OSC::OSC (uint32_t port) - : _port(port) -{ - _shutdown = false; - _osc_server = 0; - _osc_unix_server = 0; - _osc_thread = 0; -} - -int -OSC::start () -{ - char tmpstr[255]; - - if (_osc_server) { - /* already started */ - return 0; - } - - for (int j=0; j < 20; ++j) { - snprintf(tmpstr, sizeof(tmpstr), "%d", _port); - - if ((_osc_server = lo_server_new (tmpstr, error_callback))) { - break; - } -#ifdef DEBUG - cerr << "can't get osc at port: " << _port << endl; -#endif - _port++; - continue; - } - -#ifdef ARDOUR_OSC_UNIX_SERVER - - // APPEARS sluggish for now - - // attempt to create unix socket server too - - snprintf(tmpstr, sizeof(tmpstr), "/tmp/sooperlooper_XXXXXX"); - int fd = mkstemp(tmpstr); - - if (fd >= 0 ) { - unlink (tmpstr); - close (fd); - - _osc_unix_server = lo_server_new (tmpstr, error_callback); - - if (_osc_unix_server) { - _osc_unix_socket_path = tmpstr; - } - } -#endif - - cerr << "OSC @ " << get_server_url () << endl; - - sys::path url_file; - - if (find_file_in_search_path (ardour_search_path() + system_config_search_path(), - "osc_url", url_file)) { - _osc_url_file = url_file.to_string(); - ofstream urlfile; - urlfile.open(_osc_url_file.c_str(), ios::trunc); - if ( urlfile ) - { - urlfile << get_server_url () << endl; - urlfile.close(); - } - else - { - cerr << "Couldn't write '" << _osc_url_file << "'" < (arg)->osc_receiver(); - return 0; -} - -void -OSC::osc_receiver() -{ - struct pollfd pfd[3]; - int fds[3]; - lo_server srvs[3]; - int nfds = 0; - int timeout = -1; - int ret; - - fds[0] = _request_pipe[0]; - nfds++; - - if (_osc_server && lo_server_get_socket_fd(_osc_server) >= 0) { - fds[nfds] = lo_server_get_socket_fd(_osc_server); - srvs[nfds] = _osc_server; - nfds++; - } - - if (_osc_unix_server && lo_server_get_socket_fd(_osc_unix_server) >= 0) { - fds[nfds] = lo_server_get_socket_fd(_osc_unix_server); - srvs[nfds] = _osc_unix_server; - nfds++; - } - - - while (!_shutdown) { - - for (int i=0; i < nfds; ++i) { - pfd[i].fd = fds[i]; - pfd[i].events = POLLIN|POLLPRI|POLLHUP|POLLERR; - pfd[i].revents = 0; - } - - again: - //cerr << "poll on " << nfds << " for " << timeout << endl; - if ((ret = poll (pfd, nfds, timeout)) < 0) { - if (errno == EINTR) { - /* gdb at work, perhaps */ - goto again; - } - - cerr << "OSC thread poll failed: " << strerror (errno) << endl; - - break; - } - - //cerr << "poll returned " << ret << " pfd[0].revents = " << pfd[0].revents << " pfd[1].revents = " << pfd[1].revents << endl; - - if (_shutdown) { - break; - } - - if ((pfd[0].revents & ~POLLIN)) { - cerr << "OSC: error polling extra port" << endl; - break; - } - - for (int i=1; i < nfds; ++i) { - if (pfd[i].revents & POLLIN) - { - // this invokes callbacks - //cerr << "invoking recv on " << pfd[i].fd << endl; - lo_server_recv(srvs[i]); - } - } - - } - - //cerr << "SL engine shutdown" << endl; - - if (_osc_server) { - int fd = lo_server_get_socket_fd(_osc_server); - if (fd >=0) { - // hack around - close(fd); - } - lo_server_free (_osc_server); - _osc_server = 0; - } - - if (_osc_unix_server) { - cerr << "freeing unix server" << endl; - lo_server_free (_osc_unix_server); - _osc_unix_server = 0; - } - - close(_request_pipe[0]); - close(_request_pipe[1]); -} - -void -OSC::set_session (Session& s) -{ - session = &s; - session->GoingAway.connect (mem_fun (*this, &OSC::session_going_away)); -} - -void -OSC::session_going_away () -{ - session = 0; -} - -/* path callbacks */ - -int -OSC::current_value (const char *path, const char *types, lo_arg **argv, int argc, void *data, void* user_data) -{ -#if 0 - const char* returl; - - if (argc < 3 || types == 0 || strlen (types) < 3 || types[0] != 's' || types[1] != 's' || types[2] != s) { - return 1; - } - - const char *returl = argv[1]->s; - lo_address addr = find_or_cache_addr (returl); - - const char *retpath = argv[2]->s; - - - if (strcmp (argv[0]->s, "transport_frame")) { - - if (session) { - lo_send (addr, retpath, "i", session->transport_frame()); - } - - } else if (strcmp (argv[0]->s, "transport_speed")) { - - if (session) { - lo_send (addr, retpath, "i", session->transport_frame()); - } - - } else if (strcmp (argv[0]->s, "transport_locked")) { - - if (session) { - lo_send (addr, retpath, "i", session->transport_frame()); - } - - } else if (strcmp (argv[0]->s, "punch_in") { - - if (session) { - lo_send (addr, retpath, "i", session->transport_frame()); - } - - } else if (strcmp (argv[0]->s, "punch_out") { - - if (session) { - lo_send (addr, retpath, "i", session->transport_frame()); - } - - } else if (strcmp (argv[0]->s, "rec_enable") { - - if (session) { - lo_send (addr, retpath, "i", session->transport_frame()); - } - - } else { - - /* error */ - } -#endif - return 0; -} diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc deleted file mode 100644 index ac8e4d05e3..0000000000 --- a/libs/ardour/panner.cc +++ /dev/null @@ -1,1489 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define __STDC_FORMAT_MACROS 1 -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include "i18n.h" - -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -float Panner::current_automation_version_number = 1.0; - -string EqualPowerStereoPanner::name = "Equal Power Stereo"; -string Multi2dPanner::name = "Multiple (2D)"; - -/* this is a default mapper of control values to a pan position - others can be imagined. -*/ - -static pan_t direct_control_to_pan (double fract) { - return fract; -} - -static double direct_pan_to_control (pan_t val) { - return val; -} - -StreamPanner::StreamPanner (Panner& p, Parameter param) - : parent (p) - , _control (new PanControllable(p.session(), X_("panner"), *this, param)) -{ - assert(param.type() != NullAutomation); - - _muted = false; - - parent.session().add_controllable (_control); - - x = 0.5; - y = 0.5; - z = 0.5; -} - -StreamPanner::~StreamPanner () -{ -} - -void -StreamPanner::PanControllable::set_value (float val) -{ - panner.set_position (direct_control_to_pan (val)); -} - -float -StreamPanner::PanControllable::get_value (void) const -{ - float xpos; - panner.get_effective_position (xpos); - return direct_pan_to_control (xpos); -} - -bool -StreamPanner::PanControllable::can_send_feedback () const -{ - AutoState astate = panner.get_parent().automation_state (); - - if ((astate == Play) || (astate == Touch && !panner.get_parent().touching())) { - return true; - } - - return false; -} - -void -StreamPanner::set_muted (bool yn) -{ - if (yn != _muted) { - _muted = yn; - StateChanged (); - } -} - -void -StreamPanner::set_position (float xpos, bool link_call) -{ - if (!link_call && parent.linked()) { - parent.set_position (xpos, *this); - } - - if (x != xpos) { - x = xpos; - update (); - Changed (); - _control->Changed (); - } -} - -void -StreamPanner::set_position (float xpos, float ypos, bool link_call) -{ - if (!link_call && parent.linked()) { - parent.set_position (xpos, ypos, *this); - } - - if (x != xpos || y != ypos) { - - x = xpos; - y = ypos; - update (); - Changed (); - } -} - -void -StreamPanner::set_position (float xpos, float ypos, float zpos, bool link_call) -{ - if (!link_call && parent.linked()) { - parent.set_position (xpos, ypos, zpos, *this); - } - - if (x != xpos || y != ypos || z != zpos) { - x = xpos; - y = ypos; - z = zpos; - update (); - Changed (); - } -} - -int -StreamPanner::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - XMLNodeConstIterator iter; - - if ((prop = node.property (X_("muted")))) { - set_muted (prop->value() == "yes"); - } - - return 0; -} - -void -StreamPanner::add_state (XMLNode& node) -{ - node.add_property (X_("muted"), (muted() ? "yes" : "no")); -} - -/*---------------------------------------------------------------------- */ - -BaseStereoPanner::BaseStereoPanner (Panner& p, Parameter param) - : StreamPanner (p, param) -{ -} - -BaseStereoPanner::~BaseStereoPanner () -{ -} - -int -BaseStereoPanner::load (istream& in, string path, uint32_t& linecnt) -{ - char line[128]; - LocaleGuard lg (X_("POSIX")); - - _control->list()->clear (); - - while (in.getline (line, sizeof (line), '\n')) { - nframes_t when; - double value; - - ++linecnt; - - if (strcmp (line, "end") == 0) { - break; - } - - if (sscanf (line, "%" PRIu32 " %lf", &when, &value) != 2) { - warning << string_compose(_("badly formatted pan automation event record at line %1 of %2 (ignored) [%3]"), linecnt, path, line) << endmsg; - continue; - } - - _control->list()->fast_simple_add (when, value); - } - - /* now that we are done loading */ - - _control->list()->StateChanged (); - - return 0; -} - -void -BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) -{ - assert(obufs.count().n_audio() == 2); - - pan_t delta; - Sample* dst; - pan_t pan; - - if (_muted) { - return; - } - - Sample* const src = srcbuf.data(); - - /* LEFT */ - - dst = obufs.get_audio(0).data(); - - if (fabsf ((delta = (left - desired_left))) > 0.002) { // about 1 degree of arc - - /* interpolate over 64 frames or nframes, whichever is smaller */ - - nframes_t limit = min ((nframes_t)64, nframes); - nframes_t n; - - delta = -(delta / (float) (limit)); - - for (n = 0; n < limit; n++) { - left_interp = left_interp + delta; - left = left_interp + 0.9 * (left - left_interp); - dst[n] += src[n] * left * gain_coeff; - } - - pan = left * gain_coeff; - - mix_buffers_with_gain (dst+n,src+n,nframes-n,pan); - - } else { - - left = desired_left; - left_interp = left; - - if ((pan = (left * gain_coeff)) != 1.0f) { - - if (pan != 0.0f) { - - mix_buffers_with_gain(dst,src,nframes,pan); - - /* mark that we wrote into the buffer */ - - // obufs[0] = 0; - - } - - } else { - - mix_buffers_no_gain(dst,src,nframes); - - /* mark that we wrote into the buffer */ - - // obufs[0] = 0; - } - } - - /* RIGHT */ - - dst = obufs.get_audio(1).data(); - - if (fabsf ((delta = (right - desired_right))) > 0.002) { // about 1 degree of arc - - /* interpolate over 64 frames or nframes, whichever is smaller */ - - nframes_t limit = min ((nframes_t)64, nframes); - nframes_t n; - - delta = -(delta / (float) (limit)); - - for (n = 0; n < limit; n++) { - right_interp = right_interp + delta; - right = right_interp + 0.9 * (right - right_interp); - dst[n] += src[n] * right * gain_coeff; - } - - pan = right * gain_coeff; - - mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); - - /* XXX it would be nice to mark the buffer as written to */ - - } else { - - right = desired_right; - right_interp = right; - - if ((pan = (right * gain_coeff)) != 1.0f) { - - if (pan != 0.0f) { - - mix_buffers_with_gain(dst,src,nframes,pan); - - /* XXX it would be nice to mark the buffer as written to */ - } - - } else { - - mix_buffers_no_gain(dst,src,nframes); - - /* XXX it would be nice to mark the buffer as written to */ - } - } -} - -/*---------------------------------------------------------------------- */ - -EqualPowerStereoPanner::EqualPowerStereoPanner (Panner& p, Parameter param) - : BaseStereoPanner (p, param) -{ - update (); - - left = desired_left; - right = desired_right; - left_interp = left; - right_interp = right; -} - -EqualPowerStereoPanner::~EqualPowerStereoPanner () -{ -} - -void -EqualPowerStereoPanner::update () -{ - /* it would be very nice to split this out into a virtual function - that can be accessed from BaseStereoPanner and used in distribute_automated(). - - but the place where its used in distribute_automated() is a tight inner loop, - and making "nframes" virtual function calls to compute values is an absurd - overhead. - */ - - /* x == 0 => hard left - x == 1 => hard right - */ - - float panR = x; - float panL = 1 - panR; - - const float pan_law_attenuation = -3.0f; - const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f); - - desired_left = panL * (scale * panL + 1.0f - scale); - desired_right = panR * (scale * panR + 1.0f - scale); - - effective_x = x; - _control->set_value(x); -} - -void -EqualPowerStereoPanner::distribute_automated (AudioBuffer& srcbuf, BufferSet& obufs, - nframes_t start, nframes_t end, nframes_t nframes, - pan_t** buffers) -{ - assert(obufs.count().n_audio() == 2); - - Sample* dst; - pan_t* pbuf; - Sample* const src = srcbuf.data(); - - /* fetch positional data */ - - if (!_control->list()->curve().rt_safe_get_vector (start, end, buffers[0], nframes)) { - /* fallback */ - if (!_muted) { - distribute (srcbuf, obufs, 1.0, nframes); - } - return; - } - - /* store effective pan position. do this even if we are muted */ - - if (nframes > 0) { - effective_x = buffers[0][nframes-1]; - _control->set_value(effective_x); // signal, update UI - } - - if (_muted) { - return; - } - - /* apply pan law to convert positional data into pan coefficients for - each buffer (output) - */ - - const float pan_law_attenuation = -3.0f; - const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f); - - for (nframes_t n = 0; n < nframes; ++n) { - - float panR = buffers[0][n]; - float panL = 1 - panR; - - buffers[0][n] = panL * (scale * panL + 1.0f - scale); - buffers[1][n] = panR * (scale * panR + 1.0f - scale); - } - - /* LEFT */ - - dst = obufs.get_audio(0).data(); - pbuf = buffers[0]; - - for (nframes_t n = 0; n < nframes; ++n) { - dst[n] += src[n] * pbuf[n]; - } - - /* XXX it would be nice to mark the buffer as written to */ - - /* RIGHT */ - - dst = obufs.get_audio(1).data(); - pbuf = buffers[1]; - - for (nframes_t n = 0; n < nframes; ++n) { - dst[n] += src[n] * pbuf[n]; - } - - /* XXX it would be nice to mark the buffer as written to */ -} - -StreamPanner* -EqualPowerStereoPanner::factory (Panner& parent, Parameter param) -{ - return new EqualPowerStereoPanner (parent, param); -} - -XMLNode& -EqualPowerStereoPanner::get_state (void) -{ - return state (true); -} - -XMLNode& -EqualPowerStereoPanner::state (bool full_state) -{ - XMLNode* root = new XMLNode ("StreamPanner"); - char buf[64]; - LocaleGuard lg (X_("POSIX")); - - snprintf (buf, sizeof (buf), "%.12g", x); - root->add_property (X_("x"), buf); - root->add_property (X_("type"), EqualPowerStereoPanner::name); - - XMLNode* autonode = new XMLNode (X_("Automation")); - autonode->add_child_nocopy (_control->list()->state (full_state)); - root->add_child_nocopy (*autonode); - - StreamPanner::add_state (*root); - - root->add_child_nocopy (_control->get_state ()); - - return *root; -} - -int -EqualPowerStereoPanner::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - float pos; - LocaleGuard lg (X_("POSIX")); - - if ((prop = node.property (X_("x")))) { - pos = atof (prop->value().c_str()); - set_position (pos, true); - } - - StreamPanner::set_state (node); - - for (XMLNodeConstIterator iter = node.children().begin(); iter != node.children().end(); ++iter) { - - if ((*iter)->name() == X_("controllable")) { - if ((prop = (*iter)->property("name")) != 0 && prop->value() == "panner") { - _control->set_state (**iter); - } - - } else if ((*iter)->name() == X_("Automation")) { - - _control->list()->set_state (*((*iter)->children().front())); - - if (_control->list()->automation_state() != Off) { - set_position (_control->list()->eval (parent.session().transport_frame())); - } - } - } - - return 0; -} - -/*----------------------------------------------------------------------*/ - -Multi2dPanner::Multi2dPanner (Panner& p, Parameter param) - : StreamPanner (p, param) -{ - update (); -} - -Multi2dPanner::~Multi2dPanner () -{ -} - -void -Multi2dPanner::update () -{ - static const float BIAS = FLT_MIN; - uint32_t i; - uint32_t nouts = parent.outputs.size(); - float dsq[nouts]; - float f, fr; - vector pans; - - f = 0.0f; - - for (i = 0; i < nouts; i++) { - dsq[i] = ((x - parent.outputs[i].x) * (x - parent.outputs[i].x) + (y - parent.outputs[i].y) * (y - parent.outputs[i].y) + BIAS); - if (dsq[i] < 0.0) { - dsq[i] = 0.0; - } - f += dsq[i] * dsq[i]; - } -#ifdef __APPLE__ - // terrible hack to support OSX < 10.3.9 builds - fr = (float) (1.0 / sqrt((double)f)); -#else - fr = 1.0 / sqrtf(f); -#endif - for (i = 0; i < nouts; ++i) { - parent.outputs[i].desired_pan = 1.0f - (dsq[i] * fr); - } - - effective_x = x; - _control->set_value(x); -} - -void -Multi2dPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_coeff, nframes_t nframes) -{ - Sample* dst; - pan_t pan; - vector::iterator o; - uint32_t n; - - if (_muted) { - return; - } - - Sample* const src = srcbuf.data(); - - - for (n = 0, o = parent.outputs.begin(); o != parent.outputs.end(); ++o, ++n) { - - dst = obufs.get_audio(n).data(); - -#ifdef CAN_INTERP - if (fabsf ((delta = (left_interp - desired_left))) > 0.002) { // about 1 degree of arc - - /* interpolate over 64 frames or nframes, whichever is smaller */ - - nframes_t limit = min ((nframes_t)64, nframes); - nframes_t n; - - delta = -(delta / (float) (limit)); - - for (n = 0; n < limit; n++) { - left_interp = left_interp + delta; - left = left_interp + 0.9 * (left - left_interp); - dst[n] += src[n] * left * gain_coeff; - } - - pan = left * gain_coeff; - mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); - - } else { - -#else - pan = (*o).desired_pan; - - if ((pan *= gain_coeff) != 1.0f) { - - if (pan != 0.0f) { - mix_buffers_with_gain(dst,src,nframes,pan); - } - } else { - mix_buffers_no_gain(dst,src,nframes); - } -#endif -#ifdef CAN_INTERP - } -#endif - } - - return; -} - -void -Multi2dPanner::distribute_automated (AudioBuffer& src, BufferSet& obufs, - nframes_t start, nframes_t end, nframes_t nframes, - pan_t** buffers) -{ - if (_muted) { - return; - } - - /* what ? */ - - return; -} - -StreamPanner* -Multi2dPanner::factory (Panner& p, Parameter param) -{ - return new Multi2dPanner (p, param); -} - -int -Multi2dPanner::load (istream& in, string path, uint32_t& linecnt) -{ - return 0; -} - -XMLNode& -Multi2dPanner::get_state (void) -{ - return state (true); -} - -XMLNode& -Multi2dPanner::state (bool full_state) -{ - XMLNode* root = new XMLNode ("StreamPanner"); - char buf[64]; - LocaleGuard lg (X_("POSIX")); - - snprintf (buf, sizeof (buf), "%.12g", x); - root->add_property (X_("x"), buf); - snprintf (buf, sizeof (buf), "%.12g", y); - root->add_property (X_("y"), buf); - root->add_property (X_("type"), Multi2dPanner::name); - - /* XXX no meaningful automation yet */ - - return *root; -} - -int -Multi2dPanner::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - float newx,newy; - LocaleGuard lg (X_("POSIX")); - - newx = -1; - newy = -1; - - if ((prop = node.property (X_("x")))) { - newx = atof (prop->value().c_str()); - } - - if ((prop = node.property (X_("y")))) { - newy = atof (prop->value().c_str()); - } - - if (x < 0 || y < 0) { - error << _("badly-formed positional data for Multi2dPanner - ignored") - << endmsg; - return -1; - } - - set_position (newx, newy); - return 0; -} - -/*---------------------------------------------------------------------- */ - -Panner::Panner (string name, Session& s) - : _session (s) -{ - set_name (name); - - _linked = false; - _link_direction = SameDirection; - _bypassed = false; -} - -Panner::~Panner () -{ -} - -void -Panner::set_linked (bool yn) -{ - if (yn != _linked) { - _linked = yn; - _session.set_dirty (); - LinkStateChanged (); /* EMIT SIGNAL */ - } -} - -void -Panner::set_link_direction (LinkDirection ld) -{ - if (ld != _link_direction) { - _link_direction = ld; - _session.set_dirty (); - LinkStateChanged (); /* EMIT SIGNAL */ - } -} - -void -Panner::set_bypassed (bool yn) -{ - if (yn != _bypassed) { - _bypassed = yn; - StateChanged (); - } -} - - -void -Panner::reset (uint32_t nouts, uint32_t npans) -{ - uint32_t n; - bool changed = false; - - if (nouts < 2 || (nouts == outputs.size() && npans == size())) { - return; - } - - n = size(); - clear (); - - if (n != npans) { - changed = true; - } - - n = outputs.size(); - outputs.clear (); - - if (n != nouts) { - changed = true; - } - - switch (nouts) { - case 0: - break; - - case 1: - fatal << _("programming error:") - << X_("Panner::reset() called with a single output") - << endmsg; - /*NOTREACHED*/ - break; - - case 2: - /* line */ - outputs.push_back (Output (0, 0)); - outputs.push_back (Output (1.0, 0)); - - for (n = 0; n < npans; ++n) { - push_back (new EqualPowerStereoPanner (*this, Parameter(PanAutomation, n))); - } - break; - - case 3: // triangle - outputs.push_back (Output (0.5, 0)); - outputs.push_back (Output (0, 1.0)); - outputs.push_back (Output (1.0, 1.0)); - - for (n = 0; n < npans; ++n) { - push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n))); - } - - break; - - case 4: // square - outputs.push_back (Output (0, 0)); - outputs.push_back (Output (1.0, 0)); - outputs.push_back (Output (1.0, 1.0)); - outputs.push_back (Output (0, 1.0)); - - for (n = 0; n < npans; ++n) { - push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n))); - } - - break; - - case 5: //square+offcenter center - outputs.push_back (Output (0, 0)); - outputs.push_back (Output (1.0, 0)); - outputs.push_back (Output (1.0, 1.0)); - outputs.push_back (Output (0, 1.0)); - outputs.push_back (Output (0.5, 0.75)); - - for (n = 0; n < npans; ++n) { - push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n))); - } - - break; - - default: - /* XXX horrible placement. FIXME */ - for (n = 0; n < nouts; ++n) { - outputs.push_back (Output (0.1 * n, 0.1 * n)); - } - - for (n = 0; n < npans; ++n) { - push_back (new Multi2dPanner (*this, Parameter(PanAutomation, n))); - } - - break; - } - - for (iterator x = begin(); x != end(); ++x) { - (*x)->update (); - } - - /* force hard left/right panning in a common case: 2in/2out - */ - - if (npans == 2 && outputs.size() == 2) { - - /* Do this only if we changed configuration, or our configuration - appears to be the default set up (center). - */ - - float left; - float right; - - front()->get_position (left); - back()->get_position (right); - - if (changed || ((left == 0.5) && (right == 0.5))) { - - front()->set_position (0.0); - front()->pan_control()->list()->reset_default (0.0); - - back()->set_position (1.0); - back()->pan_control()->list()->reset_default (1.0); - - changed = true; - } - } - - if (changed) { - Changed (); /* EMIT SIGNAL */ - } - - return; -} - -void -Panner::remove (uint32_t which) -{ - vector::iterator i; - for (i = begin(); i != end() && which; ++i, --which); - - if (i != end()) { - delete *i; - erase (i); - } -} - -void -Panner::clear () -{ - for (vector::iterator i = begin(); i != end(); ++i) { - delete *i; - } - - vector::clear (); -} - -void -Panner::set_automation_style (AutoStyle style) -{ - for (vector::iterator i = begin(); i != end(); ++i) { - (*i)->pan_control()->list()->set_automation_style (style); - } - _session.set_dirty (); -} - -void -Panner::set_automation_state (AutoState state) -{ - for (vector::iterator i = begin(); i != end(); ++i) { - (*i)->pan_control()->list()->set_automation_state (state); - } - _session.set_dirty (); -} - -AutoState -Panner::automation_state () const -{ - if (!empty()) { - return front()->pan_control()->list()->automation_state (); - } else { - return Off; - } -} - -AutoStyle -Panner::automation_style () const -{ - if (!empty()) { - return front()->pan_control()->list()->automation_style (); - } else { - return Absolute; - } -} - -void -Panner::transport_stopped (nframes_t frame) -{ - for (vector::iterator i = begin(); i != end(); ++i) { - (*i)->pan_control()->list()->reposition_for_rt_add (frame); - } -} - -void -Panner::snapshot (nframes_t now) -{ - for (vector::iterator i = begin(); i != end(); ++i) { - boost::shared_ptr list = (*i)->pan_control()->list(); - if (list->automation_write()) - list->rt_add(now, (*i)->pan_control()->get_value()); - } -} - -void -Panner::clear_automation () -{ - for (vector::iterator i = begin(); i != end(); ++i) { - (*i)->pan_control()->list()->clear (); - } - _session.set_dirty (); -} - -struct PanPlugins { - string name; - uint32_t nouts; - StreamPanner* (*factory)(Panner&, Parameter); -}; - -PanPlugins pan_plugins[] = { - { EqualPowerStereoPanner::name, 2, EqualPowerStereoPanner::factory }, - { Multi2dPanner::name, 3, Multi2dPanner::factory }, - { string (""), 0, 0 } -}; - -XMLNode& -Panner::get_state (void) -{ - return state (true); -} - -XMLNode& -Panner::state (bool full) -{ - XMLNode* root = new XMLNode (X_("Panner")); - char buf[32]; - - root->add_property (X_("linked"), (_linked ? "yes" : "no")); - root->add_property (X_("link_direction"), enum_2_string (_link_direction)); - root->add_property (X_("bypassed"), (bypassed() ? "yes" : "no")); - - /* add each output */ - - for (vector::iterator o = outputs.begin(); o != outputs.end(); ++o) { - XMLNode* onode = new XMLNode (X_("Output")); - snprintf (buf, sizeof (buf), "%.12g", (*o).x); - onode->add_property (X_("x"), buf); - snprintf (buf, sizeof (buf), "%.12g", (*o).y); - onode->add_property (X_("y"), buf); - root->add_child_nocopy (*onode); - } - - for (vector::const_iterator i = begin(); i != end(); ++i) { - root->add_child_nocopy ((*i)->state (full)); - } - - return *root; -} - -int -Panner::set_state (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - const XMLProperty *prop; - uint32_t i; - StreamPanner* sp; - LocaleGuard lg (X_("POSIX")); - - clear (); - outputs.clear (); - - if ((prop = node.property (X_("linked"))) != 0) { - set_linked (prop->value() == "yes"); - } - - - if ((prop = node.property (X_("bypassed"))) != 0) { - set_bypassed (prop->value() == "yes"); - } - - if ((prop = node.property (X_("link_direction"))) != 0) { - LinkDirection ld; /* here to provide type information */ - set_link_direction (LinkDirection (string_2_enum (prop->value(), ld))); - } - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == X_("Output")) { - - float x, y; - - prop = (*niter)->property (X_("x")); - sscanf (prop->value().c_str(), "%g", &x); - - prop = (*niter)->property (X_("y")); - sscanf (prop->value().c_str(), "%g", &y); - - outputs.push_back (Output (x, y)); - } - } - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - if ((*niter)->name() == X_("StreamPanner")) { - - if ((prop = (*niter)->property (X_("type")))) { - - for (i = 0; pan_plugins[i].factory; ++i) { - if (prop->value() == pan_plugins[i].name) { - - - /* note that we assume that all the stream panners - are of the same type. pretty good - assumption, but its still an assumption. - */ - - sp = pan_plugins[i].factory (*this, Parameter(PanAutomation, 0)); - - if (sp->set_state (**niter) == 0) { - push_back (sp); - } - - break; - } - } - - - if (!pan_plugins[i].factory) { - error << string_compose (_("Unknown panner plugin \"%1\" found in pan state - ignored"), - prop->value()) - << endmsg; - } - - } else { - error << _("panner plugin node has no type information!") - << endmsg; - return -1; - } - - } - } - - /* don't try to do old-school automation loading if it wasn't marked as existing */ - - if ((prop = node.property (X_("automation")))) { - - /* automation path is relative */ - - automation_path = _session.automation_dir(); - automation_path += prop->value (); - } - - return 0; -} - - - -bool -Panner::touching () const -{ - for (vector::const_iterator i = begin(); i != end(); ++i) { - if ((*i)->pan_control()->list()->touching ()) { - return true; - } - } - - return false; -} - -void -Panner::set_position (float xpos, StreamPanner& orig) -{ - float xnow; - float xdelta ; - float xnew; - - orig.get_position (xnow); - xdelta = xpos - xnow; - - if (_link_direction == SameDirection) { - - for (vector::iterator i = begin(); i != end(); ++i) { - if (*i == &orig) { - (*i)->set_position (xpos, true); - } else { - (*i)->get_position (xnow); - xnew = min (1.0f, xnow + xdelta); - xnew = max (0.0f, xnew); - (*i)->set_position (xnew, true); - } - } - - } else { - - for (vector::iterator i = begin(); i != end(); ++i) { - if (*i == &orig) { - (*i)->set_position (xpos, true); - } else { - (*i)->get_position (xnow); - xnew = min (1.0f, xnow - xdelta); - xnew = max (0.0f, xnew); - (*i)->set_position (xnew, true); - } - } - } -} - -void -Panner::set_position (float xpos, float ypos, StreamPanner& orig) -{ - float xnow, ynow; - float xdelta, ydelta; - float xnew, ynew; - - orig.get_position (xnow, ynow); - xdelta = xpos - xnow; - ydelta = ypos - ynow; - - if (_link_direction == SameDirection) { - - for (vector::iterator i = begin(); i != end(); ++i) { - if (*i == &orig) { - (*i)->set_position (xpos, ypos, true); - } else { - (*i)->get_position (xnow, ynow); - - xnew = min (1.0f, xnow + xdelta); - xnew = max (0.0f, xnew); - - ynew = min (1.0f, ynow + ydelta); - ynew = max (0.0f, ynew); - - (*i)->set_position (xnew, ynew, true); - } - } - - } else { - - for (vector::iterator i = begin(); i != end(); ++i) { - if (*i == &orig) { - (*i)->set_position (xpos, ypos, true); - } else { - (*i)->get_position (xnow, ynow); - - xnew = min (1.0f, xnow - xdelta); - xnew = max (0.0f, xnew); - - ynew = min (1.0f, ynow - ydelta); - ynew = max (0.0f, ynew); - - (*i)->set_position (xnew, ynew, true); - } - } - } -} - -void -Panner::set_position (float xpos, float ypos, float zpos, StreamPanner& orig) -{ - float xnow, ynow, znow; - float xdelta, ydelta, zdelta; - float xnew, ynew, znew; - - orig.get_position (xnow, ynow, znow); - xdelta = xpos - xnow; - ydelta = ypos - ynow; - zdelta = zpos - znow; - - if (_link_direction == SameDirection) { - - for (vector::iterator i = begin(); i != end(); ++i) { - if (*i == &orig) { - (*i)->set_position (xpos, ypos, zpos, true); - } else { - (*i)->get_position (xnow, ynow, znow); - - xnew = min (1.0f, xnow + xdelta); - xnew = max (0.0f, xnew); - - ynew = min (1.0f, ynow + ydelta); - ynew = max (0.0f, ynew); - - znew = min (1.0f, znow + zdelta); - znew = max (0.0f, znew); - - (*i)->set_position (xnew, ynew, znew, true); - } - } - - } else { - - for (vector::iterator i = begin(); i != end(); ++i) { - if (*i == &orig) { - (*i)->set_position (xpos, ypos, true); - } else { - (*i)->get_position (xnow, ynow, znow); - - xnew = min (1.0f, xnow - xdelta); - xnew = max (0.0f, xnew); - - ynew = min (1.0f, ynow - ydelta); - ynew = max (0.0f, ynew); - - znew = min (1.0f, znow + zdelta); - znew = max (0.0f, znew); - - (*i)->set_position (xnew, ynew, znew, true); - } - } - } -} - -void -Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes_t nframes, nframes_t offset, gain_t gain_coeff) -{ - if (outbufs.count().n_audio() == 0) { - // Don't want to lose audio... - assert(inbufs.count().n_audio() == 0); - return; - } - - // We shouldn't be called in the first place... - assert(!bypassed()); - assert(!empty()); - - - if (outbufs.count().n_audio() == 1) { - - AudioBuffer& dst = outbufs.get_audio(0); - - if (gain_coeff == 0.0f) { - - /* only one output, and gain was zero, so make it silent */ - - dst.silence(offset); - - } else if (gain_coeff == 1.0f){ - - /* mix all buffers into the output */ - - // copy the first - dst.read_from(inbufs.get_audio(0), nframes, offset); - - // accumulate starting with the second - BufferSet::audio_iterator i = inbufs.audio_begin(); - for (++i; i != inbufs.audio_end(); ++i) { - dst.accumulate_from(*i, nframes, offset); - } - - } else { - - /* mix all buffers into the output, scaling them all by the gain */ - - // copy the first - dst.read_from(inbufs.get_audio(0), nframes, offset); - - // accumulate (with gain) starting with the second - BufferSet::audio_iterator i = inbufs.audio_begin(); - for (++i; i != inbufs.audio_end(); ++i) { - dst.accumulate_with_gain_from(*i, nframes, offset, gain_coeff); - } - - } - - return; - } - - /* the terrible silence ... */ - for (BufferSet::audio_iterator i = outbufs.audio_begin(); i != outbufs.audio_end(); ++i) { - i->silence(nframes, offset); - } - - BufferSet::audio_iterator i = inbufs.audio_begin(); - - for (iterator pan = begin(); pan != end() && i != inbufs.audio_end(); ++pan, ++i) { - (*pan)->distribute (*i, outbufs, gain_coeff, nframes); - } -} - -void -Panner::distribute (BufferSet& inbufs, BufferSet& outbufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) -{ - if (outbufs.count().n_audio() == 0) { - // Failing to deliver audio we were asked to deliver is a bug - assert(inbufs.count().n_audio() == 0); - return; - } - - // We shouldn't be called in the first place... - assert(!bypassed()); - assert(!empty()); - - // If we shouldn't play automation defer to distribute_no_automation - if ( !( automation_state() & Play || - ((automation_state() & Touch) && !touching()) ) ) { - - // Speed quietning - gain_t gain_coeff = 1.0; - if (fabsf(_session.transport_speed()) > 1.5f) { - gain_coeff = speed_quietning; - } - - distribute_no_automation(inbufs, outbufs, nframes, offset, gain_coeff); - return; - } - - // Otherwise.. let the automation flow, baby - - if (outbufs.count().n_audio() == 1) { - - AudioBuffer& dst = outbufs.get_audio(0); - - // FIXME: apply gain automation? - - // copy the first - dst.read_from(inbufs.get_audio(0), nframes, offset); - - // accumulate starting with the second - BufferSet::audio_iterator i = inbufs.audio_begin(); - for (++i; i != inbufs.audio_end(); ++i) { - dst.accumulate_from(*i, nframes, offset); - } - - return; - } - - // More than 1 output, we should have 1 panner for each input - assert(size() == inbufs.count().n_audio()); - - /* the terrible silence ... */ - for (BufferSet::audio_iterator i = outbufs.audio_begin(); i != outbufs.audio_end(); ++i) { - i->silence(nframes, offset); - } - - BufferSet::audio_iterator i = inbufs.audio_begin(); - for (iterator pan = begin(); pan != end(); ++pan, ++i) { - (*pan)->distribute_automated (*i, outbufs, start_frame, end_frame, nframes, _session.pan_automation_buffer()); - } -} - -/* old school automation handling */ - -void -Panner::set_name (string str) -{ - automation_path = _session.automation_dir(); - automation_path += _session.snap_name(); - automation_path += "-pan-"; - automation_path += legalize_for_path (str); - automation_path += ".automation"; -} - -int -Panner::load () -{ - char line[128]; - uint32_t linecnt = 0; - float version; - iterator sp; - LocaleGuard lg (X_("POSIX")); - - if (automation_path.length() == 0) { - return 0; - } - - if (access (automation_path.c_str(), F_OK)) { - return 0; - } - - ifstream in (automation_path.c_str()); - - if (!in) { - error << string_compose (_("cannot open pan automation file %1 (%2)"), - automation_path, strerror (errno)) - << endmsg; - return -1; - } - - sp = begin(); - - while (in.getline (line, sizeof(line), '\n')) { - - if (++linecnt == 1) { - if (memcmp (line, X_("version"), 7) == 0) { - if (sscanf (line, "version %f", &version) != 1) { - error << string_compose(_("badly formed version number in pan automation event file \"%1\""), automation_path) << endmsg; - return -1; - } - } else { - error << string_compose(_("no version information in pan automation event file \"%1\" (first line = %2)"), - automation_path, line) << endmsg; - return -1; - } - - continue; - } - - if (strlen (line) == 0 || line[0] == '#') { - continue; - } - - if (strcmp (line, "begin") == 0) { - - if (sp == end()) { - error << string_compose (_("too many panner states found in pan automation file %1"), - automation_path) - << endmsg; - return -1; - } - - if ((*sp)->load (in, automation_path, linecnt)) { - return -1; - } - - ++sp; - } - } - - return 0; -} diff --git a/libs/ardour/parameter.cc b/libs/ardour/parameter.cc deleted file mode 100644 index 1b94e5dc4d..0000000000 --- a/libs/ardour/parameter.cc +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - Written by Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include - -using namespace ARDOUR; - - -/** Construct an Parameter from a string returned from Parameter::to_string - * (AutomationList automation-id property) - */ -Parameter::Parameter(const std::string& str) - : _type(NullAutomation) - , _id(0) - , _channel(0) -{ - if (str == "gain") { - _type = GainAutomation; - } else if (str == "solo") { - _type = SoloAutomation; - } else if (str == "mute") { - _type = MuteAutomation; - } else if (str == "fadein") { - _type = FadeInAutomation; - } else if (str == "fadeout") { - _type = FadeOutAutomation; - } else if (str == "envelope") { - _type = EnvelopeAutomation; - } else if (str == "pan") { - _type = PanAutomation; - } else if (str.length() > 4 && str.substr(0, 4) == "pan-") { - _type = PanAutomation; - _id = atoi(str.c_str()+4); - } else if (str.length() > 10 && str.substr(0, 10) == "parameter-") { - _type = PluginAutomation; - _id = atoi(str.c_str()+10); - } else if (str.length() > 7 && str.substr(0, 7) == "midicc-") { - _type = MidiCCAutomation; - uint32_t channel = 0; - sscanf(str.c_str(), "midicc-%d-%d", &channel, &_id); - assert(channel < 16); - _channel = channel; - } else if (str.length() > 16 && str.substr(0, 16) == "midi-pgm-change-") { - _type = MidiPgmChangeAutomation; - uint32_t channel = 0; - sscanf(str.c_str(), "midi-pgm-change-%d", &channel); - assert(channel < 16); - _id = 0; - _channel = channel; - } else if (str.length() > 18 && str.substr(0, 18) == "midi-pitch-bender-") { - _type = MidiPitchBenderAutomation; - uint32_t channel = 0; - sscanf(str.c_str(), "midi-pitch-bender-%d", &channel); - assert(channel < 16); - _id = 0; - _channel = channel; - } else if (str.length() > 24 && str.substr(0, 24) == "midi-channel-aftertouch-") { - _type = MidiChannelAftertouchAutomation; - uint32_t channel = 0; - sscanf(str.c_str(), "midi-channel-aftertouch-%d", &channel); - assert(channel < 16); - _id = 0; - _channel = channel; - } else { - PBD::warning << "Unknown Parameter '" << str << "'" << endmsg; - } -} - - -/** Unique string representation, suitable as an XML property value. - * e.g. - */ -std::string -Parameter::to_string() const -{ - if (_type == GainAutomation) { - return "gain"; - } else if (_type == PanAutomation) { - return string_compose("pan-%1", _id); - } else if (_type == SoloAutomation) { - return "solo"; - } else if (_type == MuteAutomation) { - return "mute"; - } else if (_type == FadeInAutomation) { - return "fadein"; - } else if (_type == FadeOutAutomation) { - return "fadeout"; - } else if (_type == EnvelopeAutomation) { - return "envelope"; - } else if (_type == PluginAutomation) { - return string_compose("parameter-%1", _id); - } else if (_type == MidiCCAutomation) { - return string_compose("midicc-%1-%2", int(_channel), _id); - } else if (_type == MidiPgmChangeAutomation) { - return string_compose("midi-pgm-change-%1", int(_channel)); - } else if (_type == MidiPitchBenderAutomation) { - return string_compose("midi-pitch-bender-%1", int(_channel)); - } else if (_type == MidiChannelAftertouchAutomation) { - return string_compose("midi-channel-aftertouch-%1", int(_channel)); - } else { - PBD::warning << "Uninitialized Parameter to_string() called." << endmsg; - return ""; - } -} - diff --git a/libs/ardour/pcm_utils.cc b/libs/ardour/pcm_utils.cc deleted file mode 100644 index 08d8a63d6e..0000000000 --- a/libs/ardour/pcm_utils.cc +++ /dev/null @@ -1,177 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis , portions Erik de Castro Lopo - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -using namespace std; - -// TODO: check CPU_CLIPS_POSITIVE and CPU_CLIPS_NEGATIVE with scons -#define CPU_CLIPS_NEGATIVE 0 -#define CPU_CLIPS_POSITIVE 0 - -/* these routines deal with 24 bit int handling (tribytes) - * originally from libsndfile, but modified. XXX - Copyright Erik de Castro Lopo - */ - -void -pcm_let2f_array (tribyte *src, int count, float *dest) -{ - /* Special normfactor because tribyte value is read into an int. */ - static const float normfact = 1.0 / ((float) 0x80000000); - - unsigned char *ucptr ; - int value ; - - ucptr = ((unsigned char*) src) + 3 * count ; - while (--count >= 0) - { ucptr -= 3 ; - value = LET2H_INT_PTR (ucptr) ; - dest [count] = ((float) value) * normfact ; - } ; -} /* let2f_array */ - -void -pcm_bet2f_array (tribyte *src, int count, float *dest) -{ - /* Special normfactor because tribyte value is read into an int. */ - static const float normfact = 1.0 / ((float) 0x80000000); - - unsigned char *ucptr ; - int value ; - - - ucptr = ((unsigned char*) src) + 3 * count ; - while (--count >= 0) - { ucptr -= 3 ; - value = BET2H_INT_PTR (ucptr) ; - dest [count] = ((float) value) * normfact ; - } ; -} /* bet2f_array */ - -void -pcm_f2let_array (float *src, tribyte *dest, int count) -{ - static const float normfact = (1.0 * 0x7FFFFF); - - unsigned char *ucptr ; - int value ; - - ucptr = ((unsigned char*) dest) + 3 * count ; - - while (count) - { count -- ; - ucptr -= 3 ; - value = lrintf (src [count] * normfact) ; - ucptr [0] = value ; - ucptr [1] = value >> 8 ; - ucptr [2] = value >> 16 ; - } ; -} /* f2let_array */ - -void -pcm_f2let_clip_array (float *src, tribyte *dest, int count) -{ - static const float normfact = (8.0 * 0x10000000); - - unsigned char *ucptr ; - float scaled_value ; - int value ; - - ucptr = ((unsigned char*) dest) + 3 * count ; - - while (count) - { count -- ; - ucptr -= 3 ; - scaled_value = src [count] * normfact ; - if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= (1.0 * 0x7FFFFFFF)) - { ucptr [0] = 0xFF ; - ucptr [1] = 0xFF ; - ucptr [2] = 0x7F ; - continue ; - } ; - if (CPU_CLIPS_NEGATIVE == 0 && scaled_value <= (-8.0 * 0x10000000)) - { ucptr [0] = 0x00 ; - ucptr [1] = 0x00 ; - ucptr [2] = 0x80 ; - continue ; - } ; - - value = lrintf (scaled_value) ; - ucptr [0] = value >> 8 ; - ucptr [1] = value >> 16 ; - ucptr [2] = value >> 24 ; - } ; -} /* f2let_clip_array */ - -void -pcm_f2bet_array (const float *src, tribyte *dest, int count) -{ - static const float normfact = (1.0 * 0x7FFFFF); - - unsigned char *ucptr ; - int value ; - - ucptr = ((unsigned char*) dest) + 3 * count ; - - while (--count >= 0) - { ucptr -= 3 ; - value = lrintf (src [count] * normfact) ; - ucptr [0] = value >> 16 ; - ucptr [1] = value >> 8 ; - ucptr [2] = value ; - } ; -} /* f2bet_array */ - -void -pcm_f2bet_clip_array (const float *src, tribyte *dest, int count) -{ - static const float normfact = (8.0 * 0x10000000); - - unsigned char *ucptr ; - float scaled_value ; - int value ; - - ucptr = ((unsigned char*) dest) + 3 * count ; - - while (--count >= 0) - { ucptr -= 3 ; - scaled_value = src [count] * normfact ; - if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= (1.0 * 0x7FFFFFFF)) - { ucptr [0] = 0x7F ; - ucptr [1] = 0xFF ; - ucptr [2] = 0xFF ; - continue ; - } ; - if (CPU_CLIPS_NEGATIVE == 0 && scaled_value <= (-8.0 * 0x10000000)) - { ucptr [0] = 0x80 ; - ucptr [1] = 0x00 ; - ucptr [2] = 0x00 ; - continue ; - } ; - - value = lrint (scaled_value) ; - ucptr [0] = value >> 24 ; - ucptr [1] = value >> 16 ; - ucptr [2] = value >> 8 ; - } ; -} /* f2bet_clip_array */ - -//@@@@@@@ diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc deleted file mode 100644 index 0b0d5ecc22..0000000000 --- a/libs/ardour/playlist.cc +++ /dev/null @@ -1,2367 +0,0 @@ -/* - Copyright (C) 2000-2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -struct ShowMeTheList { - ShowMeTheList (boost::shared_ptr pl, const string& n) : playlist (pl), name (n) {} - ~ShowMeTheList () { - cerr << ">>>>" << name << endl; playlist->dump(); cerr << "<<<<" << name << endl << endl; - }; - boost::shared_ptr playlist; - string name; -}; - -struct RegionSortByLayer { - bool operator() (boost::shared_ptr a, boost::shared_ptr b) { - return a->layer() < b->layer(); - } -}; - -struct RegionSortByPosition { - bool operator() (boost::shared_ptr a, boost::shared_ptr b) { - return a->position() < b->position(); - } -}; - -struct RegionSortByLastLayerOp { - bool operator() (boost::shared_ptr a, boost::shared_ptr b) { - return a->last_layer_op() < b->last_layer_op(); - } -}; - - -Playlist::Playlist (Session& sess, string nom, DataType type, bool hide) - : SessionObject(sess, nom) - , _type(type) -{ - init (hide); - first_set_state = false; - _name = nom; - -} - -Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide) - : SessionObject(sess, "unnamed playlist") - , _type(type) -{ - const XMLProperty* prop = node.property("type"); - assert(!prop || DataType(prop->value()) == _type); - - init (hide); - _name = "unnamed"; /* reset by set_state */ - - /* set state called by derived class */ -} - -Playlist::Playlist (boost::shared_ptr other, string namestr, bool hide) - : SessionObject(other->_session, namestr), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id) -{ - init (hide); - - RegionList tmp; - other->copy_regions (tmp); - - in_set_state++; - - for (list >::iterator x = tmp.begin(); x != tmp.end(); ++x) { - add_region_internal( (*x), (*x)->position()); - } - - in_set_state--; - - _splicing = other->_splicing; - _nudging = other->_nudging; - _edit_mode = other->_edit_mode; - - in_set_state = 0; - first_set_state = false; - in_flush = false; - in_partition = false; - subcnt = 0; - _read_data_count = 0; - _frozen = other->_frozen; - - layer_op_counter = other->layer_op_counter; - freeze_length = other->freeze_length; -} - -Playlist::Playlist (boost::shared_ptr other, nframes_t start, nframes_t cnt, string str, bool hide) - : SessionObject(other->_session, str), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id) -{ - RegionLock rlock2 (const_cast (other.get())); - - nframes_t end = start + cnt - 1; - - init (hide); - - in_set_state++; - - for (RegionList::const_iterator i = other->regions.begin(); i != other->regions.end(); i++) { - - boost::shared_ptr region; - boost::shared_ptr new_region; - nframes_t offset = 0; - nframes_t position = 0; - nframes_t len = 0; - string new_name; - OverlapType overlap; - - region = *i; - - overlap = region->coverage (start, end); - - switch (overlap) { - case OverlapNone: - continue; - - case OverlapInternal: - offset = start - region->position(); - position = 0; - len = cnt; - break; - - case OverlapStart: - offset = 0; - position = region->position() - start; - len = end - region->position(); - break; - - case OverlapEnd: - offset = start - region->position(); - position = 0; - len = region->length() - offset; - break; - - case OverlapExternal: - offset = 0; - position = region->position() - start; - len = region->length(); - break; - } - - _session.region_name (new_name, region->name(), false); - - new_region = RegionFactory::RegionFactory::create (region, offset, len, new_name, region->layer(), region->flags()); - - add_region_internal (new_region, position); - } - - in_set_state--; - first_set_state = false; - - /* this constructor does NOT notify others (session) */ -} - -void -Playlist::use () -{ - ++_refcnt; - InUse (true); /* EMIT SIGNAL */ -} - -void -Playlist::release () -{ - if (_refcnt > 0) { - _refcnt--; - } - - if (_refcnt == 0) { - InUse (false); /* EMIT SIGNAL */ - } -} - -void -Playlist::copy_regions (RegionList& newlist) const -{ - RegionLock rlock (const_cast (this)); - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - newlist.push_back (RegionFactory::RegionFactory::create (*i)); - } -} - -void -Playlist::init (bool hide) -{ - g_atomic_int_set (&block_notifications, 0); - g_atomic_int_set (&ignore_state_changes, 0); - pending_modified = false; - pending_length = false; - first_set_state = true; - _refcnt = 0; - _hidden = hide; - _splicing = false; - _shuffling = false; - _nudging = false; - in_set_state = 0; - _edit_mode = Config->get_edit_mode(); - in_flush = false; - in_partition = false; - subcnt = 0; - _read_data_count = 0; - _frozen = false; - layer_op_counter = 0; - freeze_length = 0; - - Modified.connect (mem_fun (*this, &Playlist::mark_session_dirty)); -} - -Playlist::Playlist (const Playlist& pl) - : SessionObject(pl._session, pl._name) - , _type(pl.data_type()) -{ - fatal << _("playlist const copy constructor called") << endmsg; -} - -Playlist::Playlist (Playlist& pl) - : SessionObject(pl._session, pl._name) - , _type(pl.data_type()) -{ - fatal << _("playlist non-const copy constructor called") << endmsg; -} - -Playlist::~Playlist () -{ - { - RegionLock rl (this); - - for (set >::iterator i = all_regions.begin(); i != all_regions.end(); ++i) { - (*i)->set_playlist (boost::shared_ptr()); - } - } - - /* GoingAway must be emitted by derived classes */ -} - -bool -Playlist::set_name (const string& str) -{ - /* in a typical situation, a playlist is being used - by one diskstream and also is referenced by the - Session. if there are more references than that, - then don't change the name. - */ - - if (_refcnt > 2) { - return false; - } else { - return SessionObject::set_name(str); - } -} - -/*********************************************************************** - CHANGE NOTIFICATION HANDLING - - Notifications must be delayed till the region_lock is released. This - is necessary because handlers for the signals may need to acquire - the lock (e.g. to read from the playlist). - ***********************************************************************/ - -void -Playlist::freeze () -{ - delay_notifications (); - g_atomic_int_inc (&ignore_state_changes); -} - -void -Playlist::thaw () -{ - g_atomic_int_dec_and_test (&ignore_state_changes); - release_notifications (); -} - - -void -Playlist::delay_notifications () -{ - g_atomic_int_inc (&block_notifications); - freeze_length = _get_maximum_extent(); -} - -void -Playlist::release_notifications () -{ - if (g_atomic_int_dec_and_test (&block_notifications)) { - flush_notifications (); - } -} - -void -Playlist::notify_modified () -{ - if (holding_state ()) { - pending_modified = true; - } else { - pending_modified = false; - Modified(); /* EMIT SIGNAL */ - } -} - -void -Playlist::notify_region_removed (boost::shared_ptr r) -{ - if (holding_state ()) { - pending_removes.insert (r); - pending_modified = true; - pending_length = true; - } else { - /* this might not be true, but we have to act - as though it could be. - */ - pending_length = false; - LengthChanged (); /* EMIT SIGNAL */ - pending_modified = false; - Modified (); /* EMIT SIGNAL */ - } -} - -void -Playlist::notify_region_added (boost::shared_ptr r) -{ - /* the length change might not be true, but we have to act - as though it could be. - */ - - if (holding_state()) { - pending_adds.insert (r); - pending_modified = true; - pending_length = true; - } else { - pending_length = false; - LengthChanged (); /* EMIT SIGNAL */ - pending_modified = false; - Modified (); /* EMIT SIGNAL */ - } -} - -void -Playlist::notify_length_changed () -{ - if (holding_state ()) { - pending_length = true; - } else { - pending_length = false; - LengthChanged(); /* EMIT SIGNAL */ - pending_modified = false; - Modified (); /* EMIT SIGNAL */ - } -} - -void -Playlist::flush_notifications () -{ - set > dependent_checks_needed; - set >::iterator s; - uint32_t n = 0; - - if (in_flush) { - return; - } - - in_flush = true; - - /* we have no idea what order the regions ended up in pending - bounds (it could be based on selection order, for example). - so, to preserve layering in the "most recently moved is higher" - model, sort them by existing layer, then timestamp them. - */ - - // RegionSortByLayer cmp; - // pending_bounds.sort (cmp); - - for (RegionList::iterator r = pending_bounds.begin(); r != pending_bounds.end(); ++r) { - if (Config->get_layer_model() == MoveAddHigher) { - timestamp_layer_op (*r); - } - pending_length = true; - dependent_checks_needed.insert (*r); - n++; - } - - for (s = pending_adds.begin(); s != pending_adds.end(); ++s) { - dependent_checks_needed.insert (*s); - n++; - } - - for (s = pending_removes.begin(); s != pending_removes.end(); ++s) { - remove_dependents (*s); - n++; - } - - if ((freeze_length != _get_maximum_extent()) || pending_length) { - pending_length = 0; - LengthChanged(); /* EMIT SIGNAL */ - n++; - } - - if (n || pending_modified) { - if (!in_set_state) { - relayer (); - } - pending_modified = false; - Modified (); /* EMIT SIGNAL */ - - } - - for (s = dependent_checks_needed.begin(); s != dependent_checks_needed.end(); ++s) { - check_dependents (*s, false); - } - - pending_adds.clear (); - pending_removes.clear (); - pending_bounds.clear (); - - in_flush = false; -} - -/************************************************************* - PLAYLIST OPERATIONS - *************************************************************/ - -void -Playlist::add_region (boost::shared_ptr region, nframes_t position, float times) -{ - RegionLock rlock (this); - delay_notifications(); - times = fabs (times); - - int itimes = (int) floor (times); - - nframes_t pos = position; - - if (itimes >= 1) { - add_region_internal (region, pos); - pos += region->length(); - --itimes; - } - - - /* note that itimes can be zero if we being asked to just - insert a single fraction of the region. - */ - - for (int i = 0; i < itimes; ++i) { - boost::shared_ptr copy = RegionFactory::create (region); - add_region_internal (copy, pos); - pos += region->length(); - } - - nframes_t length = 0; - - if (floor (times) != times) { - length = (nframes_t) floor (region->length() * (times - floor (times))); - string name; - _session.region_name (name, region->name(), false); - boost::shared_ptr sub = RegionFactory::create (region, 0, length, name, region->layer(), region->flags()); - add_region_internal (sub, pos); - } - - - possibly_splice_unlocked (position, (pos + length) - position, boost::shared_ptr()); - release_notifications (); -} - -void -Playlist::set_region_ownership () -{ - RegionLock rl (this); - RegionList::iterator i; - boost::weak_ptr pl (shared_from_this()); - - for (i = regions.begin(); i != regions.end(); ++i) { - (*i)->set_playlist (pl); - } -} - -void -Playlist::add_region_internal (boost::shared_ptr region, nframes_t position) -{ - assert(region->data_type() == _type); - - RegionSortByPosition cmp; - nframes_t old_length = 0; - - if (!holding_state()) { - old_length = _get_maximum_extent(); - } - - if (!first_set_state) { - boost::shared_ptr foo (shared_from_this()); - region->set_playlist (boost::weak_ptr(foo)); - } - - region->set_position (position, this); - - timestamp_layer_op (region); - - regions.insert (upper_bound (regions.begin(), regions.end(), region, cmp), region); - all_regions.insert (region); - - possibly_splice_unlocked (position, region->length(), region); - - if (!holding_state () && !in_set_state) { - /* layers get assigned from XML state */ - relayer (); - } - - /* we need to notify the existence of new region before checking dependents. Ick. */ - - notify_region_added (region); - - if (!holding_state ()) { - check_dependents (region, false); - if (old_length != _get_maximum_extent()) { - notify_length_changed (); - } - } - - region->StateChanged.connect (sigc::bind (mem_fun (this, &Playlist::region_changed_proxy), - boost::weak_ptr (region))); -} - -void -Playlist::replace_region (boost::shared_ptr old, boost::shared_ptr newr, nframes_t pos) -{ - RegionLock rlock (this); - - bool old_sp = _splicing; - _splicing = true; - - remove_region_internal (old); - add_region_internal (newr, pos); - - _splicing = old_sp; - - possibly_splice_unlocked (pos, (nframes64_t) old->length() - (nframes64_t) newr->length()); -} - -void -Playlist::remove_region (boost::shared_ptr region) -{ - RegionLock rlock (this); - remove_region_internal (region); -} - -int -Playlist::remove_region_internal (boost::shared_ptr region) -{ - RegionList::iterator i; - nframes_t old_length = 0; - - if (!holding_state()) { - old_length = _get_maximum_extent(); - } - - if (!in_set_state) { - /* unset playlist */ - region->set_playlist (boost::weak_ptr()); - } - - for (i = regions.begin(); i != regions.end(); ++i) { - if (*i == region) { - - nframes_t pos = (*i)->position(); - nframes64_t distance = (*i)->length(); - - regions.erase (i); - - possibly_splice_unlocked (pos, -distance); - - if (!holding_state ()) { - relayer (); - remove_dependents (region); - - if (old_length != _get_maximum_extent()) { - notify_length_changed (); - } - } - - notify_region_removed (region); - return 0; - } - } - - - - return -1; -} - -void -Playlist::get_equivalent_regions (boost::shared_ptr other, vector >& results) -{ - if (Config->get_use_overlap_equivalency()) { - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i)->overlap_equivalent (other)) { - results.push_back ((*i)); - } - } - } else { - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i)->equivalent (other)) { - results.push_back ((*i)); - } - } - } -} - -void -Playlist::get_region_list_equivalent_regions (boost::shared_ptr other, vector >& results) -{ - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - if ((*i) && (*i)->region_list_equivalent (other)) { - results.push_back (*i); - } - } -} - -void -Playlist::partition (nframes_t start, nframes_t end, bool just_top_level) -{ - RegionList thawlist; - - partition_internal (start, end, false, thawlist); - - for (RegionList::iterator i = thawlist.begin(); i != thawlist.end(); ++i) { - (*i)->thaw ("separation"); - } -} - -void -Playlist::partition_internal (nframes_t start, nframes_t end, bool cutting, RegionList& thawlist) -{ - RegionList new_regions; - - { - RegionLock rlock (this); - boost::shared_ptr region; - boost::shared_ptr current; - string new_name; - RegionList::iterator tmp; - OverlapType overlap; - nframes_t pos1, pos2, pos3, pos4; - - in_partition = true; - - /* need to work from a copy, because otherwise the regions we add during the process - get operated on as well. - */ - - RegionList copy = regions; - - for (RegionList::iterator i = copy.begin(); i != copy.end(); i = tmp) { - - tmp = i; - ++tmp; - - current = *i; - - if (current->first_frame() >= start && current->last_frame() < end) { - if (cutting) { - remove_region_internal (current); - } - continue; - } - - /* coverage will return OverlapStart if the start coincides - with the end point. we do not partition such a region, - so catch this special case. - */ - - if (current->first_frame() >= end) { - continue; - } - - if ((overlap = current->coverage (start, end)) == OverlapNone) { - continue; - } - - pos1 = current->position(); - pos2 = start; - pos3 = end; - pos4 = current->last_frame(); - - if (overlap == OverlapInternal) { - - /* split: we need 3 new regions, the front, middle and end. - cut: we need 2 regions, the front and end. - */ - - /* - start end - ---------------*************************------------ - P1 P2 P3 P4 - SPLIT: - ---------------*****++++++++++++++++====------------ - CUT - ---------------*****----------------====------------ - - */ - - if (!cutting) { - - /* "middle" ++++++ */ - - _session.region_name (new_name, current->name(), false); - region = RegionFactory::create (current, pos2 - pos1, pos3 - pos2, new_name, - regions.size(), Region::Flag(current->flags()|Region::Automatic|Region::LeftOfSplit|Region::RightOfSplit)); - add_region_internal (region, start); - new_regions.push_back (region); - } - - /* "end" ====== */ - - _session.region_name (new_name, current->name(), false); - region = RegionFactory::create (current, pos3 - pos1, pos4 - pos3, new_name, - regions.size(), Region::Flag(current->flags()|Region::Automatic|Region::RightOfSplit)); - - add_region_internal (region, end); - new_regions.push_back (region); - - /* "front" ***** */ - - current->freeze (); - thawlist.push_back (current); - current->trim_end (pos2, this); - - } else if (overlap == OverlapEnd) { - - /* - start end - ---------------*************************------------ - P1 P2 P4 P3 - SPLIT: - ---------------**************+++++++++++------------ - CUT: - ---------------**************----------------------- - */ - - if (!cutting) { - - /* end +++++ */ - - _session.region_name (new_name, current->name(), false); - region = RegionFactory::create (current, pos2 - pos1, pos4 - pos2, new_name, (layer_t) regions.size(), - Region::Flag(current->flags()|Region::Automatic|Region::LeftOfSplit)); - add_region_internal (region, start); - new_regions.push_back (region); - } - - /* front ****** */ - - current->freeze (); - thawlist.push_back (current); - current->trim_end (pos2, this); - - } else if (overlap == OverlapStart) { - - /* split: we need 2 regions: the front and the end. - cut: just trim current to skip the cut area - */ - - /* - start end - ---------------*************************------------ - P2 P1 P3 P4 - - SPLIT: - ---------------****+++++++++++++++++++++------------ - CUT: - -------------------*********************------------ - - */ - - if (!cutting) { - - /* front **** */ - _session.region_name (new_name, current->name(), false); - region = RegionFactory::create (current, 0, pos3 - pos1, new_name, - regions.size(), Region::Flag(current->flags()|Region::Automatic|Region::RightOfSplit)); - add_region_internal (region, pos1); - new_regions.push_back (region); - } - - /* end */ - - current->freeze (); - thawlist.push_back (current); - current->trim_front (pos3, this); - - } else if (overlap == OverlapExternal) { - - /* split: no split required. - cut: remove the region. - */ - - /* - start end - ---------------*************************------------ - P2 P1 P3 P4 - - SPLIT: - ---------------*************************------------ - CUT: - ---------------------------------------------------- - - */ - - if (cutting) { - remove_region_internal (current); - } - new_regions.push_back (current); - } - } - - in_partition = false; - } - - for (RegionList::iterator i = new_regions.begin(); i != new_regions.end(); ++i) { - check_dependents (*i, false); - } -} - -boost::shared_ptr -Playlist::cut_copy (boost::shared_ptr (Playlist::*pmf)(nframes_t, nframes_t,bool), list& ranges, bool result_is_hidden) -{ - boost::shared_ptr ret; - boost::shared_ptr pl; - nframes_t start; - - if (ranges.empty()) { - return boost::shared_ptr(); - } - - start = ranges.front().start; - - for (list::iterator i = ranges.begin(); i != ranges.end(); ++i) { - - pl = (this->*pmf)((*i).start, (*i).length(), result_is_hidden); - - if (i == ranges.begin()) { - ret = pl; - } else { - - /* paste the next section into the nascent playlist, - offset to reflect the start of the first range we - chopped. - */ - - ret->paste (pl, (*i).start - start, 1.0f); - } - } - - return ret; -} - -boost::shared_ptr -Playlist::cut (list& ranges, bool result_is_hidden) -{ - boost::shared_ptr (Playlist::*pmf)(nframes_t,nframes_t,bool) = &Playlist::cut; - return cut_copy (pmf, ranges, result_is_hidden); -} - -boost::shared_ptr -Playlist::copy (list& ranges, bool result_is_hidden) -{ - boost::shared_ptr (Playlist::*pmf)(nframes_t,nframes_t,bool) = &Playlist::copy; - return cut_copy (pmf, ranges, result_is_hidden); -} - -boost::shared_ptr -Playlist::cut (nframes_t start, nframes_t cnt, bool result_is_hidden) -{ - boost::shared_ptr the_copy; - RegionList thawlist; - char buf[32]; - - snprintf (buf, sizeof (buf), "%" PRIu32, ++subcnt); - string new_name = _name; - new_name += '.'; - new_name += buf; - - if ((the_copy = PlaylistFactory::create (shared_from_this(), start, cnt, new_name, result_is_hidden)) == 0) { - return boost::shared_ptr(); - } - - partition_internal (start, start+cnt-1, true, thawlist); - - for (RegionList::iterator i = thawlist.begin(); i != thawlist.end(); ++i) { - (*i)->thaw ("playlist cut"); - } - - return the_copy; -} - -boost::shared_ptr -Playlist::copy (nframes_t start, nframes_t cnt, bool result_is_hidden) -{ - char buf[32]; - - snprintf (buf, sizeof (buf), "%" PRIu32, ++subcnt); - string new_name = _name; - new_name += '.'; - new_name += buf; - - cnt = min (_get_maximum_extent() - start, cnt); - return PlaylistFactory::create (shared_from_this(), start, cnt, new_name, result_is_hidden); -} - -int -Playlist::paste (boost::shared_ptr other, nframes_t position, float times) -{ - times = fabs (times); - nframes_t old_length; - - { - RegionLock rl1 (this); - RegionLock rl2 (other.get()); - - old_length = _get_maximum_extent(); - - int itimes = (int) floor (times); - nframes_t pos = position; - nframes_t shift = other->_get_maximum_extent(); - layer_t top_layer = regions.size(); - - while (itimes--) { - for (RegionList::iterator i = other->regions.begin(); i != other->regions.end(); ++i) { - boost::shared_ptr copy_of_region = RegionFactory::create (*i); - - /* put these new regions on top of all existing ones, but preserve - the ordering they had in the original playlist. - */ - - copy_of_region->set_layer (copy_of_region->layer() + top_layer); - add_region_internal (copy_of_region, copy_of_region->position() + pos); - } - pos += shift; - } - - - /* XXX shall we handle fractional cases at some point? */ - - if (old_length != _get_maximum_extent()) { - notify_length_changed (); - } - - - } - - return 0; -} - - -void -Playlist::duplicate (boost::shared_ptr region, nframes_t position, float times) -{ - times = fabs (times); - - RegionLock rl (this); - int itimes = (int) floor (times); - nframes_t pos = position; - - while (itimes--) { - boost::shared_ptr copy = RegionFactory::create (region); - add_region_internal (copy, pos); - pos += region->length(); - } - - if (floor (times) != times) { - nframes_t length = (nframes_t) floor (region->length() * (times - floor (times))); - string name; - _session.region_name (name, region->name(), false); - boost::shared_ptr sub = RegionFactory::create (region, 0, length, name, region->layer(), region->flags()); - add_region_internal (sub, pos); - } -} - -void -Playlist::shift (nframes64_t at, nframes64_t distance, bool move_intersected, bool ignore_music_glue) -{ - RegionLock rlock (this); - RegionList copy (regions); - RegionList fixup; - - for (RegionList::iterator r = copy.begin(); r != copy.end(); ++r) { - - if ((*r)->last_frame() < at) { - /* too early */ - continue; - } - - if (at > (*r)->first_frame() && at < (*r)->last_frame()) { - /* intersected region */ - if (!move_intersected) { - continue; - } - } - - /* do not move regions glued to music time - that - has to be done separately. - */ - - if (!ignore_music_glue && (*r)->positional_lock_style() != Region::AudioTime) { - fixup.push_back (*r); - continue; - } - - (*r)->set_position ((*r)->position() + distance, this); - } - - for (RegionList::iterator r = fixup.begin(); r != fixup.end(); ++r) { - (*r)->recompute_position_from_lock_style (); - } -} - -void -Playlist::split (nframes64_t at) -{ - RegionLock rlock (this); - RegionList copy (regions); - - /* use a copy since this operation can modify the region list - */ - - for (RegionList::iterator r = copy.begin(); r != copy.end(); ++r) { - _split_region (*r, at); - } -} - -void -Playlist::split_region (boost::shared_ptr region, nframes_t playlist_position) -{ - RegionLock rl (this); - _split_region (region, playlist_position); -} - -void -Playlist::_split_region (boost::shared_ptr region, nframes_t playlist_position) -{ - if (!region->covers (playlist_position)) { - return; - } - - if (region->position() == playlist_position || - region->last_frame() == playlist_position) { - return; - } - - boost::shared_ptr left; - boost::shared_ptr right; - nframes_t before; - nframes_t after; - string before_name; - string after_name; - - /* split doesn't change anything about length, so don't try to splice */ - - bool old_sp = _splicing; - _splicing = true; - - before = playlist_position - region->position(); - after = region->length() - before; - - _session.region_name (before_name, region->name(), false); - left = RegionFactory::create (region, 0, before, before_name, region->layer(), Region::Flag (region->flags()|Region::LeftOfSplit)); - - _session.region_name (after_name, region->name(), false); - right = RegionFactory::create (region, before, after, after_name, region->layer(), Region::Flag (region->flags()|Region::RightOfSplit)); - - add_region_internal (left, region->position()); - add_region_internal (right, region->position() + before); - - uint64_t orig_layer_op = region->last_layer_op(); - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i)->last_layer_op() > orig_layer_op) { - (*i)->set_last_layer_op( (*i)->last_layer_op() + 1 ); - } - } - - left->set_last_layer_op ( orig_layer_op ); - right->set_last_layer_op ( orig_layer_op + 1); - - layer_op_counter++; - - finalize_split_region (region, left, right); - - remove_region_internal (region); - - _splicing = old_sp; -} - -void -Playlist::possibly_splice (nframes_t at, nframes64_t distance, boost::shared_ptr exclude) -{ - if (_splicing || in_set_state) { - /* don't respond to splicing moves or state setting */ - return; - } - - if (_edit_mode == Splice) { - splice_locked (at, distance, exclude); - } -} - -void -Playlist::possibly_splice_unlocked (nframes_t at, nframes64_t distance, boost::shared_ptr exclude) -{ - if (_splicing || in_set_state) { - /* don't respond to splicing moves or state setting */ - return; - } - - if (_edit_mode == Splice) { - splice_unlocked (at, distance, exclude); - } -} - -void -Playlist::splice_locked (nframes_t at, nframes64_t distance, boost::shared_ptr exclude) -{ - { - RegionLock rl (this); - core_splice (at, distance, exclude); - } -} - -void -Playlist::splice_unlocked (nframes_t at, nframes64_t distance, boost::shared_ptr exclude) -{ - core_splice (at, distance, exclude); -} - -void -Playlist::core_splice (nframes_t at, nframes64_t distance, boost::shared_ptr exclude) -{ - _splicing = true; - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - if (exclude && (*i) == exclude) { - continue; - } - - if ((*i)->position() >= at) { - nframes64_t new_pos = (*i)->position() + distance; - if (new_pos < 0) { - new_pos = 0; - } else if (new_pos >= max_frames - (*i)->length()) { - new_pos = max_frames - (*i)->length(); - } - - (*i)->set_position (new_pos, this); - } - } - - _splicing = false; - - notify_length_changed (); -} - -void -Playlist::region_bounds_changed (Change what_changed, boost::shared_ptr region) -{ - if (in_set_state || _splicing || _nudging || _shuffling) { - return; - } - - if (what_changed & ARDOUR::PositionChanged) { - - /* remove it from the list then add it back in - the right place again. - */ - - RegionSortByPosition cmp; - - RegionList::iterator i = find (regions.begin(), regions.end(), region); - - if (i == regions.end()) { - warning << string_compose (_("%1: bounds changed received for region (%2)not in playlist"), - _name, region->name()) - << endmsg; - return; - } - - regions.erase (i); - regions.insert (upper_bound (regions.begin(), regions.end(), region, cmp), region); - } - - if (what_changed & Change (ARDOUR::PositionChanged|ARDOUR::LengthChanged)) { - - nframes64_t delta = 0; - - if (what_changed & ARDOUR::PositionChanged) { - delta = (nframes64_t) region->position() - (nframes64_t) region->last_position(); - } - - if (what_changed & ARDOUR::LengthChanged) { - delta += (nframes64_t) region->length() - (nframes64_t) region->last_length(); - } - - if (delta) { - possibly_splice (region->last_position() + region->last_length(), delta, region); - } - - if (holding_state ()) { - pending_bounds.push_back (region); - } else { - if (Config->get_layer_model() == MoveAddHigher) { - /* it moved or changed length, so change the timestamp */ - timestamp_layer_op (region); - } - - notify_length_changed (); - relayer (); - check_dependents (region, false); - } - } -} - -void -Playlist::region_changed_proxy (Change what_changed, boost::weak_ptr weak_region) -{ - boost::shared_ptr region (weak_region.lock()); - - if (!region) { - return; - } - - - /* this makes a virtual call to the right kind of playlist ... */ - - region_changed (what_changed, region); -} - -bool -Playlist::region_changed (Change what_changed, boost::shared_ptr region) -{ - Change our_interests = Change (Region::MuteChanged|Region::LayerChanged|Region::OpacityChanged); - bool save = false; - - if (in_set_state || in_flush) { - return false; - } - - { - if (what_changed & BoundsChanged) { - region_bounds_changed (what_changed, region); - save = !(_splicing || _nudging); - } - - if ((what_changed & our_interests) && - !(what_changed & Change (ARDOUR::PositionChanged|ARDOUR::LengthChanged))) { - check_dependents (region, false); - } - - if (what_changed & our_interests) { - save = true; - } - } - - return save; -} - -void -Playlist::drop_regions () -{ - RegionLock rl (this); - regions.clear (); - all_regions.clear (); -} - -void -Playlist::clear (bool with_signals) -{ - { - RegionLock rl (this); - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - pending_removes.insert (*i); - } - regions.clear (); - } - - if (with_signals) { - pending_length = false; - LengthChanged (); - pending_modified = false; - Modified (); - } - -} - -/*********************************************************************** - FINDING THINGS - **********************************************************************/ - -Playlist::RegionList * -Playlist::regions_at (nframes_t frame) - -{ - RegionLock rlock (this); - return find_regions_at (frame); -} - -boost::shared_ptr -Playlist::top_region_at (nframes_t frame) - -{ - RegionLock rlock (this); - RegionList *rlist = find_regions_at (frame); - boost::shared_ptr region; - - if (rlist->size()) { - RegionSortByLayer cmp; - rlist->sort (cmp); - region = rlist->back(); - } - - delete rlist; - return region; -} - -Playlist::RegionList* -Playlist::regions_to_read (nframes_t start, nframes_t end) -{ - /* Caller must hold lock */ - - RegionList covering; - set to_check; - set > unique; - RegionList here; - - to_check.insert (start); - to_check.insert (end); - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - /* find all/any regions that span start+end */ - - switch ((*i)->coverage (start, end)) { - case OverlapNone: - break; - - case OverlapInternal: - covering.push_back (*i); - break; - - case OverlapStart: - to_check.insert ((*i)->position()); - covering.push_back (*i); - break; - - case OverlapEnd: - to_check.insert ((*i)->last_frame()); - covering.push_back (*i); - break; - - case OverlapExternal: - covering.push_back (*i); - to_check.insert ((*i)->position()); - to_check.insert ((*i)->last_frame()); - break; - } - - /* don't go too far */ - - if ((*i)->position() > end) { - break; - } - } - - RegionList* rlist = new RegionList; - - /* find all the regions that cover each position .... */ - - if (covering.size() == 1) { - - rlist->push_back (covering.front()); - - } else { - - for (set::iterator t = to_check.begin(); t != to_check.end(); ++t) { - - here.clear (); - - for (RegionList::iterator x = covering.begin(); x != covering.end(); ++x) { - - if ((*x)->covers (*t)) { - here.push_back (*x); - } - } - - RegionSortByLayer cmp; - here.sort (cmp); - - /* ... and get the top/transparent regions at "here" */ - - for (RegionList::reverse_iterator c = here.rbegin(); c != here.rend(); ++c) { - - unique.insert (*c); - - if ((*c)->opaque()) { - - /* the other regions at this position are hidden by this one */ - - break; - } - } - } - - for (set >::iterator s = unique.begin(); s != unique.end(); ++s) { - rlist->push_back (*s); - } - - if (rlist->size() > 1) { - /* now sort by time order */ - - RegionSortByPosition cmp; - rlist->sort (cmp); - } - } - - return rlist; -} - -Playlist::RegionList * -Playlist::find_regions_at (nframes_t frame) -{ - /* Caller must hold lock */ - - RegionList *rlist = new RegionList; - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i)->covers (frame)) { - rlist->push_back (*i); - } - } - - return rlist; -} - -Playlist::RegionList * -Playlist::regions_touched (nframes_t start, nframes_t end) -{ - RegionLock rlock (this); - RegionList *rlist = new RegionList; - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i)->coverage (start, end) != OverlapNone) { - rlist->push_back (*i); - } - } - - return rlist; -} - -nframes64_t -Playlist::find_next_transient (nframes64_t from, int dir) -{ - RegionLock rlock (this); - AnalysisFeatureList points; - AnalysisFeatureList these_points; - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if (dir > 0) { - if ((*i)->last_frame() < from) { - continue; - } - } else { - if ((*i)->first_frame() > from) { - continue; - } - } - - (*i)->get_transients (these_points); - - /* add first frame, just, err, because */ - - these_points.push_back ((*i)->first_frame()); - - points.insert (points.end(), these_points.begin(), these_points.end()); - these_points.clear (); - } - - if (points.empty()) { - return -1; - } - - TransientDetector::cleanup_transients (points, _session.frame_rate(), 3.0); - bool reached = false; - - if (dir > 0) { - for (AnalysisFeatureList::iterator x = points.begin(); x != points.end(); ++x) { - if ((*x) >= from) { - reached = true; - } - - if (reached && (*x) > from) { - return *x; - } - } - } else { - for (AnalysisFeatureList::reverse_iterator x = points.rbegin(); x != points.rend(); ++x) { - if ((*x) <= from) { - reached = true; - } - - if (reached && (*x) < from) { - return *x; - } - } - } - - return -1; -} - -boost::shared_ptr -Playlist::find_next_region (nframes_t frame, RegionPoint point, int dir) -{ - RegionLock rlock (this); - boost::shared_ptr ret; - nframes_t closest = max_frames; - - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - nframes_t distance; - boost::shared_ptr r = (*i); - nframes_t pos = 0; - - switch (point) { - case Start: - pos = r->first_frame (); - break; - case End: - pos = r->last_frame (); - break; - case SyncPoint: - pos = r->adjust_to_sync (r->first_frame()); - break; - } - - switch (dir) { - case 1: /* forwards */ - - if (pos >= frame) { - if ((distance = pos - frame) < closest) { - closest = distance; - ret = r; - } - } - - break; - - default: /* backwards */ - - if (pos <= frame) { - if ((distance = frame - pos) < closest) { - closest = distance; - ret = r; - } - } - break; - } - } - - return ret; -} - -nframes64_t -Playlist::find_next_region_boundary (nframes64_t frame, int dir) -{ - RegionLock rlock (this); - - nframes64_t closest = max_frames; - nframes64_t ret = -1; - - if (dir > 0) { - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - - boost::shared_ptr r = (*i); - nframes64_t distance; - nframes64_t end = r->position() + r->length(); - bool reset; - - reset = false; - - if (r->first_frame() > frame) { - - distance = r->first_frame() - frame; - - if (distance < closest) { - ret = r->first_frame(); - closest = distance; - reset = true; - } - } - - if (end > frame) { - - distance = end - frame; - - if (distance < closest) { - ret = end; - closest = distance; - reset = true; - } - } - - if (reset) { - break; - } - } - - } else { - - for (RegionList::reverse_iterator i = regions.rbegin(); i != regions.rend(); ++i) { - - boost::shared_ptr r = (*i); - nframes64_t distance; - bool reset; - - reset = false; - - if (r->last_frame() < frame) { - - distance = frame - r->last_frame(); - - if (distance < closest) { - ret = r->last_frame(); - closest = distance; - reset = true; - } - } - - if (r->first_frame() < frame) { - distance = frame - r->last_frame(); - - if (distance < closest) { - ret = r->first_frame(); - closest = distance; - reset = true; - } - } - - if (reset) { - break; - } - } - } - - return ret; -} - -/***********************************************************************/ - - - -void -Playlist::mark_session_dirty () -{ - if (!in_set_state && !holding_state ()) { - _session.set_dirty(); - } -} - -int -Playlist::set_state (const XMLNode& node) -{ - XMLNode *child; - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLPropertyList plist; - XMLPropertyConstIterator piter; - XMLProperty *prop; - boost::shared_ptr region; - string region_name; - - in_set_state++; - - if (node.name() != "Playlist") { - in_set_state--; - return -1; - } - - freeze (); - - plist = node.properties(); - - for (piter = plist.begin(); piter != plist.end(); ++piter) { - - prop = *piter; - - if (prop->name() == X_("name")) { - _name = prop->value(); - } else if (prop->name() == X_("orig_diskstream_id")) { - _orig_diskstream_id = prop->value (); - } else if (prop->name() == X_("frozen")) { - _frozen = (prop->value() == X_("yes")); - } - } - - clear (false); - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - child = *niter; - - if (child->name() == "Region") { - - if ((prop = child->property ("id")) == 0) { - error << _("region state node has no ID, ignored") << endmsg; - continue; - } - - ID id = prop->value (); - - if ((region = region_by_id (id))) { - - Change what_changed = Change (0); - - if (region->set_live_state (*child, what_changed, true)) { - error << _("Playlist: cannot reset region state from XML") << endmsg; - continue; - } - - } else if ((region = RegionFactory::create (_session, *child, true)) == 0) { - error << _("Playlist: cannot create region from XML") << endmsg; - continue; - } - - add_region (region, region->position(), 1.0); - - // So that layer_op ordering doesn't get screwed up - region->set_last_layer_op( region->layer()); - - } - } - - notify_modified (); - - thaw (); - - /* update dependents, which was not done during add_region_internal - due to in_set_state being true - */ - - for (RegionList::iterator r = regions.begin(); r != regions.end(); ++r) { - check_dependents (*r, false); - } - - in_set_state--; - first_set_state = false; - return 0; -} - -XMLNode& -Playlist::get_state() -{ - return state(true); -} - -XMLNode& -Playlist::get_template() -{ - return state(false); -} - -XMLNode& -Playlist::state (bool full_state) -{ - XMLNode *node = new XMLNode (X_("Playlist")); - char buf[64]; - - node->add_property (X_("name"), _name); - node->add_property (X_("type"), _type.to_string()); - - _orig_diskstream_id.print (buf, sizeof (buf)); - node->add_property (X_("orig_diskstream_id"), buf); - node->add_property (X_("frozen"), _frozen ? "yes" : "no"); - - if (full_state) { - RegionLock rlock (this, false); - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - node->add_child_nocopy ((*i)->get_state()); - } - } - - if (_extra_xml) { - node->add_child_copy (*_extra_xml); - } - - return *node; -} - -bool -Playlist::empty() const -{ - RegionLock rlock (const_cast(this), false); - return regions.empty(); -} - -uint32_t -Playlist::n_regions() const -{ - RegionLock rlock (const_cast(this), false); - return regions.size(); -} - -nframes_t -Playlist::get_maximum_extent () const -{ - RegionLock rlock (const_cast(this), false); - return _get_maximum_extent (); -} - -ARDOUR::nframes_t -Playlist::_get_maximum_extent () const -{ - RegionList::const_iterator i; - nframes_t max_extent = 0; - nframes_t end = 0; - - for (i = regions.begin(); i != regions.end(); ++i) { - if ((end = (*i)->position() + (*i)->length()) > max_extent) { - max_extent = end; - } - } - - return max_extent; -} - -string -Playlist::bump_name (string name, Session &session) -{ - string newname = name; - - do { - newname = bump_name_once (newname); - } while (session.playlist_by_name (newname)!=NULL); - - return newname; -} - - -layer_t -Playlist::top_layer() const -{ - RegionLock rlock (const_cast (this)); - layer_t top = 0; - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - top = max (top, (*i)->layer()); - } - return top; -} - -void -Playlist::set_edit_mode (EditMode mode) -{ - _edit_mode = mode; -} - -/******************** - * Region Layering - ********************/ - -void -Playlist::relayer () -{ - /* don't send multiple Modified notifications - when multiple regions are relayered. - */ - - freeze (); - - /* build up a new list of regions on each layer */ - - std::vector layers; - - /* we want to go through regions from desired lowest to desired highest layer, - which depends on the layer model - */ - - RegionList copy = regions; - - /* sort according to the model */ - - if (Config->get_layer_model() == MoveAddHigher || Config->get_layer_model() == AddHigher) { - RegionSortByLastLayerOp cmp; - copy.sort (cmp); - } - - for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) { - - /* find the lowest layer that this region can go on */ - size_t j = layers.size(); - while (j > 0) { - /* try layer j - 1; it can go on if it overlaps no other region - that is already on that layer - */ - RegionList::iterator k = layers[j - 1].begin(); - while (k != layers[j - 1].end()) { - if ((*k)->overlap_equivalent (*i)) { - break; - } - k++; - } - - if (k != layers[j - 1].end()) { - /* no overlap, so we can use this layer */ - break; - } - - j--; - } - - if (j == layers.size()) { - /* we need a new layer for this region */ - layers.push_back (RegionList ()); - } - - layers[j].push_back (*i); - } - - /* first pass: set up the layer numbers in the regions */ - for (size_t j = 0; j < layers.size(); ++j) { - for (RegionList::iterator i = layers[j].begin(); i != layers[j].end(); ++i) { - (*i)->set_layer (j); - } - } - - /* sending Modified means that various kinds of layering - models operate correctly at the GUI - level. slightly inefficient, but only slightly. - - We force a Modified signal here in case no layers actually - changed. - */ - - notify_modified (); - - thaw (); -} - -/* XXX these layer functions are all deprecated */ - -void -Playlist::raise_region (boost::shared_ptr region) -{ - uint32_t rsz = regions.size(); - layer_t target = region->layer() + 1U; - - if (target >= rsz) { - /* its already at the effective top */ - return; - } - - move_region_to_layer (target, region, 1); -} - -void -Playlist::lower_region (boost::shared_ptr region) -{ - if (region->layer() == 0) { - /* its already at the bottom */ - return; - } - - layer_t target = region->layer() - 1U; - - move_region_to_layer (target, region, -1); -} - -void -Playlist::raise_region_to_top (boost::shared_ptr region) -{ - /* does nothing useful if layering mode is later=higher */ - if ((Config->get_layer_model() == MoveAddHigher) || - (Config->get_layer_model() == AddHigher)) { - timestamp_layer_op (region); - relayer (); - } -} - -void -Playlist::lower_region_to_bottom (boost::shared_ptr region) -{ - /* does nothing useful if layering mode is later=higher */ - if ((Config->get_layer_model() == MoveAddHigher) || - (Config->get_layer_model() == AddHigher)) { - region->set_last_layer_op (0); - relayer (); - } -} - -int -Playlist::move_region_to_layer (layer_t target_layer, boost::shared_ptr region, int dir) -{ - RegionList::iterator i; - typedef pair,layer_t> LayerInfo; - list layerinfo; - layer_t dest; - - { - RegionLock rlock (const_cast (this)); - - for (i = regions.begin(); i != regions.end(); ++i) { - - if (region == *i) { - continue; - } - - if (dir > 0) { - - /* region is moving up, move all regions on intermediate layers - down 1 - */ - - if ((*i)->layer() > region->layer() && (*i)->layer() <= target_layer) { - dest = (*i)->layer() - 1; - } else { - /* not affected */ - continue; - } - } else { - - /* region is moving down, move all regions on intermediate layers - up 1 - */ - - if ((*i)->layer() < region->layer() && (*i)->layer() >= target_layer) { - dest = (*i)->layer() + 1; - } else { - /* not affected */ - continue; - } - } - - LayerInfo newpair; - - newpair.first = *i; - newpair.second = dest; - - layerinfo.push_back (newpair); - } - } - - /* now reset the layers without holding the region lock */ - - for (list::iterator x = layerinfo.begin(); x != layerinfo.end(); ++x) { - x->first->set_layer (x->second); - } - - region->set_layer (target_layer); - -#if 0 - /* now check all dependents */ - - for (list::iterator x = layerinfo.begin(); x != layerinfo.end(); ++x) { - check_dependents (x->first, false); - } - - check_dependents (region, false); -#endif - - return 0; -} - -void -Playlist::nudge_after (nframes_t start, nframes_t distance, bool forwards) -{ - RegionList::iterator i; - nframes_t new_pos; - bool moved = false; - - _nudging = true; - - { - RegionLock rlock (const_cast (this)); - - for (i = regions.begin(); i != regions.end(); ++i) { - - if ((*i)->position() >= start) { - - if (forwards) { - - if ((*i)->last_frame() > max_frames - distance) { - new_pos = max_frames - (*i)->length(); - } else { - new_pos = (*i)->position() + distance; - } - - } else { - - if ((*i)->position() > distance) { - new_pos = (*i)->position() - distance; - } else { - new_pos = 0; - } - } - - (*i)->set_position (new_pos, this); - moved = true; - } - } - } - - if (moved) { - _nudging = false; - notify_length_changed (); - } - -} - -boost::shared_ptr -Playlist::find_region (const ID& id) const -{ - RegionLock rlock (const_cast (this)); - - /* searches all regions currently in use by the playlist */ - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i)->id() == id) { - return *i; - } - } - - return boost::shared_ptr (); -} - -boost::shared_ptr -Playlist::region_by_id (ID id) -{ - /* searches all regions ever added to this playlist */ - - for (set >::iterator i = all_regions.begin(); i != all_regions.end(); ++i) { - if ((*i)->id() == id) { - return *i; - } - } - return boost::shared_ptr (); -} - -void -Playlist::dump () const -{ - boost::shared_ptr r; - - cerr << "Playlist \"" << _name << "\" " << endl - << regions.size() << " regions " - << endl; - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - r = *i; - cerr << " " << r->name() << " [" - << r->start() << "+" << r->length() - << "] at " - << r->position() - << " on layer " - << r->layer () - << endl; - } -} - -void -Playlist::set_frozen (bool yn) -{ - _frozen = yn; -} - -void -Playlist::timestamp_layer_op (boost::shared_ptr region) -{ -// struct timeval tv; -// gettimeofday (&tv, 0); - region->set_last_layer_op (++layer_op_counter); -} - - -void -Playlist::shuffle (boost::shared_ptr region, int dir) -{ - bool moved = false; - nframes_t new_pos; - - if (region->locked()) { - return; - } - - _shuffling = true; - - { - RegionLock rlock (const_cast (this)); - - - if (dir > 0) { - - RegionList::iterator next; - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { - if ((*i) == region) { - next = i; - ++next; - - if (next != regions.end()) { - - if ((*next)->locked()) { - break; - } - - if ((*next)->position() != region->last_frame() + 1) { - /* they didn't used to touch, so after shuffle, - just have them swap positions. - */ - new_pos = (*next)->position(); - } else { - /* they used to touch, so after shuffle, - make sure they still do. put the earlier - region where the later one will end after - it is moved. - */ - new_pos = region->position() + (*next)->length(); - } - - (*next)->set_position (region->position(), this); - region->set_position (new_pos, this); - - /* avoid a full sort */ - - regions.erase (i); // removes the region from the list */ - next++; - regions.insert (next, region); // adds it back after next - - moved = true; - } - break; - } - } - } else { - - RegionList::iterator prev = regions.end(); - - for (RegionList::iterator i = regions.begin(); i != regions.end(); prev = i, ++i) { - if ((*i) == region) { - - if (prev != regions.end()) { - - if ((*prev)->locked()) { - break; - } - - if (region->position() != (*prev)->last_frame() + 1) { - /* they didn't used to touch, so after shuffle, - just have them swap positions. - */ - new_pos = region->position(); - } else { - /* they used to touch, so after shuffle, - make sure they still do. put the earlier - one where the later one will end after - */ - new_pos = (*prev)->position() + region->length(); - } - - region->set_position ((*prev)->position(), this); - (*prev)->set_position (new_pos, this); - - /* avoid a full sort */ - - regions.erase (i); // remove region - regions.insert (prev, region); // insert region before prev - - moved = true; - } - - break; - } - } - } - } - - _shuffling = false; - - if (moved) { - - relayer (); - check_dependents (region, false); - - notify_modified(); - } - -} - -bool -Playlist::region_is_shuffle_constrained (boost::shared_ptr) -{ - RegionLock rlock (const_cast (this)); - - if (regions.size() > 1) { - return true; - } - - return false; -} - -void -Playlist::update_after_tempo_map_change () -{ - RegionLock rlock (const_cast (this)); - RegionList copy (regions); - - freeze (); - - for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) { - (*i)->update_position_after_tempo_map_change (); - } - - thaw (); -} diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc deleted file mode 100644 index a801bae76c..0000000000 --- a/libs/ardour/playlist_factory.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -sigc::signal > PlaylistFactory::PlaylistCreated; - -boost::shared_ptr -PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden) -{ - const XMLProperty* type = node.property("type"); - - boost::shared_ptr pl; - - if ( !type || type->value() == "audio" ) - pl = boost::shared_ptr (new AudioPlaylist (s, node, hidden)); - else if ( type->value() == "midi" ) - pl = boost::shared_ptr (new MidiPlaylist (s, node, hidden)); - - pl->set_region_ownership (); - - if (pl && !hidden) { - PlaylistCreated (pl); - } - return pl; -} - -boost::shared_ptr -PlaylistFactory::create (DataType type, Session& s, string name, bool hidden) -{ - boost::shared_ptr pl; - - if (type == DataType::AUDIO) - pl = boost::shared_ptr (new AudioPlaylist (s, name, hidden)); - else if (type == DataType::MIDI) - pl = boost::shared_ptr (new MidiPlaylist (s, name, hidden)); - - if (pl && !hidden) { - PlaylistCreated (pl); - } - - return pl; -} - -boost::shared_ptr -PlaylistFactory::create (boost::shared_ptr old, string name, bool hidden) -{ - boost::shared_ptr pl; - boost::shared_ptr apl; - boost::shared_ptr mpl; - - if ((apl = boost::dynamic_pointer_cast (old)) != 0) { - pl = boost::shared_ptr (new AudioPlaylist (apl, name, hidden)); - pl->set_region_ownership (); - } else if ((mpl = boost::dynamic_pointer_cast (old)) != 0) { - pl = boost::shared_ptr (new MidiPlaylist (mpl, name, hidden)); - pl->set_region_ownership (); - } - - if (pl && !hidden) { - PlaylistCreated (pl); - } - - return pl; -} - -boost::shared_ptr -PlaylistFactory::create (boost::shared_ptr old, nframes_t start, nframes_t cnt, string name, bool hidden) -{ - boost::shared_ptr pl; - boost::shared_ptr apl; - boost::shared_ptr mpl; - - if ((apl = boost::dynamic_pointer_cast (old)) != 0) { - pl = boost::shared_ptr (new AudioPlaylist (apl, start, cnt, name, hidden)); - pl->set_region_ownership (); - } else if ((mpl = boost::dynamic_pointer_cast (old)) != 0) { - pl = boost::shared_ptr (new MidiPlaylist (mpl, start, cnt, name, hidden)); - pl->set_region_ownership (); - } - - /* this factory method does NOT notify others */ - - return pl; -} diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc deleted file mode 100644 index 3d218448dd..0000000000 --- a/libs/ardour/plugin.cc +++ /dev/null @@ -1,243 +0,0 @@ -/* - Copyright (C) 2000-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include // so libraptor doesn't complain -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_AUDIOUNITS -#include -#endif - -#ifdef HAVE_SLV2 -#include -#endif - -#include - -#include "i18n.h" -#include - -using namespace ARDOUR; -using namespace PBD; - -Plugin::Plugin (AudioEngine& e, Session& s) - : _engine (e), _session (s) -{ -} - -Plugin::Plugin (const Plugin& other) - : _engine (other._engine), _session (other._session), _info (other._info) -{ -} - -Plugin::~Plugin () -{ -} - -vector -Plugin::get_presets() -{ - vector labels; - uint32_t id; - std::string unique (unique_id()); - - /* XXX problem: AU plugins don't have numeric ID's. - Solution: they have a different method of providing presets. - XXX sub-problem: implement it. - */ - - if (!isdigit (unique[0])) { - return labels; - } - - id = atol (unique.c_str()); - - lrdf_uris* set_uris = lrdf_get_setting_uris(id); - - if (set_uris) { - for (uint32_t i = 0; i < (uint32_t) set_uris->count; ++i) { - if (char* label = lrdf_get_label(set_uris->items[i])) { - labels.push_back(label); - presets[label] = set_uris->items[i]; - } - } - lrdf_free_uris(set_uris); - } - - // GTK2FIX find an equivalent way to do this with a vector (needed by GUI apis) - // labels.unique(); - - return labels; -} - -bool -Plugin::load_preset(const string preset_label) -{ - lrdf_defaults* defs = lrdf_get_setting_values(presets[preset_label].c_str()); - - if (defs) { - for (uint32_t i = 0; i < (uint32_t) defs->count; ++i) { - // The defs->items[i].pid < defs->count check is to work around - // a bug in liblrdf that saves invalid values into the presets file. - if (((uint32_t) defs->items[i].pid < (uint32_t) defs->count) && parameter_is_input (defs->items[i].pid)) { - set_parameter(defs->items[i].pid, defs->items[i].value); - } - } - lrdf_free_setting_values(defs); - } - - return true; -} - -bool -Plugin::save_preset (string name, string domain) -{ - lrdf_portvalue portvalues[parameter_count()]; - lrdf_defaults defaults; - uint32_t id; - std::string unique (unique_id()); - - /* XXX problem: AU plugins don't have numeric ID's. - Solution: they have a different method of providing/saving presets. - XXX sub-problem: implement it. - */ - - if (!isdigit (unique[0])) { - return false; - } - - id = atol (unique.c_str()); - - defaults.count = parameter_count(); - defaults.items = portvalues; - - for (uint32_t i = 0; i < parameter_count(); ++i) { - if (parameter_is_input (i)) { - portvalues[i].pid = i; - portvalues[i].value = get_parameter(i); - } - } - - char* envvar; - if ((envvar = getenv ("HOME")) == 0) { - warning << _("Could not locate HOME. Preset not saved.") << endmsg; - return false; - } - - string source(string_compose("file:%1/.%2/rdf/ardour-presets.n3", envvar, domain)); - - free(lrdf_add_preset(source.c_str(), name.c_str(), id, &defaults)); - - string path = string_compose("%1/.%2", envvar, domain); - if (g_mkdir_with_parents (path.c_str(), 0775)) { - warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg; - return false; - } - - path += "/rdf"; - if (g_mkdir_with_parents (path.c_str(), 0775)) { - warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg; - return false; - } - - if (lrdf_export_by_source(source.c_str(), source.substr(5).c_str())) { - warning << string_compose(_("Error saving presets file %1."), source) << endmsg; - return false; - } - - return true; -} - -PluginPtr -ARDOUR::find_plugin(Session& session, string identifier, PluginType type) -{ - PluginManager *mgr = PluginManager::the_manager(); - PluginInfoList plugs; - - switch (type) { - case ARDOUR::LADSPA: - plugs = mgr->ladspa_plugin_info(); - break; - -#ifdef HAVE_SLV2 - case ARDOUR::LV2: - plugs = mgr->lv2_plugin_info(); - break; -#endif - -#ifdef VST_SUPPORT - case ARDOUR::VST: - plugs = mgr->vst_plugin_info(); - break; -#endif - -#ifdef HAVE_AUDIOUNITS - case ARDOUR::AudioUnit: - plugs = mgr->au_plugin_info(); - break; -#endif - - default: - return PluginPtr ((Plugin *) 0); - } - - PluginInfoList::iterator i; - - for (i = plugs.begin(); i != plugs.end(); ++i) { - if (identifier == (*i)->unique_id){ - return (*i)->load (session); - } - } - -#ifdef VST_SUPPORT - /* hmm, we didn't find it. could be because in older versions of Ardour. - we used to store the name of a VST plugin, not its unique ID. so try - again. - */ - - for (i = plugs.begin(); i != plugs.end(); ++i) { - if (identifier == (*i)->name){ - return (*i)->load (session); - } - } -#endif - - return PluginPtr ((Plugin*) 0); -} - diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc deleted file mode 100644 index 26d344dee4..0000000000 --- a/libs/ardour/plugin_insert.cc +++ /dev/null @@ -1,917 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_SLV2 -#include -#endif - -#ifdef VST_SUPPORT -#include -#endif - -#ifdef HAVE_AUDIOUNITS -#include -#endif - -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -const string PluginInsert::port_automation_node_name = "PortAutomation"; - -PluginInsert::PluginInsert (Session& s, boost::shared_ptr plug, Placement placement) - : Processor (s, plug->name(), placement) -{ - /* the first is the master */ - - _plugins.push_back (plug); - - init (); - - { - Glib::Mutex::Lock em (_session.engine().process_lock()); - IO::PortCountChanged (max(input_streams(), output_streams())); - } - - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -PluginInsert::PluginInsert (Session& s, const XMLNode& node) - : Processor (s, "unnamed plugin insert", PreFader) -{ - if (set_state (node)) { - throw failed_constructor(); - } - - // set_automatable (); - - { - Glib::Mutex::Lock em (_session.engine().process_lock()); - IO::PortCountChanged (max(input_streams(), output_streams())); - } -} - -PluginInsert::PluginInsert (const PluginInsert& other) - : Processor (other._session, other._name, other.placement()) -{ - uint32_t count = other._plugins.size(); - - /* make as many copies as requested */ - for (uint32_t n = 0; n < count; ++n) { - _plugins.push_back (plugin_factory (other.plugin (n))); - } - - init (); - - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -bool -PluginInsert::set_count (uint32_t num) -{ - bool require_state = !_plugins.empty(); - - /* this is a bad idea.... we shouldn't do this while active. - only a route holding their redirect_lock should be calling this - */ - - if (num == 0) { - return false; - } else if (num > _plugins.size()) { - uint32_t diff = num - _plugins.size(); - - for (uint32_t n = 0; n < diff; ++n) { - _plugins.push_back (plugin_factory (_plugins[0])); - - if (require_state) { - /* XXX do something */ - } - } - - } else if (num < _plugins.size()) { - uint32_t diff = _plugins.size() - num; - for (uint32_t n= 0; n < diff; ++n) { - _plugins.pop_back(); - } - } - - return true; -} - -void -PluginInsert::init () -{ - set_automatable (); -} - -PluginInsert::~PluginInsert () -{ - GoingAway (); /* EMIT SIGNAL */ -} - -void -PluginInsert::auto_state_changed (Parameter which) -{ - if (which.type() != PluginAutomation) - return; - - boost::shared_ptr c = control (which); - - if (c && c->list()->automation_state() != Off) { - _plugins[0]->set_parameter (which.id(), c->list()->eval (_session.transport_frame())); - } -} - -ChanCount -PluginInsert::output_streams() const -{ - if (_configured) - return output_for_input_configuration(_configured_input); - else - return natural_output_streams(); -} - -ChanCount -PluginInsert::input_streams() const -{ - if (_configured) - return _configured_input; - else - return natural_input_streams(); -} - -ChanCount -PluginInsert::natural_output_streams() const -{ - return _plugins[0]->get_info()->n_outputs; -} - -ChanCount -PluginInsert::natural_input_streams() const -{ - return _plugins[0]->get_info()->n_inputs; -} - -bool -PluginInsert::is_generator() const -{ - /* XXX more finesse is possible here. VST plugins have a - a specific "instrument" flag, for example. - */ - - return _plugins[0]->get_info()->n_inputs.n_audio() == 0; -} - -void -PluginInsert::set_automatable () -{ - set a = _plugins.front()->automatable (); - - Plugin::ParameterDescriptor desc; - - for (set::iterator i = a.begin(); i != a.end(); ++i) { - if (i->type() == PluginAutomation) { - can_automate (*i); - _plugins.front()->get_parameter_descriptor(i->id(), desc); - boost::shared_ptr list(new AutomationList( - *i, - //(desc.min_unbound ? FLT_MIN : desc.lower), - //(desc.max_unbound ? FLT_MAX : desc.upper), - desc.lower, desc.upper, - _plugins.front()->default_value(i->id()))); - - add_control(boost::shared_ptr( - new PluginControl(*this, list))); - } - } -} - -void -PluginInsert::parameter_changed (Parameter which, float val) -{ - if (which.type() != PluginAutomation) - return; - - vector >::iterator i = _plugins.begin(); - - /* don't set the first plugin, just all the slaves */ - - if (i != _plugins.end()) { - ++i; - for (; i != _plugins.end(); ++i) { - (*i)->set_parameter (which, val); - } - } -} - -void -PluginInsert::set_block_size (nframes_t nframes) -{ - for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->set_block_size (nframes); - } -} - -void -PluginInsert::activate () -{ - for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->activate (); - } -} - -void -PluginInsert::deactivate () -{ - for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->deactivate (); - } -} - -void -PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now) -{ - uint32_t in_index = 0; - uint32_t out_index = 0; - - /* Note that we've already required that plugins - be able to handle in-place processing. - */ - - if (with_auto) { - - uint32_t n = 0; - - for (Controls::iterator li = _controls.begin(); li != _controls.end(); ++li, ++n) { - - boost::shared_ptr c = li->second; - - if (c->parameter().type() == PluginAutomation && c->list()->automation_playback()) { - bool valid; - - const float val = c->list()->rt_safe_eval (now, valid); - - if (valid) { - c->set_value(val); - } - - } - } - } - - for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->connect_and_run (bufs, in_index, out_index, nframes, offset); - } - - /* leave remaining channel buffers alone */ -} - -void -PluginInsert::silence (nframes_t nframes, nframes_t offset) -{ - uint32_t in_index = 0; - uint32_t out_index = 0; - - if (active()) { - for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->connect_and_run (_session.get_silent_buffers ((*i)->get_info()->n_inputs), in_index, out_index, nframes, offset); - } - } -} - -void -PluginInsert::run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) -{ - if (active()) { - - if (_session.transport_rolling()) { - automation_run (bufs, nframes, offset); - } else { - connect_and_run (bufs, nframes, offset, false); - } - } else { - - /* FIXME: type, audio only */ - - uint32_t in = _plugins[0]->get_info()->n_inputs.n_audio(); - uint32_t out = _plugins[0]->get_info()->n_outputs.n_audio(); - - if (out > in) { - - /* not active, but something has make up for any channel count increase */ - - for (uint32_t n = out - in; n < out; ++n) { - memcpy (bufs.get_audio(n).data(nframes, offset), bufs.get_audio(in - 1).data(nframes, offset), sizeof (Sample) * nframes); - } - } - - bufs.count().set_audio(out); - } -} - -void -PluginInsert::set_parameter (Parameter param, float val) -{ - if (param.type() != PluginAutomation) - return; - - /* the others will be set from the event triggered by this */ - - _plugins[0]->set_parameter (param.id(), val); - - boost::shared_ptr c = control (param); - - if (c) - c->set_value(val); - - _session.set_dirty(); -} - -float -PluginInsert::get_parameter (Parameter param) -{ - if (param.type() != PluginAutomation) - return 0.0; - else - return - _plugins[0]->get_parameter (param.id()); -} - -void -PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offset) -{ - ControlEvent next_event (0, 0.0f); - nframes_t now = _session.transport_frame (); - nframes_t end = now + nframes; - - Glib::Mutex::Lock lm (_automation_lock, Glib::TRY_LOCK); - - if (!lm.locked()) { - connect_and_run (bufs, nframes, offset, false); - return; - } - - if (!find_next_event (now, end, next_event)) { - - /* no events have a time within the relevant range */ - - connect_and_run (bufs, nframes, offset, true, now); - return; - } - - while (nframes) { - - nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes); - - connect_and_run (bufs, cnt, offset, true, now); - - nframes -= cnt; - offset += cnt; - now += cnt; - - if (!find_next_event (now, end, next_event)) { - break; - } - } - - /* cleanup anything that is left to do */ - - if (nframes) { - connect_and_run (bufs, nframes, offset, true, now); - } -} - -float -PluginInsert::default_parameter_value (Parameter param) -{ - if (param.type() != PluginAutomation) - return 1.0; - - if (_plugins.empty()) { - fatal << _("programming error: ") << X_("PluginInsert::default_parameter_value() called with no plugin") - << endmsg; - /*NOTREACHED*/ - } - - return _plugins[0]->default_value (param.id()); -} - -boost::shared_ptr -PluginInsert::plugin_factory (boost::shared_ptr other) -{ - boost::shared_ptr lp; -#ifdef HAVE_SLV2 - boost::shared_ptr lv2p; -#endif -#ifdef VST_SUPPORT - boost::shared_ptr vp; -#endif -#ifdef HAVE_AUDIOUNITS - boost::shared_ptr ap; -#endif - - if ((lp = boost::dynamic_pointer_cast (other)) != 0) { - return boost::shared_ptr (new LadspaPlugin (*lp)); -#ifdef HAVE_SLV2 - } else if ((lv2p = boost::dynamic_pointer_cast (other)) != 0) { - return boost::shared_ptr (new LV2Plugin (*lv2p)); -#endif -#ifdef VST_SUPPORT - } else if ((vp = boost::dynamic_pointer_cast (other)) != 0) { - return boost::shared_ptr (new VSTPlugin (*vp)); -#endif -#ifdef HAVE_AUDIOUNITS - } else if ((ap = boost::dynamic_pointer_cast (other)) != 0) { - return boost::shared_ptr (new AUPlugin (*ap)); -#endif - } - - fatal << string_compose (_("programming error: %1"), - X_("unknown plugin type in PluginInsert::plugin_factory")) - << endmsg; - /*NOTREACHED*/ - return boost::shared_ptr ((Plugin*) 0); -} - -bool -PluginInsert::configure_io (ChanCount in, ChanCount out) -{ - ChanCount matching_out = output_for_input_configuration(out); - if (matching_out != out) { - _configured = false; - return false; - } else { - bool success = set_count (count_for_configuration(in, out)); - if (success) - Processor::configure_io(in, out); - return success; - } -} - -bool -PluginInsert::can_support_input_configuration (ChanCount in) const -{ - ChanCount outputs = _plugins[0]->get_info()->n_outputs; - ChanCount inputs = _plugins[0]->get_info()->n_inputs; - - /* see output_for_input_configuration below */ - if ((inputs.n_total() == 0) - || (inputs.n_total() == 1 && outputs == inputs) - || (inputs.n_total() == 1 && outputs == inputs - && ((inputs.n_audio() == 0 && in.n_audio() == 0) - || (inputs.n_midi() == 0 && in.n_midi() == 0))) - || (inputs == in)) { - return true; - } - - bool can_replicate = true; - - /* if number of inputs is a factor of the requested input - configuration for every type, we can replicate. - */ - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - if (inputs.get(*t) >= in.get(*t) || (inputs.get(*t) % in.get(*t) != 0)) { - can_replicate = false; - break; - } - } - - if (can_replicate && (in.n_total() % inputs.n_total() == 0)) { - return true; - } else { - return false; - } -} - -ChanCount -PluginInsert::output_for_input_configuration (ChanCount in) const -{ - ChanCount outputs = _plugins[0]->get_info()->n_outputs; - ChanCount inputs = _plugins[0]->get_info()->n_inputs; - - if (inputs.n_total() == 0) { - /* instrument plugin, always legal, but throws away any existing streams */ - return outputs; - } - - if (inputs.n_total() == 1 && outputs == inputs - && ((inputs.n_audio() == 0 && in.n_audio() == 0) - || (inputs.n_midi() == 0 && in.n_midi() == 0))) { - /* mono plugin, replicate as needed to match in */ - return in; - } - - if (inputs == in) { - /* exact match */ - return outputs; - } - - bool can_replicate = true; - - /* if number of inputs is a factor of the requested input - configuration for every type, we can replicate. - */ - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - if (inputs.get(*t) >= in.get(*t) || (in.get(*t) % inputs.get(*t) != 0)) { - can_replicate = false; - break; - } - } - - if (can_replicate && (inputs.n_total() % in.n_total() == 0)) { - ChanCount output; - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - output.set(*t, outputs.get(*t) * (in.get(*t) / inputs.get(*t))); - } - - return output; - } - - /* sorry */ - return ChanCount(); -} - -/* Number of plugin instances required to support a given channel configuration. - * (private helper) - */ -int32_t -PluginInsert::count_for_configuration (ChanCount in, ChanCount out) const -{ - // FIXME: take 'out' into consideration - - ChanCount outputs = _plugins[0]->get_info()->n_outputs; - ChanCount inputs = _plugins[0]->get_info()->n_inputs; - - if (inputs.n_total() == 0) { - /* instrument plugin, always legal, but throws away any existing streams */ - return 1; - } - - if (inputs.n_total() == 1 && outputs == inputs - && ((inputs.n_audio() == 0 && in.n_audio() == 0) - || (inputs.n_midi() == 0 && in.n_midi() == 0))) { - /* mono plugin, replicate as needed to match in */ - return in.n_total(); - } - - if (inputs == in) { - /* exact match */ - return 1; - } - - // assumes in is valid, so we must be replicating - if (inputs.n_total() < in.n_total() - && (in.n_total() % inputs.n_total() == 0)) { - - return in.n_total() / inputs.n_total(); - } - - /* err... */ - return 0; -} - -XMLNode& -PluginInsert::get_state(void) -{ - return state (true); -} - -XMLNode& -PluginInsert::state (bool full) -{ - XMLNode& node = Processor::state (full); - - node.add_property ("type", _plugins[0]->state_node_name()); - node.add_property("unique-id", _plugins[0]->unique_id()); - node.add_property("count", string_compose("%1", _plugins.size())); - node.add_child_nocopy (_plugins[0]->get_state()); - - /* add port automation state */ - XMLNode *autonode = new XMLNode(port_automation_node_name); - set automatable = _plugins[0]->automatable(); - - for (set::iterator x = automatable.begin(); x != automatable.end(); ++x) { - - /*XMLNode* child = new XMLNode("port"); - snprintf(buf, sizeof(buf), "%" PRIu32, *x); - child->add_property("number", string(buf)); - - child->add_child_nocopy (automation_list (*x).state (full)); - autonode->add_child_nocopy (*child); - */ - autonode->add_child_nocopy (control(*x)->list()->state (full)); - } - - node.add_child_nocopy (*autonode); - - return node; -} - -int -PluginInsert::set_state(const XMLNode& node) -{ - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - XMLPropertyList plist; - const XMLProperty *prop; - ARDOUR::PluginType type; - - if ((prop = node.property ("type")) == 0) { - error << _("XML node describing insert is missing the `type' field") << endmsg; - return -1; - } - - if (prop->value() == X_("ladspa") || prop->value() == X_("Ladspa")) { /* handle old school sessions */ - type = ARDOUR::LADSPA; - } else if (prop->value() == X_("lv2")) { - type = ARDOUR::LV2; - } else if (prop->value() == X_("vst")) { - type = ARDOUR::VST; - } else { - error << string_compose (_("unknown plugin type %1 in plugin insert state"), - prop->value()) - << endmsg; - return -1; - } - - prop = node.property ("unique-id"); - if (prop == 0) { - error << _("Plugin has no unique ID field") << endmsg; - return -1; - } - - boost::shared_ptr plugin; - - plugin = find_plugin (_session, prop->value(), type); - - if (plugin == 0) { - error << string_compose(_("Found a reference to a plugin (\"%1\") that is unknown.\n" - "Perhaps it was removed or moved since it was last used."), prop->value()) - << endmsg; - return -1; - } - - uint32_t count = 1; - - if ((prop = node.property ("count")) != 0) { - sscanf (prop->value().c_str(), "%u", &count); - } - - if (_plugins.size() != count) { - - _plugins.push_back (plugin); - - for (uint32_t n=1; n < count; ++n) { - _plugins.push_back (plugin_factory (plugin)); - } - } - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == plugin->state_node_name()) { - for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->set_state (**niter); - } - break; - } - } - - const XMLNode* insert_node = &node; - - // legacy sessions: search for child IOProcessor node - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "IOProcessor") { - insert_node = *niter; - break; - } - } - - Processor::set_state (*insert_node); - - /* look for port automation node */ - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - if ((*niter)->name() != port_automation_node_name) { - continue; - } - - XMLNodeList cnodes; - XMLProperty *cprop; - XMLNodeConstIterator iter; - XMLNode *child; - const char *port; - uint32_t port_id; - - cnodes = (*niter)->children ("port"); - - for(iter = cnodes.begin(); iter != cnodes.end(); ++iter){ - - child = *iter; - - if ((cprop = child->property("number")) != 0) { - port = cprop->value().c_str(); - } else { - warning << _("PluginInsert: Auto: no ladspa port number") << endmsg; - continue; - } - - sscanf (port, "%" PRIu32, &port_id); - - if (port_id >= _plugins[0]->parameter_count()) { - warning << _("PluginInsert: Auto: port id out of range") << endmsg; - continue; - } - - if (!child->children().empty()) { - control (Parameter(PluginAutomation, port_id), true)->list()->set_state (*child->children().front()); - } else { - if ((cprop = child->property("auto")) != 0) { - - /* old school */ - - int x; - sscanf (cprop->value().c_str(), "0x%x", &x); - control (Parameter(PluginAutomation, port_id), true)->list()->set_automation_state (AutoState (x)); - - } else { - - /* missing */ - - control (Parameter(PluginAutomation, port_id), true)->list()->set_automation_state (Off); - } - } - - } - - /* done */ - - break; - } - - if (niter == nlist.end()) { - warning << string_compose(_("XML node describing a port automation is missing the `%1' information"), port_automation_node_name) << endmsg; - } - - // The name of the PluginInsert comes from the plugin, nothing else - _name = plugin->get_info()->name; - - return 0; -} - -string -PluginInsert::describe_parameter (Parameter param) -{ - if (param.type() != PluginAutomation) - return Automatable::describe_parameter(param); - - return _plugins[0]->describe_parameter (param); -} - -ARDOUR::nframes_t -PluginInsert::signal_latency() const -{ - if (_user_latency) { - return _user_latency; - } - - return _plugins[0]->signal_latency (); -} - -ARDOUR::PluginType -PluginInsert::type () -{ - boost::shared_ptr lp; -#ifdef VST_SUPPORT - boost::shared_ptr vp; -#endif -#ifdef HAVE_AUDIOUNITS - boost::shared_ptr ap; -#endif - - PluginPtr other = plugin (); - - if ((lp = boost::dynamic_pointer_cast (other)) != 0) { - return ARDOUR::LADSPA; -#ifdef VST_SUPPORT - } else if ((vp = boost::dynamic_pointer_cast (other)) != 0) { - return ARDOUR::VST; -#endif -#ifdef HAVE_AUDIOUNITS - } else if ((ap = boost::dynamic_pointer_cast (other)) != 0) { - return ARDOUR::AudioUnit; -#endif - } else { - /* NOT REACHED */ - return (ARDOUR::PluginType) 0; - } -} - -PluginInsert::PluginControl::PluginControl (PluginInsert& p, boost::shared_ptr list) - : AutomationControl (p.session(), list, p.describe_parameter(list->parameter())) - , _plugin (p) - , _list (list) -{ - Plugin::ParameterDescriptor desc; - p.plugin(0)->get_parameter_descriptor (list->parameter().id(), desc); - _logarithmic = desc.logarithmic; - _toggled = desc.toggled; -} - -void -PluginInsert::PluginControl::set_value (float val) -{ - /* FIXME: probably should be taking out some lock here.. */ - - if (_toggled) { - if (val > 0.5) { - val = 1.0; - } else { - val = 0.0; - } - } else { - - /*const float range = _list->get_max_y() - _list->get_min_y(); - const float lower = _list->get_min_y(); - - if (!_logarithmic) { - val = lower + (range * val); - } else { - float log_lower = 0.0f; - if (lower > 0.0f) { - log_lower = log(lower); - } - - val = exp(log_lower + log(range) * val); - }*/ - - } - - for (vector >::iterator i = _plugin._plugins.begin(); - i != _plugin._plugins.end(); ++i) { - (*i)->set_parameter (_list->parameter().id(), val); - } - - AutomationControl::set_value(val); -} - -float -PluginInsert::PluginControl::get_value (void) const -{ - /* FIXME: probably should be taking out some lock here.. */ - - float val = _plugin.get_parameter (_list->parameter()); - - return val; - - /*if (_toggled) { - - return val; - - } else { - - if (_logarithmic) { - val = log(val); - } - - return ((val - lower) / range); - }*/ -} - diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc deleted file mode 100644 index 6ff780a25f..0000000000 --- a/libs/ardour/plugin_manager.cc +++ /dev/null @@ -1,489 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define __STDC_FORMAT_MACROS 1 -#include - -#include -#include -#include -#include - -#ifdef VST_SUPPORT -#include -#include -#include -#endif // VST_SUPPORT - -#include - -#include -#include -#include -#include -#include - -#ifdef HAVE_SLV2 -#include -#include -#endif - -#ifdef VST_SUPPORT -#include -#endif - -#ifdef HAVE_AUDIOUNITS -#include -#endif - -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -PluginManager* PluginManager::_manager = 0; - -PluginManager::PluginManager () -{ - char* s; - string lrdf_path; - - if ((s = getenv ("LADSPA_RDF_PATH"))){ - lrdf_path = s; - } - - if (lrdf_path.length() == 0) { - lrdf_path = "/usr/local/share/ladspa/rdf:/usr/share/ladspa/rdf"; - } - - add_lrdf_data(lrdf_path); - add_ladspa_presets(); -#ifdef VST_SUPPORT - if (Config->get_use_vst()) { - add_vst_presets(); - } -#endif /* VST_SUPPORT */ - - if ((s = getenv ("LADSPA_PATH"))) { - ladspa_path = s; - } - - if ((s = getenv ("VST_PATH"))) { - vst_path = s; - } else if ((s = getenv ("VST_PLUGINS"))) { - vst_path = s; - } - - if (_manager == 0) { - _manager = this; - } - - /* the plugin manager is constructed too early to use Profile */ - - if (getenv ("ARDOUR_SAE")) { - ladspa_plugin_whitelist.push_back (1203); // single band parametric - ladspa_plugin_whitelist.push_back (1772); // caps compressor - ladspa_plugin_whitelist.push_back (1913); // fast lookahead limiter - ladspa_plugin_whitelist.push_back (1075); // simple RMS expander - ladspa_plugin_whitelist.push_back (1061); // feedback delay line (max 5s) - ladspa_plugin_whitelist.push_back (1216); // gverb - ladspa_plugin_whitelist.push_back (2150); // tap pitch shifter - } - -#ifdef HAVE_SLV2 - _lv2_world = new LV2World(); -#endif - - refresh (); -} - -void -PluginManager::refresh () -{ - ladspa_refresh (); -#ifdef HAVE_SLV2 - lv2_refresh (); -#endif -#ifdef VST_SUPPORT - if (Config->get_use_vst()) { - vst_refresh (); - } -#endif // VST_SUPPORT -#ifdef HAVE_AUDIOUNITS - au_refresh (); -#endif -} - -void -PluginManager::ladspa_refresh () -{ - _ladspa_plugin_info.clear (); - - if (ladspa_path.length() == 0) { - ladspa_path = "/usr/local/lib64/ladspa:/usr/local/lib/ladspa:/usr/lib64/ladspa:/usr/lib/ladspa:/Library/Audio/Plug-Ins/LADSPA"; - } - - ladspa_discover_from_path (ladspa_path); -} - - -int -PluginManager::add_ladspa_directory (string path) -{ - if (ladspa_discover_from_path (path) == 0) { - ladspa_path += ':'; - ladspa_path += path; - return 0; - } - return -1; -} - -static bool ladspa_filter (const string& str, void *arg) -{ - /* Not a dotfile, has a prefix before a period, suffix is "so" */ - - return str[0] != '.' && (str.length() > 3 && str.find (".so") == (str.length() - 3)); -} - -int -PluginManager::ladspa_discover_from_path (string path) -{ - PathScanner scanner; - vector *plugin_objects; - vector::iterator x; - int ret = 0; - - plugin_objects = scanner (ladspa_path, ladspa_filter, 0, true, true); - - if (plugin_objects) { - for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) { - ladspa_discover (**x); - } - } - - vector_delete (plugin_objects); - return ret; -} - -static bool rdf_filter (const string &str, void *arg) -{ - return str[0] != '.' && - ((str.find(".rdf") == (str.length() - 4)) || - (str.find(".rdfs") == (str.length() - 5)) || - (str.find(".n3") == (str.length() - 3))); -} - -void -PluginManager::add_ladspa_presets() -{ - add_presets ("ladspa"); -} - -void -PluginManager::add_vst_presets() -{ - add_presets ("vst"); -} -void -PluginManager::add_presets(string domain) -{ - - PathScanner scanner; - vector *presets; - vector::iterator x; - - char* envvar; - if ((envvar = getenv ("HOME")) == 0) { - return; - } - - string path = string_compose("%1/.%2/rdf", envvar, domain); - presets = scanner (path, rdf_filter, 0, true, true); - - if (presets) { - for (x = presets->begin(); x != presets->end (); ++x) { - string file = "file:" + **x; - if (lrdf_read_file(file.c_str())) { - warning << string_compose(_("Could not parse rdf file: %1"), *x) << endmsg; - } - } - } - - vector_delete (presets); -} - -void -PluginManager::add_lrdf_data (const string &path) -{ - PathScanner scanner; - vector* rdf_files; - vector::iterator x; - string uri; - - rdf_files = scanner (path, rdf_filter, 0, true, true); - - if (rdf_files) { - for (x = rdf_files->begin(); x != rdf_files->end (); ++x) { - uri = "file://" + **x; - - if (lrdf_read_file(uri.c_str())) { - warning << "Could not parse rdf file: " << uri << endmsg; - } - } - } - - vector_delete (rdf_files); -} - -int -PluginManager::ladspa_discover (string path) -{ - void *module; - const LADSPA_Descriptor *descriptor; - LADSPA_Descriptor_Function dfunc; - const char *errstr; - - if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) { - error << string_compose(_("LADSPA: cannot load module \"%1\" (%2)"), path, dlerror()) << endmsg; - return -1; - } - - dfunc = (LADSPA_Descriptor_Function) dlsym (module, "ladspa_descriptor"); - - if ((errstr = dlerror()) != 0) { - error << string_compose(_("LADSPA: module \"%1\" has no descriptor function."), path) << endmsg; - error << errstr << endmsg; - dlclose (module); - return -1; - } - - for (uint32_t i = 0; ; ++i) { - if ((descriptor = dfunc (i)) == 0) { - break; - } - - if (!ladspa_plugin_whitelist.empty()) { - if (find (ladspa_plugin_whitelist.begin(), ladspa_plugin_whitelist.end(), descriptor->UniqueID) == ladspa_plugin_whitelist.end()) { - continue; - } - } - - PluginInfoPtr info(new LadspaPluginInfo); - info->name = descriptor->Name; - info->category = get_ladspa_category(descriptor->UniqueID); - info->creator = descriptor->Maker; - info->path = path; - info->index = i; - info->n_inputs = ChanCount(); - info->n_outputs = ChanCount(); - info->type = ARDOUR::LADSPA; - - char buf[32]; - snprintf (buf, sizeof (buf), "%lu", descriptor->UniqueID); - info->unique_id = buf; - - for (uint32_t n=0; n < descriptor->PortCount; ++n) { - if ( LADSPA_IS_PORT_AUDIO (descriptor->PortDescriptors[n]) ) { - if ( LADSPA_IS_PORT_INPUT (descriptor->PortDescriptors[n]) ) { - info->n_inputs.set_audio(info->n_inputs.n_audio() + 1); - } - else if ( LADSPA_IS_PORT_OUTPUT (descriptor->PortDescriptors[n]) ) { - info->n_outputs.set_audio(info->n_outputs.n_audio() + 1); - } - } - } - - _ladspa_plugin_info.push_back (info); - } - -// GDB WILL NOT LIKE YOU IF YOU DO THIS -// dlclose (module); - - return 0; -} - -string -PluginManager::get_ladspa_category (uint32_t plugin_id) -{ - char buf[256]; - lrdf_statement pattern; - - snprintf(buf, sizeof(buf), "%s%" PRIu32, LADSPA_BASE, plugin_id); - pattern.subject = buf; - pattern.predicate = (char*)RDF_TYPE; - pattern.object = 0; - pattern.object_type = lrdf_uri; - - lrdf_statement* matches1 = lrdf_matches (&pattern); - - if (!matches1) { - return ""; - } - - pattern.subject = matches1->object; - pattern.predicate = (char*)(LADSPA_BASE "hasLabel"); - pattern.object = 0; - pattern.object_type = lrdf_literal; - - lrdf_statement* matches2 = lrdf_matches (&pattern); - lrdf_free_statements(matches1); - - if (!matches2) { - return (""); - } - - string label = matches2->object; - lrdf_free_statements(matches2); - - return label; -} - -#ifdef HAVE_SLV2 -void -PluginManager::lv2_refresh () -{ - lv2_discover(); -} - -int -PluginManager::lv2_discover () -{ - _lv2_plugin_info = LV2PluginInfo::discover(_lv2_world); - return 0; -} -#endif - -#ifdef HAVE_AUDIOUNITS -void -PluginManager::au_refresh () -{ - au_discover(); -} - -int -PluginManager::au_discover () -{ - _au_plugin_info = AUPluginInfo::discover(); - return 0; -} - -#endif - -#ifdef VST_SUPPORT - -void -PluginManager::vst_refresh () -{ - _vst_plugin_info.clear (); - - if (vst_path.length() == 0) { - vst_path = "/usr/local/lib/vst:/usr/lib/vst"; - } - - vst_discover_from_path (vst_path); -} - -int -PluginManager::add_vst_directory (string path) -{ - if (vst_discover_from_path (path) == 0) { - vst_path += ':'; - vst_path += path; - return 0; - } - return -1; -} - -static bool vst_filter (const string& str, void *arg) -{ - /* Not a dotfile, has a prefix before a period, suffix is "dll" */ - - return str[0] != '.' && (str.length() > 4 && str.find (".dll") == (str.length() - 4)); -} - -int -PluginManager::vst_discover_from_path (string path) -{ - PathScanner scanner; - vector *plugin_objects; - vector::iterator x; - int ret = 0; - - info << "detecting VST plugins along " << path << endmsg; - - plugin_objects = scanner (vst_path, vst_filter, 0, true, true); - - if (plugin_objects) { - for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) { - vst_discover (**x); - } - } - - vector_delete (plugin_objects); - return ret; -} - -int -PluginManager::vst_discover (string path) -{ - FSTInfo* finfo; - char buf[32]; - - if ((finfo = fst_get_info (const_cast (path.c_str()))) == 0) { - warning << "Cannot get VST information from " << path << endmsg; - return -1; - } - - if (!finfo->canProcessReplacing) { - warning << string_compose (_("VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time"), - finfo->name) - << endl; - } - - PluginInfoPtr info(new VSTPluginInfo); - - /* what a goddam joke freeware VST is */ - - if (!strcasecmp ("The Unnamed plugin", finfo->name)) { - info->name = PBD::basename_nosuffix (path); - } else { - info->name = finfo->name; - } - - - snprintf (buf, sizeof (buf), "%d", finfo->UniqueID); - info->unique_id = buf; - info->category = "VST"; - info->path = path; - // need to set info->creator but FST doesn't provide it - info->index = 0; - info->n_inputs = finfo->numInputs; - info->n_outputs = finfo->numOutputs; - info->type = ARDOUR::VST; - - _vst_plugin_info.push_back (info); - fst_free_info (finfo); - - return 0; -} - -#endif // VST_SUPPORT diff --git a/libs/ardour/po/el_GR.po b/libs/ardour/po/el_GR.po deleted file mode 100644 index 9ddd3e7188..0000000000 --- a/libs/ardour/po/el_GR.po +++ /dev/null @@ -1,2195 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Paul Davis -# This file is distributed under the same license as the PACKAGE package. -# Klearchos Gourgourinis , 2004. -# -msgid "" -msgstr "" -"Project-Id-Version: libardour 0.664.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2003-06-29 21:03+0200\n" -"PO-Revision-Date: 2007-04-16 00:38+0200\n" -"Last-Translator: Klearchos Gourgourinis \n" -"Language-Team: Hellenic(Greek)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: libs/ardour/audio_diskstream.cc:337 -msgid "AudioDiskstream: Session doesn't know about a Playlist called \"%1\"" -msgstr "AudioDiskStream: Η ΣυνεδÏία δεν γνωÏίζει για λίστα ΑναπαÏ/γής με όνομα \"%1\"" - -#: libs/ardour/audio_diskstream.cc:342 -msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist" -msgstr "AudioDiskStream: Η Λίστα \"%1\" δεν είναι ηχητική λίστα αναπαÏ/γής" - -#: libs/ardour/audio_diskstream.cc:433 -msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!" -msgstr "AudioDiskstream %1: δεν υπάÏχει λίστα αναπαÏ/γής για να γίνει αντιγÏαφή!" - -#: libs/ardour/audio_diskstream.cc:1114 -#: libs/ardour/audio_diskstream.cc:1125 -msgid "AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3" -msgstr "AudioDiskstream %1: κατα την αναγόμωση, δεν μπόÏεσα να διαβάσω %2 από τη λίστα αναπαÏ/γής στο frame %3" - -#: libs/ardour/audio_diskstream.cc:1254 -msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3" -msgstr "AudioDiskstream %1: δεν μπόÏεσα να διαβάσω %2 από τη λίστα αναπαÏ/γής στο frame %3" - -#: libs/ardour/audio_diskstream.cc:1621 -#: libs/ardour/audio_diskstream.cc:1638 -msgid "AudioDiskstream %1: cannot write to disk" -msgstr "AudioDiskstream %1: δεν μποÏÏŽ να γÏάψω στο δίσκο" - -#: libs/ardour/audio_diskstream.cc:1698 -msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!" -msgstr "AudioDiskstream \"%1\": αδÏνατη η εκκαθάÏιση δειγματοληπτικών δεδομένων στο δίσκο!" - -#: libs/ardour/audio_diskstream.cc:1796 -msgid "%1: could not create region for complete audio file" -msgstr "%1: δεν μπόÏεσα να δημιουÏγήσω πεÏιοχή για ολόκληÏο audio file" - -#: libs/ardour/audio_diskstream.cc:1819 -msgid "AudioDiskstream: could not create region for captured audio!" -msgstr "AudioDiskstream: δεν μπόÏεσα να δημιουÏγήσω πεÏιοχή για δειγματοληψίες!" - -#: libs/ardour/audio_diskstream.cc:1874 -msgid "programmer error: %1" -msgstr "σφάλμα Ï€ÏογÏαμματιστή: %1" - -#: libs/ardour/audio_diskstream.cc:2146 -msgid "AudioDiskstream: channel %1 out of range" -msgstr "AudioDiskstream: κανάλι %1 εκτός διαστήματος" - -#: libs/ardour/audio_diskstream.cc:2171 -msgid "%1:%2 new capture file not initialized correctly" -msgstr "%1:%2 νέα δειγματοληψία δεν εκκινήθη σωστά" - -#: libs/ardour/audio_diskstream.cc:2404 -msgid "Location \"%1\" not valid for track loop (start >= end)" -msgstr "Η Τοποθεσία \"%1\" δεν είναι ικανή για track loop (αÏχή >= τέλος)" - -#: libs/ardour/audio_diskstream.cc:2485 -msgid "%1: cannot restore pending capture source file %2" -msgstr "%1: δεν μποÏÏŽ να ανοίξω το αÏχείο %2 από την απαιτοÏμενη πηγή" - -#: libs/ardour/audio_diskstream.cc:2507 -msgid "%1: incorrect number of pending sources listed - ignoring them all" -msgstr "%1: ετυπώθη λανθασμένος αÏιθμός απαιτοÏμενων πηγών - αγνοήθηκαν όλες" - -#: libs/ardour/audio_diskstream.cc:2523 -msgid "%1: cannot create whole-file region from pending capture sources" -msgstr "%1: αδÏνατη η δημιουÏγία ακέÏαιας πεÏιοχής από τις απαιτοÏμενες πηγές ηχοληψίας" - -#: libs/ardour/audio_diskstream.cc:2535 -msgid "%1: cannot create region from pending capture sources" -msgstr "%1: δεν μπόÏεσα να δημιουÏγήσω πεÏιοχή για τις απαιτοÏμενες πηγές" - -#: libs/ardour/audio_library.cc:92 -msgid "channels" -msgstr "κανάλια" - -#: libs/ardour/audio_library.cc:93 -msgid "samplerate" -msgstr "" - -#: libs/ardour/audio_library.cc:94 -msgid "resolution" -msgstr "ανάλυση" - -#: libs/ardour/audio_library.cc:95 -msgid "format" -msgstr "" - -#: libs/ardour/audio_library.cc:102 -msgid "Could not open %1. Audio Library not saved" -msgstr "Δεν μπόÏεσα να ανοίξω το %1. Η Audio Library δεν αποθηκεÏθηκε" - -#: libs/ardour/audio_playlist.cc:53 -#: libs/ardour/audio_playlist.cc:63 -#: libs/ardour/audio_playlist.cc:74 -#: libs/ardour/audio_playlist.cc:121 -#: libs/ardour/insert.cc:76 -#: libs/ardour/insert.cc:95 -#: libs/ardour/insert.cc:120 -#: libs/ardour/insert.cc:838 -#: libs/ardour/insert.cc:846 -#: libs/ardour/send.cc:39 -#: libs/ardour/send.cc:53 -#: libs/ardour/send.cc:62 -#: libs/ardour/session_state.cc:1621 -#: libs/ardour/session_state.cc:1667 -msgid "initial state" -msgstr "Ï€ÏωταÏχική κατάσταση" - -#: libs/ardour/audio_playlist.cc:275 -#: libs/ardour/audio_playlist.cc:769 -msgid "programming error: non-audio Region passed to remove_overlap in audio playlist" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: μη-ηχητική ΠεÏιοχή πέÏασε σε remove_overlap στην audio playlist" - -#: libs/ardour/audio_playlist.cc:402 -msgid "programming error: non-audio Region tested for overlap in audio playlist" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: μη-ηχητική ΠεÏιοχή ελέγχθη για υπεÏπήδηση(overlap) στην λίστα αναπαÏ/γής του ήχου" - -#: libs/ardour/audio_playlist.cc:878 -msgid "xfade change" -msgstr "αλλαγή xfade" - -#: libs/ardour/audio_playlist.cc:933 -msgid "region modified" -msgstr "η πεÏιοχή μετεβλήθη" - -#: libs/ardour/audio_track.cc:125 -#: libs/ardour/io.cc:1716 -#: libs/ardour/io.cc:1826 -msgid "Unknown connection \"%1\" listed for input of %2" -msgstr "Άγνωστη σÏνδεση \"%1\" στη λίστα εισόδου του %2" - -#: libs/ardour/audio_track.cc:127 -#: libs/ardour/io.cc:1718 -#: libs/ardour/io.cc:1828 -msgid "in 1" -msgstr "" - -#: libs/ardour/audio_track.cc:128 -#: libs/ardour/io.cc:1719 -#: libs/ardour/io.cc:1829 -msgid "No input connections available as a replacement" -msgstr "Καμία διαθέσιμη input σÏνδεση ως εναλλακτική" - -#: libs/ardour/audio_track.cc:132 -#: libs/ardour/io.cc:1723 -#: libs/ardour/io.cc:1833 -msgid "Connection %1 was not available - \"in 1\" used instead" -msgstr "Η ΣÏνδεση %1 δεν ήταν διαθέσιμη - Αντ'αυτής χÏησιμοποιήθηκε η \"in 1\" " - -#: libs/ardour/audio_track.cc:141 -#: libs/ardour/io.cc:1842 -msgid "improper input channel list in XML node (%1)" -msgstr "ακατάλληλη λίστα καναλιών εισόδου στον κόμβο XML (%1)" - -#: libs/ardour/audio_track.cc:186 -#: libs/ardour/audio_track.cc:199 -msgid "AudioTrack: diskstream \"%1\" not known by session" -msgstr "AudioTrack: το diskstream \"%1\" είναι μή αναγνωÏίσιμο από τη συνεδÏία" - -#: libs/ardour/audio_track.cc:297 -msgid "MIDI rec_enable control specification for %1 is incomplete, so it has been ignored" -msgstr "Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI rec_enable για το %1 είναι ημιτελής, με αποτέλεσμα να αγνοηθεί" - -#: libs/ardour/audio_track.cc:309 -msgid "programming error: AudioTrack given state without diskstream!" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: εδόθη κατάσταση στην AudioTrack δίχως diskstream!" - -#: libs/ardour/audioengine.cc:144 -msgid "cannot activate JACK client" -msgstr "Ο JACK δεν μποÏεί να ενεÏγοποιηθεί" - -#: libs/ardour/audioengine.cc:395 -msgid "register audio input port called before engine was started" -msgstr "η register audio input port εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:426 -msgid "register audio output port called before engine was started" -msgstr "η register audio output port εκλήθη Ï€Ïίν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:487 -msgid "connect called before engine was started" -msgstr "η σÏνδεση εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:503 -msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)" -msgstr "AudioEngine: αδÏνατη η σÏνδεση %1 (%2) σε %3 (%4)" - -#: libs/ardour/audioengine.cc:516 -#: libs/ardour/audioengine.cc:545 -msgid "disconnect called before engine was started" -msgstr "η αποσÏνδεση εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:603 -msgid "get_port_by_name() called before engine was started" -msgstr "η Ïουτίνα get_port_by_name() εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:636 -msgid "get_ports called before engine was started" -msgstr "η Ïουτίνα get_ports εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:711 -msgid "get_nth_physical called before engine was started" -msgstr "η Ïουτίνα get_nth_physical εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:739 -msgid "get_port_total_latency() called with no JACK client connection" -msgstr "η Ïουτίνα get_port_total_latency() εκλήθη χωÏίς την εκκίνηση κάποιου JACK client" - -#: libs/ardour/audioengine.cc:745 -msgid "get_port_total_latency() called before engine was started" -msgstr "η Ïουτίνα get_port_total_latency() εκλήθη Ï€Ïιν να εκκινηθεί η engine" - -#: libs/ardour/audioengine.cc:869 -msgid "Unable to connect to JACK server" -msgstr "ΑδÏνατη η σÏνδεση στον JACK server" - -#: libs/ardour/audioengine.cc:872 -msgid "Could not connect to JACK server as \"%1\"" -msgstr "ΑδÏνατη η σÏνδεση στον JACK server ως \"%1\"" - -#: libs/ardour/audioengine.cc:877 -msgid "JACK server started" -msgstr "ΈναÏξη JACK server" - -#: libs/ardour/audioengine.cc:911 -msgid "cannot shutdown connection to JACK" -msgstr "ΑδÏνατος ο τεÏματισμός συνδέσεως με τον JACK" - -#: libs/ardour/audioengine.cc:936 -msgid "failed to connect to JACK" -msgstr "Αποτυχία συνδέσεως με τον JACK" - -#: libs/ardour/audioengine.cc:952 -msgid "could not reregister %1" -msgstr "αδÏνατη η επανακαταγÏαφή %1" - -#: libs/ardour/audioengine.cc:1009 -msgid "could not reconnect %1 and %2 (err = %3)" -msgstr "ΑδÏνατη η επανασÏνδεση %1 και %2 (err = %3)" - -#: libs/ardour/audiofilesource.cc:444 -#: libs/ardour/session_state.cc:3095 -msgid "there are already 1000 files with names like %1; versioning discontinued" -msgstr "ΥπάÏχουν ήδη 1000 αÏχεία με ονόματα όπως %1; μη-συνεχές versioning" - -#: libs/ardour/audiofilesource.cc:458 -#: libs/ardour/session_state.cc:3109 -msgid "cannot rename audio file source from %1 to %2 (%3)" -msgstr "δεν μποÏÏŽ να μετονομάσω την πηγή του audio file από %1 σε %2 (%3)" - -#: libs/ardour/audiofilesource.cc:465 -#: libs/ardour/session_state.cc:3124 -msgid "cannot remove peakfile %1 for %2 (%3)" -msgstr "δεν μποÏÏŽ να απαλοίψω το peakfile %1 για %2 (%3)" - -#: libs/ardour/audiofilesource.cc:509 -msgid "FileSource: search path not set" -msgstr "FileSource: μονοπάτι αναζητήσεως δεν ετέθη" - -#: libs/ardour/audiofilesource.cc:533 -msgid "" -"FileSource: \"%1\" is ambigous when searching %2\n" -"\t" -msgstr "" -"FileSource: \"%1\" είναι αμφίβολο κατά την αναζήτηση του %2\n" -"\t" - -#: libs/ardour/audiofilesource.cc:539 -msgid "Filesource: cannot find required file (%1): while searching %2" -msgstr "Filesource: δεν ευÏέθη το απαιτοÏμενο αÏχείο (%1): κατά την αναζήτηση του %2" - -#: libs/ardour/audiofilesource.cc:562 -msgid "Filesource: cannot find required file (%1): %2" -msgstr "Filesource: δεν ευÏέθη το απαιτοÏμενο αÏχείο (%1): %2" - -#: libs/ardour/audiofilesource.cc:567 -msgid "Filesource: cannot check for existing file (%1): %2" -msgstr "Filesource: δεν μποÏÏŽ να ελέγξω για το υπάÏχον αÏχείο (%1): %2" - -#: libs/ardour/audiofilesource.cc:636 -#: libs/ardour/insert.cc:525 -#: libs/ardour/sndfilesource.cc:113 -msgid "programming error: %1" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: %1" - -#: libs/ardour/audiofilesource.cc:641 -msgid "cannot rename audio file for %1 to %2" -msgstr "δεν μποÏÏŽ να μετονομάσω το audio file για το %1 σε %2" - -#: libs/ardour/audiofilter.cc:45 -msgid "audiofilter: error creating name for new audio file based on %1" -msgstr "audiofilter: σφάλμα στη δημιουÏγία ονόματος για νέο audio file βασισμένο σε %1" - -#: libs/ardour/audiofilter.cc:58 -msgid "audiofilter: error creating new audio file %1 (%2)" -msgstr "audiofilter: σφάλμα στη δημιουÏγία νέου audio file %1 (%2)" - -#: libs/ardour/audioregion.cc:857 -#: libs/ardour/audioregion.cc:919 -msgid "fade in change" -msgstr "αλλαγή fade in" - -#: libs/ardour/audioregion.cc:1349 -#, c-format -msgid "normalized to %.2fdB" -msgstr "εξομαλÏνθηκε στα %.2fdB" - -#: libs/ardour/audioregion.cc:1367 -msgid "envelope change" -msgstr "αλλαγή envelope" - -#: libs/ardour/audiosource.cc:143 -msgid "poll on peak request pipe failed (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:150 -msgid "Error on peak thread request pipe" -msgstr "Σφάλμα στο peak thread request pipe" - -#: libs/ardour/audiosource.cc:183 -msgid "Error reading from peak request pipe" -msgstr "Σφάλμα στην ανάγνωση από peak request pipe" - -#: libs/ardour/audiosource.cc:215 -#: libs/ardour/session_butler.cc:80 -#: libs/ardour/session_midi.cc:1183 -msgid "Cannot create transport request signal pipe (%1)" -msgstr "Δεν μποÏÏŽ να δημιουÏγήσω transport request signal pipe (%1)" - -#: libs/ardour/audiosource.cc:220 -#: libs/ardour/audiosource.cc:225 -msgid "UI: cannot set O_NONBLOCK on peak request pipe (%1)" -msgstr "UI: δεν μποÏÏŽ να θέσω O_NONBLOCK στο peak read pipe (%1)" - -#: libs/ardour/audiosource.cc:230 -msgid "AudioSource: could not create peak thread" -msgstr "AudioSource: δεν μπόÏεσα να δημιουÏγήσω peak thread" - -#: libs/ardour/audiosource.cc:308 -msgid "cannot rename peakfile for %1 from %2 to %3 (%4)" -msgstr "αδÏνατη η μετονομασία του peakfile για %1 από %2 σε %3 (%4)" - -#: libs/ardour/audiosource.cc:350 -msgid "AudioSource: cannot stat peakfile \"%1\"" -msgstr "" - -#: libs/ardour/audiosource.cc:451 -msgid "cannot read sample data for unscaled peak computation" -msgstr "δεν μποÏÏŽ να διαβάσω δεδομένα δείγματος για υπολογισμό μη-κλιμακώτου peak" - -#: libs/ardour/audiosource.cc:472 -#: libs/ardour/audiosource.cc:543 -#: libs/ardour/audiosource.cc:787 -#: libs/ardour/audiosource.cc:878 -msgid "AudioSource: cannot open peakpath \"%1\" (%2)" -msgstr "AudioSource: δεν μποÏÏŽ να ανοίξω το peakpath \"%1\" (%2)" - -#: libs/ardour/audiosource.cc:644 -msgid "AudioSource[%1]: peak read - cannot read %2 samples at offset %3" -msgstr "AudioSource[%1]: ανάγνωση peak - δεν μποÏÏŽ να διαβάσω %2 δείγματα στο (offset) %3" - -#: libs/ardour/audiosource.cc:798 -msgid "%1: could not write read raw data for peak computation (%2)" -msgstr "%1: δεν μποÏεσα να γÏάψω ανεγνωσμένα raw δεδομένα για τον υπολογισμό του peak (%2)" - -#: libs/ardour/audiosource.cc:823 -msgid "%1: could not write peak file data (%2)" -msgstr "%1: δεν μπόÏεσα να γÏάψω δεδομένα του αÏχείου peak (%2)" - -#: libs/ardour/automation_event.cc:65 -#: libs/ardour/location.cc:345 -#: libs/ardour/tempo.cc:226 -msgid "initial" -msgstr "Ï€ÏωταÏχικό" - -#: libs/ardour/automation_event.cc:232 -msgid "cleared" -msgstr "εκκαθαÏίσθη" - -#: libs/ardour/automation_event.cc:404 -msgid "added event" -msgstr "συμβάν Ï€Ïοστέθηκε" - -#: libs/ardour/automation_event.cc:421 -msgid "removed event" -msgstr "συμβάν απαλοίφθηκε" - -#: libs/ardour/automation_event.cc:436 -msgid "removed multiple events" -msgstr "πολλαπλά συμβάντα απαλοίφθηκαν" - -#: libs/ardour/automation_event.cc:467 -#: libs/ardour/automation_event.cc:498 -msgid "removed range" -msgstr "διάστημα απαλοίφθηκε" - -#: libs/ardour/automation_event.cc:528 -msgid "event range adjusted" -msgstr "διάστημα συμβάντων Ïυθμίστηκε" - -#: libs/ardour/automation_event.cc:550 -msgid "event adjusted" -msgstr "συμβάν Ïυθμίστηκε" - -#: libs/ardour/automation_event.cc:665 -#: libs/ardour/automation_event.cc:770 -#: libs/ardour/panner.cc:1041 -msgid "programming error:" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ:" - -#: libs/ardour/automation_event.cc:1079 -msgid "cut/copy/clear" -msgstr "κοπή/αντιγÏαφή/εκκαθάÏιση" - -#: libs/ardour/automation_event.cc:1112 -msgid "copy" -msgstr "αντιγÏαφή" - -#: libs/ardour/automation_event.cc:1180 -#: libs/ardour/playlist.cc:939 -msgid "paste" -msgstr "επικόλληση" - -#: libs/ardour/automation_event.cc:1235 -msgid "automation list: no x-coordinate stored for control point (point ignored)" -msgstr "λίστα αυτοματισμοÏ: καμία x-συντεταγμένη αποθηκευμένη για σημείο ελέγχου (το σημείο αγνοήθηκε)" - -#: libs/ardour/automation_event.cc:1241 -msgid "automation list: no y-coordinate stored for control point (point ignored)" -msgstr "λίστα αυτοματισμοÏ: καμία y-συντεταγμένη αποθηκευμένη για σημείο ελέγχου (το σημείο αγνοήθηκε)" - -#: libs/ardour/configuration.cc:80 -msgid "loading system configuration file %1" -msgstr "Ανάκληση αÏχείου Ïυθμίσεων συστήματος %1" - -#: libs/ardour/configuration.cc:83 -msgid "Ardour: cannot read system configuration file \"%1\"" -msgstr "Ardour: δεν μποÏÏŽ να διαβάσω το αÏχείο διαÏÏυθμίσεως του συστήματος \"%1\"" - -#: libs/ardour/configuration.cc:88 -msgid "Ardour: system configuration file \"%1\" not loaded successfully." -msgstr "Ardour: το αÏχείο διαÏÏυθμίσεως του συστήματος \"%1\" δεν φοÏτώθηκε επιτυχώς." - -#: libs/ardour/configuration.cc:105 -msgid "loading user configuration file %1" -msgstr "Ανάκληση αÏχείου Ïυθμίσεων χÏήστη %1" - -#: libs/ardour/configuration.cc:108 -msgid "Ardour: cannot read configuration file \"%1\"" -msgstr "Ardour: αÏχείο διαÏÏυθμίσεως μή αναγνώσιμο \"%1\"" - -#: libs/ardour/configuration.cc:113 -msgid "Ardour: user configuration file \"%1\" not loaded successfully." -msgstr "Ardour: αÏχείο Ïυθμίσεων χÏήστη \"%1\" δεν φοÏτώθηκε επιτυχώς." - -#: libs/ardour/configuration.cc:137 -msgid "Config file %1 not saved" -msgstr "ΑÏχείο Ïυθμίσεων %1 δεν αποθηκεÏθηκε" - -#: libs/ardour/configuration.cc:210 -msgid "ill-formed MIDI port specification in ardour rcfile (ignored)" -msgstr "κακοσχηματισμένος καθοÏισμός MIDI θÏÏας στο ardour rcfile (αγνοήθηκε)" - -#: libs/ardour/connection.cc:183 -msgid "Node for Connection has no \"name\" property" -msgstr "Κόμβος Ï€Ïος ΣÏνδεση δεν έχει \"όνομα\" ιδιότητα" - -#: libs/ardour/connection.cc:191 -msgid "Node for Connection has no \"connections\" property" -msgstr "Κόμβος Ï€Ïος ΣÏνδεση δεν έχει \"συνδέσεις\" ιδιότητα" - -#: libs/ardour/connection.cc:227 -#: libs/ardour/io.cc:1902 -msgid "IO: badly formed string in XML node for inputs \"%1\"" -msgstr "IO: κακοφτιαγμένη γÏαμμή στον XML κόμβο για εισόδους \"%1\"" - -#: libs/ardour/connection.cc:232 -#: libs/ardour/io.cc:1907 -msgid "bad input string in XML node \"%1\"" -msgstr "κακή γÏαμμή εισόδου στον XML κόμβο \"%1\"" - -#: libs/ardour/control_protocol_manager.cc:80 -msgid "control protocol name \"%1\" has no descriptor" -msgstr "Το όνομα Ï€Ïωτοκόλλου ελέγχου \"%1\" δεν έχει descriptor" - -#: libs/ardour/control_protocol_manager.cc:85 -msgid "control protocol name \"%1\" could not be initialized" -msgstr "Το όνομα Ï€Ïωτοκόλλου ελέγχου \"%1\" ήταν αδÏνατο να αÏχίσει" - -#: libs/ardour/control_protocol_manager.cc:141 -msgid "Instantiating mandatory control protocol %1" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:175 -msgid "Control protocol %1 not usable" -msgstr "ΠÏωτόκολλο ελέγχου %1 μη χÏησιμοποιήσιμο" - -#: libs/ardour/control_protocol_manager.cc:187 -msgid "Control surface protocol discovered: \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:205 -msgid "ControlProtocolManager: cannot load module \"%1\" (%2)" -msgstr "ControlProtocolManager: δεν μποÏÏŽ να φοÏτώσω το module \"%1\" (%2)" - -#: libs/ardour/control_protocol_manager.cc:213 -msgid "ControlProtocolManager: module \"%1\" has no descriptor function." -msgstr "ControlProtocolManager: το module \"%1\" δεν έχει descriptor function." - -#: libs/ardour/crossfade.cc:121 -msgid "Crossfade: no \"in\" region in state" -msgstr "Crossfade: χωÏίς \"in\" πεÏιοχή σε κατάσταση" - -#: libs/ardour/crossfade.cc:128 -msgid "Crossfade: no \"in\" region %1 found in playlist %2" -msgstr "Crossfade: no \"in\" πεÏιοχή %1 δεν ευÏέθη στη λίστα αναπαÏ/γής %2" - -#: libs/ardour/crossfade.cc:138 -msgid "Crossfade: no \"out\" region in state" -msgstr "Crossfade: χωÏίς \"out\" πεÏιοχή σε κατάσταση" - -#: libs/ardour/crossfade.cc:145 -msgid "Crossfade: no \"out\" region %1 found in playlist %2" -msgstr "Crossfade: no \"out\" πεÏιοχή %1 δεν ευÏέθη στη λίστα αναπαÏ/γής %2" - -#: libs/ardour/crossfade.cc:492 -msgid "active changed" -msgstr "αλλαγή ενεÏγοÏ" - -#: libs/ardour/crossfade.cc:741 -msgid "old-style crossfade information - no position information" -msgstr "παλαιοÏ-Ï„Ïπου crossfade πληÏοφοÏία - καμία πληÏοφοÏία θέσεως" - -#: libs/ardour/curve.cc:112 -#: libs/ardour/globals.cc:340 -#: libs/ardour/insert.cc:454 -#: libs/ardour/session.cc:2466 -#: libs/ardour/session.cc:2518 -msgid "programming error: " -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: " - -#: libs/ardour/cycle_timer.cc:37 -msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo" -msgstr "CycleTimer::get_mhz(): δεν ανοίγει το /proc/cpuinfo" - -#: libs/ardour/cycle_timer.cc:49 -msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo" -msgstr "CycleTimer::get_mhz(): δεν ευÏέθη το cpu MHz στο /proc/cpuinfo" - -#: libs/ardour/cycle_timer.cc:72 -msgid "cannot locate cpu MHz in /proc/cpuinfo" -msgstr "δεν ευÏέθη το cpu MHz στο /proc/cpuinfo" - -#: libs/ardour/destructive_filesource.cc:188 -msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)" -msgstr "ΚαταστÏεπτικήΠηγήΑÏχείου: \"%1\" κακή ανάγνωση retval: %2 of %5 (%3: %4)" - -#: libs/ardour/destructive_filesource.cc:201 -#: libs/ardour/destructive_filesource.cc:243 -#: libs/ardour/destructive_filesource.cc:250 -msgid "DestructiveFileSource: \"%1\" bad write (%2)" -msgstr "DestructiveFileSource: \"%1\" κακή εγγÏαφή (%2)" - -#: libs/ardour/globals.cc:109 -msgid "no MIDI ports specified: no MMC or MTC control possible" -msgstr "καμία MIDI θÏÏα δεν επελέχθη: έλεγχος MMC ή MTC αδÏνατος" - -#: libs/ardour/globals.cc:124 -msgid "MIDI port specifications for \"%1\" are not understandable." -msgstr "Οι Ï€ÏοδιαγÏαφές της θÏÏας MIDI για το \"%1\" δεν είναι κατανοητές." - -#: libs/ardour/globals.cc:137 -#: libs/ardour/globals.cc:141 -#: libs/ardour/globals.cc:145 -msgid "default" -msgstr "Ï€ÏοκαθοÏισμένο" - -#: libs/ardour/globals.cc:173 -msgid "No MMC control (MIDI port \"%1\" not available)" -msgstr "ΧωÏίς έλεγχο MMC (θÏÏα MIDI \"%1\" μη διαθέσιμη)" - -#: libs/ardour/globals.cc:179 -msgid "No MTC support (MIDI port \"%1\" not available)" -msgstr "ΧωÏίς έλεγχο MTC (θÏÏα MIDI \"%1\" μη διαθέσιμη)" - -#: libs/ardour/globals.cc:184 -msgid "No MIDI parameter support (MIDI port \"%1\" not available)" -msgstr "ΧωÏίς υποστήÏιξη MIDI παÏαμέτÏων (θÏÏα MIDI \"%1\" μη διαθέσιμη)" - -#: libs/ardour/import.cc:75 -msgid "Import: cannot open input sound file \"%1\"" -msgstr "Εισαγωγή: δεν μποÏÏŽ να ανοίξω το εισαγμένο αÏχείο ήχου \"%1\"" - -#: libs/ardour/import.cc:80 -msgid "resampling audio" -msgstr "επανά-ληψη(resampling) ήχου" - -#: libs/ardour/import.cc:84 -msgid "Import: cannot open converted sound file \"%1\"" -msgstr "Εισαγωγή: δεν μποÏÏŽ να ανοίξω το Ï„Ïοποποιημένο αÏχείο ήχου \"%1\"" - -#: libs/ardour/import.cc:89 -msgid "Import: error while resampling sound file \"%1\"" -msgstr "Εισαγωγή: σφάλμα κατά την Ï„Ïοποποίηση αÏχείου \"%1\"" - -#: libs/ardour/import.cc:148 -msgid "Session::import_audiofile: cannot open new file source for channel %1" -msgstr "ΣυνεδÏία::εισαγωγή_αÏχείου: δεν μποÏÏŽ να ανοίξω νέα πηγή αÏχείου για το κανάλι %1" - -#: libs/ardour/import.cc:167 -msgid "converting audio" -msgstr "μετατÏοπή ήχου" - -#: libs/ardour/import.cc:199 -msgid "building region" -msgstr "χτίσιμο πεÏιοχής" - -#: libs/ardour/import.cc:201 -msgid "building regions" -msgstr "χτίσιμο πεÏιοχών" - -#: libs/ardour/import.cc:325 -msgid "Import: could not open temp file: %1" -msgstr "Εισαγωγή: δεν μπόÏεσα να ανοίξω το temp αÏχείο: %1" - -#: libs/ardour/import.cc:334 -msgid "Import: src_new() failed : %1" -msgstr "Εισαγωγή: src_new() απέτυχε : %1" - -#: libs/ardour/import.cc:362 -msgid "Import: %1" -msgstr "Εισαγωγή: %1" - -#: libs/ardour/insert.cc:644 -#: libs/ardour/insert.cc:936 -msgid "XML node describing insert is missing the `type' field" -msgstr "Στον κόμβο XML που πεÏιγÏάφει το insert λείπει το πεδίο `type'" - -#: libs/ardour/insert.cc:653 -msgid "unknown plugin type %1 in plugin insert state" -msgstr "άγνωστος Ï„Ïπος plugin %1 στην κατάσταση εισαχθέντων plugins" - -#: libs/ardour/insert.cc:665 -msgid "XML node describing insert is missing the `id' field" -msgstr "Στον κόμβο XML που πεÏιγÏάφει το insert λείπει το πεδίο `id'" - -#: libs/ardour/insert.cc:678 -msgid "" -"Found a reference to a plugin (\"%1\") that is unknown.\n" -"Perhaps it was removed or moved since it was last used." -msgstr "" -"ΕυÏέθη μια αναφοÏά σε plugin (\"%1\") που είναι άγνωστο.\n" -"Ίσως έχει διαγÏαφεί ή μετακινηθεί από την τελευταία του χÏήση." - -#: libs/ardour/insert.cc:716 -#: libs/ardour/insert.cc:953 -msgid "XML node describing insert is missing a Redirect node" -msgstr "Στον κόμβο XML που πεÏιγÏάφει το insert λείπει ένας κόμβος Redirect" - -#: libs/ardour/insert.cc:721 -msgid "XML node describing a plugin insert is missing the `%1' information" -msgstr "Στον κόμβο XML που πεÏιγÏάφει ένα plugin insert λείπουν οι πληÏοφοÏίες `%1' " - -#: libs/ardour/insert.cc:745 -msgid "PluginInsert: Auto: no ladspa port number" -msgstr "PluginInsert: Auto: χωÏίς αÏιθμό θÏÏας ladspa" - -#: libs/ardour/insert.cc:752 -msgid "PluginInsert: Auto: port id out of range" -msgstr "PluginInsert: Auto: το id θÏÏας είναι εκτός πεδίου" - -#: libs/ardour/insert.cc:768 -msgid "XML node describing a port automation is missing the `%1' information" -msgstr "Στον κόμβο XML που πεÏιγÏάφει έναν αυτοματισμό θÏÏας λείπουν οι πληÏοφοÏίες `%1' " - -#: libs/ardour/insert.cc:854 -msgid "PortInsert: cannot add input port" -msgstr "PortInsert: δεν μποÏεί να Ï€Ïοστεθει θÏÏα εισόδου" - -#: libs/ardour/insert.cc:859 -msgid "PortInsert: cannot add output port" -msgstr "PortInsert: δεν μποÏεί να Ï€Ïοστεθεί θÏÏα εξόδου" - -#: libs/ardour/insert.cc:941 -msgid "non-port insert XML used for port plugin insert" -msgstr "εισαγωγή μη-θÏÏας XML για χÏήση σε εισαγωγή plugin θÏÏας" - -#: libs/ardour/io.cc:598 -msgid "IO: cannot disconnect input port %1 from %2" -msgstr "IO: δεν μποÏει να αποσυνδεθεί η θÏÏα εισόδου %1 από %2" - -#: libs/ardour/io.cc:666 -msgid "IO: cannot disconnect output port %1 from %2" -msgstr "IO: δεν μποÏεί να αποσυνδεθεί η θÏÏα εξόδου %1 από %2" - -#: libs/ardour/io.cc:807 -#: libs/ardour/io.cc:1151 -#: libs/ardour/io.cc:1277 -#, c-format -msgid "%s/out" -msgstr "%s/out" - -#: libs/ardour/io.cc:809 -#: libs/ardour/io.cc:1153 -#: libs/ardour/io.cc:1279 -#: libs/ardour/io.cc:2849 -#, c-format -msgid "%s/out %u" -msgstr "%s/out %u" - -#: libs/ardour/io.cc:813 -#: libs/ardour/io.cc:1158 -#: libs/ardour/io.cc:1283 -msgid "IO: cannot register output port %1" -msgstr "IO: δεν μποÏει να καταχώÏηθεί η θÏÏα εξόδου %1" - -#: libs/ardour/io.cc:908 -#: libs/ardour/io.cc:1011 -#: libs/ardour/io.cc:1117 -#, c-format -msgid "%s/in" -msgstr "%s/in" - -#: libs/ardour/io.cc:910 -#: libs/ardour/io.cc:1014 -#: libs/ardour/io.cc:1120 -#: libs/ardour/io.cc:2819 -#, c-format -msgid "%s/in %u" -msgstr "%s/in %u" - -#: libs/ardour/io.cc:914 -#: libs/ardour/io.cc:1020 -#: libs/ardour/io.cc:1125 -msgid "IO: cannot register input port %1" -msgstr "IO: δεν μποÏεί να καταχώÏηθεί η θÏÏα εισόδου %1" - -#: libs/ardour/io.cc:1541 -msgid "IO::connecting_became_legal() called without a pending state node" -msgstr "IO::connecting_became_legal() εκλήθη χωÏίς κόμβο καταστάσεως εν αναμονή" - -#: libs/ardour/io.cc:1564 -msgid "IO::ports_became_legal() called without a pending state node" -msgstr "IO::ports_became_legal() εκλήθη χωÏίς κόμβο καταστάσεως εν αναμονή" - -#: libs/ardour/io.cc:1594 -msgid "incorrect XML node \"%1\" passed to IO object" -msgstr "μη-σωστός κόμβος XML \"%1\" πέÏασε στο IO αντικείμενο" - -#: libs/ardour/io.cc:1649 -msgid "MIDI gain control specification for %1 is incomplete, so it has been ignored" -msgstr "Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI gain για το %1 είναι ημιτελής, με αποτέλεσμα να αγνοηθεί" - -#: libs/ardour/io.cc:1739 -#: libs/ardour/io.cc:1851 -msgid "Unknown connection \"%1\" listed for output of %2" -msgstr "Άγνωστη σÏνδεση \"%1\" καταχωÏήθη για την έξοδο του %2" - -#: libs/ardour/io.cc:1741 -#: libs/ardour/io.cc:1853 -msgid "out 1" -msgstr "" - -#: libs/ardour/io.cc:1742 -#: libs/ardour/io.cc:1854 -msgid "No output connections available as a replacement" -msgstr "Καμία σÏνδεση output διαθέσιμη σαν εναλλακτική" - -#: libs/ardour/io.cc:1746 -#: libs/ardour/io.cc:1858 -msgid "Connection %1 was not available - \"out 1\" used instead" -msgstr "Η σÏνδεση %1 δεν ήταν διαθέσιμη - αντ'αυτής χÏησιμοποιήθηκε η \"out 1\" " - -#: libs/ardour/io.cc:1760 -msgid "%1: cannot create I/O ports" -msgstr "%1: θÏÏες I/O δεν μποÏοÏν να δημιουÏγηθοÏν" - -#: libs/ardour/io.cc:1867 -msgid "improper output channel list in XML node (%1)" -msgstr "ασαφής λίστα καναλιών εξόδου στον κόμβο XML (%1)" - -#: libs/ardour/io.cc:1952 -msgid "IO: badly formed string in XML node for outputs \"%1\"" -msgstr "IO: δÏσμοÏφη γÏαμμή στον κόμβο XML για τις εξόδους \"%1\"" - -#: libs/ardour/io.cc:1957 -msgid "IO: bad output string in XML node \"%1\"" -msgstr "IO: κακή γÏαμμή εξόδουστον κόμβο XML \"%1\"" - -#: libs/ardour/io.cc:2525 -msgid "%1: could not open automation event file \"%2\"" -msgstr "%1: δεν μπόÏεσα να ανοίξω το αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%2\"" - -#: libs/ardour/io.cc:2564 -msgid "%1: cannot open automation event file \"%2\"" -msgstr "%1: δεν μποÏÏŽ να ανοίξω το αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%2\"" - -#: libs/ardour/io.cc:2579 -msgid "badly formed version number in automation event file \"%1\"" -msgstr "δÏσμοÏφος αÏιθμός εκδόσεως στο αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%1\"" - -#: libs/ardour/io.cc:2583 -msgid "no version information in automation event file \"%1\"" -msgstr "δεν υπάÏχουν πληÏοφοÏίες πεÏί εκδόσεων στο αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï \"%1\"" - -#: libs/ardour/io.cc:2588 -msgid "mismatched automation event file version (%1)" -msgstr "αταίÏιαστη έκδοση αÏχείου συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï (%1)" - -#: libs/ardour/io.cc:2596 -msgid "badly formatted automation event record at line %1 of %2 (ignored)" -msgstr "κακώς φοÏμαÏισμένη καταγÏαφή συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÏƒÏ„Î· γÏαμμή %1 of %2 (αγνοήθηκε)" - -#: libs/ardour/io.cc:2616 -msgid "dubious automation event found (and ignored)" -msgstr "αβέβαιο συμβάν Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÎµÏ…Ïέθηκε (και αγνοήθηκε)" - -#: libs/ardour/io.cc:2620 -#: libs/ardour/panner.cc:438 -#: libs/ardour/redirect.cc:148 -msgid "loaded from disk" -msgstr "φοÏτώθηκε από το δίσκο" - -#: libs/ardour/io.cc:2791 -msgid "automation write/touch" -msgstr "αυτοματισμός εγγÏαφή/αφή(write/touch)" - -#: libs/ardour/ladspa_plugin.cc:87 -msgid "LADSPA: module has no descriptor function." -msgstr "LADSPA: το module δεν έχει ενδεικτική λειτουÏγία." - -#: libs/ardour/ladspa_plugin.cc:92 -msgid "LADSPA: plugin has gone away since discovery!" -msgstr "LADSPA: το plugin την 'κοπάνισε' μετά την ανακάλυψη του!" - -#: libs/ardour/ladspa_plugin.cc:99 -msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing" -msgstr "LADSPA: \"%1\" δεν μποÏεί να χÏησιμοποιηθεί, εφ'όσον δεν μποÏεί να κάνει επι τόπου επεξεÏγασία" - -#: libs/ardour/ladspa_plugin.cc:329 -msgid "illegal parameter number used with plugin \"%1\". This mayindicate a change in the plugin design, and presets may beinvalid" -msgstr "παÏάνομος αÏιθμός παÏαμέτÏου σε χÏήση με το plugin \"%1\". Ίσως να ενδείκνυται αλλαγή στο σχεδιασμό του plugin, και οι Ïυθμίσεις ίσως να είναι άκυÏες" - -#: libs/ardour/ladspa_plugin.cc:430 -msgid "Bad node sent to LadspaPlugin::set_state" -msgstr "Κακός κόμβος εστάλη στο LadspaPlugin::set_state" - -#: libs/ardour/ladspa_plugin.cc:443 -msgid "LADSPA: no ladspa port number" -msgstr "LADSPA: κανείς αÏιθμός θÏÏας ladspa" - -#: libs/ardour/ladspa_plugin.cc:449 -msgid "LADSPA: no ladspa port data" -msgstr "LADSPA: κανένα δεδομένο θÏÏας ladspa" - -#: libs/ardour/ladspa_plugin.cc:498 -msgid "LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so it has been ignored" -msgstr "Ο καθοÏισμός ελέγχου LADSPA LadspaPlugin για MIDI για την θÏÏα %1 είναι ημιτελής, έτσι αγνοήθηκε." - -#: libs/ardour/location.cc:269 -msgid "incorrect XML node passed to Location::set_state" -msgstr "λανθασμένος κόμβος XML πέÏασε στην Τοποθεσία::set_state" - -#: libs/ardour/location.cc:276 -msgid "XML node for Location has no name information" -msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες ονόματος" - -#: libs/ardour/location.cc:283 -msgid "XML node for Location has no start information" -msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες ενάÏξεως" - -#: libs/ardour/location.cc:294 -msgid "XML node for Location has no end information" -msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες τέλους" - -#: libs/ardour/location.cc:303 -msgid "XML node for Location has no flags information" -msgstr "Ο κόμβος XML για την Τοποθεσία δεν έχει πληÏοφοÏίες για σημαίες(flags)" - -#: libs/ardour/location.cc:391 -msgid "Locations: attempt to use unknown location as selected location" -msgstr "Τοποθεσίες: απόπειÏα να χÏησιμοποιηθεί άγνωστη τοποθεσία σαν επιλεγμένη τοποθεσία" - -#: libs/ardour/location.cc:418 -#: libs/ardour/playlist.cc:1187 -msgid "clear" -msgstr "εκκαθάÏιση" - -#: libs/ardour/location.cc:443 -msgid "clear markers" -msgstr "εκκαθάÏιση στιγμάτων" - -#: libs/ardour/location.cc:471 -msgid "clear ranges" -msgstr "εκκαθάÏιση διαστημάτων" - -#: libs/ardour/location.cc:489 -msgid "add" -msgstr "Ï€Ïόσθεση" - -#: libs/ardour/location.cc:527 -msgid "remove" -msgstr "απαλοιφή" - -#: libs/ardour/location.cc:567 -msgid "incorrect XML mode passed to Locations::set_state" -msgstr "λανθασμένο XML mode πέÏασε στις Τοποθεσίες::set_state" - -#: libs/ardour/mtc_slave.cc:196 -msgid "MTC Slave: atomic read of current time failed, sleeping!" -msgstr "MTC Slave: ατομική ανάγνωση του Ï„Ïέχοντος χÏόνου απέτυχε, πίσω για Ïπνο!" - -#: libs/ardour/named_selection.cc:77 -msgid "Chunk %1 uses an unknown playlist \"%2\"" -msgstr "Το κομμάτι %1 χÏησιμοποιεί άγνωστη λίστα αναπαÏ/γής \"%2\"" - -#: libs/ardour/named_selection.cc:80 -msgid "Chunk %1 contains misformed playlist information" -msgstr "Το κομμάτι %1 πεÏιέχει δÏσμοÏφες πληÏοφοÏίες για τη λίστα αναπαÏ/γής" - -#: libs/ardour/panner.cc:256 -msgid "MIDI pan control specification is incomplete, so it has been ignored" -msgstr "Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI pan είναι ημιτελής, με αποτέλεσμα να αγνοηθεί" - -#: libs/ardour/panner.cc:361 -msgid "automation write pass" -msgstr "πέÏασμα εγγÏαφής αυτοματισμοÏ" - -#: libs/ardour/panner.cc:401 -#, c-format -msgid "error writing pan automation file (%s)" -msgstr "σφάλμα στην εγγÏαφή του pan στο αÏχείο Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï (%s)" - -#: libs/ardour/panner.cc:429 -msgid "badly formatted pan automation event record at line %1 of %2 (ignored) [%3]" -msgstr "δÏσμοÏφη εγγÏαφή συμβάντος pan Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÏƒÏ„Î· γÏαμμή %1 of %2 (αγνοήθηκε) [%3]" - -#: libs/ardour/panner.cc:944 -msgid "badly-formed positional data for Multi2dPanner - ignored" -msgstr "δÏσμοÏφα δεδομένα θέσεως για το Multi2dPanner - αγνοήθηκε" - -#: libs/ardour/panner.cc:1237 -msgid "cannot open pan automation file \"%1\" for saving (%s)" -msgstr "δεν μποÏÏŽ να ανοίξω αÏχείο Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Ï„Î¿Ï… pan \"%1\" για αποθήκευση (%s)" - -#: libs/ardour/panner.cc:1273 -msgid "cannot open pan automation file %1 (%2)" -msgstr "δεν μποÏÏŽ να ανοίξω αÏχείο Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Ï„Î¿Ï… pan %1 (%2)" - -#: libs/ardour/panner.cc:1286 -msgid "badly formed version number in pan automation event file \"%1\"" -msgstr "δÏσμοÏφος αÏιθμός εκδόσεως στο αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Ï„Î¿Ï… pan \"%1\"" - -#: libs/ardour/panner.cc:1290 -msgid "no version information in pan automation event file \"%1\" (first line = %2)" -msgstr "καμία πληÏοφοÏία εκδόσεως στο αÏχείο συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Ï„Î¿Ï… pan \"%1\" (Ï€Ïώτη γÏαμμή = %2)" - -#: libs/ardour/panner.cc:1296 -msgid "mismatched pan automation event file version (%1)" -msgstr "αταίÏιαστη έκδοση αÏχείου συμβάντων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Î³Î¹Î± το pan (%1)" - -#: libs/ardour/panner.cc:1310 -msgid "too many panner states found in pan automation file %1" -msgstr "πάÏα πολλές καταστάσεις panner ευÏέθησαν στο αÏχείο των αυτοματισμών pan %1" - -#: libs/ardour/panner.cc:1451 -msgid "Unknown panner plugin \"%1\" found in pan state - ignored" -msgstr "Άγνωστο plugin για panner \"%1\" ευÏέθη στην κατάσταση pan - αγνοήθηκε" - -#: libs/ardour/panner.cc:1457 -msgid "panner plugin node has no type information!" -msgstr "ο κόμβος για τα plugin του panner δεν έχει πληÏοφοÏίες Ï„Ïπου!" - -#: libs/ardour/playlist.cc:253 -msgid "playlist const copy constructor called" -msgstr "λίστα αναπαÏ/γής const εκλήθη από κατασκευαστή αντιγÏάφου" - -#: libs/ardour/playlist.cc:259 -msgid "playlist non-const copy constructor called" -msgstr "λίστα αναπαÏ/γής non-const εκλήθη από κατασκευαστή αντιγÏάφου" - -#: libs/ardour/playlist.cc:499 -msgid "add region" -msgstr "Ï€Ïόσθεση πεÏιοχής" - -#: libs/ardour/playlist.cc:554 -msgid "replace region" -msgstr "αντικατάσταση πεÏιοχής" - -#: libs/ardour/playlist.cc:567 -msgid "remove region" -msgstr "απαλοιφή πεÏιοχής" - -#: libs/ardour/playlist.cc:614 -msgid "separate" -msgstr "ξεχωÏιστό" - -#: libs/ardour/playlist.cc:878 -msgid "cut" -msgstr "κοπή" - -#: libs/ardour/playlist.cc:968 -msgid "duplicate" -msgstr "αντιγÏαφή" - -#: libs/ardour/playlist.cc:1023 -msgid "split" -msgstr "διαχωÏισμός" - -#: libs/ardour/playlist.cc:1100 -msgid "%1: bounds changed received for region (%2)not in playlist" -msgstr "%1: τα αλλαγμένα ÏŒÏια που ελήφθησαν για την πεÏιοχή (%2)δεν είναι στη λίστα αναπαÏ/γής" - -#: libs/ardour/playlist.cc:1361 -msgid "Playlist: cannot create region from state file" -msgstr "Playlist: αδÏνατη η δημιουÏγία ΠεÏιοχής από αÏχείο καταστάσεως" - -#: libs/ardour/playlist.cc:1721 -msgid "nudged" -msgstr "νυχθέν" - -#: libs/ardour/playlist_factory.cc:49 -#: libs/ardour/playlist_factory.cc:64 -msgid "programming error: Playlist::createRegion called with unknown Region type" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: Playlist::createRegion εκλήθη με άγνωστο Ï„Ïπο Πε" - -#: libs/ardour/playlist_factory.cc:86 -msgid "programming error: Playlist::copyPlaylist called with unknown Playlist type" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: Playlist::copyPlaylist με άγνωστο Ï„Ïπο Playlist" - -#: libs/ardour/plugin.cc:328 -msgid "Could not locate HOME. Preset not saved." -msgstr "Δεν μπόÏεσα να βÏÏŽ το HOME. ΠÏο-ÏÏθμιση δεν αποθηκεÏθηκε." - -#: libs/ardour/plugin.cc:338 -#: libs/ardour/plugin.cc:344 -msgid "Could not create %1. Preset not saved. (%2)" -msgstr "Δεν μπόÏεσα να δημιουÏγήσω το %1. ΠÏο-ÏÏθμιση δεν αποθηκεÏθηκε. (%2)" - -#: libs/ardour/plugin.cc:349 -msgid "Error saving presets file %1." -msgstr "Σφάλμα στην αποθήκευση αÏχείου Ï€Ïο-Ïυθμίσεων %1." - -#: libs/ardour/plugin_manager.cc:194 -msgid "Could not parse rdf file: %1" -msgstr "Δεν μπόÏεσα να αναλÏσω το αÏχείο rdf: %1" - -#: libs/ardour/plugin_manager.cc:235 -msgid "LADSPA: cannot load module \"%1\" (%2)" -msgstr "LADSPA: δεν μποÏÏŽ να φοÏτώσω το module \"%1\" (%2)" - -#: libs/ardour/plugin_manager.cc:242 -msgid "LADSPA: module \"%1\" has no descriptor function." -msgstr "LADSPA: το module \"%1\" δεν έχει λειτουÏγία πεÏιγÏαφής." - -#: libs/ardour/plugin_manager.cc:297 -msgid "VST: cannot load module from \"%1\"" -msgstr "VST: δεν μποÏÏŽ να φοÏτώσω module από \"%1\"" - -#: libs/ardour/plugin_manager.cc:302 -msgid "You asked ardour to not use any VST plugins" -msgstr "Ζητήσατε απ'το Ardour να μή χÏησιμοποιήσει VST plugins" - -#: libs/ardour/plugin_manager.cc:305 -msgid "This version of ardour has no support for VST plugins" -msgstr "Η παÏοÏσα έκδοση του ardour δεν υποστηÏίζει VST plugins" - -#: libs/ardour/plugin_manager.cc:312 -msgid "LADSPA: cannot load module from \"%1\"" -msgstr "LADSPA: δεν μποÏÏŽ να φοÏτώσω module από \"%1\"" - -#: libs/ardour/plugin_manager.cc:374 -#: libs/ardour/plugin_manager.cc:386 -msgid "Unknown" -msgstr "Άγνωστο" - -#: libs/ardour/plugin_manager.cc:464 -msgid "VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time" -msgstr "Το VST plugin %1 δεν υποστηÏίζει processReplacing, και έτσι δεν μποÏεί να χÏησιμοποιηθεί στον ardour αυτή τη φοÏά" - -#: libs/ardour/recent_sessions.cc:44 -msgid "cannot open recent session file %1 (%2)" -msgstr "δεν μποÏÏŽ να ανοίξω το Ï€Ïόσφατο αÏχείο συνεδÏίας %1 (%2)" - -#: libs/ardour/redirect.cc:77 -msgid "programming error: unknown Redirect type in Redirect::Clone!\n" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος Redirect στο Redirect::Clone!\n" - -#: libs/ardour/redirect.cc:102 -#: libs/ardour/utils.cc:203 -msgid "pre" -msgstr "pre" - -#: libs/ardour/redirect.cc:104 -#: libs/ardour/utils.cc:206 -msgid "post" -msgstr "post" - -#: libs/ardour/redirect.cc:107 -msgid "Redirect: unknown placement string \"%1\" (ignored)" -msgstr "Redirect: άγνωστη γÏαμμή τοποθετήσεως \"%1\" (αγνοήθηκε)" - -#: libs/ardour/redirect.cc:125 -msgid "%1: cannot open %2 to load automation data (%3)" -msgstr "%1: δεν μποÏÏŽ να ανοίξω %2 για ανάκληση δεδομένων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï (%3)" - -#: libs/ardour/redirect.cc:154 -msgid "%1: cannot load automation data from %2" -msgstr "%1: δεν μποÏοÏν να ανακληθοÏν δεδομένα Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Î±Ï€ÏŒ %2" - -#: libs/ardour/redirect.cc:175 -msgid "%1: cannot open %2 to store automation data (%3)" -msgstr "%1: δεν μποÏÏŽ να ανοίξω %2 για αποθήκευση δεδομένων Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï (%3)" - -#: libs/ardour/redirect.cc:194 -#: libs/ardour/redirect.cc:201 -msgid "%1: could not save automation state to %2" -msgstr "%1: δεν μπόÏεσα να αποθηκεÏσω την κατάσταση Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÏƒÏ„Î¿ %2" - -#: libs/ardour/redirect.cc:246 -msgid "Could not get state from Redirect (%1). Problem with save_automation" -msgstr "Δεν μπόÏεσα να πάÏω κατάσταση από το Redirect (%1). ΠÏόβλημα με την αποθήκευση_αυτοματισμοÏ" - -#: libs/ardour/redirect.cc:296 -msgid "incorrect XML node \"%1\" passed to Redirect object" -msgstr "λανθασμένος κόμβος XML \"%1\" πέÏασε στο αντικείμενο Redirect" - -#: libs/ardour/redirect.cc:318 -msgid "%1: Automation node has no path property" -msgstr "%1: Ο Κόμβος Î±Ï…Ï„Î¿Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Î´ÎµÎ½ έχει οÏισμένο path" - -#: libs/ardour/redirect.cc:343 -msgid "XML node describing an IO is missing an IO node" -msgstr "Στον κόμβο XML που πεÏιγÏάφει I/O λείπει ένας κόμβος IO" - -#: libs/ardour/redirect.cc:348 -msgid "XML node describing a redirect is missing the `active' field" -msgstr "Στον κόμβο XML που πεÏιγÏάφει ένα redirect λείπει το πεδίο `ενεÏγό'(active)" - -#: libs/ardour/redirect.cc:358 -msgid "XML node describing a redirect is missing the `placement' field" -msgstr "Στον κόμβο XML που πεÏιγÏάφει ένα redirect λείπει το πεδίο `τοποθέτηση'(placement)" - -#: libs/ardour/redirect.cc:467 -msgid "active_changed" -msgstr "αλλαγή_ενεÏγοÏ" - -#: libs/ardour/region.cc:885 -msgid "Session: XMLNode describing a Region is incomplete (no id)" -msgstr "ΣυνεδÏία: XMLΚόμβος που πεÏιγÏάφει ΠεÏιοχή είναι ημιτελής (χωÏίς id)" - -#: libs/ardour/region.cc:892 -msgid "Session: XMLNode describing a Region is incomplete (no name)" -msgstr "ΣυνεδÏία: XMLΚόμβος που πεÏιγÏάφει ΠεÏιοχή είναι ημιτελής (χωÏίς όνομα)" - -#: libs/ardour/route.cc:79 -#: libs/ardour/session.cc:1554 -#: libs/ardour/session.cc:1560 -#: libs/ardour/session.cc:3093 -msgid "signal" -msgstr "σήμα" - -#: libs/ardour/route.cc:1430 -msgid "Could not get state of route. Problem with save_automation" -msgstr "Δεν μπόÏεσα να πάÏω κατάσταση διαδÏομής. ΠÏόβλημα με αποθήκευση_αυτοματισμοÏ" - -#: libs/ardour/route.cc:1482 -msgid "Send construction failed" -msgstr "Αποστολή κατασκευής απέτυχε" - -#: libs/ardour/route.cc:1504 -msgid "unknown Insert type \"%1\"; ignored" -msgstr "άγνωστος Ï„Ïπος Λήψης(Insert) \"%1\"... αγνοήθηκε" - -#: libs/ardour/route.cc:1510 -msgid "Insert XML node has no type property" -msgstr "Εισηχθέντας κόμβος XML δεν έχει στοιχεία Ï„Ïπου" - -#: libs/ardour/route.cc:1515 -msgid "insert could not be created. Ignored." -msgstr "εισαγωγή δεν μπόÏεσε να δημιουÏγηθεί. Αγνοήθηκε." - -#: libs/ardour/route.cc:1533 -msgid "Bad node sent to Route::set_state() [%1]" -msgstr "Κακός κόμβος εστάλη στο Route::set_state() [%1]" - -#: libs/ardour/route.cc:1592 -msgid "Route %1: unknown edit group \"%2 in saved state (ignored)" -msgstr "Route %1: άγνωστη ομάδα επεξεÏγασίας \"%2 στην αποθηκευμένη κατάσταση (αγνοήθηκε)" - -#: libs/ardour/route.cc:1608 -#: libs/ardour/route.cc:1612 -msgid "badly formed order key string in state file! [%1] ... ignored." -msgstr "δÏσμοÏφη γÏαμμή ÎºÎ»ÎµÎ¹Î´Î¹Î¿Ï Ï„Î±Î¾Î¹Î½Î¿Î¼Î®ÏƒÎµÏ‰Ï‚ στο αÏχείο καταστάσεως ! [%1] ... αγνοήθηκε." - -#: libs/ardour/route.cc:1693 -#: libs/ardour/route.cc:1820 -msgid "[control]" -msgstr "[έλεγχος]" - -#: libs/ardour/route.cc:1713 -msgid "Route %1: unknown mix group \"%2 in saved state (ignored)" -msgstr "Route %1: άγνωστη ομάδα μίξεως \"%2 στην αποθηκευμένη κατάσταση (αγνοήθηκε)" - -#: libs/ardour/route.cc:1742 -#: libs/ardour/route.cc:1750 -msgid "MIDI mute control specification for %1 is incomplete, so it has been ignored" -msgstr "Η Ï€ÏοδιαγÏαφή ελέγχου του MIDI mute για το %1 είναι ημιτελής, με αποτέλεσμα να αγνοηθεί" - -#: libs/ardour/send.cc:99 -msgid "XML node describing a send is missing a Redirect node" -msgstr "Στον κόμβο XML όπου πεÏιγÏάφεται ένα send λείπει ένας κόμβος Redirect" - -#: libs/ardour/session.cc:103 -msgid "Could not resolve path: %1 (%2)" -msgstr "ΑδÏνατη η εÏÏεση path: %1 (%2)" - -#: libs/ardour/session.cc:115 -msgid "cannot check session path %1 (%2)" -msgstr "δεν μποÏÏŽ να ελέγξω το μονοπάτι συνεδÏίας %1 (%2)" - -#: libs/ardour/session.cc:145 -msgid "cannot check statefile %1 (%2)" -msgstr "δεν μποÏÏŽ να ελέγξω το αÏχείο κατάστασεως %1 (%2)" - -#: libs/ardour/session.cc:181 -msgid "%1 is not an Ardour snapshot file" -msgstr "Το %1 δεν έιναι αÏχείο-στιγμιότυπο του Ardour" - -#: libs/ardour/session.cc:198 -msgid "cannot determine current working directory (%1)" -msgstr "δεν μποÏÏŽ να καθοÏίσω τον Ï„Ïέχοντα ενεÏγό φάκελο(directory) (%1)" - -#: libs/ardour/session.cc:215 -msgid "unknown file type for session %1" -msgstr "άγνωστος Ï„Ïπος αÏχείου για την συνεδÏία %1" - -#: libs/ardour/session.cc:320 -msgid "monitor" -msgstr "monitor" - -#: libs/ardour/session.cc:327 -msgid "master" -msgstr "master" - -#: libs/ardour/session.cc:611 -msgid "could not setup Click I/O" -msgstr "Δεν μπόÏεσα να διαμοÏφώσω το I/O του ΜετÏονόμου(click)" - -#: libs/ardour/session.cc:632 -msgid "cannot setup Click I/O" -msgstr "Δεν μποÏÏŽ να διαμοÏφώσω το I/O του ΜετÏονόμου(click)" - -#: libs/ardour/session.cc:654 -msgid "cannot create Auditioner: no auditioning of regions possible" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω τον ΑκÏοατή: καμία ακÏόαση πεÏιοχών δυνατή" - -#: libs/ardour/session.cc:666 -#, c-format -msgid "out %" -msgstr "" - -#: libs/ardour/session.cc:678 -#, c-format -msgid "in %" -msgstr "" - -#: libs/ardour/session.cc:692 -#, c-format -msgid "out %+%" -msgstr "" - -#: libs/ardour/session.cc:706 -#, c-format -msgid "in %+%" -msgstr "" - -#: libs/ardour/session.cc:739 -msgid "cannot setup master inputs" -msgstr "δεν μποÏÏŽ να διαμοÏφώσω τις master εισόδους" - -#: libs/ardour/session.cc:747 -msgid "cannot setup master outputs" -msgstr "δεν μποÏÏŽ να διαμοÏφώσω τις master εξόδους" - -#: libs/ardour/session.cc:758 -msgid "Master Out" -msgstr "" - -#: libs/ardour/session.cc:830 -msgid "cannot setup control inputs" -msgstr "δεν μποÏÏŽ να διαμοÏφώσω τις εισόδους ελέγχου" - -#: libs/ardour/session.cc:838 -msgid "cannot set up master outputs" -msgstr "δεν μποÏÏŽ να διαμοÏφώσω τις εξόδους ελέγχου" - -#: libs/ardour/session.cc:1110 -msgid "Session: you can't use that location for auto punch (start <= end)" -msgstr "ΣυνεδÏία: δεν μποÏείτε να χÏησιμοποιήσετε αυτήν την τοποθεσία για auto punch (αÏχή <= τέλος)" - -#: libs/ardour/session.cc:1189 -msgid "Session: you can't use a mark for auto loop" -msgstr "ΣυνεδÏία: δεν μποÏείτε να χÏησιμοποιήσετε στίγμα για auto loop" - -#: libs/ardour/session.cc:1572 -msgid "feedback loop setup between %1 and %2" -msgstr "διαμόÏφωση feedback loop ανάμεσα σε %1 και %2" - -#: libs/ardour/session.cc:1724 -#: libs/ardour/session.cc:1821 -msgid "cannot configure %1 in/%2 out configuration for new audio track" -msgstr "δεν μποÏÏŽ να διαμοÏφώσω %1 in/%2 out διάταξη για νέο κανάλι ήχου" - -#: libs/ardour/session.cc:1780 -msgid "Session: could not create new audio track." -msgstr "ΣυνεδÏία: δεν μπόÏεσα να δημιουÏγήσω νέο κανάλι ήχου." - -#: libs/ardour/session.cc:1870 -msgid "Session: could not create new route." -msgstr "ΣυνεδÏία: δεν μπόÏεσα να δημιουÏγήσω διαδÏομή." - -#: libs/ardour/session.cc:2354 -msgid "cannot create new name for region \"%1\"" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω νέο όνομα για την πεÏιοχή \"%1\"" - -#: libs/ardour/session.cc:2418 -msgid "too many regions with names like %1" -msgstr "πάÏα πολλές πεÏιοχές με ονόματα σαν %1" - -#: libs/ardour/session.cc:2883 -msgid "There are already %1 recordings for %2, which I consider too many." -msgstr "ΥπάÏχουν ήδη %1 εγγÏαφές για %2, τις οποίες θεωÏÏŽ πάÏα πολλές." - -#: libs/ardour/session.cc:3258 -msgid "programming error: unknown type of Insert created!" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος Εισόδου εδημιουÏγήθη!" - -#: libs/ardour/session.cc:3264 -msgid "programming error: unknown type of Redirect created!" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος Redirect εδημιουÏγήθη!" - -#: libs/ardour/session.cc:3287 -msgid "programming error: unknown type of Insert deleted!" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος of Insert διεγÏάφη!" - -#: libs/ardour/session.cc:3293 -msgid "programming error: unknown type of Redirect deleted!" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: άγνωστος Ï„Ïπος of Redirect διεγÏάφη!" - -#: libs/ardour/session.cc:3636 -msgid "too many bounced versions of playlist \"%1\"" -msgstr "πάÏα πολλές bounced εκδόσεις της Playlist \"%1\"" - -#: libs/ardour/session.cc:3649 -msgid "cannot create new audio file \"%1\" for %2" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω νέο αÏχείο ήχου \"%1\" για %2" - -#: libs/ardour/session_butler.cc:85 -#: libs/ardour/session_butler.cc:90 -msgid "UI: cannot set O_NONBLOCK on butler request pipe (%1)" -msgstr "UI: δεν μποÏÏŽ να θέσω O_NONBLOCK στο butler request pipe (%1)" - -#: libs/ardour/session_butler.cc:95 -msgid "Session: could not create butler thread" -msgstr "ΣυνεδÏία: δεν μπόÏεσα να δημιουÏγήσω δέσμη με τον butler" - -#: libs/ardour/session_butler.cc:189 -msgid "poll on butler request pipe failed (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:196 -msgid "Error on butler thread request pipe" -msgstr "Σφάλμα στο butler thread request pipe" - -#: libs/ardour/session_butler.cc:238 -msgid "Error reading from butler request pipe" -msgstr "Σφάλμα στην ανάγνωση από butler request pipe" - -#: libs/ardour/session_butler.cc:275 -msgid "Butler read ahead failure on dstream %1" -msgstr "Αποτυχία Ï€Ïοανάγνωσης Butler στο dstream %1" - -#: libs/ardour/session_butler.cc:319 -msgid "Butler write-behind failure on dstream %1" -msgstr "Αποτυχία οπισθεγγÏαφής Butler στο dstream %1" - -#: libs/ardour/session_click.cc:158 -msgid "cannot open click soundfile %1 (%2)" -msgstr "δεν μποÏÏŽ να ανοίξω τοsoundfile μετÏονόμου%1 (%2)" - -#: libs/ardour/session_click.cc:167 -msgid "cannot read data from click soundfile" -msgstr "δεν μποÏÏŽ να διαβάσω δεδομένα από το soundfile μετÏονόμου" - -#: libs/ardour/session_click.cc:192 -msgid "cannot open click emphasis soundfile %1 (%2)" -msgstr "δεν μποÏÏŽ να ανοίξω το soundfile εμφάσεως μετÏονόμου %1 (%2)" - -#: libs/ardour/session_click.cc:200 -msgid "cannot read data from click emphasis soundfile" -msgstr "δεν μποÏÏŽ να διαβάσω δεδομένα από το soundfile εμφάσεως μετÏονόμου" - -#: libs/ardour/session_events.cc:161 -msgid "Session: cannot have two events of type %1 at the same frame (%2)." -msgstr "ΣυνεδÏία: δεν γίνεται να υπάÏχουν δÏο συμβάντα του Ï„Ïπου %1 στο ίδιο frame (%2)." - -#: libs/ardour/session_events.cc:422 -msgid "Programming error: illegal event type in process_event (%1)" -msgstr "Σφάλμα Ï€ÏογÏαμματισμοÏ: παÏάνομος Ï„Ïπος συμβάντος στο process_event (%1)" - -#: libs/ardour/session_export.cc:63 -msgid "Export: no output file specified" -msgstr "Εξαγωγή: κανένα αÏχείο εξόδου δεν Ï€ÏοσδιοÏίστηκε" - -#: libs/ardour/session_export.cc:164 -#: libs/ardour/session_export.cc:169 -msgid "illegal frame range in export specification" -msgstr "παÏάνομο διάστημα frame στον Ï€ÏοσδιοÏισμό εξαγωγής" - -#: libs/ardour/session_export.cc:174 -msgid "Bad data width size. Report me!" -msgstr "Κακό μέγεθος εÏÏους δεδομένων. ΑνάφεÏέ με!" - -#: libs/ardour/session_export.cc:204 -msgid "Export: cannot open output file \"%1\" (%2)" -msgstr "Εξαγωγή: δεν μποÏÏŽ να ανοίξω αÏχείο εξόδου \"%1\" (%2)" - -#: libs/ardour/session_export.cc:214 -msgid "cannot initialize sample rate conversion: %1" -msgstr "δεν μποÏÏŽ να καλέσω την μετατÏοπή του ÏÏ…Î¸Î¼Î¿Ï Î´ÎµÎ¹Î³Î¼Î±Ï„Î¿Î»Î·ÏˆÎ¯Î±Ï‚: %1" - -#: libs/ardour/session_export.cc:316 -msgid "an error occured during sample rate conversion: %1" -msgstr "παÏουσιάστηκε σφάλμα κάτα την μετατÏοπή του ÏÏ…Î¸Î¼Î¿Ï Î´ÎµÎ¹Î³Î¼Î±Ï„Î¿Î»Î·ÏˆÎ¯Î±Ï‚: %1" - -#: libs/ardour/session_export.cc:327 -msgid "warning, leftover frames overflowed, glitches might occur in output" -msgstr "Ï€Ïοσοχή, παÏατημένα frames διέÏÏευσαν, πιθανόν να παÏουσιαστοÏν ατέλειες στην έξοδο" - -#: libs/ardour/session_export.cc:418 -msgid "Export: could not write data to output file (%1)" -msgstr "Εξαγωγή: δεν μπόÏεσα να γÏάψω δεδομένα στο αÏχείο εξόδου (%1)" - -#: libs/ardour/session_export.cc:500 -msgid "%1: cannot seek to %2 for export" -msgstr "%1: δεν μποÏÏŽ να αναζητήσω στο %2 για εξαγωγή" - -#: libs/ardour/session_midi.cc:200 -msgid "Ardour is slaved to MTC - port cannot be reset" -msgstr "Το Ardour υπακοÏει το MTC - η θÏÏα δεν γίνεται reset" - -#: libs/ardour/session_midi.cc:215 -msgid "unknown port %1 requested for MTC" -msgstr "Εζητήθη άγνωστη θÏÏα %1 για το MTC" - -#: libs/ardour/session_midi.cc:541 -msgid "Error reading from MIDI port %1" -msgstr "Σφάλμα στην ανάγνωση της θÏÏας MIDI %1" - -#: libs/ardour/session_midi.cc:914 -msgid "Session: could not send full MIDI time code" -msgstr "ΣυνεδÏία: δεν μπόÏεσα να στείλω ολόκληÏο MIDI time code" - -#: libs/ardour/session_midi.cc:973 -msgid "Session: cannot send quarter-frame MTC message (%1)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να στείλω τέταÏτο-frame MTC μήνυμα (%1)" - -#: libs/ardour/session_midi.cc:1081 -msgid "MMC: cannot send command %1%2%3" -msgstr "MMC: δεν μποÏÏŽ να στείλω την εντολή %1%2%3" - -#: libs/ardour/session_midi.cc:1188 -msgid "UI: cannot set O_NONBLOCK on signal read pipe (%1)" -msgstr "UI: δεν μποÏÏŽ να θέσω O_NONBLOCK στο signal read pipe (%1)" - -#: libs/ardour/session_midi.cc:1193 -msgid "UI: cannot set O_NONBLOCK on signal write pipe (%1)" -msgstr "UI: δεν μποÏÏŽ να θέσω O_NONBLOCK στο signal write pipe (%1)" - -#: libs/ardour/session_midi.cc:1198 -msgid "Session: could not create transport thread" -msgstr "ΣυνεδÏία: δεν μπόÏεσα να δημιουÏγήσω δέσμη με transport" - -#: libs/ardour/session_midi.cc:1227 -msgid "cannot send signal to midi thread! (%1)" -msgstr "δεν μποÏÏŽ να στείλω σήμα στη δέσμη midi! (%1)" - -#: libs/ardour/session_midi.cc:1322 -msgid "MIDI thread poll failed (%1)" -msgstr "Αίτηση δέσμης MIDI απέτυχε (%1)" - -#: libs/ardour/session_midi.cc:1334 -msgid "Error on transport thread request pipe" -msgstr "Σφάλμα στο transport thread request pipe" - -#: libs/ardour/session_midi.cc:1361 -msgid "Error reading from transport request pipe" -msgstr "Σφάλμα στην ανάγνωση από transport request pipe" - -#: libs/ardour/session_process.cc:104 -msgid "Session: error in no roll for %1" -msgstr "ΣυνεδÏία: σφάλμα στο no roll για %1" - -#: libs/ardour/session_state.cc:101 -msgid "Could not use path %1 (%s)" -msgstr "ΑδÏνατη η χÏήση του path %1 (%s)" - -#: libs/ardour/session_state.cc:129 -msgid "end" -msgstr "τέλος" - -#: libs/ardour/session_state.cc:130 -msgid "start" -msgstr "" - -#: libs/ardour/session_state.cc:502 -msgid "Session: cannot create session dir \"%1\" (%2)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\" (%2)" - -#: libs/ardour/session_state.cc:513 -msgid "Session: cannot create session peakfile dir \"%1\" (%2)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω peakfile dir συνεδÏίας \"%1\" (%2)" - -#: libs/ardour/session_state.cc:522 -msgid "Session: cannot create session sounds dir \"%1\" (%2)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο ήχων συνεδÏίας \"%1\" (%2)" - -#: libs/ardour/session_state.cc:531 -msgid "Session: cannot create session tape dir \"%1\" (%2)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω tape dir συνεδÏίας \"%1\" (%2)" - -#: libs/ardour/session_state.cc:540 -msgid "Session: cannot create session dead sounds dir \"%1\" (%2)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο 'νεκÏών' ήχων συνεδÏίας \"%1\" (%2)" - -#: libs/ardour/session_state.cc:549 -msgid "Session: cannot create session automation dir \"%1\" (%2)" -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω φάκελο αυτοματισμών της συνεδÏίας \"%1\" (%2)" - -#: libs/ardour/session_state.cc:580 -msgid "Could not open %1 for writing mix template" -msgstr "Δεν μπόÏεσα να ανοίξω %1 για γÏάψιμο του Ï€Ïοσχεδίου μίξεως" - -#: libs/ardour/session_state.cc:586 -msgid "Could not open mix template %1 for reading" -msgstr "Δεν μπόÏεσα να ανοίξω Ï€Ïοσχέδιο μίξεως %1 για ανάγνωση" - -#: libs/ardour/session_state.cc:593 -msgid "Session already exists. Not overwriting" -msgstr "Η ΣυνεδÏία ήδη υπάÏχει. ΑκÏÏωση overwriting" - -#: libs/ardour/session_state.cc:636 -msgid "Session: could not load diskstream via XML state" -msgstr "ΣυνεδÏία: δεν μπόÏεσα να φοÏτώσω diskstream μέσω καταστάσεως XML" - -#: libs/ardour/session_state.cc:685 -msgid "could not backup old state file, current state not saved." -msgstr "δεν μπόÏεσα να διασώσω το παλαιό αÏχείο καταστάσεως, η Ï„Ïέχουσα κατάσταση δεν αποθηκεÏτηκε." - -#: libs/ardour/session_state.cc:698 -msgid "state could not be saved to %1" -msgstr "η κατάσταση δεν μποÏοÏσε να σωθεί στο %1" - -#: libs/ardour/session_state.cc:705 -msgid "could not remove corrupt state file %1" -msgstr "αδÏνατη η διαγÏαφή αÏχείου διεφθαÏμένης state %1" - -#: libs/ardour/session_state.cc:709 -msgid "could not restore state file from backup %1" -msgstr "αδÏνατη η επαναφοÏά του state file από backup %1" - -#: libs/ardour/session_state.cc:778 -msgid "%1: session state information file \"%2\" doesn't exist!" -msgstr "%1: το αÏχείο πληÏοφοÏιών καταστάσεως συνεδÏίας \"%2\" δεν υπάÏχει!" - -#: libs/ardour/session_state.cc:789 -msgid "Could not understand ardour file %1" -msgstr "Δεν μπόÏεσα να κατανοήσω το ardour αÏχείο %1" - -#: libs/ardour/session_state.cc:1493 -msgid "programming error: Session: incorrect XML node sent to set_state()" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: ΣυνεδÏία: λανθασμένος κόμβος XML εστάλη στην set_state()" - -#: libs/ardour/session_state.cc:1539 -msgid "Session: XML state has no options section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα επιλογών(options)" - -#: libs/ardour/session_state.cc:1544 -msgid "Session: XML state has no sources section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα πηγών" - -#: libs/ardour/session_state.cc:1551 -msgid "Session: XML state has no Regions section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα ΠεÏιοχών" - -#: libs/ardour/session_state.cc:1558 -msgid "Session: XML state has no playlists section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα playlists" - -#: libs/ardour/session_state.cc:1577 -msgid "Session: XML state has no diskstreams section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα diskstreams" - -#: libs/ardour/session_state.cc:1584 -msgid "Session: XML state has no connections section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα συνδέσεων" - -#: libs/ardour/session_state.cc:1591 -msgid "Session: XML state has no locations section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα τοποθεσιών" - -#: libs/ardour/session_state.cc:1624 -msgid "Session: XML state has no edit groups section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα επεξεÏ/σίας ομάδων" - -#: libs/ardour/session_state.cc:1631 -msgid "Session: XML state has no mix groups section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα μίξεως ομάδων" - -#: libs/ardour/session_state.cc:1638 -msgid "Session: XML state has no Tempo Map section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα Tempo Map" - -#: libs/ardour/session_state.cc:1645 -msgid "Session: XML state has no routes section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα διαδÏομών" - -#: libs/ardour/session_state.cc:1652 -msgid "Session: XML state has no click section" -msgstr "ΣυνεδÏία: η XML κατάσταση δεν έχει τομέα μετÏονόμου" - -#: libs/ardour/session_state.cc:1697 -msgid "Session: cannot create Route from XML description." -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω ΔιαδÏομή από XML πεÏιγÏαφή." - -#: libs/ardour/session_state.cc:1735 -msgid "Session: cannot create Region from XML description." -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω ΠεÏιοχή από XML πεÏιγÏαφή." - -#: libs/ardour/session_state.cc:1764 -msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)" -msgstr "ΣυνεδÏία: Ο XMLΚόμβος που πεÏιγÏάφει AudioΠεÏιοχή είναι ημιτελής (δίχως πηγή)" - -#: libs/ardour/session_state.cc:1772 -#: libs/ardour/session_state.cc:1792 -msgid "Session: XMLNode describing a AudioRegion references an unknown source id =%1" -msgstr "ΣυνεδÏία: Ο XMLΚόμβος που πεÏιγÏάφει AudioΠεÏιοχή αναφέÏει άγνωστο id πηγής =%1" - -#: libs/ardour/session_state.cc:1778 -#: libs/ardour/session_state.cc:1798 -msgid "Session: XMLNode describing a AudioRegion references a non-audio source id =%1" -msgstr "ΣυνεδÏία: Ο XMLNode που πεÏιγÏάφει AudioRegion αναφέÏει μη-ηχητική πηγή με id =%1" - -#: libs/ardour/session_state.cc:1868 -msgid "Session: cannot create Source from XML description." -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω Πηγή από XML πεÏιγÏαφή." - -#: libs/ardour/session_state.cc:1889 -msgid "Found a sound file that cannot be used by Ardour. Talk to the progammers." -msgstr "ΕυÏέθη sound file που δεν μποÏεί να χÏησιμοποιηθεί από τον Ardour. Επικοινωνήστε με τους Ï€ÏογÏαμματιστές." - -#: libs/ardour/session_state.cc:1913 -msgid "Could not create mix templates directory \"%1\" (%2)" -msgstr "Δεν μπόÏεσα να δημιουÏγήσω φάκελο Ï€Ïοσχεδίων μίξεως \"%1\" (%2)" - -#: libs/ardour/session_state.cc:1927 -msgid "Template \"%1\" already exists - new version not created" -msgstr "Το Ï€Ïοσχέδιο \"%1\" ήδη υπάÏχει - νέα έκδοση δεν δημιουÏγήθηκε" - -#: libs/ardour/session_state.cc:1934 -msgid "mix template not saved" -msgstr "Ï€Ïοσχέδιο μίξεως δεν αποθηκεÏτηκε" - -#: libs/ardour/session_state.cc:1994 -msgid "cannot create session directory \"%1\"; ignored" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω φάκελο συνεδÏίας \"%1\"; αγνοήθηκε" - -#: libs/ardour/session_state.cc:2007 -msgid "cannot create sounds directory \"%1\"; ignored" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω τον φάκελο 'sounds' \"%1\"; αγνοήθηκε" - -#: libs/ardour/session_state.cc:2018 -msgid "cannot create dead sounds directory \"%1\"; ignored" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω τον φάκελο 'dead sounds' \"%1\"; αγνοήθηκε" - -#: libs/ardour/session_state.cc:2029 -msgid "cannot create peak file directory \"%1\"; ignored" -msgstr "αδÏνατη η δημιουÏγία φακέλου peak file \"%1\"; αγνοήθηκε" - -#: libs/ardour/session_state.cc:2168 -#: libs/ardour/session_state.cc:2189 -msgid "Session: cannot create Playlist from XML description." -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω την Playlist από την XML πεÏιγÏαφή." - -#: libs/ardour/session_state.cc:2228 -msgid "Session: cannot create Named Selection from XML description." -msgstr "ΣυνεδÏία: δεν μποÏÏŽ να δημιουÏγήσω την ονομασμένη επιλογή από την XML πεÏιγÏαφή." - -#: libs/ardour/session_state.cc:2360 -msgid "Unknown node \"%1\" found in Connections list from state file" -msgstr "Άγνωστος κόμβος \"%1\" ευÏέθη στη λίστα 'Συνδέσεις' από το αÏχείο καταστάσεως" - -#: libs/ardour/session_state.cc:3197 -msgid "cannot remove dead sound file %1 (%2)" -msgstr "δεν μποÏÏŽ να απαλοίψω το 'νεκÏο' ηχο-αÏχείο %1 (%2)" - -#: libs/ardour/session_time.cc:374 -msgid "Unknown JACK transport state %1 in sync callback" -msgstr "Άγνωστη κατάσταση του JACK transport %1 στην ανάκληση sync" - -#: libs/ardour/session_timefx.cc:77 -msgid "tempoize: error creating name for new audio file based on %1" -msgstr "tempoize: σφάλμα στη δημιουÏγία ονόματος για νέο αÏχείο ήχου βασισμένο σε %1" - -#: libs/ardour/session_timefx.cc:88 -msgid "tempoize: error creating new audio file %1 (%2)" -msgstr "tempoize: σφάλμα στη δημιουÏγία νέου αÏχείου ήχου %1 (%2)" - -#: libs/ardour/session_timefx.cc:114 -msgid "tempoize: error reading data from %1" -msgstr "tempoize: σφάλμα στην ανάγνωση δεδομένων από %1" - -#: libs/ardour/session_timefx.cc:127 -#: libs/ardour/session_timefx.cc:139 -msgid "error writing tempo-adjusted data to %1" -msgstr "σφάλμα στην εγγÏαφή χÏονο-Ïυθμισμένων δεδομένων στο %1" - -#: libs/ardour/session_timefx.cc:145 -msgid "timefx code failure. please notify ardour-developers." -msgstr "αποτυχία κώδικα timefx. παÏακαλώ ειδοποιήστε τους Ï€ÏογÏαμματιστές του ardour." - -#: libs/ardour/session_transport.cc:117 -msgid "Cannot loop - no loop range defined" -msgstr "Δεν γίνεται loop - κανένα διάστημα loop δεν Ï€ÏοσδιοÏίστηκε" - -#: libs/ardour/session_transport.cc:479 -msgid "" -"Seamless looping cannot be supported while Ardour is using JACK transport.\n" -"Recommend changing the configured options" -msgstr "" -"Μονοκόμματο looping δεν υποστηÏίζεται ενώ ο Ardour χÏησιμοποιεί το JACK transport.\n" -"ΣυνιστοÏμε την αλλαγή των διαμοÏφωμένων Ïυθμίσεων" - -#: libs/ardour/session_transport.cc:755 -msgid "Global varispeed cannot be supported while Ardour is connected to JACK transport control" -msgstr "Η Global varispeed δεν μποÏεί να υποστηÏιχθεί ενώ ο Ardour είναι συνδεδεμένος με τον JACK transport control" - -#: libs/ardour/session_transport.cc:955 -msgid "please stop the transport before adjusting slave settings" -msgstr "παÏακαλώ σταματήστε το transport Ï€Ïιν την ÏÏθμιση των επιλογων εξαÏτήσεως" - -#: libs/ardour/session_transport.cc:991 -msgid "No MTC port defined: MTC slaving is impossible." -msgstr "Καμμία θÏÏα MTC δεν Ï€ÏοσδιοÏίστηκε: η εξάÏτηση του MTC (slaving) είναι αδÏνατη." - -#: libs/ardour/sndfile_helpers.cc:15 -msgid "WAV" -msgstr "WAV" - -#: libs/ardour/sndfile_helpers.cc:16 -msgid "AIFF" -msgstr "AIFF" - -#: libs/ardour/sndfile_helpers.cc:17 -msgid "raw (no header)" -msgstr "raw (no header)" - -#: libs/ardour/sndfile_helpers.cc:18 -msgid "PAF (Ensoniq Paris)" -msgstr "PAF (Ensoniq Paris)" - -#: libs/ardour/sndfile_helpers.cc:19 -msgid "AU (Sun/NeXT)" -msgstr "AU (Sun/NeXT)" - -#: libs/ardour/sndfile_helpers.cc:20 -msgid "IRCAM" -msgstr "IRCAM" - -#: libs/ardour/sndfile_helpers.cc:21 -msgid "W64 (64 bit WAV)" -msgstr "W64 (64 bit WAV)" - -#: libs/ardour/sndfile_helpers.cc:26 -msgid ".wav" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:27 -msgid ".aiff" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:28 -msgid ".raw" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:29 -msgid ".paf" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:30 -msgid ".au" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:31 -msgid ".ircam" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:32 -msgid ".w64" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:47 -msgid "16 bit" -msgstr "16 bit" - -#: libs/ardour/sndfile_helpers.cc:48 -msgid "24 bit" -msgstr "24 bit" - -#: libs/ardour/sndfile_helpers.cc:49 -msgid "32 bit" -msgstr "32 bit" - -#: libs/ardour/sndfile_helpers.cc:50 -msgid "8 bit" -msgstr "8 bit" - -#: libs/ardour/sndfile_helpers.cc:51 -msgid "float" -msgstr "float" - -#: libs/ardour/sndfile_helpers.cc:64 -msgid "Little-endian (Intel)" -msgstr "Little-endian (Intel)" - -#: libs/ardour/sndfile_helpers.cc:65 -msgid "Big-endian (Mac)" -msgstr "Big-endian (Mac)" - -#: libs/ardour/sndfilesource.cc:147 -msgid "FileSource: cannot get host information for BWF header (%1)" -msgstr "FileSource: δεν μποÏÏŽ να βÏÏŽ πληÏοφοÏίες οικοδεσπότη(host) για επικεφαλίδα BWF (%1)" - -#: libs/ardour/sndfilesource.cc:169 -msgid "cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file" -msgstr "Δεν ετέθησαν broadcast info για το audio file %1 (%2); απόÏÏιψη broadcast info για αυτό το αÏχείο" - -#: libs/ardour/sndfilesource.cc:220 -msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)" -msgstr "SndFileSource: δεν μποÏÏŽ να ανοίξω το αÏχείο \"%1\" για %2 (%3)" - -#: libs/ardour/sndfilesource.cc:226 -msgid "SndFileSource: file only contains %1 channels; %2 is invalid as a channel number" -msgstr "SndFileSource: το αÏχείο πεÏιέχει μόνο %1 κανάλια; %2 δεν έχει αξία σαν κανάλι number" - -#: libs/ardour/sndfilesource.cc:327 -msgid "SndFileSource: could not seek to frame %1 within %2 (%3)" -msgstr "SndFileSource: δεν μποÏοÏσα να αναζητήσω στο frame %1 μέσα στο %2 (%3)" - -#: libs/ardour/sndfilesource.cc:378 -msgid "programming error: %1 %2" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: %1 %2" - -#: libs/ardour/sndfilesource.cc:487 -#: libs/ardour/sndfilesource.cc:533 -msgid "cannot set broadcast info for audio file %1; Dropping broadcast info for this file" -msgstr "Δεν ετέθησαν broadcast info για το audio file %1; ΑπόÏÏιψη broadcast info για αυτό το αÏχείο" - -#: libs/ardour/sndfilesource.cc:544 -msgid "%1: cannot seek to %2" -msgstr "%1: αδÏνατη η αναζήτηση στο %2" - -#: libs/ardour/state_manager.cc:47 -msgid "cleared history" -msgstr "εκκαθάÏιση ιστοÏικοÏ" - -#: libs/ardour/state_manager.cc:60 -msgid "programming error: illegal state ID (%1) passed to StateManager::set_state() (range = 0-%2)" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: αθέμιτη κατάσταση ID (%1) πέÏασε στον StateManager::set_state() (range = 0-%2)" - -#: libs/ardour/stateful.cc:102 -msgid "Error: could not write %1" -msgstr "Σφάλμα: δεν μπόÏεσα να γÏάψω %1" - -#: libs/ardour/stateful.cc:116 -msgid "Could not understand XML file %1" -msgstr "Δεν μπόÏεσα να κατανοήσω το XML αÏχείο %1" - -#: libs/ardour/tempo.cc:67 -msgid "TempoSection XML node has no \"start\" property" -msgstr "Κόμβος του TempoSection XML δεν έχει ιδιότητα \"έναÏξη\"" - -#: libs/ardour/tempo.cc:75 -msgid "TempoSection XML node has an illegal \"start\" value" -msgstr "Κόμβος του TempoSection XML έχει αθέμιτη αξία \"έναÏξη\"" - -#: libs/ardour/tempo.cc:82 -msgid "TempoSection XML node has no \"beats-per-minute\" property" -msgstr "Κόμβος του TempoSection XML δεν έχει \"κτÏπων-ανά-λεπτό\" ιδιότητα" - -#: libs/ardour/tempo.cc:87 -msgid "TempoSection XML node has an illegal \"beats_per_minute\" value" -msgstr "Κόμβος του TempoSection XML έχει αθέμιτη \"κτÏπων_ανά_λεπτό\" αξία" - -#: libs/ardour/tempo.cc:92 -msgid "TempoSection XML node has no \"movable\" property" -msgstr "Κόμβος του TempoSection XML δεν έχει \"κινητή\" ιδιότητα" - -#: libs/ardour/tempo.cc:131 -msgid "MeterSection XML node has no \"start\" property" -msgstr "Κόμβος του MeterSection XML δεν έχει \"έναÏξη\" ιδιότητα" - -#: libs/ardour/tempo.cc:139 -msgid "MeterSection XML node has an illegal \"start\" value" -msgstr "Κόμβος του MeterSection XML έχει αθέμιτη \"έναÏξη\" αξία" - -#: libs/ardour/tempo.cc:146 -msgid "MeterSection XML node has no \"beats-per-bar\" property" -msgstr "Κόμβος του MeterSection XML δεν έχει \"κτÏπων-ανά-μπάÏα\" ιδιότητα" - -#: libs/ardour/tempo.cc:151 -msgid "MeterSection XML node has an illegal \"beats-per-bar\" value" -msgstr "Κόμβος του MeterSection XML έχει αθέμιτη \"κτÏπων-ανά-μπάÏα\" αξία" - -#: libs/ardour/tempo.cc:156 -msgid "MeterSection XML node has no \"note-type\" property" -msgstr "Κόμβος του MeterSection XML δεν έχει \"Ï„Ïπος-νότας\" ιδιότητα" - -#: libs/ardour/tempo.cc:161 -msgid "MeterSection XML node has an illegal \"note-type\" value" -msgstr "Κόμβος του MeterSection XML έχει αθέμιτη \"Ï„Ïπος-νότας\" αξία" - -#: libs/ardour/tempo.cc:166 -msgid "MeterSection XML node has no \"movable\" property" -msgstr "Κόμβος του MeterSection XML δεν έχει \"κινητή\" ιδιότητα" - -#: libs/ardour/tempo.cc:259 -msgid "move metric" -msgstr "μετακίνηση μετÏικοÏ" - -#: libs/ardour/tempo.cc:330 -msgid "metric removed" -msgstr "μετÏικό απεσÏÏθη" - -#: libs/ardour/tempo.cc:373 -msgid "add tempo" -msgstr "Ï€Ïόσθεση ÏυθμοÏ" - -#: libs/ardour/tempo.cc:402 -msgid "replace tempo" -msgstr "αντικατάσταση ÏυθμοÏ" - -#: libs/ardour/tempo.cc:435 -msgid "add meter" -msgstr "Ï€Ïόσθεση μετÏητή" - -#: libs/ardour/tempo.cc:463 -msgid "replaced meter" -msgstr "αντικατεστημένος μετÏητής" - -#: libs/ardour/tempo.cc:483 -#: libs/ardour/tempo.cc:499 -msgid "programming error: no tempo section in tempo map!" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: κανένας τομέας ÏÏ…Î¸Î¼Î¿Ï ÏƒÏ„Î¿ χάÏτη Ïυθμών!" - -#: libs/ardour/tempo.cc:538 -msgid "programming error: unhandled MetricSection type" -msgstr "σφάλμα Ï€ÏογÏαμματισμοÏ: αχείÏιστος Ï„Ïπος MetricSection" - -#: libs/ardour/tempo.cc:1226 -#: libs/ardour/tempo.cc:1238 -msgid "Tempo map: could not set new state, restoring old one." -msgstr "ΧάÏτης Ïυθμών: δεν μπόÏεσα να θέσω νέα κατάσταση, επιστÏοφή Ï€ÏοηγοÏμενης." - -#: libs/ardour/tempo.cc:1262 -msgid "load XML data" -msgstr "ΦόÏτωμα δεδομένων XML" - -#: libs/ardour/utils.cc:246 -msgid "illegal or badly-formed string used for path (%1)" -msgstr "αθέμιτη ή κακοσχηματισμένη γÏαμμή για το μονοπάτι (%1)" - -#: libs/ardour/utils.cc:251 -msgid "path (%1) is ambiguous" -msgstr "Το μονοπάτι (%1) είναι αμφίβολο" - -#: libs/ardour/vst_plugin.cc:187 -msgid "cannot create VST chunk directory: %1" -msgstr "δεν μποÏÏŽ να δημιουÏγήσω φάκελο κομματιών VST: %1" - -#: libs/ardour/vst_plugin.cc:195 -msgid "cannot check VST chunk directory: %1" -msgstr "δεν μποÏÏŽ να ελέγξω το φάκελο κομματιών VST: %1" - -#: libs/ardour/vst_plugin.cc:202 -msgid "%1 exists but is not a directory" -msgstr "%1 υπάÏχει αλλά δεν είναι φάκελος" - -#: libs/ardour/vst_plugin.cc:240 -msgid "Bad node sent to VSTPlugin::set_state" -msgstr "Κακός κόμβος εστάλη στο VSTPlugin::set_state" - -#: libs/ardour/vst_plugin.cc:343 -#: libs/ardour/vst_plugin.cc:354 -msgid "no support for presets using chunks at this time" -msgstr "καμμία υποστήÏιξη αυτή τη στιγμή για Ïυθμίσεις που χÏησιμοποιοÏν κομμάτια" - -#: libs/ardour/coreaudiosource.cc:97 -msgid "CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel number" -msgstr "CoreAudioSource: το αÏχείο πεÏιέχει μόνο %1 κανάλια; το %2 δεν έχει αξία σαν αÏιθμός καναλιών" - -#: libs/ardour/coreaudiosource.cc:162 -msgid "CoreAudioSource: could not seek to frame %1 within %2 (%3)" -msgstr "CoreAudioSource: δεν μποÏοÏσα να αναζητήσω στο frame %1 μέσα στο %2 (%3)" - -#~ msgid "FileSource: \"%1\" not found when searching %2 using %3" -#~ msgstr "FileSource: \"%1\" δεν ευÏέθη όταν αναζητείτο %2 χÏησιμοποιώντας %3" -#~ msgid "FileSource: could not open \"%1\": (%2)" -#~ msgstr "FileSource: δεν μπόÏεσα να ανοίξω \"%1\": (%2)" -#~ msgid "FileSource: cannot write header in %1" -#~ msgstr "FileSource: δεν μποÏÏŽ να γÏάψω επικεφαλίδα στο %1" -#~ msgid "FileSource: cannot locate chunks in %1" -#~ msgstr "FileSource: δεν μποÏÏŽ να ανιχνεÏσω κομμάτια στο %1" -#~ msgid "FileSource: cannot read header in %1" -#~ msgstr "FileSource: δεν μποÏÏŽ να διαβάσω επικεφαλίδα στο %1" -#~ msgid "FileSource: cannot check header in %1" -#~ msgstr "FileSource: δεν μποÏÏŽ να ελέγξω επικεφαλίδα στο %1" - -#, fuzzy -#~ msgid "FileSource: cannot initialize peakfile for %1 as %2" -#~ msgstr "FileSource: δεν μποÏÏŽ να εκκινήσω το peakfile για %1" -#~ msgid "FileSource: cannot seek to end of file" -#~ msgstr "FileSource: δεν μποÏÏŽ να ανιχνεÏσω το τέλος του αÏχείου" -#~ msgid "FileSource: cannot read RIFF/WAVE chunk from file" -#~ msgstr "FileSource: δεν μποÏÏŽ να διαβάσω κομμάτι RIFF/WAVE από το αÏχείο" -#~ msgid "FileSource %1: not a RIFF/WAVE file" -#~ msgstr "FileSource %1: δεν είναι RIFF/WAVE αÏχείο" -#~ msgid "FileSource: can't read a chunk" -#~ msgstr "FileSource: δεν μποÏÏŽ να διαβάσω κομμάτι" -#~ msgid "FileSource: cannot get user information for BWF header (%1)" -#~ msgstr "" -#~ "FileSource: δεν μποÏÏŽ να βÏÏŽ πληÏοφοÏίες χÏήστη για επικεφαλίδα BWF (%1)" -#~ msgid "FileSource[%1]: cannot update data size: %2" -#~ msgstr "FileSource[%1]: δεν μποÏÏŽ να ανανεώσω το μέγεθος δεδομένων: %2" -#~ msgid "FileSource: can't find RIFF chunk info" -#~ msgstr "FileSource: δεν ευÏέθησαν πληÏοφοÏίες για RIFF κομμάτι" - -#, fuzzy -#~ msgid "FileSource: can't find RIFX chunk info" -#~ msgstr "FileSource: δεν ευÏέθησαν πληÏοφοÏίες για RIFF κομμάτι" -#~ msgid "FileSource: can't read RIFF chunk" -#~ msgstr "FileSource: δεν μποÏÏŽ να διαβάσω RIFF κομμάτι" -#~ msgid "FileSource: can't find format chunk info" -#~ msgstr "FileSource: δεν ευÏέθησαν πληÏοφοÏίες για το κομμάτι φοÏμαÏίσματος" -#~ msgid "FileSource: can't read format chunk" -#~ msgstr "FileSource: δεν μποÏÏŽ να διαβάσω το κομμάτι φοÏμαÏίσματος" -#~ msgid "FileSource: can't find data chunk info" -#~ msgstr "FileSource: δεν μποÏÏŽ να βÏÏŽ πληÏοφοÏίες για το κομμάτι δεδομένων" -#~ msgid "FileSource: can't read data chunk" -#~ msgstr "FileSource: δεν μποÏÏŽ να διαβάσω το κομμάτι δεδομένων" -#~ msgid "" -#~ "FileSource: cannot read Broadcast Wave data from existing audio file \"%1" -#~ "\" (%2)" -#~ msgstr "" -#~ "FileSource: δεν μποÏÏŽ να διαβάσω δεδομένα Broadcast Wave από το υπάÏχον " -#~ "αÏχείο \"%1\" (%2)" -#~ msgid "" -#~ "FileSource: cannot read Broadcast Wave coding history from audio file \"%1" -#~ "\" (%2)" -#~ msgstr "" -#~ "FileSource: δεν μποÏÏŽ να διαβάσω το ιστοÏικό του κώδικα Broadcast Wave " -#~ "από το αÏχείο \"%1\" (%2)" - -#, fuzzy -#~ msgid "" -#~ "FileSource \"%1\" does not use valid sample format.\n" -#~ "This is probably a programming error." -#~ msgstr "" -#~ "FileSource \"%1\" δεν χÏησιμοποιεί format μεταβλητής υποδιαστολής.\n" -#~ "Αυτό πιθανόν να είναι σφάλμα Ï€ÏογÏαμματισμοÏ." -#~ msgid "FileSource \"%1\" has no \"data\" chunk" -#~ msgstr "FileSource \"%1\" δεν έχει \"data\" κομμάτι" -#~ msgid "" -#~ "%1: data length in header (%2) differs from implicit size in file (%3)" -#~ msgstr "" -#~ "%1: το μέγεθος δεδομένων της επικεφαλίδας (%2) διαφέÏει από το δεδηλωμένο " -#~ "μέγεθος στο αÏχείο (%3)" -#~ msgid "\"%1\" has a sample rate of %2 instead of %3 as used by this session" -#~ msgstr "" -#~ "\"%1\" έχει Ïυθμό δειγματοληψίας %2 αντί του %3 όπως στην παÏοÏσα συνεδÏία" -#~ msgid "FileSource: cannot write WAVE chunk: %1" -#~ msgstr "FileSource: δεν μποÏÏŽ να γÏάψω WAVE κομμάτι: %1" -#~ msgid "FileSource: cannot write format chunk: %1" -#~ msgstr "FileSource: δεν μποÏÏŽ να γÏάψω format κομμάτι: %1" -#~ msgid "FileSource: cannot data chunk: %1" -#~ msgstr "FileSource: cδεν μποÏÏŽ να γÏάψω κομμάτι δεδομένων: %1" -#~ msgid "FileSource: \"%1\" bad write (%2)" -#~ msgstr "FileSource: \"%1\" κακή εγγÏαφή (%2)" - -#, fuzzy -#~ msgid "cannot create feedback request pipe (%1)" -#~ msgstr "Δεν μποÏÏŽ να δημιουÏγήσω transport request signal pipe (%1)" - -#, fuzzy -#~ msgid "Session: could not create feedback thread" -#~ msgstr "ΣυνεδÏία: δεν μπόÏεσα να δημιουÏγήσω δέσμη με τον butler" - -#, fuzzy -#~ msgid "Feedback thread poll failed (%1)" -#~ msgstr "Αίτηση δέσμης MIDI απέτυχε (%1)" - -#, fuzzy -#~ msgid "Error on feedback thread request pipe" -#~ msgstr "Σφάλμα στο transport thread request pipe" - -#, fuzzy -#~ msgid "Error reading from feedback request pipe" -#~ msgstr "Σφάλμα στην ανάγνωση από transport request pipe" -#~ msgid "Could not find member filename" -#~ msgstr "Δεν ευÏέθη το αÏχείο μέλους" -#~ msgid "could not create crossfade object in playlist %1" -#~ msgstr "δεν έγινε δημιουÏγία αντικειμένου crossfade στη λίστα αναπαÏ/γής%1" -#~ msgid "" -#~ "There are too many frozen versions of playlist \"%1\" to create another " -#~ "one" -#~ msgstr "" -#~ "ΠάÏα πολλές εκδόσεις λίστας αναπαÏ/γής \"%1\" για τη δημιουÏγία άλλης" -#~ msgid "alsa_pcm:playback_1" -#~ msgstr "alsa_pcm:playback_1" -#~ msgid "alsa_pcm:playback_2" -#~ msgstr "alsa_pcm:playback_2" - -#, fuzzy -#~ msgid "Could not find a template called %1 in %2" -#~ msgstr "Δεν μπόÏεσα να ανοίξω Ï€Ïοσχέδιο μίξεως %1 για ανάγνωση" - -#, fuzzy -#~ msgid "Source: cannot stat peakfile \"%1\" or \"%2\"" -#~ msgstr "Source: δεν μποÏÏŽ να μετÏήσω το αυτοστιγμεί peakfile \"%1\"" -#~ msgid "Transport: error polling extra MIDI port #1 (revents =%1%2%3" -#~ msgstr "" -#~ "Transport: σφάλμα στην αίτηση επιπλέον θÏÏας MIDI #1 (revents =%1%2%3" -#~ msgid "Transport: error polling extra MIDI port #2 (revents =%1%2%3" -#~ msgstr "" -#~ "Transport: σφάλμα στην αίτηση επιπλέον θÏÏας MIDI #2 (revents =%1%2%3" -#~ msgid "Source: cannot seek to frame %1 in peakfile!" -#~ msgstr "Source: δεν μποÏÏŽ να αναζητήσω το frame %1 στο peakfile!" -#~ msgid "Source[%1]: cannot seek to frame %2 in peakfile!" -#~ msgstr "Source[%1]: δεν μποÏÏŽ να αναζητήσω το frame %2 στο peakfile!" -#~ msgid "%1: could not seek to byte %2 in peakfile (%3" -#~ msgstr "%1: δεν μποÏÏŽ να αναζητήσω σε byte %2 στο peakfile (%3" -#~ msgid "could not register an input port called \"%1\"" -#~ msgstr "δεν μπόÏεσα να register μία θÏÏα εισόδου με όνομα \"%1\"" -#~ msgid "could not register an output port called \"%1\"" -#~ msgstr "δεν μπόÏεσα να register μία θÏÏα εξόδου με όνομα \"%1\"" -#~ msgid "%1: disk stream error at frame %2 (%3)" -#~ msgstr "%1: σφάλμα disk stream στο frame %2 (%3)" -#~ msgid "IO: cannot connect input port %1 to %2" -#~ msgstr "IO: δεν μποÏεί να συνδεθεί η θÏÏα εισόδου %1 στο %2" -#~ msgid "IO: cannot connect output port %1 to %2" -#~ msgstr "IO: δεν μποÏεί να συνδεθεί η θÏÏα εξόδου %1 στο %2" -#~ msgid "Playlist: cannot create from state." -#~ msgstr "Playlist: δεν μποÏÏŽ να δημιουÏγήσω από κατάσταση." -#~ msgid "" -#~ "for various reasons, it is no longer valid to use one of the plugins " -#~ "listed for this session. it will be ignored" -#~ msgstr "" -#~ "για διάφοÏους λόγους, δεν είναι πλέον χÏήσιμο να χÏησιμοποιηθεί ένα από " -#~ "τα καταχωÏημένα pluginsγια αυτή τη συνεδÏία. Θα αγνοηθεί." -#~ msgid "cannot connect click track to %1" -#~ msgstr "δεν μποÏÏŽ να διασυνδέσω το κανάλι MετÏονόμου(click track) στο %1" -#~ msgid "out %lu+%lu" -#~ msgstr "out %lu+%lu" -#~ msgid "in %lu+%lu" -#~ msgstr "in %lu+%lu" -#~ msgid "Session: error for %1 at frame %2 (%3)" -#~ msgstr "ΣυνεδÏία: σφάλμα για %1 στο frame %2 (%3)" - diff --git a/libs/ardour/po/it_IT.po b/libs/ardour/po/it_IT.po deleted file mode 100644 index 2ce02827bd..0000000000 --- a/libs/ardour/po/it_IT.po +++ /dev/null @@ -1,2236 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Paul Davis -# This file is distributed under the same license as the PACKAGE package. -# Filippo Pappalardo , 2003. -# -msgid "" -msgstr "" -"Project-Id-Version: libardour 0.664.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-06-29 21:03-0400\n" -"PO-Revision-Date: 2003-05-21 12:50+0500\n" -"Last-Translator: Filippo Pappalardo \n" -"Language-Team: Italian\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: libs/ardour/audio_diskstream.cc:337 -#, fuzzy -msgid "AudioDiskstream: Session doesn't know about a Playlist called \"%1\"" -msgstr "DiskStream: La sessione non riconosce la Playlist chiamata \"%1\"" - -#: libs/ardour/audio_diskstream.cc:342 -msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:433 -#, fuzzy -msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!" -msgstr "DiskStream %1: non esiste alcuna playlist di cui fare una copia!" - -#: libs/ardour/audio_diskstream.cc:1114 libs/ardour/audio_diskstream.cc:1125 -#, fuzzy -msgid "" -"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3" -msgstr "DiskStream %1: impossibile leggere %2 dalla playlista al frame %3" - -#: libs/ardour/audio_diskstream.cc:1254 -#, fuzzy -msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3" -msgstr "DiskStream %1: impossibile leggere %2 dalla playlista al frame %3" - -#: libs/ardour/audio_diskstream.cc:1621 libs/ardour/audio_diskstream.cc:1638 -#, fuzzy -msgid "AudioDiskstream %1: cannot write to disk" -msgstr "DiskStream %1: impossibile scrivere sul disco" - -#: libs/ardour/audio_diskstream.cc:1698 -#, fuzzy -msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!" -msgstr "DiskStream \"%1\": impossibile scaricare i dati acquisiti sul disco!" - -#: libs/ardour/audio_diskstream.cc:1796 -msgid "%1: could not create region for complete audio file" -msgstr "%1: impossibile creare una regione per il file audio completo" - -#: libs/ardour/audio_diskstream.cc:1819 -#, fuzzy -msgid "AudioDiskstream: could not create region for captured audio!" -msgstr "DiskStream: impossibile creare una regione per l'audio registrato!" - -#: libs/ardour/audio_diskstream.cc:1874 -#, fuzzy -msgid "programmer error: %1" -msgstr "errore di programmazione: %1" - -#: libs/ardour/audio_diskstream.cc:2146 -#, fuzzy -msgid "AudioDiskstream: channel %1 out of range" -msgstr "DiskStream: canale fuori margine" - -#: libs/ardour/audio_diskstream.cc:2171 -msgid "%1:%2 new capture file not initialized correctly" -msgstr "%1:%2 nuovo file di registrazione non è stato avviato correttamente" - -#: libs/ardour/audio_diskstream.cc:2404 -msgid "Location \"%1\" not valid for track loop (start >= end)" -msgstr "La Location \"%1\" non valida per il loop (inizio >= fine)" - -#: libs/ardour/audio_diskstream.cc:2485 -#, fuzzy -msgid "%1: cannot restore pending capture source file %2" -msgstr "Import: impossibile aprire il file audio di input \"%1\"" - -#: libs/ardour/audio_diskstream.cc:2507 -msgid "%1: incorrect number of pending sources listed - ignoring them all" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2523 -#, fuzzy -msgid "%1: cannot create whole-file region from pending capture sources" -msgstr "Playlist: impossibile creare la Regione dal file di stato" - -#: libs/ardour/audio_diskstream.cc:2535 -#, fuzzy -msgid "%1: cannot create region from pending capture sources" -msgstr "Playlist: impossibile creare la Regione dal file di stato" - -#: libs/ardour/audio_library.cc:92 -msgid "channels" -msgstr "" - -#: libs/ardour/audio_library.cc:93 -#, fuzzy -msgid "samplerate" -msgstr "separa" - -#: libs/ardour/audio_library.cc:94 -msgid "resolution" -msgstr "" - -#: libs/ardour/audio_library.cc:95 -msgid "format" -msgstr "" - -#: libs/ardour/audio_library.cc:102 -msgid "Could not open %1. Audio Library not saved" -msgstr "Impossibile accedere a %1. Libreria Audio non salvata" - -#: libs/ardour/audio_playlist.cc:53 libs/ardour/audio_playlist.cc:63 -#: libs/ardour/audio_playlist.cc:74 libs/ardour/audio_playlist.cc:121 -#: libs/ardour/insert.cc:76 libs/ardour/insert.cc:95 libs/ardour/insert.cc:120 -#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:39 -#: libs/ardour/send.cc:53 libs/ardour/send.cc:62 -#: libs/ardour/session_state.cc:1621 libs/ardour/session_state.cc:1667 -msgid "initial state" -msgstr "stato iniziale" - -#: libs/ardour/audio_playlist.cc:275 libs/ardour/audio_playlist.cc:769 -msgid "" -"programming error: non-audio Region passed to remove_overlap in audio " -"playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:402 -msgid "" -"programming error: non-audio Region tested for overlap in audio playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:878 -msgid "xfade change" -msgstr "cambio dello smorzamento incrociato" - -#: libs/ardour/audio_playlist.cc:933 -msgid "region modified" -msgstr "regione modificata" - -#: libs/ardour/audio_track.cc:125 libs/ardour/io.cc:1716 -#: libs/ardour/io.cc:1826 -msgid "Unknown connection \"%1\" listed for input of %2" -msgstr "Connessione sconosciuta \"%1\" come input di %2" - -#: libs/ardour/audio_track.cc:127 libs/ardour/io.cc:1718 -#: libs/ardour/io.cc:1828 -msgid "in 1" -msgstr "" - -#: libs/ardour/audio_track.cc:128 libs/ardour/io.cc:1719 -#: libs/ardour/io.cc:1829 -msgid "No input connections available as a replacement" -msgstr "" - -#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1723 -#: libs/ardour/io.cc:1833 -msgid "Connection %1 was not available - \"in 1\" used instead" -msgstr "" - -#: libs/ardour/audio_track.cc:141 libs/ardour/io.cc:1842 -msgid "improper input channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/audio_track.cc:186 libs/ardour/audio_track.cc:199 -msgid "AudioTrack: diskstream \"%1\" not known by session" -msgstr "AudioTrack: diskstream \"%1\" non riconosciuto dalla sessione" - -#: libs/ardour/audio_track.cc:297 -msgid "" -"MIDI rec_enable control specification for %1 is incomplete, so it has been " -"ignored" -msgstr "" - -#: libs/ardour/audio_track.cc:309 -msgid "programming error: AudioTrack given state without diskstream!" -msgstr "" - -#: libs/ardour/audioengine.cc:144 -msgid "cannot activate JACK client" -msgstr "impossibile attivare il client JACK" - -#: libs/ardour/audioengine.cc:395 -msgid "register audio input port called before engine was started" -msgstr "" -"la richiesta di registrazione di una porta di entrata avvenuta prima " -"dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:426 -msgid "register audio output port called before engine was started" -msgstr "" -"la richiesta di registrazione di una porta di uscita avvenuta prima " -"dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:487 -msgid "connect called before engine was started" -msgstr "richiesta di connessione avvenuta prima dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:503 -msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)" -msgstr "" - -#: libs/ardour/audioengine.cc:516 libs/ardour/audioengine.cc:545 -msgid "disconnect called before engine was started" -msgstr "" -"richiesta di disconnessione avvenuta prima dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:603 -msgid "get_port_by_name() called before engine was started" -msgstr "" -"richiesta get_port_by_name() avvenuta prima dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:636 -msgid "get_ports called before engine was started" -msgstr "richiesta di get_ports avvenuta prima dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:711 -msgid "get_nth_physical called before engine was started" -msgstr "" -"richiesta di get_nth_physical avvenuta prima dell'avvio dell'applicazione" - -#: libs/ardour/audioengine.cc:739 -#, fuzzy -msgid "get_port_total_latency() called with no JACK client connection" -msgstr "" -"richiesta di get_port_total_latency() avvenuta prima dell'avvio " -"dell'applicazione" - -#: libs/ardour/audioengine.cc:745 -msgid "get_port_total_latency() called before engine was started" -msgstr "" -"richiesta di get_port_total_latency() avvenuta prima dell'avvio " -"dell'applicazione" - -#: libs/ardour/audioengine.cc:869 -msgid "Unable to connect to JACK server" -msgstr "" - -#: libs/ardour/audioengine.cc:872 -msgid "Could not connect to JACK server as \"%1\"" -msgstr "" - -#: libs/ardour/audioengine.cc:877 -msgid "JACK server started" -msgstr "" - -#: libs/ardour/audioengine.cc:911 -msgid "cannot shutdown connection to JACK" -msgstr "" - -#: libs/ardour/audioengine.cc:936 -msgid "failed to connect to JACK" -msgstr "" - -#: libs/ardour/audioengine.cc:952 -#, fuzzy -msgid "could not reregister %1" -msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)" - -#: libs/ardour/audioengine.cc:1009 -msgid "could not reconnect %1 and %2 (err = %3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3095 -msgid "" -"there are already 1000 files with names like %1; versioning discontinued" -msgstr "" -"ci sono gia' 1000 file con nomi come %1; tracciamento di versione interrotto" - -#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3109 -msgid "cannot rename audio file source from %1 to %2 (%3)" -msgstr "impossibile rinominare file audio sorgente da %1 a %2 (%3)" - -#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3124 -msgid "cannot remove peakfile %1 for %2 (%3)" -msgstr "impossibile eliminare il peakfile %1 per %2 (%3)" - -#: libs/ardour/audiofilesource.cc:509 -msgid "FileSource: search path not set" -msgstr "FileSource: percorso di ricerca non specificato" - -#: libs/ardour/audiofilesource.cc:533 -msgid "" -"FileSource: \"%1\" is ambigous when searching %2\n" -"\t" -msgstr "" -"FileSource: \"%1\" è risultato ambiguo nel cercare %2\n" -"\t" - -#: libs/ardour/audiofilesource.cc:539 -#, fuzzy -msgid "Filesource: cannot find required file (%1): while searching %2" -msgstr "FileSource: impossibile trovare il file richiesto (%1): %2" - -#: libs/ardour/audiofilesource.cc:562 -msgid "Filesource: cannot find required file (%1): %2" -msgstr "FileSource: impossibile trovare il file richiesto (%1): %2" - -#: libs/ardour/audiofilesource.cc:567 -msgid "Filesource: cannot check for existing file (%1): %2" -msgstr "FileSource: impossibile controllare il file esistente (%1): %2" - -#: libs/ardour/audiofilesource.cc:636 libs/ardour/insert.cc:525 -#: libs/ardour/sndfilesource.cc:113 -msgid "programming error: %1" -msgstr "errore di programmazione: %1" - -#: libs/ardour/audiofilesource.cc:641 -#, fuzzy -msgid "cannot rename audio file for %1 to %2" -msgstr "impossibile rinominare file audio sorgente da %1 a %2 (%3)" - -#: libs/ardour/audiofilter.cc:45 -msgid "audiofilter: error creating name for new audio file based on %1" -msgstr "" -"audiofilter: errore nel creare il nome per il nuovo file audio basato su %1" - -#: libs/ardour/audiofilter.cc:58 -msgid "audiofilter: error creating new audio file %1 (%2)" -msgstr "audiofilter: errore nel creare un nuovo file audio %1 (%2)" - -#: libs/ardour/audioregion.cc:857 libs/ardour/audioregion.cc:919 -#, fuzzy -msgid "fade in change" -msgstr "cambio dello smorzamento incrociato" - -#: libs/ardour/audioregion.cc:1349 -#, c-format -msgid "normalized to %.2fdB" -msgstr "normalizzato a %.2fdB" - -#: libs/ardour/audioregion.cc:1367 -#, fuzzy -msgid "envelope change" -msgstr "livello cambiato" - -#: libs/ardour/audiosource.cc:143 -msgid "poll on peak request pipe failed (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:150 -msgid "Error on peak thread request pipe" -msgstr "" - -#: libs/ardour/audiosource.cc:183 -#, fuzzy -msgid "Error reading from peak request pipe" -msgstr "Errore nel leggere dalla porta MIDI %1" - -#: libs/ardour/audiosource.cc:215 libs/ardour/session_butler.cc:80 -#: libs/ardour/session_midi.cc:1183 -msgid "Cannot create transport request signal pipe (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:220 libs/ardour/audiosource.cc:225 -msgid "UI: cannot set O_NONBLOCK on peak request pipe (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:230 -#, fuzzy -msgid "AudioSource: could not create peak thread" -msgstr "Sessione: impossibile creare un nuovo route" - -#: libs/ardour/audiosource.cc:308 -#, fuzzy -msgid "cannot rename peakfile for %1 from %2 to %3 (%4)" -msgstr "impossibile eliminare il peakfile %1 per %2 (%3)" - -#: libs/ardour/audiosource.cc:350 -#, fuzzy -msgid "AudioSource: cannot stat peakfile \"%1\"" -msgstr "FileSource: impossibile avviare il peakfile per %1" - -#: libs/ardour/audiosource.cc:451 -msgid "cannot read sample data for unscaled peak computation" -msgstr "" - -#: libs/ardour/audiosource.cc:472 libs/ardour/audiosource.cc:543 -#: libs/ardour/audiosource.cc:787 libs/ardour/audiosource.cc:878 -#, fuzzy -msgid "AudioSource: cannot open peakpath \"%1\" (%2)" -msgstr "SndFileSource: impossibile accedere al file \"%1\" (%2)" - -#: libs/ardour/audiosource.cc:644 -#, fuzzy -msgid "AudioSource[%1]: peak read - cannot read %2 samples at offset %3" -msgstr "DiskStream %1: impossibile leggere %2 dalla playlista al frame %3" - -#: libs/ardour/audiosource.cc:798 -msgid "%1: could not write read raw data for peak computation (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:823 -msgid "%1: could not write peak file data (%2)" -msgstr "" - -#: libs/ardour/automation_event.cc:65 libs/ardour/location.cc:345 -#: libs/ardour/tempo.cc:226 -msgid "initial" -msgstr "iniziale" - -#: libs/ardour/automation_event.cc:232 -msgid "cleared" -msgstr "pulito" - -#: libs/ardour/automation_event.cc:404 -msgid "added event" -msgstr "aggiunto evento" - -#: libs/ardour/automation_event.cc:421 -msgid "removed event" -msgstr "rimosso evento" - -#: libs/ardour/automation_event.cc:436 -msgid "removed multiple events" -msgstr "rimossi molteplici eventi" - -#: libs/ardour/automation_event.cc:467 libs/ardour/automation_event.cc:498 -msgid "removed range" -msgstr "rimosso intervallo" - -#: libs/ardour/automation_event.cc:528 -msgid "event range adjusted" -msgstr "" - -#: libs/ardour/automation_event.cc:550 -msgid "event adjusted" -msgstr "" - -#: libs/ardour/automation_event.cc:665 libs/ardour/automation_event.cc:770 -#: libs/ardour/panner.cc:1041 -msgid "programming error:" -msgstr "errore di programmazione:" - -#: libs/ardour/automation_event.cc:1079 -msgid "cut/copy/clear" -msgstr "taglia/copia/pulisci" - -#: libs/ardour/automation_event.cc:1112 -msgid "copy" -msgstr "copia" - -#: libs/ardour/automation_event.cc:1180 libs/ardour/playlist.cc:939 -msgid "paste" -msgstr "incolla" - -#: libs/ardour/automation_event.cc:1235 -msgid "" -"automation list: no x-coordinate stored for control point (point ignored)" -msgstr "" -"lista automazione: nessuna coordinata X salvata per punto di controllo " -"(ignorato)" - -#: libs/ardour/automation_event.cc:1241 -msgid "" -"automation list: no y-coordinate stored for control point (point ignored)" -msgstr "" -"lista automazione: nessuna coordinata Y salvata per punto di controllo " -"(ignorato)" - -#: libs/ardour/configuration.cc:80 -#, fuzzy -msgid "loading system configuration file %1" -msgstr "" -"Ardour: impossibile leggere il file di configurazione di sistema \"%1\"" - -#: libs/ardour/configuration.cc:83 -msgid "Ardour: cannot read system configuration file \"%1\"" -msgstr "" -"Ardour: impossibile leggere il file di configurazione di sistema \"%1\"" - -#: libs/ardour/configuration.cc:88 -msgid "Ardour: system configuration file \"%1\" not loaded successfully." -msgstr "" -"Ardour: il file di configurazione di sistema \"%1\" non stato caricato con " -"successo" - -#: libs/ardour/configuration.cc:105 -#, fuzzy -msgid "loading user configuration file %1" -msgstr "Ardour: impossibile la lettura del file di configurazione \"%1\"" - -#: libs/ardour/configuration.cc:108 -msgid "Ardour: cannot read configuration file \"%1\"" -msgstr "Ardour: impossibile la lettura del file di configurazione \"%1\"" - -#: libs/ardour/configuration.cc:113 -#, fuzzy -msgid "Ardour: user configuration file \"%1\" not loaded successfully." -msgstr "" -"Ardour: il file di configurazione \"%1\" non stato caricato con successo" - -#: libs/ardour/configuration.cc:137 -#, fuzzy -msgid "Config file %1 not saved" -msgstr "File di configurazione non salvato" - -#: libs/ardour/configuration.cc:210 -msgid "ill-formed MIDI port specification in ardour rcfile (ignored)" -msgstr "" -"porta MIDI mal configurata nel file di configurazione di ardour (ignorato)" - -#: libs/ardour/connection.cc:183 -msgid "Node for Connection has no \"name\" property" -msgstr "Il nodo per la connessione non possiede l'attributo \"nome\"" - -#: libs/ardour/connection.cc:191 -msgid "Node for Connection has no \"connections\" property" -msgstr "Il nodo per la connessione non ha l'attributo \"connessioni\"" - -#: libs/ardour/connection.cc:227 libs/ardour/io.cc:1902 -msgid "IO: badly formed string in XML node for inputs \"%1\"" -msgstr "IO: stringa malformata nel nodo XML per le entrate \"%1\"" - -#: libs/ardour/connection.cc:232 libs/ardour/io.cc:1907 -msgid "bad input string in XML node \"%1\"" -msgstr "stringa malformata nel nodo XML \"%1\"" - -#: libs/ardour/control_protocol_manager.cc:80 -msgid "control protocol name \"%1\" has no descriptor" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:85 -msgid "control protocol name \"%1\" could not be initialized" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:141 -msgid "Instantiating mandatory control protocol %1" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:175 -#, fuzzy -msgid "Control protocol %1 not usable" -msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile" - -#: libs/ardour/control_protocol_manager.cc:187 -msgid "Control surface protocol discovered: \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:205 -#, fuzzy -msgid "ControlProtocolManager: cannot load module \"%1\" (%2)" -msgstr "LADSPA: impossibile caricare il modulo \"%1\" (%2)" - -#: libs/ardour/control_protocol_manager.cc:213 -#, fuzzy -msgid "ControlProtocolManager: module \"%1\" has no descriptor function." -msgstr "LADSPA: il modulo \"%1\" non ha alcuna funzione descriptor." - -#: libs/ardour/crossfade.cc:121 -msgid "Crossfade: no \"in\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:128 -msgid "Crossfade: no \"in\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:138 -msgid "Crossfade: no \"out\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:145 -msgid "Crossfade: no \"out\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:492 -#, fuzzy -msgid "active changed" -msgstr "livello cambiato" - -#: libs/ardour/crossfade.cc:741 -#, fuzzy -msgid "old-style crossfade information - no position information" -msgstr "il nodo XML per la Location non ha informazioni sull'inizio" - -#: libs/ardour/curve.cc:112 libs/ardour/globals.cc:340 -#: libs/ardour/insert.cc:454 libs/ardour/session.cc:2466 -#: libs/ardour/session.cc:2518 -msgid "programming error: " -msgstr "errore di programmazione: " - -#: libs/ardour/cycle_timer.cc:37 -msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo" -msgstr "CycleTimer::get_mhz(): impossibile accedere a /proc/cpuinfo" - -#: libs/ardour/cycle_timer.cc:49 -msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo" -msgstr "" -"CycleTimer::get_mhz(): impossibile localizzare \"cpu MHz\" in /proc/cpuinfo" - -#: libs/ardour/cycle_timer.cc:72 -msgid "cannot locate cpu MHz in /proc/cpuinfo" -msgstr "impossibile localizzare \"cpu MHz\" in /proc/cpuinfo" - -#: libs/ardour/destructive_filesource.cc:188 -msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)" -msgstr "" - -#: libs/ardour/destructive_filesource.cc:201 -#: libs/ardour/destructive_filesource.cc:243 -#: libs/ardour/destructive_filesource.cc:250 -msgid "DestructiveFileSource: \"%1\" bad write (%2)" -msgstr "" - -#: libs/ardour/globals.cc:109 -msgid "no MIDI ports specified: no MMC or MTC control possible" -msgstr "Nessuna porta MIDI specificata: impossibile alcun controllo MMC o MTC" - -#: libs/ardour/globals.cc:124 -msgid "MIDI port specifications for \"%1\" are not understandable." -msgstr "Le specifiche per la porta MIDI \"%1\" non sono state capite" - -#: libs/ardour/globals.cc:137 libs/ardour/globals.cc:141 -#: libs/ardour/globals.cc:145 -msgid "default" -msgstr "" - -#: libs/ardour/globals.cc:173 -msgid "No MMC control (MIDI port \"%1\" not available)" -msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile" - -#: libs/ardour/globals.cc:179 -msgid "No MTC support (MIDI port \"%1\" not available)" -msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile" - -#: libs/ardour/globals.cc:184 -#, fuzzy -msgid "No MIDI parameter support (MIDI port \"%1\" not available)" -msgstr "La porta MIDI \"%1\" non disponibile: nessun controllo MTC possibile" - -#: libs/ardour/import.cc:75 -msgid "Import: cannot open input sound file \"%1\"" -msgstr "Import: impossibile aprire il file audio di input \"%1\"" - -#: libs/ardour/import.cc:80 -msgid "resampling audio" -msgstr "" - -#: libs/ardour/import.cc:84 -msgid "Import: cannot open converted sound file \"%1\"" -msgstr "Import: impossibile aprire il file audio convertito \"%1\"" - -#: libs/ardour/import.cc:89 -msgid "Import: error while resampling sound file \"%1\"" -msgstr "Import: errore nel resampling deil file audio \"%1\"" - -#: libs/ardour/import.cc:148 -msgid "Session::import_audiofile: cannot open new file source for channel %1" -msgstr "" -"Session::import_audiofile: impossibile aprire il nuovo file per il canale %1" - -#: libs/ardour/import.cc:167 -msgid "converting audio" -msgstr "conversione dell'audio" - -#: libs/ardour/import.cc:199 -msgid "building region" -msgstr "costruzione della regione" - -#: libs/ardour/import.cc:201 -msgid "building regions" -msgstr "costruzione delle regioni" - -#: libs/ardour/import.cc:325 -msgid "Import: could not open temp file: %1" -msgstr "Import: impossibile aprire il file audio temporaneo \"%1\"" - -#: libs/ardour/import.cc:334 -msgid "Import: src_new() failed : %1" -msgstr "" - -#: libs/ardour/import.cc:362 -msgid "Import: %1" -msgstr "" - -#: libs/ardour/insert.cc:644 libs/ardour/insert.cc:936 -msgid "XML node describing insert is missing the `type' field" -msgstr "Il nodo XML descrivente l'insert manca del campo `type'" - -#: libs/ardour/insert.cc:653 -msgid "unknown plugin type %1 in plugin insert state" -msgstr "" - -#: libs/ardour/insert.cc:665 -msgid "XML node describing insert is missing the `id' field" -msgstr "Il nodo XML descrivente l'insert manca del campo `id'" - -#: libs/ardour/insert.cc:678 -msgid "" -"Found a reference to a plugin (\"%1\") that is unknown.\n" -"Perhaps it was removed or moved since it was last used." -msgstr "" -"Trovato un riferimento ad un plugin (\"%1\") sconosciuto.\n" -"Forse stato rimosso o spostato dall'ultima volta che lo si e' usato" - -#: libs/ardour/insert.cc:716 libs/ardour/insert.cc:953 -msgid "XML node describing insert is missing a Redirect node" -msgstr "Il nodo XML descrivente l'insert manca di un nodo Redirect" - -#: libs/ardour/insert.cc:721 -msgid "XML node describing a plugin insert is missing the `%1' information" -msgstr "Il nodo XML descrivente un insert plugin manca della informazione `%1'" - -#: libs/ardour/insert.cc:745 -msgid "PluginInsert: Auto: no ladspa port number" -msgstr "" - -#: libs/ardour/insert.cc:752 -msgid "PluginInsert: Auto: port id out of range" -msgstr "" - -#: libs/ardour/insert.cc:768 -#, fuzzy -msgid "XML node describing a port automation is missing the `%1' information" -msgstr "Il nodo XML descrivente un insert LADSPA manca della informazione `%1'" - -#: libs/ardour/insert.cc:854 -msgid "PortInsert: cannot add input port" -msgstr "PortInsert: impossibile aggiungere una porta d'entrata" - -#: libs/ardour/insert.cc:859 -msgid "PortInsert: cannot add output port" -msgstr "PortInsert: impossibile aggiungere una porta d'uscita" - -#: libs/ardour/insert.cc:941 -msgid "non-port insert XML used for port plugin insert" -msgstr "insert non-port XML usato per insert di plugin di porta" - -#: libs/ardour/io.cc:598 -msgid "IO: cannot disconnect input port %1 from %2" -msgstr "IO: impossibile disconnettere la porta d'entrata %1 da %2" - -#: libs/ardour/io.cc:666 -msgid "IO: cannot disconnect output port %1 from %2" -msgstr "IO: impossibile disconnettere la porta d'uscita %1 da %2" - -#: libs/ardour/io.cc:807 libs/ardour/io.cc:1151 libs/ardour/io.cc:1277 -#, c-format -msgid "%s/out" -msgstr "" - -#: libs/ardour/io.cc:809 libs/ardour/io.cc:1153 libs/ardour/io.cc:1279 -#: libs/ardour/io.cc:2849 -#, c-format -msgid "%s/out %u" -msgstr "" - -#: libs/ardour/io.cc:813 libs/ardour/io.cc:1158 libs/ardour/io.cc:1283 -msgid "IO: cannot register output port %1" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/io.cc:908 libs/ardour/io.cc:1011 libs/ardour/io.cc:1117 -#, c-format -msgid "%s/in" -msgstr "" - -#: libs/ardour/io.cc:910 libs/ardour/io.cc:1014 libs/ardour/io.cc:1120 -#: libs/ardour/io.cc:2819 -#, c-format -msgid "%s/in %u" -msgstr "" - -#: libs/ardour/io.cc:914 libs/ardour/io.cc:1020 libs/ardour/io.cc:1125 -msgid "IO: cannot register input port %1" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/io.cc:1541 -msgid "IO::connecting_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1564 -msgid "IO::ports_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1594 -msgid "incorrect XML node \"%1\" passed to IO object" -msgstr "" - -#: libs/ardour/io.cc:1649 -msgid "" -"MIDI gain control specification for %1 is incomplete, so it has been ignored" -msgstr "" - -#: libs/ardour/io.cc:1739 libs/ardour/io.cc:1851 -msgid "Unknown connection \"%1\" listed for output of %2" -msgstr "" - -#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853 -msgid "out 1" -msgstr "" - -#: libs/ardour/io.cc:1742 libs/ardour/io.cc:1854 -msgid "No output connections available as a replacement" -msgstr "" - -#: libs/ardour/io.cc:1746 libs/ardour/io.cc:1858 -msgid "Connection %1 was not available - \"out 1\" used instead" -msgstr "" - -#: libs/ardour/io.cc:1760 -msgid "%1: cannot create I/O ports" -msgstr "" - -#: libs/ardour/io.cc:1867 -msgid "improper output channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/io.cc:1952 -msgid "IO: badly formed string in XML node for outputs \"%1\"" -msgstr "IO: stringa mal formata nel nodo XML per le uscite \"%1\"" - -#: libs/ardour/io.cc:1957 -msgid "IO: bad output string in XML node \"%1\"" -msgstr "IO: stringa mal formata nel nodo XML \"%1\"" - -#: libs/ardour/io.cc:2525 -msgid "%1: could not open automation event file \"%2\"" -msgstr "" - -#: libs/ardour/io.cc:2564 -msgid "%1: cannot open automation event file \"%2\"" -msgstr "" - -#: libs/ardour/io.cc:2579 -msgid "badly formed version number in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2583 -msgid "no version information in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2588 -msgid "mismatched automation event file version (%1)" -msgstr "" - -#: libs/ardour/io.cc:2596 -msgid "badly formatted automation event record at line %1 of %2 (ignored)" -msgstr "" - -#: libs/ardour/io.cc:2616 -msgid "dubious automation event found (and ignored)" -msgstr "" - -#: libs/ardour/io.cc:2620 libs/ardour/panner.cc:438 -#: libs/ardour/redirect.cc:148 -msgid "loaded from disk" -msgstr "" - -#: libs/ardour/io.cc:2791 -msgid "automation write/touch" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:87 -msgid "LADSPA: module has no descriptor function." -msgstr "LADSPA: il modulo non ha alcuna funzione descriptor." - -#: libs/ardour/ladspa_plugin.cc:92 -msgid "LADSPA: plugin has gone away since discovery!" -msgstr "LADSPA: il plugin è stato rimosso" - -#: libs/ardour/ladspa_plugin.cc:99 -msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:329 -msgid "" -"illegal parameter number used with plugin \"%1\". This mayindicate a change " -"in the plugin design, and presets may beinvalid" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:430 -msgid "Bad node sent to LadspaPlugin::set_state" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:443 -msgid "LADSPA: no ladspa port number" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:449 -msgid "LADSPA: no ladspa port data" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:498 -msgid "" -"LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so " -"it has been ignored" -msgstr "" - -#: libs/ardour/location.cc:269 -msgid "incorrect XML node passed to Location::set_state" -msgstr "" - -#: libs/ardour/location.cc:276 -msgid "XML node for Location has no name information" -msgstr "il nodo XML per la Location non ha informazioni sul nome" - -#: libs/ardour/location.cc:283 -msgid "XML node for Location has no start information" -msgstr "il nodo XML per la Location non ha informazioni sull'inizio" - -#: libs/ardour/location.cc:294 -msgid "XML node for Location has no end information" -msgstr "il nodo XML per la Location non ha informazioni sulla fine" - -#: libs/ardour/location.cc:303 -msgid "XML node for Location has no flags information" -msgstr "il nodo XML per la Location non ha informazioni sui flags" - -#: libs/ardour/location.cc:391 -msgid "Locations: attempt to use unknown location as selected location" -msgstr "" - -#: libs/ardour/location.cc:418 libs/ardour/playlist.cc:1187 -msgid "clear" -msgstr "pulisci" - -#: libs/ardour/location.cc:443 -msgid "clear markers" -msgstr "" - -#: libs/ardour/location.cc:471 -msgid "clear ranges" -msgstr "" - -#: libs/ardour/location.cc:489 -msgid "add" -msgstr "" - -#: libs/ardour/location.cc:527 -msgid "remove" -msgstr "rimuovi" - -#: libs/ardour/location.cc:567 -msgid "incorrect XML mode passed to Locations::set_state" -msgstr "" - -#: libs/ardour/mtc_slave.cc:196 -msgid "MTC Slave: atomic read of current time failed, sleeping!" -msgstr "" - -#: libs/ardour/named_selection.cc:77 -msgid "Chunk %1 uses an unknown playlist \"%2\"" -msgstr "Lo spezzone %1 usa una playlist sconosciuta \"%2\"" - -#: libs/ardour/named_selection.cc:80 -msgid "Chunk %1 contains misformed playlist information" -msgstr "Lo spezzone %1 contiene informazioni sulla playlist mal formate" - -#: libs/ardour/panner.cc:256 -msgid "MIDI pan control specification is incomplete, so it has been ignored" -msgstr "" - -#: libs/ardour/panner.cc:361 -msgid "automation write pass" -msgstr "" - -#: libs/ardour/panner.cc:401 -#, c-format -msgid "error writing pan automation file (%s)" -msgstr "errore nello scrivere il file per l'automazione pan (%s)" - -#: libs/ardour/panner.cc:429 -msgid "" -"badly formatted pan automation event record at line %1 of %2 (ignored) [%3]" -msgstr "" - -#: libs/ardour/panner.cc:944 -msgid "badly-formed positional data for Multi2dPanner - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1237 -msgid "cannot open pan automation file \"%1\" for saving (%s)" -msgstr "" -"impossibile aprire il file dell'automazione pan \"%1\" per salvare (%s)" - -#: libs/ardour/panner.cc:1273 -msgid "cannot open pan automation file %1 (%2)" -msgstr "impossibile accedere al file dell'automazione pan %1 (%2)" - -#: libs/ardour/panner.cc:1286 -msgid "badly formed version number in pan automation event file \"%1\"" -msgstr "" - -#: libs/ardour/panner.cc:1290 -msgid "" -"no version information in pan automation event file \"%1\" (first line = %2)" -msgstr "" - -#: libs/ardour/panner.cc:1296 -msgid "mismatched pan automation event file version (%1)" -msgstr "" - -#: libs/ardour/panner.cc:1310 -msgid "too many panner states found in pan automation file %1" -msgstr "" - -#: libs/ardour/panner.cc:1451 -#, fuzzy -msgid "Unknown panner plugin \"%1\" found in pan state - ignored" -msgstr "Nodo sconosciuto \"%1\" trovato in Connections list dal file di stato" - -#: libs/ardour/panner.cc:1457 -#, fuzzy -msgid "panner plugin node has no type information!" -msgstr "il nodo XML per la Location non ha informazioni sulla fine" - -#: libs/ardour/playlist.cc:253 -msgid "playlist const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:259 -msgid "playlist non-const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:499 -msgid "add region" -msgstr "aggiungi regione" - -#: libs/ardour/playlist.cc:554 -msgid "replace region" -msgstr "sostituisci la regione" - -#: libs/ardour/playlist.cc:567 -msgid "remove region" -msgstr "rimuovi la regione" - -#: libs/ardour/playlist.cc:614 -msgid "separate" -msgstr "separa" - -#: libs/ardour/playlist.cc:878 -msgid "cut" -msgstr "taglia" - -#: libs/ardour/playlist.cc:968 -msgid "duplicate" -msgstr "duplica" - -#: libs/ardour/playlist.cc:1023 -msgid "split" -msgstr "spezza" - -#: libs/ardour/playlist.cc:1100 -msgid "%1: bounds changed received for region (%2)not in playlist" -msgstr "" - -#: libs/ardour/playlist.cc:1361 -#, fuzzy -msgid "Playlist: cannot create region from state file" -msgstr "Playlist: impossibile creare la Regione dal file di stato" - -#: libs/ardour/playlist.cc:1721 -msgid "nudged" -msgstr "spostato" - -#: libs/ardour/playlist_factory.cc:49 libs/ardour/playlist_factory.cc:64 -msgid "" -"programming error: Playlist::createRegion called with unknown Region type" -msgstr "" - -#: libs/ardour/playlist_factory.cc:86 -msgid "" -"programming error: Playlist::copyPlaylist called with unknown Playlist type" -msgstr "" - -#: libs/ardour/plugin.cc:328 -msgid "Could not locate HOME. Preset not saved." -msgstr "impossibile localizzare HOME. Preset non salvato." - -#: libs/ardour/plugin.cc:338 libs/ardour/plugin.cc:344 -msgid "Could not create %1. Preset not saved. (%2)" -msgstr "Impossibile creare %1 . Preset non salvato. (%2)" - -#: libs/ardour/plugin.cc:349 -msgid "Error saving presets file %1." -msgstr "Errore nel salvare il file di preset %1." - -#: libs/ardour/plugin_manager.cc:194 -#, fuzzy -msgid "Could not parse rdf file: %1" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/plugin_manager.cc:235 -msgid "LADSPA: cannot load module \"%1\" (%2)" -msgstr "LADSPA: impossibile caricare il modulo \"%1\" (%2)" - -#: libs/ardour/plugin_manager.cc:242 -msgid "LADSPA: module \"%1\" has no descriptor function." -msgstr "LADSPA: il modulo \"%1\" non ha alcuna funzione descriptor." - -#: libs/ardour/plugin_manager.cc:297 -#, fuzzy -msgid "VST: cannot load module from \"%1\"" -msgstr "LADPSA: impossibile caricare il modulo da \"%1\"" - -#: libs/ardour/plugin_manager.cc:302 -msgid "You asked ardour to not use any VST plugins" -msgstr "" - -#: libs/ardour/plugin_manager.cc:305 -msgid "This version of ardour has no support for VST plugins" -msgstr "" - -#: libs/ardour/plugin_manager.cc:312 -msgid "LADSPA: cannot load module from \"%1\"" -msgstr "LADPSA: impossibile caricare il modulo da \"%1\"" - -#: libs/ardour/plugin_manager.cc:374 libs/ardour/plugin_manager.cc:386 -msgid "Unknown" -msgstr "" - -#: libs/ardour/plugin_manager.cc:464 -msgid "" -"VST plugin %1 does not support processReplacing, and so cannot be used in " -"ardour at this time" -msgstr "" - -#: libs/ardour/recent_sessions.cc:44 -#, fuzzy -msgid "cannot open recent session file %1 (%2)" -msgstr "impossibile accedere al file di sessione recente %1 (%2)" - -#: libs/ardour/redirect.cc:77 -msgid "programming error: unknown Redirect type in Redirect::Clone!\n" -msgstr "" - -#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:203 -msgid "pre" -msgstr "" - -#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:206 -#, fuzzy -msgid "post" -msgstr "incolla" - -#: libs/ardour/redirect.cc:107 -msgid "Redirect: unknown placement string \"%1\" (ignored)" -msgstr "" - -#: libs/ardour/redirect.cc:125 -msgid "%1: cannot open %2 to load automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:154 -msgid "%1: cannot load automation data from %2" -msgstr "" - -#: libs/ardour/redirect.cc:175 -msgid "%1: cannot open %2 to store automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:194 libs/ardour/redirect.cc:201 -msgid "%1: could not save automation state to %2" -msgstr "" - -#: libs/ardour/redirect.cc:246 -msgid "Could not get state from Redirect (%1). Problem with save_automation" -msgstr "" - -#: libs/ardour/redirect.cc:296 -msgid "incorrect XML node \"%1\" passed to Redirect object" -msgstr "" - -#: libs/ardour/redirect.cc:318 -msgid "%1: Automation node has no path property" -msgstr "" - -#: libs/ardour/redirect.cc:343 -msgid "XML node describing an IO is missing an IO node" -msgstr "" - -#: libs/ardour/redirect.cc:348 -#, fuzzy -msgid "XML node describing a redirect is missing the `active' field" -msgstr "Il nodo XML descrivente l'insert manca del campo `type'" - -#: libs/ardour/redirect.cc:358 -msgid "XML node describing a redirect is missing the `placement' field" -msgstr "" - -#: libs/ardour/redirect.cc:467 -#, fuzzy -msgid "active_changed" -msgstr "livello cambiato" - -#: libs/ardour/region.cc:885 -msgid "Session: XMLNode describing a Region is incomplete (no id)" -msgstr "" - -#: libs/ardour/region.cc:892 -msgid "Session: XMLNode describing a Region is incomplete (no name)" -msgstr "" - -#: libs/ardour/route.cc:79 libs/ardour/session.cc:1554 -#: libs/ardour/session.cc:1560 libs/ardour/session.cc:3093 -msgid "signal" -msgstr "segnale" - -#: libs/ardour/route.cc:1430 -msgid "Could not get state of route. Problem with save_automation" -msgstr "" - -#: libs/ardour/route.cc:1482 -msgid "Send construction failed" -msgstr "" - -#: libs/ardour/route.cc:1504 -msgid "unknown Insert type \"%1\"; ignored" -msgstr "" - -#: libs/ardour/route.cc:1510 -msgid "Insert XML node has no type property" -msgstr "" - -#: libs/ardour/route.cc:1515 -msgid "insert could not be created. Ignored." -msgstr "" - -#: libs/ardour/route.cc:1533 -msgid "Bad node sent to Route::set_state() [%1]" -msgstr "" - -#: libs/ardour/route.cc:1592 -msgid "Route %1: unknown edit group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:1608 libs/ardour/route.cc:1612 -msgid "badly formed order key string in state file! [%1] ... ignored." -msgstr "" - -#: libs/ardour/route.cc:1693 libs/ardour/route.cc:1820 -msgid "[control]" -msgstr "" - -#: libs/ardour/route.cc:1713 -msgid "Route %1: unknown mix group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:1742 libs/ardour/route.cc:1750 -msgid "" -"MIDI mute control specification for %1 is incomplete, so it has been ignored" -msgstr "" - -#: libs/ardour/send.cc:99 -msgid "XML node describing a send is missing a Redirect node" -msgstr "" - -#: libs/ardour/session.cc:103 -#, fuzzy -msgid "Could not resolve path: %1 (%2)" -msgstr "impossibile controllare il percorso %1 (%2)" - -#: libs/ardour/session.cc:115 -msgid "cannot check session path %1 (%2)" -msgstr "impossibile controllare il percorso %1 (%2)" - -#: libs/ardour/session.cc:145 -msgid "cannot check statefile %1 (%2)" -msgstr "impossibile controllare il file di stato %1 (%2)" - -#: libs/ardour/session.cc:181 -msgid "%1 is not an Ardour snapshot file" -msgstr "%1 non è un file di istantanea di Ardour" - -#: libs/ardour/session.cc:198 -msgid "cannot determine current working directory (%1)" -msgstr "impossibile determinare la cartella di lavoro corrente (%1)" - -#: libs/ardour/session.cc:215 -msgid "unknown file type for session %1" -msgstr "tipo di fle sconosciuto per la sessione %1" - -#: libs/ardour/session.cc:320 -msgid "monitor" -msgstr "" - -#: libs/ardour/session.cc:327 -msgid "master" -msgstr "" - -#: libs/ardour/session.cc:611 -msgid "could not setup Click I/O" -msgstr "impossibile impostare entrata/uscita del click" - -#: libs/ardour/session.cc:632 -msgid "cannot setup Click I/O" -msgstr "impossibile impostare entrata/uscita del click" - -#: libs/ardour/session.cc:654 -msgid "cannot create Auditioner: no auditioning of regions possible" -msgstr "impossibile creare l'Auditioner" - -#: libs/ardour/session.cc:666 -#, c-format -msgid "out %" -msgstr "" - -#: libs/ardour/session.cc:678 -#, c-format -msgid "in %" -msgstr "" - -#: libs/ardour/session.cc:692 -#, c-format -msgid "out %+%" -msgstr "" - -#: libs/ardour/session.cc:706 -#, c-format -msgid "in %+%" -msgstr "" - -#: libs/ardour/session.cc:739 -#, fuzzy -msgid "cannot setup master inputs" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/session.cc:747 -#, fuzzy -msgid "cannot setup master outputs" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/session.cc:758 -msgid "Master Out" -msgstr "" - -#: libs/ardour/session.cc:830 -#, fuzzy -msgid "cannot setup control inputs" -msgstr "impossibile impostare entrata/uscita del click" - -#: libs/ardour/session.cc:838 -#, fuzzy -msgid "cannot set up master outputs" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/session.cc:1110 -msgid "Session: you can't use that location for auto punch (start <= end)" -msgstr "" -"Sessione: non si può usare quella location per l'auto punch (inizio <= fine)" - -#: libs/ardour/session.cc:1189 -msgid "Session: you can't use a mark for auto loop" -msgstr "Sessione: non si può usare un marcatore per l'auto loop" - -#: libs/ardour/session.cc:1572 -msgid "feedback loop setup between %1 and %2" -msgstr "" - -#: libs/ardour/session.cc:1724 libs/ardour/session.cc:1821 -msgid "cannot configure %1 in/%2 out configuration for new audio track" -msgstr "" - -#: libs/ardour/session.cc:1780 -msgid "Session: could not create new audio track." -msgstr "Sessione: impossibile creare una nuova traccia audio" - -#: libs/ardour/session.cc:1870 -msgid "Session: could not create new route." -msgstr "Sessione: impossibile creare un nuovo route" - -#: libs/ardour/session.cc:2354 -msgid "cannot create new name for region \"%1\"" -msgstr "impossibile creare un nuovo nome per la regione \"%1\"" - -#: libs/ardour/session.cc:2418 -msgid "too many regions with names like %1" -msgstr "troppe regioni con nomi come %1" - -#: libs/ardour/session.cc:2883 -msgid "There are already %1 recordings for %2, which I consider too many." -msgstr "Ci sono già %1 registrazioni per %2, che io considero troppe" - -#: libs/ardour/session.cc:3258 -msgid "programming error: unknown type of Insert created!" -msgstr "" - -#: libs/ardour/session.cc:3264 -msgid "programming error: unknown type of Redirect created!" -msgstr "" - -#: libs/ardour/session.cc:3287 -msgid "programming error: unknown type of Insert deleted!" -msgstr "" - -#: libs/ardour/session.cc:3293 -msgid "programming error: unknown type of Redirect deleted!" -msgstr "" - -#: libs/ardour/session.cc:3636 -msgid "too many bounced versions of playlist \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:3649 -msgid "cannot create new audio file \"%1\" for %2" -msgstr "impossibile creare un nuovo file audio \"%1\" per %2" - -#: libs/ardour/session_butler.cc:85 libs/ardour/session_butler.cc:90 -msgid "UI: cannot set O_NONBLOCK on butler request pipe (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:95 -msgid "Session: could not create butler thread" -msgstr "" - -#: libs/ardour/session_butler.cc:189 -msgid "poll on butler request pipe failed (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:196 -msgid "Error on butler thread request pipe" -msgstr "" - -#: libs/ardour/session_butler.cc:238 -#, fuzzy -msgid "Error reading from butler request pipe" -msgstr "Errore nel leggere dalla porta MIDI %1" - -#: libs/ardour/session_butler.cc:275 -msgid "Butler read ahead failure on dstream %1" -msgstr "" - -#: libs/ardour/session_butler.cc:319 -msgid "Butler write-behind failure on dstream %1" -msgstr "" - -#: libs/ardour/session_click.cc:158 -msgid "cannot open click soundfile %1 (%2)" -msgstr "impossibile accedere al file audio per il click %1 (%2)" - -#: libs/ardour/session_click.cc:167 -msgid "cannot read data from click soundfile" -msgstr "impossibile leggere dati dal file audio per il click" - -#: libs/ardour/session_click.cc:192 -msgid "cannot open click emphasis soundfile %1 (%2)" -msgstr "impossibile accedere al file audio di enfasi per il click %1 (%2)" - -#: libs/ardour/session_click.cc:200 -msgid "cannot read data from click emphasis soundfile" -msgstr "impossibile leggere dati dal file audio di enfasi per il click" - -#: libs/ardour/session_events.cc:161 -msgid "Session: cannot have two events of type %1 at the same frame (%2)." -msgstr "" - -#: libs/ardour/session_events.cc:422 -msgid "Programming error: illegal event type in process_event (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:63 -msgid "Export: no output file specified" -msgstr "Esportazione: nessun file di output scpecificato" - -#: libs/ardour/session_export.cc:164 libs/ardour/session_export.cc:169 -msgid "illegal frame range in export specification" -msgstr "" - -#: libs/ardour/session_export.cc:174 -msgid "Bad data width size. Report me!" -msgstr "" - -#: libs/ardour/session_export.cc:204 -msgid "Export: cannot open output file \"%1\" (%2)" -msgstr "Esportazione: impossibile accedere al fil di output \"%1\" (%2)" - -#: libs/ardour/session_export.cc:214 -msgid "cannot initialize sample rate conversion: %1" -msgstr "impossibile avviare la conversione di campionatura: %1" - -#: libs/ardour/session_export.cc:316 -msgid "an error occured during sample rate conversion: %1" -msgstr "c'è stato un errore durante la conversione di campionatura: %1" - -#: libs/ardour/session_export.cc:327 -msgid "warning, leftover frames overflowed, glitches might occur in output" -msgstr "" - -#: libs/ardour/session_export.cc:418 -msgid "Export: could not write data to output file (%1)" -msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)" - -#: libs/ardour/session_export.cc:500 -msgid "%1: cannot seek to %2 for export" -msgstr "" - -#: libs/ardour/session_midi.cc:200 -msgid "Ardour is slaved to MTC - port cannot be reset" -msgstr "" - -#: libs/ardour/session_midi.cc:215 -msgid "unknown port %1 requested for MTC" -msgstr "" - -#: libs/ardour/session_midi.cc:541 -msgid "Error reading from MIDI port %1" -msgstr "Errore nel leggere dalla porta MIDI %1" - -#: libs/ardour/session_midi.cc:914 -msgid "Session: could not send full MIDI time code" -msgstr "" - -#: libs/ardour/session_midi.cc:973 -msgid "Session: cannot send quarter-frame MTC message (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1081 -msgid "MMC: cannot send command %1%2%3" -msgstr "" - -#: libs/ardour/session_midi.cc:1188 -msgid "UI: cannot set O_NONBLOCK on signal read pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1193 -msgid "UI: cannot set O_NONBLOCK on signal write pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1198 -msgid "Session: could not create transport thread" -msgstr "" - -#: libs/ardour/session_midi.cc:1227 -msgid "cannot send signal to midi thread! (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1322 -msgid "MIDI thread poll failed (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1334 -msgid "Error on transport thread request pipe" -msgstr "" - -#: libs/ardour/session_midi.cc:1361 -msgid "Error reading from transport request pipe" -msgstr "" - -#: libs/ardour/session_process.cc:104 -msgid "Session: error in no roll for %1" -msgstr "" - -#: libs/ardour/session_state.cc:101 -#, fuzzy -msgid "Could not use path %1 (%s)" -msgstr "impossibile controllare il percorso %1 (%2)" - -#: libs/ardour/session_state.cc:129 -msgid "end" -msgstr "" - -#: libs/ardour/session_state.cc:130 -#, fuzzy -msgid "start" -msgstr "separa" - -#: libs/ardour/session_state.cc:502 -msgid "Session: cannot create session dir \"%1\" (%2)" -msgstr "Sessione: impossibile creare la cartella per la sessione \"%1\" (%2)" - -#: libs/ardour/session_state.cc:513 -#, fuzzy -msgid "Session: cannot create session peakfile dir \"%1\" (%2)" -msgstr "Sessione: impossibile creare la cartella per la sessione \"%1\" (%2)" - -#: libs/ardour/session_state.cc:522 -msgid "Session: cannot create session sounds dir \"%1\" (%2)" -msgstr "" -"Sessione: impossibile creare la cartella sounds per la sessione \"%1\" (%2)" - -#: libs/ardour/session_state.cc:531 -#, fuzzy -msgid "Session: cannot create session tape dir \"%1\" (%2)" -msgstr "Sessione: impossibile creare la cartella per la sessione \"%1\" (%2)" - -#: libs/ardour/session_state.cc:540 -#, fuzzy -msgid "Session: cannot create session dead sounds dir \"%1\" (%2)" -msgstr "" -"Sessione: impossibile creare la cartella sounds per la sessione \"%1\" (%2)" - -#: libs/ardour/session_state.cc:549 -msgid "Session: cannot create session automation dir \"%1\" (%2)" -msgstr "" -"Sessione: impossibile creare la cartella automation per la sessione \"%1\" (%" -"2)" - -#: libs/ardour/session_state.cc:580 -#, fuzzy -msgid "Could not open %1 for writing mix template" -msgstr "Impossibile accedere a %1 per scrivere il modello di mixaggio" - -#: libs/ardour/session_state.cc:586 -#, fuzzy -msgid "Could not open mix template %1 for reading" -msgstr "Impossibile aprire il modello di mixaggio %1 per leggere" - -#: libs/ardour/session_state.cc:593 -msgid "Session already exists. Not overwriting" -msgstr "La sessione esiste già. Non sovrascrivo" - -#: libs/ardour/session_state.cc:636 -msgid "Session: could not load diskstream via XML state" -msgstr "" - -#: libs/ardour/session_state.cc:685 -msgid "could not backup old state file, current state not saved." -msgstr "" -"impossibile fare copia di sicurezza del file di stato, stato attuale non " -"salvato" - -#: libs/ardour/session_state.cc:698 -#, fuzzy -msgid "state could not be saved to %1" -msgstr "stato non salvato" - -#: libs/ardour/session_state.cc:705 -#, fuzzy -msgid "could not remove corrupt state file %1" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/session_state.cc:709 -#, fuzzy -msgid "could not restore state file from backup %1" -msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)" - -#: libs/ardour/session_state.cc:778 -msgid "%1: session state information file \"%2\" doesn't exist!" -msgstr "" -"%1: il file di informazioni sullo stato della sessione \"%2\" non esiste!" - -#: libs/ardour/session_state.cc:789 -#, fuzzy -msgid "Could not understand ardour file %1" -msgstr "IO: impossibile registrare la porta %1" - -#: libs/ardour/session_state.cc:1493 -msgid "programming error: Session: incorrect XML node sent to set_state()" -msgstr "" - -#: libs/ardour/session_state.cc:1539 -msgid "Session: XML state has no options section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione option" - -#: libs/ardour/session_state.cc:1544 -msgid "Session: XML state has no sources section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione sources" - -#: libs/ardour/session_state.cc:1551 -msgid "Session: XML state has no Regions section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione Regions" - -#: libs/ardour/session_state.cc:1558 -msgid "Session: XML state has no playlists section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione playlist" - -#: libs/ardour/session_state.cc:1577 -msgid "Session: XML state has no diskstreams section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione diskstream" - -#: libs/ardour/session_state.cc:1584 -msgid "Session: XML state has no connections section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione connections" - -#: libs/ardour/session_state.cc:1591 -msgid "Session: XML state has no locations section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione locations" - -#: libs/ardour/session_state.cc:1624 -msgid "Session: XML state has no edit groups section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione edit groups" - -#: libs/ardour/session_state.cc:1631 -msgid "Session: XML state has no mix groups section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione mix groups" - -#: libs/ardour/session_state.cc:1638 -msgid "Session: XML state has no Tempo Map section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione Tempo Map" - -#: libs/ardour/session_state.cc:1645 -msgid "Session: XML state has no routes section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione routes" - -#: libs/ardour/session_state.cc:1652 -#, fuzzy -msgid "Session: XML state has no click section" -msgstr "Sessione: il file di stato XML non ha alcuna sezione click" - -#: libs/ardour/session_state.cc:1697 -msgid "Session: cannot create Route from XML description." -msgstr "Sessione: impossibile creare Route dalla descrizione XML" - -#: libs/ardour/session_state.cc:1735 -msgid "Session: cannot create Region from XML description." -msgstr "Sessione: impossibile creare regione dalla descrizione XML" - -#: libs/ardour/session_state.cc:1764 -#, fuzzy -msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)" -msgstr "" -"Sessione: il nodo XML descrivente una Regione è incompleto (nessun source)" - -#: libs/ardour/session_state.cc:1772 libs/ardour/session_state.cc:1792 -#, fuzzy -msgid "" -"Session: XMLNode describing a AudioRegion references an unknown source id =%1" -msgstr "" -"Sessione: il nodo XML descrivente una Regione fa riferimento ad un source " -"con id sconosciuto =%1" - -#: libs/ardour/session_state.cc:1778 libs/ardour/session_state.cc:1798 -#, fuzzy -msgid "" -"Session: XMLNode describing a AudioRegion references a non-audio source id =%" -"1" -msgstr "" -"Sessione: il nodo XML descrivente una Regione fa riferimento ad un source " -"con id sconosciuto =%1" - -#: libs/ardour/session_state.cc:1868 -msgid "Session: cannot create Source from XML description." -msgstr "Sessione: impossibile creare Source dalla descrizione XML" - -#: libs/ardour/session_state.cc:1889 -#, fuzzy -msgid "" -"Found a sound file that cannot be used by Ardour. Talk to the progammers." -msgstr "E' stato trovato un file audio che non può essere usato da Ardour." - -#: libs/ardour/session_state.cc:1913 -msgid "Could not create mix templates directory \"%1\" (%2)" -msgstr "Impossibile creare la cartella per i modelli di mixaggio \"%1\" (%2)" - -#: libs/ardour/session_state.cc:1927 -msgid "Template \"%1\" already exists - new version not created" -msgstr "Il modello \"%1\" esiste già - non è stata creata una nuova versione" - -#: libs/ardour/session_state.cc:1934 -msgid "mix template not saved" -msgstr "modello di mixaggio non salvato" - -#: libs/ardour/session_state.cc:1994 -msgid "cannot create session directory \"%1\"; ignored" -msgstr "impossibile creare la cartella per la sessione %1; ignorato" - -#: libs/ardour/session_state.cc:2007 -msgid "cannot create sounds directory \"%1\"; ignored" -msgstr "impossibile creare la cartella sounds \"%1\"; ignorato" - -#: libs/ardour/session_state.cc:2018 -#, fuzzy -msgid "cannot create dead sounds directory \"%1\"; ignored" -msgstr "impossibile creare la cartella sounds \"%1\"; ignorato" - -#: libs/ardour/session_state.cc:2029 -#, fuzzy -msgid "cannot create peak file directory \"%1\"; ignored" -msgstr "impossibile creare la cartella per la sessione %1; ignorato" - -#: libs/ardour/session_state.cc:2168 libs/ardour/session_state.cc:2189 -msgid "Session: cannot create Playlist from XML description." -msgstr "Sessione: impossibile creare Playlist dalla descrizione XML" - -#: libs/ardour/session_state.cc:2228 -msgid "Session: cannot create Named Selection from XML description." -msgstr "Sessione: impossibile creare Named Selection dalla descizione XML" - -#: libs/ardour/session_state.cc:2360 -msgid "Unknown node \"%1\" found in Connections list from state file" -msgstr "Nodo sconosciuto \"%1\" trovato in Connections list dal file di stato" - -#: libs/ardour/session_state.cc:3197 -#, fuzzy -msgid "cannot remove dead sound file %1 (%2)" -msgstr "impossibile accedere al file audio per il click %1 (%2)" - -#: libs/ardour/session_time.cc:374 -msgid "Unknown JACK transport state %1 in sync callback" -msgstr "" - -#: libs/ardour/session_timefx.cc:77 -msgid "tempoize: error creating name for new audio file based on %1" -msgstr "" -"tempoize: errore nel creare il nome per il nuovo file audio basato su %1" - -#: libs/ardour/session_timefx.cc:88 -msgid "tempoize: error creating new audio file %1 (%2)" -msgstr "tempoize: errore nel creare un nuovo file audio %1 (%2)" - -#: libs/ardour/session_timefx.cc:114 -msgid "tempoize: error reading data from %1" -msgstr "tempoize: errore nel leggere dati da %1" - -#: libs/ardour/session_timefx.cc:127 libs/ardour/session_timefx.cc:139 -msgid "error writing tempo-adjusted data to %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:145 -msgid "timefx code failure. please notify ardour-developers." -msgstr "" - -#: libs/ardour/session_transport.cc:117 -msgid "Cannot loop - no loop range defined" -msgstr "" - -#: libs/ardour/session_transport.cc:479 -msgid "" -"Seamless looping cannot be supported while Ardour is using JACK transport.\n" -"Recommend changing the configured options" -msgstr "" - -#: libs/ardour/session_transport.cc:755 -msgid "" -"Global varispeed cannot be supported while Ardour is connected to JACK " -"transport control" -msgstr "" - -#: libs/ardour/session_transport.cc:955 -msgid "please stop the transport before adjusting slave settings" -msgstr "" - -#: libs/ardour/session_transport.cc:991 -msgid "No MTC port defined: MTC slaving is impossible." -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:15 -msgid "WAV" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:16 -msgid "AIFF" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:17 -msgid "raw (no header)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:18 -msgid "PAF (Ensoniq Paris)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:19 -msgid "AU (Sun/NeXT)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:20 -msgid "IRCAM" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:21 -msgid "W64 (64 bit WAV)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:26 -msgid ".wav" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:27 -msgid ".aiff" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:28 -msgid ".raw" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:29 -msgid ".paf" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:30 -msgid ".au" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:31 -msgid ".ircam" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:32 -msgid ".w64" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:47 -msgid "16 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:48 -msgid "24 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:49 -msgid "32 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:50 -msgid "8 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:51 -msgid "float" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:64 -msgid "Little-endian (Intel)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:65 -msgid "Big-endian (Mac)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:147 -msgid "FileSource: cannot get host information for BWF header (%1)" -msgstr "FileSource: impossibile ottenere info sull'host dall'header BWF (%1)" - -#: libs/ardour/sndfilesource.cc:169 -msgid "" -"cannot set broadcast info for audio file %1 (%2); dropping broadcast info " -"for this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:220 -#, fuzzy -msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)" -msgstr "SndFileSource: impossibile accedere al file \"%1\" (%2)" - -#: libs/ardour/sndfilesource.cc:226 -msgid "" -"SndFileSource: file only contains %1 channels; %2 is invalid as a channel " -"number" -msgstr "" -"SndFileSource: il file contiene solo %1 canali; %2 non è valido come numero " -"di canale" - -#: libs/ardour/sndfilesource.cc:327 -msgid "SndFileSource: could not seek to frame %1 within %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:378 -#, fuzzy -msgid "programming error: %1 %2" -msgstr "errore di programmazione: %1" - -#: libs/ardour/sndfilesource.cc:487 libs/ardour/sndfilesource.cc:533 -msgid "" -"cannot set broadcast info for audio file %1; Dropping broadcast info for " -"this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:544 -msgid "%1: cannot seek to %2" -msgstr "" - -#: libs/ardour/state_manager.cc:47 -#, fuzzy -msgid "cleared history" -msgstr "pulito" - -#: libs/ardour/state_manager.cc:60 -msgid "" -"programming error: illegal state ID (%1) passed to StateManager::set_state() " -"(range = 0-%2)" -msgstr "" - -#: libs/ardour/stateful.cc:102 -#, fuzzy -msgid "Error: could not write %1" -msgstr "Esportazione: impossibile scrivere dati sul file di output (%1)" - -#: libs/ardour/stateful.cc:116 -msgid "Could not understand XML file %1" -msgstr "" - -#: libs/ardour/tempo.cc:67 -msgid "TempoSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:75 -msgid "TempoSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:82 -msgid "TempoSection XML node has no \"beats-per-minute\" property" -msgstr "" - -#: libs/ardour/tempo.cc:87 -msgid "TempoSection XML node has an illegal \"beats_per_minute\" value" -msgstr "" - -#: libs/ardour/tempo.cc:92 -msgid "TempoSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:131 -msgid "MeterSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:139 -msgid "MeterSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:146 -msgid "MeterSection XML node has no \"beats-per-bar\" property" -msgstr "" - -#: libs/ardour/tempo.cc:151 -msgid "MeterSection XML node has an illegal \"beats-per-bar\" value" -msgstr "" - -#: libs/ardour/tempo.cc:156 -msgid "MeterSection XML node has no \"note-type\" property" -msgstr "" - -#: libs/ardour/tempo.cc:161 -msgid "MeterSection XML node has an illegal \"note-type\" value" -msgstr "" - -#: libs/ardour/tempo.cc:166 -msgid "MeterSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:259 -msgid "move metric" -msgstr "" - -#: libs/ardour/tempo.cc:330 -msgid "metric removed" -msgstr "" - -#: libs/ardour/tempo.cc:373 -#, fuzzy -msgid "add tempo" -msgstr "aggiungi regione" - -#: libs/ardour/tempo.cc:402 -#, fuzzy -msgid "replace tempo" -msgstr "sostituisci la regione" - -#: libs/ardour/tempo.cc:435 -msgid "add meter" -msgstr "" - -#: libs/ardour/tempo.cc:463 -#, fuzzy -msgid "replaced meter" -msgstr "sostituisci la regione" - -#: libs/ardour/tempo.cc:483 libs/ardour/tempo.cc:499 -msgid "programming error: no tempo section in tempo map!" -msgstr "" - -#: libs/ardour/tempo.cc:538 -msgid "programming error: unhandled MetricSection type" -msgstr "" - -#: libs/ardour/tempo.cc:1226 libs/ardour/tempo.cc:1238 -msgid "Tempo map: could not set new state, restoring old one." -msgstr "" - -#: libs/ardour/tempo.cc:1262 -msgid "load XML data" -msgstr "" - -#: libs/ardour/utils.cc:246 -#, fuzzy -msgid "illegal or badly-formed string used for path (%1)" -msgstr "il percorso indicato per il RAID è non valido o malformato" - -#: libs/ardour/utils.cc:251 -#, fuzzy -msgid "path (%1) is ambiguous" -msgstr "il percorso indicato per la ricerca RAID è ambiguo" - -#: libs/ardour/vst_plugin.cc:187 -#, fuzzy -msgid "cannot create VST chunk directory: %1" -msgstr "impossibile creare la cartella sounds \"%1\"; ignorato" - -#: libs/ardour/vst_plugin.cc:195 -#, fuzzy -msgid "cannot check VST chunk directory: %1" -msgstr "impossibile determinare la cartella di lavoro corrente (%1)" - -#: libs/ardour/vst_plugin.cc:202 -msgid "%1 exists but is not a directory" -msgstr "" - -#: libs/ardour/vst_plugin.cc:240 -msgid "Bad node sent to VSTPlugin::set_state" -msgstr "" - -#: libs/ardour/vst_plugin.cc:343 libs/ardour/vst_plugin.cc:354 -msgid "no support for presets using chunks at this time" -msgstr "" - -#: libs/ardour/coreaudiosource.cc:97 -#, fuzzy -msgid "" -"CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel " -"number" -msgstr "" -"SndFileSource: il file contiene solo %1 canali; %2 non è valido come numero " -"di canale" - -#: libs/ardour/coreaudiosource.cc:162 -msgid "CoreAudioSource: could not seek to frame %1 within %2 (%3)" -msgstr "" - -#~ msgid "FileSource: \"%1\" not found when searching %2 using %3" -#~ msgstr "FileSource: \"%1\" non trovato nel cercare %2 utilizzando %3" - -#~ msgid "FileSource: could not open \"%1\": (%2)" -#~ msgstr "FileSource: impossibile aprire \"%1\": (%2)" - -#~ msgid "FileSource: cannot write header in %1" -#~ msgstr "FileSource: impossibile scrivere header in %1" - -#~ msgid "FileSource: cannot locate chunks in %1" -#~ msgstr "FileSource: impossibile trovare spezzoni in %1" - -#~ msgid "FileSource: cannot read header in %1" -#~ msgstr "FileSource: impossibile leggere header in %1" - -#~ msgid "FileSource: cannot check header in %1" -#~ msgstr "FileSource: impossibile controllare header in %1" - -#, fuzzy -#~ msgid "FileSource: cannot initialize peakfile for %1 as %2" -#~ msgstr "FileSource: impossibile avviare il peakfile per %1" - -#~ msgid "FileSource: cannot seek to end of file" -#~ msgstr "FileSource: impossibile cercare fino alla fine del file" - -#~ msgid "FileSource: cannot read RIFF/WAVE chunk from file" -#~ msgstr "FileSource: impossibile accedere allo spezzone RIFF/WAVE dal file" - -#~ msgid "FileSource %1: not a RIFF/WAVE file" -#~ msgstr "FileSource %1: il file non un file RIFF/WAVE" - -#~ msgid "FileSource: can't read a chunk" -#~ msgstr "FileSource: impossibile accedere ad uno spezzone" - -#~ msgid "FileSource: cannot get user information for BWF header (%1)" -#~ msgstr "FileSource: impossibile otterene info utente dall'header BWF (%1)" - -#~ msgid "FileSource[%1]: cannot update data size: %2" -#~ msgstr "FileSource[%1]: impossibile aggiornare la dimensione dei dati: %2" - -#~ msgid "FileSource: can't find RIFF chunk info" -#~ msgstr "FileSource: impossibile trovare info sullo spezzone RIFF" - -#, fuzzy -#~ msgid "FileSource: can't find RIFX chunk info" -#~ msgstr "FileSource: impossibile trovare info sullo spezzone RIFF" - -#~ msgid "FileSource: can't read RIFF chunk" -#~ msgstr "FileSource: impossibile accedere allo spezzone RIFF" - -#~ msgid "FileSource: can't find format chunk info" -#~ msgstr "FileSource: impossibile trovare info sul formato dello spezzone" - -#~ msgid "FileSource: can't read format chunk" -#~ msgstr "FileSource: impossibile leggere il formato dello spezzone" - -#~ msgid "FileSource: can't find data chunk info" -#~ msgstr "FileSource: impossibile trovare info sui dati dello spezzone" - -#~ msgid "FileSource: can't read data chunk" -#~ msgstr "FileSource: impossibile leggere dati dello spezzone" - -#~ msgid "" -#~ "FileSource: cannot read Broadcast Wave data from existing audio file \"%1" -#~ "\" (%2)" -#~ msgstr "" -#~ "FileSource: impossibile leggere dati Broadcast Wave dal file audio " -#~ "esistente \"%1\" (%2) " - -#~ msgid "" -#~ "FileSource: cannot read Broadcast Wave coding history from audio file \"%1" -#~ "\" (%2)" -#~ msgstr "" -#~ "FileSource: impossibile leggere lo storico del Broadcast Wave dal file " -#~ "audio \"%1\" (%2)" - -#, fuzzy -#~ msgid "" -#~ "FileSource \"%1\" does not use valid sample format.\n" -#~ "This is probably a programming error." -#~ msgstr "" -#~ "FileSource \"%1\" non usa il formato floating point.\n" -#~ "Questo probabilmente un errore di programmazione." - -#~ msgid "FileSource \"%1\" has no \"data\" chunk" -#~ msgstr "FileSource \"%1\" non ha uno spezzone di \"dati\"" - -#~ msgid "" -#~ "%1: data length in header (%2) differs from implicit size in file (%3)" -#~ msgstr "" -#~ "%1: la lunghezza dei dati nell'header (%2) diversa dalla dimensione " -#~ "implicita nel file (%3)" - -#~ msgid "\"%1\" has a sample rate of %2 instead of %3 as used by this session" -#~ msgstr "" -#~ "\"%1\" ha una sample rate di %2 anzicch di %3 come il resto della sessione" - -#~ msgid "FileSource: cannot write WAVE chunk: %1" -#~ msgstr "FileSource: impossibile scrivere lo spezzone WAVE: %1" - -#~ msgid "FileSource: cannot write format chunk: %1" -#~ msgstr "FileSource: impossibile scrivere il formato dello spezzone: %1" - -#, fuzzy -#~ msgid "cannot create feedback request pipe (%1)" -#~ msgstr "Errore nel leggere dalla porta MIDI %1" - -#, fuzzy -#~ msgid "Error on feedback thread request pipe" -#~ msgstr "Errore nel leggere dalla porta MIDI %1" - -#, fuzzy -#~ msgid "Error reading from feedback request pipe" -#~ msgstr "Errore nel leggere dalla porta MIDI %1" - -#~ msgid "could not create crossfade object in playlist %1" -#~ msgstr "impossibile creare smorzamento incrociato nella playlist %1" - -#, fuzzy -#~ msgid "Could not find a template called %1 in %2" -#~ msgstr "Impossibile aprire il modello di mixaggio %1 per leggere" diff --git a/libs/ardour/po/pl_PL.po b/libs/ardour/po/pl_PL.po deleted file mode 100644 index 3a39989f02..0000000000 --- a/libs/ardour/po/pl_PL.po +++ /dev/null @@ -1,2063 +0,0 @@ -# translation of libardour2.po to Polish -# Copyright (C) YEAR "Paul Davis" -# This file is distributed under the same license as the PACKAGE package. -# -# Piotr Zaryk , 2008. -msgid "" -msgstr "" -"Project-Id-Version: libardour2\n" -"Report-Msgid-Bugs-To: Piotr Zaryk \n" -"POT-Creation-Date: 2008-04-03 16:16+0200\n" -"PO-Revision-Date: 2008-04-10 10:51+0100\n" -"Last-Translator: Piotr Zaryk \n" -"Language-Team: Polish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: libs/ardour/audioanalyser.cc:26 -msgid "cannot load VAMP plugin \"%1\"" -msgstr "" - -#: libs/ardour/audioanalyser.cc:46 -msgid "VAMP Plugin \"%1\" could not be loaded" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:249 -msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:302 -msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:937 -#: libs/ardour/audio_diskstream.cc:948 -msgid "AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1096 -msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1138 -msgid "AudioDiskstream %1: cannot read xfade samples %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1491 -#: libs/ardour/audio_diskstream.cc:1508 -msgid "AudioDiskstream %1: cannot write to disk" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1553 -msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1641 -msgid "%1: could not create region for complete audio file" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1666 -msgid "AudioDiskstream: could not create region for captured audio!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1774 -msgid "programmer error: %1" -msgstr "bÅ‚Ä…d programisty: %1" - -#: libs/ardour/audio_diskstream.cc:2051 -msgid "AudioDiskstream: channel %1 out of range" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2070 -msgid "%1:%2 new capture file not initialized correctly" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2322 -msgid "%1: cannot restore pending capture source file %2" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2344 -msgid "%1: incorrect number of pending sources listed - ignoring them all" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2359 -msgid "%1: cannot create whole-file region from pending capture sources" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2371 -msgid "%1: cannot create region from pending capture sources" -msgstr "" - -#: libs/ardour/audioengine.cc:114 -msgid "Connect session to engine" -msgstr "" - -#: libs/ardour/audioengine.cc:498 -msgid "a port with this name already exists: check for duplicated track/bus names" -msgstr "" - -#: libs/ardour/audioengine.cc:500 -msgid "unknown error" -msgstr "" - -#: libs/ardour/audioengine.cc:503 -msgid "AudioEngine: cannot register port \"%1\": %2" -msgstr "" - -#: libs/ardour/audioengine.cc:511 -msgid "register input port called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:545 -msgid "register output port called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:625 -msgid "connect called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:641 -msgid "AudioEngine: connection already exists: %1 (%2) to %3 (%4)" -msgstr "" - -#: libs/ardour/audioengine.cc:645 -msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)" -msgstr "" - -#: libs/ardour/audioengine.cc:658 -#: libs/ardour/audioengine.cc:687 -msgid "disconnect called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:745 -msgid "get_port_by_name() called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:789 -msgid "get_ports called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:911 -msgid "get_nth_physical called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:939 -msgid "get_port_total_latency() called with no JACK client connection" -msgstr "" - -#: libs/ardour/audioengine.cc:945 -msgid "get_port_total_latency() called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:1134 -msgid "failed to connect to JACK" -msgstr "nie udaÅ‚o siÄ™ poÅ‚Ä…czyć z JACK" - -#: libs/ardour/audioengine.cc:1152 -msgid "could not reregister %1" -msgstr "nie można byÅ‚o zarejestrować %1" - -#: libs/ardour/audioengine.cc:1211 -msgid "could not reconnect %1 and %2 (err = %3)" -msgstr "nie można byÅ‚o poÅ‚Ä…czyć ponownie %1 i %2 (bÅ‚Ä…d = %3)" - -#: libs/ardour/audiofilesource.cc:408 -#: libs/ardour/session_state.cc:2881 -msgid "there are already 1000 files with names like %1; versioning discontinued" -msgstr "" - -#: libs/ardour/audiofilesource.cc:422 -#: libs/ardour/session_state.cc:2895 -msgid "cannot rename audio file source from %1 to %2 (%3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:429 -#: libs/ardour/session_state.cc:2909 -msgid "cannot remove peakfile %1 for %2 (%3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:465 -msgid "FileSource: search path not set" -msgstr "" - -#: libs/ardour/audiofilesource.cc:537 -msgid "" -"FileSource: \"%1\" is ambigous when searching %2\n" -"\t" -msgstr "" - -#: libs/ardour/audiofilesource.cc:543 -msgid "Filesource: cannot find required file (%1): while searching %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:583 -msgid "Filesource: cannot find required file (%1): %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:588 -msgid "Filesource: cannot check for existing file (%1): %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:651 -#: libs/ardour/audiosource.cc:876 -#: libs/ardour/automation_event.cc:636 -#: libs/ardour/insert.cc:547 -#: libs/ardour/session.cc:2172 -#: libs/ardour/session.cc:3576 -#: libs/ardour/session.cc:3615 -#: libs/ardour/session_command.cc:432 -#: libs/ardour/sndfilesource.cc:111 -msgid "programming error: %1" -msgstr "" - -#: libs/ardour/audiofilesource.cc:657 -msgid "Programming error! Ardour tried to rename a file over another file! It's safe to continue working, but please report this to the developers." -msgstr "" - -#: libs/ardour/audiofilesource.cc:662 -msgid "cannot rename audio file %1 to %2" -msgstr "" - -#: libs/ardour/audiofilter.cc:43 -msgid "" -"This is an old Ardour session that does not have\n" -"sufficient information for rendered FX" -msgstr "" - -#: libs/ardour/audiofilter.cc:66 -msgid "audiofilter: error creating name for new audio file based on %1" -msgstr "" - -#: libs/ardour/audiofilter.cc:77 -msgid "audiofilter: error creating new audio file %1 (%2)" -msgstr "" - -#: libs/ardour/audio_library.cc:57 -msgid "Could not open %1. Audio Library not saved" -msgstr "" - -#: libs/ardour/audio_playlist.cc:226 -#: libs/ardour/audio_playlist.cc:615 -msgid "programming error: non-audio Region passed to remove_overlap in audio playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:356 -msgid "programming error: non-audio Region tested for overlap in audio playlist" -msgstr "" - -#: libs/ardour/audioregion.cc:1596 -msgid "" -"You have requested an operation that requires audio analysis.\n" -"\n" -"You currently have \"auto-analyse-audio\" disabled, which means\n" -"that transient data must be generated every time it is required.\n" -"\n" -"If you are doing work that will require transient data on a\n" -"regular basis, you should probably enable \"auto-analyse-audio\"\n" -"then quit ardour and restart." -msgstr "" - -#: libs/ardour/audiosource.cc:178 -msgid "cannot rename peakfile for %1 from %2 to %3 (%4)" -msgstr "" - -#: libs/ardour/audiosource.cc:205 -msgid "AudioSource: cannot stat peakfile \"%1\"" -msgstr "" - -#: libs/ardour/audiosource.cc:329 -msgid "cannot read sample data for unscaled peak computation" -msgstr "" - -#: libs/ardour/audiosource.cc:349 -msgid "AudioSource: cannot open peakpath (a) \"%1\" (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:423 -msgid "AudioSource: cannot open peakpath (b) \"%1\" (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:537 -msgid "AudioSource[%1]: peak read - cannot read %2 samples at offset %3 of %4 (%5)" -msgstr "" - -#: libs/ardour/audiosource.cc:624 -msgid "%1: could not write read raw data for peak computation (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:670 -msgid "AudioSource: cannot open peakpath (c) \"%1\" (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:736 -#: libs/ardour/audiosource.cc:848 -msgid "%1: could not write peak file data (%2)" -msgstr "" - -#: libs/ardour/audio_track.cc:140 -#: libs/ardour/io.cc:1797 -#: libs/ardour/io.cc:1863 -msgid "Unknown connection \"%1\" listed for input of %2" -msgstr "" - -#: libs/ardour/audio_track.cc:145 -msgid "in 1+2" -msgstr "wejÅ›cie 1+2" - -#: libs/ardour/audio_track.cc:147 -#: libs/ardour/io.cc:1799 -#: libs/ardour/io.cc:1865 -msgid "in 1" -msgstr "wejÅ›cie 1" - -#: libs/ardour/audio_track.cc:151 -#: libs/ardour/io.cc:1800 -#: libs/ardour/io.cc:1866 -msgid "No input connections available as a replacement" -msgstr "" - -#: libs/ardour/audio_track.cc:155 -msgid "Connection %1 was not available - \"%2\" used instead" -msgstr "" - -#: libs/ardour/audio_track.cc:164 -#: libs/ardour/io.cc:1879 -msgid "improper input channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/audio_track.cc:205 -#: libs/ardour/audio_track.cc:218 -msgid "AudioTrack: audio diskstream \"%1\" not known by session" -msgstr "" - -#: libs/ardour/audio_track.cc:260 -msgid "programming error: AudioTrack given state without diskstream!" -msgstr "" - -#: libs/ardour/auditioner.cc:56 -msgid "no outputs available for auditioner - manual connection required" -msgstr "" - -#: libs/ardour/auditioner.cc:127 -msgid "Auditioning of non-audio regions not yet supported" -msgstr "" - -#: libs/ardour/automation_event.cc:782 -#: libs/ardour/panner.cc:833 -msgid "programming error:" -msgstr "" - -#: libs/ardour/automation_event.cc:1305 -msgid "automation list: cannot load coordinates from XML, all points ignored" -msgstr "" - -#: libs/ardour/automation_event.cc:1351 -msgid "automation list: no x-coordinate stored for control point (point ignored)" -msgstr "" - -#: libs/ardour/automation_event.cc:1357 -msgid "automation list: no y-coordinate stored for control point (point ignored)" -msgstr "" - -#: libs/ardour/automation_event.cc:1371 -msgid "AutomationList: passed XML node called %1, not \"AutomationList\" - ignored" -msgstr "" - -#: libs/ardour/configuration.cc:97 -msgid "loading system configuration file %1" -msgstr "" - -#: libs/ardour/configuration.cc:100 -msgid "Ardour: cannot read system configuration file \"%1\"" -msgstr "" - -#: libs/ardour/configuration.cc:107 -msgid "Ardour: system configuration file \"%1\" not loaded successfully." -msgstr "" - -#: libs/ardour/configuration.cc:111 -msgid "your system Ardour configuration file is empty. This probably means that there as an error installing Ardour" -msgstr "" - -#: libs/ardour/configuration.cc:131 -msgid "loading user configuration file %1" -msgstr "" - -#: libs/ardour/configuration.cc:134 -msgid "Ardour: cannot read configuration file \"%1\"" -msgstr "" - -#: libs/ardour/configuration.cc:141 -msgid "Ardour: user configuration file \"%1\" not loaded successfully." -msgstr "" - -#: libs/ardour/configuration.cc:145 -msgid "your Ardour configuration file is empty. This is not normal." -msgstr "" - -#: libs/ardour/configuration.cc:164 -msgid "Config file %1 not saved" -msgstr "Plik konfiguracji %1 nie zapisany" - -#: libs/ardour/configuration.cc:253 -msgid "ill-formed MIDI port specification in ardour rcfile (ignored)" -msgstr "" - -#: libs/ardour/connection.cc:182 -msgid "Node for Connection has no \"name\" property" -msgstr "" - -#: libs/ardour/connection.cc:190 -msgid "Node for Connection has no \"connections\" property" -msgstr "" - -#: libs/ardour/connection.cc:226 -#: libs/ardour/io.cc:1939 -msgid "IO: badly formed string in XML node for inputs \"%1\"" -msgstr "" - -#: libs/ardour/connection.cc:231 -#: libs/ardour/io.cc:1944 -msgid "bad input string in XML node \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:117 -msgid "control protocol name \"%1\" has no descriptor" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:122 -msgid "control protocol name \"%1\" could not be initialized" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:189 -msgid "Instantiating mandatory control protocol %1" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:201 -msgid "looking for control protocols in %1" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:223 -msgid "Control protocol %1 not usable" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:237 -msgid "Control surface protocol discovered: \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:255 -msgid "ControlProtocolManager: cannot load module \"%1\" (%2)" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:263 -msgid "ControlProtocolManager: module \"%1\" has no descriptor function." -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:380 -msgid "control protocol XML node has no name property. Ignored." -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:387 -msgid "control protocol \"%1\" is not known. Ignored" -msgstr "" - -#: libs/ardour/crossfade.cc:124 -msgid "Crossfade: no \"in\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:131 -msgid "Crossfade: no \"in\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:141 -msgid "Crossfade: no \"out\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:148 -msgid "Crossfade: no \"out\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:684 -msgid "old-style crossfade information - no position information" -msgstr "" - -#: libs/ardour/curve.cc:116 -#: libs/ardour/globals.cc:394 -#: libs/ardour/insert.cc:461 -#: libs/ardour/session.cc:2655 -#: libs/ardour/session.cc:2741 -msgid "programming error: " -msgstr "" - -#: libs/ardour/cycle_timer.cc:36 -msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo" -msgstr "" - -#: libs/ardour/cycle_timer.cc:48 -msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo" -msgstr "" - -#: libs/ardour/cycle_timer.cc:71 -msgid "cannot locate cpu MHz in /proc/cpuinfo" -msgstr "nie można zlokalizować taktowania CPU w /proc/cpuinfo" - -#: libs/ardour/diskstream.cc:253 -msgid "Location \"%1\" not valid for track loop (start >= end)" -msgstr "" - -#: libs/ardour/globals.cc:112 -msgid "Starting OSC" -msgstr "" - -#: libs/ardour/globals.cc:124 -msgid "no MIDI ports specified: no MMC or MTC control possible" -msgstr "" - -#: libs/ardour/globals.cc:128 -msgid "Configuring MIDI ports" -msgstr "" - -#: libs/ardour/globals.cc:143 -#: libs/ardour/globals.cc:147 -#: libs/ardour/globals.cc:151 -msgid "default" -msgstr "domyÅ›lnie" - -#: libs/ardour/globals.cc:181 -msgid "No MMC control (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:187 -msgid "No MTC support (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:192 -msgid "No MIDI parameter support (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:273 -msgid "Could not set system open files limit to \"unlimited\"" -msgstr "" - -#: libs/ardour/globals.cc:275 -msgid "Could not set system open files limit to %1" -msgstr "" - -#: libs/ardour/globals.cc:279 -msgid "Removed open file count limit. Excellent!" -msgstr "" - -#: libs/ardour/globals.cc:281 -msgid "Ardour will be limited to %1 open files" -msgstr "" - -#: libs/ardour/globals.cc:285 -msgid "Could not get system open files limit (%1)" -msgstr "" - -#: libs/ardour/globals.cc:304 -msgid "Loading configuration" -msgstr "" - -#: libs/ardour/import.cc:179 -msgid "Could not find a source for %1 even though we are updating this file!" -msgstr "" - -#: libs/ardour/import.cc:208 -msgid "Unable to create file %1 during import" -msgstr "" - -#: libs/ardour/import.cc:225 -msgid "" -"converting %1\n" -"(resample from %2KHz to %3KHz)\n" -"(%4 of %5)" -msgstr "" - -#: libs/ardour/import.cc:232 -msgid "" -"converting %1\n" -"(%2 of %3)" -msgstr "" - -#: libs/ardour/import.cc:318 -msgid "Import: cannot open input sound file \"%1\"" -msgstr "" - -#: libs/ardour/insert.cc:680 -#: libs/ardour/insert.cc:1005 -msgid "XML node describing insert is missing the `type' field" -msgstr "" - -#: libs/ardour/insert.cc:693 -msgid "unknown plugin type %1 in plugin insert state" -msgstr "" - -#: libs/ardour/insert.cc:713 -msgid "Plugin has no unique ID field" -msgstr "" - -#: libs/ardour/insert.cc:723 -msgid "" -"Found a reference to a plugin (\"%1\") that is unknown.\n" -"Perhaps it was removed or moved since it was last used." -msgstr "" - -#: libs/ardour/insert.cc:754 -msgid "XML node describing a plugin insert is missing the `%1' information" -msgstr "" - -#: libs/ardour/insert.cc:766 -#: libs/ardour/insert.cc:1033 -msgid "XML node describing insert is missing a Redirect node" -msgstr "" - -#: libs/ardour/insert.cc:818 -msgid "PluginInsert: Auto: no ladspa port number" -msgstr "" - -#: libs/ardour/insert.cc:825 -msgid "PluginInsert: Auto: port id out of range" -msgstr "" - -#: libs/ardour/insert.cc:856 -msgid "XML node describing a port automation is missing the `%1' information" -msgstr "" - -#: libs/ardour/insert.cc:911 -#: libs/ardour/insert.cc:919 -msgid "insert %1" -msgstr "" - -#: libs/ardour/insert.cc:1010 -msgid "non-port insert XML used for port plugin insert" -msgstr "" - -#: libs/ardour/io.cc:638 -msgid "IO: cannot disconnect input port %1 from %2" -msgstr "" - -#: libs/ardour/io.cc:706 -msgid "IO: cannot disconnect output port %1 from %2" -msgstr "" - -#: libs/ardour/io.cc:860 -#: libs/ardour/io.cc:1189 -#: libs/ardour/io.cc:1308 -msgid "IO: cannot register output port %1" -msgstr "" - -#: libs/ardour/io.cc:967 -#: libs/ardour/io.cc:1066 -#: libs/ardour/io.cc:1164 -msgid "IO: cannot register input port %1" -msgstr "" - -#: libs/ardour/io.cc:1558 -msgid "incorrect XML node \"%1\" passed to IO object" -msgstr "" - -#: libs/ardour/io.cc:1686 -msgid "%1: cannot open automation event file \"%2\"" -msgstr "" - -#: libs/ardour/io.cc:1701 -msgid "badly formed version number in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:1705 -msgid "no version information in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:1713 -msgid "badly formatted automation event record at line %1 of %2 (ignored)" -msgstr "" - -#: libs/ardour/io.cc:1733 -msgid "dubious automation event found (and ignored)" -msgstr "" - -#: libs/ardour/io.cc:1746 -msgid "IO::connecting_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1768 -msgid "IO::ports_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1804 -#: libs/ardour/io.cc:1870 -msgid "Connection %1 was not available - \"in 1\" used instead" -msgstr "" - -#: libs/ardour/io.cc:1820 -#: libs/ardour/io.cc:1888 -msgid "Unknown connection \"%1\" listed for output of %2" -msgstr "" - -#: libs/ardour/io.cc:1822 -#: libs/ardour/io.cc:1890 -msgid "out 1" -msgstr "" - -#: libs/ardour/io.cc:1823 -#: libs/ardour/io.cc:1891 -msgid "No output connections available as a replacement" -msgstr "" - -#: libs/ardour/io.cc:1827 -#: libs/ardour/io.cc:1895 -msgid "Connection %1 was not available - \"out 1\" used instead" -msgstr "" - -#: libs/ardour/io.cc:1841 -msgid "%1: cannot create I/O ports" -msgstr "" - -#: libs/ardour/io.cc:1904 -msgid "improper output channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/io.cc:1989 -msgid "IO: badly formed string in XML node for outputs \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:1994 -msgid "IO: bad output string in XML node \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2078 -msgid "you cannot use colons to name objects with I/O connections" -msgstr "" - -#: libs/ardour/io.cc:2642 -msgid "in" -msgstr "wejÅ›cie" - -#: libs/ardour/io.cc:2645 -msgid "out" -msgstr "wyjÅ›cie" - -#: libs/ardour/io.cc:2697 -#: libs/ardour/io.cc:2730 -#, c-format -msgid "%s %u" -msgstr "%s %u" - -#: libs/ardour/ladspa_plugin.cc:86 -msgid "LADSPA: module has no descriptor function." -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:91 -msgid "LADSPA: plugin has gone away since discovery!" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:98 -msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:306 -msgid "illegal parameter number used with plugin \"%1\". This mayindicate a change in the plugin design, and presets may beinvalid" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:389 -msgid "Bad node sent to LadspaPlugin::set_state" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:402 -msgid "LADSPA: no ladspa port number" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:409 -msgid "LADSPA: no ladspa port data" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:648 -msgid "LADSPA: cannot load module from \"%1\"" -msgstr "" - -#: libs/ardour/location.cc:213 -msgid "You cannot put a CD marker at this position" -msgstr "" - -#: libs/ardour/location.cc:342 -msgid "incorrect XML node passed to Location::set_state" -msgstr "" - -#: libs/ardour/location.cc:347 -msgid "XML node for Location has no ID information" -msgstr "" - -#: libs/ardour/location.cc:353 -msgid "XML node for Location has no name information" -msgstr "" - -#: libs/ardour/location.cc:360 -msgid "XML node for Location has no start information" -msgstr "" - -#: libs/ardour/location.cc:371 -msgid "XML node for Location has no end information" -msgstr "" - -#: libs/ardour/location.cc:378 -msgid "XML node for Location has no flags information" -msgstr "" - -#: libs/ardour/location.cc:495 -msgid "Locations: attempt to use unknown location as selected location" -msgstr "" - -#: libs/ardour/location.cc:663 -msgid "incorrect XML mode passed to Locations::set_state" -msgstr "" - -#: libs/ardour/location.cc:684 -msgid "could not load location from session file - ignored" -msgstr "" - -#: libs/ardour/mtc_slave.cc:123 -msgid "Unknown rate/drop value in incoming MTC stream, session values used instead" -msgstr "" - -#: libs/ardour/mtc_slave.cc:229 -msgid "MTC Slave: atomic read of current time failed, sleeping!" -msgstr "" - -#: libs/ardour/named_selection.cc:88 -msgid "Chunk %1 uses an unknown playlist \"%2\"" -msgstr "" - -#: libs/ardour/named_selection.cc:91 -msgid "Chunk %1 contains misformed playlist information" -msgstr "" - -#: libs/ardour/panner.cc:253 -msgid "badly formatted pan automation event record at line %1 of %2 (ignored) [%3]" -msgstr "" - -#: libs/ardour/panner.cc:749 -msgid "badly-formed positional data for Multi2dPanner - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1138 -msgid "Unknown panner plugin \"%1\" found in pan state - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1144 -msgid "panner plugin node has no type information!" -msgstr "" - -#: libs/ardour/panner.cc:1354 -msgid "cannot open pan automation file %1 (%2)" -msgstr "" - -#: libs/ardour/panner.cc:1367 -msgid "badly formed version number in pan automation event file \"%1\"" -msgstr "" - -#: libs/ardour/panner.cc:1371 -msgid "no version information in pan automation event file \"%1\" (first line = %2)" -msgstr "" - -#: libs/ardour/panner.cc:1386 -msgid "too many panner states found in pan automation file %1" -msgstr "" - -#: libs/ardour/playlist.cc:250 -msgid "playlist const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:256 -msgid "playlist non-const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:1217 -msgid "%1: bounds changed received for region (%2)not in playlist" -msgstr "" - -#: libs/ardour/playlist.cc:1750 -msgid "region state node has no ID, ignored" -msgstr "" - -#: libs/ardour/playlist.cc:1761 -msgid "Playlist: cannot reset region state from XML" -msgstr "" - -#: libs/ardour/playlist.cc:1766 -msgid "Playlist: cannot create region from XML" -msgstr "" - -#: libs/ardour/plugin.cc:281 -msgid "Could not locate HOME. Preset not saved." -msgstr "" - -#: libs/ardour/plugin.cc:291 -#: libs/ardour/plugin.cc:297 -msgid "Could not create %1. Preset not saved. (%2)" -msgstr "" - -#: libs/ardour/plugin.cc:302 -msgid "Error saving presets file %1." -msgstr "" - -#: libs/ardour/plugin_manager.cc:223 -msgid "Could not parse rdf file: %1" -msgstr "" - -#: libs/ardour/plugin_manager.cc:263 -msgid "LADSPA: cannot load module \"%1\" (%2)" -msgstr "" - -#: libs/ardour/plugin_manager.cc:270 -msgid "LADSPA: module \"%1\" has no descriptor function." -msgstr "" - -#: libs/ardour/plugin_manager.cc:454 -msgid "VST plugin %1 does not support processReplacing, and so cannot be used in ardour at this time" -msgstr "" - -#: libs/ardour/recent_sessions.cc:44 -msgid "cannot open recent session file %1 (%2)" -msgstr "" - -#: libs/ardour/redirect.cc:78 -msgid "programming error: unknown Redirect type in Redirect::Clone!\n" -msgstr "" - -#: libs/ardour/redirect.cc:128 -msgid "%2: badly formatted node name in XML automation state, ignored" -msgstr "" - -#: libs/ardour/redirect.cc:141 -msgid "%1: cannot load automation data from XML" -msgstr "" - -#: libs/ardour/redirect.cc:219 -msgid "incorrect XML node \"%1\" passed to Redirect object" -msgstr "" - -#: libs/ardour/redirect.cc:267 -msgid "XML node describing an IO is missing an IO node" -msgstr "" - -#: libs/ardour/redirect.cc:272 -msgid "XML node describing a redirect is missing the `active' field" -msgstr "" - -#: libs/ardour/redirect.cc:285 -msgid "XML node describing a redirect is missing the `placement' field" -msgstr "" - -#: libs/ardour/redirect.cc:315 -msgid "%1: Automation node has no path property" -msgstr "" - -#: libs/ardour/redirect.cc:351 -msgid "%1: cannot open %2 to load automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:376 -msgid "%1: cannot load automation data from %2" -msgstr "" - -#: libs/ardour/region.cc:923 -msgid "XMLNode describing a Region is incomplete (no name)" -msgstr "" - -#: libs/ardour/region.cc:1068 -msgid "Session: XMLNode describing a Region is incomplete (no id)" -msgstr "" - -#: libs/ardour/region_factory.cc:52 -#: libs/ardour/region_factory.cc:69 -msgid "programming error: RegionFactory::create() called with unknown Region type" -msgstr "" - -#: libs/ardour/resampled_source.cc:61 -msgid "Import: src_new() failed : %1" -msgstr "" - -#: libs/ardour/resampled_source.cc:113 -msgid "Import: %1" -msgstr "" - -#: libs/ardour/route.cc:83 -#: libs/ardour/session.cc:1560 -#: libs/ardour/session.cc:1566 -#: libs/ardour/session.cc:1871 -#: libs/ardour/session.cc:3369 -msgid "signal" -msgstr "" - -#: libs/ardour/route.cc:1573 -msgid "Send construction failed" -msgstr "" - -#: libs/ardour/route.cc:1601 -msgid "unknown Insert type \"%1\"; ignored" -msgstr "" - -#: libs/ardour/route.cc:1609 -msgid "Insert XML node has no type property" -msgstr "" - -#: libs/ardour/route.cc:1614 -msgid "insert could not be created. Ignored." -msgstr "" - -#: libs/ardour/route.cc:1636 -msgid "Bad node sent to Route::set_state() [%1]" -msgstr "" - -#: libs/ardour/route.cc:1698 -msgid "Route %1: unknown edit group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:1714 -#: libs/ardour/route.cc:1718 -msgid "badly formed order key string in state file! [%1] ... ignored." -msgstr "" - -#: libs/ardour/route.cc:1784 -#: libs/ardour/route.cc:2001 -msgid "[control]" -msgstr "" - -#: libs/ardour/route.cc:1823 -msgid "Route %1: unknown mix group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:2019 -msgid "could not connect %1 to %2" -msgstr "" - -#: libs/ardour/send.cc:34 -#: libs/ardour/send.cc:57 -msgid "send %1" -msgstr "" - -#: libs/ardour/send.cc:117 -msgid "XML node describing a send is missing a Redirect node" -msgstr "" - -#: libs/ardour/session_butler.cc:80 -#: libs/ardour/session_midi.cc:1085 -msgid "Cannot create transport request signal pipe (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:85 -#: libs/ardour/session_butler.cc:90 -msgid "UI: cannot set O_NONBLOCK on butler request pipe (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:95 -msgid "Session: could not create butler thread" -msgstr "" - -#: libs/ardour/session_butler.cc:184 -msgid "poll on butler request pipe failed (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:191 -msgid "Error on butler thread request pipe: fd=%1 err=%2" -msgstr "" - -#: libs/ardour/session_butler.cc:232 -msgid "Error reading from butler request pipe" -msgstr "" - -#: libs/ardour/session_butler.cc:277 -msgid "Butler read ahead failure on dstream %1" -msgstr "" - -#: libs/ardour/session_butler.cc:323 -msgid "Butler write-behind failure on dstream %1" -msgstr "" - -#: libs/ardour/session.cc:130 -msgid "Could not resolve path: %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:142 -msgid "cannot check session path %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:172 -msgid "cannot check statefile %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:208 -msgid "%1 is not an Ardour snapshot file" -msgstr "" - -#: libs/ardour/session.cc:225 -msgid "cannot determine current working directory (%1)" -msgstr "" - -#: libs/ardour/session.cc:242 -msgid "unknown file type for session %1" -msgstr "" - -#: libs/ardour/session.cc:387 -msgid "monitor" -msgstr "monitor" - -#: libs/ardour/session.cc:394 -#: libs/ardour/session.cc:1900 -msgid "master" -msgstr "główna" - -#: libs/ardour/session.cc:674 -msgid "Set block size and sample rate" -msgstr "" - -#: libs/ardour/session.cc:679 -msgid "Using configuration" -msgstr "" - -#: libs/ardour/session.cc:712 -msgid "could not setup Click I/O" -msgstr "nie można byÅ‚o ustawić I/O metronomu" - -#: libs/ardour/session.cc:733 -msgid "cannot setup Click I/O" -msgstr "nie można ustawić I/O metronomu" - -#: libs/ardour/session.cc:736 -msgid "Compute I/O Latencies" -msgstr "" - -#: libs/ardour/session.cc:748 -msgid "Set up standard connections" -msgstr "" - -#: libs/ardour/session.cc:754 -#, c-format -msgid "out %" -msgstr "wyjÅ›cie %" - -#: libs/ardour/session.cc:766 -#, c-format -msgid "in %" -msgstr "wejÅ›cie %" - -#: libs/ardour/session.cc:780 -#, c-format -msgid "out %+%" -msgstr "wyjÅ›cie %+%" - -#: libs/ardour/session.cc:794 -#, c-format -msgid "in %+%" -msgstr "wejÅ›cie %+%" - -#: libs/ardour/session.cc:827 -msgid "cannot setup master inputs" -msgstr "nie można ustawić głównych wejść" - -#: libs/ardour/session.cc:835 -msgid "cannot setup master outputs" -msgstr "nie można ustawić głównych wyjść" - -#: libs/ardour/session.cc:846 -msgid "Master Out" -msgstr "Główne wyjÅ›cie" - -#: libs/ardour/session.cc:855 -msgid "Setup signal flow and plugins" -msgstr "" - -#: libs/ardour/session.cc:861 -msgid "Catch up with send/insert state" -msgstr "" - -#: libs/ardour/session.cc:892 -msgid "Connect to engine" -msgstr "" - -#: libs/ardour/session.cc:899 -msgid "OSC startup" -msgstr "poczÄ…tek OSC" - -#: libs/ardour/session.cc:928 -msgid "cannot create Auditioner: no auditioning of regions possible" -msgstr "" - -#: libs/ardour/session.cc:942 -msgid "cannot setup control inputs" -msgstr "" - -#: libs/ardour/session.cc:950 -msgid "cannot set up master outputs" -msgstr "" - -#: libs/ardour/session.cc:1153 -msgid "Session: you can't use that location for auto punch (start <= end)" -msgstr "" - -#: libs/ardour/session.cc:1194 -msgid "Session: you can't use a mark for auto loop" -msgstr "" - -#: libs/ardour/session.cc:1578 -msgid "feedback loop setup between %1 and %2" -msgstr "" - -#: libs/ardour/session.cc:1765 -#: libs/ardour/session.cc:1931 -msgid "cannot configure %1 in/%2 out configuration for new audio track" -msgstr "" - -#: libs/ardour/session.cc:1817 -msgid "Session: could not create new audio track." -msgstr "" - -#: libs/ardour/session.cc:1835 -#: libs/ardour/session.cc:1980 -msgid "No more JACK ports are available. You will need to stop Ardour and restart JACK with ports if you need this many tracks." -msgstr "" - -#: libs/ardour/session.cc:1874 -msgid "editor" -msgstr "" - -#: libs/ardour/session.cc:1975 -msgid "Session: could not create new audio route." -msgstr "" - -#: libs/ardour/session.cc:2526 -msgid "cannot create new name for region \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:2590 -msgid "too many regions with names like %1" -msgstr "" - -#: libs/ardour/session.cc:2621 -#: libs/ardour/session.cc:2682 -msgid "Session::add_region() ignored a null region. Warning: you might have lost a region." -msgstr "" - -#: libs/ardour/session.cc:3159 -msgid "There are already %1 recordings for %2, which I consider too many." -msgstr "" - -#: libs/ardour/session.cc:3390 -msgid "Cannot compile tape track regexp for use (%1)" -msgstr "" - -#: libs/ardour/session.cc:3543 -msgid "programming error: unknown type of Insert created!" -msgstr "" - -#: libs/ardour/session.cc:3549 -msgid "programming error: unknown type of Redirect created!" -msgstr "" - -#: libs/ardour/session.cc:3588 -msgid "programming error: unknown type of Redirect deleted!" -msgstr "" - -#: libs/ardour/session.cc:3708 -#: libs/ardour/session.cc:3722 -#: libs/ardour/session.cc:4122 -msgid "Memory allocation error: posix_memalign (%1 * %2) failed (%3)" -msgstr "" - -#: libs/ardour/session.cc:3792 -msgid "send ID %1 appears to be in use already" -msgstr "" - -#: libs/ardour/session.cc:3804 -msgid "insert ID %1 appears to be in use already" -msgstr "" - -#: libs/ardour/session.cc:3986 -msgid "too many bounced versions of playlist \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:3995 -msgid "cannot create new audio file \"%1\" for %2" -msgstr "" - -#: libs/ardour/session.cc:4107 -msgid "Programming error: get_silent_buffers() called for %1 buffers but only %2 exist" -msgstr "" - -#: libs/ardour/session_click.cc:160 -msgid "cannot open click soundfile %1 (%2)" -msgstr "nie można otworzyć pliku dźwiÄ™kowego metronomu %1 (%2)" - -#: libs/ardour/session_click.cc:169 -msgid "cannot read data from click soundfile" -msgstr "nie można odczytać danych z pliku dźwiÄ™kowego metronomu" - -#: libs/ardour/session_click.cc:196 -msgid "cannot open click emphasis soundfile %1 (%2)" -msgstr "nie można otworzyć pliku dźwiÄ™kowego akcentowanego uderzenia metronomu %1 (%2)" - -#: libs/ardour/session_click.cc:204 -msgid "cannot read data from click emphasis soundfile" -msgstr "nie można odczytać danych z pliku dźwiÄ™kowego akcentowanego uderzenia metronomu" - -#: libs/ardour/session_command.cc:75 -msgid "Tried to reconstitute a MementoCommand with no contents, failing. id=" -msgstr "" - -#: libs/ardour/session_command.cc:111 -msgid "could not reconstitute MementoCommand from XMLNode. object type = %1 id = %2" -msgstr "" - -#: libs/ardour/session_command.cc:123 -msgid "GlobalRouteStateCommand has no \"type\" node, ignoring" -msgstr "" - -#: libs/ardour/session_command.cc:138 -msgid "unknown type of GlobalRouteStateCommand (%1), ignored" -msgstr "" - -#: libs/ardour/session_command.cc:186 -msgid "global route state command has no \"%1\" node, ignoring entire command" -msgstr "" - -#: libs/ardour/session_command.cc:202 -#: libs/ardour/session_command.cc:515 -msgid "cannot find track/bus \"%1\" while rebuilding a global route state command, ignored" -msgstr "" - -#: libs/ardour/session_command.cc:499 -msgid "global route meter state command has no \"%1\" node, ignoring entire command" -msgstr "" - -#: libs/ardour/session_events.cc:161 -msgid "Session: cannot have two events of type %1 at the same frame (%2)." -msgstr "" - -#: libs/ardour/session_events.cc:437 -msgid "Programming error: illegal event type in process_event (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:62 -msgid "Export: no output file specified" -msgstr "" - -#: libs/ardour/session_export.cc:163 -#: libs/ardour/session_export.cc:168 -msgid "illegal frame range in export specification" -msgstr "" - -#: libs/ardour/session_export.cc:173 -msgid "Bad data width size. Report me!" -msgstr "" - -#: libs/ardour/session_export.cc:203 -msgid "Export: cannot open output file \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_export.cc:213 -msgid "cannot initialize sample rate conversion: %1" -msgstr "" - -#: libs/ardour/session_export.cc:315 -msgid "an error occured during sample rate conversion: %1" -msgstr "" - -#: libs/ardour/session_export.cc:326 -msgid "warning, leftover frames overflowed, glitches might occur in output" -msgstr "" - -#: libs/ardour/session_export.cc:417 -msgid "Export: could not write data to output file (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:484 -msgid "%1: cannot seek to %2 for export" -msgstr "" - -#: libs/ardour/session_midi.cc:94 -msgid "Ardour is slaved to MTC - port cannot be reset" -msgstr "" - -#: libs/ardour/session_midi.cc:109 -msgid "unknown port %1 requested for MTC" -msgstr "" - -#: libs/ardour/session_midi.cc:446 -msgid "Error reading from MIDI port %1" -msgstr "" - -#: libs/ardour/session_midi.cc:816 -msgid "Session: could not send full MIDI time code" -msgstr "" - -#: libs/ardour/session_midi.cc:875 -msgid "Session: cannot send quarter-frame MTC message (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:983 -msgid "MMC: cannot send command %1%2%3" -msgstr "" - -#: libs/ardour/session_midi.cc:1090 -msgid "UI: cannot set O_NONBLOCK on signal read pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1095 -msgid "UI: cannot set O_NONBLOCK on signal write pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1100 -msgid "Session: could not create transport thread" -msgstr "" - -#: libs/ardour/session_midi.cc:1131 -msgid "cannot send signal to midi thread! (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1226 -msgid "MIDI thread poll failed (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1238 -msgid "Error on transport thread request pipe" -msgstr "" - -#: libs/ardour/session_midi.cc:1265 -msgid "Error reading from transport request pipe" -msgstr "" - -#: libs/ardour/session_process.cc:105 -msgid "Session: error in no roll for %1" -msgstr "" - -#: libs/ardour/session_state.cc:109 -msgid "Could not use path %1 (%s)" -msgstr "" - -#: libs/ardour/session_state.cc:145 -#: libs/ardour/session_state.cc:1050 -msgid "end" -msgstr "koniec" - -#: libs/ardour/session_state.cc:146 -#: libs/ardour/session_state.cc:1049 -msgid "start" -msgstr "poczÄ…tek" - -#: libs/ardour/session_state.cc:338 -msgid "Reset Remote Controls" -msgstr "" - -#: libs/ardour/session_state.cc:345 -msgid "Reset Control Protocols" -msgstr "" - -#: libs/ardour/session_state.cc:365 -msgid "Session loading complete" -msgstr "" - -#: libs/ardour/session_state.cc:484 -#: libs/ardour/session_state.cc:2857 -msgid "Session: cannot create session peakfile folder \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:495 -msgid "Session: cannot create session sounds folder \"%1\" (%2)" -msgstr "Nie można utworzyć folderu dźwiÄ™ków sesji \"%1\" (%2)" - -#: libs/ardour/session_state.cc:503 -msgid "Session: cannot create session dead sounds folder \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:510 -msgid "Session: cannot create session export folder \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:517 -msgid "Session: cannot create session analysis folder \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:529 -msgid "Session: cannot create session folder \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:561 -msgid "Could not open %1 for writing mix template" -msgstr "" - -#: libs/ardour/session_state.cc:567 -msgid "Could not open mix template %1 for reading" -msgstr "" - -#: libs/ardour/session_state.cc:606 -msgid "Session: could not load diskstream via XML state" -msgstr "" - -#: libs/ardour/session_state.cc:649 -msgid "could not rename snapshot %1 to %2" -msgstr "" - -#: libs/ardour/session_state.cc:688 -msgid "Ardour's audio engine is not connected and state saving would lose all I/O connections. Session not saved" -msgstr "" - -#: libs/ardour/session_state.cc:732 -msgid "state could not be saved to %1" -msgstr "" - -#: libs/ardour/session_state.cc:739 -msgid "could not rename temporary session file %1 to %2" -msgstr "" - -#: libs/ardour/session_state.cc:809 -msgid "%1: session state information file \"%2\" doesn't exist!" -msgstr "" - -#: libs/ardour/session_state.cc:818 -msgid "Could not understand ardour file %1" -msgstr "" - -#: libs/ardour/session_state.cc:827 -msgid "Session file %1 is not an Ardour session" -msgstr "" - -#: libs/ardour/session_state.cc:858 -msgid "" -"Copying old session file %1 to %2\n" -"Use %2 with Ardour versions before 2.0 from now on" -msgstr "" - -#: libs/ardour/session_state.cc:1168 -msgid "programming error: Session: incorrect XML node sent to set_state()" -msgstr "" - -#: libs/ardour/session_state.cc:1237 -msgid "Session: XML state has no options section" -msgstr "" - -#: libs/ardour/session_state.cc:1241 -msgid "Session: XML state has no locations section" -msgstr "" - -#: libs/ardour/session_state.cc:1274 -msgid "Session: XML state has no sources section" -msgstr "" - -#: libs/ardour/session_state.cc:1281 -msgid "Session: XML state has no Regions section" -msgstr "" - -#: libs/ardour/session_state.cc:1288 -msgid "Session: XML state has no playlists section" -msgstr "" - -#: libs/ardour/session_state.cc:1307 -msgid "Session: XML state has no diskstreams section" -msgstr "" - -#: libs/ardour/session_state.cc:1314 -msgid "Session: XML state has no connections section" -msgstr "" - -#: libs/ardour/session_state.cc:1321 -msgid "Session: XML state has no edit groups section" -msgstr "" - -#: libs/ardour/session_state.cc:1328 -msgid "Session: XML state has no mix groups section" -msgstr "" - -#: libs/ardour/session_state.cc:1335 -msgid "Session: XML state has no Tempo Map section" -msgstr "" - -#: libs/ardour/session_state.cc:1342 -msgid "Session: XML state has no routes section" -msgstr "" - -#: libs/ardour/session_state.cc:1349 -msgid "Session: XML state has no click section" -msgstr "" - -#: libs/ardour/session_state.cc:1384 -msgid "Session: cannot create Route from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1388 -msgid "Loaded track/bus %1" -msgstr "" - -#: libs/ardour/session_state.cc:1427 -msgid "Session: cannot create Region from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1431 -msgid "Can not load state for region '%1'" -msgstr "" - -#: libs/ardour/session_state.cc:1468 -msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)" -msgstr "" - -#: libs/ardour/session_state.cc:1476 -#: libs/ardour/session_state.cc:1497 -#: libs/ardour/session_state.cc:1517 -msgid "Session: XMLNode describing a AudioRegion references an unknown source id =%1" -msgstr "" - -#: libs/ardour/session_state.cc:1482 -#: libs/ardour/session_state.cc:1503 -#: libs/ardour/session_state.cc:1523 -msgid "Session: XMLNode describing a AudioRegion references a non-audio source id =%1" -msgstr "" - -#: libs/ardour/session_state.cc:1546 -msgid "Session: XMLNode describing an AudioRegion is missing some master sources; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1597 -msgid "cannot create new file from region name \"%1\" with ident = \"%2\": too many existing files with similar names" -msgstr "" - -#: libs/ardour/session_state.cc:1620 -msgid "Session: cannot create Source from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1625 -msgid "A sound file is missing. It will be replaced by silence." -msgstr "" - -#: libs/ardour/session_state.cc:1646 -msgid "Found a sound file that cannot be used by Ardour. Talk to the progammers." -msgstr "" - -#: libs/ardour/session_state.cc:1668 -msgid "Could not create mix templates directory \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:1682 -msgid "Template \"%1\" already exists - new version not created" -msgstr "" - -#: libs/ardour/session_state.cc:1689 -msgid "mix template not saved" -msgstr "" - -#: libs/ardour/session_state.cc:1748 -msgid "cannot create session directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1759 -msgid "cannot create sounds directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1768 -msgid "cannot create dead sounds directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1777 -msgid "cannot create peak file directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1909 -#: libs/ardour/session_state.cc:1930 -msgid "Session: cannot create Playlist from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1969 -msgid "Session: cannot create Named Selection from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:2171 -msgid "Unknown node \"%1\" found in Connections list from state file" -msgstr "" - -#: libs/ardour/session_state.cc:2982 -msgid "cannot remove dead sound file %1 (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:3098 -msgid "could not backup old history file, current history not saved." -msgstr "" - -#: libs/ardour/session_state.cc:3110 -msgid "history could not be saved to %1" -msgstr "" - -#: libs/ardour/session_state.cc:3117 -msgid "could not remove corrupt history file %1" -msgstr "" - -#: libs/ardour/session_state.cc:3121 -msgid "could not restore history file from backup %1" -msgstr "" - -#: libs/ardour/session_state.cc:3143 -msgid "Loading history from '%1'." -msgstr "" - -#: libs/ardour/session_state.cc:3150 -msgid "Could not understand session history file \"%1\"" -msgstr "" - -#: libs/ardour/session_state.cc:3193 -msgid "Couldn't figure out how to make a Command out of a %1 XMLNode." -msgstr "" - -#: libs/ardour/session_time.cc:483 -msgid "Unknown JACK transport state %1 in sync callback" -msgstr "" - -#: libs/ardour/session_transport.cc:119 -msgid "Cannot loop - no loop range defined" -msgstr "" - -#: libs/ardour/session_transport.cc:537 -msgid "" -"Seamless looping cannot be supported while Ardour is using JACK transport.\n" -"Recommend changing the configured options" -msgstr "" - -#: libs/ardour/session_transport.cc:822 -msgid "Global varispeed cannot be supported while Ardour is connected to JACK transport control" -msgstr "" - -#: libs/ardour/session_transport.cc:1015 -msgid "please stop the transport before adjusting slave settings" -msgstr "" - -#: libs/ardour/session_transport.cc:1048 -msgid "No MTC port defined: MTC slaving is impossible." -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:34 -msgid "WAV" -msgstr "WAV" - -#: libs/ardour/sndfile_helpers.cc:35 -msgid "AIFF" -msgstr "AIFF" - -#: libs/ardour/sndfile_helpers.cc:36 -msgid "CAF" -msgstr "CAF" - -#: libs/ardour/sndfile_helpers.cc:37 -msgid "W64 (64 bit WAV)" -msgstr "W64 (64 bit WAV)" - -#: libs/ardour/sndfile_helpers.cc:38 -msgid "raw (no header)" -msgstr "raw (brak nagłówka)" - -#: libs/ardour/sndfile_helpers.cc:43 -msgid ".wav" -msgstr ".wav" - -#: libs/ardour/sndfile_helpers.cc:44 -msgid ".aiff" -msgstr ".aiff" - -#: libs/ardour/sndfile_helpers.cc:45 -msgid ".caf" -msgstr ".caf" - -#: libs/ardour/sndfile_helpers.cc:46 -msgid ".w64" -msgstr ".w64" - -#: libs/ardour/sndfile_helpers.cc:47 -msgid ".raw" -msgstr ".raw" - -#: libs/ardour/sndfile_helpers.cc:60 -msgid "16 bit" -msgstr "16 bit" - -#: libs/ardour/sndfile_helpers.cc:61 -msgid "24 bit" -msgstr "24 bit" - -#: libs/ardour/sndfile_helpers.cc:62 -msgid "32 bit" -msgstr "32 bit" - -#: libs/ardour/sndfile_helpers.cc:63 -msgid "8 bit" -msgstr "8 bit" - -#: libs/ardour/sndfile_helpers.cc:64 -msgid "float" -msgstr "float" - -#: libs/ardour/sndfile_helpers.cc:77 -msgid "Little-endian (Intel)" -msgstr "Little-endian (Intel)" - -#: libs/ardour/sndfile_helpers.cc:78 -msgid "Big-endian (Mac)" -msgstr "Big-endian (Mac)" - -#: libs/ardour/sndfilesource.cc:149 -msgid "FileSource: cannot get host information for BWF header (%1)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:173 -msgid "cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:226 -msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:234 -msgid "SndFileSource: file only contains %1 channels; %2 is invalid as a channel number" -msgstr "" - -#: libs/ardour/sndfilesource.cc:332 -msgid "SndFileSource: could not seek to frame %1 within %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:377 -#: libs/ardour/sndfilesource.cc:412 -msgid "attempt to write a non-writable audio file source (%1)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:382 -#: libs/ardour/utils.cc:523 -#: libs/ardour/utils.cc:547 -#: libs/ardour/utils.cc:561 -#: libs/ardour/utils.cc:580 -msgid "programming error: %1 %2" -msgstr "" - -#: libs/ardour/sndfilesource.cc:516 -msgid "attempt to flush a non-writable audio file source (%1)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:526 -msgid "attempt to store broadcast info in a non-writable audio file source (%1)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:562 -#: libs/ardour/sndfilesource.cc:583 -msgid "cannot set broadcast info for audio file %1; Dropping broadcast info for this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:596 -msgid "%1: cannot seek to %2 (libsndfile error: %3" -msgstr "" - -#: libs/ardour/sndfilesource.cc:705 -msgid "SndFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:718 -#: libs/ardour/sndfilesource.cc:768 -#: libs/ardour/sndfilesource.cc:775 -msgid "SndFileSource: \"%1\" bad write (%2)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:798 -msgid "Filesource: start time is already set for existing file (%1): Cannot change start time." -msgstr "" - -#: libs/ardour/tempo.cc:71 -msgid "TempoSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:79 -msgid "TempoSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:86 -msgid "TempoSection XML node has no \"beats-per-minute\" property" -msgstr "" - -#: libs/ardour/tempo.cc:91 -msgid "TempoSection XML node has an illegal \"beats_per_minute\" value" -msgstr "" - -#: libs/ardour/tempo.cc:100 -msgid "TempoSection XML node has an illegal \"note-type\" value" -msgstr "" - -#: libs/ardour/tempo.cc:106 -msgid "TempoSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:147 -msgid "MeterSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:155 -msgid "MeterSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:162 -msgid "MeterSection XML node has no \"beats-per-bar\" property" -msgstr "" - -#: libs/ardour/tempo.cc:167 -msgid "MeterSection XML node has an illegal \"beats-per-bar\" value" -msgstr "" - -#: libs/ardour/tempo.cc:172 -msgid "MeterSection XML node has no \"note-type\" property" -msgstr "" - -#: libs/ardour/tempo.cc:177 -msgid "MeterSection XML node has an illegal \"note-type\" value" -msgstr "" - -#: libs/ardour/tempo.cc:182 -msgid "MeterSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:561 -msgid "no tempo sections defined in tempo map - cannot change tempo @ %1" -msgstr "" - -#: libs/ardour/tempo.cc:585 -#: libs/ardour/tempo.cc:601 -msgid "programming error: no tempo section in tempo map!" -msgstr "" - -#: libs/ardour/tempo.cc:644 -#: libs/ardour/tempo.cc:702 -msgid "programming error: unhandled MetricSection type" -msgstr "" - -#: libs/ardour/tempo.cc:1461 -#: libs/ardour/tempo.cc:1473 -msgid "Tempo map: could not set new state, restoring old one." -msgstr "" - -#: libs/ardour/utils.cc:300 -msgid "illegal or badly-formed string used for path (%1)" -msgstr "" - -#: libs/ardour/utils.cc:305 -msgid "path (%1) is ambiguous" -msgstr "" - -#: libs/ardour/utils.cc:367 -#: libs/ardour/utils.cc:391 -msgid "Splice Edit" -msgstr "Edycja klockowa" - -#: libs/ardour/utils.cc:369 -#: libs/ardour/utils.cc:384 -msgid "Slide Edit" -msgstr "Edycja Å›lizgowa" - -#: libs/ardour/utils.cc:371 -#: libs/ardour/utils.cc:387 -msgid "Lock Edit" -msgstr "Edycja zablokowana" - -#: libs/ardour/utils.cc:374 -msgid "programming error: unknown edit mode string \"%1\"" -msgstr "" - -#: libs/ardour/utils.cc:398 -#: libs/ardour/utils.cc:427 -msgid "Internal" -msgstr "Wew." - -#: libs/ardour/utils.cc:402 -#: libs/ardour/utils.cc:423 -msgid "MTC" -msgstr "MTC" - -#: libs/ardour/utils.cc:406 -#: libs/ardour/utils.cc:420 -msgid "JACK" -msgstr "JACK" - -#: libs/ardour/utils.cc:410 -msgid "programming error: unknown slave source string \"%1\"" -msgstr "" - -#: libs/ardour/vst_plugin.cc:167 -msgid "cannot create VST chunk directory: %1" -msgstr "" - -#: libs/ardour/vst_plugin.cc:175 -msgid "cannot check VST chunk directory: %1" -msgstr "" - -#: libs/ardour/vst_plugin.cc:181 -msgid "%1 exists but is not a directory" -msgstr "" - -#: libs/ardour/vst_plugin.cc:219 -msgid "Bad node sent to VSTPlugin::set_state" -msgstr "" - -#: libs/ardour/vst_plugin.cc:323 -#: libs/ardour/vst_plugin.cc:334 -msgid "no support for presets using chunks at this time" -msgstr "" - -#: libs/ardour/vst_plugin.cc:486 -msgid "VST: cannot load module from \"%1\"" -msgstr "" - -#: libs/ardour/vst_plugin.cc:491 -msgid "You asked ardour to not use any VST plugins" -msgstr "" - -#: libs/ardour/coreaudiosource.cc:80 -msgid "CoreAudioSource: cannot open file \"%1\" for %2" -msgstr "" - -#: libs/ardour/rb_effect.cc:155 -#: libs/ardour/rb_effect.cc:193 -msgid "tempoize: error reading data from %1 at %2 (wanted %3, got %4)" -msgstr "" - -#: libs/ardour/rb_effect.cc:218 -#: libs/ardour/rb_effect.cc:235 -msgid "error writing tempo-adjusted data to %1" -msgstr "" - -#: libs/ardour/rb_effect.cc:242 -msgid "timefx code failure. please notify ardour-developers." -msgstr "" - -#: libs/ardour/audio_unit.cc:104 -msgid "AudioUnit: Could not convert CAComponent to CAAudioUnit" -msgstr "" - -#: libs/ardour/audio_unit.cc:147 -msgid "AUPlugin: cannot set processing block size" -msgstr "" - -#: libs/ardour/audio_unit.cc:351 -msgid "AUPlugin: %1 cannot initialize plugin (err = %2)" -msgstr "" - -#: libs/ardour/audio_unit.cc:431 -msgid "AUPlugin: could not set stream format for %1/%2 (err = %3)" -msgstr "" - -#: libs/ardour/audio_unit.cc:476 -msgid "AUPlugin: %1 output_streams() called without any format set!" -msgstr "" - -#: libs/ardour/audio_unit.cc:488 -msgid "AUPlugin: input_streams() called without any format set!" -msgstr "" - -#: libs/ardour/audio_unit.cc:504 -msgid "AUPlugin: render callback called illegally!" -msgstr "" - -#~ msgid "%s/out %u" -#~ msgstr "%s/wyjÅ›cie %u" -#~ msgid "%s/in" -#~ msgstr "%s/wejÅ›cie" - diff --git a/libs/ardour/po/ru_RU.po b/libs/ardour/po/ru_RU.po deleted file mode 100644 index aeeb1bf547..0000000000 --- a/libs/ardour/po/ru_RU.po +++ /dev/null @@ -1,2000 +0,0 @@ -# Copyright (C) 2004 Paul Davis -# This file is distributed under the same license as the libardour package. -# Igor Blinov pitstop@nm.ru, 2004. -# -msgid "" -msgstr "" -"Project-Id-Version: libardour 0.716.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-06-29 21:03-0400\n" -"PO-Revision-Date: 2004-03-31 00:55+0300\n" -"Last-Translator: Igor Blinov pitstop@nm.ru\n" -"Language-Team: Russian\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=koi8-r\n" -"Content-Transfer-Encoding: 8bit\n" - -#: libs/ardour/audio_diskstream.cc:337 -msgid "AudioDiskstream: Session doesn't know about a Playlist called \"%1\"" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:342 -msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:433 -msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1114 libs/ardour/audio_diskstream.cc:1125 -msgid "" -"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1254 -msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1621 libs/ardour/audio_diskstream.cc:1638 -msgid "AudioDiskstream %1: cannot write to disk" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1698 -msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1796 -msgid "%1: could not create region for complete audio file" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1819 -msgid "AudioDiskstream: could not create region for captured audio!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1874 -#, fuzzy -msgid "programmer error: %1" -msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: " - -#: libs/ardour/audio_diskstream.cc:2146 -msgid "AudioDiskstream: channel %1 out of range" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2171 -msgid "%1:%2 new capture file not initialized correctly" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2404 -msgid "Location \"%1\" not valid for track loop (start >= end)" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2485 -msgid "%1: cannot restore pending capture source file %2" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2507 -msgid "%1: incorrect number of pending sources listed - ignoring them all" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2523 -msgid "%1: cannot create whole-file region from pending capture sources" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2535 -msgid "%1: cannot create region from pending capture sources" -msgstr "" - -#: libs/ardour/audio_library.cc:92 -msgid "channels" -msgstr "" - -#: libs/ardour/audio_library.cc:93 -#, fuzzy -msgid "samplerate" -msgstr "ÒÁÚÄÅÌÉÔØ" - -#: libs/ardour/audio_library.cc:94 -msgid "resolution" -msgstr "" - -#: libs/ardour/audio_library.cc:95 -msgid "format" -msgstr "" - -#: libs/ardour/audio_library.cc:102 -msgid "Could not open %1. Audio Library not saved" -msgstr "" - -#: libs/ardour/audio_playlist.cc:53 libs/ardour/audio_playlist.cc:63 -#: libs/ardour/audio_playlist.cc:74 libs/ardour/audio_playlist.cc:121 -#: libs/ardour/insert.cc:76 libs/ardour/insert.cc:95 libs/ardour/insert.cc:120 -#: libs/ardour/insert.cc:838 libs/ardour/insert.cc:846 libs/ardour/send.cc:39 -#: libs/ardour/send.cc:53 libs/ardour/send.cc:62 -#: libs/ardour/session_state.cc:1621 libs/ardour/session_state.cc:1667 -msgid "initial state" -msgstr "" - -#: libs/ardour/audio_playlist.cc:275 libs/ardour/audio_playlist.cc:769 -msgid "" -"programming error: non-audio Region passed to remove_overlap in audio " -"playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:402 -msgid "" -"programming error: non-audio Region tested for overlap in audio playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:878 -msgid "xfade change" -msgstr "" - -#: libs/ardour/audio_playlist.cc:933 -msgid "region modified" -msgstr "" - -#: libs/ardour/audio_track.cc:125 libs/ardour/io.cc:1716 -#: libs/ardour/io.cc:1826 -msgid "Unknown connection \"%1\" listed for input of %2" -msgstr "" - -#: libs/ardour/audio_track.cc:127 libs/ardour/io.cc:1718 -#: libs/ardour/io.cc:1828 -msgid "in 1" -msgstr "" - -#: libs/ardour/audio_track.cc:128 libs/ardour/io.cc:1719 -#: libs/ardour/io.cc:1829 -msgid "No input connections available as a replacement" -msgstr "" - -#: libs/ardour/audio_track.cc:132 libs/ardour/io.cc:1723 -#: libs/ardour/io.cc:1833 -msgid "Connection %1 was not available - \"in 1\" used instead" -msgstr "" - -#: libs/ardour/audio_track.cc:141 libs/ardour/io.cc:1842 -msgid "improper input channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/audio_track.cc:186 libs/ardour/audio_track.cc:199 -msgid "AudioTrack: diskstream \"%1\" not known by session" -msgstr "" - -#: libs/ardour/audio_track.cc:297 -msgid "" -"MIDI rec_enable control specification for %1 is incomplete, so it has been " -"ignored" -msgstr "" - -#: libs/ardour/audio_track.cc:309 -msgid "programming error: AudioTrack given state without diskstream!" -msgstr "" - -#: libs/ardour/audioengine.cc:144 -msgid "cannot activate JACK client" -msgstr "ÎÅ ÕÄÁÌÏÓØ ÁËÔÉ×ÉÒÏ×ÁÔØ ËÌÉÅÎÔÁ JACK ÓÅÒ×ÅÒÁ" - -#: libs/ardour/audioengine.cc:395 -msgid "register audio input port called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:426 -msgid "register audio output port called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:487 -msgid "connect called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:503 -msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)" -msgstr "" - -#: libs/ardour/audioengine.cc:516 libs/ardour/audioengine.cc:545 -msgid "disconnect called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:603 -msgid "get_port_by_name() called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:636 -msgid "get_ports called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:711 -msgid "get_nth_physical called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:739 -msgid "get_port_total_latency() called with no JACK client connection" -msgstr "" - -#: libs/ardour/audioengine.cc:745 -msgid "get_port_total_latency() called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:869 -msgid "Unable to connect to JACK server" -msgstr "" - -#: libs/ardour/audioengine.cc:872 -msgid "Could not connect to JACK server as \"%1\"" -msgstr "" - -#: libs/ardour/audioengine.cc:877 -msgid "JACK server started" -msgstr "" - -#: libs/ardour/audioengine.cc:911 -msgid "cannot shutdown connection to JACK" -msgstr "" - -#: libs/ardour/audioengine.cc:936 -msgid "failed to connect to JACK" -msgstr "" - -#: libs/ardour/audioengine.cc:952 -msgid "could not reregister %1" -msgstr "" - -#: libs/ardour/audioengine.cc:1009 -msgid "could not reconnect %1 and %2 (err = %3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:444 libs/ardour/session_state.cc:3095 -msgid "" -"there are already 1000 files with names like %1; versioning discontinued" -msgstr "" - -#: libs/ardour/audiofilesource.cc:458 libs/ardour/session_state.cc:3109 -msgid "cannot rename audio file source from %1 to %2 (%3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:465 libs/ardour/session_state.cc:3124 -msgid "cannot remove peakfile %1 for %2 (%3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:509 -msgid "FileSource: search path not set" -msgstr "" - -#: libs/ardour/audiofilesource.cc:533 -msgid "" -"FileSource: \"%1\" is ambigous when searching %2\n" -"\t" -msgstr "" - -#: libs/ardour/audiofilesource.cc:539 -msgid "Filesource: cannot find required file (%1): while searching %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:562 -msgid "Filesource: cannot find required file (%1): %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:567 -msgid "Filesource: cannot check for existing file (%1): %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:636 libs/ardour/insert.cc:525 -#: libs/ardour/sndfilesource.cc:113 -#, fuzzy -msgid "programming error: %1" -msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: " - -#: libs/ardour/audiofilesource.cc:641 -msgid "cannot rename audio file for %1 to %2" -msgstr "" - -#: libs/ardour/audiofilter.cc:45 -msgid "audiofilter: error creating name for new audio file based on %1" -msgstr "" - -#: libs/ardour/audiofilter.cc:58 -msgid "audiofilter: error creating new audio file %1 (%2)" -msgstr "" - -#: libs/ardour/audioregion.cc:857 libs/ardour/audioregion.cc:919 -msgid "fade in change" -msgstr "" - -#: libs/ardour/audioregion.cc:1349 -#, c-format -msgid "normalized to %.2fdB" -msgstr "" - -#: libs/ardour/audioregion.cc:1367 -msgid "envelope change" -msgstr "" - -#: libs/ardour/audiosource.cc:143 -msgid "poll on peak request pipe failed (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:150 -msgid "Error on peak thread request pipe" -msgstr "" - -#: libs/ardour/audiosource.cc:183 -msgid "Error reading from peak request pipe" -msgstr "" - -#: libs/ardour/audiosource.cc:215 libs/ardour/session_butler.cc:80 -#: libs/ardour/session_midi.cc:1183 -msgid "Cannot create transport request signal pipe (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:220 libs/ardour/audiosource.cc:225 -msgid "UI: cannot set O_NONBLOCK on peak request pipe (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:230 -msgid "AudioSource: could not create peak thread" -msgstr "" - -#: libs/ardour/audiosource.cc:308 -msgid "cannot rename peakfile for %1 from %2 to %3 (%4)" -msgstr "" - -#: libs/ardour/audiosource.cc:350 -#, fuzzy -msgid "AudioSource: cannot stat peakfile \"%1\"" -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\"" - -#: libs/ardour/audiosource.cc:451 -msgid "cannot read sample data for unscaled peak computation" -msgstr "" - -#: libs/ardour/audiosource.cc:472 libs/ardour/audiosource.cc:543 -#: libs/ardour/audiosource.cc:787 libs/ardour/audiosource.cc:878 -#, fuzzy -msgid "AudioSource: cannot open peakpath \"%1\" (%2)" -msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)" - -#: libs/ardour/audiosource.cc:644 -msgid "AudioSource[%1]: peak read - cannot read %2 samples at offset %3" -msgstr "" - -#: libs/ardour/audiosource.cc:798 -msgid "%1: could not write read raw data for peak computation (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:823 -msgid "%1: could not write peak file data (%2)" -msgstr "" - -#: libs/ardour/automation_event.cc:65 libs/ardour/location.cc:345 -#: libs/ardour/tempo.cc:226 -msgid "initial" -msgstr "" - -#: libs/ardour/automation_event.cc:232 -msgid "cleared" -msgstr "" - -#: libs/ardour/automation_event.cc:404 -msgid "added event" -msgstr "" - -#: libs/ardour/automation_event.cc:421 -#, fuzzy -msgid "removed event" -msgstr "ÕÄÁÌÉÔØ ÏÂÌÁÓÔØ" - -#: libs/ardour/automation_event.cc:436 -msgid "removed multiple events" -msgstr "" - -#: libs/ardour/automation_event.cc:467 libs/ardour/automation_event.cc:498 -#, fuzzy -msgid "removed range" -msgstr "ÕÄÁÌÉÔØ ÏÂÌÁÓÔØ" - -#: libs/ardour/automation_event.cc:528 -msgid "event range adjusted" -msgstr "" - -#: libs/ardour/automation_event.cc:550 -msgid "event adjusted" -msgstr "" - -#: libs/ardour/automation_event.cc:665 libs/ardour/automation_event.cc:770 -#: libs/ardour/panner.cc:1041 -#, fuzzy -msgid "programming error:" -msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: " - -#: libs/ardour/automation_event.cc:1079 -msgid "cut/copy/clear" -msgstr "" - -#: libs/ardour/automation_event.cc:1112 -msgid "copy" -msgstr "" - -#: libs/ardour/automation_event.cc:1180 libs/ardour/playlist.cc:939 -msgid "paste" -msgstr "×ÓÔÁ×ÉÔØ" - -#: libs/ardour/automation_event.cc:1235 -msgid "" -"automation list: no x-coordinate stored for control point (point ignored)" -msgstr "" - -#: libs/ardour/automation_event.cc:1241 -msgid "" -"automation list: no y-coordinate stored for control point (point ignored)" -msgstr "" - -#: libs/ardour/configuration.cc:80 -#, fuzzy -msgid "loading system configuration file %1" -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÒÏÇÒÁÍÍÙ \"%1\"" - -#: libs/ardour/configuration.cc:83 -msgid "Ardour: cannot read system configuration file \"%1\"" -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÒÏÇÒÁÍÍÙ \"%1\"" - -#: libs/ardour/configuration.cc:88 -msgid "Ardour: system configuration file \"%1\" not loaded successfully." -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÒÏÇÒÁÍÍÙ \"%1\"." - -#: libs/ardour/configuration.cc:105 -#, fuzzy -msgid "loading user configuration file %1" -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\"" - -#: libs/ardour/configuration.cc:108 -msgid "Ardour: cannot read configuration file \"%1\"" -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÐÒÏÞÉÔÁÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\"" - -#: libs/ardour/configuration.cc:113 -#, fuzzy -msgid "Ardour: user configuration file \"%1\" not loaded successfully." -msgstr "Ardour: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÐÏÌØÚÏ×ÁÔÅÌÑ \"%1\"." - -#: libs/ardour/configuration.cc:137 -#, fuzzy -msgid "Config file %1 not saved" -msgstr "æÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÎÅ ÓÏÈÒÁΣÎ" - -#: libs/ardour/configuration.cc:210 -msgid "ill-formed MIDI port specification in ardour rcfile (ignored)" -msgstr "" - -#: libs/ardour/connection.cc:183 -msgid "Node for Connection has no \"name\" property" -msgstr "" - -#: libs/ardour/connection.cc:191 -msgid "Node for Connection has no \"connections\" property" -msgstr "" - -#: libs/ardour/connection.cc:227 libs/ardour/io.cc:1902 -msgid "IO: badly formed string in XML node for inputs \"%1\"" -msgstr "" - -#: libs/ardour/connection.cc:232 libs/ardour/io.cc:1907 -msgid "bad input string in XML node \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:80 -msgid "control protocol name \"%1\" has no descriptor" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:85 -msgid "control protocol name \"%1\" could not be initialized" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:141 -msgid "Instantiating mandatory control protocol %1" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:175 -msgid "Control protocol %1 not usable" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:187 -msgid "Control surface protocol discovered: \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:205 -#, fuzzy -msgid "ControlProtocolManager: cannot load module \"%1\" (%2)" -msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)" - -#: libs/ardour/control_protocol_manager.cc:213 -msgid "ControlProtocolManager: module \"%1\" has no descriptor function." -msgstr "" - -#: libs/ardour/crossfade.cc:121 -msgid "Crossfade: no \"in\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:128 -msgid "Crossfade: no \"in\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:138 -msgid "Crossfade: no \"out\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:145 -msgid "Crossfade: no \"out\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:492 -msgid "active changed" -msgstr "" - -#: libs/ardour/crossfade.cc:741 -msgid "old-style crossfade information - no position information" -msgstr "" - -#: libs/ardour/curve.cc:112 libs/ardour/globals.cc:340 -#: libs/ardour/insert.cc:454 libs/ardour/session.cc:2466 -#: libs/ardour/session.cc:2518 -msgid "programming error: " -msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: " - -#: libs/ardour/cycle_timer.cc:37 -msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo" -msgstr "" - -#: libs/ardour/cycle_timer.cc:49 -msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo" -msgstr "" - -#: libs/ardour/cycle_timer.cc:72 -msgid "cannot locate cpu MHz in /proc/cpuinfo" -msgstr "" - -#: libs/ardour/destructive_filesource.cc:188 -msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)" -msgstr "" - -#: libs/ardour/destructive_filesource.cc:201 -#: libs/ardour/destructive_filesource.cc:243 -#: libs/ardour/destructive_filesource.cc:250 -msgid "DestructiveFileSource: \"%1\" bad write (%2)" -msgstr "" - -#: libs/ardour/globals.cc:109 -msgid "no MIDI ports specified: no MMC or MTC control possible" -msgstr "" - -#: libs/ardour/globals.cc:124 -msgid "MIDI port specifications for \"%1\" are not understandable." -msgstr "" - -#: libs/ardour/globals.cc:137 libs/ardour/globals.cc:141 -#: libs/ardour/globals.cc:145 -msgid "default" -msgstr "" - -#: libs/ardour/globals.cc:173 -msgid "No MMC control (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:179 -msgid "No MTC support (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:184 -msgid "No MIDI parameter support (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/import.cc:75 -msgid "Import: cannot open input sound file \"%1\"" -msgstr "" - -#: libs/ardour/import.cc:80 -msgid "resampling audio" -msgstr "" - -#: libs/ardour/import.cc:84 -msgid "Import: cannot open converted sound file \"%1\"" -msgstr "" - -#: libs/ardour/import.cc:89 -msgid "Import: error while resampling sound file \"%1\"" -msgstr "" - -#: libs/ardour/import.cc:148 -msgid "Session::import_audiofile: cannot open new file source for channel %1" -msgstr "" - -#: libs/ardour/import.cc:167 -msgid "converting audio" -msgstr "" - -#: libs/ardour/import.cc:199 -msgid "building region" -msgstr "" - -#: libs/ardour/import.cc:201 -msgid "building regions" -msgstr "" - -#: libs/ardour/import.cc:325 -msgid "Import: could not open temp file: %1" -msgstr "" - -#: libs/ardour/import.cc:334 -msgid "Import: src_new() failed : %1" -msgstr "" - -#: libs/ardour/import.cc:362 -msgid "Import: %1" -msgstr "éÍÐÏÒÔ: %1" - -#: libs/ardour/insert.cc:644 libs/ardour/insert.cc:936 -msgid "XML node describing insert is missing the `type' field" -msgstr "" - -#: libs/ardour/insert.cc:653 -msgid "unknown plugin type %1 in plugin insert state" -msgstr "" - -#: libs/ardour/insert.cc:665 -msgid "XML node describing insert is missing the `id' field" -msgstr "" - -#: libs/ardour/insert.cc:678 -msgid "" -"Found a reference to a plugin (\"%1\") that is unknown.\n" -"Perhaps it was removed or moved since it was last used." -msgstr "" - -#: libs/ardour/insert.cc:716 libs/ardour/insert.cc:953 -msgid "XML node describing insert is missing a Redirect node" -msgstr "" - -#: libs/ardour/insert.cc:721 -msgid "XML node describing a plugin insert is missing the `%1' information" -msgstr "" - -#: libs/ardour/insert.cc:745 -msgid "PluginInsert: Auto: no ladspa port number" -msgstr "" - -#: libs/ardour/insert.cc:752 -msgid "PluginInsert: Auto: port id out of range" -msgstr "" - -#: libs/ardour/insert.cc:768 -msgid "XML node describing a port automation is missing the `%1' information" -msgstr "" - -#: libs/ardour/insert.cc:854 -msgid "PortInsert: cannot add input port" -msgstr "" - -#: libs/ardour/insert.cc:859 -msgid "PortInsert: cannot add output port" -msgstr "" - -#: libs/ardour/insert.cc:941 -msgid "non-port insert XML used for port plugin insert" -msgstr "" - -#: libs/ardour/io.cc:598 -msgid "IO: cannot disconnect input port %1 from %2" -msgstr "" - -#: libs/ardour/io.cc:666 -msgid "IO: cannot disconnect output port %1 from %2" -msgstr "" - -#: libs/ardour/io.cc:807 libs/ardour/io.cc:1151 libs/ardour/io.cc:1277 -#, c-format -msgid "%s/out" -msgstr "" - -#: libs/ardour/io.cc:809 libs/ardour/io.cc:1153 libs/ardour/io.cc:1279 -#: libs/ardour/io.cc:2849 -#, c-format -msgid "%s/out %u" -msgstr "" - -#: libs/ardour/io.cc:813 libs/ardour/io.cc:1158 libs/ardour/io.cc:1283 -msgid "IO: cannot register output port %1" -msgstr "" - -#: libs/ardour/io.cc:908 libs/ardour/io.cc:1011 libs/ardour/io.cc:1117 -#, c-format -msgid "%s/in" -msgstr "" - -#: libs/ardour/io.cc:910 libs/ardour/io.cc:1014 libs/ardour/io.cc:1120 -#: libs/ardour/io.cc:2819 -#, c-format -msgid "%s/in %u" -msgstr "" - -#: libs/ardour/io.cc:914 libs/ardour/io.cc:1020 libs/ardour/io.cc:1125 -msgid "IO: cannot register input port %1" -msgstr "" - -#: libs/ardour/io.cc:1541 -msgid "IO::connecting_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1564 -msgid "IO::ports_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1594 -msgid "incorrect XML node \"%1\" passed to IO object" -msgstr "" - -#: libs/ardour/io.cc:1649 -msgid "" -"MIDI gain control specification for %1 is incomplete, so it has been ignored" -msgstr "" - -#: libs/ardour/io.cc:1739 libs/ardour/io.cc:1851 -msgid "Unknown connection \"%1\" listed for output of %2" -msgstr "" - -#: libs/ardour/io.cc:1741 libs/ardour/io.cc:1853 -msgid "out 1" -msgstr "" - -#: libs/ardour/io.cc:1742 libs/ardour/io.cc:1854 -msgid "No output connections available as a replacement" -msgstr "" - -#: libs/ardour/io.cc:1746 libs/ardour/io.cc:1858 -msgid "Connection %1 was not available - \"out 1\" used instead" -msgstr "" - -#: libs/ardour/io.cc:1760 -msgid "%1: cannot create I/O ports" -msgstr "" - -#: libs/ardour/io.cc:1867 -msgid "improper output channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/io.cc:1952 -msgid "IO: badly formed string in XML node for outputs \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:1957 -msgid "IO: bad output string in XML node \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2525 -msgid "%1: could not open automation event file \"%2\"" -msgstr "" - -#: libs/ardour/io.cc:2564 -msgid "%1: cannot open automation event file \"%2\"" -msgstr "" - -#: libs/ardour/io.cc:2579 -msgid "badly formed version number in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2583 -msgid "no version information in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2588 -msgid "mismatched automation event file version (%1)" -msgstr "" - -#: libs/ardour/io.cc:2596 -msgid "badly formatted automation event record at line %1 of %2 (ignored)" -msgstr "" - -#: libs/ardour/io.cc:2616 -msgid "dubious automation event found (and ignored)" -msgstr "" - -#: libs/ardour/io.cc:2620 libs/ardour/panner.cc:438 -#: libs/ardour/redirect.cc:148 -msgid "loaded from disk" -msgstr "" - -#: libs/ardour/io.cc:2791 -msgid "automation write/touch" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:87 -msgid "LADSPA: module has no descriptor function." -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:92 -msgid "LADSPA: plugin has gone away since discovery!" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:99 -msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:329 -msgid "" -"illegal parameter number used with plugin \"%1\". This mayindicate a change " -"in the plugin design, and presets may beinvalid" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:430 -msgid "Bad node sent to LadspaPlugin::set_state" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:443 -msgid "LADSPA: no ladspa port number" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:449 -msgid "LADSPA: no ladspa port data" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:498 -msgid "" -"LADSPA LadspaPlugin MIDI control specification for port %1 is incomplete, so " -"it has been ignored" -msgstr "" - -#: libs/ardour/location.cc:269 -msgid "incorrect XML node passed to Location::set_state" -msgstr "" - -#: libs/ardour/location.cc:276 -msgid "XML node for Location has no name information" -msgstr "" - -#: libs/ardour/location.cc:283 -msgid "XML node for Location has no start information" -msgstr "" - -#: libs/ardour/location.cc:294 -msgid "XML node for Location has no end information" -msgstr "" - -#: libs/ardour/location.cc:303 -msgid "XML node for Location has no flags information" -msgstr "" - -#: libs/ardour/location.cc:391 -msgid "Locations: attempt to use unknown location as selected location" -msgstr "" - -#: libs/ardour/location.cc:418 libs/ardour/playlist.cc:1187 -msgid "clear" -msgstr "" - -#: libs/ardour/location.cc:443 -msgid "clear markers" -msgstr "" - -#: libs/ardour/location.cc:471 -msgid "clear ranges" -msgstr "" - -#: libs/ardour/location.cc:489 -msgid "add" -msgstr "ÄÏÂÁ×ÉÔØ" - -#: libs/ardour/location.cc:527 -msgid "remove" -msgstr "ÕÄÁÌÉÔØ" - -#: libs/ardour/location.cc:567 -msgid "incorrect XML mode passed to Locations::set_state" -msgstr "" - -#: libs/ardour/mtc_slave.cc:196 -msgid "MTC Slave: atomic read of current time failed, sleeping!" -msgstr "" - -#: libs/ardour/named_selection.cc:77 -msgid "Chunk %1 uses an unknown playlist \"%2\"" -msgstr "" - -#: libs/ardour/named_selection.cc:80 -msgid "Chunk %1 contains misformed playlist information" -msgstr "" - -#: libs/ardour/panner.cc:256 -msgid "MIDI pan control specification is incomplete, so it has been ignored" -msgstr "" - -#: libs/ardour/panner.cc:361 -msgid "automation write pass" -msgstr "" - -#: libs/ardour/panner.cc:401 -#, c-format -msgid "error writing pan automation file (%s)" -msgstr "" - -#: libs/ardour/panner.cc:429 -msgid "" -"badly formatted pan automation event record at line %1 of %2 (ignored) [%3]" -msgstr "" - -#: libs/ardour/panner.cc:944 -msgid "badly-formed positional data for Multi2dPanner - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1237 -msgid "cannot open pan automation file \"%1\" for saving (%s)" -msgstr "" - -#: libs/ardour/panner.cc:1273 -msgid "cannot open pan automation file %1 (%2)" -msgstr "" - -#: libs/ardour/panner.cc:1286 -msgid "badly formed version number in pan automation event file \"%1\"" -msgstr "" - -#: libs/ardour/panner.cc:1290 -msgid "" -"no version information in pan automation event file \"%1\" (first line = %2)" -msgstr "" - -#: libs/ardour/panner.cc:1296 -msgid "mismatched pan automation event file version (%1)" -msgstr "" - -#: libs/ardour/panner.cc:1310 -msgid "too many panner states found in pan automation file %1" -msgstr "" - -#: libs/ardour/panner.cc:1451 -msgid "Unknown panner plugin \"%1\" found in pan state - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1457 -msgid "panner plugin node has no type information!" -msgstr "" - -#: libs/ardour/playlist.cc:253 -msgid "playlist const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:259 -msgid "playlist non-const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:499 -msgid "add region" -msgstr "ÄÏÂÁ×ÉÔØ ÏÂÌÁÓÔØ" - -#: libs/ardour/playlist.cc:554 -msgid "replace region" -msgstr "ÚÁÍÅÎÉÔØ ÏÂÌÁÓÔØ" - -#: libs/ardour/playlist.cc:567 -msgid "remove region" -msgstr "ÕÄÁÌÉÔØ ÏÂÌÁÓÔØ" - -#: libs/ardour/playlist.cc:614 -msgid "separate" -msgstr "ÒÁÚÄÅÌÉÔØ" - -#: libs/ardour/playlist.cc:878 -msgid "cut" -msgstr "×ÙÒÅÚÁÔØ" - -#: libs/ardour/playlist.cc:968 -msgid "duplicate" -msgstr "ÒÁÚÍÎÏÖÉÔØ" - -#: libs/ardour/playlist.cc:1023 -msgid "split" -msgstr "ÓËÌÅÉÔØ" - -#: libs/ardour/playlist.cc:1100 -msgid "%1: bounds changed received for region (%2)not in playlist" -msgstr "" - -#: libs/ardour/playlist.cc:1361 -msgid "Playlist: cannot create region from state file" -msgstr "" - -#: libs/ardour/playlist.cc:1721 -msgid "nudged" -msgstr "" - -#: libs/ardour/playlist_factory.cc:49 libs/ardour/playlist_factory.cc:64 -msgid "" -"programming error: Playlist::createRegion called with unknown Region type" -msgstr "" - -#: libs/ardour/playlist_factory.cc:86 -msgid "" -"programming error: Playlist::copyPlaylist called with unknown Playlist type" -msgstr "" - -#: libs/ardour/plugin.cc:328 -msgid "Could not locate HOME. Preset not saved." -msgstr "" - -#: libs/ardour/plugin.cc:338 libs/ardour/plugin.cc:344 -msgid "Could not create %1. Preset not saved. (%2)" -msgstr "" - -#: libs/ardour/plugin.cc:349 -msgid "Error saving presets file %1." -msgstr "" - -#: libs/ardour/plugin_manager.cc:194 -msgid "Could not parse rdf file: %1" -msgstr "" - -#: libs/ardour/plugin_manager.cc:235 -msgid "LADSPA: cannot load module \"%1\" (%2)" -msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)" - -#: libs/ardour/plugin_manager.cc:242 -msgid "LADSPA: module \"%1\" has no descriptor function." -msgstr "" - -#: libs/ardour/plugin_manager.cc:297 -#, fuzzy -msgid "VST: cannot load module from \"%1\"" -msgstr "LADSPA: ÎÅ ÕÄÁÌÏÓØ ÚÁÇÒÕÚÉÔØ ÍÏÄÕÌØ \"%1\" (%2)" - -#: libs/ardour/plugin_manager.cc:302 -msgid "You asked ardour to not use any VST plugins" -msgstr "" - -#: libs/ardour/plugin_manager.cc:305 -msgid "This version of ardour has no support for VST plugins" -msgstr "" - -#: libs/ardour/plugin_manager.cc:312 -msgid "LADSPA: cannot load module from \"%1\"" -msgstr "" - -#: libs/ardour/plugin_manager.cc:374 libs/ardour/plugin_manager.cc:386 -msgid "Unknown" -msgstr "" - -#: libs/ardour/plugin_manager.cc:464 -msgid "" -"VST plugin %1 does not support processReplacing, and so cannot be used in " -"ardour at this time" -msgstr "" - -#: libs/ardour/recent_sessions.cc:44 -msgid "cannot open recent session file %1 (%2)" -msgstr "" - -#: libs/ardour/redirect.cc:77 -msgid "programming error: unknown Redirect type in Redirect::Clone!\n" -msgstr "" - -#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:203 -msgid "pre" -msgstr "ÐÒÅ" - -#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:206 -msgid "post" -msgstr "ÐÏÓÔ" - -#: libs/ardour/redirect.cc:107 -msgid "Redirect: unknown placement string \"%1\" (ignored)" -msgstr "" - -#: libs/ardour/redirect.cc:125 -msgid "%1: cannot open %2 to load automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:154 -msgid "%1: cannot load automation data from %2" -msgstr "" - -#: libs/ardour/redirect.cc:175 -msgid "%1: cannot open %2 to store automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:194 libs/ardour/redirect.cc:201 -msgid "%1: could not save automation state to %2" -msgstr "" - -#: libs/ardour/redirect.cc:246 -msgid "Could not get state from Redirect (%1). Problem with save_automation" -msgstr "" - -#: libs/ardour/redirect.cc:296 -msgid "incorrect XML node \"%1\" passed to Redirect object" -msgstr "" - -#: libs/ardour/redirect.cc:318 -msgid "%1: Automation node has no path property" -msgstr "" - -#: libs/ardour/redirect.cc:343 -msgid "XML node describing an IO is missing an IO node" -msgstr "" - -#: libs/ardour/redirect.cc:348 -msgid "XML node describing a redirect is missing the `active' field" -msgstr "" - -#: libs/ardour/redirect.cc:358 -msgid "XML node describing a redirect is missing the `placement' field" -msgstr "" - -#: libs/ardour/redirect.cc:467 -msgid "active_changed" -msgstr "" - -#: libs/ardour/region.cc:885 -msgid "Session: XMLNode describing a Region is incomplete (no id)" -msgstr "" - -#: libs/ardour/region.cc:892 -msgid "Session: XMLNode describing a Region is incomplete (no name)" -msgstr "" - -#: libs/ardour/route.cc:79 libs/ardour/session.cc:1554 -#: libs/ardour/session.cc:1560 libs/ardour/session.cc:3093 -msgid "signal" -msgstr "" - -#: libs/ardour/route.cc:1430 -msgid "Could not get state of route. Problem with save_automation" -msgstr "" - -#: libs/ardour/route.cc:1482 -msgid "Send construction failed" -msgstr "" - -#: libs/ardour/route.cc:1504 -msgid "unknown Insert type \"%1\"; ignored" -msgstr "" - -#: libs/ardour/route.cc:1510 -msgid "Insert XML node has no type property" -msgstr "" - -#: libs/ardour/route.cc:1515 -msgid "insert could not be created. Ignored." -msgstr "" - -#: libs/ardour/route.cc:1533 -msgid "Bad node sent to Route::set_state() [%1]" -msgstr "" - -#: libs/ardour/route.cc:1592 -msgid "Route %1: unknown edit group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:1608 libs/ardour/route.cc:1612 -msgid "badly formed order key string in state file! [%1] ... ignored." -msgstr "" - -#: libs/ardour/route.cc:1693 libs/ardour/route.cc:1820 -msgid "[control]" -msgstr "" - -#: libs/ardour/route.cc:1713 -msgid "Route %1: unknown mix group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:1742 libs/ardour/route.cc:1750 -msgid "" -"MIDI mute control specification for %1 is incomplete, so it has been ignored" -msgstr "" - -#: libs/ardour/send.cc:99 -msgid "XML node describing a send is missing a Redirect node" -msgstr "" - -#: libs/ardour/session.cc:103 -msgid "Could not resolve path: %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:115 -msgid "cannot check session path %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:145 -msgid "cannot check statefile %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:181 -msgid "%1 is not an Ardour snapshot file" -msgstr "" - -#: libs/ardour/session.cc:198 -msgid "cannot determine current working directory (%1)" -msgstr "" - -#: libs/ardour/session.cc:215 -msgid "unknown file type for session %1" -msgstr "" - -#: libs/ardour/session.cc:320 -msgid "monitor" -msgstr "ÍÏÎÉÔÏÒ" - -#: libs/ardour/session.cc:327 -msgid "master" -msgstr "ÍÁÓÔÅÒ" - -#: libs/ardour/session.cc:611 -msgid "could not setup Click I/O" -msgstr "" - -#: libs/ardour/session.cc:632 -msgid "cannot setup Click I/O" -msgstr "" - -#: libs/ardour/session.cc:654 -msgid "cannot create Auditioner: no auditioning of regions possible" -msgstr "" - -#: libs/ardour/session.cc:666 -#, c-format -msgid "out %" -msgstr "" - -#: libs/ardour/session.cc:678 -#, c-format -msgid "in %" -msgstr "" - -#: libs/ardour/session.cc:692 -#, c-format -msgid "out %+%" -msgstr "" - -#: libs/ardour/session.cc:706 -#, c-format -msgid "in %+%" -msgstr "" - -#: libs/ardour/session.cc:739 -msgid "cannot setup master inputs" -msgstr "" - -#: libs/ardour/session.cc:747 -msgid "cannot setup master outputs" -msgstr "" - -#: libs/ardour/session.cc:758 -#, fuzzy -msgid "Master Out" -msgstr "ÍÁÓÔÅÒ" - -#: libs/ardour/session.cc:830 -msgid "cannot setup control inputs" -msgstr "" - -#: libs/ardour/session.cc:838 -msgid "cannot set up master outputs" -msgstr "" - -#: libs/ardour/session.cc:1110 -msgid "Session: you can't use that location for auto punch (start <= end)" -msgstr "" - -#: libs/ardour/session.cc:1189 -msgid "Session: you can't use a mark for auto loop" -msgstr "" - -#: libs/ardour/session.cc:1572 -msgid "feedback loop setup between %1 and %2" -msgstr "" - -#: libs/ardour/session.cc:1724 libs/ardour/session.cc:1821 -msgid "cannot configure %1 in/%2 out configuration for new audio track" -msgstr "" - -#: libs/ardour/session.cc:1780 -msgid "Session: could not create new audio track." -msgstr "" - -#: libs/ardour/session.cc:1870 -msgid "Session: could not create new route." -msgstr "" - -#: libs/ardour/session.cc:2354 -msgid "cannot create new name for region \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:2418 -msgid "too many regions with names like %1" -msgstr "" - -#: libs/ardour/session.cc:2883 -msgid "There are already %1 recordings for %2, which I consider too many." -msgstr "" - -#: libs/ardour/session.cc:3258 -msgid "programming error: unknown type of Insert created!" -msgstr "" - -#: libs/ardour/session.cc:3264 -msgid "programming error: unknown type of Redirect created!" -msgstr "" - -#: libs/ardour/session.cc:3287 -msgid "programming error: unknown type of Insert deleted!" -msgstr "" - -#: libs/ardour/session.cc:3293 -msgid "programming error: unknown type of Redirect deleted!" -msgstr "" - -#: libs/ardour/session.cc:3636 -msgid "too many bounced versions of playlist \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:3649 -msgid "cannot create new audio file \"%1\" for %2" -msgstr "" - -#: libs/ardour/session_butler.cc:85 libs/ardour/session_butler.cc:90 -msgid "UI: cannot set O_NONBLOCK on butler request pipe (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:95 -msgid "Session: could not create butler thread" -msgstr "" - -#: libs/ardour/session_butler.cc:189 -msgid "poll on butler request pipe failed (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:196 -msgid "Error on butler thread request pipe" -msgstr "" - -#: libs/ardour/session_butler.cc:238 -msgid "Error reading from butler request pipe" -msgstr "" - -#: libs/ardour/session_butler.cc:275 -msgid "Butler read ahead failure on dstream %1" -msgstr "" - -#: libs/ardour/session_butler.cc:319 -msgid "Butler write-behind failure on dstream %1" -msgstr "" - -#: libs/ardour/session_click.cc:158 -msgid "cannot open click soundfile %1 (%2)" -msgstr "" - -#: libs/ardour/session_click.cc:167 -msgid "cannot read data from click soundfile" -msgstr "" - -#: libs/ardour/session_click.cc:192 -msgid "cannot open click emphasis soundfile %1 (%2)" -msgstr "" - -#: libs/ardour/session_click.cc:200 -msgid "cannot read data from click emphasis soundfile" -msgstr "" - -#: libs/ardour/session_events.cc:161 -msgid "Session: cannot have two events of type %1 at the same frame (%2)." -msgstr "" - -#: libs/ardour/session_events.cc:422 -msgid "Programming error: illegal event type in process_event (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:63 -msgid "Export: no output file specified" -msgstr "" - -#: libs/ardour/session_export.cc:164 libs/ardour/session_export.cc:169 -msgid "illegal frame range in export specification" -msgstr "" - -#: libs/ardour/session_export.cc:174 -msgid "Bad data width size. Report me!" -msgstr "" - -#: libs/ardour/session_export.cc:204 -msgid "Export: cannot open output file \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_export.cc:214 -msgid "cannot initialize sample rate conversion: %1" -msgstr "" - -#: libs/ardour/session_export.cc:316 -msgid "an error occured during sample rate conversion: %1" -msgstr "" - -#: libs/ardour/session_export.cc:327 -msgid "warning, leftover frames overflowed, glitches might occur in output" -msgstr "" - -#: libs/ardour/session_export.cc:418 -msgid "Export: could not write data to output file (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:500 -msgid "%1: cannot seek to %2 for export" -msgstr "" - -#: libs/ardour/session_midi.cc:200 -msgid "Ardour is slaved to MTC - port cannot be reset" -msgstr "" - -#: libs/ardour/session_midi.cc:215 -msgid "unknown port %1 requested for MTC" -msgstr "" - -#: libs/ardour/session_midi.cc:541 -msgid "Error reading from MIDI port %1" -msgstr "" - -#: libs/ardour/session_midi.cc:914 -msgid "Session: could not send full MIDI time code" -msgstr "" - -#: libs/ardour/session_midi.cc:973 -msgid "Session: cannot send quarter-frame MTC message (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1081 -msgid "MMC: cannot send command %1%2%3" -msgstr "" - -#: libs/ardour/session_midi.cc:1188 -msgid "UI: cannot set O_NONBLOCK on signal read pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1193 -msgid "UI: cannot set O_NONBLOCK on signal write pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1198 -msgid "Session: could not create transport thread" -msgstr "" - -#: libs/ardour/session_midi.cc:1227 -msgid "cannot send signal to midi thread! (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1322 -msgid "MIDI thread poll failed (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1334 -msgid "Error on transport thread request pipe" -msgstr "" - -#: libs/ardour/session_midi.cc:1361 -msgid "Error reading from transport request pipe" -msgstr "" - -#: libs/ardour/session_process.cc:104 -msgid "Session: error in no roll for %1" -msgstr "" - -#: libs/ardour/session_state.cc:101 -msgid "Could not use path %1 (%s)" -msgstr "" - -#: libs/ardour/session_state.cc:129 -msgid "end" -msgstr "" - -#: libs/ardour/session_state.cc:130 -#, fuzzy -msgid "start" -msgstr "ÒÁÚÄÅÌÉÔØ" - -#: libs/ardour/session_state.cc:502 -msgid "Session: cannot create session dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:513 -msgid "Session: cannot create session peakfile dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:522 -msgid "Session: cannot create session sounds dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:531 -msgid "Session: cannot create session tape dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:540 -msgid "Session: cannot create session dead sounds dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:549 -msgid "Session: cannot create session automation dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:580 -msgid "Could not open %1 for writing mix template" -msgstr "" - -#: libs/ardour/session_state.cc:586 -msgid "Could not open mix template %1 for reading" -msgstr "" - -#: libs/ardour/session_state.cc:593 -msgid "Session already exists. Not overwriting" -msgstr "" - -#: libs/ardour/session_state.cc:636 -msgid "Session: could not load diskstream via XML state" -msgstr "" - -#: libs/ardour/session_state.cc:685 -msgid "could not backup old state file, current state not saved." -msgstr "" - -#: libs/ardour/session_state.cc:698 -msgid "state could not be saved to %1" -msgstr "" - -#: libs/ardour/session_state.cc:705 -msgid "could not remove corrupt state file %1" -msgstr "" - -#: libs/ardour/session_state.cc:709 -msgid "could not restore state file from backup %1" -msgstr "" - -#: libs/ardour/session_state.cc:778 -msgid "%1: session state information file \"%2\" doesn't exist!" -msgstr "" - -#: libs/ardour/session_state.cc:789 -msgid "Could not understand ardour file %1" -msgstr "" - -#: libs/ardour/session_state.cc:1493 -msgid "programming error: Session: incorrect XML node sent to set_state()" -msgstr "" - -#: libs/ardour/session_state.cc:1539 -msgid "Session: XML state has no options section" -msgstr "" - -#: libs/ardour/session_state.cc:1544 -msgid "Session: XML state has no sources section" -msgstr "" - -#: libs/ardour/session_state.cc:1551 -msgid "Session: XML state has no Regions section" -msgstr "" - -#: libs/ardour/session_state.cc:1558 -msgid "Session: XML state has no playlists section" -msgstr "" - -#: libs/ardour/session_state.cc:1577 -msgid "Session: XML state has no diskstreams section" -msgstr "" - -#: libs/ardour/session_state.cc:1584 -msgid "Session: XML state has no connections section" -msgstr "" - -#: libs/ardour/session_state.cc:1591 -msgid "Session: XML state has no locations section" -msgstr "" - -#: libs/ardour/session_state.cc:1624 -msgid "Session: XML state has no edit groups section" -msgstr "" - -#: libs/ardour/session_state.cc:1631 -msgid "Session: XML state has no mix groups section" -msgstr "" - -#: libs/ardour/session_state.cc:1638 -msgid "Session: XML state has no Tempo Map section" -msgstr "" - -#: libs/ardour/session_state.cc:1645 -msgid "Session: XML state has no routes section" -msgstr "" - -#: libs/ardour/session_state.cc:1652 -msgid "Session: XML state has no click section" -msgstr "" - -#: libs/ardour/session_state.cc:1697 -msgid "Session: cannot create Route from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1735 -msgid "Session: cannot create Region from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1764 -msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)" -msgstr "" - -#: libs/ardour/session_state.cc:1772 libs/ardour/session_state.cc:1792 -msgid "" -"Session: XMLNode describing a AudioRegion references an unknown source id =%1" -msgstr "" - -#: libs/ardour/session_state.cc:1778 libs/ardour/session_state.cc:1798 -msgid "" -"Session: XMLNode describing a AudioRegion references a non-audio source id =%" -"1" -msgstr "" - -#: libs/ardour/session_state.cc:1868 -msgid "Session: cannot create Source from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1889 -msgid "" -"Found a sound file that cannot be used by Ardour. Talk to the progammers." -msgstr "" - -#: libs/ardour/session_state.cc:1913 -msgid "Could not create mix templates directory \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:1927 -msgid "Template \"%1\" already exists - new version not created" -msgstr "" - -#: libs/ardour/session_state.cc:1934 -msgid "mix template not saved" -msgstr "" - -#: libs/ardour/session_state.cc:1994 -msgid "cannot create session directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:2007 -msgid "cannot create sounds directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:2018 -msgid "cannot create dead sounds directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:2029 -msgid "cannot create peak file directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:2168 libs/ardour/session_state.cc:2189 -msgid "Session: cannot create Playlist from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:2228 -msgid "Session: cannot create Named Selection from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:2360 -msgid "Unknown node \"%1\" found in Connections list from state file" -msgstr "" - -#: libs/ardour/session_state.cc:3197 -msgid "cannot remove dead sound file %1 (%2)" -msgstr "" - -#: libs/ardour/session_time.cc:374 -msgid "Unknown JACK transport state %1 in sync callback" -msgstr "" - -#: libs/ardour/session_timefx.cc:77 -msgid "tempoize: error creating name for new audio file based on %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:88 -msgid "tempoize: error creating new audio file %1 (%2)" -msgstr "" - -#: libs/ardour/session_timefx.cc:114 -msgid "tempoize: error reading data from %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:127 libs/ardour/session_timefx.cc:139 -msgid "error writing tempo-adjusted data to %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:145 -msgid "timefx code failure. please notify ardour-developers." -msgstr "" - -#: libs/ardour/session_transport.cc:117 -msgid "Cannot loop - no loop range defined" -msgstr "" - -#: libs/ardour/session_transport.cc:479 -msgid "" -"Seamless looping cannot be supported while Ardour is using JACK transport.\n" -"Recommend changing the configured options" -msgstr "" - -#: libs/ardour/session_transport.cc:755 -msgid "" -"Global varispeed cannot be supported while Ardour is connected to JACK " -"transport control" -msgstr "" - -#: libs/ardour/session_transport.cc:955 -msgid "please stop the transport before adjusting slave settings" -msgstr "" - -#: libs/ardour/session_transport.cc:991 -msgid "No MTC port defined: MTC slaving is impossible." -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:15 -msgid "WAV" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:16 -msgid "AIFF" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:17 -msgid "raw (no header)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:18 -msgid "PAF (Ensoniq Paris)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:19 -msgid "AU (Sun/NeXT)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:20 -msgid "IRCAM" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:21 -msgid "W64 (64 bit WAV)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:26 -msgid ".wav" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:27 -msgid ".aiff" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:28 -msgid ".raw" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:29 -msgid ".paf" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:30 -msgid ".au" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:31 -msgid ".ircam" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:32 -msgid ".w64" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:47 -msgid "16 bit" -msgstr "16 ÂÉÔ" - -#: libs/ardour/sndfile_helpers.cc:48 -msgid "24 bit" -msgstr "24 ÂÉÔÁ" - -#: libs/ardour/sndfile_helpers.cc:49 -msgid "32 bit" -msgstr "32 ÂÉÔÁ" - -#: libs/ardour/sndfile_helpers.cc:50 -msgid "8 bit" -msgstr "8 ÂÉÔ" - -#: libs/ardour/sndfile_helpers.cc:51 -msgid "float" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:64 -msgid "Little-endian (Intel)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:65 -msgid "Big-endian (Mac)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:147 -msgid "FileSource: cannot get host information for BWF header (%1)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:169 -msgid "" -"cannot set broadcast info for audio file %1 (%2); dropping broadcast info " -"for this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:220 -msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:226 -msgid "" -"SndFileSource: file only contains %1 channels; %2 is invalid as a channel " -"number" -msgstr "" - -#: libs/ardour/sndfilesource.cc:327 -msgid "SndFileSource: could not seek to frame %1 within %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:378 -#, fuzzy -msgid "programming error: %1 %2" -msgstr "ÏÛÉÂËÁ ÐÒÏÇÒÁÍÍÙ: " - -#: libs/ardour/sndfilesource.cc:487 libs/ardour/sndfilesource.cc:533 -msgid "" -"cannot set broadcast info for audio file %1; Dropping broadcast info for " -"this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:544 -msgid "%1: cannot seek to %2" -msgstr "" - -#: libs/ardour/state_manager.cc:47 -msgid "cleared history" -msgstr "" - -#: libs/ardour/state_manager.cc:60 -msgid "" -"programming error: illegal state ID (%1) passed to StateManager::set_state() " -"(range = 0-%2)" -msgstr "" - -#: libs/ardour/stateful.cc:102 -msgid "Error: could not write %1" -msgstr "" - -#: libs/ardour/stateful.cc:116 -msgid "Could not understand XML file %1" -msgstr "" - -#: libs/ardour/tempo.cc:67 -msgid "TempoSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:75 -msgid "TempoSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:82 -msgid "TempoSection XML node has no \"beats-per-minute\" property" -msgstr "" - -#: libs/ardour/tempo.cc:87 -msgid "TempoSection XML node has an illegal \"beats_per_minute\" value" -msgstr "" - -#: libs/ardour/tempo.cc:92 -msgid "TempoSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:131 -msgid "MeterSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:139 -msgid "MeterSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:146 -msgid "MeterSection XML node has no \"beats-per-bar\" property" -msgstr "" - -#: libs/ardour/tempo.cc:151 -msgid "MeterSection XML node has an illegal \"beats-per-bar\" value" -msgstr "" - -#: libs/ardour/tempo.cc:156 -msgid "MeterSection XML node has no \"note-type\" property" -msgstr "" - -#: libs/ardour/tempo.cc:161 -msgid "MeterSection XML node has an illegal \"note-type\" value" -msgstr "" - -#: libs/ardour/tempo.cc:166 -msgid "MeterSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:259 -msgid "move metric" -msgstr "" - -#: libs/ardour/tempo.cc:330 -msgid "metric removed" -msgstr "" - -#: libs/ardour/tempo.cc:373 -msgid "add tempo" -msgstr "" - -#: libs/ardour/tempo.cc:402 -msgid "replace tempo" -msgstr "" - -#: libs/ardour/tempo.cc:435 -msgid "add meter" -msgstr "" - -#: libs/ardour/tempo.cc:463 -msgid "replaced meter" -msgstr "" - -#: libs/ardour/tempo.cc:483 libs/ardour/tempo.cc:499 -msgid "programming error: no tempo section in tempo map!" -msgstr "" - -#: libs/ardour/tempo.cc:538 -msgid "programming error: unhandled MetricSection type" -msgstr "" - -#: libs/ardour/tempo.cc:1226 libs/ardour/tempo.cc:1238 -msgid "Tempo map: could not set new state, restoring old one." -msgstr "" - -#: libs/ardour/tempo.cc:1262 -msgid "load XML data" -msgstr "" - -#: libs/ardour/utils.cc:246 -msgid "illegal or badly-formed string used for path (%1)" -msgstr "" - -#: libs/ardour/utils.cc:251 -msgid "path (%1) is ambiguous" -msgstr "" - -#: libs/ardour/vst_plugin.cc:187 -msgid "cannot create VST chunk directory: %1" -msgstr "" - -#: libs/ardour/vst_plugin.cc:195 -msgid "cannot check VST chunk directory: %1" -msgstr "" - -#: libs/ardour/vst_plugin.cc:202 -msgid "%1 exists but is not a directory" -msgstr "" - -#: libs/ardour/vst_plugin.cc:240 -msgid "Bad node sent to VSTPlugin::set_state" -msgstr "" - -#: libs/ardour/vst_plugin.cc:343 libs/ardour/vst_plugin.cc:354 -msgid "no support for presets using chunks at this time" -msgstr "" - -#: libs/ardour/coreaudiosource.cc:97 -msgid "" -"CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel " -"number" -msgstr "" - -#: libs/ardour/coreaudiosource.cc:162 -msgid "CoreAudioSource: could not seek to frame %1 within %2 (%3)" -msgstr "" diff --git a/libs/ardour/po/sv_SE.po b/libs/ardour/po/sv_SE.po deleted file mode 100644 index ddc7f108bb..0000000000 --- a/libs/ardour/po/sv_SE.po +++ /dev/null @@ -1,2025 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR "Paul Davis" -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: ardour\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-10-03 00:39+0200\n" -"PO-Revision-Date: 2006-10-03 01:09+GMT+1\n" -"Last-Translator: Petter Sundlöf \n" -"Language-Team: Swedish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: libs/ardour/diskstream.cc:258 -msgid "Location \"%1\" not valid for track loop (start >= end)" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:298 -msgid "AudioDiskstream: Playlist \"%1\" isn't an audio playlist" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:349 -msgid "AudioDiskstream %1: there is no existing playlist to make a copy of!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:924 libs/ardour/audio_diskstream.cc:935 -msgid "" -"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1069 -msgid "AudioDiskstream %1: cannot read %2 from playlist at frame %3" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1412 libs/ardour/audio_diskstream.cc:1429 -msgid "AudioDiskstream %1: cannot write to disk" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1473 -msgid "AudioDiskstream \"%1\": cannot flush captured data to disk!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1563 -msgid "%1: could not create region for complete audio file" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1587 -msgid "AudioDiskstream: could not create region for captured audio!" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1643 -msgid "programmer error: %1" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1929 -msgid "AudioDiskstream: channel %1 out of range" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:1952 -msgid "%1:%2 new capture file not initialized correctly" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2178 -msgid "%1: cannot restore pending capture source file %2" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2200 -msgid "%1: incorrect number of pending sources listed - ignoring them all" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2215 -msgid "%1: cannot create whole-file region from pending capture sources" -msgstr "" - -#: libs/ardour/audio_diskstream.cc:2227 -msgid "%1: cannot create region from pending capture sources" -msgstr "" - -#: libs/ardour/audio_library.cc:92 -msgid "channels" -msgstr "" - -#: libs/ardour/audio_library.cc:93 -msgid "samplerate" -msgstr "" - -#: libs/ardour/audio_library.cc:94 -msgid "resolution" -msgstr "" - -#: libs/ardour/audio_library.cc:95 -msgid "format" -msgstr "" - -#: libs/ardour/audio_library.cc:102 -msgid "Could not open %1. Audio Library not saved" -msgstr "" - -#: libs/ardour/audio_playlist.cc:53 libs/ardour/audio_playlist.cc:63 -#: libs/ardour/audio_playlist.cc:74 libs/ardour/audio_playlist.cc:121 -#: libs/ardour/insert.cc:84 libs/ardour/insert.cc:103 -#: libs/ardour/insert.cc:128 libs/ardour/insert.cc:862 -#: libs/ardour/insert.cc:870 libs/ardour/send.cc:39 libs/ardour/send.cc:53 -#: libs/ardour/send.cc:62 libs/ardour/session_state.cc:1128 -#: libs/ardour/session_state.cc:1170 -msgid "initial state" -msgstr "" - -#: libs/ardour/audio_playlist.cc:261 libs/ardour/audio_playlist.cc:743 -msgid "" -"programming error: non-audio Region passed to remove_overlap in audio " -"playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:388 -msgid "" -"programming error: non-audio Region tested for overlap in audio playlist" -msgstr "" - -#: libs/ardour/audio_playlist.cc:851 -msgid "xfade change" -msgstr "" - -#: libs/ardour/audio_playlist.cc:874 -msgid "region modified" -msgstr "" - -#: libs/ardour/audio_track.cc:105 libs/ardour/io.cc:1696 -#: libs/ardour/io.cc:1762 -msgid "Unknown connection \"%1\" listed for input of %2" -msgstr "" - -#: libs/ardour/audio_track.cc:107 libs/ardour/io.cc:1698 -#: libs/ardour/io.cc:1764 -msgid "in 1" -msgstr "" - -#: libs/ardour/audio_track.cc:108 libs/ardour/io.cc:1699 -#: libs/ardour/io.cc:1765 -msgid "No input connections available as a replacement" -msgstr "" - -#: libs/ardour/audio_track.cc:112 libs/ardour/io.cc:1703 -#: libs/ardour/io.cc:1769 -msgid "Connection %1 was not available - \"in 1\" used instead" -msgstr "" - -#: libs/ardour/audio_track.cc:121 libs/ardour/io.cc:1778 -msgid "improper input channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/audio_track.cc:162 libs/ardour/audio_track.cc:175 -msgid "AudioTrack: audio diskstream \"%1\" not known by session" -msgstr "" - -#: libs/ardour/audio_track.cc:216 -msgid "programming error: AudioTrack given state without diskstream!" -msgstr "" - -#: libs/ardour/audioengine.cc:146 -msgid "cannot activate JACK client" -msgstr "" - -#: libs/ardour/audioengine.cc:421 -msgid "register input port called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:457 -msgid "register output port called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:539 -msgid "connect called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:555 -msgid "AudioEngine: cannot connect %1 (%2) to %3 (%4)" -msgstr "" - -#: libs/ardour/audioengine.cc:568 libs/ardour/audioengine.cc:597 -msgid "disconnect called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:655 -msgid "get_port_by_name() called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:699 -msgid "get_ports called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:817 -msgid "get_nth_physical called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:845 -msgid "get_port_total_latency() called with no JACK client connection" -msgstr "" - -#: libs/ardour/audioengine.cc:851 -msgid "get_port_total_latency() called before engine was started" -msgstr "" - -#: libs/ardour/audioengine.cc:982 -msgid "Unable to connect to JACK server" -msgstr "" - -#: libs/ardour/audioengine.cc:985 -msgid "Could not connect to JACK server as \"%1\"" -msgstr "" - -#: libs/ardour/audioengine.cc:990 -msgid "JACK server started" -msgstr "" - -#: libs/ardour/audioengine.cc:1024 -msgid "cannot shutdown connection to JACK" -msgstr "" - -#: libs/ardour/audioengine.cc:1049 -msgid "failed to connect to JACK" -msgstr "" - -#: libs/ardour/audioengine.cc:1067 -msgid "could not reregister %1" -msgstr "" - -#: libs/ardour/audioengine.cc:1125 -msgid "could not reconnect %1 and %2 (err = %3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:355 libs/ardour/session_state.cc:2575 -msgid "" -"there are already 1000 files with names like %1; versioning discontinued" -msgstr "" - -#: libs/ardour/audiofilesource.cc:369 libs/ardour/session_state.cc:2589 -msgid "cannot rename audio file source from %1 to %2 (%3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:376 libs/ardour/session_state.cc:2604 -msgid "cannot remove peakfile %1 for %2 (%3)" -msgstr "" - -#: libs/ardour/audiofilesource.cc:420 -msgid "FileSource: search path not set" -msgstr "" - -#: libs/ardour/audiofilesource.cc:444 -msgid "" -"FileSource: \"%1\" is ambigous when searching %2\n" -"\t" -msgstr "" - -#: libs/ardour/audiofilesource.cc:450 -msgid "Filesource: cannot find required file (%1): while searching %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:473 -msgid "Filesource: cannot find required file (%1): %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:478 -msgid "Filesource: cannot check for existing file (%1): %2" -msgstr "" - -#: libs/ardour/audiofilesource.cc:534 libs/ardour/insert.cc:532 -#: libs/ardour/session.cc:1967 libs/ardour/sndfilesource.cc:109 -msgid "programming error: %1" -msgstr "" - -#: libs/ardour/audiofilesource.cc:540 -msgid "" -"Programming error! Ardour tried to rename a file over another file! It's " -"safe to continue working, but please report this to the developers." -msgstr "" - -#: libs/ardour/audiofilesource.cc:545 -msgid "cannot rename audio file for %1 to %2" -msgstr "" - -#: libs/ardour/audiofilter.cc:47 -msgid "audiofilter: error creating name for new audio file based on %1" -msgstr "" - -#: libs/ardour/audiofilter.cc:57 -msgid "audiofilter: error creating new audio file %1 (%2)" -msgstr "" - -#: libs/ardour/audioregion.cc:888 libs/ardour/audioregion.cc:950 -msgid "fade in change" -msgstr "" - -#: libs/ardour/audioregion.cc:1321 -#, c-format -msgid "normalized to %.2fdB" -msgstr "" - -#: libs/ardour/audioregion.cc:1339 -msgid "envelope change" -msgstr "" - -#: libs/ardour/audiosource.cc:144 -msgid "poll on peak request pipe failed (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:151 -msgid "Error on peak thread request pipe" -msgstr "" - -#: libs/ardour/audiosource.cc:184 -msgid "Error reading from peak request pipe" -msgstr "" - -#: libs/ardour/audiosource.cc:216 libs/ardour/session_butler.cc:80 -#: libs/ardour/session_midi.cc:1073 -msgid "Cannot create transport request signal pipe (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:221 libs/ardour/audiosource.cc:226 -msgid "UI: cannot set O_NONBLOCK on peak request pipe (%1)" -msgstr "" - -#: libs/ardour/audiosource.cc:231 -msgid "AudioSource: could not create peak thread" -msgstr "" - -#: libs/ardour/audiosource.cc:326 -msgid "cannot rename peakfile for %1 from %2 to %3 (%4)" -msgstr "" - -#: libs/ardour/audiosource.cc:368 -msgid "AudioSource: cannot stat peakfile \"%1\"" -msgstr "" - -#: libs/ardour/audiosource.cc:466 -msgid "cannot read sample data for unscaled peak computation" -msgstr "" - -#: libs/ardour/audiosource.cc:486 libs/ardour/audiosource.cc:557 -#: libs/ardour/audiosource.cc:793 libs/ardour/audiosource.cc:882 -msgid "AudioSource: cannot open peakpath \"%1\" (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:657 -msgid "AudioSource[%1]: peak read - cannot read %2 samples at offset %3" -msgstr "" - -#: libs/ardour/audiosource.cc:804 -msgid "%1: could not write read raw data for peak computation (%2)" -msgstr "" - -#: libs/ardour/audiosource.cc:829 -msgid "%1: could not write peak file data (%2)" -msgstr "" - -#: libs/ardour/auditioner.cc:118 -msgid "Auditioning of non-audio regions not yet supported" -msgstr "" - -#: libs/ardour/automation_event.cc:67 libs/ardour/location.cc:375 -#: libs/ardour/tempo.cc:226 -msgid "initial" -msgstr "" - -#: libs/ardour/automation_event.cc:240 -msgid "cleared" -msgstr "" - -#: libs/ardour/automation_event.cc:412 -msgid "added event" -msgstr "" - -#: libs/ardour/automation_event.cc:429 -msgid "removed event" -msgstr "" - -#: libs/ardour/automation_event.cc:444 -msgid "removed multiple events" -msgstr "" - -#: libs/ardour/automation_event.cc:475 libs/ardour/automation_event.cc:506 -msgid "removed range" -msgstr "" - -#: libs/ardour/automation_event.cc:536 -msgid "event range adjusted" -msgstr "" - -#: libs/ardour/automation_event.cc:558 -msgid "event adjusted" -msgstr "" - -#: libs/ardour/automation_event.cc:673 libs/ardour/automation_event.cc:778 -#: libs/ardour/panner.cc:889 -msgid "programming error:" -msgstr "" - -#: libs/ardour/automation_event.cc:1087 -msgid "cut/copy/clear" -msgstr "" - -#: libs/ardour/automation_event.cc:1120 -msgid "copy" -msgstr "" - -#: libs/ardour/automation_event.cc:1188 libs/ardour/playlist.cc:960 -msgid "paste" -msgstr "" - -#: libs/ardour/automation_event.cc:1243 -msgid "" -"automation list: no x-coordinate stored for control point (point ignored)" -msgstr "" - -#: libs/ardour/automation_event.cc:1249 -msgid "" -"automation list: no y-coordinate stored for control point (point ignored)" -msgstr "" - -#: libs/ardour/configuration.cc:87 -msgid "loading system configuration file %1" -msgstr "" - -#: libs/ardour/configuration.cc:90 -msgid "Ardour: cannot read system configuration file \"%1\"" -msgstr "" - -#: libs/ardour/configuration.cc:97 -msgid "Ardour: system configuration file \"%1\" not loaded successfully." -msgstr "" - -#: libs/ardour/configuration.cc:111 -msgid "loading user configuration file %1" -msgstr "" - -#: libs/ardour/configuration.cc:114 -msgid "Ardour: cannot read configuration file \"%1\"" -msgstr "" - -#: libs/ardour/configuration.cc:121 -msgid "Ardour: user configuration file \"%1\" not loaded successfully." -msgstr "" - -#: libs/ardour/configuration.cc:141 -msgid "Config file %1 not saved" -msgstr "" - -#: libs/ardour/configuration.cc:226 -msgid "ill-formed MIDI port specification in ardour rcfile (ignored)" -msgstr "" - -#: libs/ardour/connection.cc:183 -msgid "Node for Connection has no \"name\" property" -msgstr "" - -#: libs/ardour/connection.cc:191 -msgid "Node for Connection has no \"connections\" property" -msgstr "" - -#: libs/ardour/connection.cc:227 libs/ardour/io.cc:1838 -msgid "IO: badly formed string in XML node for inputs \"%1\"" -msgstr "" - -#: libs/ardour/connection.cc:232 libs/ardour/io.cc:1843 -msgid "bad input string in XML node \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:84 -msgid "control protocol name \"%1\" has no descriptor" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:89 -msgid "control protocol name \"%1\" could not be initialized" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:145 -msgid "Instantiating mandatory control protocol %1" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:179 -msgid "Control protocol %1 not usable" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:192 -msgid "Control surface protocol discovered: \"%1\"" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:210 -msgid "ControlProtocolManager: cannot load module \"%1\" (%2)" -msgstr "" - -#: libs/ardour/control_protocol_manager.cc:218 -msgid "ControlProtocolManager: module \"%1\" has no descriptor function." -msgstr "" - -#: libs/ardour/crossfade.cc:120 -msgid "Crossfade: no \"in\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:127 -msgid "Crossfade: no \"in\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:137 -msgid "Crossfade: no \"out\" region in state" -msgstr "" - -#: libs/ardour/crossfade.cc:144 -msgid "Crossfade: no \"out\" region %1 found in playlist %2" -msgstr "" - -#: libs/ardour/crossfade.cc:491 -msgid "active changed" -msgstr "" - -#: libs/ardour/crossfade.cc:740 -msgid "old-style crossfade information - no position information" -msgstr "" - -#: libs/ardour/curve.cc:117 libs/ardour/globals.cc:348 -#: libs/ardour/insert.cc:454 libs/ardour/session.cc:2432 -#: libs/ardour/session.cc:2486 -msgid "programming error: " -msgstr "" - -#: libs/ardour/cycle_timer.cc:37 -msgid "CycleTimer::get_mhz(): can't open /proc/cpuinfo" -msgstr "" - -#: libs/ardour/cycle_timer.cc:49 -msgid "CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo" -msgstr "" - -#: libs/ardour/cycle_timer.cc:72 -msgid "cannot locate cpu MHz in /proc/cpuinfo" -msgstr "" - -#: libs/ardour/destructive_filesource.cc:200 -msgid "DestructiveFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)" -msgstr "" - -#: libs/ardour/destructive_filesource.cc:213 -#: libs/ardour/destructive_filesource.cc:258 -#: libs/ardour/destructive_filesource.cc:265 -msgid "DestructiveFileSource: \"%1\" bad write (%2)" -msgstr "" - -#: libs/ardour/destructive_filesource.cc:403 -msgid "" -"Filesource: start time is already set for existing file (%1): Cannot change " -"start time." -msgstr "" - -#: libs/ardour/globals.cc:110 -msgid "no MIDI ports specified: no MMC or MTC control possible" -msgstr "" - -#: libs/ardour/globals.cc:125 -msgid "MIDI port specifications for \"%1\" are not understandable." -msgstr "" - -#: libs/ardour/globals.cc:138 libs/ardour/globals.cc:142 -#: libs/ardour/globals.cc:146 -msgid "default" -msgstr "" - -#: libs/ardour/globals.cc:174 -msgid "No MMC control (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:180 -msgid "No MTC support (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/globals.cc:185 -msgid "No MIDI parameter support (MIDI port \"%1\" not available)" -msgstr "" - -#: libs/ardour/import.cc:77 -msgid "Import: cannot open input sound file \"%1\"" -msgstr "" - -#: libs/ardour/import.cc:82 -msgid "resampling audio" -msgstr "" - -#: libs/ardour/import.cc:86 -msgid "Import: cannot open converted sound file \"%1\"" -msgstr "" - -#: libs/ardour/import.cc:91 -msgid "Import: error while resampling sound file \"%1\"" -msgstr "" - -#: libs/ardour/import.cc:145 -msgid "Session::import_audiofile: cannot open new file source for channel %1" -msgstr "" - -#: libs/ardour/import.cc:163 -msgid "converting audio" -msgstr "" - -#: libs/ardour/import.cc:195 -msgid "building region" -msgstr "" - -#: libs/ardour/import.cc:197 -msgid "building regions" -msgstr "" - -#: libs/ardour/import.cc:309 -msgid "Import/SRC: could not open input file: %1" -msgstr "" - -#: libs/ardour/import.cc:317 -msgid "Import/SRC: could not open output file: %1" -msgstr "" - -#: libs/ardour/import.cc:326 -msgid "Import: src_new() failed : %1" -msgstr "" - -#: libs/ardour/import.cc:354 -msgid "Import: %1" -msgstr "" - -#: libs/ardour/insert.cc:651 libs/ardour/insert.cc:960 -msgid "XML node describing insert is missing the `type' field" -msgstr "" - -#: libs/ardour/insert.cc:660 -msgid "unknown plugin type %1 in plugin insert state" -msgstr "" - -#: libs/ardour/insert.cc:672 -msgid "XML node describing insert is missing the `id' field" -msgstr "" - -#: libs/ardour/insert.cc:685 -msgid "" -"Found a reference to a plugin (\"%1\") that is unknown.\n" -"Perhaps it was removed or moved since it was last used." -msgstr "" - -#: libs/ardour/insert.cc:723 libs/ardour/insert.cc:977 -msgid "XML node describing insert is missing a Redirect node" -msgstr "" - -#: libs/ardour/insert.cc:728 -msgid "XML node describing a plugin insert is missing the `%1' information" -msgstr "" - -#: libs/ardour/insert.cc:752 -msgid "PluginInsert: Auto: no ladspa port number" -msgstr "" - -#: libs/ardour/insert.cc:759 -msgid "PluginInsert: Auto: port id out of range" -msgstr "" - -#: libs/ardour/insert.cc:775 -msgid "XML node describing a port automation is missing the `%1' information" -msgstr "" - -#: libs/ardour/insert.cc:878 -msgid "PortInsert: cannot add input port" -msgstr "" - -#: libs/ardour/insert.cc:883 -msgid "PortInsert: cannot add output port" -msgstr "" - -#: libs/ardour/insert.cc:965 -msgid "non-port insert XML used for port plugin insert" -msgstr "" - -#: libs/ardour/io.cc:603 -msgid "IO: cannot disconnect input port %1 from %2" -msgstr "" - -#: libs/ardour/io.cc:671 -msgid "IO: cannot disconnect output port %1 from %2" -msgstr "" - -#: libs/ardour/io.cc:822 libs/ardour/io.cc:1177 libs/ardour/io.cc:1303 -#, c-format -msgid "%s/out" -msgstr "" - -#: libs/ardour/io.cc:824 libs/ardour/io.cc:1179 libs/ardour/io.cc:1305 -#: libs/ardour/io.cc:2688 -#, c-format -msgid "%s/out %u" -msgstr "" - -#: libs/ardour/io.cc:828 libs/ardour/io.cc:1184 libs/ardour/io.cc:1309 -msgid "IO: cannot register output port %1" -msgstr "" - -#: libs/ardour/io.cc:934 libs/ardour/io.cc:1037 libs/ardour/io.cc:1143 -#, c-format -msgid "%s/in" -msgstr "" - -#: libs/ardour/io.cc:936 libs/ardour/io.cc:1040 libs/ardour/io.cc:1146 -#: libs/ardour/io.cc:2658 -#, c-format -msgid "%s/in %u" -msgstr "" - -#: libs/ardour/io.cc:940 libs/ardour/io.cc:1046 libs/ardour/io.cc:1151 -msgid "IO: cannot register input port %1" -msgstr "" - -#: libs/ardour/io.cc:1551 -msgid "IO::connecting_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1574 -msgid "IO::ports_became_legal() called without a pending state node" -msgstr "" - -#: libs/ardour/io.cc:1603 -msgid "incorrect XML node \"%1\" passed to IO object" -msgstr "" - -#: libs/ardour/io.cc:1719 libs/ardour/io.cc:1787 -msgid "Unknown connection \"%1\" listed for output of %2" -msgstr "" - -#: libs/ardour/io.cc:1721 libs/ardour/io.cc:1789 -msgid "out 1" -msgstr "" - -#: libs/ardour/io.cc:1722 libs/ardour/io.cc:1790 -msgid "No output connections available as a replacement" -msgstr "" - -#: libs/ardour/io.cc:1726 libs/ardour/io.cc:1794 -msgid "Connection %1 was not available - \"out 1\" used instead" -msgstr "" - -#: libs/ardour/io.cc:1740 -msgid "%1: cannot create I/O ports" -msgstr "" - -#: libs/ardour/io.cc:1803 -msgid "improper output channel list in XML node (%1)" -msgstr "" - -#: libs/ardour/io.cc:1888 -msgid "IO: badly formed string in XML node for outputs \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:1893 -msgid "IO: bad output string in XML node \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2391 -msgid "%1: could not open automation event file \"%2\"" -msgstr "" - -#: libs/ardour/io.cc:2430 -msgid "%1: cannot open automation event file \"%2\" (%2)" -msgstr "" - -#: libs/ardour/io.cc:2445 -msgid "badly formed version number in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2449 -msgid "no version information in automation event file \"%1\"" -msgstr "" - -#: libs/ardour/io.cc:2454 -msgid "mismatched automation event file version (%1)" -msgstr "" - -#: libs/ardour/io.cc:2462 -msgid "badly formatted automation event record at line %1 of %2 (ignored)" -msgstr "" - -#: libs/ardour/io.cc:2482 -msgid "dubious automation event found (and ignored)" -msgstr "" - -#: libs/ardour/io.cc:2486 libs/ardour/panner.cc:288 -#: libs/ardour/redirect.cc:148 -msgid "loaded from disk" -msgstr "" - -#: libs/ardour/io.cc:2630 -msgid "automation write/touch" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:87 -msgid "LADSPA: module has no descriptor function." -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:92 -msgid "LADSPA: plugin has gone away since discovery!" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:99 -msgid "LADSPA: \"%1\" cannot be used, since it cannot do inplace processing" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:315 -msgid "" -"illegal parameter number used with plugin \"%1\". This mayindicate a change " -"in the plugin design, and presets may beinvalid" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:394 -msgid "Bad node sent to LadspaPlugin::set_state" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:407 -msgid "LADSPA: no ladspa port number" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:413 -msgid "LADSPA: no ladspa port data" -msgstr "" - -#: libs/ardour/ladspa_plugin.cc:653 -msgid "LADSPA: cannot load module from \"%1\"" -msgstr "" - -#: libs/ardour/location.cc:295 -msgid "incorrect XML node passed to Location::set_state" -msgstr "" - -#: libs/ardour/location.cc:300 -msgid "XML node for Location has no ID information" -msgstr "" - -#: libs/ardour/location.cc:306 -msgid "XML node for Location has no name information" -msgstr "" - -#: libs/ardour/location.cc:313 -msgid "XML node for Location has no start information" -msgstr "" - -#: libs/ardour/location.cc:324 -msgid "XML node for Location has no end information" -msgstr "" - -#: libs/ardour/location.cc:333 -msgid "XML node for Location has no flags information" -msgstr "" - -#: libs/ardour/location.cc:421 -msgid "Locations: attempt to use unknown location as selected location" -msgstr "" - -#: libs/ardour/location.cc:448 libs/ardour/playlist.cc:1204 -msgid "clear" -msgstr "" - -#: libs/ardour/location.cc:473 -msgid "clear markers" -msgstr "" - -#: libs/ardour/location.cc:501 -msgid "clear ranges" -msgstr "" - -#: libs/ardour/location.cc:519 -msgid "add" -msgstr "" - -#: libs/ardour/location.cc:557 -msgid "remove" -msgstr "" - -#: libs/ardour/location.cc:597 -msgid "incorrect XML mode passed to Locations::set_state" -msgstr "" - -#: libs/ardour/location.cc:615 -msgid "could not load location from session file - ignored" -msgstr "" - -#: libs/ardour/mtc_slave.cc:196 -msgid "MTC Slave: atomic read of current time failed, sleeping!" -msgstr "" - -#: libs/ardour/named_selection.cc:77 -msgid "Chunk %1 uses an unknown playlist \"%2\"" -msgstr "" - -#: libs/ardour/named_selection.cc:80 -msgid "Chunk %1 contains misformed playlist information" -msgstr "" - -#: libs/ardour/panner.cc:211 -msgid "automation write pass" -msgstr "" - -#: libs/ardour/panner.cc:251 -#, c-format -msgid "error writing pan automation file (%s)" -msgstr "" - -#: libs/ardour/panner.cc:279 -msgid "" -"badly formatted pan automation event record at line %1 of %2 (ignored) [%3]" -msgstr "" - -#: libs/ardour/panner.cc:794 -msgid "badly-formed positional data for Multi2dPanner - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1083 -msgid "cannot open pan automation file \"%1\" for saving (%2)" -msgstr "" - -#: libs/ardour/panner.cc:1119 -msgid "cannot open pan automation file %1 (%2)" -msgstr "" - -#: libs/ardour/panner.cc:1132 -msgid "badly formed version number in pan automation event file \"%1\"" -msgstr "" - -#: libs/ardour/panner.cc:1136 -msgid "" -"no version information in pan automation event file \"%1\" (first line = %2)" -msgstr "" - -#: libs/ardour/panner.cc:1142 -msgid "mismatched pan automation event file version (%1)" -msgstr "" - -#: libs/ardour/panner.cc:1156 -msgid "too many panner states found in pan automation file %1" -msgstr "" - -#: libs/ardour/panner.cc:1297 -msgid "Unknown panner plugin \"%1\" found in pan state - ignored" -msgstr "" - -#: libs/ardour/panner.cc:1303 -msgid "panner plugin node has no type information!" -msgstr "" - -#: libs/ardour/playlist.cc:251 -msgid "playlist const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:257 -msgid "playlist non-const copy constructor called" -msgstr "" - -#: libs/ardour/playlist.cc:498 -msgid "add region" -msgstr "" - -#: libs/ardour/playlist.cc:550 -msgid "replace region" -msgstr "" - -#: libs/ardour/playlist.cc:563 -msgid "remove region" -msgstr "" - -#: libs/ardour/playlist.cc:635 -msgid "separate" -msgstr "" - -#: libs/ardour/playlist.cc:899 -msgid "cut" -msgstr "" - -#: libs/ardour/playlist.cc:989 -msgid "duplicate" -msgstr "" - -#: libs/ardour/playlist.cc:1044 -msgid "split" -msgstr "" - -#: libs/ardour/playlist.cc:1121 -msgid "%1: bounds changed received for region (%2)not in playlist" -msgstr "" - -#: libs/ardour/playlist.cc:1377 -msgid "Playlist: cannot create region from state file" -msgstr "" - -#: libs/ardour/playlist.cc:1737 -msgid "nudged" -msgstr "" - -#: libs/ardour/playlist_factory.cc:40 -msgid "" -"programming error: Playlist::copyPlaylist called with unknown Playlist type" -msgstr "" - -#: libs/ardour/plugin.cc:218 -msgid "Could not locate HOME. Preset not saved." -msgstr "" - -#: libs/ardour/plugin.cc:228 libs/ardour/plugin.cc:234 -msgid "Could not create %1. Preset not saved. (%2)" -msgstr "" - -#: libs/ardour/plugin.cc:239 -msgid "Error saving presets file %1." -msgstr "" - -#: libs/ardour/plugin_manager.cc:192 -msgid "Could not parse rdf file: %1" -msgstr "" - -#: libs/ardour/plugin_manager.cc:232 -msgid "LADSPA: cannot load module \"%1\" (%2)" -msgstr "" - -#: libs/ardour/plugin_manager.cc:239 -msgid "LADSPA: module \"%1\" has no descriptor function." -msgstr "" - -#: libs/ardour/plugin_manager.cc:295 libs/ardour/plugin_manager.cc:307 -msgid "Unknown" -msgstr "" - -#: libs/ardour/plugin_manager.cc:380 -msgid "" -"VST plugin %1 does not support processReplacing, and so cannot be used in " -"ardour at this time" -msgstr "" - -#: libs/ardour/recent_sessions.cc:44 -msgid "cannot open recent session file %1 (%2)" -msgstr "" - -#: libs/ardour/redirect.cc:77 -msgid "programming error: unknown Redirect type in Redirect::Clone!\n" -msgstr "" - -#: libs/ardour/redirect.cc:102 libs/ardour/utils.cc:194 -msgid "pre" -msgstr "" - -#: libs/ardour/redirect.cc:104 libs/ardour/utils.cc:197 -msgid "post" -msgstr "" - -#: libs/ardour/redirect.cc:107 -msgid "Redirect: unknown placement string \"%1\" (ignored)" -msgstr "" - -#: libs/ardour/redirect.cc:125 -msgid "%1: cannot open %2 to load automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:154 -msgid "%1: cannot load automation data from %2" -msgstr "" - -#: libs/ardour/redirect.cc:175 -msgid "%1: cannot open %2 to store automation data (%3)" -msgstr "" - -#: libs/ardour/redirect.cc:194 libs/ardour/redirect.cc:201 -msgid "%1: could not save automation state to %2" -msgstr "" - -#: libs/ardour/redirect.cc:246 -msgid "Could not get state from Redirect (%1). Problem with save_automation" -msgstr "" - -#: libs/ardour/redirect.cc:296 -msgid "incorrect XML node \"%1\" passed to Redirect object" -msgstr "" - -#: libs/ardour/redirect.cc:318 -msgid "%1: Automation node has no path property" -msgstr "" - -#: libs/ardour/redirect.cc:343 -msgid "XML node describing an IO is missing an IO node" -msgstr "" - -#: libs/ardour/redirect.cc:348 -msgid "XML node describing a redirect is missing the `active' field" -msgstr "" - -#: libs/ardour/redirect.cc:358 -msgid "XML node describing a redirect is missing the `placement' field" -msgstr "" - -#: libs/ardour/redirect.cc:467 -msgid "active_changed" -msgstr "" - -#: libs/ardour/region.cc:901 -msgid "Session: XMLNode describing a Region is incomplete (no id)" -msgstr "" - -#: libs/ardour/region.cc:908 -msgid "Session: XMLNode describing a Region is incomplete (no name)" -msgstr "" - -#: libs/ardour/region_factory.cc:53 libs/ardour/region_factory.cc:70 -msgid "" -"programming error: RegionFactory::create() called with unknown Region type" -msgstr "" - -#: libs/ardour/route.cc:81 libs/ardour/session.cc:1434 -#: libs/ardour/session.cc:1440 libs/ardour/session.cc:3064 -msgid "signal" -msgstr "" - -#: libs/ardour/route.cc:1407 -msgid "Could not get state of route. Problem with save_automation" -msgstr "" - -#: libs/ardour/route.cc:1459 -msgid "Send construction failed" -msgstr "" - -#: libs/ardour/route.cc:1481 -msgid "unknown Insert type \"%1\"; ignored" -msgstr "" - -#: libs/ardour/route.cc:1487 -msgid "Insert XML node has no type property" -msgstr "" - -#: libs/ardour/route.cc:1492 -msgid "insert could not be created. Ignored." -msgstr "" - -#: libs/ardour/route.cc:1508 -msgid "Bad node sent to Route::set_state() [%1]" -msgstr "" - -#: libs/ardour/route.cc:1572 -msgid "Route %1: unknown edit group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/route.cc:1588 libs/ardour/route.cc:1592 -msgid "badly formed order key string in state file! [%1] ... ignored." -msgstr "" - -#: libs/ardour/route.cc:1673 libs/ardour/route.cc:1761 -msgid "[control]" -msgstr "" - -#: libs/ardour/route.cc:1693 -msgid "Route %1: unknown mix group \"%2 in saved state (ignored)" -msgstr "" - -#: libs/ardour/send.cc:99 -msgid "XML node describing a send is missing a Redirect node" -msgstr "" - -#: libs/ardour/session.cc:111 -msgid "Could not resolve path: %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:123 -msgid "cannot check session path %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:153 -msgid "cannot check statefile %1 (%2)" -msgstr "" - -#: libs/ardour/session.cc:189 -msgid "%1 is not an Ardour snapshot file" -msgstr "" - -#: libs/ardour/session.cc:206 -msgid "cannot determine current working directory (%1)" -msgstr "" - -#: libs/ardour/session.cc:223 -msgid "unknown file type for session %1" -msgstr "" - -#: libs/ardour/session.cc:343 -msgid "monitor" -msgstr "" - -#: libs/ardour/session.cc:351 -msgid "master" -msgstr "" - -#: libs/ardour/session.cc:633 -msgid "could not setup Click I/O" -msgstr "" - -#: libs/ardour/session.cc:654 -msgid "cannot setup Click I/O" -msgstr "" - -#: libs/ardour/session.cc:676 -msgid "cannot create Auditioner: no auditioning of regions possible" -msgstr "" - -#: libs/ardour/session.cc:688 -#, c-format -msgid "out %" -msgstr "" - -#: libs/ardour/session.cc:700 -#, c-format -msgid "in %" -msgstr "" - -#: libs/ardour/session.cc:714 -#, c-format -msgid "out %+%" -msgstr "" - -#: libs/ardour/session.cc:728 -#, c-format -msgid "in %+%" -msgstr "" - -#: libs/ardour/session.cc:761 -msgid "cannot setup master inputs" -msgstr "" - -#: libs/ardour/session.cc:769 -msgid "cannot setup master outputs" -msgstr "" - -#: libs/ardour/session.cc:780 -msgid "Master Out" -msgstr "" - -#: libs/ardour/session.cc:852 -msgid "cannot setup control inputs" -msgstr "" - -#: libs/ardour/session.cc:860 -msgid "cannot set up master outputs" -msgstr "" - -#: libs/ardour/session.cc:1043 -msgid "Session: you can't use that location for auto punch (start <= end)" -msgstr "" - -#: libs/ardour/session.cc:1080 -msgid "Session: you can't use a mark for auto loop" -msgstr "" - -#: libs/ardour/session.cc:1452 -msgid "feedback loop setup between %1 and %2" -msgstr "" - -#: libs/ardour/session.cc:1629 libs/ardour/session.cc:1750 -msgid "cannot configure %1 in/%2 out configuration for new audio track" -msgstr "" - -#: libs/ardour/session.cc:1687 -msgid "Session: could not create new audio track." -msgstr "" - -#: libs/ardour/session.cc:1800 -msgid "Session: could not create new audio route." -msgstr "" - -#: libs/ardour/session.cc:2319 -msgid "cannot create new name for region \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:2383 -msgid "too many regions with names like %1" -msgstr "" - -#: libs/ardour/session.cc:2883 -msgid "There are already %1 recordings for %2, which I consider too many." -msgstr "" - -#: libs/ardour/session.cc:3085 -msgid "Cannot compile tape track regexp for use (%1)" -msgstr "" - -#: libs/ardour/session.cc:3232 -msgid "programming error: unknown type of Insert created!" -msgstr "" - -#: libs/ardour/session.cc:3238 -msgid "programming error: unknown type of Redirect created!" -msgstr "" - -#: libs/ardour/session.cc:3261 -msgid "programming error: unknown type of Insert deleted!" -msgstr "" - -#: libs/ardour/session.cc:3267 -msgid "programming error: unknown type of Redirect deleted!" -msgstr "" - -#: libs/ardour/session.cc:3573 -msgid "too many bounced versions of playlist \"%1\"" -msgstr "" - -#: libs/ardour/session.cc:3582 -msgid "cannot create new audio file \"%1\" for %2" -msgstr "" - -#: libs/ardour/session_butler.cc:85 libs/ardour/session_butler.cc:90 -msgid "UI: cannot set O_NONBLOCK on butler request pipe (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:95 -msgid "Session: could not create butler thread" -msgstr "" - -#: libs/ardour/session_butler.cc:183 -msgid "poll on butler request pipe failed (%1)" -msgstr "" - -#: libs/ardour/session_butler.cc:190 -msgid "Error on butler thread request pipe: fd=%1 err=%2" -msgstr "" - -#: libs/ardour/session_butler.cc:231 -msgid "Error reading from butler request pipe" -msgstr "" - -#: libs/ardour/session_butler.cc:268 -msgid "Butler read ahead failure on dstream %1" -msgstr "" - -#: libs/ardour/session_butler.cc:311 -msgid "Butler write-behind failure on dstream %1" -msgstr "" - -#: libs/ardour/session_click.cc:160 -msgid "cannot open click soundfile %1 (%2)" -msgstr "" - -#: libs/ardour/session_click.cc:169 -msgid "cannot read data from click soundfile" -msgstr "" - -#: libs/ardour/session_click.cc:196 -msgid "cannot open click emphasis soundfile %1 (%2)" -msgstr "" - -#: libs/ardour/session_click.cc:204 -msgid "cannot read data from click emphasis soundfile" -msgstr "" - -#: libs/ardour/session_command.cc:49 -msgid "Tried to reconstitute a MementoCommand with no contents, failing. id=" -msgstr "" - -#: libs/ardour/session_command.cc:95 -msgid "could not reconstitute MementoCommand from XMLNode. id=" -msgstr "" - -#: libs/ardour/session_events.cc:161 -msgid "Session: cannot have two events of type %1 at the same frame (%2)." -msgstr "" - -#: libs/ardour/session_events.cc:422 -msgid "Programming error: illegal event type in process_event (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:63 -msgid "Export: no output file specified" -msgstr "" - -#: libs/ardour/session_export.cc:164 libs/ardour/session_export.cc:169 -msgid "illegal frame range in export specification" -msgstr "" - -#: libs/ardour/session_export.cc:174 -msgid "Bad data width size. Report me!" -msgstr "" - -#: libs/ardour/session_export.cc:204 -msgid "Export: cannot open output file \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_export.cc:214 -msgid "cannot initialize sample rate conversion: %1" -msgstr "" - -#: libs/ardour/session_export.cc:316 -msgid "an error occured during sample rate conversion: %1" -msgstr "" - -#: libs/ardour/session_export.cc:327 -msgid "warning, leftover frames overflowed, glitches might occur in output" -msgstr "" - -#: libs/ardour/session_export.cc:418 -msgid "Export: could not write data to output file (%1)" -msgstr "" - -#: libs/ardour/session_export.cc:502 -msgid "%1: cannot seek to %2 for export" -msgstr "" - -#: libs/ardour/session_midi.cc:95 -msgid "Ardour is slaved to MTC - port cannot be reset" -msgstr "" - -#: libs/ardour/session_midi.cc:110 -msgid "unknown port %1 requested for MTC" -msgstr "" - -#: libs/ardour/session_midi.cc:435 -msgid "Error reading from MIDI port %1" -msgstr "" - -#: libs/ardour/session_midi.cc:804 -msgid "Session: could not send full MIDI time code" -msgstr "" - -#: libs/ardour/session_midi.cc:863 -msgid "Session: cannot send quarter-frame MTC message (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:971 -msgid "MMC: cannot send command %1%2%3" -msgstr "" - -#: libs/ardour/session_midi.cc:1078 -msgid "UI: cannot set O_NONBLOCK on signal read pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1083 -msgid "UI: cannot set O_NONBLOCK on signal write pipe (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1088 -msgid "Session: could not create transport thread" -msgstr "" - -#: libs/ardour/session_midi.cc:1117 -msgid "cannot send signal to midi thread! (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1212 -msgid "MIDI thread poll failed (%1)" -msgstr "" - -#: libs/ardour/session_midi.cc:1224 -msgid "Error on transport thread request pipe" -msgstr "" - -#: libs/ardour/session_midi.cc:1251 -msgid "Error reading from transport request pipe" -msgstr "" - -#: libs/ardour/session_process.cc:104 -msgid "Session: error in no roll for %1" -msgstr "" - -#: libs/ardour/session_state.cc:103 -msgid "Could not use path %1 (%s)" -msgstr "" - -#: libs/ardour/session_state.cc:131 -msgid "end" -msgstr "" - -#: libs/ardour/session_state.cc:132 -msgid "start" -msgstr "" - -#: libs/ardour/session_state.cc:443 -msgid "Session: cannot create session dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:450 -msgid "Session: cannot create session peakfile dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:457 -msgid "Session: cannot create session sounds dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:464 -msgid "Session: cannot create session dead sounds dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:471 -msgid "Session: cannot create session automation dir \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:500 -msgid "Could not open %1 for writing mix template" -msgstr "" - -#: libs/ardour/session_state.cc:506 -msgid "Could not open mix template %1 for reading" -msgstr "" - -#: libs/ardour/session_state.cc:548 -msgid "Session: could not load diskstream via XML state" -msgstr "" - -#: libs/ardour/session_state.cc:597 -msgid "could not backup old state file, current state not saved." -msgstr "" - -#: libs/ardour/session_state.cc:612 -msgid "state could not be saved to %1" -msgstr "" - -#: libs/ardour/session_state.cc:619 -msgid "could not remove corrupt state file %1" -msgstr "" - -#: libs/ardour/session_state.cc:623 -msgid "could not restore state file from backup %1" -msgstr "" - -#: libs/ardour/session_state.cc:693 -msgid "%1: session state information file \"%2\" doesn't exist!" -msgstr "" - -#: libs/ardour/session_state.cc:704 libs/ardour/session_state.cc:2824 -msgid "Could not understand ardour file %1" -msgstr "" - -#: libs/ardour/session_state.cc:988 -msgid "programming error: Session: incorrect XML node sent to set_state()" -msgstr "" - -#: libs/ardour/session_state.cc:1047 -msgid "Session: XML state has no options section" -msgstr "" - -#: libs/ardour/session_state.cc:1051 -msgid "Session: XML state has no sources section" -msgstr "" - -#: libs/ardour/session_state.cc:1058 -msgid "Session: XML state has no Regions section" -msgstr "" - -#: libs/ardour/session_state.cc:1065 -msgid "Session: XML state has no playlists section" -msgstr "" - -#: libs/ardour/session_state.cc:1084 -msgid "Session: XML state has no diskstreams section" -msgstr "" - -#: libs/ardour/session_state.cc:1091 -msgid "Session: XML state has no connections section" -msgstr "" - -#: libs/ardour/session_state.cc:1098 -msgid "Session: XML state has no locations section" -msgstr "" - -#: libs/ardour/session_state.cc:1131 -msgid "Session: XML state has no edit groups section" -msgstr "" - -#: libs/ardour/session_state.cc:1138 -msgid "Session: XML state has no mix groups section" -msgstr "" - -#: libs/ardour/session_state.cc:1145 -msgid "Session: XML state has no Tempo Map section" -msgstr "" - -#: libs/ardour/session_state.cc:1152 -msgid "Session: XML state has no routes section" -msgstr "" - -#: libs/ardour/session_state.cc:1159 -msgid "Session: XML state has no click section" -msgstr "" - -#: libs/ardour/session_state.cc:1202 -msgid "Session: cannot create Route from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1243 -msgid "Session: cannot create Region from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1271 -msgid "Session: XMLNode describing a AudioRegion is incomplete (no source)" -msgstr "" - -#: libs/ardour/session_state.cc:1279 libs/ardour/session_state.cc:1300 -msgid "" -"Session: XMLNode describing a AudioRegion references an unknown source id =%1" -msgstr "" - -#: libs/ardour/session_state.cc:1285 libs/ardour/session_state.cc:1306 -msgid "" -"Session: XMLNode describing a AudioRegion references a non-audio source id =%" -"1" -msgstr "" - -#: libs/ardour/session_state.cc:1377 -msgid "Session: cannot create Source from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1396 -msgid "" -"Found a sound file that cannot be used by Ardour. Talk to the progammers." -msgstr "" - -#: libs/ardour/session_state.cc:1418 -msgid "Could not create mix templates directory \"%1\" (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:1432 -msgid "Template \"%1\" already exists - new version not created" -msgstr "" - -#: libs/ardour/session_state.cc:1439 -msgid "mix template not saved" -msgstr "" - -#: libs/ardour/session_state.cc:1498 -msgid "cannot create session directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1509 -msgid "cannot create sounds directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1518 -msgid "cannot create dead sounds directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1527 -msgid "cannot create peak file directory \"%1\"; ignored" -msgstr "" - -#: libs/ardour/session_state.cc:1659 libs/ardour/session_state.cc:1680 -msgid "Session: cannot create Playlist from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1719 -msgid "Session: cannot create Named Selection from XML description." -msgstr "" - -#: libs/ardour/session_state.cc:1872 -msgid "Unknown node \"%1\" found in Connections list from state file" -msgstr "" - -#: libs/ardour/session_state.cc:2677 -msgid "cannot remove dead sound file %1 (%2)" -msgstr "" - -#: libs/ardour/session_state.cc:2778 -msgid "could not backup old history file, current history not saved." -msgstr "" - -#: libs/ardour/session_state.cc:2786 -msgid "history could not be saved to %1" -msgstr "" - -#: libs/ardour/session_state.cc:2794 -msgid "could not remove corrupt history file %1" -msgstr "" - -#: libs/ardour/session_state.cc:2798 -msgid "could not restore history file from backup %1" -msgstr "" - -#: libs/ardour/session_state.cc:2816 -msgid "Loading history from '%1'." -msgstr "" - -#: libs/ardour/session_state.cc:2819 -msgid "%1: session history file \"%2\" doesn't exist!" -msgstr "" - -#: libs/ardour/session_state.cc:2861 -msgid "Couldn't figure out how to make a Command out of a %1 XMLNode." -msgstr "" - -#: libs/ardour/session_time.cc:370 -msgid "Unknown JACK transport state %1 in sync callback" -msgstr "" - -#: libs/ardour/session_timefx.cc:79 -msgid "tempoize: error creating name for new audio file based on %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:88 -msgid "tempoize: error creating new audio file %1 (%2)" -msgstr "" - -#: libs/ardour/session_timefx.cc:113 -msgid "tempoize: error reading data from %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:126 libs/ardour/session_timefx.cc:138 -msgid "error writing tempo-adjusted data to %1" -msgstr "" - -#: libs/ardour/session_timefx.cc:144 -msgid "timefx code failure. please notify ardour-developers." -msgstr "" - -#: libs/ardour/session_transport.cc:117 -msgid "Cannot loop - no loop range defined" -msgstr "" - -#: libs/ardour/session_transport.cc:474 -msgid "" -"Seamless looping cannot be supported while Ardour is using JACK transport.\n" -"Recommend changing the configured options" -msgstr "" - -#: libs/ardour/session_transport.cc:743 -msgid "" -"Global varispeed cannot be supported while Ardour is connected to JACK " -"transport control" -msgstr "" - -#: libs/ardour/session_transport.cc:933 -msgid "please stop the transport before adjusting slave settings" -msgstr "" - -#: libs/ardour/session_transport.cc:966 -msgid "No MTC port defined: MTC slaving is impossible." -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:15 -msgid "WAV" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:16 -msgid "AIFF" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:17 -msgid "raw (no header)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:18 -msgid "PAF (Ensoniq Paris)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:19 -msgid "AU (Sun/NeXT)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:20 -msgid "IRCAM" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:21 -msgid "W64 (64 bit WAV)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:26 -msgid ".wav" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:27 -msgid ".aiff" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:28 -msgid ".raw" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:29 -msgid ".paf" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:30 -msgid ".au" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:31 -msgid ".ircam" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:32 -msgid ".w64" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:47 -msgid "16 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:48 -msgid "24 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:49 -msgid "32 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:50 -msgid "8 bit" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:51 -msgid "float" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:64 -msgid "Little-endian (Intel)" -msgstr "" - -#: libs/ardour/sndfile_helpers.cc:65 -msgid "Big-endian (Mac)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:143 -msgid "FileSource: cannot get host information for BWF header (%1)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:167 -msgid "" -"cannot set broadcast info for audio file %1 (%2); dropping broadcast info " -"for this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:216 -msgid "SndFileSource: cannot open file \"%1\" for %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:222 -msgid "" -"SndFileSource: file only contains %1 channels; %2 is invalid as a channel " -"number" -msgstr "" - -#: libs/ardour/sndfilesource.cc:327 -msgid "SndFileSource: could not seek to frame %1 within %2 (%3)" -msgstr "" - -#: libs/ardour/sndfilesource.cc:378 -msgid "programming error: %1 %2" -msgstr "" - -#: libs/ardour/sndfilesource.cc:486 libs/ardour/sndfilesource.cc:507 -msgid "" -"cannot set broadcast info for audio file %1; Dropping broadcast info for " -"this file" -msgstr "" - -#: libs/ardour/sndfilesource.cc:521 -msgid "%1: cannot seek to %2" -msgstr "" - -#: libs/ardour/state_manager.cc:47 -msgid "cleared history" -msgstr "" - -#: libs/ardour/state_manager.cc:60 -msgid "" -"programming error: illegal state ID (%1) passed to StateManager::set_state() " -"(range = 0-%2)" -msgstr "" - -#: libs/ardour/tempo.cc:67 -msgid "TempoSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:75 -msgid "TempoSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:82 -msgid "TempoSection XML node has no \"beats-per-minute\" property" -msgstr "" - -#: libs/ardour/tempo.cc:87 -msgid "TempoSection XML node has an illegal \"beats_per_minute\" value" -msgstr "" - -#: libs/ardour/tempo.cc:92 -msgid "TempoSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:131 -msgid "MeterSection XML node has no \"start\" property" -msgstr "" - -#: libs/ardour/tempo.cc:139 -msgid "MeterSection XML node has an illegal \"start\" value" -msgstr "" - -#: libs/ardour/tempo.cc:146 -msgid "MeterSection XML node has no \"beats-per-bar\" property" -msgstr "" - -#: libs/ardour/tempo.cc:151 -msgid "MeterSection XML node has an illegal \"beats-per-bar\" value" -msgstr "" - -#: libs/ardour/tempo.cc:156 -msgid "MeterSection XML node has no \"note-type\" property" -msgstr "" - -#: libs/ardour/tempo.cc:161 -msgid "MeterSection XML node has an illegal \"note-type\" value" -msgstr "" - -#: libs/ardour/tempo.cc:166 -msgid "MeterSection XML node has no \"movable\" property" -msgstr "" - -#: libs/ardour/tempo.cc:259 -msgid "move metric" -msgstr "" - -#: libs/ardour/tempo.cc:330 -msgid "metric removed" -msgstr "" - -#: libs/ardour/tempo.cc:373 -msgid "add tempo" -msgstr "" - -#: libs/ardour/tempo.cc:402 -msgid "replace tempo" -msgstr "" - -#: libs/ardour/tempo.cc:435 -msgid "add meter" -msgstr "" - -#: libs/ardour/tempo.cc:463 -msgid "replaced meter" -msgstr "" - -#: libs/ardour/tempo.cc:483 libs/ardour/tempo.cc:499 -msgid "programming error: no tempo section in tempo map!" -msgstr "" - -#: libs/ardour/tempo.cc:538 -msgid "programming error: unhandled MetricSection type" -msgstr "" - -#: libs/ardour/tempo.cc:1265 libs/ardour/tempo.cc:1277 -msgid "Tempo map: could not set new state, restoring old one." -msgstr "" - -#: libs/ardour/tempo.cc:1301 -msgid "load XML data" -msgstr "" - -#: libs/ardour/utils.cc:237 -msgid "illegal or badly-formed string used for path (%1)" -msgstr "" - -#: libs/ardour/utils.cc:242 -msgid "path (%1) is ambiguous" -msgstr "" - -#: libs/ardour/utils.cc:304 libs/ardour/utils.cc:323 -msgid "Splice Edit" -msgstr "Fogredigering" - -#: libs/ardour/utils.cc:306 libs/ardour/utils.cc:319 -msgid "Slide Edit" -msgstr "Glidredigering" - -#: libs/ardour/utils.cc:309 -msgid "programming error: unknown edit mode string \"%1\"" -msgstr "" - -#: libs/ardour/utils.cc:330 libs/ardour/utils.cc:359 -msgid "Internal" -msgstr "Intern" - -#: libs/ardour/utils.cc:334 libs/ardour/utils.cc:355 -msgid "MTC" -msgstr "" - -#: libs/ardour/utils.cc:338 libs/ardour/utils.cc:352 -msgid "JACK" -msgstr "" - -#: libs/ardour/utils.cc:342 -msgid "programming error: unknown slave source string \"%1\"" -msgstr "" - -#: libs/ardour/vst_plugin.cc:178 -msgid "cannot create VST chunk directory: %1" -msgstr "" - -#: libs/ardour/vst_plugin.cc:186 -msgid "cannot check VST chunk directory: %1" -msgstr "" - -#: libs/ardour/vst_plugin.cc:193 -msgid "%1 exists but is not a directory" -msgstr "" - -#: libs/ardour/vst_plugin.cc:231 -msgid "Bad node sent to VSTPlugin::set_state" -msgstr "" - -#: libs/ardour/vst_plugin.cc:334 libs/ardour/vst_plugin.cc:345 -msgid "no support for presets using chunks at this time" -msgstr "" - -#: libs/ardour/vst_plugin.cc:495 -msgid "VST: cannot load module from \"%1\"" -msgstr "" - -#: libs/ardour/vst_plugin.cc:500 -msgid "You asked ardour to not use any VST plugins" -msgstr "" - -#: libs/ardour/audio_unit.cc:48 -msgid "AudioUnit: Could not convert CAComponent to CAAudioUnit" -msgstr "" diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc deleted file mode 100644 index 7aadb9183f..0000000000 --- a/libs/ardour/port.cc +++ /dev/null @@ -1,379 +0,0 @@ -/* - Copyright (C) 2002-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -using namespace ARDOUR; -using namespace std; - -AudioEngine* Port::engine = 0; - -Port::Port (const std::string& name, Flags flgs) - : _flags (flgs) - , _name (name) - , _metering (0) - , _last_monitor (false) -{ -} - -Port::~Port () -{ - disconnect_all (); -} - -void -Port::reset () -{ - _last_monitor = false; -} - -void -Port::set_engine (AudioEngine* e) -{ - engine = e; -} - -int -Port::connect (Port& other) -{ - /* caller must hold process lock */ - - pair::iterator,bool> result; - - result = _connections.insert (&other); - - if (result.second) { - return 0; - } else { - return 1; - } -} - -int -Port::disconnect (Port& other) -{ - /* caller must hold process lock */ - - for (set::iterator i = _connections.begin(); i != _connections.end(); ++i) { - if ((*i) == &other) { - _connections.erase (i); - return 0; - } - } - - return -1; -} - - -int -Port::disconnect_all () -{ - /* caller must hold process lock */ - - _connections.clear (); - return 0; -} - -void -Port::set_latency (nframes_t val) -{ - _latency = val; -} - -bool -Port::connected() const -{ - /* caller must hold process lock */ - return !_connections.empty(); -} - -bool -Port::connected_to (const string& portname) const -{ - /* caller must hold process lock */ - - for (set::const_iterator p = _connections.begin(); p != _connections.end(); ++p) { - if ((*p)->name() == portname) { - return true; - } - } - - return false; -} - -int -Port::get_connections (vector& names) const -{ - /* caller must hold process lock */ - int i = 0; - set::const_iterator p; - - for (i = 0, p = _connections.begin(); p != _connections.end(); ++p, ++i) { - names.push_back ((*p)->name()); - } - - return i; -} - - -//------------------------------------- - -int -PortFacade::set_name (const std::string& str) -{ - int ret; - - if (_ext_port) { - if ((ret = _ext_port->set_name (str)) == 0) { - _name = _ext_port->name(); - } - } else { - _name = str; - ret = 0; - } - - return ret; -} - -string -PortFacade::short_name () const -{ - if (_ext_port) { - return _ext_port->short_name(); - } else { - return _name; - } -} - - -int -PortFacade::reestablish () -{ - if (_ext_port) { - return _ext_port->reestablish (); - } else { - return 0; - } -} - - -int -PortFacade::reconnect() -{ - if (_ext_port) { - return _ext_port->reconnect (); - } else { - return 0; - } -} - -void -PortFacade::set_latency (nframes_t val) -{ - if (_ext_port) { - _ext_port->set_latency (val); - } else { - _latency = val; - } -} - -nframes_t -PortFacade::latency() const -{ - if (_ext_port) { - return _ext_port->latency(); - } else { - return _latency; - } -} - -nframes_t -PortFacade::total_latency() const -{ - if (_ext_port) { - return _ext_port->total_latency(); - } else { - return _latency; - } -} - -bool -PortFacade::monitoring_input() const -{ - if (_ext_port) { - return _ext_port->monitoring_input (); - } else { - return false; - } -} - -void -PortFacade::ensure_monitor_input (bool yn) -{ - if (_ext_port) { - _ext_port->ensure_monitor_input (yn); - } -} - -void -PortFacade::request_monitor_input (bool yn) -{ - if (_ext_port) { - _ext_port->request_monitor_input (yn); - } -} - -int -PortFacade::connect (Port& other) -{ - int ret; - - if (_ext_port) { - ret = _ext_port->connect (other); - } else { - ret = 0; - } - - if (ret == 0) { - ret = Port::connect (other); - } - - return ret; -} - -int -PortFacade::connect (const std::string& other) -{ - PortConnectableByName* pcn; - - if (!_ext_port) { - return -1; - } - - pcn = dynamic_cast(_ext_port); - - if (pcn) { - return pcn->connect (other); - } else { - return -1; - } -} - - -int -PortFacade::disconnect (Port& other) -{ - int reta; - int retb; - - if (_ext_port) { - reta = _ext_port->disconnect (other); - } else { - reta = 0; - } - - retb = Port::disconnect (other); - - return reta || retb; -} - -int -PortFacade::disconnect_all () -{ - int reta = 0; - int retb = 0; - - if (_ext_port) { - reta = _ext_port->disconnect_all (); - } - - retb = Port::disconnect_all (); - - return reta || retb; -} - -int -PortFacade::disconnect (const std::string& other) -{ - PortConnectableByName* pcn; - - if (!_ext_port) { - return -1; - } - - pcn = dynamic_cast(_ext_port); - - if (pcn) { - return pcn->disconnect (other); - } else { - return -1; - } -} - -bool -PortFacade::connected () const -{ - if (Port::connected()) { - return true; - } - - if (_ext_port) { - return _ext_port->connected(); - } - - return false; -} -bool -PortFacade::connected_to (const std::string& portname) const -{ - if (Port::connected_to (portname)) { - return true; - } - - if (_ext_port) { - return _ext_port->connected_to (portname); - } - - return false; - -} - -int -PortFacade::get_connections (vector& names) const -{ - int i = 0; - - if (_ext_port) { - i = _ext_port->get_connections (names); - } - - i += Port::get_connections (names); - - return i; -} - -void -PortFacade::reset () -{ - Port::reset (); - - if (_ext_port) { - _ext_port->reset (); - } -} diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc deleted file mode 100644 index e14835b083..0000000000 --- a/libs/ardour/port_insert.cc +++ /dev/null @@ -1,246 +0,0 @@ -/* - Copyright (C) 2000,2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -PortInsert::PortInsert (Session& s, Placement p) - : IOProcessor (s, string_compose (_("insert %1"), (bitslot = s.next_insert_id()) + 1), p, 1, -1, 1, -1) -{ - init (); - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -PortInsert::PortInsert (const PortInsert& other) - : IOProcessor (other._session, string_compose (_("insert %1"), (bitslot = other._session.next_insert_id()) + 1), other.placement(), 1, -1, 1, -1) -{ - init (); - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -void -PortInsert::init () -{ - if (_io->add_input_port ("", this)) { - error << _("PortInsert: cannot add input port") << endmsg; - throw failed_constructor(); - } - - if (_io->add_output_port ("", this)) { - error << _("PortInsert: cannot add output port") << endmsg; - throw failed_constructor(); - } -} - -PortInsert::PortInsert (Session& s, const XMLNode& node) - : IOProcessor (s, "unnamed port insert", PreFader) -{ - if (set_state (node)) { - throw failed_constructor(); - } - - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -PortInsert::~PortInsert () -{ - GoingAway (); -} - -void -PortInsert::run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) -{ - if (_io->n_outputs().n_total() == 0) { - return; - } - - if (!active()) { - /* deliver silence */ - _io->silence (nframes, offset); - return; - } - - _io->deliver_output(bufs, start_frame, end_frame, nframes, offset); - - _io->collect_input(bufs, nframes, offset); -} - -XMLNode& -PortInsert::get_state(void) -{ - return state (true); -} - -XMLNode& -PortInsert::state (bool full) -{ - XMLNode& node = IOProcessor::state(full); - char buf[32]; - node.add_property ("type", "port"); - snprintf (buf, sizeof (buf), "%" PRIu32, bitslot); - node.add_property ("bitslot", buf); - - return node; -} - -int -PortInsert::set_state(const XMLNode& node) -{ - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - XMLPropertyList plist; - const XMLProperty *prop; - - if ((prop = node.property ("type")) == 0) { - error << _("XML node describing port insert is missing the `type' field") << endmsg; - return -1; - } - - if (prop->value() != "port") { - error << _("non-port insert XML used for port plugin insert") << endmsg; - return -1; - } - - if ((prop = node.property ("bitslot")) == 0) { - bitslot = _session.next_insert_id(); - } else { - sscanf (prop->value().c_str(), "%" PRIu32, &bitslot); - _session.mark_insert_id (bitslot); - } - - const XMLNode* insert_node = &node; - - // legacy sessions: search for child IOProcessor node - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "IOProcessor") { - insert_node = *niter; - break; - } - } - - IOProcessor::set_state (*insert_node); - - return 0; -} - -ARDOUR::nframes_t -PortInsert::signal_latency() const -{ - /* because we deliver and collect within the same cycle, - all I/O is necessarily delayed by at least frames_per_cycle(). - - if the return port for insert has its own latency, we - need to take that into account too. - */ - - return _session.engine().frames_per_cycle() + _io->input_latency(); -} - -bool -PortInsert::can_support_input_configuration (ChanCount in) const -{ - if (_io->input_maximum() == ChanCount::INFINITE && _io->output_maximum() == ChanCount::INFINITE) { - - /* not configured yet */ - - return true; /* we can support anything the first time we're asked */ - - } else { - - /* the "input" config for a port insert corresponds to how - many output ports it will have. - */ - - if (_io->output_maximum() == in) { - - return true; - } - } - - return false; -} - -ChanCount -PortInsert::output_for_input_configuration (ChanCount in) const -{ - return in; -} - -bool -PortInsert::configure_io (ChanCount in, ChanCount out) -{ - /* do not allow configuration to be changed outside the range of - the last request config. or something like that. - */ - - - /* this is a bit odd: - - the number of inputs we are required to handle corresponds - to the number of output ports we need. - - the number of outputs we are required to have corresponds - to the number of input ports we need. - */ - - _io->set_output_maximum (in); - _io->set_output_minimum (in); - _io->set_input_maximum (out); - _io->set_input_minimum (out); - - bool success = (_io->ensure_io (out, in, false, this) == 0); - - if (success) - return Processor::configure_io(in, out); - else - return false; -} - -ChanCount -PortInsert::output_streams() const -{ - return _io->n_inputs (); -} - -ChanCount -PortInsert::input_streams() const -{ - return _io->n_outputs (); -} - diff --git a/libs/ardour/port_set.cc b/libs/ardour/port_set.cc deleted file mode 100644 index 3182c2b959..0000000000 --- a/libs/ardour/port_set.cc +++ /dev/null @@ -1,126 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include - -namespace ARDOUR { - -PortSet::PortSet() -{ - for (size_t i=0; i < DataType::num_types; ++i) - _ports.push_back( PortVec() ); -} - -static bool sort_ports_by_name (Port* a, Port* b) -{ - return (a->name() < b->name()); -} - -void -PortSet::add(Port* port) -{ - PortVec& v = _ports[port->type()]; - - v.push_back(port); - sort(v.begin(), v.end(), sort_ports_by_name); - - _count.set(port->type(), _count.get(port->type()) + 1); - - assert(_count.get(port->type()) == _ports[port->type()].size()); -} - -bool -PortSet::remove(Port* port) -{ - for (std::vector::iterator l = _ports.begin(); l != _ports.end(); ++l) { - PortVec::iterator i = find(l->begin(), l->end(), port); - if (i != l->end()) { - l->erase(i); - _count.set(port->type(), _count.get(port->type()) - 1); - return true; - } - } - - return false; -} - -/** Get the total number of ports (of all types) in the PortSet - */ -size_t -PortSet::num_ports() const -{ - size_t ret = 0; - - for (std::vector::const_iterator l = _ports.begin(); l != _ports.end(); ++l) - ret += (*l).size(); - - return ret; -} - -bool -PortSet::contains(const Port* port) const -{ - for (std::vector::const_iterator l = _ports.begin(); l != _ports.end(); ++l) - if (find((*l).begin(), (*l).end(), port) != (*l).end()) - return true; - - return false; -} - -Port* -PortSet::port(size_t n) const -{ - // This is awesome. Awesomely slow. - - size_t size_so_far = 0; - - for (std::vector::const_iterator l = _ports.begin(); l != _ports.end(); ++l) { - if (n < size_so_far + (*l).size()) - return (*l)[n - size_so_far]; - else - size_so_far += (*l).size(); - } - - return NULL; // n out of range -} - -Port* -PortSet::port(DataType type, size_t n) const -{ - if (type == DataType::NIL) { - return port(n); - } else { - const PortVec& v = _ports[type]; - assert(n < v.size()); - return v[n]; - } -} - -AudioPort* -PortSet::nth_audio_port(size_t n) const -{ - return dynamic_cast(port(DataType::AUDIO, n)); -} - -MidiPort* -PortSet::nth_midi_port(size_t n) const -{ - return dynamic_cast(port(DataType::MIDI, n)); -} - -} // namepace ARDOUR diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc deleted file mode 100644 index cbbbb374fb..0000000000 --- a/libs/ardour/processor.cc +++ /dev/null @@ -1,255 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef VST_SUPPORT -#include -#endif - -#ifdef HAVE_AUDIOUNITS -#include -#endif - -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -sigc::signal Processor::ProcessorCreated; - -// Always saved as Processor, but may be IOProcessor or Send in legacy sessions -const string Processor::state_node_name = "Processor"; - -Processor::Processor(Session& session, const string& name, Placement p) - : Automatable(session, name) - , _active(false) - , _next_ab_is_active(false) - , _configured(false) - , _placement(p) - , _gui(0) -{ -} - -boost::shared_ptr -Processor::clone (boost::shared_ptr other) -{ - boost::shared_ptr send; - boost::shared_ptr port_insert; - boost::shared_ptr plugin_insert; - - if ((send = boost::dynamic_pointer_cast(other)) != 0) { - return boost::shared_ptr (new Send (*send)); - } else if ((port_insert = boost::dynamic_pointer_cast(other)) != 0) { - return boost::shared_ptr (new PortInsert (*port_insert)); - } else if ((plugin_insert = boost::dynamic_pointer_cast(other)) != 0) { - return boost::shared_ptr (new PluginInsert (*plugin_insert)); - } else { - fatal << _("programming error: unknown Processor type in Processor::Clone!\n") - << endmsg; - /*NOTREACHED*/ - } - return boost::shared_ptr(); -} - -void -Processor::set_sort_key (uint32_t key) -{ - _sort_key = key; -} - -void -Processor::set_placement (Placement p) -{ - if (_placement != p) { - _placement = p; - PlacementChanged (); /* EMIT SIGNAL */ - } -} - -void -Processor::set_active (bool yn) -{ - _active = yn; - ActiveChanged (); -} - -XMLNode& -Processor::get_state (void) -{ - return state (true); -} - -/* NODE STRUCTURE - - - - - - X1 Y1 - X2 Y2 - .... - - - -*/ - -XMLNode& -Processor::state (bool full_state) -{ - XMLNode* node = new XMLNode (state_node_name); - stringstream sstr; - - // FIXME: This conflicts with "id" used by plugin for name in legacy sessions (ugh). - // Do we need to serialize this? - /* - char buf[64]; - id().print (buf, sizeof (buf)); - node->add_property("id", buf); - */ - - node->add_property("name", _name); - node->add_property("active", active() ? "yes" : "no"); - node->add_property("placement", enum_2_string (_placement)); - - if (_extra_xml){ - node->add_child_copy (*_extra_xml); - } - - if (full_state) { - - XMLNode& automation = Automatable::get_automation_state(); - - for (set::iterator x = _visible_controls.begin(); x != _visible_controls.end(); ++x) { - if (x != _visible_controls.begin()) { - sstr << ' '; - } - sstr << *x; - } - - automation.add_property ("visible", sstr.str()); - - node->add_child_nocopy (automation); - } - - return *node; -} - -int -Processor::set_state (const XMLNode& node) -{ - const XMLProperty *prop; - - // may not exist for legacy sessions - if ((prop = node.property ("name")) != 0) { - set_name(prop->value()); - } - - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - if ((*niter)->name() == X_("Automation")) { - - - XMLProperty *prop; - - if ((prop = (*niter)->property ("path")) != 0) { - old_set_automation_state (*(*niter)); - } else { - set_automation_state (*(*niter), Parameter(PluginAutomation)); - } - - if ((prop = (*niter)->property ("visible")) != 0) { - uint32_t what; - stringstream sstr; - - _visible_controls.clear (); - - sstr << prop->value(); - while (1) { - sstr >> what; - if (sstr.fail()) { - break; - } - // FIXME: other automation types? - mark_automation_visible (Parameter(PluginAutomation, what), true); - } - } - - } else if ((*niter)->name() == "extra") { - _extra_xml = new XMLNode (*(*niter)); - } - } - - if ((prop = node.property ("active")) == 0) { - error << _("XML node describing a processor is missing the `active' field") << endmsg; - return -1; - } - - if (_active != (prop->value() == "yes")) { - _active = !_active; - ActiveChanged (); /* EMIT_SIGNAL */ - } - - if ((prop = node.property ("placement")) == 0) { - error << _("XML node describing a processor is missing the `placement' field") << endmsg; - return -1; - } - - /* hack to handle older sessions before we only used EnumWriter */ - - string pstr; - - if (prop->value() == "pre") { - pstr = "PreFader"; - } else if (prop->value() == "post") { - pstr = "PostFader"; - } else { - pstr = prop->value(); - } - - Placement p = Placement (string_2_enum (pstr, p)); - set_placement (p); - - return 0; -} - diff --git a/libs/ardour/quantize.cc b/libs/ardour/quantize.cc deleted file mode 100644 index ccbda9711a..0000000000 --- a/libs/ardour/quantize.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; - - -/** Quantize notes, valid for MIDI regions only. - * - * Q is the quantize value in beats, ie 1.0 = quantize to beats, - * 0.25 = quantize to beats/4, etc. - */ -Quantize::Quantize (Session& s, double q) - : Filter (s) - , _q(q) -{ -} - -Quantize::~Quantize () -{ -} - -int -Quantize::run (boost::shared_ptr r) -{ - boost::shared_ptr region = boost::dynamic_pointer_cast(r); - if (!region) - return -1; - - // FIXME: how to make a whole file region if it isn't? - //assert(region->whole_file()); - - boost::shared_ptr src = region->midi_source(0); - src->load_model(); - - boost::shared_ptr model = src->model(); - - // FIXME: Model really needs to be switched to beat time (double) ASAP - - const Tempo& t = session.tempo_map().tempo_at(r->start()); - const Meter& m = session.tempo_map().meter_at(r->start()); - - double q_frames = _q * (m.frames_per_bar(t, session.frame_rate()) / (double)m.beats_per_bar()); - - for (MidiModel::Notes::iterator i = model->notes().begin(); i != model->notes().end(); ++i) { - const double new_time = lrint((*i)->time() / q_frames) * q_frames; - double new_dur = lrint((*i)->duration() / q_frames) * q_frames; - if (new_dur == 0.0) - new_dur = q_frames; - - (*i)->set_time(new_time); - (*i)->set_duration(new_dur); - } - - model->set_edited(true); - - return 0; -} diff --git a/libs/ardour/rb_effect.cc b/libs/ardour/rb_effect.cc deleted file mode 100644 index 4daf5cb33a..0000000000 --- a/libs/ardour/rb_effect.cc +++ /dev/null @@ -1,298 +0,0 @@ -/* - Copyright (C) 2004-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; -using namespace RubberBand; - -Pitch::Pitch (Session& s, TimeFXRequest& req) - : RBEffect (s, req) -{ -} - -Stretch::Stretch (Session& s, TimeFXRequest& req) - : RBEffect (s, req) -{ -} - -RBEffect::RBEffect (Session& s, TimeFXRequest& req) - : Filter (s) - , tsr (req) - -{ - tsr.progress = 0.0f; -} - -RBEffect::~RBEffect () -{ -} - -int -RBEffect::run (boost::shared_ptr region) -{ - SourceList nsrcs; - nframes_t done; - int ret = -1; - const nframes_t bufsize = 256; - gain_t* gain_buffer = 0; - Sample** buffers = 0; - char suffix[32]; - string new_name; - string::size_type at; - nframes_t pos = 0; - int avail = 0; - - // note: this_time_fraction is a ratio of original length. 1.0 = no change, - // 0.5 is half as long, 2.0 is twice as long, etc. - - double this_time_fraction = tsr.time_fraction * region->stretch (); - double this_pitch_fraction = tsr.pitch_fraction * region->shift (); - - RubberBandStretcher stretcher (session.frame_rate(), region->n_channels(), - (RubberBandStretcher::Options) tsr.opts, - this_time_fraction, this_pitch_fraction); - - tsr.progress = 0.0f; - tsr.done = false; - - uint32_t channels = region->n_channels(); - nframes_t duration = region->ancestral_length(); - - stretcher.setExpectedInputDuration(duration); - stretcher.setDebugLevel(1); - - /* the name doesn't need to be super-precise, but allow for 2 fractional - digits just to disambiguate close but not identical FX - */ - - if (this_time_fraction == 1.0) { - snprintf (suffix, sizeof (suffix), "@%d", (int) floor (this_pitch_fraction * 100.0f)); - } else if (this_pitch_fraction == 1.0) { - snprintf (suffix, sizeof (suffix), "@%d", (int) floor (this_time_fraction * 100.0f)); - } else { - snprintf (suffix, sizeof (suffix), "@%d-%d", - (int) floor (this_time_fraction * 100.0f), - (int) floor (this_pitch_fraction * 100.0f)); - } - - /* create new sources */ - - if (make_new_sources (region, nsrcs, suffix)) { - goto out; - } - - gain_buffer = new gain_t[bufsize]; - buffers = new float *[channels]; - - for (uint32_t i = 0; i < channels; ++i) { - buffers[i] = new float[bufsize]; - } - - /* we read from the master (original) sources for the region, - not the ones currently in use, in case it's already been - subject to timefx. */ - - /* study first, process afterwards. */ - - pos = 0; - avail = 0; - done = 0; - - try { - while (pos < duration && !tsr.cancel) { - - nframes_t this_read = 0; - - for (uint32_t i = 0; i < channels; ++i) { - - this_read = 0; - nframes_t this_time; - - this_time = min(bufsize, duration - pos); - - this_read = region->master_read_at - (buffers[i], - buffers[i], - gain_buffer, - pos + region->position(), - this_time, - i); - - if (this_read != this_time) { - error << string_compose - (_("tempoize: error reading data from %1 at %2 (wanted %3, got %4)"), - region->name(), pos + region->position(), this_time, this_read) << endmsg; - goto out; - } - } - - pos += this_read; - done += this_read; - - tsr.progress = ((float) done / duration) * 0.25; - - stretcher.study(buffers, this_read, pos == duration); - } - - done = 0; - pos = 0; - - while (pos < duration && !tsr.cancel) { - - nframes_t this_read = 0; - - for (uint32_t i = 0; i < channels; ++i) { - - this_read = 0; - nframes_t this_time; - - this_time = min(bufsize, duration - pos); - - this_read = region->master_read_at - (buffers[i], - buffers[i], - gain_buffer, - pos + region->position(), - this_time, - i); - - if (this_read != this_time) { - error << string_compose - (_("tempoize: error reading data from %1 at %2 (wanted %3, got %4)"), - region->name(), pos + region->position(), this_time, this_read) << endmsg; - goto out; - } - } - - pos += this_read; - done += this_read; - - tsr.progress = 0.25 + ((float) done / duration) * 0.75; - - stretcher.process(buffers, this_read, pos == duration); - - int avail = 0; - - while ((avail = stretcher.available()) > 0) { - - this_read = min(bufsize, uint32_t(avail)); - - stretcher.retrieve(buffers, this_read); - - for (uint32_t i = 0; i < nsrcs.size(); ++i) { - - if (nsrcs[i]->write(buffers[i], this_read) != - this_read) { - error << string_compose (_("error writing tempo-adjusted data to %1"), nsrcs[i]->name()) << endmsg; - goto out; - } - } - } - } - - while ((avail = stretcher.available()) >= 0) { - - uint32_t this_read = min(bufsize, uint32_t(avail)); - - stretcher.retrieve(buffers, this_read); - - for (uint32_t i = 0; i < nsrcs.size(); ++i) { - - if (nsrcs[i]->write(buffers[i], this_read) != - this_read) { - error << string_compose (_("error writing tempo-adjusted data to %1"), nsrcs[i]->name()) << endmsg; - goto out; - } - } - } - - } catch (runtime_error& err) { - error << _("timefx code failure. please notify ardour-developers.") << endmsg; - error << err.what() << endmsg; - goto out; - } - - new_name = region->name(); - at = new_name.find ('@'); - - // remove any existing stretch indicator - - if (at != string::npos && at > 2) { - new_name = new_name.substr (0, at - 1); - } - - new_name += suffix; - - ret = finish (region, nsrcs, new_name); - - /* now reset ancestral data for each new region */ - - for (vector >::iterator x = results.begin(); x != results.end(); ++x) { - - (*x)->set_ancestral_data (region->ancestral_start(), - region->ancestral_length(), - this_time_fraction, - this_pitch_fraction ); - (*x)->set_master_sources (region->get_master_sources()); - } - - out: - - if (gain_buffer) { - delete [] gain_buffer; - } - - if (buffers) { - for (uint32_t i = 0; i < channels; ++i) { - delete buffers[i]; - } - delete [] buffers; - } - - if (ret || tsr.cancel) { - for (SourceList::iterator si = nsrcs.begin(); si != nsrcs.end(); ++si) { - (*si)->mark_for_remove (); - } - } - - tsr.done = true; - - return ret; -} - - - - - diff --git a/libs/ardour/recent_sessions.cc b/libs/ardour/recent_sessions.cc deleted file mode 100644 index 9b8668dd88..0000000000 --- a/libs/ardour/recent_sessions.cc +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -namespace { - - const char * const recent_file_name = "recent"; - -} // anonymous - -int -ARDOUR::read_recent_sessions (RecentSessions& rs) -{ - sys::path recent_file_path(user_config_directory()); - - recent_file_path /= recent_file_name; - - const string path = recent_file_path.to_string(); - - ifstream recent (path.c_str()); - - if (!recent) { - if (errno != ENOENT) { - error << string_compose (_("cannot open recent session file %1 (%2)"), path, strerror (errno)) << endmsg; - return -1; - } else { - return 1; - } - } - - while (true) { - - pair newpair; - - getline(recent, newpair.first); - - if (!recent.good()) { - break; - } - - getline(recent, newpair.second); - - if (!recent.good()) { - break; - } - - rs.push_back (newpair); - } - - /* display sorting should be done in the GUI, otherwise the - * natural order will be broken - */ - - return 0; -} - -int -ARDOUR::write_recent_sessions (RecentSessions& rs) -{ - sys::path recent_file_path(user_config_directory()); - - recent_file_path /= recent_file_name; - - const string path = recent_file_path.to_string(); - - ofstream recent (path.c_str()); - - if (!recent) { - return -1; - } - - for (RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) { - recent << (*i).first << '\n' << (*i).second << endl; - } - - return 0; -} - -int -ARDOUR::store_recent_sessions (string name, string path) -{ - RecentSessions rs; - - if (ARDOUR::read_recent_sessions (rs) < 0) { - return -1; - } - - pair newpair; - - newpair.first = name; - newpair.second = path; - - rs.erase(remove(rs.begin(), rs.end(), newpair), rs.end()); - - rs.push_front (newpair); - - if (rs.size() > 10) { - rs.erase(rs.begin()+10, rs.end()); - } - - return ARDOUR::write_recent_sessions (rs); -} - diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc deleted file mode 100644 index a6d153f359..0000000000 --- a/libs/ardour/region.cc +++ /dev/null @@ -1,1532 +0,0 @@ -/* - Copyright (C) 2000-2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -Change Region::FadeChanged = ARDOUR::new_change (); -Change Region::SyncOffsetChanged = ARDOUR::new_change (); -Change Region::MuteChanged = ARDOUR::new_change (); -Change Region::OpacityChanged = ARDOUR::new_change (); -Change Region::LockChanged = ARDOUR::new_change (); -Change Region::LayerChanged = ARDOUR::new_change (); -Change Region::HiddenChanged = ARDOUR::new_change (); - - -/* derived-from-derived constructor (no sources in constructor) */ -Region::Region (Session& s, nframes_t start, nframes_t length, const string& name, DataType type, layer_t layer, Region::Flag flags) - : Automatable(s, name) - , _type(type) - , _flags(flags) - , _start(start) - , _length(length) - , _position(0) - , _last_position(0) - , _positional_lock_style(AudioTime) - , _sync_position(_start) - , _layer(layer) - , _first_edit(EditChangesNothing) - , _frozen(0) - , _stretch(1.0) - , _read_data_count(0) - , _pending_changed(Change (0)) - , _last_layer_op(0) -{ - /* no sources at this point */ -} - -/** Basic Region constructor (single source) */ -Region::Region (boost::shared_ptr src, nframes_t start, nframes_t length, const string& name, DataType type, layer_t layer, Region::Flag flags) - : Automatable(src->session(), name) - , _type(type) - , _flags(flags) - , _start(start) - , _length(length) - , _position(0) - , _last_position(0) - , _positional_lock_style(AudioTime) - , _sync_position(_start) - , _layer(layer) - , _first_edit(EditChangesNothing) - , _frozen(0) - , _ancestral_start (start) - , _ancestral_length (length) - , _stretch (1.0) - , _shift (0.0) - , _valid_transients(false) - , _read_data_count(0) - , _pending_changed(Change (0)) - , _last_layer_op(0) - -{ - _sources.push_back (src); - _master_sources.push_back (src); - - src->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), src)); - - assert(_sources.size() > 0); - _positional_lock_style = AudioTime; -} - -/** Basic Region constructor (many sources) */ -Region::Region (const SourceList& srcs, nframes_t start, nframes_t length, const string& name, DataType type, layer_t layer, Region::Flag flags) - : Automatable(srcs.front()->session(), name) - , _type(type) - , _flags(flags) - , _start(start) - , _length(length) - , _position(0) - , _last_position(0) - , _positional_lock_style(AudioTime) - , _sync_position(_start) - , _layer(layer) - , _first_edit(EditChangesNothing) - , _frozen(0) - , _stretch(1.0) - , _read_data_count(0) - , _pending_changed(Change (0)) - , _last_layer_op(0) -{ - - set > unique_srcs; - - for (SourceList::const_iterator i=srcs.begin(); i != srcs.end(); ++i) { - _sources.push_back (*i); - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - unique_srcs.insert (*i); - } - - for (SourceList::const_iterator i = srcs.begin(); i != srcs.end(); ++i) { - _master_sources.push_back (*i); - if (unique_srcs.find (*i) == unique_srcs.end()) { - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - } - } - - assert(_sources.size() > 0); -} - -/** Create a new Region from part of an existing one */ -Region::Region (boost::shared_ptr other, nframes_t offset, nframes_t length, const string& name, layer_t layer, Flag flags) - : Automatable(other->session(), name) - , _type(other->data_type()) - , _flags(Flag(flags & ~(Locked|PositionLocked|WholeFile|Hidden))) - , _start(other->_start + offset) - , _length(length) - , _position(0) - , _last_position(0) - , _positional_lock_style(other->_positional_lock_style) - , _sync_position(_start) - , _layer(layer) - , _first_edit(EditChangesNothing) - , _frozen(0) - , _ancestral_start (other->_ancestral_start + offset) - , _ancestral_length (length) - , _stretch (1.0) - , _shift (0.0) - , _valid_transients(false) - , _read_data_count(0) - , _pending_changed(Change (0)) - , _last_layer_op(0) -{ - if (other->_sync_position < offset) - _sync_position = other->_sync_position; - - set > unique_srcs; - - for (SourceList::const_iterator i= other->_sources.begin(); i != other->_sources.end(); ++i) { - _sources.push_back (*i); - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - unique_srcs.insert (*i); - } - - if (other->_sync_position < offset) { - _sync_position = other->_sync_position; - } - - for (SourceList::const_iterator i = other->_master_sources.begin(); i != other->_master_sources.end(); ++i) { - if (unique_srcs.find (*i) == unique_srcs.end()) { - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - } - _master_sources.push_back (*i); - } - - assert(_sources.size() > 0); -} - -/** Pure copy constructor */ -Region::Region (boost::shared_ptr other) - : Automatable(other->session(), other->name()) - , _type(other->data_type()) - , _flags(Flag(other->_flags & ~(Locked|PositionLocked))) - , _start(other->_start) - , _length(other->_length) - , _position(other->_position) - , _last_position(other->_last_position) - , _positional_lock_style(other->_positional_lock_style) - , _sync_position(other->_sync_position) - , _layer(other->_layer) - , _first_edit(EditChangesID) - , _frozen(0) - , _ancestral_start (_start) - , _ancestral_length (_length) - , _stretch (1.0) - , _shift (0.0) - , _valid_transients(false) - , _read_data_count(0) - , _pending_changed(Change(0)) - , _last_layer_op(other->_last_layer_op) -{ - other->_first_edit = EditChangesName; - - if (other->_extra_xml) { - _extra_xml = new XMLNode (*other->_extra_xml); - } else { - _extra_xml = 0; - } - - set > unique_srcs; - - for (SourceList::const_iterator i = other->_sources.begin(); i != other->_sources.end(); ++i) { - _sources.push_back (*i); - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - unique_srcs.insert (*i); - } - - for (SourceList::const_iterator i = other->_master_sources.begin(); i != other->_master_sources.end(); ++i) { - _master_sources.push_back (*i); - if (unique_srcs.find (*i) == unique_srcs.end()) { - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - } - } - - assert(_sources.size() > 0); -} - -Region::Region (const SourceList& srcs, const XMLNode& node) - : Automatable(srcs.front()->session(), X_("error: XML did not reset this")) - , _type(DataType::NIL) // to be loaded from XML - , _flags(Flag(0)) - , _start(0) - , _length(0) - , _position(0) - , _last_position(0) - , _positional_lock_style(AudioTime) - , _sync_position(_start) - , _layer(0) - , _first_edit(EditChangesNothing) - , _frozen(0) - , _stretch(1.0) - , _read_data_count(0) - , _pending_changed(Change(0)) - , _last_layer_op(0) -{ - set > unique_srcs; - - for (SourceList::const_iterator i=srcs.begin(); i != srcs.end(); ++i) { - _sources.push_back (*i); - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - unique_srcs.insert (*i); - } - - for (SourceList::const_iterator i = srcs.begin(); i != srcs.end(); ++i) { - _master_sources.push_back (*i); - if (unique_srcs.find (*i) == unique_srcs.end()) { - (*i)->GoingAway.connect (bind (mem_fun (*this, &Region::source_deleted), (*i))); - } - } - - if (set_state (node)) { - throw failed_constructor(); - } - - assert(_type != DataType::NIL); - assert(_sources.size() > 0); -} - -Region::Region (boost::shared_ptr src, const XMLNode& node) - : Automatable(src->session(), X_("error: XML did not reset this")) - , _type(DataType::NIL) - , _flags(Flag(0)) - , _start(0) - , _length(0) - , _position(0) - , _last_position(0) - , _positional_lock_style(AudioTime) - , _sync_position(_start) - , _layer(0) - , _first_edit(EditChangesNothing) - , _frozen(0) - , _stretch(1.0) - , _read_data_count(0) - , _pending_changed(Change(0)) - , _last_layer_op(0) -{ - _sources.push_back (src); - - if (set_state (node)) { - throw failed_constructor(); - } - - assert(_type != DataType::NIL); - assert(_sources.size() > 0); -} - -Region::~Region () -{ - boost::shared_ptr pl (playlist()); - - if (pl) { - for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->remove_playlist (pl); - } - for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) { - (*i)->remove_playlist (pl); - } - } - - notify_callbacks (); - GoingAway (); /* EMIT SIGNAL */ -} - -void -Region::set_playlist (boost::weak_ptr wpl) -{ - boost::shared_ptr old_playlist = (_playlist.lock()); - - boost::shared_ptr pl (wpl.lock()); - - if (old_playlist == pl) { - return; - } - - _playlist = pl; - - if (pl) { - if (old_playlist) { - for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->remove_playlist (_playlist); - (*i)->add_playlist (pl); - } - for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) { - (*i)->remove_playlist (_playlist); - (*i)->add_playlist (pl); - } - } else { - for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->add_playlist (pl); - } - for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) { - (*i)->add_playlist (pl); - } - } - } else { - if (old_playlist) { - for (SourceList::const_iterator i = _sources.begin(); i != _sources.end(); ++i) { - (*i)->remove_playlist (old_playlist); - } - for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) { - (*i)->remove_playlist (old_playlist); - } - } - } -} - -bool -Region::set_name (const std::string& str) -{ - if (_name != str) { - SessionObject::set_name(str); // EMIT SIGNAL NameChanged() - assert(_name == str); - send_change (ARDOUR::NameChanged); - } - - return true; -} - -void -Region::set_length (nframes_t len, void *src) -{ - if (_flags & Locked) { - return; - } - - if (_length != len && len != 0) { - - /* check that the current _position wouldn't make the new - length impossible. - */ - - if (max_frames - len < _position) { - return; - } - - if (!verify_length (len)) { - return; - } - - - _last_length = _length; - _length = len; - - _flags = Region::Flag (_flags & ~WholeFile); - - first_edit (); - maybe_uncopy (); - invalidate_transients (); - - if (!_frozen) { - recompute_at_end (); - } - - send_change (LengthChanged); - } -} - -void -Region::maybe_uncopy () -{ -} - -void -Region::first_edit () -{ - boost::shared_ptr pl (playlist()); - - if (_first_edit != EditChangesNothing && pl) { - - _name = pl->session().new_region_name (_name); - _first_edit = EditChangesNothing; - - send_change (ARDOUR::NameChanged); - RegionFactory::CheckNewRegion (shared_from_this()); - } -} - -bool -Region::at_natural_position () const -{ - boost::shared_ptr pl (playlist()); - - if (!pl) { - return false; - } - - boost::shared_ptr whole_file_region = get_parent(); - - if (whole_file_region) { - if (_position == whole_file_region->position() + _start) { - return true; - } - } - - return false; -} - -void -Region::move_to_natural_position (void *src) -{ - boost::shared_ptr pl (playlist()); - - if (!pl) { - return; - } - - boost::shared_ptr whole_file_region = get_parent(); - - if (whole_file_region) { - set_position (whole_file_region->position() + _start, src); - } -} - -void -Region::special_set_position (nframes_t pos) -{ - /* this is used when creating a whole file region as - a way to store its "natural" or "captured" position. - */ - - _position = _position; - _position = pos; -} - -void -Region::set_position_lock_style (PositionLockStyle ps) -{ - boost::shared_ptr pl (playlist()); - - if (!pl) { - return; - } - - _positional_lock_style = ps; - - if (_positional_lock_style == MusicTime) { - pl->session().tempo_map().bbt_time (_position, _bbt_time); - } - -} - -void -Region::update_position_after_tempo_map_change () -{ - boost::shared_ptr pl (playlist()); - - if (!pl || _positional_lock_style != MusicTime) { - return; - } - - TempoMap& map (pl->session().tempo_map()); - nframes_t pos = map.frame_time (_bbt_time); - set_position_internal (pos, false); -} - -void -Region::set_position (nframes_t pos, void *src) -{ - if (!can_move()) { - return; - } - - set_position_internal (pos, true); -} - -void -Region::set_position_internal (nframes_t pos, bool allow_bbt_recompute) -{ - if (_position != pos) { - _last_position = _position; - _position = pos; - - /* check that the new _position wouldn't make the current - length impossible - if so, change the length. - - XXX is this the right thing to do? - */ - - if (max_frames - _length < _position) { - _last_length = _length; - _length = max_frames - _position; - } - - if (allow_bbt_recompute) { - recompute_position_from_lock_style (); - } - - invalidate_transients (); - } - - /* do this even if the position is the same. this helps out - a GUI that has moved its representation already. - */ - - send_change (PositionChanged); -} - -void -Region::set_position_on_top (nframes_t pos, void *src) -{ - if (_flags & Locked) { - return; - } - - if (_position != pos) { - _last_position = _position; - _position = pos; - } - - boost::shared_ptr pl (playlist()); - - if (pl) { - pl->raise_region_to_top (shared_from_this ()); - } - - /* do this even if the position is the same. this helps out - a GUI that has moved its representation already. - */ - - send_change (PositionChanged); -} - -void -Region::recompute_position_from_lock_style () -{ - if (_positional_lock_style == MusicTime) { - boost::shared_ptr pl (playlist()); - if (pl) { - pl->session().tempo_map().bbt_time (_position, _bbt_time); - } - } -} - -void -Region::nudge_position (nframes64_t n, void *src) -{ - if (_flags & Locked) { - return; - } - - if (n == 0) { - return; - } - - _last_position = _position; - - if (n > 0) { - if (_position > max_frames - n) { - _position = max_frames; - } else { - _position += n; - } - } else { - if (_position < (nframes_t) -n) { - _position = 0; - } else { - _position += n; - } - } - - send_change (PositionChanged); -} - -void -Region::set_ancestral_data (nframes64_t s, nframes64_t l, float st, float sh) -{ - _ancestral_length = l; - _ancestral_start = s; - _stretch = st; - _shift = sh; -} - -void -Region::set_start (nframes_t pos, void *src) -{ - if (_flags & (Locked|PositionLocked)) { - return; - } - /* This just sets the start, nothing else. It effectively shifts - the contents of the Region within the overall extent of the Source, - without changing the Region's position or length - */ - - if (_start != pos) { - - if (!verify_start (pos)) { - return; - } - - _start = pos; - _flags = Region::Flag (_flags & ~WholeFile); - first_edit (); - invalidate_transients (); - - send_change (StartChanged); - } -} - -void -Region::trim_start (nframes_t new_position, void *src) -{ - if (_flags & (Locked|PositionLocked)) { - return; - } - nframes_t new_start; - int32_t start_shift; - - if (new_position > _position) { - start_shift = new_position - _position; - } else { - start_shift = -(_position - new_position); - } - - if (start_shift > 0) { - - if (_start > max_frames - start_shift) { - new_start = max_frames; - } else { - new_start = _start + start_shift; - } - - if (!verify_start (new_start)) { - return; - } - - } else if (start_shift < 0) { - - if (_start < (nframes_t) -start_shift) { - new_start = 0; - } else { - new_start = _start + start_shift; - } - } else { - return; - } - - if (new_start == _start) { - return; - } - - _start = new_start; - _flags = Region::Flag (_flags & ~WholeFile); - first_edit (); - - send_change (StartChanged); -} - -void -Region::trim_front (nframes_t new_position, void *src) -{ - if (_flags & Locked) { - return; - } - - nframes_t end = last_frame(); - nframes_t source_zero; - - if (_position > _start) { - source_zero = _position - _start; - } else { - source_zero = 0; // its actually negative, but this will work for us - } - - if (new_position < end) { /* can't trim it zero or negative length */ - - nframes_t newlen; - - /* can't trim it back passed where source position zero is located */ - - new_position = max (new_position, source_zero); - - - if (new_position > _position) { - newlen = _length - (new_position - _position); - } else { - newlen = _length + (_position - new_position); - } - - trim_to_internal (new_position, newlen, src); - if (!_frozen) { - recompute_at_start (); - } - } -} - -void -Region::trim_end (nframes_t new_endpoint, void *src) -{ - if (_flags & Locked) { - return; - } - - if (new_endpoint > _position) { - trim_to_internal (_position, new_endpoint - _position, this); - if (!_frozen) { - recompute_at_end (); - } - } -} - -void -Region::trim_to (nframes_t position, nframes_t length, void *src) -{ - if (_flags & Locked) { - return; - } - - trim_to_internal (position, length, src); - - if (!_frozen) { - recompute_at_start (); - recompute_at_end (); - } -} - -void -Region::trim_to_internal (nframes_t position, nframes_t length, void *src) -{ - int32_t start_shift; - nframes_t new_start; - - if (_flags & Locked) { - return; - } - - if (position > _position) { - start_shift = position - _position; - } else { - start_shift = -(_position - position); - } - - if (start_shift > 0) { - - if (_start > max_frames - start_shift) { - new_start = max_frames; - } else { - new_start = _start + start_shift; - } - - - } else if (start_shift < 0) { - - if (_start < (nframes_t) -start_shift) { - new_start = 0; - } else { - new_start = _start + start_shift; - } - } else { - new_start = _start; - } - - if (!verify_start_and_length (new_start, length)) { - return; - } - - Change what_changed = Change (0); - - if (_start != new_start) { - _start = new_start; - what_changed = Change (what_changed|StartChanged); - } - if (_length != length) { - if (!_frozen) { - _last_length = _length; - } - _length = length; - what_changed = Change (what_changed|LengthChanged); - } - if (_position != position) { - if (!_frozen) { - _last_position = _position; - } - _position = position; - what_changed = Change (what_changed|PositionChanged); - } - - _flags = Region::Flag (_flags & ~WholeFile); - - if (what_changed & (StartChanged|LengthChanged)) { - first_edit (); - } - - if (what_changed) { - send_change (what_changed); - } -} - -void -Region::set_hidden (bool yn) -{ - if (hidden() != yn) { - - if (yn) { - _flags = Flag (_flags|Hidden); - } else { - _flags = Flag (_flags & ~Hidden); - } - - send_change (HiddenChanged); - } -} - -void -Region::set_muted (bool yn) -{ - if (muted() != yn) { - - if (yn) { - _flags = Flag (_flags|Muted); - } else { - _flags = Flag (_flags & ~Muted); - } - - send_change (MuteChanged); - } -} - -void -Region::set_opaque (bool yn) -{ - if (opaque() != yn) { - if (yn) { - _flags = Flag (_flags|Opaque); - } else { - _flags = Flag (_flags & ~Opaque); - } - send_change (OpacityChanged); - } -} - -void -Region::set_locked (bool yn) -{ - if (locked() != yn) { - if (yn) { - _flags = Flag (_flags|Locked); - } else { - _flags = Flag (_flags & ~Locked); - } - send_change (LockChanged); - } -} - -void -Region::set_position_locked (bool yn) -{ - if (position_locked() != yn) { - if (yn) { - _flags = Flag (_flags|PositionLocked); - } else { - _flags = Flag (_flags & ~PositionLocked); - } - send_change (LockChanged); - } -} - -void -Region::set_sync_position (nframes_t absolute_pos) -{ - nframes_t file_pos; - - file_pos = _start + (absolute_pos - _position); - - if (file_pos != _sync_position) { - - _sync_position = file_pos; - _flags = Flag (_flags|SyncMarked); - - if (!_frozen) { - maybe_uncopy (); - } - send_change (SyncOffsetChanged); - } -} - -void -Region::clear_sync_position () -{ - if (_flags & SyncMarked) { - _flags = Flag (_flags & ~SyncMarked); - - if (!_frozen) { - maybe_uncopy (); - } - send_change (SyncOffsetChanged); - } -} - -nframes_t -Region::sync_offset (int& dir) const -{ - /* returns the sync point relative the first frame of the region */ - - if (_flags & SyncMarked) { - if (_sync_position > _start) { - dir = 1; - return _sync_position - _start; - } else { - dir = -1; - return _start - _sync_position; - } - } else { - dir = 0; - return 0; - } -} - -nframes_t -Region::adjust_to_sync (nframes_t pos) -{ - int sync_dir; - nframes_t offset = sync_offset (sync_dir); - - // cerr << "adjusting pos = " << pos << " to sync at " << _sync_position << " offset = " << offset << " with dir = " << sync_dir << endl; - - if (sync_dir > 0) { - if (pos > offset) { - pos -= offset; - } else { - pos = 0; - } - } else { - if (max_frames - pos > offset) { - pos += offset; - } - } - - return pos; -} - -nframes_t -Region::sync_position() const -{ - if (_flags & SyncMarked) { - return _sync_position; - } else { - return _start; - } -} - -void -Region::raise () -{ - boost::shared_ptr pl (playlist()); - if (pl) { - pl->raise_region (shared_from_this ()); - } -} - -void -Region::lower () -{ - boost::shared_ptr pl (playlist()); - if (pl) { - pl->lower_region (shared_from_this ()); - } -} - - -void -Region::raise_to_top () -{ - boost::shared_ptr pl (playlist()); - if (pl) { - pl->raise_region_to_top (shared_from_this()); - } -} - -void -Region::lower_to_bottom () -{ - boost::shared_ptr pl (playlist()); - if (pl) { - pl->lower_region_to_bottom (shared_from_this()); - } -} - -void -Region::set_layer (layer_t l) -{ - if (_layer != l) { - _layer = l; - - send_change (LayerChanged); - } -} - -XMLNode& -Region::state (bool full_state) -{ - XMLNode *node = new XMLNode ("Region"); - char buf[64]; - const char* fe = NULL; - - _id.print (buf, sizeof (buf)); - node->add_property ("id", buf); - node->add_property ("name", _name); - node->add_property ("type", _type.to_string()); - snprintf (buf, sizeof (buf), "%u", _start); - node->add_property ("start", buf); - snprintf (buf, sizeof (buf), "%u", _length); - node->add_property ("length", buf); - snprintf (buf, sizeof (buf), "%u", _position); - node->add_property ("position", buf); - snprintf (buf, sizeof (buf), "%" PRIi64, _ancestral_start); - node->add_property ("ancestral-start", buf); - snprintf (buf, sizeof (buf), "%" PRIi64, _ancestral_length); - node->add_property ("ancestral-length", buf); - snprintf (buf, sizeof (buf), "%.12g", _stretch); - node->add_property ("stretch", buf); - snprintf (buf, sizeof (buf), "%.12g", _shift); - node->add_property ("shift", buf); - - switch (_first_edit) { - case EditChangesNothing: - fe = X_("nothing"); - break; - case EditChangesName: - fe = X_("name"); - break; - case EditChangesID: - fe = X_("id"); - break; - default: /* should be unreachable but makes g++ happy */ - fe = X_("nothing"); - break; - } - - node->add_property ("first_edit", fe); - - /* note: flags are stored by derived classes */ - - snprintf (buf, sizeof (buf), "%d", (int) _layer); - node->add_property ("layer", buf); - snprintf (buf, sizeof (buf), "%" PRIu32, _sync_position); - node->add_property ("sync-position", buf); - - if (_positional_lock_style != AudioTime) { - node->add_property ("positional-lock-style", enum_2_string (_positional_lock_style)); - stringstream str; - str << _bbt_time; - node->add_property ("bbt-position", str.str()); - } - - return *node; -} - -XMLNode& -Region::get_state () -{ - return state (true); -} - -int -Region::set_live_state (const XMLNode& node, Change& what_changed, bool send) -{ - const XMLNodeList& nlist = node.children(); - const XMLProperty *prop; - nframes_t val; - - /* this is responsible for setting those aspects of Region state - that are mutable after construction. - */ - - if ((prop = node.property ("name")) == 0) { - error << _("XMLNode describing a Region is incomplete (no name)") << endmsg; - return -1; - } - - _name = prop->value(); - - if ((prop = node.property ("type")) == 0) { - _type = DataType::AUDIO; - } else { - _type = DataType(prop->value()); - } - - if ((prop = node.property ("start")) != 0) { - sscanf (prop->value().c_str(), "%" PRIu32, &val); - if (val != _start) { - what_changed = Change (what_changed|StartChanged); - _start = val; - } - } else { - _start = 0; - } - - if ((prop = node.property ("length")) != 0) { - sscanf (prop->value().c_str(), "%" PRIu32, &val); - if (val != _length) { - what_changed = Change (what_changed|LengthChanged); - _last_length = _length; - _length = val; - } - } else { - _last_length = _length; - _length = 1; - } - - if ((prop = node.property ("position")) != 0) { - sscanf (prop->value().c_str(), "%" PRIu32, &val); - if (val != _position) { - what_changed = Change (what_changed|PositionChanged); - _last_position = _position; - _position = val; - } - } else { - _last_position = _position; - _position = 0; - } - - if ((prop = node.property ("layer")) != 0) { - layer_t x; - x = (layer_t) atoi (prop->value().c_str()); - if (x != _layer) { - what_changed = Change (what_changed|LayerChanged); - _layer = x; - } - } else { - _layer = 0; - } - - if ((prop = node.property ("sync-position")) != 0) { - sscanf (prop->value().c_str(), "%" PRIu32, &val); - if (val != _sync_position) { - what_changed = Change (what_changed|SyncOffsetChanged); - _sync_position = val; - } - } else { - _sync_position = _start; - } - - if ((prop = node.property ("positional-lock-style")) != 0) { - _positional_lock_style = PositionLockStyle (string_2_enum (prop->value(), _positional_lock_style)); - - if (_positional_lock_style == MusicTime) { - if ((prop = node.property ("bbt-position")) == 0) { - /* missing BBT info, revert to audio time locking */ - _positional_lock_style = AudioTime; - } else { - if (sscanf (prop->value().c_str(), "%d|%d|%d", - &_bbt_time.bars, - &_bbt_time.beats, - &_bbt_time.ticks) != 3) { - _positional_lock_style = AudioTime; - } - } - } - - } else { - _positional_lock_style = AudioTime; - } - - /* XXX FIRST EDIT !!! */ - - /* these 3 properties never change as a result of any editing */ - - if ((prop = node.property ("ancestral-start")) != 0) { - _ancestral_start = atoi (prop->value()); - } else { - _ancestral_start = _start; - } - - if ((prop = node.property ("ancestral-length")) != 0) { - _ancestral_length = atoi (prop->value()); - } else { - _ancestral_length = _length; - } - - if ((prop = node.property ("stretch")) != 0) { - _stretch = atof (prop->value()); - } else { - _stretch = 1.0; - } - - if ((prop = node.property ("shift")) != 0) { - _shift = atof (prop->value()); - } else { - _shift = 1.0; - } - - /* note: derived classes set flags */ - - if (_extra_xml) { - delete _extra_xml; - _extra_xml = 0; - } - - for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) { - - XMLNode *child; - - child = (*niter); - - if (child->name () == "extra") { - _extra_xml = new XMLNode (*child); - break; - } - } - - if (send) { - send_change (what_changed); - } - - return 0; -} - -int -Region::set_state (const XMLNode& node) -{ - const XMLProperty *prop; - Change what_changed = Change (0); - - /* ID is not allowed to change, ever */ - - if ((prop = node.property ("id")) == 0) { - error << _("Session: XMLNode describing a Region is incomplete (no id)") << endmsg; - return -1; - } - - _id = prop->value(); - - _first_edit = EditChangesNothing; - - set_live_state (node, what_changed, true); - - return 0; -} - -void -Region::freeze () -{ - _frozen++; - _last_length = _length; - _last_position = _position; -} - -void -Region::thaw (const string& why) -{ - Change what_changed = Change (0); - - { - Glib::Mutex::Lock lm (_lock); - - if (_frozen && --_frozen > 0) { - return; - } - - if (_pending_changed) { - what_changed = _pending_changed; - _pending_changed = Change (0); - } - } - - if (what_changed == Change (0)) { - return; - } - - if (what_changed & LengthChanged) { - if (what_changed & PositionChanged) { - recompute_at_start (); - } - recompute_at_end (); - } - - StateChanged (what_changed); -} - -void -Region::send_change (Change what_changed) -{ - { - Glib::Mutex::Lock lm (_lock); - if (_frozen) { - _pending_changed = Change (_pending_changed|what_changed); - return; - } - } - - StateChanged (what_changed); -} - -void -Region::set_last_layer_op (uint64_t when) -{ - _last_layer_op = when; -} - -bool -Region::overlap_equivalent (boost::shared_ptr other) const -{ - return coverage (other->first_frame(), other->last_frame()) != OverlapNone; -} - -bool -Region::equivalent (boost::shared_ptr other) const -{ - return _start == other->_start && - _position == other->_position && - _length == other->_length; -} - -bool -Region::size_equivalent (boost::shared_ptr other) const -{ - return _start == other->_start && - _length == other->_length; -} - -bool -Region::region_list_equivalent (boost::shared_ptr other) const -{ - return size_equivalent (other) && source_equivalent (other) && _name == other->_name; -} - -void -Region::source_deleted (boost::shared_ptr) -{ - _sources.clear (); - drop_references (); -} - -vector -Region::master_source_names () -{ - SourceList::iterator i; - - vector names; - for (i = _master_sources.begin(); i != _master_sources.end(); ++i) { - names.push_back((*i)->name()); - } - - return names; -} - -void -Region::set_master_sources (SourceList& srcs) -{ - _master_sources = srcs; -} - -bool -Region::source_equivalent (boost::shared_ptr other) const -{ - if (!other) - return false; - - SourceList::const_iterator i; - SourceList::const_iterator io; - - for (i = _sources.begin(), io = other->_sources.begin(); i != _sources.end() && io != other->_sources.end(); ++i, ++io) { - if ((*i)->id() != (*io)->id()) { - return false; - } - } - - for (i = _master_sources.begin(), io = other->_master_sources.begin(); i != _master_sources.end() && io != other->_master_sources.end(); ++i, ++io) { - if ((*i)->id() != (*io)->id()) { - return false; - } - } - - return true; -} - -bool -Region::verify_length (nframes_t len) -{ - if (source() && (source()->destructive() || source()->length_mutable())) { - return true; - } - - nframes_t maxlen = 0; - - for (uint32_t n=0; n < _sources.size(); ++n) { - maxlen = max (maxlen, _sources[n]->length() - _start); - } - - len = min (len, maxlen); - - return true; -} - -bool -Region::verify_start_and_length (nframes_t new_start, nframes_t& new_length) -{ - if (source() && (source()->destructive() || source()->length_mutable())) { - return true; - } - - nframes_t maxlen = 0; - - for (uint32_t n=0; n < _sources.size(); ++n) { - maxlen = max (maxlen, _sources[n]->length() - new_start); - } - - new_length = min (new_length, maxlen); - - return true; -} - -bool -Region::verify_start (nframes_t pos) -{ - if (source() && (source()->destructive() || source()->length_mutable())) { - return true; - } - - for (uint32_t n=0; n < _sources.size(); ++n) { - if (pos > _sources[n]->length() - _length) { - return false; - } - } - return true; -} - -bool -Region::verify_start_mutable (nframes_t& new_start) -{ - if (source() && (source()->destructive() || source()->length_mutable())) { - return true; - } - - for (uint32_t n=0; n < _sources.size(); ++n) { - if (new_start > _sources[n]->length() - _length) { - new_start = _sources[n]->length() - _length; - } - } - return true; -} - -boost::shared_ptr -Region::get_parent() const -{ - boost::shared_ptr pl (playlist()); - - if (pl) { - boost::shared_ptr r; - boost::shared_ptr grrr2 = boost::dynamic_pointer_cast (shared_from_this()); - - if (grrr2 && (r = pl->session().find_whole_file_parent (grrr2))) { - return boost::static_pointer_cast (r); - } - } - - return boost::shared_ptr(); -} - -int -Region::apply (Filter& filter) -{ - return filter.run (shared_from_this()); -} - - -void -Region::invalidate_transients () -{ - _valid_transients = false; - _transients.clear (); -} - diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc deleted file mode 100644 index 84d8167240..0000000000 --- a/libs/ardour/region_factory.cc +++ /dev/null @@ -1,181 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -sigc::signal > RegionFactory::CheckNewRegion; - -boost::shared_ptr -RegionFactory::create (boost::shared_ptr region, nframes_t start, - nframes_t length, std::string name, - layer_t layer, Region::Flag flags, bool announce) -{ - boost::shared_ptr other_a; - boost::shared_ptr other_m; - - if ((other_a = boost::dynamic_pointer_cast(region)) != 0) { - AudioRegion* ar = new AudioRegion (other_a, start, length, name, layer, flags); - boost::shared_ptr arp (ar); - boost::shared_ptr ret (boost::static_pointer_cast (arp)); - if (announce) { - CheckNewRegion (ret); - } - return ret; - } else if ((other_m = boost::dynamic_pointer_cast(region)) != 0) { - MidiRegion* ar = new MidiRegion (other_m, start, length, name, layer, flags); - boost::shared_ptr arp (ar); - boost::shared_ptr ret (boost::static_pointer_cast (arp)); - if (announce) { - CheckNewRegion (ret); - } - return ret; - } else { - fatal << _("programming error: RegionFactory::create() called with unknown Region type") - << endmsg; - /*NOTREACHED*/ - return boost::shared_ptr(); - } -} - -boost::shared_ptr -RegionFactory::create (boost::shared_ptr region) -{ - boost::shared_ptr ar; - boost::shared_ptr mr; - - if ((ar = boost::dynamic_pointer_cast(region)) != 0) { - boost::shared_ptr ret (new AudioRegion (ar)); - /* pure copy constructor - no CheckNewRegion emitted */ - return ret; - } else if ((mr = boost::dynamic_pointer_cast(region)) != 0) { - boost::shared_ptr ret (new MidiRegion (mr)); - /* pure copy constructor - no CheckNewRegion emitted */ - return ret; - } else { - fatal << _("programming error: RegionFactory::create() called with unknown Region type") - << endmsg; - /*NOTREACHED*/ - return boost::shared_ptr(); - } -} - -boost::shared_ptr -RegionFactory::create (boost::shared_ptr region, nframes_t start, - nframes_t length, std::string name, - layer_t layer, Region::Flag flags, bool announce) -{ - return create (boost::static_pointer_cast (region), start, length, name, layer, flags, announce); -} - -boost::shared_ptr -RegionFactory::create (Session& session, XMLNode& node, bool yn) -{ - boost::shared_ptr r = session.XMLRegionFactory (node, yn); - CheckNewRegion (r); - return r; -} - -boost::shared_ptr -RegionFactory::create (const SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce) -{ - if (srcs.empty()) { - return boost::shared_ptr(); - } - - if (srcs[0]->type() == DataType::AUDIO) { - - AudioRegion* ar = new AudioRegion (srcs, start, length, name, layer, flags); - boost::shared_ptr arp (ar); - boost::shared_ptr ret (boost::static_pointer_cast (arp)); - if (announce) { - CheckNewRegion (ret); - } - return ret; - - } else if (srcs[0]->type() == DataType::MIDI) { - - MidiRegion* ar = new MidiRegion (srcs, start, length, name, layer, flags); - boost::shared_ptr mrp (ar); - boost::shared_ptr ret (boost::static_pointer_cast (mrp)); - if (announce) { - CheckNewRegion (ret); - } - return ret; - - } - - return boost::shared_ptr (); -} - -boost::shared_ptr -RegionFactory::create (SourceList& srcs, const XMLNode& node) -{ - if (srcs.empty()) { - return boost::shared_ptr(); - } - - if (srcs[0]->type() == DataType::AUDIO) { - boost::shared_ptr ret (new AudioRegion (srcs, node)); - CheckNewRegion (ret); - return ret; - } else if (srcs[0]->type() == DataType::MIDI) { - boost::shared_ptr ret (new MidiRegion (srcs, node)); - CheckNewRegion (ret); - return ret; - } - - return boost::shared_ptr (); -} - -boost::shared_ptr -RegionFactory::create (boost::shared_ptr src, nframes_t start, nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce) -{ - boost::shared_ptr as; - boost::shared_ptr ms; - - if ((as = boost::dynamic_pointer_cast(src)) != 0) { - boost::shared_ptr ret (new AudioRegion (as, start, length, name, layer, flags)); - if (announce) { - CheckNewRegion (ret); - } - return ret; - } else if ((ms = boost::dynamic_pointer_cast(src)) != 0) { - boost::shared_ptr ret (new MidiRegion (ms, start, length, name, layer, flags)); - if (announce) { - CheckNewRegion (ret); - } - return ret; - } - - return boost::shared_ptr(); -} diff --git a/libs/ardour/resampled_source.cc b/libs/ardour/resampled_source.cc deleted file mode 100644 index 083fde95a1..0000000000 --- a/libs/ardour/resampled_source.cc +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -const uint32_t ResampledImportableSource::blocksize = 16384U; - -ResampledImportableSource::ResampledImportableSource (boost::shared_ptr src, nframes_t rate, SrcQuality srcq) - : source (src) -{ - int err; - - source->seek (0); - - /* Initialize the sample rate converter. */ - - int src_type = SRC_LINEAR; - - switch (srcq) { - case SrcBest: - src_type = SRC_SINC_BEST_QUALITY; - break; - case SrcGood: - src_type = SRC_SINC_MEDIUM_QUALITY; - break; - case SrcQuick: - src_type = SRC_SINC_FASTEST; - break; - case SrcFast: - src_type = SRC_ZERO_ORDER_HOLD; - break; - case SrcFastest: - src_type = SRC_LINEAR; - break; - } - - if ((src_state = src_new (src_type, source->channels(), &err)) == 0) { - error << string_compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ; - throw failed_constructor (); - } - - src_data.end_of_input = 0 ; /* Set this later. */ - - /* Start with zero to force load in while loop. */ - - src_data.input_frames = 0 ; - src_data.data_in = input ; - - src_data.src_ratio = ((float) rate) / source->samplerate(); - - input = new float[blocksize]; -} - -ResampledImportableSource::~ResampledImportableSource () -{ - src_state = src_delete (src_state) ; - delete [] input; -} - -nframes_t -ResampledImportableSource::read (Sample* output, nframes_t nframes) -{ - int err; - - /* If the input buffer is empty, refill it. */ - - if (src_data.input_frames == 0) { - - src_data.input_frames = source->read (input, blocksize); - - /* The last read will not be a full buffer, so set end_of_input. */ - - if ((nframes_t) src_data.input_frames < blocksize) { - src_data.end_of_input = true; - } - - src_data.input_frames /= source->channels(); - src_data.data_in = input; - } - - src_data.data_out = output; - - if (!src_data.end_of_input) { - src_data.output_frames = nframes / source->channels(); - } else { - src_data.output_frames = src_data.input_frames; - } - - if ((err = src_process (src_state, &src_data))) { - error << string_compose(_("Import: %1"), src_strerror (err)) << endmsg ; - return 0 ; - } - - /* Terminate if at end */ - - if (src_data.end_of_input && src_data.output_frames_gen == 0) { - return 0; - } - - src_data.data_in += src_data.input_frames_used * source->channels(); - src_data.input_frames -= src_data.input_frames_used ; - - return src_data.output_frames_gen * source->channels(); -} - diff --git a/libs/ardour/reverse.cc b/libs/ardour/reverse.cc deleted file mode 100644 index 02ec2924b0..0000000000 --- a/libs/ardour/reverse.cc +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; - -Reverse::Reverse (Session& s) - : Filter (s) -{ -} - -Reverse::~Reverse () -{ -} - -int -Reverse::run (boost::shared_ptr r) -{ - SourceList nsrcs; - SourceList::iterator si; - nframes_t blocksize = 256 * 1024; - Sample* buf = 0; - nframes_t fpos; - nframes_t fstart; - nframes_t to_read; - int ret = -1; - - boost::shared_ptr region = boost::dynamic_pointer_cast(r); - if (!region) - return ret; - - /* create new sources */ - - if (make_new_sources (region, nsrcs)) { - goto out; - } - - fstart = region->start(); - - if (blocksize > region->length()) { - blocksize = region->length(); - } - - fpos = max (fstart, (fstart + region->length() - blocksize)); - buf = new Sample[blocksize]; - to_read = blocksize; - - /* now read it backwards */ - - while (to_read) { - - uint32_t n; - - for (n = 0, si = nsrcs.begin(); n < region->n_channels(); ++n, ++si) { - - /* read it in */ - - if (region->audio_source (n)->read (buf, fpos, to_read) != to_read) { - goto out; - } - - /* swap memory order */ - - for (nframes_t i = 0; i < to_read/2; ++i) { - swap (buf[i],buf[to_read-1-i]); - } - - /* write it out */ - - boost::shared_ptr asrc(boost::dynamic_pointer_cast(*si)); - - if (asrc && asrc->write (buf, to_read) != to_read) { - goto out; - } - } - - if (fpos > fstart + blocksize) { - fpos -= to_read; - to_read = blocksize; - } else { - to_read = fpos - fstart; - fpos = fstart; - } - }; - - ret = finish (region, nsrcs); - - out: - - if (buf) { - delete [] buf; - } - - if (ret) { - for (si = nsrcs.begin(); si != nsrcs.end(); ++si) { - boost::shared_ptr asrc(boost::dynamic_pointer_cast(*si)); - asrc->mark_for_remove (); - } - } - - return ret; -} diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc deleted file mode 100644 index e655efedb2..0000000000 --- a/libs/ardour/route.cc +++ /dev/null @@ -1,2676 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -uint32_t Route::order_key_cnt = 0; -sigc::signal Route::SyncOrderKeys; - -Route::Route (Session& sess, string name, int input_min, int input_max, int output_min, int output_max, Flag flg, DataType default_type) - : IO (sess, name, input_min, input_max, output_min, output_max, default_type), - _flags (flg), - _solo_control (new ToggleControllable (X_("solo"), *this, ToggleControllable::SoloControl)), - _mute_control (new ToggleControllable (X_("mute"), *this, ToggleControllable::MuteControl)) -{ - init (); -} - -Route::Route (Session& sess, const XMLNode& node, DataType default_type) - : IO (sess, *node.child ("IO"), default_type), - _solo_control (new ToggleControllable (X_("solo"), *this, ToggleControllable::SoloControl)), - _mute_control (new ToggleControllable (X_("mute"), *this, ToggleControllable::MuteControl)) -{ - init (); - _set_state (node, false); -} - -void -Route::init () -{ - processor_max_outs.reset(); - _muted = false; - _soloed = false; - _solo_safe = false; - _recordable = true; - _active = true; - _phase_invert = false; - _denormal_protection = false; - order_keys[strdup (N_("signal"))] = order_key_cnt++; - _silent = false; - _meter_point = MeterPostFader; - _initial_delay = 0; - _roll_delay = 0; - _own_latency = 0; - _user_latency = 0; - _have_internal_generator = false; - _declickable = false; - _pending_declick = true; - _remote_control_id = 0; - - _edit_group = 0; - _mix_group = 0; - - _mute_affects_pre_fader = Config->get_mute_affects_pre_fader(); - _mute_affects_post_fader = Config->get_mute_affects_post_fader(); - _mute_affects_control_outs = Config->get_mute_affects_control_outs(); - _mute_affects_main_outs = Config->get_mute_affects_main_outs(); - - solo_gain = 1.0; - desired_solo_gain = 1.0; - mute_gain = 1.0; - desired_mute_gain = 1.0; - - _control_outs = 0; - - input_changed.connect (mem_fun (this, &Route::input_change_handler)); - output_changed.connect (mem_fun (this, &Route::output_change_handler)); -} - -Route::~Route () -{ - clear_processors (PreFader); - clear_processors (PostFader); - - for (OrderKeys::iterator i = order_keys.begin(); i != order_keys.end(); ++i) { - free ((void*)(i->first)); - } - - if (_control_outs) { - delete _control_outs; - } -} - -void -Route::set_remote_control_id (uint32_t id) -{ - if (id != _remote_control_id) { - _remote_control_id = id; - RemoteControlIDChanged (); - } -} - -uint32_t -Route::remote_control_id() const -{ - return _remote_control_id; -} - -long -Route::order_key (const char* name) const -{ - OrderKeys::const_iterator i; - - for (i = order_keys.begin(); i != order_keys.end(); ++i) { - if (!strcmp (name, i->first)) { - return i->second; - } - } - - return -1; -} - -void -Route::set_order_key (const char* name, long n) -{ - order_keys[strdup(name)] = n; - - if (Config->get_sync_all_route_ordering()) { - for (OrderKeys::iterator x = order_keys.begin(); x != order_keys.end(); ++x) { - x->second = n; - } - } - - _session.set_dirty (); -} - -void -Route::sync_order_keys () -{ - uint32_t key; - - if (order_keys.empty()) { - return; - } - - OrderKeys::iterator x = order_keys.begin(); - key = x->second; - ++x; - - for (; x != order_keys.end(); ++x) { - x->second = key; - } -} - -string -Route::ensure_track_or_route_name(string name, Session &session) -{ - string newname = name; - - while (session.route_by_name (newname)!=NULL) - { - newname = bump_name_once (newname); - } - - return newname; -} - - -void -Route::inc_gain (gain_t fraction, void *src) -{ - IO::inc_gain (fraction, src); -} - -void -Route::set_gain (gain_t val, void *src) -{ - if (src != 0 && _mix_group && src != _mix_group && _mix_group->is_active()) { - - if (_mix_group->is_relative()) { - - gain_t usable_gain = gain(); - if (usable_gain < 0.000001f) { - usable_gain = 0.000001f; - } - - gain_t delta = val; - if (delta < 0.000001f) { - delta = 0.000001f; - } - - delta -= usable_gain; - - if (delta == 0.0f) - return; - - gain_t factor = delta / usable_gain; - - if (factor > 0.0f) { - factor = _mix_group->get_max_factor(factor); - if (factor == 0.0f) { - _gain_control->Changed(); /* EMIT SIGNAL */ - return; - } - } else { - factor = _mix_group->get_min_factor(factor); - if (factor == 0.0f) { - _gain_control->Changed(); /* EMIT SIGNAL */ - return; - } - } - - _mix_group->apply (&Route::inc_gain, factor, _mix_group); - - } else { - - _mix_group->apply (&Route::set_gain, val, _mix_group); - } - - return; - } - - if (val == gain()) { - return; - } - - IO::set_gain (val, src); -} - -/** Process this route for one (sub) cycle (process thread) - * - * @param bufs Scratch buffers to use for the signal path - * @param start_frame Initial transport frame - * @param end_frame Final transport frame - * @param nframes Number of frames to output (to ports) - * @param offset Output offset (of port buffers, for split cycles) - * - * Note that (end_frame - start_frame) may not be equal to nframes when the - * transport speed isn't 1.0 (eg varispeed). - */ -void -Route::process_output_buffers (BufferSet& bufs, - nframes_t start_frame, nframes_t end_frame, - nframes_t nframes, nframes_t offset, bool with_processors, int declick, - bool meter) -{ - // This is definitely very audio-only for now - assert(_default_type == DataType::AUDIO); - - ProcessorList::iterator i; - bool post_fader_work = false; - bool mute_declick_applied = false; - gain_t dmg, dsg, dg; - IO *co; - bool mute_audible; - bool solo_audible; - bool no_monitor; - gain_t* gab = _session.gain_automation_buffer(); - - switch (Config->get_monitoring_model()) { - case HardwareMonitoring: - case ExternalMonitoring: - no_monitor = true; - break; - default: - no_monitor = false; - } - - declick = _pending_declick; - - { - Glib::Mutex::Lock cm (_control_outs_lock, Glib::TRY_LOCK); - - if (cm.locked()) { - co = _control_outs; - } else { - co = 0; - } - } - - { - Glib::Mutex::Lock dm (declick_lock, Glib::TRY_LOCK); - - if (dm.locked()) { - dmg = desired_mute_gain; - dsg = desired_solo_gain; - dg = _desired_gain; - } else { - dmg = mute_gain; - dsg = solo_gain; - dg = _gain; - } - } - - /* ---------------------------------------------------------------------------------------------------- - GLOBAL DECLICK (for transport changes etc.) - -------------------------------------------------------------------------------------------------- */ - - if (declick > 0) { - Amp::run_in_place (bufs, nframes, 0.0, 1.0, false); - _pending_declick = 0; - } else if (declick < 0) { - Amp::run_in_place (bufs, nframes, 1.0, 0.0, false); - _pending_declick = 0; - } else { - - /* no global declick */ - - if (solo_gain != dsg) { - Amp::run_in_place (bufs, nframes, solo_gain, dsg, false); - solo_gain = dsg; - } - } - - - /* ---------------------------------------------------------------------------------------------------- - INPUT METERING & MONITORING - -------------------------------------------------------------------------------------------------- */ - - if (meter && (_meter_point == MeterInput)) { - _meter->run_in_place(bufs, start_frame, end_frame, nframes, offset); - } - - if (!_soloed && _mute_affects_pre_fader && (mute_gain != dmg)) { - Amp::run_in_place (bufs, nframes, mute_gain, dmg, false); - mute_gain = dmg; - mute_declick_applied = true; - } - - if ((_meter_point == MeterInput) && co) { - - solo_audible = dsg > 0; - mute_audible = dmg > 0;// || !_mute_affects_pre_fader; - - if ( // muted by solo of another track - - !solo_audible || - - // muted by mute of this track - - !mute_audible || - - // rec-enabled but not s/w monitoring - - // TODO: this is probably wrong - - (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording())) - - ) { - - co->silence (nframes, offset); - - } else { - - co->deliver_output (bufs, start_frame, end_frame, nframes, offset); - - } - } - - /* ----------------------------------------------------------------------------------------------------- - DENORMAL CONTROL - -------------------------------------------------------------------------------------------------- */ - - if (_denormal_protection || Config->get_denormal_protection()) { - - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const sp = i->data(); - - for (nframes_t nx = offset; nx < nframes + offset; ++nx) { - sp[nx] += 1.0e-27f; - } - } - } - - /* ---------------------------------------------------------------------------------------------------- - PRE-FADER REDIRECTS - -------------------------------------------------------------------------------------------------- */ - - if (with_processors) { - Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK); - if (rm.locked()) { - if (mute_gain > 0 || !_mute_affects_pre_fader) { - for (i = _processors.begin(); i != _processors.end(); ++i) { - switch ((*i)->placement()) { - case PreFader: - (*i)->run_in_place (bufs, start_frame, end_frame, nframes, offset); - break; - case PostFader: - post_fader_work = true; - break; - } - } - } else { - for (i = _processors.begin(); i != _processors.end(); ++i) { - switch ((*i)->placement()) { - case PreFader: - (*i)->silence (nframes, offset); - break; - case PostFader: - post_fader_work = true; - break; - } - } - } - } - } - - // This really should already be true... - bufs.set_count(pre_fader_streams()); - - if (!_soloed && (mute_gain != dmg) && !mute_declick_applied && _mute_affects_post_fader) { - Amp::run_in_place (bufs, nframes, mute_gain, dmg, false); - mute_gain = dmg; - mute_declick_applied = true; - } - - /* ---------------------------------------------------------------------------------------------------- - PRE-FADER METERING & MONITORING - -------------------------------------------------------------------------------------------------- */ - - if (meter && (_meter_point == MeterPreFader)) { - _meter->run_in_place(bufs, start_frame, end_frame, nframes, offset); - } - - - if ((_meter_point == MeterPreFader) && co) { - - solo_audible = dsg > 0; - mute_audible = dmg > 0 || !_mute_affects_pre_fader; - - if ( // muted by solo of another track - - !solo_audible || - - // muted by mute of this track - - !mute_audible || - - // rec-enabled but not s/w monitoring - - (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording())) - - ) { - - co->silence (nframes, offset); - - } else { - - co->deliver_output (bufs, start_frame, end_frame, nframes, offset); - } - } - - /* ---------------------------------------------------------------------------------------------------- - GAIN STAGE - -------------------------------------------------------------------------------------------------- */ - - /* if not recording or recording and requiring any monitor signal, then apply gain */ - - if ( // not recording - - !(record_enabled() && _session.actively_recording()) || - - // OR recording - - // AND software monitoring required - - Config->get_monitoring_model() == SoftwareMonitoring) { - - if (apply_gain_automation) { - - if (_phase_invert) { - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const sp = i->data(); - - for (nframes_t nx = 0; nx < nframes; ++nx) { - sp[nx] *= -gab[nx]; - } - } - } else { - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const sp = i->data(); - - for (nframes_t nx = 0; nx < nframes; ++nx) { - sp[nx] *= gab[nx]; - } - } - } - - if (apply_gain_automation && _session.transport_rolling() && nframes > 0) { - _effective_gain = gab[nframes-1]; - } - - } else { - - /* manual (scalar) gain */ - - if (_gain != dg) { - - Amp::run_in_place (bufs, nframes, _gain, dg, _phase_invert); - _gain = dg; - - } else if (_gain != 0 && (_phase_invert || _gain != 1.0)) { - - /* no need to interpolate current gain value, - but its non-unity, so apply it. if the gain - is zero, do nothing because we'll ship silence - below. - */ - - gain_t this_gain; - - if (_phase_invert) { - this_gain = -_gain; - } else { - this_gain = _gain; - } - - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const sp = i->data(); - apply_gain_to_buffer(sp,nframes,this_gain); - } - - } else if (_gain == 0) { - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - i->clear(); - } - } - } - - } else { - - /* actively recording, no monitoring required; leave buffers as-is to save CPU cycles */ - - } - - /* ---------------------------------------------------------------------------------------------------- - POST-FADER REDIRECTS - -------------------------------------------------------------------------------------------------- */ - - /* note that post_fader_work cannot be true unless with_processors was also true, so don't test both */ - - if (post_fader_work) { - - Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK); - if (rm.locked()) { - if (mute_gain > 0 || !_mute_affects_post_fader) { - for (i = _processors.begin(); i != _processors.end(); ++i) { - switch ((*i)->placement()) { - case PreFader: - break; - case PostFader: - (*i)->run_in_place (bufs, start_frame, end_frame, nframes, offset); - break; - } - } - } else { - for (i = _processors.begin(); i != _processors.end(); ++i) { - switch ((*i)->placement()) { - case PreFader: - break; - case PostFader: - (*i)->silence (nframes, offset); - break; - } - } - } - } - } - - if (!_soloed && (mute_gain != dmg) && !mute_declick_applied && _mute_affects_control_outs) { - Amp::run_in_place (bufs, nframes, mute_gain, dmg, false); - mute_gain = dmg; - mute_declick_applied = true; - } - - /* ---------------------------------------------------------------------------------------------------- - CONTROL OUTPUT STAGE - -------------------------------------------------------------------------------------------------- */ - - if ((_meter_point == MeterPostFader) && co) { - - solo_audible = solo_gain > 0; - mute_audible = dmg > 0 || !_mute_affects_control_outs; - - if ( // silent anyway - - (_gain == 0 && !apply_gain_automation) || - - // muted by solo of another track - - !solo_audible || - - // muted by mute of this track - - !mute_audible || - - // recording but not s/w monitoring - - (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording())) - - ) { - - co->silence (nframes, offset); - - } else { - - co->deliver_output (bufs, start_frame, end_frame, nframes, offset); - } - } - - /* ---------------------------------------------------------------------- - GLOBAL MUTE - ----------------------------------------------------------------------*/ - - if (!_soloed && (mute_gain != dmg) && !mute_declick_applied && _mute_affects_main_outs) { - Amp::run_in_place (bufs, nframes, mute_gain, dmg, false); - mute_gain = dmg; - mute_declick_applied = true; - } - - /* ---------------------------------------------------------------------------------------------------- - MAIN OUTPUT STAGE - -------------------------------------------------------------------------------------------------- */ - - solo_audible = dsg > 0; - mute_audible = dmg > 0 || !_mute_affects_main_outs; - - if (n_outputs().get(_default_type) == 0) { - - /* relax */ - - } else if (no_monitor && record_enabled() && (!Config->get_auto_input() || _session.actively_recording())) { - - IO::silence (nframes, offset); - - } else { - - if ( // silent anyway - - (_gain == 0 && !apply_gain_automation) || - - // muted by solo of another track, but not using control outs for solo - - (!solo_audible && (Config->get_solo_model() != SoloBus)) || - - // muted by mute of this track - - !mute_audible - - ) { - - /* don't use Route::silence() here, because that causes - all outputs (sends, port processors, etc. to be silent). - */ - - if (_meter_point == MeterPostFader) { - peak_meter().reset(); - } - - IO::silence (nframes, offset); - - } else { - - deliver_output(bufs, start_frame, end_frame, nframes, offset); - - } - - } - - /* ---------------------------------------------------------------------------------------------------- - POST-FADER METERING - -------------------------------------------------------------------------------------------------- */ - - if (meter && (_meter_point == MeterPostFader)) { - if ((_gain == 0 && !apply_gain_automation) || dmg == 0) { - _meter->reset(); - } else { - _meter->run_in_place(output_buffers(), start_frame, end_frame, nframes, offset); - } - } -} - -ChanCount -Route::n_process_buffers () -{ - return max (n_inputs(), processor_max_outs); -} - -void -Route::passthru (nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset, int declick, bool meter_first) -{ - BufferSet& bufs = _session.get_scratch_buffers(n_process_buffers()); - - _silent = false; - - collect_input (bufs, nframes, offset); - - if (meter_first) { - _meter->run_in_place(bufs, start_frame, end_frame, nframes, offset); - meter_first = false; - } - - process_output_buffers (bufs, start_frame, end_frame, nframes, offset, true, declick, meter_first); -} - -void -Route::passthru_silence (nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset, int declick, bool meter) -{ - process_output_buffers (_session.get_silent_buffers (n_process_buffers()), start_frame, end_frame, nframes, offset, true, declick, meter); -} - -void -Route::set_solo (bool yn, void *src) -{ - if (_solo_safe) { - return; - } - - if (_mix_group && src != _mix_group && _mix_group->is_active()) { - _mix_group->apply (&Route::set_solo, yn, _mix_group); - return; - } - - if (_soloed != yn) { - _soloed = yn; - solo_changed (src); /* EMIT SIGNAL */ - _solo_control->Changed (); /* EMIT SIGNAL */ - } -} - -void -Route::set_solo_mute (bool yn) -{ - Glib::Mutex::Lock lm (declick_lock); - - /* Called by Session in response to another Route being soloed. - */ - - desired_solo_gain = (yn?0.0:1.0); -} - -void -Route::set_solo_safe (bool yn, void *src) -{ - if (_solo_safe != yn) { - _solo_safe = yn; - solo_safe_changed (src); /* EMIT SIGNAL */ - } -} - -void -Route::set_mute (bool yn, void *src) - -{ - if (_mix_group && src != _mix_group && _mix_group->is_active()) { - _mix_group->apply (&Route::set_mute, yn, _mix_group); - return; - } - - if (_muted != yn) { - _muted = yn; - mute_changed (src); /* EMIT SIGNAL */ - - _mute_control->Changed (); /* EMIT SIGNAL */ - - Glib::Mutex::Lock lm (declick_lock); - desired_mute_gain = (yn?0.0f:1.0f); - } -} - -int -Route::add_processor (boost::shared_ptr processor, ProcessorStreams* err) -{ - ChanCount old_rmo = processor_max_outs; - - if (!_session.engine().connected()) { - return 1; - } - - { - Glib::RWLock::WriterLock lm (_processor_lock); - - boost::shared_ptr pi; - boost::shared_ptr porti; - - //processor->set_default_type(_default_type); - - if ((pi = boost::dynamic_pointer_cast(processor)) != 0) { - pi->set_count (1); - - if (pi->natural_input_streams() == ChanCount::ZERO) { - /* generator plugin */ - _have_internal_generator = true; - } - - } - - _processors.push_back (processor); - - // Set up processor list channels. This will set processor->[input|output]_streams(), - // configure redirect ports properly, etc. - if (_reset_plugin_counts (err)) { - _processors.pop_back (); - _reset_plugin_counts (0); // it worked before we tried to add it ... - return -1; - } - - // Ensure peak vector sizes before the plugin is activated - ChanCount potential_max_streams = max(processor->input_streams(), processor->output_streams()); - _meter->configure_io(potential_max_streams, potential_max_streams); - - processor->activate (); - processor->ActiveChanged.connect (bind (mem_fun (_session, &Session::update_latency_compensation), false, false)); - - _user_latency = 0; - } - - if (processor_max_outs != old_rmo || old_rmo == ChanCount::ZERO) { - reset_panner (); - } - - processors_changed (); /* EMIT SIGNAL */ - - return 0; -} - -int -Route::add_processors (const ProcessorList& others, ProcessorStreams* err) -{ - ChanCount old_rmo = processor_max_outs; - - if (!_session.engine().connected()) { - return 1; - } - - { - Glib::RWLock::WriterLock lm (_processor_lock); - - ProcessorList::iterator existing_end = _processors.end(); - --existing_end; - - ChanCount potential_max_streams; - - for (ProcessorList::const_iterator i = others.begin(); i != others.end(); ++i) { - - boost::shared_ptr pi; - - if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - pi->set_count (1); - - ChanCount m = max(pi->input_streams(), pi->output_streams()); - if (m > potential_max_streams) - potential_max_streams = m; - } - - // Ensure peak vector sizes before the plugin is activated - _meter->configure_io(potential_max_streams, potential_max_streams); - - _processors.push_back (*i); - - if (_reset_plugin_counts (err)) { - ++existing_end; - _processors.erase (existing_end, _processors.end()); - _reset_plugin_counts (0); // it worked before we tried to add it ... - return -1; - } - - (*i)->activate (); - (*i)->ActiveChanged.connect (bind (mem_fun (_session, &Session::update_latency_compensation), false, false)); - } - - _user_latency = 0; - } - - if (processor_max_outs != old_rmo || old_rmo == ChanCount::ZERO) { - reset_panner (); - } - - processors_changed (); /* EMIT SIGNAL */ - return 0; -} - -/** Turn off all processors with a given placement - * @param p Placement of processors to disable - */ - -void -Route::disable_processors (Placement p) -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->placement() == p) { - (*i)->set_active (false); - } - } - - _session.set_dirty (); -} - -/** Turn off all redirects - */ - -void -Route::disable_processors () -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - (*i)->set_active (false); - } - - _session.set_dirty (); -} - -/** Turn off all redirects with a given placement - * @param p Placement of redirects to disable - */ - -void -Route::disable_plugins (Placement p) -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if (boost::dynamic_pointer_cast (*i) && (*i)->placement() == p) { - (*i)->set_active (false); - } - } - - _session.set_dirty (); -} - -/** Turn off all plugins - */ - -void -Route::disable_plugins () -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if (boost::dynamic_pointer_cast (*i)) { - (*i)->set_active (false); - } - } - - _session.set_dirty (); -} - - -void -Route::ab_plugins (bool forward) -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - if (forward) { - - /* forward = turn off all active redirects, and mark them so that the next time - we go the other way, we will revert them - */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if (!boost::dynamic_pointer_cast (*i)) { - continue; - } - - if ((*i)->active()) { - (*i)->set_active (false); - (*i)->set_next_ab_is_active (true); - } else { - (*i)->set_next_ab_is_active (false); - } - } - - } else { - - /* backward = if the redirect was marked to go active on the next ab, do so */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - - if (!boost::dynamic_pointer_cast (*i)) { - continue; - } - - if ((*i)->get_next_ab_is_active()) { - (*i)->set_active (true); - } else { - (*i)->set_active (false); - } - } - } - - _session.set_dirty (); -} - - -/* Figure out the streams that will feed into PreFader */ -ChanCount -Route::pre_fader_streams() const -{ - boost::shared_ptr processor; - - // Find the last pre-fader redirect - for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->placement() == PreFader) { - processor = *i; - } - } - - if (processor) { - return processor->output_streams(); - } else { - return n_inputs (); - } -} - - -/** Remove processors with a given placement. - * @param p Placement of processors to remove. - */ -void -Route::clear_processors (Placement p) -{ - const ChanCount old_rmo = processor_max_outs; - - if (!_session.engine().connected()) { - return; - } - - { - Glib::RWLock::WriterLock lm (_processor_lock); - ProcessorList new_list; - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->placement() == p) { - /* it's the placement we want to get rid of */ - (*i)->drop_references (); - } else { - /* it's a different placement, so keep it */ - new_list.push_back (*i); - } - } - - _processors = new_list; - } - - /* FIXME: can't see how this test can ever fire */ - if (processor_max_outs != old_rmo) { - reset_panner (); - } - - processor_max_outs.reset(); - _have_internal_generator = false; - processors_changed (); /* EMIT SIGNAL */ -} - -int -Route::remove_processor (boost::shared_ptr processor, ProcessorStreams* err) -{ - ChanCount old_rmo = processor_max_outs; - - if (!_session.engine().connected()) { - return 1; - } - - processor_max_outs.reset(); - - { - Glib::RWLock::WriterLock lm (_processor_lock); - ProcessorList::iterator i; - bool removed = false; - - for (i = _processors.begin(); i != _processors.end(); ++i) { - if (*i == processor) { - - ProcessorList::iterator tmp; - - /* move along, see failure case for reset_plugin_counts() - where we may need to reprocessor the processor. - */ - - tmp = i; - ++tmp; - - /* stop redirects that send signals to JACK ports - from causing noise as a result of no longer being - run. - */ - - boost::shared_ptr redirect; - - if ((redirect = boost::dynamic_pointer_cast (*i)) != 0) { - redirect->io()->disconnect_inputs (this); - redirect->io()->disconnect_outputs (this); - } - - _processors.erase (i); - - i = tmp; - removed = true; - break; - } - - _user_latency = 0; - } - - if (!removed) { - /* what? */ - return 1; - } - - if (_reset_plugin_counts (err)) { - /* get back to where we where */ - _processors.insert (i, processor); - /* we know this will work, because it worked before :) */ - _reset_plugin_counts (0); - return -1; - } - - bool foo = false; - - for (i = _processors.begin(); i != _processors.end(); ++i) { - boost::shared_ptr pi; - - if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - if (pi->is_generator()) { - foo = true; - } - } - } - - _have_internal_generator = foo; - } - - if (old_rmo != processor_max_outs) { - reset_panner (); - } - - processor->drop_references (); - - processors_changed (); /* EMIT SIGNAL */ - return 0; -} - -int -Route::reset_plugin_counts (ProcessorStreams* err) -{ - Glib::RWLock::WriterLock lm (_processor_lock); - return _reset_plugin_counts (err); -} - - -int -Route::_reset_plugin_counts (ProcessorStreams* err) -{ - ProcessorList::iterator r; - map > processor_map; - ChanCount initial_streams; - ChanCount post_fader_input; - int ret = -1; - - /* Process each placement in order, checking to see if we - can really do what has been requested. - */ - - /* divide processors up by placement so we get the signal flow - properly modelled. we need to do this because the _processors - list is not sorted by placement, and because other reasons may - exist now or in the future for this separate treatment. - */ - - /* ... but it should/will be... */ - - for (r = _processors.begin(); r != _processors.end(); ++r) { - - boost::shared_ptr processor; - - if ((processor = boost::dynamic_pointer_cast(*r)) != 0) { - processor_map[processor->placement()].push_back (ProcessorCount (processor)); - } - } - - /* A: PreFader */ - - if ( ! check_some_plugin_counts (processor_map[PreFader], n_inputs (), err)) { - goto streamcount; - } - - post_fader_input = (err ? err->count : n_inputs()); - - /* B: PostFader */ - - if ( ! check_some_plugin_counts (processor_map[PostFader], post_fader_input, err)) { - goto streamcount; - } - - /* OK, everything can be set up correctly, so lets do it */ - - apply_some_plugin_counts (processor_map[PreFader]); - apply_some_plugin_counts (processor_map[PostFader]); - - /* recompute max outs of any processor */ - - ret = 0; - - streamcount: - processor_max_outs.reset(); - - for (r = _processors.begin(); r != _processors.end(); ++r) { - processor_max_outs = max ((*r)->output_streams (), processor_max_outs); - } - - return 0; -} - -int32_t -Route::apply_some_plugin_counts (list& iclist) -{ - list::iterator i; - - for (i = iclist.begin(); i != iclist.end(); ++i) { - - cerr << "now applying for " << (*i).processor->name() << " in = " << (*i).in.n_audio() << " out = " << (*i).out.n_audio() << endl; - - if ((*i).processor->configure_io ((*i).in, (*i).out)) { - return -1; - } - /* make sure that however many we have, they are all active */ - (*i).processor->activate (); - } - - return 0; -} - -/** Returns whether \a iclist can be configured and run starting with - * \a required_inputs at the first processor's inputs. - * If false is returned, \a iclist can not be run with \a required_inputs, and \a err is set. - * Otherwise, \a err is set to the output of the list. - */ -bool -Route::check_some_plugin_counts (list& iclist, ChanCount required_inputs, ProcessorStreams* err) -{ - list::iterator i; - size_t index = 0; - - if (err) { - err->index = 0; - err->count = required_inputs; - } - - for (i = iclist.begin(); i != iclist.end(); ++i) { - - - cerr << "Checking whether " << (*i).processor->name() << " can support " << required_inputs.n_audio() << " inputs\n"; - - if ((*i).processor->can_support_input_configuration (required_inputs) < 0) { - if (err) { - err->index = index; - err->count = required_inputs; - } - return false; - } - - (*i).in = required_inputs; - (*i).out = (*i).processor->output_for_input_configuration (required_inputs); - - cerr << "config looks like " << (*i).processor->name() << " in = " << (*i).in.n_audio() << " out = " << (*i).out.n_audio() << endl; - - required_inputs = (*i).out; - - ++index; - } - - if (err) { - if (!iclist.empty()) { - err->index = index; - err->count = iclist.back().processor->output_for_input_configuration(required_inputs); - } - } - - return true; -} - -int -Route::copy_processors (const Route& other, Placement placement, ProcessorStreams* err) -{ - ChanCount old_rmo = processor_max_outs; - - ProcessorList to_be_deleted; - - { - Glib::RWLock::WriterLock lm (_processor_lock); - ProcessorList::iterator tmp; - ProcessorList the_copy; - - the_copy = _processors; - - /* remove all relevant processors */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ) { - tmp = i; - ++tmp; - - if ((*i)->placement() == placement) { - to_be_deleted.push_back (*i); - _processors.erase (i); - } - - i = tmp; - } - - /* now copy the relevant ones from "other" */ - - for (ProcessorList::const_iterator i = other._processors.begin(); i != other._processors.end(); ++i) { - if ((*i)->placement() == placement) { - _processors.push_back (IOProcessor::clone (*i)); - } - } - - /* reset plugin stream handling */ - - if (_reset_plugin_counts (err)) { - - /* FAILED COPY ATTEMPT: we have to restore order */ - - /* delete all cloned processors */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ) { - - tmp = i; - ++tmp; - - if ((*i)->placement() == placement) { - _processors.erase (i); - } - - i = tmp; - } - - /* restore the natural order */ - - _processors = the_copy; - processor_max_outs = old_rmo; - - /* we failed, even though things are OK again */ - - return -1; - - } else { - - /* SUCCESSFUL COPY ATTEMPT: delete the processors we removed pre-copy */ - to_be_deleted.clear (); - _user_latency = 0; - } - } - - if (processor_max_outs != old_rmo || old_rmo == ChanCount::ZERO) { - reset_panner (); - } - - processors_changed (); /* EMIT SIGNAL */ - return 0; -} - -void -Route::all_processors_flip () -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - if (_processors.empty()) { - return; - } - - bool first_is_on = _processors.front()->active(); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - (*i)->set_active (!first_is_on); - } - - _session.set_dirty (); -} - -/** Set all processors with a given placement to a given active state. - * @param p Placement of processors to change. - * @param state New active state for those processors. - */ -void -Route::all_processors_active (Placement p, bool state) -{ - Glib::RWLock::ReaderLock lm (_processor_lock); - - if (_processors.empty()) { - return; - } - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->placement() == p) { - (*i)->set_active (state); - } - } - - _session.set_dirty (); -} - -struct ProcessorSorter { - bool operator() (boost::shared_ptr a, boost::shared_ptr b) { - return a->sort_key() < b->sort_key(); - } -}; - -int -Route::sort_processors (ProcessorStreams* err) -{ - { - ProcessorSorter comparator; - Glib::RWLock::WriterLock lm (_processor_lock); - ChanCount old_rmo = processor_max_outs; - - /* the sweet power of C++ ... */ - - ProcessorList as_it_was_before = _processors; - - _processors.sort (comparator); - - if (_reset_plugin_counts (err)) { - _processors = as_it_was_before; - processor_max_outs = old_rmo; - return -1; - } - } - - reset_panner (); - processors_changed (); /* EMIT SIGNAL */ - - return 0; -} - -XMLNode& -Route::get_state() -{ - return state(true); -} - -XMLNode& -Route::get_template() -{ - return state(false); -} - -XMLNode& -Route::state(bool full_state) -{ - XMLNode *node = new XMLNode("Route"); - ProcessorList::iterator i; - char buf[32]; - - if (_flags) { - node->add_property("flags", enum_2_string (_flags)); - } - - node->add_property("default-type", _default_type.to_string()); - - node->add_property("active", _active?"yes":"no"); - node->add_property("muted", _muted?"yes":"no"); - node->add_property("soloed", _soloed?"yes":"no"); - node->add_property("phase-invert", _phase_invert?"yes":"no"); - node->add_property("denormal-protection", _denormal_protection?"yes":"no"); - node->add_property("mute-affects-pre-fader", _mute_affects_pre_fader?"yes":"no"); - node->add_property("mute-affects-post-fader", _mute_affects_post_fader?"yes":"no"); - node->add_property("mute-affects-control-outs", _mute_affects_control_outs?"yes":"no"); - node->add_property("mute-affects-main-outs", _mute_affects_main_outs?"yes":"no"); - - if (_edit_group) { - node->add_property("edit-group", _edit_group->name()); - } - if (_mix_group) { - node->add_property("mix-group", _mix_group->name()); - } - - string order_string; - OrderKeys::iterator x = order_keys.begin(); - - while (x != order_keys.end()) { - order_string += string ((*x).first); - order_string += '='; - snprintf (buf, sizeof(buf), "%ld", (*x).second); - order_string += buf; - - ++x; - - if (x == order_keys.end()) { - break; - } - - order_string += ':'; - } - node->add_property ("order-keys", order_string); - - node->add_child_nocopy (IO::state (full_state)); - node->add_child_nocopy (_solo_control->get_state ()); - node->add_child_nocopy (_mute_control->get_state ()); - - XMLNode* remote_control_node = new XMLNode (X_("remote_control")); - snprintf (buf, sizeof (buf), "%d", _remote_control_id); - remote_control_node->add_property (X_("id"), buf); - node->add_child_nocopy (*remote_control_node); - - if (_control_outs) { - XMLNode* cnode = new XMLNode (X_("ControlOuts")); - cnode->add_child_nocopy (_control_outs->state (full_state)); - node->add_child_nocopy (*cnode); - } - - if (_comment.length()) { - XMLNode *cmt = node->add_child ("Comment"); - cmt->add_content (_comment); - } - - for (i = _processors.begin(); i != _processors.end(); ++i) { - node->add_child_nocopy((*i)->state (full_state)); - } - - if (_extra_xml){ - node->add_child_copy (*_extra_xml); - } - - return *node; -} - -XMLNode& -Route::get_processor_state () -{ - XMLNode* root = new XMLNode (X_("redirects")); - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - root->add_child_nocopy ((*i)->state (true)); - } - - return *root; -} - -int -Route::set_processor_state (const XMLNode& root) -{ - if (root.name() != X_("redirects")) { - return -1; - } - - XMLNodeList nlist; - XMLNodeList nnlist; - XMLNodeConstIterator iter; - XMLNodeConstIterator niter; - Glib::RWLock::ReaderLock lm (_processor_lock); - - nlist = root.children(); - - for (iter = nlist.begin(); iter != nlist.end(); ++iter){ - - /* iter now points to a IOProcessor state node */ - - nnlist = (*iter)->children (); - - for (niter = nnlist.begin(); niter != nnlist.end(); ++niter) { - - /* find the IO child node, since it contains the ID we need */ - - /* XXX OOP encapsulation violation, ugh */ - - if ((*niter)->name() == IO::state_node_name) { - - XMLProperty* prop = (*niter)->property (X_("id")); - - if (!prop) { - warning << _("IOProcessor node has no ID, ignored") << endmsg; - break; - } - - ID id = prop->value (); - - /* now look for a processor with that ID */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->id() == id) { - (*i)->set_state (**iter); - break; - } - } - - break; - - } - } - - } - - return 0; -} - -void -Route::set_deferred_state () -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - - if (!deferred_state) { - return; - } - - nlist = deferred_state->children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter){ - add_processor_from_xml (**niter); - } - - delete deferred_state; - deferred_state = 0; -} - -void -Route::add_processor_from_xml (const XMLNode& node) -{ - const XMLProperty *prop; - - // legacy sessions use a different node name for sends - if (node.name() == "Send") { - - try { - boost::shared_ptr send (new Send (_session, node)); - add_processor (send); - } - - catch (failed_constructor &err) { - error << _("Send construction failed") << endmsg; - return; - } - - // use "Processor" in XML? - } else if (node.name() == "Processor") { - - try { - if ((prop = node.property ("type")) != 0) { - - boost::shared_ptr processor; - bool have_insert = false; - - if (prop->value() == "ladspa" || prop->value() == "Ladspa" || - prop->value() == "lv2" || - prop->value() == "vst" || - prop->value() == "audiounit") { - - processor.reset (new PluginInsert(_session, node)); - have_insert = true; - - } else if (prop->value() == "port") { - - processor.reset (new PortInsert (_session, node)); - - } else if (prop->value() == "send") { - - processor.reset (new Send (_session, node)); - have_insert = true; - - } else { - - error << string_compose(_("unknown Processor type \"%1\"; ignored"), prop->value()) << endmsg; - } - - add_processor (processor); - - } else { - error << _("Processor XML node has no type property") << endmsg; - } - } - - catch (failed_constructor &err) { - warning << _("processor could not be created. Ignored.") << endmsg; - return; - } - } -} - -int -Route::set_state (const XMLNode& node) -{ - return _set_state (node, true); -} - -int -Route::_set_state (const XMLNode& node, bool call_base) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLNode *child; - XMLPropertyList plist; - const XMLProperty *prop; - - if (node.name() != "Route"){ - error << string_compose(_("Bad node sent to Route::set_state() [%1]"), node.name()) << endmsg; - return -1; - } - - if ((prop = node.property (X_("flags"))) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - } else { - _flags = Flag (0); - } - - if ((prop = node.property (X_("default-type"))) != 0) { - _default_type = DataType(prop->value()); - assert(_default_type != DataType::NIL); - } - - if ((prop = node.property (X_("phase-invert"))) != 0) { - set_phase_invert (prop->value()=="yes"?true:false, this); - } - - if ((prop = node.property (X_("denormal-protection"))) != 0) { - set_denormal_protection (prop->value()=="yes"?true:false, this); - } - - _active = true; - if ((prop = node.property (X_("active"))) != 0) { - set_active (prop->value() == "yes"); - } - - if ((prop = node.property (X_("muted"))) != 0) { - bool yn = prop->value()=="yes"?true:false; - - /* force reset of mute status */ - - _muted = !yn; - set_mute(yn, this); - mute_gain = desired_mute_gain; - } - - if ((prop = node.property (X_("soloed"))) != 0) { - bool yn = prop->value()=="yes"?true:false; - - /* force reset of solo status */ - - _soloed = !yn; - set_solo (yn, this); - solo_gain = desired_solo_gain; - } - - if ((prop = node.property (X_("mute-affects-pre-fader"))) != 0) { - _mute_affects_pre_fader = (prop->value()=="yes")?true:false; - } - - if ((prop = node.property (X_("mute-affects-post-fader"))) != 0) { - _mute_affects_post_fader = (prop->value()=="yes")?true:false; - } - - if ((prop = node.property (X_("mute-affects-control-outs"))) != 0) { - _mute_affects_control_outs = (prop->value()=="yes")?true:false; - } - - if ((prop = node.property (X_("mute-affects-main-outs"))) != 0) { - _mute_affects_main_outs = (prop->value()=="yes")?true:false; - } - - if ((prop = node.property (X_("edit-group"))) != 0) { - RouteGroup* edit_group = _session.edit_group_by_name(prop->value()); - if(edit_group == 0) { - error << string_compose(_("Route %1: unknown edit group \"%2 in saved state (ignored)"), _name, prop->value()) << endmsg; - } else { - set_edit_group(edit_group, this); - } - } - - if ((prop = node.property (X_("order-keys"))) != 0) { - - long n; - - string::size_type colon, equal; - string remaining = prop->value(); - - while (remaining.length()) { - - if ((equal = remaining.find_first_of ('=')) == string::npos || equal == remaining.length()) { - error << string_compose (_("badly formed order key string in state file! [%1] ... ignored."), remaining) - << endmsg; - } else { - if (sscanf (remaining.substr (equal+1).c_str(), "%ld", &n) != 1) { - error << string_compose (_("badly formed order key string in state file! [%1] ... ignored."), remaining) - << endmsg; - } else { - set_order_key (remaining.substr (0, equal).c_str(), n); - } - } - - colon = remaining.find_first_of (':'); - - if (colon != string::npos) { - remaining = remaining.substr (colon+1); - } else { - break; - } - } - } - - nlist = node.children(); - - if (deferred_state) { - delete deferred_state; - } - - deferred_state = new XMLNode(X_("deferred state")); - - /* set parent class properties before anything else */ - - for (niter = nlist.begin(); niter != nlist.end(); ++niter){ - - child = *niter; - - if (child->name() == IO::state_node_name && call_base) { - - IO::set_state (*child); - break; - } - } - - XMLNodeList processor_nodes; - - for (niter = nlist.begin(); niter != nlist.end(); ++niter){ - - child = *niter; - - if (child->name() == X_("Send") || child->name() == X_("Processor")) { - processor_nodes.push_back(child); - } - - } - - _set_processor_states(processor_nodes); - - - for (niter = nlist.begin(); niter != nlist.end(); ++niter){ - child = *niter; - // All processors have been applied already - - if (child->name() == X_("Automation")) { - - if ((prop = child->property (X_("path"))) != 0) { - load_automation (prop->value()); - } - - } else if (child->name() == X_("ControlOuts")) { - - string coutname = _name; - coutname += _("[control]"); - - _control_outs = new IO (_session, coutname); - _control_outs->set_state (**(child->children().begin())); - - } else if (child->name() == X_("Comment")) { - - /* XXX this is a terrible API design in libxml++ */ - - XMLNode *cmt = *(child->children().begin()); - _comment = cmt->content(); - - } else if (child->name() == X_("extra")) { - - _extra_xml = new XMLNode (*child); - - } else if (child->name() == X_("controllable") && (prop = child->property("name")) != 0) { - - if (prop->value() == "solo") { - _solo_control->set_state (*child); - _session.add_controllable (_solo_control); - } - else if (prop->value() == "mute") { - _mute_control->set_state (*child); - _session.add_controllable (_mute_control); - } - } - else if (child->name() == X_("remote_control")) { - if ((prop = child->property (X_("id"))) != 0) { - int32_t x; - sscanf (prop->value().c_str(), "%d", &x); - set_remote_control_id (x); - } - } - } - - if ((prop = node.property (X_("mix-group"))) != 0) { - RouteGroup* mix_group = _session.mix_group_by_name(prop->value()); - if (mix_group == 0) { - error << string_compose(_("Route %1: unknown mix group \"%2 in saved state (ignored)"), _name, prop->value()) << endmsg; - } else { - set_mix_group(mix_group, this); - } - } - - return 0; -} - -void -Route::_set_processor_states(const XMLNodeList &nlist) -{ - XMLNodeConstIterator niter; - char buf[64]; - - ProcessorList::iterator i, o; - - // Iterate through existing processors, remove those which are not in the state list - for (i = _processors.begin(); i != _processors.end(); ) { - ProcessorList::iterator tmp = i; - ++tmp; - - bool processorInStateList = false; - - (*i)->id().print (buf, sizeof (buf)); - - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - // legacy sessions (IOProcessor as a child of Processor, both is-a IO) - if (strncmp(buf,(*niter)->child(X_("IOProcessor"))->child(X_("IO"))->property(X_("id"))->value().c_str(), sizeof(buf)) == 0) { - processorInStateList = true; - break; - } else if (strncmp(buf,(*niter)->property(X_("id"))->value().c_str(), sizeof(buf)) == 0) { - processorInStateList = true; - break; - } - } - - if (!processorInStateList) { - remove_processor (*i); - } - - - i = tmp; - } - - - // Iterate through state list and make sure all processors are on the track and in the correct order, - // set the state of existing processors according to the new state on the same go - i = _processors.begin(); - for (niter = nlist.begin(); niter != nlist.end(); ++niter, ++i) { - - // Check whether the next processor in the list - o = i; - - while (o != _processors.end()) { - (*o)->id().print (buf, sizeof (buf)); - if ( strncmp(buf, (*niter)->child(X_("IOProcessor"))->child(X_("IO"))->property(X_("id"))->value().c_str(), sizeof(buf)) == 0) - break; - else if (strncmp(buf,(*niter)->property(X_("id"))->value().c_str(), sizeof(buf)) == 0) - break; - - ++o; - } - - if (o == _processors.end()) { - // If the processor (*niter) is not on the route, we need to create it - // and move it to the correct location - - ProcessorList::iterator prev_last = _processors.end(); - --prev_last; // We need this to check whether adding succeeded - - add_processor_from_xml (**niter); - - ProcessorList::iterator last = _processors.end(); - --last; - - if (prev_last == last) { - cerr << "Could not fully restore state as some processors were not possible to create" << endl; - continue; - - } - - boost::shared_ptr tmp = (*last); - // remove the processor from the wrong location - _processors.erase(last); - // processor the new processor at the current location - _processors.insert(i, tmp); - - --i; // move pointer to the newly processored processor - continue; - } - - // We found the processor (*niter) on the route, first we must make sure the processor - // is at the location provided in the XML state - if (i != o) { - boost::shared_ptr tmp = (*o); - // remove the old copy - _processors.erase(o); - // processor the processor at the correct location - _processors.insert(i, tmp); - - --i; // move pointer so it points to the right processor - } - - (*i)->set_state( (**niter) ); - } - - processors_changed (); -} - -void -Route::curve_reallocate () -{ -// _gain_automation_curve.finish_resize (); -// _pan_automation_curve.finish_resize (); -} - -void -Route::silence (nframes_t nframes, nframes_t offset) -{ - if (!_silent) { - - IO::silence (nframes, offset); - - if (_control_outs) { - _control_outs->silence (nframes, offset); - } - - { - Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); - - if (lm.locked()) { - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - boost::shared_ptr pi; - if (!_active && (pi = boost::dynamic_pointer_cast (*i)) != 0) { - // skip plugins, they don't need anything when we're not active - continue; - } - - (*i)->silence (nframes, offset); - } - - if (nframes == _session.get_block_size() && offset == 0) { - // _silent = true; - } - } - } - - } -} - -int -Route::set_control_outs (const vector& ports) -{ - Glib::Mutex::Lock lm (_control_outs_lock); - vector::const_iterator i; - size_t limit; - - if (_control_outs) { - delete _control_outs; - _control_outs = 0; - } - - if (is_control() || is_master()) { - /* no control outs for these two special busses */ - return 0; - } - - if (ports.empty()) { - return 0; - } - - string coutname = _name; - coutname += _("[control]"); - - _control_outs = new IO (_session, coutname); - - /* our control outs need as many outputs as we - have audio outputs. we track the changes in ::output_change_handler(). - */ - - // XXX its stupid that we have to get this value twice - - limit = n_outputs().n_audio(); - - if (_control_outs->ensure_io (ChanCount::ZERO, ChanCount (DataType::AUDIO, n_outputs().get (DataType::AUDIO)), true, this)) { - return -1; - } - - /* now connect to the named ports */ - - for (size_t n = 0; n < limit; ++n) { - if (_control_outs->connect_output (_control_outs->output (n), ports[n % ports.size()], this)) { - error << string_compose (_("could not connect %1 to %2"), _control_outs->output(n)->name(), ports[n]) << endmsg; - return -1; - } - } - - return 0; -} - -void -Route::set_edit_group (RouteGroup *eg, void *src) - -{ - if (eg == _edit_group) { - return; - } - - if (_edit_group) { - _edit_group->remove (this); - } - - if ((_edit_group = eg) != 0) { - _edit_group->add (this); - } - - _session.set_dirty (); - edit_group_changed (src); /* EMIT SIGNAL */ -} - -void -Route::drop_edit_group (void *src) -{ - _edit_group = 0; - _session.set_dirty (); - edit_group_changed (src); /* EMIT SIGNAL */ -} - -void -Route::set_mix_group (RouteGroup *mg, void *src) - -{ - if (mg == _mix_group) { - return; - } - - if (_mix_group) { - _mix_group->remove (this); - } - - if ((_mix_group = mg) != 0) { - _mix_group->add (this); - } - - _session.set_dirty (); - mix_group_changed (src); /* EMIT SIGNAL */ -} - -void -Route::drop_mix_group (void *src) -{ - _mix_group = 0; - _session.set_dirty (); - mix_group_changed (src); /* EMIT SIGNAL */ -} - -void -Route::set_comment (string cmt, void *src) -{ - _comment = cmt; - comment_changed (src); - _session.set_dirty (); -} - -bool -Route::feeds (boost::shared_ptr other) -{ - uint32_t i, j; - - IO& self = *this; - uint32_t no = self.n_outputs().n_total(); - uint32_t ni = other->n_inputs ().n_total(); - - for (i = 0; i < no; ++i) { - for (j = 0; j < ni; ++j) { - if (self.output(i)->connected_to (other->input(j)->name())) { - return true; - } - } - } - - /* check IOProcessors which may also interconnect Routes */ - - for (ProcessorList::iterator r = _processors.begin(); r != _processors.end(); r++) { - - boost::shared_ptr redirect = boost::dynamic_pointer_cast(*r); - - if ( ! redirect) - continue; - - // TODO: support internal redirects here - - no = redirect->io()->n_outputs().n_total(); - - for (i = 0; i < no; ++i) { - for (j = 0; j < ni; ++j) { - if (redirect->io()->output(i)->connected_to (other->input (j)->name())) { - return true; - } - } - } - } - - /* check for control room outputs which may also interconnect Routes */ - - if (_control_outs) { - - no = _control_outs->n_outputs().n_total(); - - for (i = 0; i < no; ++i) { - for (j = 0; j < ni; ++j) { - if (_control_outs->output(i)->connected_to (other->input (j)->name())) { - return true; - } - } - } - } - - return false; -} - -void -Route::set_mute_config (mute_type t, bool onoff, void *src) -{ - switch (t) { - case PRE_FADER: - _mute_affects_pre_fader = onoff; - pre_fader_changed(src); /* EMIT SIGNAL */ - break; - - case POST_FADER: - _mute_affects_post_fader = onoff; - post_fader_changed(src); /* EMIT SIGNAL */ - break; - - case CONTROL_OUTS: - _mute_affects_control_outs = onoff; - control_outs_changed(src); /* EMIT SIGNAL */ - break; - - case MAIN_OUTS: - _mute_affects_main_outs = onoff; - main_outs_changed(src); /* EMIT SIGNAL */ - break; - } -} - -bool -Route::get_mute_config (mute_type t) -{ - bool onoff = false; - - switch (t){ - case PRE_FADER: - onoff = _mute_affects_pre_fader; - break; - case POST_FADER: - onoff = _mute_affects_post_fader; - break; - case CONTROL_OUTS: - onoff = _mute_affects_control_outs; - break; - case MAIN_OUTS: - onoff = _mute_affects_main_outs; - break; - } - - return onoff; -} - -void -Route::handle_transport_stopped (bool abort_ignored, bool did_locate, bool can_flush_processors) -{ - nframes_t now = _session.transport_frame(); - - { - Glib::RWLock::ReaderLock lm (_processor_lock); - - if (!did_locate) { - automation_snapshot (now, true); - } - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - - if (Config->get_plugins_stop_with_transport() && can_flush_processors) { - (*i)->deactivate (); - (*i)->activate (); - } - - (*i)->transport_stopped (now); - } - } - - IO::transport_stopped (now); - - _roll_delay = _initial_delay; -} - -void -Route::input_change_handler (IOChange change, void *ignored) -{ - if (change & ConfigurationChanged) { - reset_plugin_counts (0); - } -} - -void -Route::output_change_handler (IOChange change, void *ignored) -{ - if (change & ConfigurationChanged) { - if (_control_outs) { - _control_outs->ensure_io (ChanCount::ZERO, ChanCount(DataType::AUDIO, n_outputs().n_audio()), true, this); - } - - reset_plugin_counts (0); - } -} - -uint32_t -Route::pans_required () const -{ - if (n_outputs().n_audio() < 2) { - return 0; - } - - return max (n_inputs ().n_audio(), processor_max_outs.n_audio()); -} - -int -Route::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, - bool session_state_changing, bool can_record, bool rec_monitors_input) -{ - if (n_outputs().n_total() == 0) { - return 0; - } - - if (session_state_changing || !_active) { - silence (nframes, offset); - return 0; - } - - apply_gain_automation = false; - - if (n_inputs().n_total()) { - passthru (start_frame, end_frame, nframes, offset, 0, false); - } else { - silence (nframes, offset); - } - - return 0; -} - -nframes_t -Route::check_initial_delay (nframes_t nframes, nframes_t& offset, nframes_t& transport_frame) -{ - if (_roll_delay > nframes) { - - _roll_delay -= nframes; - silence (nframes, offset); - /* transport frame is not legal for caller to use */ - return 0; - - } else if (_roll_delay > 0) { - - nframes -= _roll_delay; - - silence (_roll_delay, offset); - - offset += _roll_delay; - transport_frame += _roll_delay; - - _roll_delay = 0; - } - - return nframes; -} - -int -Route::roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, int declick, - bool can_record, bool rec_monitors_input) -{ - { - Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); - if (lm.locked()) { - // automation snapshot can also be called from the non-rt context - // and it uses the processor list, so we take the lock out here - automation_snapshot (_session.transport_frame(), false); - } - } - - if ((n_outputs().n_total() == 0 && _processors.empty()) || n_inputs().n_total() == 0 || !_active) { - silence (nframes, offset); - return 0; - } - - nframes_t unused = 0; - - if ((nframes = check_initial_delay (nframes, offset, unused)) == 0) { - return 0; - } - - _silent = false; - - apply_gain_automation = false; - - { - Glib::Mutex::Lock am (_automation_lock, Glib::TRY_LOCK); - - if (am.locked() && _session.transport_rolling()) { - - if (_gain_control->list()->automation_playback()) { - apply_gain_automation = _gain_control->list()->curve().rt_safe_get_vector ( - start_frame, end_frame, _session.gain_automation_buffer(), nframes); - } - } - } - - passthru (start_frame, end_frame, nframes, offset, declick, false); - - return 0; -} - -int -Route::silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame, nframes_t offset, - bool can_record, bool rec_monitors_input) -{ - silence (nframes, offset); - return 0; -} - -void -Route::toggle_monitor_input () -{ - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - i->ensure_monitor_input( ! i->monitoring_input()); - } -} - -bool -Route::has_external_redirects () const -{ - // FIXME: what about sends? - - boost::shared_ptr pi; - - for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - - for (PortSet::const_iterator port = pi->io()->outputs().begin(); - port != pi->io()->outputs().end(); ++port) { - - string port_name = port->name(); - string client_name = port_name.substr (0, port_name.find(':')); - - /* only say "yes" if the redirect is actually in use */ - - if (client_name != "ardour" && pi->active()) { - return true; - } - } - } - } - - return false; -} - -void -Route::flush_processors () -{ - /* XXX shouldn't really try to take this lock, since - this is called from the RT audio thread. - */ - - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - (*i)->deactivate (); - (*i)->activate (); - } -} - -void -Route::set_meter_point (MeterPoint p, void *src) -{ - if (_meter_point != p) { - _meter_point = p; - meter_change (src); /* EMIT SIGNAL */ - _session.set_dirty (); - } -} - -nframes_t -Route::update_total_latency () -{ - nframes_t old = _own_latency; - - if (_user_latency) { - _own_latency = _user_latency; - } else { - _own_latency = 0; - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->active ()) { - _own_latency += (*i)->signal_latency (); - } - } - } - - set_port_latency (_own_latency); - - if (!_user_latency) { - /* this (virtual) function is used for pure Routes, - not derived classes like AudioTrack. this means - that the data processed here comes from an input - port, not prerecorded material, and therefore we - have to take into account any input latency. - */ - - - _own_latency += input_latency (); - } - - if (old != _own_latency) { - signal_latency_changed (); /* EMIT SIGNAL */ - } - - return _own_latency; -} - -void -Route::set_user_latency (nframes_t nframes) -{ - Latent::set_user_latency (nframes); - _session.update_latency_compensation (false, false); -} - -void -Route::set_latency_delay (nframes_t longest_session_latency) -{ - nframes_t old = _initial_delay; - - if (_own_latency < longest_session_latency) { - _initial_delay = longest_session_latency - _own_latency; - } else { - _initial_delay = 0; - } - - if (_initial_delay != old) { - initial_delay_changed (); /* EMIT SIGNAL */ - } - - if (_session.transport_stopped()) { - _roll_delay = _initial_delay; - } -} - -void -Route::automation_snapshot (nframes_t now, bool force) -{ - if (!force && !should_snapshot(now)) { - return; - } - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - // IO::automation_snapshot (now, force); ? - (*i)->automation_snapshot (now, force); - } -} - -Route::ToggleControllable::ToggleControllable (std::string name, Route& s, ToggleType tp) - : Controllable (name), route (s), type(tp) -{ - -} - -void -Route::ToggleControllable::set_value (float val) -{ - bool bval = ((val >= 0.5f) ? true: false); - - switch (type) { - case MuteControl: - route.set_mute (bval, this); - break; - case SoloControl: - route.set_solo (bval, this); - break; - default: - break; - } -} - -float -Route::ToggleControllable::get_value (void) const -{ - float val = 0.0f; - - switch (type) { - case MuteControl: - val = route.muted() ? 1.0f : 0.0f; - break; - case SoloControl: - val = route.soloed() ? 1.0f : 0.0f; - break; - default: - break; - } - - return val; -} - -void -Route::set_block_size (nframes_t nframes) -{ - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - (*i)->set_block_size (nframes); - } -} - -void -Route::protect_automation () -{ - Automatable::protect_automation(); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) - (*i)->protect_automation(); -} - -void -Route::set_pending_declick (int declick) -{ - if (_declickable) { - /* this call is not allowed to turn off a pending declick unless "force" is true */ - if (declick) { - _pending_declick = declick; - } - // cerr << _name << ": after setting to " << declick << " pending declick = " << _pending_declick << endl; - } else { - _pending_declick = 0; - } - -} diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc deleted file mode 100644 index f22deb5dbf..0000000000 --- a/libs/ardour/route_group.cc +++ /dev/null @@ -1,213 +0,0 @@ -/* - Copyright (C) 2000-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define __STDC_FORMAT_MACROS -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include - -using namespace ARDOUR; -using namespace sigc; -using namespace std; - -RouteGroup::RouteGroup (Session& s, const string &n, Flag f) - : _session (s), _name (n), _flags (f) -{ -} - -void -RouteGroup::set_name (string str) -{ - _name = str; - _session.set_dirty (); - FlagsChanged (0); /* EMIT SIGNAL */ -} - -int -RouteGroup::add (Route *r) -{ - routes.push_back (r); - r->GoingAway.connect (sigc::bind (mem_fun (*this, &RouteGroup::remove_when_going_away), r)); - _session.set_dirty (); - changed (); /* EMIT SIGNAL */ - return 0; -} - -void -RouteGroup::remove_when_going_away (Route *r) -{ - remove (r); -} - -int -RouteGroup::remove (Route *r) -{ - list::iterator i; - - if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) { - routes.erase (i); - _session.set_dirty (); - changed (); /* EMIT SIGNAL */ - return 0; - } - return -1; -} - - -gain_t -RouteGroup::get_min_factor(gain_t factor) -{ - gain_t g; - - for (list::iterator i = routes.begin(); i != routes.end(); i++) { - g = (*i)->gain(); - - if ( (g+g*factor) >= 0.0f) - continue; - - if ( g <= 0.0000003f ) - return 0.0f; - - factor = 0.0000003f/g - 1.0f; - } - return factor; -} - -gain_t -RouteGroup::get_max_factor(gain_t factor) -{ - gain_t g; - - for (list::iterator i = routes.begin(); i != routes.end(); i++) { - g = (*i)->gain(); - - // if the current factor woulnd't raise this route above maximum - if ( (g+g*factor) <= 1.99526231f) - continue; - - // if route gain is already at peak, return 0.0f factor - if (g>=1.99526231f) - return 0.0f; - - // factor is calculated so that it would raise current route to max - factor = 1.99526231f/g - 1.0f; - } - - return factor; -} - -XMLNode& -RouteGroup::get_state (void) -{ - XMLNode *node = new XMLNode ("RouteGroup"); - node->add_property ("name", _name); - node->add_property ("flags", enum_2_string (_flags)); - return *node; -} - -int -RouteGroup::set_state (const XMLNode& node) -{ - const XMLProperty *prop; - - if ((prop = node.property ("name")) != 0) { - _name = prop->value(); - } - - if ((prop = node.property ("flags")) != 0) { - _flags = Flag (string_2_enum (prop->value(), _flags)); - } - - return 0; -} - -void -RouteGroup::set_active (bool yn, void *src) -{ - if (is_active() == yn) { - return; - } - if (yn) { - _flags = Flag (_flags | Active); - } else { - _flags = Flag (_flags & ~Active); - } - _session.set_dirty (); - FlagsChanged (src); /* EMIT SIGNAL */ -} - -void -RouteGroup::set_relative (bool yn, void *src) - -{ - if (is_relative() == yn) { - return; - } - if (yn) { - _flags = Flag (_flags | Relative); - } else { - _flags = Flag (_flags & ~Relative); - } - _session.set_dirty (); - FlagsChanged (src); /* EMIT SIGNAL */ -} - -void -RouteGroup::set_hidden (bool yn, void *src) - -{ - if (is_hidden() == yn) { - return; - } - if (yn) { - _flags = Flag (_flags | Hidden); - if (Config->get_hiding_groups_deactivates_groups()) { - _flags = Flag (_flags & ~Active); - } - } else { - _flags = Flag (_flags & ~Hidden); - if (Config->get_hiding_groups_deactivates_groups()) { - _flags = Flag (_flags | Active); - } - } - _session.set_dirty (); - FlagsChanged (src); /* EMIT SIGNAL */ -} - -void -RouteGroup::audio_track_group (set& ats) -{ - for (list::iterator i = routes.begin(); i != routes.end(); ++i) { - AudioTrack* at = dynamic_cast(*i); - if (at) { - ats.insert (at); - } - } -} - diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc deleted file mode 100644 index 736a443c72..0000000000 --- a/libs/ardour/send.cc +++ /dev/null @@ -1,228 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -Send::Send (Session& s, Placement p) - : IOProcessor (s, string_compose (_("send %1"), (bitslot = s.next_send_id()) + 1), p) -{ - _metering = false; - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -Send::Send (Session& s, const XMLNode& node) - : IOProcessor (s, "send", PreFader) -{ - _metering = false; - - if (set_state (node)) { - throw failed_constructor(); - } - - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -Send::Send (const Send& other) - : IOProcessor (other._session, string_compose (_("send %1"), (bitslot = other._session.next_send_id()) + 1), other.placement()) -{ - _metering = false; - ProcessorCreated (this); /* EMIT SIGNAL */ -} - -Send::~Send () -{ - GoingAway (); -} - -XMLNode& -Send::get_state(void) -{ - return state (true); -} - -XMLNode& -Send::state(bool full) -{ - XMLNode& node = IOProcessor::state(full); - char buf[32]; - node.add_property ("type", "send"); - snprintf (buf, sizeof (buf), "%" PRIu32, bitslot); - node.add_property ("bitslot", buf); - - return node; -} - -int -Send::set_state(const XMLNode& node) -{ - XMLNodeList nlist = node.children(); - XMLNodeIterator niter; - const XMLProperty* prop; - - if ((prop = node.property ("bitslot")) == 0) { - bitslot = _session.next_send_id(); - } else { - sscanf (prop->value().c_str(), "%" PRIu32, &bitslot); - _session.mark_send_id (bitslot); - } - - const XMLNode* insert_node = &node; - - /* Send has regular IO automation (gain, pan) */ - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "IOProcessor") { - insert_node = *niter; - } else if ((*niter)->name() == X_("Automation")) { - _io->set_automation_state (*(*niter), Parameter(GainAutomation)); - } - } - - IOProcessor::set_state (*insert_node); - - return 0; -} - -void -Send::run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) -{ - if (active()) { - - // we have to copy the input, because IO::deliver_output may alter the buffers - // in-place, which a send must never do. - - BufferSet& sendbufs = _session.get_mix_buffers(bufs.count()); - - sendbufs.read_from(bufs, nframes); - assert(sendbufs.count() == bufs.count()); - - _io->deliver_output (sendbufs, start_frame, end_frame, nframes, offset); - - if (_metering) { - if (_io->_gain == 0) { - _io->_meter->reset(); - } else { - _io->_meter->run_in_place(_io->output_buffers(), start_frame, end_frame, nframes, offset); - } - } - - } else { - _io->silence (nframes, offset); - - if (_metering) { - _io->_meter->reset(); - } - } -} - -void -Send::set_metering (bool yn) -{ - _metering = yn; - - if (!_metering) { - /* XXX possible thread hazard here */ - _io->peak_meter().reset(); - } -} - -bool -Send::can_support_input_configuration (ChanCount in) const -{ - if (_io->input_maximum() == ChanCount::INFINITE && _io->output_maximum() == ChanCount::INFINITE) { - - /* not configured yet */ - - return true; /* we can support anything the first time we're asked */ - - } else { - - /* the "input" config for a port insert corresponds to how - many output ports it will have. - */ - - if (_io->output_maximum() == in) { - - return true; - } - } - - return false; -} - -ChanCount -Send::output_for_input_configuration (ChanCount in) const -{ - // from the internal (Insert) perspective a Send does not modify its input whatsoever - return in; -} - -bool -Send::configure_io (ChanCount in, ChanCount out) -{ - /* we're transparent no matter what. fight the power. */ - if (out != in) - return false; - - _io->set_output_maximum (in); - _io->set_output_minimum (in); - _io->set_input_maximum (ChanCount::ZERO); - _io->set_input_minimum (ChanCount::ZERO); - - bool success = _io->ensure_io (ChanCount::ZERO, in, false, this) == 0; - - if (success) { - Processor::configure_io(in, out); - _io->reset_panner(); - return true; - } else { - return false; - } -} - -ChanCount -Send::output_streams() const -{ - // this method reflects the idea that from the perspective of the Route's ProcessorList, - // a send is just a passthrough. that doesn't match what the Send actually does with its - // data, but since what it does is invisible to the Route, it appears to be a passthrough. - - return _configured_input; -} - -ChanCount -Send::input_streams() const -{ - return _configured_input; -} - - diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc deleted file mode 100644 index ff269cc931..0000000000 --- a/libs/ardour/session.cc +++ /dev/null @@ -1,4273 +0,0 @@ -/* - Copyright (C) 1999-2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include /* sprintf(3) ... grrr */ -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_LIBLO -#include -#endif - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; -using boost::shared_ptr; - -#ifdef __x86_64__ -static const int CPU_CACHE_ALIGN = 64; -#else -static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it matters less */ -#endif - -bool Session::_disable_all_loaded_plugins = false; - -Session::compute_peak_t Session::compute_peak = 0; -Session::find_peaks_t Session::find_peaks = 0; -Session::apply_gain_to_buffer_t Session::apply_gain_to_buffer = 0; -Session::mix_buffers_with_gain_t Session::mix_buffers_with_gain = 0; -Session::mix_buffers_no_gain_t Session::mix_buffers_no_gain = 0; - -sigc::signal Session::Dialog; -sigc::signal Session::AskAboutPendingState; -sigc::signal Session::AskAboutSampleRateMismatch; -sigc::signal Session::SendFeedback; - -sigc::signal Session::SMPTEOffsetChanged; -sigc::signal Session::StartTimeChanged; -sigc::signal Session::EndTimeChanged; - -sigc::signal Session::AutoBindingOn; -sigc::signal Session::AutoBindingOff; - -Session::Session (AudioEngine &eng, - const string& fullpath, - const string& snapshot_name, - string mix_template) - - : _engine (eng), - _scratch_buffers(new BufferSet()), - _silent_buffers(new BufferSet()), - _mix_buffers(new BufferSet()), - _mmc_port (default_mmc_port), - _mtc_port (default_mtc_port), - _midi_port (default_midi_port), - _session_dir (new SessionDirectory(fullpath)), - pending_events (2048), - post_transport_work((PostTransportWork)0), - _send_smpte_update (false), - midi_requests (128), - diskstreams (new DiskstreamList), - routes (new RouteList), - auditioner ((Auditioner*) 0), - _bundle_xml_node (0), - _click_io ((IO*) 0), - main_outs (0) -{ - bool new_session; - - if (!eng.connected()) { - throw failed_constructor(); - } - - cerr << "Loading session " << fullpath << " using snapshot " << snapshot_name << " (1)" << endl; - - n_physical_outputs = _engine.n_physical_outputs(); - n_physical_inputs = _engine.n_physical_inputs(); - - first_stage_init (fullpath, snapshot_name); - - new_session = !Glib::file_test (_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)); - - if (new_session) { - if (create (new_session, mix_template, compute_initial_length())) { - destroy (); - throw failed_constructor (); - } - } - - if (second_stage_init (new_session)) { - destroy (); - throw failed_constructor (); - } - - store_recent_sessions(_name, _path); - - bool was_dirty = dirty(); - - _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - - Config->ParameterChanged.connect (mem_fun (*this, &Session::config_changed)); - - if (was_dirty) { - DirtyChanged (); /* EMIT SIGNAL */ - } -} - -Session::Session (AudioEngine &eng, - string fullpath, - string snapshot_name, - AutoConnectOption input_ac, - AutoConnectOption output_ac, - uint32_t control_out_channels, - uint32_t master_out_channels, - uint32_t requested_physical_in, - uint32_t requested_physical_out, - nframes_t initial_length) - - : _engine (eng), - _scratch_buffers(new BufferSet()), - _silent_buffers(new BufferSet()), - _mix_buffers(new BufferSet()), - _mmc_port (default_mmc_port), - _mtc_port (default_mtc_port), - _midi_port (default_midi_port), - _session_dir ( new SessionDirectory(fullpath)), - pending_events (2048), - post_transport_work((PostTransportWork)0), - _send_smpte_update (false), - midi_requests (16), - diskstreams (new DiskstreamList), - routes (new RouteList), - _bundle_xml_node (0), - main_outs (0) - -{ - bool new_session; - - if (!eng.connected()) { - throw failed_constructor(); - } - - cerr << "Loading session " << fullpath << " using snapshot " << snapshot_name << " (2)" << endl; - - n_physical_outputs = _engine.n_physical_outputs(); - n_physical_inputs = _engine.n_physical_inputs(); - - if (n_physical_inputs) { - n_physical_inputs = max (requested_physical_in, n_physical_inputs); - } - - if (n_physical_outputs) { - n_physical_outputs = max (requested_physical_out, n_physical_outputs); - } - - first_stage_init (fullpath, snapshot_name); - - new_session = !g_file_test (_path.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)); - - if (new_session) { - if (create (new_session, string(), initial_length)) { - destroy (); - throw failed_constructor (); - } - } - - { - /* set up Master Out and Control Out if necessary */ - - RouteList rl; - int control_id = 1; - - if (control_out_channels) { - shared_ptr r (new Route (*this, _("monitor"), -1, control_out_channels, -1, control_out_channels, Route::ControlOut)); - r->set_remote_control_id (control_id++); - - rl.push_back (r); - } - - if (master_out_channels) { - shared_ptr r (new Route (*this, _("master"), -1, master_out_channels, -1, master_out_channels, Route::MasterOut)); - r->set_remote_control_id (control_id); - - rl.push_back (r); - } else { - /* prohibit auto-connect to master, because there isn't one */ - output_ac = AutoConnectOption (output_ac & ~AutoConnectMaster); - } - - if (!rl.empty()) { - add_routes (rl, false); - } - - } - - Config->set_input_auto_connect (input_ac); - Config->set_output_auto_connect (output_ac); - - if (second_stage_init (new_session)) { - destroy (); - throw failed_constructor (); - } - - store_recent_sessions (_name, _path); - - _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - - Config->ParameterChanged.connect (mem_fun (*this, &Session::config_changed)); -} - -Session::~Session () -{ - destroy (); -} - -void -Session::destroy () -{ - /* if we got to here, leaving pending capture state around - is a mistake. - */ - - remove_pending_capture_state (); - - _state_of_the_state = StateOfTheState (CannotSave|Deletion); - - _engine.remove_session (); - - GoingAway (); /* EMIT SIGNAL */ - - /* do this */ - - notify_callbacks (); - - /* clear history so that no references to objects are held any more */ - - _history.clear (); - - /* clear state tree so that no references to objects are held any more */ - - if (state_tree) { - delete state_tree; - } - - terminate_butler_thread (); - //terminate_midi_thread (); - - if (click_data && click_data != default_click) { - delete [] click_data; - } - - if (click_emphasis_data && click_emphasis_data != default_click_emphasis) { - delete [] click_emphasis_data; - } - - clear_clicks (); - - delete _scratch_buffers; - delete _silent_buffers; - delete _mix_buffers; - - AudioDiskstream::free_working_buffers(); - - Route::SyncOrderKeys.clear(); - -#undef TRACK_DESTRUCTION -#ifdef TRACK_DESTRUCTION - cerr << "delete named selections\n"; -#endif /* TRACK_DESTRUCTION */ - for (NamedSelectionList::iterator i = named_selections.begin(); i != named_selections.end(); ) { - NamedSelectionList::iterator tmp; - - tmp = i; - ++tmp; - - delete *i; - i = tmp; - } - -#ifdef TRACK_DESTRUCTION - cerr << "delete playlists\n"; -#endif /* TRACK_DESTRUCTION */ - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ) { - PlaylistList::iterator tmp; - - tmp = i; - ++tmp; - - (*i)->drop_references (); - - i = tmp; - } - - for (PlaylistList::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ) { - PlaylistList::iterator tmp; - - tmp = i; - ++tmp; - - (*i)->drop_references (); - - i = tmp; - } - - playlists.clear (); - unused_playlists.clear (); - -#ifdef TRACK_DESTRUCTION - cerr << "delete regions\n"; -#endif /* TRACK_DESTRUCTION */ - - for (RegionList::iterator i = regions.begin(); i != regions.end(); ) { - RegionList::iterator tmp; - - tmp = i; - ++tmp; - - i->second->drop_references (); - - i = tmp; - } - - regions.clear (); - -#ifdef TRACK_DESTRUCTION - cerr << "delete routes\n"; -#endif /* TRACK_DESTRUCTION */ - { - RCUWriter writer (routes); - boost::shared_ptr r = writer.get_copy (); - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->drop_references (); - } - r->clear (); - /* writer goes out of scope and updates master */ - } - - routes.flush (); - -#ifdef TRACK_DESTRUCTION - cerr << "delete diskstreams\n"; -#endif /* TRACK_DESTRUCTION */ - { - RCUWriter dwriter (diskstreams); - boost::shared_ptr dsl = dwriter.get_copy(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->drop_references (); - } - dsl->clear (); - } - diskstreams.flush (); - -#ifdef TRACK_DESTRUCTION - cerr << "delete audio sources\n"; -#endif /* TRACK_DESTRUCTION */ - for (SourceMap::iterator i = sources.begin(); i != sources.end(); ) { - SourceMap::iterator tmp; - - tmp = i; - ++tmp; - - i->second->drop_references (); - - i = tmp; - } - sources.clear (); - -#ifdef TRACK_DESTRUCTION - cerr << "delete mix groups\n"; -#endif /* TRACK_DESTRUCTION */ - for (list::iterator i = mix_groups.begin(); i != mix_groups.end(); ) { - list::iterator tmp; - - tmp = i; - ++tmp; - - delete *i; - - i = tmp; - } - -#ifdef TRACK_DESTRUCTION - cerr << "delete edit groups\n"; -#endif /* TRACK_DESTRUCTION */ - for (list::iterator i = edit_groups.begin(); i != edit_groups.end(); ) { - list::iterator tmp; - - tmp = i; - ++tmp; - - delete *i; - - i = tmp; - } - - if (butler_mixdown_buffer) { - delete [] butler_mixdown_buffer; - } - - if (butler_gain_buffer) { - delete [] butler_gain_buffer; - } - - Crossfade::set_buffer_size (0); - - if (mmc) { - delete mmc; - } -} - -void -Session::set_worst_io_latencies () -{ - _worst_output_latency = 0; - _worst_input_latency = 0; - - if (!_engine.connected()) { - return; - } - - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - _worst_output_latency = max (_worst_output_latency, (*i)->output_latency()); - _worst_input_latency = max (_worst_input_latency, (*i)->input_latency()); - } -} - -void -Session::when_engine_running () -{ - string first_physical_output; - - /* we don't want to run execute this again */ - - BootMessage (_("Set block size and sample rate")); - - set_block_size (_engine.frames_per_cycle()); - set_frame_rate (_engine.frame_rate()); - - BootMessage (_("Using configuration")); - - Config->map_parameters (mem_fun (*this, &Session::config_changed)); - - /* every time we reconnect, recompute worst case output latencies */ - - _engine.Running.connect (mem_fun (*this, &Session::set_worst_io_latencies)); - - if (synced_to_jack()) { - _engine.transport_stop (); - } - - if (Config->get_jack_time_master()) { - _engine.transport_locate (_transport_frame); - } - - _clicking = false; - - try { - XMLNode* child = 0; - - _click_io.reset (new ClickIO (*this, "click", 0, 0, -1, -1)); - - if (state_tree && (child = find_named_node (*state_tree->root(), "Click")) != 0) { - - /* existing state for Click */ - - if (_click_io->set_state (*child->children().front()) == 0) { - - _clicking = Config->get_clicking (); - - } else { - - error << _("could not setup Click I/O") << endmsg; - _clicking = false; - } - - } else { - - /* default state for Click */ - - first_physical_output = _engine.get_nth_physical_output (DataType::AUDIO, 0); - - if (first_physical_output.length()) { - if (_click_io->add_output_port (first_physical_output, this)) { - // relax, even though its an error - } else { - _clicking = Config->get_clicking (); - } - } - } - } - - catch (failed_constructor& err) { - error << _("cannot setup Click I/O") << endmsg; - } - - BootMessage (_("Compute I/O Latencies")); - - set_worst_io_latencies (); - - if (_clicking) { - // XXX HOW TO ALERT UI TO THIS ? DO WE NEED TO? - } - - /* Create a set of Bundle objects that map - to the physical outputs currently available - */ - - BootMessage (_("Set up standard connections")); - - /* ONE: MONO */ - - for (uint32_t np = 0; np < n_physical_outputs; ++np) { - char buf[32]; - snprintf (buf, sizeof (buf), _("out %" PRIu32), np+1); - - shared_ptr c (new AutoBundle (buf, true)); - c->set_channels (1); - c->set_port (0, _engine.get_nth_physical_output (DataType::AUDIO, np)); - - add_bundle (c); - } - - for (uint32_t np = 0; np < n_physical_inputs; ++np) { - char buf[32]; - snprintf (buf, sizeof (buf), _("in %" PRIu32), np+1); - - shared_ptr c (new AutoBundle (buf, false)); - c->set_channels (1); - c->set_port (0, _engine.get_nth_physical_input (DataType::AUDIO, np)); - - add_bundle (c); - } - - /* TWO: STEREO */ - - for (uint32_t np = 0; np < n_physical_outputs; np +=2) { - char buf[32]; - snprintf (buf, sizeof (buf), _("out %" PRIu32 "+%" PRIu32), np+1, np+2); - - shared_ptr c (new AutoBundle (buf, true)); - c->set_channels (2); - c->set_port (0, _engine.get_nth_physical_output (DataType::AUDIO, np)); - c->set_port (1, _engine.get_nth_physical_output (DataType::AUDIO, np + 1)); - - add_bundle (c); - } - - for (uint32_t np = 0; np < n_physical_inputs; np +=2) { - char buf[32]; - snprintf (buf, sizeof (buf), _("in %" PRIu32 "+%" PRIu32), np+1, np+2); - - shared_ptr c (new AutoBundle (buf, false)); - c->set_channels (2); - c->set_port (0, _engine.get_nth_physical_input (DataType::AUDIO, np)); - c->set_port (1, _engine.get_nth_physical_input (DataType::AUDIO, np + 1)); - - add_bundle (c); - } - - /* THREE MASTER */ - - if (_master_out) { - - /* create master/control ports */ - - if (_master_out) { - uint32_t n; - - /* force the master to ignore any later call to this */ - - if (_master_out->pending_state_node) { - _master_out->ports_became_legal(); - } - - /* no panner resets till we are through */ - - _master_out->defer_pan_reset (); - - while (_master_out->n_inputs().n_audio() - < _master_out->input_maximum().n_audio()) { - if (_master_out->add_input_port ("", this, DataType::AUDIO)) { - error << _("cannot setup master inputs") - << endmsg; - break; - } - } - n = 0; - while (_master_out->n_outputs().n_audio() - < _master_out->output_maximum().n_audio()) { - if (_master_out->add_output_port (_engine.get_nth_physical_output (DataType::AUDIO, n), this, DataType::AUDIO)) { - error << _("cannot setup master outputs") - << endmsg; - break; - } - n++; - } - - _master_out->allow_pan_reset (); - - } - - shared_ptr c (new AutoBundle (_("Master Out"), true)); - - c->set_channels (_master_out->n_inputs().n_total()); - for (uint32_t n = 0; n < _master_out->n_inputs ().n_total(); ++n) { - c->set_port (n, _master_out->input(n)->name()); - } - add_bundle (c); - } - - BootMessage (_("Setup signal flow and plugins")); - - hookup_io (); - - /* catch up on send+insert cnts */ - - BootMessage (_("Catch up with send/insert state")); - - insert_cnt = 0; - - for (list::iterator i = _port_inserts.begin(); i != _port_inserts.end(); ++i) { - uint32_t id; - - if (sscanf ((*i)->name().c_str(), "%*s %u", &id) == 1) { - if (id > insert_cnt) { - insert_cnt = id; - } - } - } - - send_cnt = 0; - - for (list::iterator i = _sends.begin(); i != _sends.end(); ++i) { - uint32_t id; - - if (sscanf ((*i)->name().c_str(), "%*s %u", &id) == 1) { - if (id > send_cnt) { - send_cnt = id; - } - } - } - - - _state_of_the_state = StateOfTheState (_state_of_the_state & ~(CannotSave|Dirty)); - - /* hook us up to the engine */ - - BootMessage (_("Connect to engine")); - - _engine.set_session (this); - -#ifdef HAVE_LIBLO - /* and to OSC */ - - BootMessage (_("OSC startup")); - - osc->set_session (*this); -#endif - -} - -void -Session::hookup_io () -{ - /* stop graph reordering notifications from - causing resorts, etc. - */ - - _state_of_the_state = StateOfTheState (_state_of_the_state | InitialConnecting); - - - if (auditioner == 0) { - - /* we delay creating the auditioner till now because - it makes its own connections to ports. - the engine has to be running for this to work. - */ - - try { - auditioner.reset (new Auditioner (*this)); - } - - catch (failed_constructor& err) { - warning << _("cannot create Auditioner: no auditioning of regions possible") << endmsg; - } - } - - /* Tell all IO objects to create their ports */ - - IO::enable_ports (); - - if (_control_out) { - uint32_t n; - vector cports; - - while (_control_out->n_inputs().n_audio() < _control_out->input_maximum().n_audio()) { - if (_control_out->add_input_port ("", this)) { - error << _("cannot setup control inputs") - << endmsg; - break; - } - } - n = 0; - while (_control_out->n_outputs().n_audio() < _control_out->output_maximum().n_audio()) { - if (_control_out->add_output_port (_engine.get_nth_physical_output (DataType::AUDIO, n), this)) { - error << _("cannot set up master outputs") - << endmsg; - break; - } - n++; - } - - - uint32_t ni = _control_out->n_inputs().get (DataType::AUDIO); - - for (n = 0; n < ni; ++n) { - cports.push_back (_control_out->input(n)->name()); - } - - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator x = r->begin(); x != r->end(); ++x) { - (*x)->set_control_outs (cports); - } - } - - /* load bundles, which we may have postponed earlier on */ - if (_bundle_xml_node) { - load_bundles (*_bundle_xml_node); - delete _bundle_xml_node; - } - - /* Tell all IO objects to connect themselves together */ - - IO::enable_connecting (); - - /* Now reset all panners */ - - IO::reset_panners (); - - /* Anyone who cares about input state, wake up and do something */ - - IOConnectionsComplete (); /* EMIT SIGNAL */ - - _state_of_the_state = StateOfTheState (_state_of_the_state & ~InitialConnecting); - - - /* now handle the whole enchilada as if it was one - graph reorder event. - */ - - graph_reordered (); - - /* update mixer solo state */ - - catch_up_on_solo(); -} - -void -Session::playlist_length_changed () -{ - /* we can't just increase end_location->end() if pl->get_maximum_extent() - if larger. if the playlist used to be the longest playlist, - and its now shorter, we have to decrease end_location->end(). hence, - we have to iterate over all diskstreams and check the - playlists currently in use. - */ - find_current_end (); -} - -void -Session::diskstream_playlist_changed (boost::shared_ptr dstream) -{ - boost::shared_ptr playlist; - - if ((playlist = dstream->playlist()) != 0) { - playlist->LengthChanged.connect (mem_fun (this, &Session::playlist_length_changed)); - } - - /* see comment in playlist_length_changed () */ - find_current_end (); -} - -bool -Session::record_enabling_legal () const -{ - /* this used to be in here, but survey says.... we don't need to restrict it */ - // if (record_status() == Recording) { - // return false; - // } - - if (Config->get_all_safe()) { - return false; - } - return true; -} - -void -Session::reset_input_monitor_state () -{ - if (transport_rolling()) { - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - //cerr << "switching to input = " << !auto_input << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (Config->get_monitoring_model() == HardwareMonitoring && !Config->get_auto_input()); - } - } - } else { - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - //cerr << "switching to input = " << !Config->get_auto_input() << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (Config->get_monitoring_model() == HardwareMonitoring); - } - } - } -} - -void -Session::auto_punch_start_changed (Location* location) -{ - replace_event (Event::PunchIn, location->start()); - - if (get_record_enabled() && Config->get_punch_in()) { - /* capture start has been changed, so save new pending state */ - save_state ("", true); - } -} - -void -Session::auto_punch_end_changed (Location* location) -{ - nframes_t when_to_stop = location->end(); - // when_to_stop += _worst_output_latency + _worst_input_latency; - replace_event (Event::PunchOut, when_to_stop); -} - -void -Session::auto_punch_changed (Location* location) -{ - nframes_t when_to_stop = location->end(); - - replace_event (Event::PunchIn, location->start()); - //when_to_stop += _worst_output_latency + _worst_input_latency; - replace_event (Event::PunchOut, when_to_stop); -} - -void -Session::auto_loop_changed (Location* location) -{ - replace_event (Event::AutoLoop, location->end(), location->start()); - - if (transport_rolling() && play_loop) { - - //if (_transport_frame < location->start() || _transport_frame > location->end()) { - - if (_transport_frame > location->end()) { - // relocate to beginning of loop - clear_events (Event::LocateRoll); - - request_locate (location->start(), true); - - } - else if (Config->get_seamless_loop() && !loop_changing) { - - // schedule a locate-roll to refill the diskstreams at the - // previous loop end - loop_changing = true; - - if (location->end() > last_loopend) { - clear_events (Event::LocateRoll); - Event *ev = new Event (Event::LocateRoll, Event::Add, last_loopend, last_loopend, 0, true); - queue_event (ev); - } - - } - } - - last_loopend = location->end(); -} - -void -Session::set_auto_punch_location (Location* location) -{ - Location* existing; - - if ((existing = _locations.auto_punch_location()) != 0 && existing != location) { - auto_punch_start_changed_connection.disconnect(); - auto_punch_end_changed_connection.disconnect(); - auto_punch_changed_connection.disconnect(); - existing->set_auto_punch (false, this); - remove_event (existing->start(), Event::PunchIn); - clear_events (Event::PunchOut); - auto_punch_location_changed (0); - } - - set_dirty(); - - if (location == 0) { - return; - } - - if (location->end() <= location->start()) { - error << _("Session: you can't use that location for auto punch (start <= end)") << endmsg; - return; - } - - auto_punch_start_changed_connection.disconnect(); - auto_punch_end_changed_connection.disconnect(); - auto_punch_changed_connection.disconnect(); - - auto_punch_start_changed_connection = location->start_changed.connect (mem_fun (this, &Session::auto_punch_start_changed)); - auto_punch_end_changed_connection = location->end_changed.connect (mem_fun (this, &Session::auto_punch_end_changed)); - auto_punch_changed_connection = location->changed.connect (mem_fun (this, &Session::auto_punch_changed)); - - location->set_auto_punch (true, this); - - - auto_punch_changed (location); - - auto_punch_location_changed (location); -} - -void -Session::set_auto_loop_location (Location* location) -{ - Location* existing; - - if ((existing = _locations.auto_loop_location()) != 0 && existing != location) { - auto_loop_start_changed_connection.disconnect(); - auto_loop_end_changed_connection.disconnect(); - auto_loop_changed_connection.disconnect(); - existing->set_auto_loop (false, this); - remove_event (existing->end(), Event::AutoLoop); - auto_loop_location_changed (0); - } - - set_dirty(); - - if (location == 0) { - return; - } - - if (location->end() <= location->start()) { - error << _("Session: you can't use a mark for auto loop") << endmsg; - return; - } - - last_loopend = location->end(); - - auto_loop_start_changed_connection.disconnect(); - auto_loop_end_changed_connection.disconnect(); - auto_loop_changed_connection.disconnect(); - - auto_loop_start_changed_connection = location->start_changed.connect (mem_fun (this, &Session::auto_loop_changed)); - auto_loop_end_changed_connection = location->end_changed.connect (mem_fun (this, &Session::auto_loop_changed)); - auto_loop_changed_connection = location->changed.connect (mem_fun (this, &Session::auto_loop_changed)); - - location->set_auto_loop (true, this); - - /* take care of our stuff first */ - - auto_loop_changed (location); - - /* now tell everyone else */ - - auto_loop_location_changed (location); -} - -void -Session::locations_added (Location* ignored) -{ - set_dirty (); -} - -void -Session::locations_changed () -{ - _locations.apply (*this, &Session::handle_locations_changed); -} - -void -Session::handle_locations_changed (Locations::LocationList& locations) -{ - Locations::LocationList::iterator i; - Location* location; - bool set_loop = false; - bool set_punch = false; - - for (i = locations.begin(); i != locations.end(); ++i) { - - location =* i; - - if (location->is_auto_punch()) { - set_auto_punch_location (location); - set_punch = true; - } - if (location->is_auto_loop()) { - set_auto_loop_location (location); - set_loop = true; - } - - } - - if (!set_loop) { - set_auto_loop_location (0); - } - if (!set_punch) { - set_auto_punch_location (0); - } - - set_dirty(); -} - -void -Session::enable_record () -{ - /* XXX really atomic compare+swap here */ - if (g_atomic_int_get (&_record_status) != Recording) { - g_atomic_int_set (&_record_status, Recording); - _last_record_location = _transport_frame; - deliver_mmc(MIDI::MachineControl::cmdRecordStrobe, _last_record_location); - - if (Config->get_monitoring_model() == HardwareMonitoring && Config->get_auto_input()) { - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - (*i)->monitor_input (true); - } - } - } - - RecordStateChanged (); - } -} - -void -Session::disable_record (bool rt_context, bool force) -{ - RecordState rs; - - if ((rs = (RecordState) g_atomic_int_get (&_record_status)) != Disabled) { - - if ((!Config->get_latched_record_enable () && !play_loop) || force) { - g_atomic_int_set (&_record_status, Disabled); - } else { - if (rs == Recording) { - g_atomic_int_set (&_record_status, Enabled); - } - } - - // FIXME: timestamp correct? [DR] - // FIXME FIXME FIXME: rt_context? this must be called in the process thread. - // does this /need/ to be sent in all cases? - if (rt_context) - deliver_mmc (MIDI::MachineControl::cmdRecordExit, _transport_frame); - - if (Config->get_monitoring_model() == HardwareMonitoring && Config->get_auto_input()) { - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - (*i)->monitor_input (false); - } - } - } - - RecordStateChanged (); /* emit signal */ - - if (!rt_context) { - remove_pending_capture_state (); - } - } -} - -void -Session::step_back_from_record () -{ - /* XXX really atomic compare+swap here */ - if (g_atomic_int_get (&_record_status) == Recording) { - g_atomic_int_set (&_record_status, Enabled); - - if (Config->get_monitoring_model() == HardwareMonitoring && Config->get_auto_input()) { - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - //cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (false); - } - } - } - } -} - -void -Session::maybe_enable_record () -{ - g_atomic_int_set (&_record_status, Enabled); - - /* this function is currently called from somewhere other than an RT thread. - this save_state() call therefore doesn't impact anything. - */ - - save_state ("", true); - - if (_transport_speed) { - if (!Config->get_punch_in()) { - enable_record (); - } - } else { - deliver_mmc (MIDI::MachineControl::cmdRecordPause, _transport_frame); - RecordStateChanged (); /* EMIT SIGNAL */ - } - - set_dirty(); -} - -nframes_t -Session::audible_frame () const -{ - nframes_t ret; - nframes_t offset; - nframes_t tf; - - /* the first of these two possible settings for "offset" - mean that the audible frame is stationary until - audio emerges from the latency compensation - "pseudo-pipeline". - - the second means that the audible frame is stationary - until audio would emerge from a physical port - in the absence of any plugin latency compensation - */ - - offset = _worst_output_latency; - - if (offset > current_block_size) { - offset -= current_block_size; - } else { - /* XXX is this correct? if we have no external - physical connections and everything is internal - then surely this is zero? still, how - likely is that anyway? - */ - offset = current_block_size; - } - - if (synced_to_jack()) { - tf = _engine.transport_frame(); - } else { - tf = _transport_frame; - } - - if (_transport_speed == 0) { - return tf; - } - - if (tf < offset) { - return 0; - } - - ret = tf; - - if (!non_realtime_work_pending()) { - - /* MOVING */ - - /* take latency into account */ - - ret -= offset; - } - - return ret; -} - -void -Session::set_frame_rate (nframes_t frames_per_second) -{ - /** \fn void Session::set_frame_size(nframes_t) - the AudioEngine object that calls this guarantees - that it will not be called while we are also in - ::process(). Its fine to do things that block - here. - */ - - _base_frame_rate = frames_per_second; - - sync_time_vars(); - - Automatable::set_automation_interval ((jack_nframes_t) ceil ((double) frames_per_second * (0.001 * Config->get_automation_interval()))); - - clear_clicks (); - - // XXX we need some equivalent to this, somehow - // SndFileSource::setup_standard_crossfades (frames_per_second); - - set_dirty(); - - /* XXX need to reset/reinstantiate all LADSPA plugins */ -} - -void -Session::set_block_size (nframes_t nframes) -{ - /* the AudioEngine guarantees - that it will not be called while we are also in - ::process(). It is therefore fine to do things that block - here. - */ - - { - - current_block_size = nframes; - - ensure_buffers(_scratch_buffers->available()); - - if (_gain_automation_buffer) { - delete [] _gain_automation_buffer; - } - _gain_automation_buffer = new gain_t[nframes]; - - allocate_pan_automation_buffers (nframes, _npan_buffers, true); - - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->set_block_size (nframes); - } - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->set_block_size (nframes); - } - - set_worst_io_latencies (); - } -} - -void -Session::set_default_fade (float steepness, float fade_msecs) -{ -#if 0 - nframes_t fade_frames; - - /* Don't allow fade of less 1 frame */ - - if (fade_msecs < (1000.0 * (1.0/_current_frame_rate))) { - - fade_msecs = 0; - fade_frames = 0; - - } else { - - fade_frames = (nframes_t) floor (fade_msecs * _current_frame_rate * 0.001); - - } - - default_fade_msecs = fade_msecs; - default_fade_steepness = steepness; - - { - // jlc, WTF is this! - Glib::RWLock::ReaderLock lm (route_lock); - AudioRegion::set_default_fade (steepness, fade_frames); - } - - set_dirty(); - - /* XXX have to do this at some point */ - /* foreach region using default fade, reset, then - refill_all_diskstream_buffers (); - */ -#endif -} - -struct RouteSorter { - bool operator() (boost::shared_ptr r1, boost::shared_ptr r2) { - if (r1->fed_by.find (r2) != r1->fed_by.end()) { - return false; - } else if (r2->fed_by.find (r1) != r2->fed_by.end()) { - return true; - } else { - if (r1->fed_by.empty()) { - if (r2->fed_by.empty()) { - /* no ardour-based connections inbound to either route. just use signal order */ - return r1->order_key(N_("signal")) < r2->order_key(N_("signal")); - } else { - /* r2 has connections, r1 does not; run r1 early */ - return true; - } - } else { - return r1->order_key(N_("signal")) < r2->order_key(N_("signal")); - } - } - } -}; - -static void -trace_terminal (shared_ptr r1, shared_ptr rbase) -{ - shared_ptr r2; - - if ((r1->fed_by.find (rbase) != r1->fed_by.end()) && (rbase->fed_by.find (r1) != rbase->fed_by.end())) { - info << string_compose(_("feedback loop setup between %1 and %2"), r1->name(), rbase->name()) << endmsg; - return; - } - - /* make a copy of the existing list of routes that feed r1 */ - - set > existing = r1->fed_by; - - /* for each route that feeds r1, recurse, marking it as feeding - rbase as well. - */ - - for (set >::iterator i = existing.begin(); i != existing.end(); ++i) { - r2 =* i; - - /* r2 is a route that feeds r1 which somehow feeds base. mark - base as being fed by r2 - */ - - rbase->fed_by.insert (r2); - - if (r2 != rbase) { - - /* 2nd level feedback loop detection. if r1 feeds or is fed by r2, - stop here. - */ - - if ((r1->fed_by.find (r2) != r1->fed_by.end()) && (r2->fed_by.find (r1) != r2->fed_by.end())) { - continue; - } - - /* now recurse, so that we can mark base as being fed by - all routes that feed r2 - */ - - trace_terminal (r2, rbase); - } - - } -} - -void -Session::resort_routes () -{ - /* don't do anything here with signals emitted - by Routes while we are being destroyed. - */ - - if (_state_of_the_state & Deletion) { - return; - } - - - { - - RCUWriter writer (routes); - shared_ptr r = writer.get_copy (); - resort_routes_using (r); - /* writer goes out of scope and forces update */ - } - -} -void -Session::resort_routes_using (shared_ptr r) -{ - RouteList::iterator i, j; - - for (i = r->begin(); i != r->end(); ++i) { - - (*i)->fed_by.clear (); - - for (j = r->begin(); j != r->end(); ++j) { - - /* although routes can feed themselves, it will - cause an endless recursive descent if we - detect it. so don't bother checking for - self-feeding. - */ - - if (*j == *i) { - continue; - } - - if ((*j)->feeds (*i)) { - (*i)->fed_by.insert (*j); - } - } - } - - for (i = r->begin(); i != r->end(); ++i) { - trace_terminal (*i, *i); - } - - RouteSorter cmp; - r->sort (cmp); - -#if 0 - cerr << "finished route resort\n"; - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - cerr << " " << (*i)->name() << " signal order = " << (*i)->order_key ("signal") << endl; - } - cerr << endl; -#endif - -} - -list > -Session::new_midi_track (TrackMode mode, uint32_t how_many) -{ - char track_name[32]; - uint32_t track_id = 0; - uint32_t n = 0; - string port; - RouteList new_routes; - list > ret; - //uint32_t control_id; - - // FIXME: need physical I/O and autoconnect stuff for MIDI - - /* count existing midi tracks */ - - { - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (dynamic_cast((*i).get()) != 0) { - if (!(*i)->is_hidden()) { - n++; - //channels_used += (*i)->n_inputs().n_midi(); - } - } - } - } - - /* - vector physinputs; - vector physoutputs; - uint32_t nphysical_in; - uint32_t nphysical_out; - - _engine.get_physical_outputs (physoutputs); - _engine.get_physical_inputs (physinputs); - control_id = ntracks() + nbusses() + 1; - */ - - while (how_many) { - - /* check for duplicate route names, since we might have pre-existing - routes with this name (e.g. create Audio1, Audio2, delete Audio1, - save, close,restart,add new route - first named route is now - Audio2) - */ - - - do { - ++track_id; - - snprintf (track_name, sizeof(track_name), "Midi %" PRIu32, track_id); - - if (route_by_name (track_name) == 0) { - break; - } - - } while (track_id < (UINT_MAX-1)); - - /* - if (Config->get_input_auto_connect() & AutoConnectPhysical) { - nphysical_in = min (n_physical_inputs, (uint32_t) physinputs.size()); - } else { - nphysical_in = 0; - } - - if (Config->get_output_auto_connect() & AutoConnectPhysical) { - nphysical_out = min (n_physical_outputs, (uint32_t) physinputs.size()); - } else { - nphysical_out = 0; - } - */ - - shared_ptr track; - - try { - track = boost::shared_ptr((new MidiTrack (*this, track_name, Route::Flag (0), mode))); - - if (track->ensure_io (ChanCount(DataType::MIDI, 1), ChanCount(DataType::AUDIO, 1), false, this)) { - error << "cannot configure 1 in/1 out configuration for new midi track" << endmsg; - goto failed; - } - - /* - if (nphysical_in) { - for (uint32_t x = 0; x < track->n_inputs().n_midi() && x < nphysical_in; ++x) { - - port = ""; - - if (Config->get_input_auto_connect() & AutoConnectPhysical) { - port = physinputs[(channels_used+x)%nphysical_in]; - } - - if (port.length() && track->connect_input (track->input (x), port, this)) { - break; - } - } - } - - for (uint32_t x = 0; x < track->n_outputs().n_midi(); ++x) { - - port = ""; - - if (nphysical_out && (Config->get_output_auto_connect() & AutoConnectPhysical)) { - port = physoutputs[(channels_used+x)%nphysical_out]; - } else if (Config->get_output_auto_connect() & AutoConnectMaster) { - if (_master_out) { - port = _master_out->input (x%_master_out->n_inputs().n_midi())->name(); - } - } - - if (port.length() && track->connect_output (track->output (x), port, this)) { - break; - } - } - - channels_used += track->n_inputs ().n_midi(); - - */ - - track->midi_diskstream()->non_realtime_input_change(); - - track->DiskstreamChanged.connect (mem_fun (this, &Session::resort_routes)); - //track->set_remote_control_id (control_id); - - new_routes.push_back (track); - ret.push_back (track); - } - - catch (failed_constructor &err) { - error << _("Session: could not create new midi track.") << endmsg; - - if (track) { - /* we need to get rid of this, since the track failed to be created */ - /* XXX arguably, AudioTrack::AudioTrack should not do the Session::add_diskstream() */ - - { - RCUWriter writer (diskstreams); - boost::shared_ptr ds = writer.get_copy(); - ds->remove (track->midi_diskstream()); - } - } - - goto failed; - } - - catch (AudioEngine::PortRegistrationFailure& pfe) { - - error << _("No more JACK ports are available. You will need to stop Ardour and restart JACK with ports if you need this many tracks.") << endmsg; - - if (track) { - /* we need to get rid of this, since the track failed to be created */ - /* XXX arguably, MidiTrack::MidiTrack should not do the Session::add_diskstream() */ - - { - RCUWriter writer (diskstreams); - boost::shared_ptr ds = writer.get_copy(); - ds->remove (track->midi_diskstream()); - } - } - - goto failed; - } - - --how_many; - } - - failed: - if (!new_routes.empty()) { - add_routes (new_routes, false); - save_state (_current_snapshot_name); - } - - return ret; -} - -list > -Session::new_audio_track (int input_channels, int output_channels, TrackMode mode, uint32_t how_many) -{ - char track_name[32]; - uint32_t track_id = 0; - uint32_t n = 0; - uint32_t channels_used = 0; - string port; - RouteList new_routes; - list > ret; - uint32_t control_id; - - /* count existing audio tracks */ - - { - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (dynamic_cast((*i).get()) != 0) { - if (!(*i)->is_hidden()) { - n++; - channels_used += (*i)->n_inputs().n_audio(); - } - } - } - } - - vector physinputs; - vector physoutputs; - uint32_t nphysical_in; - uint32_t nphysical_out; - - _engine.get_physical_outputs (physoutputs); - _engine.get_physical_inputs (physinputs); - control_id = ntracks() + nbusses() + 1; - - while (how_many) { - - /* check for duplicate route names, since we might have pre-existing - routes with this name (e.g. create Audio1, Audio2, delete Audio1, - save, close,restart,add new route - first named route is now - Audio2) - */ - - - do { - ++track_id; - - snprintf (track_name, sizeof(track_name), "Audio %" PRIu32, track_id); - - if (route_by_name (track_name) == 0) { - break; - } - - } while (track_id < (UINT_MAX-1)); - - if (Config->get_input_auto_connect() & AutoConnectPhysical) { - nphysical_in = min (n_physical_inputs, (uint32_t) physinputs.size()); - } else { - nphysical_in = 0; - } - - if (Config->get_output_auto_connect() & AutoConnectPhysical) { - nphysical_out = min (n_physical_outputs, (uint32_t) physinputs.size()); - } else { - nphysical_out = 0; - } - - shared_ptr track; - - try { - track = boost::shared_ptr((new AudioTrack (*this, track_name, Route::Flag (0), mode))); - - if (track->ensure_io (ChanCount(DataType::AUDIO, input_channels), ChanCount(DataType::AUDIO, output_channels), false, this)) { - error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"), - input_channels, output_channels) - << endmsg; - goto failed; - } - - if (nphysical_in) { - for (uint32_t x = 0; x < track->n_inputs().n_audio() && x < nphysical_in; ++x) { - - port = ""; - - if (Config->get_input_auto_connect() & AutoConnectPhysical) { - port = physinputs[(channels_used+x)%nphysical_in]; - } - - if (port.length() && track->connect_input (track->input (x), port, this)) { - break; - } - } - } - - for (uint32_t x = 0; x < track->n_outputs().n_midi(); ++x) { - - port = ""; - - if (nphysical_out && (Config->get_output_auto_connect() & AutoConnectPhysical)) { - port = physoutputs[(channels_used+x)%nphysical_out]; - } else if (Config->get_output_auto_connect() & AutoConnectMaster) { - if (_master_out) { - port = _master_out->input (x%_master_out->n_inputs().n_audio())->name(); - } - } - - if (port.length() && track->connect_output (track->output (x), port, this)) { - break; - } - } - - channels_used += track->n_inputs ().n_audio(); - - track->audio_diskstream()->non_realtime_input_change(); - - track->DiskstreamChanged.connect (mem_fun (this, &Session::resort_routes)); - track->set_remote_control_id (control_id); - ++control_id; - - new_routes.push_back (track); - ret.push_back (track); - } - - catch (failed_constructor &err) { - error << _("Session: could not create new audio track.") << endmsg; - - if (track) { - /* we need to get rid of this, since the track failed to be created */ - /* XXX arguably, AudioTrack::AudioTrack should not do the Session::add_diskstream() */ - - { - RCUWriter writer (diskstreams); - boost::shared_ptr ds = writer.get_copy(); - ds->remove (track->audio_diskstream()); - } - } - - goto failed; - } - - catch (AudioEngine::PortRegistrationFailure& pfe) { - - error << _("No more JACK ports are available. You will need to stop Ardour and restart JACK with ports if you need this many tracks.") << endmsg; - - if (track) { - /* we need to get rid of this, since the track failed to be created */ - /* XXX arguably, AudioTrack::AudioTrack should not do the Session::add_diskstream() */ - - { - RCUWriter writer (diskstreams); - boost::shared_ptr ds = writer.get_copy(); - ds->remove (track->audio_diskstream()); - } - } - - goto failed; - } - - --how_many; - } - - failed: - if (!new_routes.empty()) { - add_routes (new_routes, true); - } - - return ret; -} - -void -Session::set_remote_control_ids () -{ - RemoteModel m = Config->get_remote_model(); - - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ( MixerOrdered == m) { - long order = (*i)->order_key(N_("signal")); - (*i)->set_remote_control_id( order+1 ); - } else if ( EditorOrdered == m) { - long order = (*i)->order_key(N_("editor")); - (*i)->set_remote_control_id( order+1 ); - } else if ( UserOrdered == m) { - //do nothing ... only changes to remote id's are initiated by user - } - } -} - - -Session::RouteList -Session::new_audio_route (int input_channels, int output_channels, uint32_t how_many) -{ - char bus_name[32]; - uint32_t bus_id = 1; - uint32_t n = 0; - string port; - RouteList ret; - uint32_t control_id; - - /* count existing audio busses */ - - { - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (dynamic_cast((*i).get()) == 0) { - if (!(*i)->is_hidden() && (*i)->name() != _("master")) { - bus_id++; - } - } - } - } - - vector physinputs; - vector physoutputs; - - _engine.get_physical_outputs (physoutputs); - _engine.get_physical_inputs (physinputs); - control_id = ntracks() + nbusses() + 1; - - while (how_many) { - - do { - snprintf (bus_name, sizeof(bus_name), "Bus %" PRIu32, bus_id); - - bus_id++; - - if (route_by_name (bus_name) == 0) { - break; - } - - } while (bus_id < (UINT_MAX-1)); - - try { - shared_ptr bus (new Route (*this, bus_name, -1, -1, -1, -1, Route::Flag(0), DataType::AUDIO)); - - if (bus->ensure_io (ChanCount(DataType::AUDIO, input_channels), ChanCount(DataType::AUDIO, output_channels), false, this)) { - error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"), - input_channels, output_channels) - << endmsg; - goto failure; - } - - for (uint32_t x = 0; n_physical_inputs && x < bus->n_inputs().n_audio(); ++x) { - - port = ""; - - if (Config->get_input_auto_connect() & AutoConnectPhysical) { - port = physinputs[((n+x)%n_physical_inputs)]; - } - - if (port.length() && bus->connect_input (bus->input (x), port, this)) { - break; - } - } - - for (uint32_t x = 0; n_physical_outputs && x < bus->n_outputs().n_audio(); ++x) { - - port = ""; - - if (Config->get_output_auto_connect() & AutoConnectPhysical) { - port = physoutputs[((n+x)%n_physical_outputs)]; - } else if (Config->get_output_auto_connect() & AutoConnectMaster) { - if (_master_out) { - port = _master_out->input (x%_master_out->n_inputs().n_audio())->name(); - } - } - - if (port.length() && bus->connect_output (bus->output (x), port, this)) { - break; - } - } - - bus->set_remote_control_id (control_id); - ++control_id; - - ret.push_back (bus); - } - - - catch (failed_constructor &err) { - error << _("Session: could not create new audio route.") << endmsg; - goto failure; - } - - catch (AudioEngine::PortRegistrationFailure& pfe) { - error << _("No more JACK ports are available. You will need to stop Ardour and restart JACK with ports if you need this many tracks.") << endmsg; - goto failure; - } - - - --how_many; - } - - failure: - if (!ret.empty()) { - add_routes (ret, true); - } - - return ret; - -} - -void -Session::add_routes (RouteList& new_routes, bool save) -{ - { - RCUWriter writer (routes); - shared_ptr r = writer.get_copy (); - r->insert (r->end(), new_routes.begin(), new_routes.end()); - resort_routes_using (r); - } - - for (RouteList::iterator x = new_routes.begin(); x != new_routes.end(); ++x) { - - boost::weak_ptr wpr (*x); - - (*x)->solo_changed.connect (sigc::bind (mem_fun (*this, &Session::route_solo_changed), wpr)); - (*x)->mute_changed.connect (mem_fun (*this, &Session::route_mute_changed)); - (*x)->output_changed.connect (mem_fun (*this, &Session::set_worst_io_latencies_x)); - (*x)->processors_changed.connect (bind (mem_fun (*this, &Session::update_latency_compensation), false, false)); - - if ((*x)->is_master()) { - _master_out = (*x); - } - - if ((*x)->is_control()) { - _control_out = (*x); - } - - add_bundle ((*x)->bundle_for_inputs()); - add_bundle ((*x)->bundle_for_outputs()); - } - - if (_control_out && IO::connecting_legal) { - - vector cports; - uint32_t ni = _control_out->n_inputs().n_audio(); - - for (uint32_t n = 0; n < ni; ++n) { - cports.push_back (_control_out->input(n)->name()); - } - - for (RouteList::iterator x = new_routes.begin(); x != new_routes.end(); ++x) { - (*x)->set_control_outs (cports); - } - } - - set_dirty(); - - if (save) { - save_state (_current_snapshot_name); - } - - RouteAdded (new_routes); /* EMIT SIGNAL */ -} - -void -Session::add_diskstream (boost::shared_ptr dstream) -{ - /* need to do this in case we're rolling at the time, to prevent false underruns */ - dstream->do_refill_with_alloc (); - - dstream->set_block_size (current_block_size); - - { - RCUWriter writer (diskstreams); - boost::shared_ptr ds = writer.get_copy(); - ds->push_back (dstream); - /* writer goes out of scope, copies ds back to main */ - } - - dstream->PlaylistChanged.connect (sigc::bind (mem_fun (*this, &Session::diskstream_playlist_changed), dstream)); - /* this will connect to future changes, and check the current length */ - diskstream_playlist_changed (dstream); - - dstream->prepare (); - -} - -void -Session::remove_route (shared_ptr route) -{ - { - RCUWriter writer (routes); - shared_ptr rs = writer.get_copy (); - - rs->remove (route); - - /* deleting the master out seems like a dumb - idea, but its more of a UI policy issue - than our concern. - */ - - if (route == _master_out) { - _master_out = shared_ptr (); - } - - if (route == _control_out) { - _control_out = shared_ptr (); - - /* cancel control outs for all routes */ - - vector empty; - - for (RouteList::iterator r = rs->begin(); r != rs->end(); ++r) { - (*r)->set_control_outs (empty); - } - } - - update_route_solo_state (); - - /* writer goes out of scope, forces route list update */ - } - - Track* t; - boost::shared_ptr ds; - - if ((t = dynamic_cast(route.get())) != 0) { - ds = t->diskstream(); - } - - if (ds) { - - { - RCUWriter dsl (diskstreams); - boost::shared_ptr d = dsl.get_copy(); - d->remove (ds); - } - } - - find_current_end (); - - // We need to disconnect the routes inputs and outputs - - route->disconnect_inputs (0); - route->disconnect_outputs (0); - - update_latency_compensation (false, false); - set_dirty(); - - /* get rid of it from the dead wood collection in the route list manager */ - - /* XXX i think this is unsafe as it currently stands, but i am not sure. (pd, october 2nd, 2006) */ - - routes.flush (); - - /* try to cause everyone to drop their references */ - - route->drop_references (); - - /* save the new state of the world */ - - if (save_state (_current_snapshot_name)) { - save_history (_current_snapshot_name); - } -} - -void -Session::route_mute_changed (void* src) -{ - set_dirty (); -} - -void -Session::route_solo_changed (void* src, boost::weak_ptr wpr) -{ - if (solo_update_disabled) { - // We know already - return; - } - - bool is_track; - boost::shared_ptr route = wpr.lock (); - - if (!route) { - /* should not happen */ - error << string_compose (_("programming error: %1"), X_("invalid route weak ptr passed to route_solo_changed")) << endmsg; - return; - } - - is_track = (boost::dynamic_pointer_cast(route) != 0); - - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - /* soloing a track mutes all other tracks, soloing a bus mutes all other busses */ - - if (is_track) { - - /* don't mess with busses */ - - if (dynamic_cast((*i).get()) == 0) { - continue; - } - - } else { - - /* don't mess with tracks */ - - if (dynamic_cast((*i).get()) != 0) { - continue; - } - } - - if ((*i) != route && - ((*i)->mix_group () == 0 || - (*i)->mix_group () != route->mix_group () || - !route->mix_group ()->is_active())) { - - if ((*i)->soloed()) { - - /* if its already soloed, and solo latching is enabled, - then leave it as it is. - */ - - if (Config->get_solo_latched()) { - continue; - } - } - - /* do it */ - - solo_update_disabled = true; - (*i)->set_solo (false, src); - solo_update_disabled = false; - } - } - - bool something_soloed = false; - bool same_thing_soloed = false; - bool signal = false; - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->soloed()) { - something_soloed = true; - if (dynamic_cast((*i).get())) { - if (is_track) { - same_thing_soloed = true; - break; - } - } else { - if (!is_track) { - same_thing_soloed = true; - break; - } - } - break; - } - } - - if (something_soloed != currently_soloing) { - signal = true; - currently_soloing = something_soloed; - } - - modify_solo_mute (is_track, same_thing_soloed); - - if (signal) { - SoloActive (currently_soloing); /* EMIT SIGNAL */ - } - - SoloChanged (); /* EMIT SIGNAL */ - - set_dirty(); -} - -void -Session::update_route_solo_state () -{ - bool mute = false; - bool is_track = false; - bool signal = false; - - /* caller must hold RouteLock */ - - /* this is where we actually implement solo by changing - the solo mute setting of each track. - */ - - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->soloed()) { - mute = true; - if (dynamic_cast((*i).get())) { - is_track = true; - } - break; - } - } - - if (mute != currently_soloing) { - signal = true; - currently_soloing = mute; - } - - if (!is_track && !mute) { - - /* nothing is soloed */ - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->set_solo_mute (false); - } - - if (signal) { - SoloActive (false); - } - - return; - } - - modify_solo_mute (is_track, mute); - - if (signal) { - SoloActive (currently_soloing); - } -} - -void -Session::modify_solo_mute (bool is_track, bool mute) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - if (is_track) { - - /* only alter track solo mute */ - - if (dynamic_cast((*i).get())) { - if ((*i)->soloed()) { - (*i)->set_solo_mute (!mute); - } else { - (*i)->set_solo_mute (mute); - } - } - - } else { - - /* only alter bus solo mute */ - - if (!dynamic_cast((*i).get())) { - - if ((*i)->soloed()) { - - (*i)->set_solo_mute (false); - - } else { - - /* don't mute master or control outs - in response to another bus solo - */ - - if ((*i) != _master_out && - (*i) != _control_out) { - (*i)->set_solo_mute (mute); - } - } - } - - } - } -} - - -void -Session::catch_up_on_solo () -{ - /* this is called after set_state() to catch the full solo - state, which can't be correctly determined on a per-route - basis, but needs the global overview that only the session - has. - */ - update_route_solo_state(); -} - -shared_ptr -Session::route_by_name (string name) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->name() == name) { - return *i; - } - } - - return shared_ptr ((Route*) 0); -} - -shared_ptr -Session::route_by_id (PBD::ID id) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->id() == id) { - return *i; - } - } - - return shared_ptr ((Route*) 0); -} - -shared_ptr -Session::route_by_remote_id (uint32_t id) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->remote_control_id() == id) { - return *i; - } - } - - return shared_ptr ((Route*) 0); -} - -void -Session::find_current_end () -{ - if (_state_of_the_state & Loading) { - return; - } - - nframes_t max = get_maximum_extent (); - - if (max > end_location->end()) { - end_location->set_end (max); - set_dirty(); - DurationChanged(); /* EMIT SIGNAL */ - } -} - -nframes_t -Session::get_maximum_extent () const -{ - nframes_t max = 0; - nframes_t me; - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::const_iterator i = dsl->begin(); i != dsl->end(); ++i) { - boost::shared_ptr pl = (*i)->playlist(); - if ((me = pl->get_maximum_extent()) > max) { - max = me; - } - } - - return max; -} - -boost::shared_ptr -Session::diskstream_by_name (string name) -{ - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->name() == name) { - return *i; - } - } - - return boost::shared_ptr((Diskstream*) 0); -} - -boost::shared_ptr -Session::diskstream_by_id (const PBD::ID& id) -{ - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->id() == id) { - return *i; - } - } - - return boost::shared_ptr((Diskstream*) 0); -} - -/* Region management */ - -string -Session::new_region_name (string old) -{ - string::size_type last_period; - uint32_t number; - string::size_type len = old.length() + 64; - char buf[len]; - - if ((last_period = old.find_last_of ('.')) == string::npos) { - - /* no period present - add one explicitly */ - - old += '.'; - last_period = old.length() - 1; - number = 0; - - } else { - - number = atoi (old.substr (last_period+1).c_str()); - - } - - while (number < (UINT_MAX-1)) { - - RegionList::const_iterator i; - string sbuf; - - number++; - - snprintf (buf, len, "%s%" PRIu32, old.substr (0, last_period + 1).c_str(), number); - sbuf = buf; - - for (i = regions.begin(); i != regions.end(); ++i) { - if (i->second->name() == sbuf) { - break; - } - } - - if (i == regions.end()) { - break; - } - } - - if (number != (UINT_MAX-1)) { - return buf; - } - - error << string_compose (_("cannot create new name for region \"%1\""), old) << endmsg; - return old; -} - -int -Session::region_name (string& result, string base, bool newlevel) const -{ - char buf[16]; - string subbase; - - assert(base.find("/") == string::npos); - - if (base == "") { - - Glib::Mutex::Lock lm (region_lock); - - snprintf (buf, sizeof (buf), "%d", (int)regions.size() + 1); - - - result = "region."; - result += buf; - - } else { - - /* XXX this is going to be slow. optimize me later */ - - if (newlevel) { - subbase = base; - } else { - string::size_type pos; - - pos = base.find_last_of ('.'); - - /* pos may be npos, but then we just use entire base */ - - subbase = base.substr (0, pos); - - } - - bool name_taken = true; - - { - Glib::Mutex::Lock lm (region_lock); - - for (int n = 1; n < 5000; ++n) { - - result = subbase; - snprintf (buf, sizeof (buf), ".%d", n); - result += buf; - - name_taken = false; - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - if (i->second->name() == result) { - name_taken = true; - break; - } - } - - if (!name_taken) { - break; - } - } - } - - if (name_taken) { - fatal << string_compose(_("too many regions with names like %1"), base) << endmsg; - /*NOTREACHED*/ - } - } - return 0; -} - -void -Session::add_region (boost::shared_ptr region) -{ - vector > v; - v.push_back (region); - add_regions (v); -} - -void -Session::add_regions (vector >& new_regions) -{ - bool added = false; - - { - Glib::Mutex::Lock lm (region_lock); - - for (vector >::iterator ii = new_regions.begin(); ii != new_regions.end(); ++ii) { - - boost::shared_ptr region = *ii; - - if (region == 0) { - - error << _("Session::add_region() ignored a null region. Warning: you might have lost a region.") << endmsg; - - } else { - - RegionList::iterator x; - - for (x = regions.begin(); x != regions.end(); ++x) { - - if (region->region_list_equivalent (x->second)) { - break; - } - } - - if (x == regions.end()) { - - pair entry; - - entry.first = region->id(); - entry.second = region; - - pair x = regions.insert (entry); - - if (!x.second) { - return; - } - - added = true; - } - } - } - } - - /* mark dirty because something has changed even if we didn't - add the region to the region list. - */ - - set_dirty(); - - if (added) { - - vector > v; - boost::shared_ptr first_r; - - for (vector >::iterator ii = new_regions.begin(); ii != new_regions.end(); ++ii) { - - boost::shared_ptr region = *ii; - - if (region == 0) { - - error << _("Session::add_region() ignored a null region. Warning: you might have lost a region.") << endmsg; - - } else { - v.push_back (region); - - if (!first_r) { - first_r = region; - } - } - - region->StateChanged.connect (sigc::bind (mem_fun (*this, &Session::region_changed), boost::weak_ptr(region))); - region->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_region), boost::weak_ptr(region))); - } - - if (!v.empty()) { - RegionsAdded (v); /* EMIT SIGNAL */ - } - } -} - -void -Session::region_changed (Change what_changed, boost::weak_ptr weak_region) -{ - boost::shared_ptr region (weak_region.lock ()); - - if (!region) { - return; - } - - if (what_changed & Region::HiddenChanged) { - /* relay hidden changes */ - RegionHiddenChange (region); - } -} - -void -Session::remove_region (boost::weak_ptr weak_region) -{ - RegionList::iterator i; - boost::shared_ptr region (weak_region.lock ()); - - if (!region) { - return; - } - - bool removed = false; - - { - Glib::Mutex::Lock lm (region_lock); - - if ((i = regions.find (region->id())) != regions.end()) { - regions.erase (i); - removed = true; - } - } - - /* mark dirty because something has changed even if we didn't - remove the region from the region list. - */ - - set_dirty(); - - if (removed) { - RegionRemoved(region); /* EMIT SIGNAL */ - } -} - -boost::shared_ptr -Session::find_whole_file_parent (boost::shared_ptr child) -{ - RegionList::iterator i; - boost::shared_ptr region; - - Glib::Mutex::Lock lm (region_lock); - - for (i = regions.begin(); i != regions.end(); ++i) { - - region = i->second; - - if (region->whole_file()) { - - if (child->source_equivalent (region)) { - return region; - } - } - } - - return boost::shared_ptr (); -} - -void -Session::find_equivalent_playlist_regions (boost::shared_ptr region, vector >& result) -{ - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) - (*i)->get_region_list_equivalent_regions (region, result); -} - -int -Session::destroy_region (boost::shared_ptr region) -{ - vector > srcs; - - { - if (region->playlist()) { - region->playlist()->destroy_region (region); - } - - for (uint32_t n = 0; n < region->n_channels(); ++n) { - srcs.push_back (region->source (n)); - } - } - - region->drop_references (); - - for (vector >::iterator i = srcs.begin(); i != srcs.end(); ++i) { - - (*i)->mark_for_remove (); - (*i)->drop_references (); - - cerr << "source was not used by any playlist\n"; - } - - return 0; -} - -int -Session::destroy_regions (list > regions) -{ - for (list >::iterator i = regions.begin(); i != regions.end(); ++i) { - destroy_region (*i); - } - return 0; -} - -int -Session::remove_last_capture () -{ - list > r; - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - list >& l = (*i)->last_capture_regions(); - - if (!l.empty()) { - r.insert (r.end(), l.begin(), l.end()); - l.clear (); - } - } - - destroy_regions (r); - - save_state (_current_snapshot_name); - - return 0; -} - -int -Session::remove_region_from_region_list (boost::shared_ptr r) -{ - remove_region (r); - return 0; -} - -/* Source Management */ -void -Session::add_source (boost::shared_ptr source) -{ - pair entry; - pair result; - - entry.first = source->id(); - entry.second = source; - - { - Glib::Mutex::Lock lm (source_lock); - result = sources.insert (entry); - } - - if (result.second) { - source->GoingAway.connect (sigc::bind (mem_fun (this, &Session::remove_source), boost::weak_ptr (source))); - set_dirty(); - } - - boost::shared_ptr afs; - - if ((afs = boost::dynamic_pointer_cast(source)) != 0) { - if (Config->get_auto_analyse_audio()) { - Analyser::queue_source_for_analysis (source, false); - } - } -} - -void -Session::remove_source (boost::weak_ptr src) -{ - SourceMap::iterator i; - boost::shared_ptr source = src.lock(); - - if (!source) { - return; - } - - { - Glib::Mutex::Lock lm (source_lock); - - if ((i = sources.find (source->id())) != sources.end()) { - sources.erase (i); - } - } - - if (!_state_of_the_state & InCleanup) { - - /* save state so we don't end up with a session file - referring to non-existent sources. - */ - - save_state (_current_snapshot_name); - } -} - -boost::shared_ptr -Session::source_by_id (const PBD::ID& id) -{ - Glib::Mutex::Lock lm (source_lock); - SourceMap::iterator i; - boost::shared_ptr source; - - if ((i = sources.find (id)) != sources.end()) { - source = i->second; - } - - return source; -} - - -boost::shared_ptr -Session::source_by_path_and_channel (const Glib::ustring& path, uint16_t chn) -{ - Glib::Mutex::Lock lm (source_lock); - - for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) { - cerr << "comparing " << path << " with " << i->second->name() << endl; - boost::shared_ptr afs = boost::dynamic_pointer_cast(i->second); - - if (afs && afs->path() == path && chn == afs->channel()) { - return afs; - } - - } - return boost::shared_ptr(); -} - -Glib::ustring -Session::peak_path (Glib::ustring base) const -{ - sys::path peakfile_path(_session_dir->peak_path()); - peakfile_path /= basename_nosuffix (base) + peakfile_suffix; - return peakfile_path.to_string(); -} - -string -Session::change_audio_path_by_name (string path, string oldname, string newname, bool destructive) -{ - string look_for; - string old_basename = PBD::basename_nosuffix (oldname); - string new_legalized = legalize_for_path (newname); - - /* note: we know (or assume) the old path is already valid */ - - if (destructive) { - - /* destructive file sources have a name of the form: - - /path/to/Tnnnn-NAME(%[LR])?.wav - - the task here is to replace NAME with the new name. - */ - - /* find last slash */ - - string dir; - string prefix; - string::size_type slash; - string::size_type dash; - - if ((slash = path.find_last_of ('/')) == string::npos) { - return ""; - } - - dir = path.substr (0, slash+1); - - /* '-' is not a legal character for the NAME part of the path */ - - if ((dash = path.find_last_of ('-')) == string::npos) { - return ""; - } - - prefix = path.substr (slash+1, dash-(slash+1)); - - path = dir; - path += prefix; - path += '-'; - path += new_legalized; - path += ".wav"; /* XXX gag me with a spoon */ - - } else { - - /* non-destructive file sources have a name of the form: - - /path/to/NAME-nnnnn(%[LR])?.wav - - the task here is to replace NAME with the new name. - */ - - string dir; - string suffix; - string::size_type slash; - string::size_type dash; - string::size_type postfix; - - /* find last slash */ - - if ((slash = path.find_last_of ('/')) == string::npos) { - return ""; - } - - dir = path.substr (0, slash+1); - - /* '-' is not a legal character for the NAME part of the path */ - - if ((dash = path.find_last_of ('-')) == string::npos) { - return ""; - } - - suffix = path.substr (dash+1); - - // Suffix is now everything after the dash. Now we need to eliminate - // the nnnnn part, which is done by either finding a '%' or a '.' - - postfix = suffix.find_last_of ("%"); - if (postfix == string::npos) { - postfix = suffix.find_last_of ('.'); - } - - if (postfix != string::npos) { - suffix = suffix.substr (postfix); - } else { - error << "Logic error in Session::change_audio_path_by_name(), please report to the developers" << endl; - return ""; - } - - const uint32_t limit = 10000; - char buf[PATH_MAX+1]; - - for (uint32_t cnt = 1; cnt <= limit; ++cnt) { - - snprintf (buf, sizeof(buf), "%s%s-%u%s", dir.c_str(), newname.c_str(), cnt, suffix.c_str()); - - if (access (buf, F_OK) != 0) { - path = buf; - break; - } - path = ""; - } - - if (path == "") { - error << "FATAL ERROR! Could not find a " << endl; - } - - } - - return path; -} - -string -Session::audio_path_from_name (string name, uint32_t nchan, uint32_t chan, bool destructive) -{ - string spath; - uint32_t cnt; - char buf[PATH_MAX+1]; - const uint32_t limit = 10000; - string legalized; - - buf[0] = '\0'; - legalized = legalize_for_path (name); - - /* find a "version" of the file name that doesn't exist in - any of the possible directories. - */ - - for (cnt = (destructive ? ++destructive_index : 1); cnt <= limit; ++cnt) { - - vector::iterator i; - uint32_t existing = 0; - - for (i = session_dirs.begin(); i != session_dirs.end(); ++i) { - - SessionDirectory sdir((*i).path); - - spath = sdir.sound_path().to_string(); - - if (destructive) { - if (nchan < 2) { - snprintf (buf, sizeof(buf), "%s/T%04d-%s.wav", spath.c_str(), cnt, legalized.c_str()); - } else if (nchan == 2) { - if (chan == 0) { - snprintf (buf, sizeof(buf), "%s/T%04d-%s%%L.wav", spath.c_str(), cnt, legalized.c_str()); - } else { - snprintf (buf, sizeof(buf), "%s/T%04d-%s%%R.wav", spath.c_str(), cnt, legalized.c_str()); - } - } else if (nchan < 26) { - snprintf (buf, sizeof(buf), "%s/T%04d-%s%%%c.wav", spath.c_str(), cnt, legalized.c_str(), 'a' + chan); - } else { - snprintf (buf, sizeof(buf), "%s/T%04d-%s.wav", spath.c_str(), cnt, legalized.c_str()); - } - - } else { - - spath += '/'; - spath += legalized; - - if (nchan < 2) { - snprintf (buf, sizeof(buf), "%s-%u.wav", spath.c_str(), cnt); - } else if (nchan == 2) { - if (chan == 0) { - snprintf (buf, sizeof(buf), "%s-%u%%L.wav", spath.c_str(), cnt); - } else { - snprintf (buf, sizeof(buf), "%s-%u%%R.wav", spath.c_str(), cnt); - } - } else if (nchan < 26) { - snprintf (buf, sizeof(buf), "%s-%u%%%c.wav", spath.c_str(), cnt, 'a' + chan); - } else { - snprintf (buf, sizeof(buf), "%s-%u.wav", spath.c_str(), cnt); - } - } - - if (sys::exists(buf)) { - existing++; - } - - } - - if (existing == 0) { - break; - } - - if (cnt > limit) { - error << string_compose(_("There are already %1 recordings for %2, which I consider too many."), limit, name) << endmsg; - destroy (); - throw failed_constructor(); - } - } - - /* we now have a unique name for the file, but figure out where to - actually put it. - */ - - string foo = buf; - - SessionDirectory sdir(get_best_session_directory_for_new_source ()); - - spath = sdir.sound_path().to_string(); - spath += '/'; - - string::size_type pos = foo.find_last_of ('/'); - - if (pos == string::npos) { - spath += foo; - } else { - spath += foo.substr (pos + 1); - } - - return spath; -} - -boost::shared_ptr -Session::create_audio_source_for_session (AudioDiskstream& ds, uint32_t chan, bool destructive) -{ - string spath = audio_path_from_name (ds.name(), ds.n_channels().n_audio(), chan, destructive); - return boost::dynamic_pointer_cast ( - SourceFactory::createWritable (DataType::AUDIO, *this, spath, destructive, frame_rate())); -} - -// FIXME: _terrible_ code duplication -string -Session::change_midi_path_by_name (string path, string oldname, string newname, bool destructive) -{ - string look_for; - string old_basename = PBD::basename_nosuffix (oldname); - string new_legalized = legalize_for_path (newname); - - /* note: we know (or assume) the old path is already valid */ - - if (destructive) { - - /* destructive file sources have a name of the form: - - /path/to/Tnnnn-NAME(%[LR])?.wav - - the task here is to replace NAME with the new name. - */ - - /* find last slash */ - - string dir; - string prefix; - string::size_type slash; - string::size_type dash; - - if ((slash = path.find_last_of ('/')) == string::npos) { - return ""; - } - - dir = path.substr (0, slash+1); - - /* '-' is not a legal character for the NAME part of the path */ - - if ((dash = path.find_last_of ('-')) == string::npos) { - return ""; - } - - prefix = path.substr (slash+1, dash-(slash+1)); - - path = dir; - path += prefix; - path += '-'; - path += new_legalized; - path += ".mid"; /* XXX gag me with a spoon */ - - } else { - - /* non-destructive file sources have a name of the form: - - /path/to/NAME-nnnnn(%[LR])?.wav - - the task here is to replace NAME with the new name. - */ - - string dir; - string suffix; - string::size_type slash; - string::size_type dash; - string::size_type postfix; - - /* find last slash */ - - if ((slash = path.find_last_of ('/')) == string::npos) { - return ""; - } - - dir = path.substr (0, slash+1); - - /* '-' is not a legal character for the NAME part of the path */ - - if ((dash = path.find_last_of ('-')) == string::npos) { - return ""; - } - - suffix = path.substr (dash+1); - - // Suffix is now everything after the dash. Now we need to eliminate - // the nnnnn part, which is done by either finding a '%' or a '.' - - postfix = suffix.find_last_of ("%"); - if (postfix == string::npos) { - postfix = suffix.find_last_of ('.'); - } - - if (postfix != string::npos) { - suffix = suffix.substr (postfix); - } else { - error << "Logic error in Session::change_midi_path_by_name(), please report to the developers" << endl; - return ""; - } - - const uint32_t limit = 10000; - char buf[PATH_MAX+1]; - - for (uint32_t cnt = 1; cnt <= limit; ++cnt) { - - snprintf (buf, sizeof(buf), "%s%s-%u%s", dir.c_str(), newname.c_str(), cnt, suffix.c_str()); - - if (access (buf, F_OK) != 0) { - path = buf; - break; - } - path = ""; - } - - if (path == "") { - error << "FATAL ERROR! Could not find a " << endl; - } - - } - - return path; -} - -string -Session::midi_path_from_name (string name) -{ - string spath; - uint32_t cnt; - char buf[PATH_MAX+1]; - const uint32_t limit = 10000; - string legalized; - - buf[0] = '\0'; - legalized = legalize_for_path (name); - - /* find a "version" of the file name that doesn't exist in - any of the possible directories. - */ - - for (cnt = 1; cnt <= limit; ++cnt) { - - vector::iterator i; - uint32_t existing = 0; - - for (i = session_dirs.begin(); i != session_dirs.end(); ++i) { - - SessionDirectory sdir((*i).path); - - sys::path p = sdir.midi_path(); - - p /= legalized; - - spath = p.to_string(); - - snprintf (buf, sizeof(buf), "%s-%u.mid", spath.c_str(), cnt); - - if (sys::exists (buf)) { - existing++; - } - } - - if (existing == 0) { - break; - } - - if (cnt > limit) { - error << string_compose(_("There are already %1 recordings for %2, which I consider too many."), limit, name) << endmsg; - throw failed_constructor(); - } - } - - /* we now have a unique name for the file, but figure out where to - actually put it. - */ - - string foo = buf; - - SessionDirectory sdir(get_best_session_directory_for_new_source ()); - - spath = sdir.midi_path().to_string(); - spath += '/'; - - string::size_type pos = foo.find_last_of ('/'); - - if (pos == string::npos) { - spath += foo; - } else { - spath += foo.substr (pos + 1); - } - - return spath; -} - -boost::shared_ptr -Session::create_midi_source_for_session (MidiDiskstream& ds) -{ - string mpath = midi_path_from_name (ds.name()); - - return boost::dynamic_pointer_cast (SourceFactory::createWritable (DataType::MIDI, *this, mpath, false, frame_rate())); -} - - -/* Playlist management */ - -boost::shared_ptr -Session::playlist_by_name (string name) -{ - Glib::Mutex::Lock lm (playlist_lock); - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - if ((*i)->name() == name) { - return* i; - } - } - for (PlaylistList::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) { - if ((*i)->name() == name) { - return* i; - } - } - - return boost::shared_ptr(); -} - -void -Session::add_playlist (boost::shared_ptr playlist) -{ - if (playlist->hidden()) { - return; - } - - { - Glib::Mutex::Lock lm (playlist_lock); - if (find (playlists.begin(), playlists.end(), playlist) == playlists.end()) { - playlists.insert (playlists.begin(), playlist); - playlist->InUse.connect (sigc::bind (mem_fun (*this, &Session::track_playlist), boost::weak_ptr(playlist))); - playlist->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_playlist), boost::weak_ptr(playlist))); - } - } - - set_dirty(); - - PlaylistAdded (playlist); /* EMIT SIGNAL */ -} - -void -Session::get_playlists (vector >& s) -{ - { - Glib::Mutex::Lock lm (playlist_lock); - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - s.push_back (*i); - } - for (PlaylistList::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) { - s.push_back (*i); - } - } -} - -void -Session::track_playlist (bool inuse, boost::weak_ptr wpl) -{ - boost::shared_ptr pl(wpl.lock()); - - if (!pl) { - return; - } - - PlaylistList::iterator x; - - if (pl->hidden()) { - /* its not supposed to be visible */ - return; - } - - { - Glib::Mutex::Lock lm (playlist_lock); - - if (!inuse) { - - unused_playlists.insert (pl); - - if ((x = playlists.find (pl)) != playlists.end()) { - playlists.erase (x); - } - - - } else { - - playlists.insert (pl); - - if ((x = unused_playlists.find (pl)) != unused_playlists.end()) { - unused_playlists.erase (x); - } - } - } -} - -void -Session::remove_playlist (boost::weak_ptr weak_playlist) -{ - if (_state_of_the_state & Deletion) { - return; - } - - boost::shared_ptr playlist (weak_playlist.lock()); - - if (!playlist) { - return; - } - - { - Glib::Mutex::Lock lm (playlist_lock); - - PlaylistList::iterator i; - - i = find (playlists.begin(), playlists.end(), playlist); - if (i != playlists.end()) { - playlists.erase (i); - } - - i = find (unused_playlists.begin(), unused_playlists.end(), playlist); - if (i != unused_playlists.end()) { - unused_playlists.erase (i); - } - - } - - set_dirty(); - - PlaylistRemoved (playlist); /* EMIT SIGNAL */ -} - -void -Session::set_audition (boost::shared_ptr r) -{ - pending_audition_region = r; - post_transport_work = PostTransportWork (post_transport_work | PostTransportAudition); - schedule_butler_transport_work (); -} - -void -Session::audition_playlist () -{ - Event* ev = new Event (Event::Audition, Event::Add, Event::Immediate, 0, 0.0); - ev->region.reset (); - queue_event (ev); -} - -void -Session::non_realtime_set_audition () -{ - if (!pending_audition_region) { - auditioner->audition_current_playlist (); - } else { - auditioner->audition_region (pending_audition_region); - pending_audition_region.reset (); - } - AuditionActive (true); /* EMIT SIGNAL */ -} - -void -Session::audition_region (boost::shared_ptr r) -{ - Event* ev = new Event (Event::Audition, Event::Add, Event::Immediate, 0, 0.0); - ev->region = r; - queue_event (ev); -} - -void -Session::cancel_audition () -{ - if (auditioner->active()) { - auditioner->cancel_audition (); - AuditionActive (false); /* EMIT SIGNAL */ - } -} - -bool -Session::RoutePublicOrderSorter::operator() (boost::shared_ptr a, boost::shared_ptr b) -{ - return a->order_key(N_("signal")) < b->order_key(N_("signal")); -} - -void -Session::remove_empty_sounds () -{ - vector audio_filenames; - - get_files_in_directory (_session_dir->sound_path(), audio_filenames); - - Glib::Mutex::Lock lm (source_lock); - - TapeFileMatcher tape_file_matcher; - - remove_if (audio_filenames.begin(), audio_filenames.end(), - sigc::mem_fun (tape_file_matcher, &TapeFileMatcher::matches)); - - for (vector::iterator i = audio_filenames.begin(); i != audio_filenames.end(); ++i) { - - sys::path audio_file_path (_session_dir->sound_path()); - - audio_file_path /= *i; - - if (AudioFileSource::is_empty (*this, audio_file_path.to_string())) { - - try - { - sys::remove (audio_file_path); - const string peakfile = peak_path (audio_file_path.to_string()); - sys::remove (peakfile); - } - catch (const sys::filesystem_error& err) - { - error << err.what() << endmsg; - } - } - } -} - -bool -Session::is_auditioning () const -{ - /* can be called before we have an auditioner object */ - if (auditioner) { - return auditioner->active(); - } else { - return false; - } -} - -void -Session::set_all_solo (bool yn) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { - (*i)->set_solo (yn, this); - } - } - - set_dirty(); -} - -void -Session::set_all_mute (bool yn) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { - (*i)->set_mute (yn, this); - } - } - - set_dirty(); -} - -uint32_t -Session::n_diskstreams () const -{ - uint32_t n = 0; - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::const_iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - n++; - } - } - return n; -} - -void -Session::graph_reordered () -{ - /* don't do this stuff if we are setting up connections - from a set_state() call or creating new tracks. - */ - - if (_state_of_the_state & InitialConnecting) { - return; - } - - /* every track/bus asked for this to be handled but it was deferred because - we were connecting. do it now. - */ - - request_input_change_handling (); - - resort_routes (); - - /* force all diskstreams to update their capture offset values to - reflect any changes in latencies within the graph. - */ - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->set_capture_offset (); - } -} - -void -Session::record_disenable_all () -{ - record_enable_change_all (false); -} - -void -Session::record_enable_all () -{ - record_enable_change_all (true); -} - -void -Session::record_enable_change_all (bool yn) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - Track* at; - - if ((at = dynamic_cast((*i).get())) != 0) { - at->set_record_enable (yn, this); - } - } - - /* since we don't keep rec-enable state, don't mark session dirty */ -} - -void -Session::add_processor (Processor* processor) -{ - Send* send; - PortInsert* port_insert; - PluginInsert* plugin_insert; - - if ((port_insert = dynamic_cast (processor)) != 0) { - _port_inserts.insert (_port_inserts.begin(), port_insert); - } else if ((plugin_insert = dynamic_cast (processor)) != 0) { - _plugin_inserts.insert (_plugin_inserts.begin(), plugin_insert); - } else if ((send = dynamic_cast (processor)) != 0) { - _sends.insert (_sends.begin(), send); - } else { - fatal << _("programming error: unknown type of Insert created!") << endmsg; - /*NOTREACHED*/ - } - - processor->GoingAway.connect (sigc::bind (mem_fun (*this, &Session::remove_processor), processor)); - - set_dirty(); -} - -void -Session::remove_processor (Processor* processor) -{ - Send* send; - PortInsert* port_insert; - PluginInsert* plugin_insert; - - if ((port_insert = dynamic_cast (processor)) != 0) { - list::iterator x = find (_port_inserts.begin(), _port_inserts.end(), port_insert); - if (x != _port_inserts.end()) { - insert_bitset[port_insert->bit_slot()] = false; - _port_inserts.erase (x); - } - } else if ((plugin_insert = dynamic_cast (processor)) != 0) { - _plugin_inserts.remove (plugin_insert); - } else if ((send = dynamic_cast (processor)) != 0) { - list::iterator x = find (_sends.begin(), _sends.end(), send); - if (x != _sends.end()) { - send_bitset[send->bit_slot()] = false; - _sends.erase (x); - } - } else { - fatal << _("programming error: unknown type of Insert deleted!") << endmsg; - /*NOTREACHED*/ - } - - set_dirty(); -} - -nframes_t -Session::available_capture_duration () -{ - float sample_bytes_on_disk = 4.0; // keep gcc happy - - switch (Config->get_native_file_data_format()) { - case FormatFloat: - sample_bytes_on_disk = 4.0; - break; - - case FormatInt24: - sample_bytes_on_disk = 3.0; - break; - - case FormatInt16: - sample_bytes_on_disk = 2.0; - break; - - default: - /* impossible, but keep some gcc versions happy */ - fatal << string_compose (_("programming error: %1"), - X_("illegal native file data format")) - << endmsg; - /*NOTREACHED*/ - } - - double scale = 4096.0 / sample_bytes_on_disk; - - if (_total_free_4k_blocks * scale > (double) max_frames) { - return max_frames; - } - - return (nframes_t) floor (_total_free_4k_blocks * scale); -} - -void -Session::add_bundle (shared_ptr bundle) -{ - { - Glib::Mutex::Lock guard (bundle_lock); - _bundles.push_back (bundle); - } - - BundleAdded (bundle); /* EMIT SIGNAL */ - - set_dirty(); -} - -void -Session::remove_bundle (shared_ptr bundle) -{ - bool removed = false; - - { - Glib::Mutex::Lock guard (bundle_lock); - BundleList::iterator i = find (_bundles.begin(), _bundles.end(), bundle); - - if (i != _bundles.end()) { - _bundles.erase (i); - removed = true; - } - } - - if (removed) { - BundleRemoved (bundle); /* EMIT SIGNAL */ - } - - set_dirty(); -} - -shared_ptr -Session::bundle_by_name (string name) const -{ - Glib::Mutex::Lock lm (bundle_lock); - - for (BundleList::const_iterator i = _bundles.begin(); i != _bundles.end(); ++i) { - if ((*i)->name() == name) { - return* i; - } - } - - return boost::shared_ptr (); -} - -void -Session::tempo_map_changed (Change ignored) -{ - clear_clicks (); - - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - (*i)->update_after_tempo_map_change (); - } - - for (PlaylistList::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) { - (*i)->update_after_tempo_map_change (); - } - - set_dirty (); -} - -/** Ensures that all buffers (scratch, send, silent, etc) are allocated for - * the given count with the current block size. - */ -void -Session::ensure_buffers (ChanCount howmany) -{ - if (current_block_size == 0) - return; // too early? (is this ok?) - - // We need at least 2 MIDI scratch buffers to mix/merge - if (howmany.n_midi() < 2) - howmany.set_midi(2); - - // FIXME: JACK needs to tell us maximum MIDI buffer size - // Using nasty assumption (max # events == nframes) for now - _scratch_buffers->ensure_buffers(howmany, current_block_size); - _mix_buffers->ensure_buffers(howmany, current_block_size); - _silent_buffers->ensure_buffers(howmany, current_block_size); - - allocate_pan_automation_buffers (current_block_size, howmany.n_audio(), false); -} - -uint32_t -Session::next_insert_id () -{ - /* this doesn't really loop forever. just think about it */ - - while (true) { - for (boost::dynamic_bitset::size_type n = 0; n < insert_bitset.size(); ++n) { - if (!insert_bitset[n]) { - insert_bitset[n] = true; - return n; - - } - } - - /* none available, so resize and try again */ - - insert_bitset.resize (insert_bitset.size() + 16, false); - } -} - -uint32_t -Session::next_send_id () -{ - /* this doesn't really loop forever. just think about it */ - - while (true) { - for (boost::dynamic_bitset::size_type n = 0; n < send_bitset.size(); ++n) { - if (!send_bitset[n]) { - send_bitset[n] = true; - return n; - - } - } - - /* none available, so resize and try again */ - - send_bitset.resize (send_bitset.size() + 16, false); - } -} - -void -Session::mark_send_id (uint32_t id) -{ - if (id >= send_bitset.size()) { - send_bitset.resize (id+16, false); - } - if (send_bitset[id]) { - warning << string_compose (_("send ID %1 appears to be in use already"), id) << endmsg; - } - send_bitset[id] = true; -} - -void -Session::mark_insert_id (uint32_t id) -{ - if (id >= insert_bitset.size()) { - insert_bitset.resize (id+16, false); - } - if (insert_bitset[id]) { - warning << string_compose (_("insert ID %1 appears to be in use already"), id) << endmsg; - } - insert_bitset[id] = true; -} - -/* Named Selection management */ - -NamedSelection * -Session::named_selection_by_name (string name) -{ - Glib::Mutex::Lock lm (named_selection_lock); - for (NamedSelectionList::iterator i = named_selections.begin(); i != named_selections.end(); ++i) { - if ((*i)->name == name) { - return* i; - } - } - return 0; -} - -void -Session::add_named_selection (NamedSelection* named_selection) -{ - { - Glib::Mutex::Lock lm (named_selection_lock); - named_selections.insert (named_selections.begin(), named_selection); - } - - for (list >::iterator i = named_selection->playlists.begin(); i != named_selection->playlists.end(); ++i) { - add_playlist (*i); - } - - set_dirty(); - - NamedSelectionAdded (); /* EMIT SIGNAL */ -} - -void -Session::remove_named_selection (NamedSelection* named_selection) -{ - bool removed = false; - - { - Glib::Mutex::Lock lm (named_selection_lock); - - NamedSelectionList::iterator i = find (named_selections.begin(), named_selections.end(), named_selection); - - if (i != named_selections.end()) { - delete (*i); - named_selections.erase (i); - set_dirty(); - removed = true; - } - } - - if (removed) { - NamedSelectionRemoved (); /* EMIT SIGNAL */ - } -} - -void -Session::reset_native_file_format () -{ - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->reset_write_sources (false); - } -} - -bool -Session::route_name_unique (string n) const -{ - shared_ptr r = routes.reader (); - - for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->name() == n) { - return false; - } - } - - return true; -} - -uint32_t -Session::n_playlists () const -{ - Glib::Mutex::Lock lm (playlist_lock); - return playlists.size(); -} - -void -Session::allocate_pan_automation_buffers (nframes_t nframes, uint32_t howmany, bool force) -{ - if (!force && howmany <= _npan_buffers) { - return; - } - - if (_pan_automation_buffer) { - - for (uint32_t i = 0; i < _npan_buffers; ++i) { - delete [] _pan_automation_buffer[i]; - } - - delete [] _pan_automation_buffer; - } - - _pan_automation_buffer = new pan_t*[howmany]; - - for (uint32_t i = 0; i < howmany; ++i) { - _pan_automation_buffer[i] = new pan_t[nframes]; - } - - _npan_buffers = howmany; -} - -int -Session::freeze (InterThreadInfo& itt) -{ - shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - Track *at; - - if ((at = dynamic_cast((*i).get())) != 0) { - /* XXX this is wrong because itt.progress will keep returning to zero at the start - of every track. - */ - at->freeze (itt); - } - } - - return 0; -} - -int -Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t len, - bool overwrite, vector >& srcs, InterThreadInfo& itt) -{ - int ret = -1; - boost::shared_ptr playlist; - boost::shared_ptr fsource; - uint32_t x; - char buf[PATH_MAX+1]; - ChanCount nchans(track.audio_diskstream()->n_channels()); - nframes_t position; - nframes_t this_chunk; - nframes_t to_do; - BufferSet buffers; - SessionDirectory sdir(get_best_session_directory_for_new_source ()); - const string sound_dir = sdir.sound_path().to_string(); - - // any bigger than this seems to cause stack overflows in called functions - const nframes_t chunk_size = (128 * 1024)/4; - - g_atomic_int_set (&processing_prohibited, 1); - - /* call tree *MUST* hold route_lock */ - - if ((playlist = track.diskstream()->playlist()) == 0) { - goto out; - } - - /* external redirects will be a problem */ - - if (track.has_external_redirects()) { - goto out; - } - - for (uint32_t chan_n=0; chan_n < nchans.n_audio(); ++chan_n) { - - for (x = 0; x < 99999; ++x) { - snprintf (buf, sizeof(buf), "%s/%s-%d-bounce-%" PRIu32 ".wav", sound_dir.c_str(), playlist->name().c_str(), chan_n, x+1); - if (access (buf, F_OK) != 0) { - break; - } - } - - if (x == 99999) { - error << string_compose (_("too many bounced versions of playlist \"%1\""), playlist->name()) << endmsg; - goto out; - } - - try { - fsource = boost::dynamic_pointer_cast ( - SourceFactory::createWritable (DataType::AUDIO, *this, buf, false, frame_rate())); - } - - catch (failed_constructor& err) { - error << string_compose (_("cannot create new audio file \"%1\" for %2"), buf, track.name()) << endmsg; - goto out; - } - - srcs.push_back (fsource); - } - - /* XXX need to flush all redirects */ - - position = start; - to_do = len; - - /* create a set of reasonably-sized buffers */ - buffers.ensure_buffers(nchans, chunk_size); - buffers.set_count(nchans); - - for (vector >::iterator src=srcs.begin(); src != srcs.end(); ++src) { - boost::shared_ptr afs = boost::dynamic_pointer_cast(*src); - if (afs) - afs->prepare_for_peakfile_writes (); - } - - while (to_do && !itt.cancel) { - - this_chunk = min (to_do, chunk_size); - - if (track.export_stuff (buffers, start, this_chunk)) { - goto out; - } - - uint32_t n = 0; - for (vector >::iterator src=srcs.begin(); src != srcs.end(); ++src, ++n) { - boost::shared_ptr afs = boost::dynamic_pointer_cast(*src); - - if (afs) { - if (afs->write (buffers.get_audio(n).data(), this_chunk) != this_chunk) { - goto out; - } - } - } - - start += this_chunk; - to_do -= this_chunk; - - itt.progress = (float) (1.0 - ((double) to_do / len)); - - } - - if (!itt.cancel) { - - time_t now; - struct tm* xnow; - time (&now); - xnow = localtime (&now); - - for (vector >::iterator src=srcs.begin(); src != srcs.end(); ++src) { - boost::shared_ptr afs = boost::dynamic_pointer_cast(*src); - - if (afs) { - afs->update_header (position, *xnow, now); - afs->flush_header (); - } - } - - /* construct a region to represent the bounced material */ - - boost::shared_ptr aregion = RegionFactory::create (srcs, 0, srcs.front()->length(), - region_name_from_path (srcs.front()->name(), true)); - - ret = 0; - } - - out: - if (ret) { - for (vector >::iterator src = srcs.begin(); src != srcs.end(); ++src) { - boost::shared_ptr afs = boost::dynamic_pointer_cast(*src); - - if (afs) { - afs->mark_for_remove (); - } - - (*src)->drop_references (); - } - - } else { - for (vector >::iterator src = srcs.begin(); src != srcs.end(); ++src) { - boost::shared_ptr afs = boost::dynamic_pointer_cast(*src); - - if (afs) - afs->done_with_peakfile_writes (); - } - } - - g_atomic_int_set (&processing_prohibited, 0); - - return ret; -} - -BufferSet& -Session::get_silent_buffers (ChanCount count) -{ - assert(_silent_buffers->available() >= count); - _silent_buffers->set_count(count); - - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { - for (size_t i= 0; i < count.get(*t); ++i) { - _silent_buffers->get(*t, i).clear(); - } - } - - return *_silent_buffers; -} - -BufferSet& -Session::get_scratch_buffers (ChanCount count) -{ - assert(_scratch_buffers->available() >= count); - _scratch_buffers->set_count(count); - return *_scratch_buffers; -} - -BufferSet& -Session::get_mix_buffers (ChanCount count) -{ - assert(_mix_buffers->available() >= count); - _mix_buffers->set_count(count); - return *_mix_buffers; -} - -uint32_t -Session::ntracks () const -{ - uint32_t n = 0; - shared_ptr r = routes.reader (); - - for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) { - if (dynamic_cast ((*i).get())) { - ++n; - } - } - - return n; -} - -uint32_t -Session::nbusses () const -{ - uint32_t n = 0; - shared_ptr r = routes.reader (); - - for (RouteList::const_iterator i = r->begin(); i != r->end(); ++i) { - if (dynamic_cast ((*i).get()) == 0) { - ++n; - } - } - - return n; -} - -void -Session::add_automation_list(AutomationList *al) -{ - automation_lists[al->id()] = al; -} - -nframes_t -Session::compute_initial_length () -{ - return _engine.frame_rate() * 60 * 5; -} - -void -Session::sync_order_keys () -{ - if (!Config->get_sync_all_route_ordering()) { - /* leave order keys as they are */ - return; - } - - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->sync_order_keys (); - } - - Route::SyncOrderKeys (); // EMIT SIGNAL -} - -void -Session::foreach_bundle (sigc::slot > sl) -{ - Glib::Mutex::Lock lm (bundle_lock); - for (BundleList::iterator i = _bundles.begin(); i != _bundles.end(); ++i) { - sl (*i); - } -} - diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc deleted file mode 100644 index ec5de23caf..0000000000 --- a/libs/ardour/session_butler.cc +++ /dev/null @@ -1,471 +0,0 @@ -/* - Copyright (C) 1999-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -static float _read_data_rate; -static float _write_data_rate; - -/* XXX put this in the right place */ - -static inline uint32_t next_power_of_two (uint32_t n) -{ - --n; - n |= n >> 16; - n |= n >> 8; - n |= n >> 4; - n |= n >> 2; - n |= n >> 1; - ++n; - return n; -} - -/*--------------------------------------------------------------------------- - BUTLER THREAD - ---------------------------------------------------------------------------*/ - -int -Session::start_butler_thread () -{ - /* size is in Samples, not bytes */ - audio_dstream_buffer_size = (uint32_t) floor (Config->get_audio_track_buffer_seconds() * (float) frame_rate()); - - /* size is in bytes - * XXX: Jack needs to tell us the MIDI buffer size - * (i.e. how many MIDI bytes we might see in a cycle) - */ - midi_dstream_buffer_size = (uint32_t) floor (Config->get_midi_track_buffer_seconds() * (float)frame_rate()); - - Crossfade::set_buffer_size (audio_dstream_buffer_size); - - butler_should_run = false; - - if (pipe (butler_request_pipe)) { - error << string_compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg; - return -1; - } - - if (fcntl (butler_request_pipe[0], F_SETFL, O_NONBLOCK)) { - error << string_compose(_("UI: cannot set O_NONBLOCK on butler request pipe (%1)"), strerror (errno)) << endmsg; - return -1; - } - - if (fcntl (butler_request_pipe[1], F_SETFL, O_NONBLOCK)) { - error << string_compose(_("UI: cannot set O_NONBLOCK on butler request pipe (%1)"), strerror (errno)) << endmsg; - return -1; - } - - if (pthread_create_and_store ("disk butler", &butler_thread, 0, _butler_thread_work, this)) { - error << _("Session: could not create butler thread") << endmsg; - return -1; - } - - // pthread_detach (butler_thread); - - return 0; -} - -void -Session::terminate_butler_thread () -{ - if (butler_thread) { - void* status; - char c = ButlerRequest::Quit; - ::write (butler_request_pipe[1], &c, 1); - pthread_join (butler_thread, &status); - } -} - -void -Session::schedule_butler_transport_work () -{ - g_atomic_int_inc (&butler_should_do_transport_work); - summon_butler (); -} - -void -Session::schedule_curve_reallocation () -{ - post_transport_work = PostTransportWork (post_transport_work | PostTransportCurveRealloc); - schedule_butler_transport_work (); -} - -void -Session::summon_butler () -{ - char c = ButlerRequest::Run; - ::write (butler_request_pipe[1], &c, 1); - // PBD::stacktrace (cerr); -} - -void -Session::stop_butler () -{ - Glib::Mutex::Lock lm (butler_request_lock); - char c = ButlerRequest::Pause; - ::write (butler_request_pipe[1], &c, 1); - butler_paused.wait(butler_request_lock); -} - -void -Session::wait_till_butler_finished () -{ - Glib::Mutex::Lock lm (butler_request_lock); - char c = ButlerRequest::Wake; - ::write (butler_request_pipe[1], &c, 1); - butler_paused.wait(butler_request_lock); -} - -void * -Session::_butler_thread_work (void* arg) -{ - PBD::ThreadCreated (pthread_self(), X_("Butler")); - return ((Session *) arg)->butler_thread_work (); - return 0; -} - -void * -Session::butler_thread_work () -{ - uint32_t err = 0; - int32_t bytes; - bool compute_io; - struct timeval begin, end; - struct pollfd pfd[1]; - bool disk_work_outstanding = false; - DiskstreamList::iterator i; - - while (true) { - pfd[0].fd = butler_request_pipe[0]; - pfd[0].events = POLLIN|POLLERR|POLLHUP; - - if (poll (pfd, 1, (disk_work_outstanding ? 0 : -1)) < 0) { - - if (errno == EINTR) { - continue; - } - - error << string_compose (_("poll on butler request pipe failed (%1)"), - strerror (errno)) - << endmsg; - break; - } - - if (pfd[0].revents & ~POLLIN) { - error << string_compose (_("Error on butler thread request pipe: fd=%1 err=%2"), pfd[0].fd, pfd[0].revents) << endmsg; - break; - } - - if (pfd[0].revents & POLLIN) { - - char req; - - /* empty the pipe of all current requests */ - - while (1) { - size_t nread = ::read (butler_request_pipe[0], &req, sizeof (req)); - if (nread == 1) { - - switch ((ButlerRequest::Type) req) { - - case ButlerRequest::Wake: - break; - - case ButlerRequest::Run: - butler_should_run = true; - break; - - case ButlerRequest::Pause: - butler_should_run = false; - break; - - case ButlerRequest::Quit: - pthread_exit_pbd (0); - /*NOTREACHED*/ - break; - - default: - break; - } - - } else if (nread == 0) { - break; - } else if (errno == EAGAIN) { - break; - } else { - fatal << _("Error reading from butler request pipe") << endmsg; - /*NOTREACHED*/ - } - } - } - - if (transport_work_requested()) { - butler_transport_work (); - } - - disk_work_outstanding = false; - bytes = 0; - compute_io = true; - - gettimeofday (&begin, 0); - - boost::shared_ptr dsl = diskstreams.reader (); - -// for (i = dsl->begin(); i != dsl->end(); ++i) { -// cerr << "BEFORE " << (*i)->name() << ": pb = " << (*i)->playback_buffer_load() << " cp = " << (*i)->capture_buffer_load() << endl; -// } - - for (i = dsl->begin(); !transport_work_requested() && butler_should_run && i != dsl->end(); ++i) { - - boost::shared_ptr ds = *i; - - /* don't read inactive tracks */ - - IO* io = ds->io(); - - if (io && !io->active()) { - continue; - } - - switch (ds->do_refill ()) { - case 0: - bytes += ds->read_data_count(); - break; - case 1: - bytes += ds->read_data_count(); - disk_work_outstanding = true; - break; - - default: - compute_io = false; - error << string_compose(_("Butler read ahead failure on dstream %1"), (*i)->name()) << endmsg; - break; - } - - } - - if (i != dsl->end()) { - /* we didn't get to all the streams */ - disk_work_outstanding = true; - } - - if (!err && transport_work_requested()) { - continue; - } - - if (compute_io) { - gettimeofday (&end, 0); - - double b = begin.tv_sec + (begin.tv_usec/1000000.0); - double e = end.tv_sec + (end.tv_usec / 1000000.0); - - _read_data_rate = bytes / (e - b); - } - - bytes = 0; - compute_io = true; - gettimeofday (&begin, 0); - - for (i = dsl->begin(); !transport_work_requested() && butler_should_run && i != dsl->end(); ++i) { - // cerr << "write behind for " << (*i)->name () << endl; - - /* note that we still try to flush diskstreams attached to inactive routes - */ - - switch ((*i)->do_flush (Session::ButlerContext)) { - case 0: - bytes += (*i)->write_data_count(); - break; - case 1: - bytes += (*i)->write_data_count(); - disk_work_outstanding = true; - break; - - default: - err++; - compute_io = false; - error << string_compose(_("Butler write-behind failure on dstream %1"), (*i)->name()) << endmsg; - /* don't break - try to flush all streams in case they - are split across disks. - */ - } - } - - if (err && actively_recording()) { - /* stop the transport and try to catch as much possible - captured state as we can. - */ - request_stop (); - } - - if (i != dsl->end()) { - /* we didn't get to all the streams */ - disk_work_outstanding = true; - } - - if (!err && transport_work_requested()) { - continue; - } - - if (compute_io) { - gettimeofday (&end, 0); - - double b = begin.tv_sec + (begin.tv_usec/1000000.0); - double e = end.tv_sec + (end.tv_usec / 1000000.0); - - _write_data_rate = bytes / (e - b); - } - - if (!disk_work_outstanding) { - refresh_disk_space (); - } - - - { - Glib::Mutex::Lock lm (butler_request_lock); - - if (butler_should_run && (disk_work_outstanding || transport_work_requested())) { -// for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { -// cerr << "AFTER " << (*i)->name() << ": pb = " << (*i)->playback_buffer_load() << " cp = " << (*i)->capture_buffer_load() << endl; -// } - - continue; - } - - butler_paused.signal(); - } - } - - pthread_exit_pbd (0); - /*NOTREACHED*/ - return (0); -} - - -void -Session::request_overwrite_buffer (Diskstream* stream) -{ - Event *ev = new Event (Event::Overwrite, Event::Add, Event::Immediate, 0, 0, 0.0); - ev->set_ptr (stream); - queue_event (ev); -} - -/** Process thread. */ -void -Session::overwrite_some_buffers (Diskstream* ds) -{ - if (actively_recording()) { - return; - } - - if (ds) { - - ds->set_pending_overwrite (true); - - } else { - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->set_pending_overwrite (true); - } - } - - post_transport_work = PostTransportWork (post_transport_work | PostTransportOverWrite); - schedule_butler_transport_work (); -} - -float -Session::read_data_rate () const -{ - /* disk i/o in excess of 10000MB/sec indicate the buffer cache - in action. ignore it. - */ - return _read_data_rate > 10485760000.0f ? 0.0f : _read_data_rate; -} - -float -Session::write_data_rate () const -{ - /* disk i/o in excess of 10000MB/sec indicate the buffer cache - in action. ignore it. - */ - return _write_data_rate > 10485760000.0f ? 0.0f : _write_data_rate; -} - -uint32_t -Session::playback_load () -{ - return (uint32_t) g_atomic_int_get (&_playback_load); -} - -uint32_t -Session::capture_load () -{ - return (uint32_t) g_atomic_int_get (&_capture_load); -} - -uint32_t -Session::playback_load_min () -{ - return (uint32_t) g_atomic_int_get (&_playback_load_min); -} - -uint32_t -Session::capture_load_min () -{ - return (uint32_t) g_atomic_int_get (&_capture_load_min); -} - -void -Session::reset_capture_load_min () -{ - g_atomic_int_set (&_capture_load_min, 100); -} - - -void -Session::reset_playback_load_min () -{ - g_atomic_int_set (&_playback_load_min, 100); -} diff --git a/libs/ardour/session_click.cc b/libs/ardour/session_click.cc deleted file mode 100644 index 7161de6d78..0000000000 --- a/libs/ardour/session_click.cc +++ /dev/null @@ -1,223 +0,0 @@ -/* - Copyright (C) 20002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -Pool Session::Click::pool ("click", sizeof (Click), 128); - -void -Session::click (nframes_t start, nframes_t nframes, nframes_t offset) -{ - TempoMap::BBTPointList *points; - Sample *buf; - - if (_click_io == 0) { - return; - } - - Glib::RWLock::WriterLock clickm (click_lock, Glib::TRY_LOCK); - - if (!clickm.locked() || _transport_speed != 1.0 || !_clicking || click_data == 0) { - _click_io->silence (nframes, offset); - return; - } - - const nframes_t end = start + (nframes_t)floor(nframes * _transport_speed); - - BufferSet& bufs = get_scratch_buffers(ChanCount(DataType::AUDIO, 1)); - buf = bufs.get_audio(0).data(); - points = _tempo_map->get_points (start, end); - - if (points == 0) { - goto run_clicks; - } - - if (points->empty()) { - delete points; - goto run_clicks; - } - - for (TempoMap::BBTPointList::iterator i = points->begin(); i != points->end(); ++i) { - switch ((*i).type) { - case TempoMap::Beat: - if (click_emphasis_data == 0 || (click_emphasis_data && (*i).beat != 1)) { - clicks.push_back (new Click ((*i).frame, click_length, click_data)); - } - break; - - case TempoMap::Bar: - if (click_emphasis_data) { - clicks.push_back (new Click ((*i).frame, click_emphasis_length, click_emphasis_data)); - } - break; - } - } - - run_clicks: - memset (buf, 0, sizeof (Sample) * nframes); - - for (list::iterator i = clicks.begin(); i != clicks.end(); ) { - - nframes_t copy; - nframes_t internal_offset; - Click *clk; - list::iterator next; - - clk = *i; - next = i; - ++next; - - if (clk->start < start) { - internal_offset = 0; - } else { - internal_offset = clk->start - start; - } - - if (nframes < internal_offset) { - /* we've just located or something.. - effectively going backwards. - lets get the flock out of here */ - break; - } - - copy = min (clk->duration - clk->offset, nframes - internal_offset); - - memcpy (buf + internal_offset, &clk->data[clk->offset], copy * sizeof (Sample)); - - clk->offset += copy; - - if (clk->offset >= clk->duration) { - delete clk; - clicks.erase (i); - } - - - i = next; - } - - _click_io->deliver_output (bufs, start, end, nframes, offset); -} - -void -Session::setup_click_sounds (int which) -{ - SNDFILE *sndfile; - SF_INFO info; - - clear_clicks(); - - if ((which == 0 || which == 1)) { - - if (click_data && click_data != default_click) { - delete [] click_data; - click_data = 0; - } - - string path = Config->get_click_sound(); - - if (path.empty()) { - - click_data = const_cast (default_click); - click_length = default_click_length; - - } else { - - if ((sndfile = sf_open (path.c_str(), SFM_READ, &info)) == 0) { - char errbuf[256]; - sf_error_str (0, errbuf, sizeof (errbuf) - 1); - warning << string_compose (_("cannot open click soundfile %1 (%2)"), path, errbuf) << endmsg; - _clicking = false; - return; - } - - click_data = new Sample[info.frames]; - click_length = info.frames; - - if (sf_read_float (sndfile, click_data, info.frames) != info.frames) { - warning << _("cannot read data from click soundfile") << endmsg; - delete click_data; - click_data = 0; - _clicking = false; - } - - sf_close (sndfile); - - } - } - - if ((which == 0 || which == -1)) { - - if (click_emphasis_data && click_emphasis_data != default_click_emphasis) { - delete [] click_emphasis_data; - click_emphasis_data = 0; - } - - string path = Config->get_click_emphasis_sound(); - - if (path.empty()) { - click_emphasis_data = const_cast (default_click_emphasis); - click_emphasis_length = default_click_emphasis_length; - } else { - if ((sndfile = sf_open (path.c_str(), SFM_READ, &info)) == 0) { - char errbuf[256]; - sf_error_str (0, errbuf, sizeof (errbuf) - 1); - warning << string_compose (_("cannot open click emphasis soundfile %1 (%2)"), path, errbuf) << endmsg; - return; - } - - click_emphasis_data = new Sample[info.frames]; - click_emphasis_length = info.frames; - - if (sf_read_float (sndfile, click_emphasis_data, info.frames) != info.frames) { - warning << _("cannot read data from click emphasis soundfile") << endmsg; - delete click_emphasis_data; - click_emphasis_data = 0; - } - - sf_close (sndfile); - } - } -} - -void -Session::clear_clicks () -{ - Glib::RWLock::WriterLock lm (click_lock); - - for (Clicks::iterator i = clicks.begin(); i != clicks.end(); ++i) { - delete *i; - } - - clicks.clear (); -} diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc deleted file mode 100644 index e8670e7199..0000000000 --- a/libs/ardour/session_command.cc +++ /dev/null @@ -1,544 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace PBD; -using namespace ARDOUR; - -#include "i18n.h" - -void Session::register_with_memento_command_factory(PBD::ID id, PBD::StatefulThingWithGoingAway *ptr) -{ - registry[id] = ptr; -} - -Command * -Session::memento_command_factory(XMLNode *n) -{ - PBD::ID id; - XMLNode *before = 0, *after = 0; - XMLNode *child = 0; - - /* get id */ - id = PBD::ID(n->property("obj_id")->value()); - - /* get before/after */ - - if (n->name() == "MementoCommand") { - before = new XMLNode(*n->children().front()); - after = new XMLNode(*n->children().back()); - child = before; - } else if (n->name() == "MementoUndoCommand") { - before = new XMLNode(*n->children().front()); - child = before; - } else if (n->name() == "MementoRedoCommand") { - after = new XMLNode(*n->children().front()); - child = after; - } else if (n->name() == "PlaylistCommand") { - before = new XMLNode(*n->children().front()); - after = new XMLNode(*n->children().back()); - child = before; - } - - if (!child) - { - error << _("Tried to reconstitute a MementoCommand with no contents, failing. id=") << id.to_s() << endmsg; - return 0; - } - - /* create command */ - string obj_T = n->property ("type_name")->value(); - if (obj_T == typeid (AudioRegion).name() || obj_T == typeid (MidiRegion).name() || obj_T == typeid (Region).name()) { - if (regions.count(id)) { - return new MementoCommand(*regions[id], before, after); - } - } else if (obj_T == typeid (AudioSource).name() || obj_T == typeid (MidiSource).name()) { - if (sources.count(id)) - return new MementoCommand(*sources[id], before, after); - } else if (obj_T == typeid (Location).name()) { - Location* loc = _locations.get_location_by_id(id); - if (loc) { - return new MementoCommand(*loc, before, after); - } - } else if (obj_T == typeid (Locations).name()) { - return new MementoCommand(_locations, before, after); - } else if (obj_T == typeid (TempoMap).name()) { - return new MementoCommand(*_tempo_map, before, after); - } else if (obj_T == typeid (Playlist).name() || obj_T == typeid (AudioPlaylist).name() || obj_T == typeid (MidiPlaylist).name()) { - if (boost::shared_ptr pl = playlist_by_name(child->property("name")->value())) { - return new MementoCommand(*(pl.get()), before, after); - } - } else if (obj_T == typeid (Route).name() || obj_T == typeid (AudioTrack).name() || obj_T == typeid(MidiTrack).name()) { - return new MementoCommand(*route_by_id(id), before, after); - } else if (obj_T == typeid (Curve).name() || obj_T == typeid (AutomationList).name()) { - if (automation_lists.count(id)) - return new MementoCommand(*automation_lists[id], before, after); - } else if (registry.count(id)) { // For Editor and AutomationLine which are off-limits here - return new MementoCommand(*registry[id], before, after); - } - - /* we failed */ - error << string_compose (_("could not reconstitute MementoCommand from XMLNode. object type = %1 id = %2"), obj_T, id.to_s()) << endmsg; - - return 0 ; -} - -Command * -Session::global_state_command_factory (const XMLNode& node) -{ - const XMLProperty* prop; - Command* command = 0; - - if ((prop = node.property ("type")) == 0) { - error << _("GlobalRouteStateCommand has no \"type\" node, ignoring") << endmsg; - return 0; - } - - try { - - if (prop->value() == "solo") { - command = new GlobalSoloStateCommand (*this, node); - } else if (prop->value() == "mute") { - command = new GlobalMuteStateCommand (*this, node); - } else if (prop->value() == "rec-enable") { - command = new GlobalRecordEnableStateCommand (*this, node); - } else if (prop->value() == "metering") { - command = new GlobalMeteringStateCommand (*this, node); - } else { - error << string_compose (_("unknown type of GlobalRouteStateCommand (%1), ignored"), prop->value()) << endmsg; - } - } - - catch (failed_constructor& err) { - return 0; - } - - return command; -} - -Session::GlobalRouteStateCommand::GlobalRouteStateCommand (Session& s, void* p) - : sess (s), src (p) -{ -} - -Session::GlobalRouteStateCommand::GlobalRouteStateCommand (Session& s, const XMLNode& node) - : sess (s), src (this) -{ - if (set_state (node)) { - throw failed_constructor (); - } -} - -int -Session::GlobalRouteStateCommand::set_state (const XMLNode& node) -{ - GlobalRouteBooleanState states; - XMLNodeList nlist; - const XMLProperty* prop; - XMLNode* child; - XMLNodeConstIterator niter; - int loop; - - before.clear (); - after.clear (); - - for (loop = 0; loop < 2; ++loop) { - - const char *str; - - if (loop) { - str = "after"; - } else { - str = "before"; - } - - if ((child = node.child (str)) == 0) { - warning << string_compose (_("global route state command has no \"%1\" node, ignoring entire command"), str) << endmsg; - return -1; - } - - nlist = child->children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - RouteBooleanState rbs; - boost::shared_ptr route; - ID id; - - prop = (*niter)->property ("id"); - id = prop->value (); - - if ((route = sess.route_by_id (id)) == 0) { - warning << string_compose (_("cannot find track/bus \"%1\" while rebuilding a global route state command, ignored"), id.to_s()) << endmsg; - continue; - } - - rbs.first = boost::weak_ptr (route); - - prop = (*niter)->property ("yn"); - rbs.second = (prop->value() == "1"); - - if (loop) { - after.push_back (rbs); - } else { - before.push_back (rbs); - } - } - } - - return 0; -} - -XMLNode& -Session::GlobalRouteStateCommand::get_state () -{ - XMLNode* node = new XMLNode (X_("GlobalRouteStateCommand")); - XMLNode* nbefore = new XMLNode (X_("before")); - XMLNode* nafter = new XMLNode (X_("after")); - - for (Session::GlobalRouteBooleanState::iterator x = before.begin(); x != before.end(); ++x) { - XMLNode* child = new XMLNode ("s"); - boost::shared_ptr r = x->first.lock(); - - if (r) { - child->add_property (X_("id"), r->id().to_s()); - child->add_property (X_("yn"), (x->second ? "1" : "0")); - nbefore->add_child_nocopy (*child); - } - } - - for (Session::GlobalRouteBooleanState::iterator x = after.begin(); x != after.end(); ++x) { - XMLNode* child = new XMLNode ("s"); - boost::shared_ptr r = x->first.lock(); - - if (r) { - child->add_property (X_("id"), r->id().to_s()); - child->add_property (X_("yn"), (x->second ? "1" : "0")); - nafter->add_child_nocopy (*child); - } - } - - node->add_child_nocopy (*nbefore); - node->add_child_nocopy (*nafter); - - return *node; -} - -// solo - -Session::GlobalSoloStateCommand::GlobalSoloStateCommand(Session &sess, void *src) - : GlobalRouteStateCommand (sess, src) -{ - after = before = sess.get_global_route_boolean(&Route::soloed); -} - -Session::GlobalSoloStateCommand::GlobalSoloStateCommand (Session& sess, const XMLNode& node) - : Session::GlobalRouteStateCommand (sess, node) -{ -} - -void -Session::GlobalSoloStateCommand::mark() -{ - after = sess.get_global_route_boolean(&Route::soloed); -} - -void -Session::GlobalSoloStateCommand::operator()() -{ - sess.set_global_solo(after, src); -} - -void -Session::GlobalSoloStateCommand::undo() -{ - sess.set_global_solo(before, src); -} - -XMLNode& -Session::GlobalSoloStateCommand::get_state() -{ - XMLNode& node = GlobalRouteStateCommand::get_state(); - node.add_property ("type", "solo"); - return node; -} - -// mute -Session::GlobalMuteStateCommand::GlobalMuteStateCommand(Session &sess, void *src) - : GlobalRouteStateCommand (sess, src) -{ - after = before = sess.get_global_route_boolean(&Route::muted); -} - -Session::GlobalMuteStateCommand::GlobalMuteStateCommand (Session& sess, const XMLNode& node) - : Session::GlobalRouteStateCommand (sess, node) -{ -} - -void -Session::GlobalMuteStateCommand::mark() -{ - after = sess.get_global_route_boolean(&Route::muted); -} - -void -Session::GlobalMuteStateCommand::operator()() -{ - sess.set_global_mute(after, src); -} - -void -Session::GlobalMuteStateCommand::undo() -{ - sess.set_global_mute(before, src); -} - -XMLNode& -Session::GlobalMuteStateCommand::get_state() -{ - XMLNode& node = GlobalRouteStateCommand::get_state(); - node.add_property ("type", "mute"); - return node; -} - -// record enable -Session::GlobalRecordEnableStateCommand::GlobalRecordEnableStateCommand(Session &sess, void *src) - : GlobalRouteStateCommand (sess, src) -{ - after = before = sess.get_global_route_boolean(&Route::record_enabled); -} - -Session::GlobalRecordEnableStateCommand::GlobalRecordEnableStateCommand (Session& sess, const XMLNode& node) - : Session::GlobalRouteStateCommand (sess, node) -{ -} - -void -Session::GlobalRecordEnableStateCommand::mark() -{ - after = sess.get_global_route_boolean(&Route::record_enabled); -} - -void -Session::GlobalRecordEnableStateCommand::operator()() -{ - sess.set_global_record_enable(after, src); -} - -void -Session::GlobalRecordEnableStateCommand::undo() -{ - sess.set_global_record_enable(before, src); -} - -XMLNode& -Session::GlobalRecordEnableStateCommand::get_state() -{ - XMLNode& node = GlobalRouteStateCommand::get_state(); - node.add_property ("type", "rec-enable"); - return node; -} - -// metering -Session::GlobalMeteringStateCommand::GlobalMeteringStateCommand(Session &s, void *p) - : sess (s), src (p) -{ - after = before = sess.get_global_route_metering(); -} - -Session::GlobalMeteringStateCommand::GlobalMeteringStateCommand (Session& s, const XMLNode& node) - : sess (s), src (this) -{ - if (set_state (node)) { - throw failed_constructor(); - } -} - -void -Session::GlobalMeteringStateCommand::mark() -{ - after = sess.get_global_route_metering(); -} - -void -Session::GlobalMeteringStateCommand::operator()() -{ - sess.set_global_route_metering(after, src); -} - -void -Session::GlobalMeteringStateCommand::undo() -{ - sess.set_global_route_metering(before, src); -} - -XMLNode& -Session::GlobalMeteringStateCommand::get_state() -{ - XMLNode* node = new XMLNode (X_("GlobalRouteStateCommand")); - XMLNode* nbefore = new XMLNode (X_("before")); - XMLNode* nafter = new XMLNode (X_("after")); - - for (Session::GlobalRouteMeterState::iterator x = before.begin(); x != before.end(); ++x) { - XMLNode* child = new XMLNode ("s"); - boost::shared_ptr r = x->first.lock(); - - if (r) { - child->add_property (X_("id"), r->id().to_s()); - - const char* meterstr = 0; - - switch (x->second) { - case MeterInput: - meterstr = X_("input"); - break; - case MeterPreFader: - meterstr = X_("pre"); - break; - case MeterPostFader: - meterstr = X_("post"); - break; - default: - fatal << string_compose (_("programming error: %1") , "no meter state in Session::GlobalMeteringStateCommand::get_state") << endmsg; - } - - child->add_property (X_("meter"), meterstr); - nbefore->add_child_nocopy (*child); - } - } - - for (Session::GlobalRouteMeterState::iterator x = after.begin(); x != after.end(); ++x) { - XMLNode* child = new XMLNode ("s"); - boost::shared_ptr r = x->first.lock(); - - if (r) { - child->add_property (X_("id"), r->id().to_s()); - - const char* meterstr; - - switch (x->second) { - case MeterInput: - meterstr = X_("input"); - break; - case MeterPreFader: - meterstr = X_("pre"); - break; - case MeterPostFader: - meterstr = X_("post"); - break; - default: meterstr = ""; - } - - child->add_property (X_("meter"), meterstr); - nafter->add_child_nocopy (*child); - } - } - - node->add_child_nocopy (*nbefore); - node->add_child_nocopy (*nafter); - - node->add_property ("type", "metering"); - - return *node; -} - -int -Session::GlobalMeteringStateCommand::set_state (const XMLNode& node) -{ - GlobalRouteBooleanState states; - XMLNodeList nlist; - const XMLProperty* prop; - XMLNode* child; - XMLNodeConstIterator niter; - int loop; - - before.clear (); - after.clear (); - - for (loop = 0; loop < 2; ++loop) { - - const char *str; - - if (loop) { - str = "after"; - } else { - str = "before"; - } - - if ((child = node.child (str)) == 0) { - warning << string_compose (_("global route meter state command has no \"%1\" node, ignoring entire command"), str) << endmsg; - return -1; - } - - nlist = child->children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - RouteMeterState rms; - boost::shared_ptr route; - ID id; - - prop = (*niter)->property ("id"); - id = prop->value (); - - if ((route = sess.route_by_id (id)) == 0) { - warning << string_compose (_("cannot find track/bus \"%1\" while rebuilding a global route state command, ignored"), id.to_s()) << endmsg; - continue; - } - - rms.first = boost::weak_ptr (route); - - prop = (*niter)->property ("meter"); - - if (prop->value() == X_("pre")) { - rms.second = MeterPreFader; - } else if (prop->value() == X_("post")) { - rms.second = MeterPostFader; - } else { - rms.second = MeterInput; - } - - if (loop) { - after.push_back (rms); - } else { - before.push_back (rms); - } - } - } - - return 0; -} diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc deleted file mode 100644 index d5f2ddc1ba..0000000000 --- a/libs/ardour/session_directory.cc +++ /dev/null @@ -1,148 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include - -#include -#include -#include - -#include "i18n.h" - -namespace ARDOUR { - -using namespace PBD::sys; - -SessionDirectory::SessionDirectory (const path& session_path) - : m_root_path(session_path) -{ - -} - -bool -SessionDirectory::create () -{ - bool is_new = false; - - vector sub_dirs = sub_directories (); - for (vector::const_iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i) - { - try - { - if(create_directories(*i)) is_new = true; - } - catch (PBD::sys::filesystem_error& ex) - { - // log the error - PBD::error << string_compose(_("Cannot create Session directory at path %1 Error: %2"), (*i).to_string(), ex.what()) << endmsg; - - // and rethrow - throw ex; - } - } - - return is_new; -} - -bool -SessionDirectory::is_valid () const -{ - if (!is_directory (m_root_path)) return false; - - vector sub_dirs = sub_directories (); - - for (vector::iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i) { - if (!is_directory (*i)) { - PBD::warning << string_compose(_("Session subdirectory does not exist at path %1"), (*i).to_string()) << endmsg; - return false; - } - } - return true; -} - -const path -SessionDirectory::old_sound_path () const -{ - return m_root_path / old_sound_dir_name; -} - -const path -SessionDirectory::sources_root () const -{ - const string legalized_root(legalize_for_path(m_root_path.leaf())); - - return m_root_path / interchange_dir_name / legalized_root; -} - -const path -SessionDirectory::sound_path () const -{ - if(is_directory (old_sound_path ())) return old_sound_path(); - - // the new style sound directory - return sources_root() / sound_dir_name; -} - -const path -SessionDirectory::midi_path () const -{ - return sources_root() / midi_dir_name; -} - -const path -SessionDirectory::peak_path () const -{ - return m_root_path / peak_dir_name; -} - -const path -SessionDirectory::dead_sound_path () const -{ - return m_root_path / dead_sound_dir_name; -} - -const path -SessionDirectory::dead_midi_path () const -{ - return m_root_path / dead_midi_dir_name; -} - -const path -SessionDirectory::export_path () const -{ - return m_root_path / export_dir_name; -} - -const vector -SessionDirectory::sub_directories () const -{ - vector tmp_paths; - - tmp_paths.push_back ( sound_path () ); - tmp_paths.push_back ( midi_path () ); - tmp_paths.push_back ( peak_path () ); - tmp_paths.push_back ( dead_sound_path () ); - tmp_paths.push_back ( dead_midi_path () ); - tmp_paths.push_back ( export_path () ); - - return tmp_paths; -} - -} // namespace ARDOUR diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc deleted file mode 100644 index 5fc8cd7535..0000000000 --- a/libs/ardour/session_events.cc +++ /dev/null @@ -1,453 +0,0 @@ -/* - Copyright (C) 1999-2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include - -#include -#include - -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -MultiAllocSingleReleasePool Session::Event::pool ("event", sizeof (Session::Event), 512); - -static const char* event_names[] = { - "SetTransportSpeed", - "SetDiskstreamSpeed", - "Locate", - "LocateRoll", - "LocateRollLocate", - "SetLoop", - "PunchIn", - "PunchOut", - "RangeStop", - "RangeLocate", - "Overwrite", - "SetSlaveSource", - "Audition", - "InputConfigurationChange", - "SetAudioRange", - "SetMusicRange", - "SetPlayRange", - "StopOnce", - "AutoLoop" -}; - -void -Session::add_event (nframes_t frame, Event::Type type, nframes_t target_frame) -{ - Event* ev = new Event (type, Event::Add, frame, target_frame, 0); - queue_event (ev); -} - -void -Session::remove_event (nframes_t frame, Event::Type type) -{ - Event* ev = new Event (type, Event::Remove, frame, 0, 0); - queue_event (ev); -} - -void -Session::replace_event (Event::Type type, nframes_t frame, nframes_t target) -{ - Event* ev = new Event (type, Event::Replace, frame, target, 0); - queue_event (ev); -} - -void -Session::clear_events (Event::Type type) -{ - Event* ev = new Event (type, Event::Clear, 0, 0, 0); - queue_event (ev); -} - - -void -Session::dump_events () const -{ - cerr << "EVENT DUMP" << endl; - for (Events::const_iterator i = events.begin(); i != events.end(); ++i) { - cerr << "\tat " << (*i)->action_frame << ' ' << (*i)->type << " target = " << (*i)->target_frame << endl; - } - cerr << "Next event: "; - - if ((Events::const_iterator) next_event == events.end()) { - cerr << "none" << endl; - } else { - cerr << "at " << (*next_event)->action_frame << ' ' - << (*next_event)->type << " target = " - << (*next_event)->target_frame << endl; - } - cerr << "Immediate events pending:\n"; - for (Events::const_iterator i = immediate_events.begin(); i != immediate_events.end(); ++i) { - cerr << "\tat " << (*i)->action_frame << ' ' << (*i)->type << " target = " << (*i)->target_frame << endl; - } - cerr << "END EVENT_DUMP" << endl; -} - -void -Session::queue_event (Event* ev) -{ - if (_state_of_the_state & Loading) { - merge_event (ev); - } else { - pending_events.write (&ev, 1); - } -} - -void -Session::merge_event (Event* ev) -{ - switch (ev->action) { - case Event::Remove: - _remove_event (ev); - delete ev; - return; - - case Event::Replace: - _replace_event (ev); - return; - - case Event::Clear: - _clear_event_type (ev->type); - delete ev; - return; - - case Event::Add: - break; - } - - /* try to handle immediate events right here */ - - if (ev->action_frame == 0) { - process_event (ev); - return; - } - - switch (ev->type) { - case Event::AutoLoop: - case Event::StopOnce: - _clear_event_type (ev->type); - break; - - default: - for (Events::iterator i = events.begin(); i != events.end(); ++i) { - if ((*i)->type == ev->type && (*i)->action_frame == ev->action_frame) { - error << string_compose(_("Session: cannot have two events of type %1 at the same frame (%2)."), - event_names[ev->type], ev->action_frame) << endmsg; - return; - } - } - } - - events.insert (events.begin(), ev); - events.sort (Event::compare); - next_event = events.begin(); - set_next_event (); -} - -/** @return true when @a ev is deleted. */ -bool -Session::_replace_event (Event* ev) -{ - bool ret = false; - Events::iterator i; - - /* private, used only for events that can only exist once in the queue */ - - for (i = events.begin(); i != events.end(); ++i) { - if ((*i)->type == ev->type) { - (*i)->action_frame = ev->action_frame; - (*i)->target_frame = ev->target_frame; - if ((*i) == ev) { - ret = true; - } - delete ev; - break; - } - } - - if (i == events.end()) { - events.insert (events.begin(), ev); - } - - events.sort (Event::compare); - next_event = events.end(); - set_next_event (); - - return ret; -} - -/** @return true when @a ev is deleted. */ -bool -Session::_remove_event (Session::Event* ev) -{ - bool ret = false; - Events::iterator i; - - for (i = events.begin(); i != events.end(); ++i) { - if ((*i)->type == ev->type && (*i)->action_frame == ev->action_frame) { - if ((*i) == ev) { - ret = true; - } - - delete *i; - if (i == next_event) { - ++next_event; - } - events.erase (i); - break; - } - } - - if (i != events.end()) { - set_next_event (); - } - - return ret; -} - -void -Session::_clear_event_type (Event::Type type) -{ - Events::iterator i, tmp; - - for (i = events.begin(); i != events.end(); ) { - - tmp = i; - ++tmp; - - if ((*i)->type == type) { - delete *i; - if (i == next_event) { - ++next_event; - } - events.erase (i); - } - - i = tmp; - } - - for (i = immediate_events.begin(); i != immediate_events.end(); ) { - - tmp = i; - ++tmp; - - if ((*i)->type == type) { - delete *i; - immediate_events.erase (i); - } - - i = tmp; - } - - set_next_event (); -} - -void -Session::set_next_event () -{ - if (events.empty()) { - next_event = events.end(); - return; - } - - if (next_event == events.end()) { - next_event = events.begin(); - } - - if ((*next_event)->action_frame > _transport_frame) { - next_event = events.begin(); - } - - for (; next_event != events.end(); ++next_event) { - if ((*next_event)->action_frame >= _transport_frame) { - break; - } - } -} - -void -Session::process_event (Event* ev) -{ - bool remove = true; - bool del = true; - - /* if we're in the middle of a state change (i.e. waiting - for the butler thread to complete the non-realtime - part of the change), we'll just have to queue this - event for a time when the change is complete. - */ - - if (non_realtime_work_pending()) { - - /* except locates, which we have the capability to handle */ - - if (ev->type != Event::Locate) { - immediate_events.insert (immediate_events.end(), ev); - _remove_event (ev); - return; - } - } - - //printf("Processing event: %s\n", event_names[ev->type]); - - switch (ev->type) { - case Event::SetLoop: - set_play_loop (ev->yes_or_no); - break; - - case Event::AutoLoop: - if (play_loop) { - start_locate (ev->target_frame, true, false, Config->get_seamless_loop()); - } - remove = false; - del = false; - break; - - case Event::Locate: - if (ev->yes_or_no) { - // cerr << "forced locate to " << ev->target_frame << endl; - locate (ev->target_frame, false, true, false); - } else { - // cerr << "soft locate to " << ev->target_frame << endl; - start_locate (ev->target_frame, false, true, false); - } - _send_smpte_update = true; - break; - - case Event::LocateRoll: - if (ev->yes_or_no) { - // cerr << "forced locate to+roll " << ev->target_frame << endl; - locate (ev->target_frame, true, true, false); - } else { - // cerr << "soft locate to+roll " << ev->target_frame << endl; - start_locate (ev->target_frame, true, true, false); - } - _send_smpte_update = true; - break; - - case Event::LocateRollLocate: - // locate is handled by ::request_roll_at_and_return() - _requested_return_frame = ev->target_frame; - cerr << "Set RRF " << ev->target_frame << endl; - request_locate (ev->target2_frame, true); - break; - - - case Event::SetTransportSpeed: - set_transport_speed (ev->speed, ev->yes_or_no); - break; - - case Event::PunchIn: - // cerr << "PunchIN at " << transport_frame() << endl; - if (Config->get_punch_in() && record_status() == Enabled) { - enable_record (); - } - remove = false; - del = false; - break; - - case Event::PunchOut: - // cerr << "PunchOUT at " << transport_frame() << endl; - if (Config->get_punch_out()) { - step_back_from_record (); - } - remove = false; - del = false; - break; - - case Event::StopOnce: - if (!non_realtime_work_pending()) { - stop_transport (ev->yes_or_no); - _clear_event_type (Event::StopOnce); - } - remove = false; - del = false; - break; - - case Event::RangeStop: - if (!non_realtime_work_pending()) { - stop_transport (ev->yes_or_no); - } - remove = false; - del = false; - break; - - case Event::RangeLocate: - start_locate (ev->target_frame, true, true, false); - remove = false; - del = false; - break; - - case Event::Overwrite: - overwrite_some_buffers (static_cast(ev->ptr)); - break; - - case Event::SetDiskstreamSpeed: - set_diskstream_speed (static_cast (ev->ptr), ev->speed); - break; - - case Event::SetSlaveSource: - set_slave_source (ev->slave); - break; - - case Event::Audition: - set_audition (ev->region); - // drop reference to region - ev->region.reset (); - break; - - case Event::InputConfigurationChange: - post_transport_work = PostTransportWork (post_transport_work | PostTransportInputChange); - schedule_butler_transport_work (); - break; - - case Event::SetAudioRange: - current_audio_range = ev->audio_range; - setup_auto_play (); - break; - - case Event::SetPlayRange: - set_play_range (ev->yes_or_no); - break; - - default: - fatal << string_compose(_("Programming error: illegal event type in process_event (%1)"), ev->type) << endmsg; - /*NOTREACHED*/ - break; - }; - - if (remove) { - del = del && !_remove_event (ev); - } - - if (del) { - delete ev; - } -} diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc deleted file mode 100644 index 49b6d9b150..0000000000 --- a/libs/ardour/session_export.cc +++ /dev/null @@ -1,652 +0,0 @@ -/* - Copyright (C) 1999-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -/* see gdither.cc for why we have to do this */ - -#define _ISOC9X_SOURCE 1 -#define _ISOC99_SOURCE 1 -#include -#undef _ISOC99_SOURCE -#undef _ISOC9X_SOURCE -#undef __USE_SVID -#define __USE_SVID 1 -#include -#undef __USE_SVID - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -static int -convert_spec_to_info (ExportSpecification& spec, SF_INFO& sfinfo) -{ - if (spec.path.length() == 0) { - error << _("Export: no output file specified") << endmsg; - return -1; - } - - /* XXX add checks that the directory path exists, and also - check if we are overwriting an existing file... - */ - - sfinfo.format = spec.format; - sfinfo.samplerate = spec.sample_rate; - sfinfo.frames = spec.end_frame - spec.start_frame + 1; - sfinfo.channels = min (spec.channels, 2U); - - return 0; -} - -ExportSpecification::ExportSpecification () -{ - init (); -} - -ExportSpecification::~ExportSpecification () -{ - clear (); -} - -void -ExportSpecification::init () -{ - src_state = 0; - pos = 0; - total_frames = 0; - out = 0; - channels = 0; - running = false; - stop = false; - progress = 0.0; - status = 0; - dither = 0; - start_frame = 0; - end_frame = 0; - dataF = 0; - dataF2 = 0; - leftoverF = 0; - max_leftover_frames = 0; - leftover_frames = 0; - output_data = 0; - out_samples_max = 0; - data_width = 0; - do_freewheel = false; -} - -void -ExportSpecification::clear () -{ - if (out) { - sf_close (out); - out = 0; - } - - if (src_state) { - src_delete (src_state); - src_state = 0; - } - - if (dither) { - gdither_free (dither); - dither = 0; - } - - if (output_data) { - free (output_data); - output_data = 0; - } - if (dataF) { - delete [] dataF; - dataF = 0; - } - if (dataF2) { - delete [] dataF2; - dataF2 = 0; - } - if (leftoverF) { - delete [] leftoverF; - leftoverF = 0; - } - - freewheel_connection.disconnect (); - - init (); -} - -int -ExportSpecification::prepare (nframes_t blocksize, nframes_t frate) -{ - char errbuf[256]; - GDitherSize dither_size; - - frame_rate = frate; - - if (channels == 0) { - error << _("illegal channel count in export specification") << endmsg; - return -1; - } - - if (start_frame >= end_frame) { - error << _("illegal frame range in export specification") << endmsg; - return -1; - } - - if ((data_width = sndfile_data_width(format)) == 0) { - error << _("Bad data width size. Report me!") << endmsg; - return -1; - } - - switch (data_width) { - case 8: - dither_size = GDither8bit; - break; - - case 16: - dither_size = GDither16bit; - break; - - case 24: - dither_size = GDither32bit; - break; - - default: - dither_size = GDitherFloat; - break; - } - - if (convert_spec_to_info (*this, sfinfo)) { - return -1; - } - - /* XXX make sure we have enough disk space for the output */ - - if ((out = sf_open (path.c_str(), SFM_WRITE, &sfinfo)) == 0) { - sf_error_str (0, errbuf, sizeof (errbuf) - 1); - error << string_compose(_("Export: cannot open output file \"%1\" (%2)"), path, errbuf) << endmsg; - return -1; - } - - dataF = new float[blocksize * channels]; - - if (sample_rate != frame_rate) { - int err; - - if ((src_state = src_new (src_quality, channels, &err)) == 0) { - error << string_compose (_("cannot initialize sample rate conversion: %1"), src_strerror (err)) << endmsg; - return -1; - } - - src_data.src_ratio = sample_rate / (double) frame_rate; - out_samples_max = (nframes_t) ceil (blocksize * src_data.src_ratio * channels); - dataF2 = new float[out_samples_max]; - - max_leftover_frames = 4 * blocksize; - leftoverF = new float[max_leftover_frames * channels]; - leftover_frames = 0; - - } else { - out_samples_max = blocksize * channels; - } - - dither = gdither_new (dither_type, channels, dither_size, data_width); - - /* allocate buffers where dithering and output will occur */ - - switch (data_width) { - case 8: - sample_bytes = 1; - break; - - case 16: - sample_bytes = 2; - break; - - case 24: - case 32: - sample_bytes = 4; - break; - - default: - sample_bytes = 0; // float format - break; - } - - if (sample_bytes) { - output_data = (void*) malloc (sample_bytes * out_samples_max); - } - - return 0; -} - -int -ExportSpecification::process (nframes_t nframes) -{ - float* float_buffer = 0; - uint32_t chn; - uint32_t x; - uint32_t i; - sf_count_t written; - char errbuf[256]; - nframes_t to_write = 0; - int cnt = 0; - - do { - - /* now do sample rate conversion */ - - if (sample_rate != frame_rate) { - - int err; - - src_data.output_frames = out_samples_max / channels; - src_data.end_of_input = ((pos + nframes) >= end_frame); - src_data.data_out = dataF2; - - if (leftover_frames > 0) { - - /* input data will be in leftoverF rather than dataF */ - - src_data.data_in = leftoverF; - - if (cnt == 0) { - - /* first time, append new data from dataF into the leftoverF buffer */ - - memcpy (leftoverF + (leftover_frames * channels), dataF, nframes * channels * sizeof(float)); - src_data.input_frames = nframes + leftover_frames; - } else { - - /* otherwise, just use whatever is still left in leftoverF; the contents - were adjusted using memmove() right after the last SRC call (see - below) - */ - - src_data.input_frames = leftover_frames; - } - - } else { - - src_data.data_in = dataF; - src_data.input_frames = nframes; - - } - - ++cnt; - - if ((err = src_process (src_state, &src_data)) != 0) { - error << string_compose (_("an error occured during sample rate conversion: %1"), - src_strerror (err)) - << endmsg; - return -1; - } - - to_write = src_data.output_frames_gen; - leftover_frames = src_data.input_frames - src_data.input_frames_used; - - if (leftover_frames > 0) { - if (leftover_frames > max_leftover_frames) { - error << _("warning, leftover frames overflowed, glitches might occur in output") << endmsg; - leftover_frames = max_leftover_frames; - } - memmove (leftoverF, (char *) (src_data.data_in + (src_data.input_frames_used * channels)), - leftover_frames * channels * sizeof(float)); - } - - float_buffer = dataF2; - - } else { - - /* no SRC, keep it simple */ - - to_write = nframes; - leftover_frames = 0; - float_buffer = dataF; - } - - if (output_data) { - memset (output_data, 0, sample_bytes * to_write * channels); - } - - switch (data_width) { - case 8: - case 16: - case 24: - for (chn = 0; chn < channels; ++chn) { - gdither_runf (dither, chn, to_write, float_buffer, output_data); - } - break; - - case 32: - for (chn = 0; chn < channels; ++chn) { - - int *ob = (int *) output_data; - const double int_max = (float) INT_MAX; - const double int_min = (float) INT_MIN; - - for (x = 0; x < to_write; ++x) { - i = chn + (x * channels); - - if (float_buffer[i] > 1.0f) { - ob[i] = INT_MAX; - } else if (float_buffer[i] < -1.0f) { - ob[i] = INT_MIN; - } else { - if (float_buffer[i] >= 0.0f) { - ob[i] = lrintf (int_max * float_buffer[i]); - } else { - ob[i] = - lrintf (int_min * float_buffer[i]); - } - } - } - } - break; - - default: - for (x = 0; x < to_write * channels; ++x) { - if (float_buffer[x] > 1.0f) { - float_buffer[x] = 1.0f; - } else if (float_buffer[x] < -1.0f) { - float_buffer[x] = -1.0f; - } - } - break; - } - - /* and export to disk */ - - switch (data_width) { - case 8: - /* XXXX no way to deliver 8 bit audio to libsndfile */ - written = to_write; - break; - - case 16: - written = sf_writef_short (out, (short*) output_data, to_write); - break; - - case 24: - case 32: - written = sf_writef_int (out, (int*) output_data, to_write); - break; - - default: - written = sf_writef_float (out, float_buffer, to_write); - break; - } - - if ((nframes_t) written != to_write) { - sf_error_str (out, errbuf, sizeof (errbuf) - 1); - error << string_compose(_("Export: could not write data to output file (%1)"), errbuf) << endmsg; - return -1; - } - - - } while (leftover_frames >= nframes); - - return 0; -} - -int -Session::start_export (ExportSpecification& spec) -{ - if (!_engine.connected()) { - return -1; - } - - if (spec.prepare (current_block_size, frame_rate())) { - return -1; - } - - spec.pos = spec.start_frame; - spec.end_frame = spec.end_frame; - spec.total_frames = spec.end_frame - spec.start_frame; - spec.running = true; - spec.do_freewheel = false; /* force a call to ::prepare_to_export() before proceeding to normal operation */ - - spec.freewheel_connection = _engine.Freewheel.connect (sigc::bind (mem_fun (*this, &Session::process_export), &spec)); - - return _engine.freewheel (true); -} - -int -Session::stop_export (ExportSpecification& spec) -{ - /* don't stop freewheeling but do stop paying attention to it for now */ - - spec.freewheel_connection.disconnect (); - spec.clear (); /* resets running/stop etc */ - - return 0; -} - -int -Session::prepare_to_export (ExportSpecification& spec) -{ - int ret = -1; - - wait_till_butler_finished (); - - /* take everyone out of awrite to avoid disasters */ - - { - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->protect_automation (); - } - } - - /* get everyone to the right position */ - - { - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)-> seek (spec.start_frame, true)) { - error << string_compose (_("%1: cannot seek to %2 for export"), - (*i)->name(), spec.start_frame) - << endmsg; - goto out; - } - } - } - - /* make sure we are actually rolling */ - - if (get_record_enabled()) { - disable_record (false); - } - - _exporting = true; - - /* no slaving */ - - post_export_slave = Config->get_slave_source (); - post_export_position = _transport_frame; - - Config->set_slave_source (None); - - /* get transport ready */ - - set_transport_speed (1.0, false); - butler_transport_work (); - g_atomic_int_set (&butler_should_do_transport_work, 0); - post_transport (); - - /* we are ready to go ... */ - - ret = 0; - - out: - return ret; -} - -int -Session::process_export (nframes_t nframes, ExportSpecification* spec) -{ - uint32_t chn; - uint32_t x; - int ret = -1; - nframes_t this_nframes; - - /* This is not required to be RT-safe because we are running while freewheeling */ - - if (spec->do_freewheel == false) { - - /* first time in export function: get set up */ - - if (prepare_to_export (*spec)) { - spec->running = false; - spec->status = -1; - return -1; - } - - spec->do_freewheel = true; - } - - if (!_exporting) { - /* finished, but still freewheeling */ - process_without_events (nframes); - return 0; - } - - if (!spec->running || spec->stop || (this_nframes = min ((spec->end_frame - spec->pos), nframes)) == 0) { - process_without_events (nframes); - return stop_export (*spec); - } - - /* make sure we've caught up with disk i/o, since - we're running faster than realtime c/o JACK. - */ - - wait_till_butler_finished (); - - /* do the usual stuff */ - - process_without_events (nframes); - - /* and now export the results */ - - nframes = this_nframes; - - memset (spec->dataF, 0, sizeof (spec->dataF[0]) * nframes * spec->channels); - - /* foreach output channel ... */ - - for (chn = 0; chn < spec->channels; ++chn) { - - ExportPortMap::iterator mi = spec->port_map.find (chn); - - if (mi == spec->port_map.end()) { - /* no ports exported to this channel */ - continue; - } - - vector& mapped_ports ((*mi).second); - - for (vector::iterator t = mapped_ports.begin(); t != mapped_ports.end(); ++t) { - - /* OK, this port's output is supposed to appear on this channel - */ - - AudioPort* const aport = dynamic_cast((*t).first); - MidiPort* const mport = dynamic_cast((*t).first); - if (aport != 0) { - Sample* port_buffer = aport->get_audio_buffer().data(); - - /* now interleave the data from the channel into the float buffer */ - - for (x = 0; x < nframes; ++x) { - spec->dataF[chn+(x*spec->channels)] += (float) port_buffer[x]; - } - } else if (mport != 0) { - cerr << "EXPORT MIDI PORT" << endl; - } - } - } - - if (spec->process (nframes)) { - goto out; - } - - spec->pos += nframes; - spec->progress = 1.0 - (((float) spec->end_frame - spec->pos) / spec->total_frames); - - /* and we're good to go */ - - ret = 0; - - out: - if (ret) { - sf_close (spec->out); - spec->out = 0; - unlink (spec->path.c_str()); - spec->running = false; - spec->status = ret; - _exporting = false; - } - - return ret; -} - -void -Session::finalize_audio_export () -{ - _engine.freewheel (false); - _exporting = false; - - /* can't use stop_transport() here because we need - an immediate halt and don't require all the declick - stuff that stop_transport() implements. - */ - - realtime_stop (true); - schedule_butler_transport_work (); - - /* restart slaving */ - - if (post_export_slave != None) { - Config->set_slave_source (post_export_slave); - } else { - locate (post_export_position, false, false, false); - } -} diff --git a/libs/ardour/session_feedback.cc b/libs/ardour/session_feedback.cc deleted file mode 100644 index 2bb9886f50..0000000000 --- a/libs/ardour/session_feedback.cc +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -//using namespace sigc; - - - diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc deleted file mode 100644 index b4938636a2..0000000000 --- a/libs/ardour/session_midi.cc +++ /dev/null @@ -1,1211 +0,0 @@ - -/* - Copyright (C) 1999-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; -using namespace MIDI; - -MachineControl::CommandSignature MMC_CommandSignature; -MachineControl::ResponseSignature MMC_ResponseSignature; - - -void -Session::midi_panic() -{ - { - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - MidiTrack *track = dynamic_cast((*i).get()); - if (track != 0) { - track->midi_panic(); - } - } - } -} - -int -Session::use_config_midi_ports () -{ - string port_name; - - if (default_mmc_port) { - set_mmc_port (default_mmc_port->name()); - } else { - set_mmc_port (""); - } - - if (default_mtc_port) { - set_mtc_port (default_mtc_port->name()); - } else { - set_mtc_port (""); - } - - if (default_midi_port) { - set_midi_port (default_midi_port->name()); - } else { - set_midi_port (""); - } - - return 0; -} - - -/*********************************************************************** - MTC, MMC, etc. -**********************************************************************/ - -int -Session::set_mtc_port (string port_tag) -{ - MTC_Slave *ms; - - if (port_tag.length() == 0) { - - if (_slave && ((ms = dynamic_cast (_slave)) != 0)) { - error << _("Ardour is slaved to MTC - port cannot be reset") << endmsg; - return -1; - } - - if (_mtc_port == 0) { - return 0; - } - - _mtc_port = 0; - goto out; - } - - MIDI::Port* port; - - if ((port = MIDI::Manager::instance()->port (port_tag)) == 0) { - error << string_compose (_("unknown port %1 requested for MTC"), port_tag) << endl; - return -1; - } - - _mtc_port = port; - - if (_slave && ((ms = dynamic_cast (_slave)) != 0)) { - ms->rebind (*port); - } - - Config->set_mtc_port_name (port_tag); - - out: - MTC_PortChanged(); /* EMIT SIGNAL */ - change_midi_ports (); - set_dirty(); - return 0; -} - -void -Session::set_mmc_receive_device_id (uint32_t device_id) -{ - if (mmc) { - mmc->set_receive_device_id (device_id); - } -} - -void -Session::set_mmc_send_device_id (uint32_t device_id) -{ - if (mmc) { - mmc->set_send_device_id (device_id); - } -} - -int -Session::set_mmc_port (string port_tag) -{ - MIDI::byte old_recv_device_id = 0; - MIDI::byte old_send_device_id = 0; - bool reset_id = false; - - if (port_tag.length() == 0) { - if (_mmc_port == 0) { - return 0; - } - _mmc_port = 0; - goto out; - } - - MIDI::Port* port; - - if ((port = MIDI::Manager::instance()->port (port_tag)) == 0) { - return -1; - } - - _mmc_port = port; - - if (mmc) { - old_recv_device_id = mmc->receive_device_id(); - old_recv_device_id = mmc->send_device_id(); - reset_id = true; - delete mmc; - } - - mmc = new MIDI::MachineControl (*_mmc_port, 1.0, - MMC_CommandSignature, - MMC_ResponseSignature); - - if (reset_id) { - mmc->set_receive_device_id (old_recv_device_id); - mmc->set_send_device_id (old_send_device_id); - } - - mmc->Play.connect - (mem_fun (*this, &Session::mmc_deferred_play)); - mmc->DeferredPlay.connect - (mem_fun (*this, &Session::mmc_deferred_play)); - mmc->Stop.connect - (mem_fun (*this, &Session::mmc_stop)); - mmc->FastForward.connect - (mem_fun (*this, &Session::mmc_fast_forward)); - mmc->Rewind.connect - (mem_fun (*this, &Session::mmc_rewind)); - mmc->Pause.connect - (mem_fun (*this, &Session::mmc_pause)); - mmc->RecordPause.connect - (mem_fun (*this, &Session::mmc_record_pause)); - mmc->RecordStrobe.connect - (mem_fun (*this, &Session::mmc_record_strobe)); - mmc->RecordExit.connect - (mem_fun (*this, &Session::mmc_record_exit)); - mmc->Locate.connect - (mem_fun (*this, &Session::mmc_locate)); - mmc->Step.connect - (mem_fun (*this, &Session::mmc_step)); - mmc->Shuttle.connect - (mem_fun (*this, &Session::mmc_shuttle)); - mmc->TrackRecordStatusChange.connect - (mem_fun (*this, &Session::mmc_record_enable)); - - - /* also handle MIDI SPP because its so common */ - - _mmc_port->input()->start.connect (mem_fun (*this, &Session::spp_start)); - _mmc_port->input()->contineu.connect (mem_fun (*this, &Session::spp_continue)); - _mmc_port->input()->stop.connect (mem_fun (*this, &Session::spp_stop)); - - Config->set_mmc_port_name (port_tag); - - out: - MMC_PortChanged(); /* EMIT SIGNAL */ - change_midi_ports (); - set_dirty(); - return 0; -} - -int -Session::set_midi_port (string port_tag) -{ -#if 0 - if (port_tag.length() == 0) { - if (_midi_port == 0) { - return 0; - } - _midi_port = 0; - goto out; - } - - MIDI::Port* port; - - if ((port = MIDI::Manager::instance()->port (port_tag)) == 0) { - return -1; - } - - _midi_port = port; - - /* XXX need something to forward this to control protocols ? or just - use the signal below - */ - - Config->set_midi_port_name (port_tag); - - out: -#endif - MIDI_PortChanged(); /* EMIT SIGNAL */ - change_midi_ports (); - set_dirty(); - return 0; -} - -void -Session::set_trace_midi_input (bool yn, MIDI::Port* port) -{ - MIDI::Parser* input_parser; - - if (port) { - if ((input_parser = port->input()) != 0) { - input_parser->trace (yn, &cout, "input: "); - } - } else { - - if (_mmc_port) { - if ((input_parser = _mmc_port->input()) != 0) { - input_parser->trace (yn, &cout, "input: "); - } - } - - if (_mtc_port && _mtc_port != _mmc_port) { - if ((input_parser = _mtc_port->input()) != 0) { - input_parser->trace (yn, &cout, "input: "); - } - } - - if (_midi_port && _midi_port != _mmc_port && _midi_port != _mtc_port ) { - if ((input_parser = _midi_port->input()) != 0) { - input_parser->trace (yn, &cout, "input: "); - } - } - } - - Config->set_trace_midi_input (yn); -} - -void -Session::set_trace_midi_output (bool yn, MIDI::Port* port) -{ - MIDI::Parser* output_parser; - - if (port) { - if ((output_parser = port->output()) != 0) { - output_parser->trace (yn, &cout, "output: "); - } - } else { - if (_mmc_port) { - if ((output_parser = _mmc_port->output()) != 0) { - output_parser->trace (yn, &cout, "output: "); - } - } - - if (_mtc_port && _mtc_port != _mmc_port) { - if ((output_parser = _mtc_port->output()) != 0) { - output_parser->trace (yn, &cout, "output: "); - } - } - - if (_midi_port && _midi_port != _mmc_port && _midi_port != _mtc_port ) { - if ((output_parser = _midi_port->output()) != 0) { - output_parser->trace (yn, &cout, "output: "); - } - } - - } - - Config->set_trace_midi_output (yn); -} - -bool -Session::get_trace_midi_input(MIDI::Port *port) -{ - MIDI::Parser* input_parser; - if (port) { - if ((input_parser = port->input()) != 0) { - return input_parser->tracing(); - } - } - else { - if (_mmc_port) { - if ((input_parser = _mmc_port->input()) != 0) { - return input_parser->tracing(); - } - } - - if (_mtc_port) { - if ((input_parser = _mtc_port->input()) != 0) { - return input_parser->tracing(); - } - } - - if (_midi_port) { - if ((input_parser = _midi_port->input()) != 0) { - return input_parser->tracing(); - } - } - } - - return false; -} - -bool -Session::get_trace_midi_output(MIDI::Port *port) -{ - MIDI::Parser* output_parser; - if (port) { - if ((output_parser = port->output()) != 0) { - return output_parser->tracing(); - } - } - else { - if (_mmc_port) { - if ((output_parser = _mmc_port->output()) != 0) { - return output_parser->tracing(); - } - } - - if (_mtc_port) { - if ((output_parser = _mtc_port->output()) != 0) { - return output_parser->tracing(); - } - } - - if (_midi_port) { - if ((output_parser = _midi_port->output()) != 0) { - return output_parser->tracing(); - } - } - } - - return false; - -} - -void -Session::setup_midi_control () -{ - outbound_mtc_smpte_frame = 0; - next_quarter_frame_to_send = 0; - - /* setup the MMC buffer */ - - mmc_buffer[0] = 0xf0; // SysEx - mmc_buffer[1] = 0x7f; // Real Time SysEx ID for MMC - mmc_buffer[2] = (mmc ? mmc->send_device_id() : 0x7f); - mmc_buffer[3] = 0x6; // MCC - - /* Set up the qtr frame message */ - - mtc_msg[0] = 0xf1; - mtc_msg[2] = 0xf1; - mtc_msg[4] = 0xf1; - mtc_msg[6] = 0xf1; - mtc_msg[8] = 0xf1; - mtc_msg[10] = 0xf1; - mtc_msg[12] = 0xf1; - mtc_msg[14] = 0xf1; -} - -void -Session::spp_start (Parser& ignored) -{ - if (Config->get_mmc_control() && (Config->get_slave_source() != MTC)) { - request_transport_speed (1.0); - } -} - -void -Session::spp_continue (Parser& ignored) -{ - spp_start (ignored); -} - -void -Session::spp_stop (Parser& ignored) -{ - if (Config->get_mmc_control()) { - request_stop (); - } -} - -void -Session::mmc_deferred_play (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control() && (Config->get_slave_source() != MTC)) { - request_transport_speed (1.0); - } -} - -void -Session::mmc_record_pause (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control()) { - maybe_enable_record(); - } -} - -void -Session::mmc_record_strobe (MIDI::MachineControl &mmc) -{ - if (!Config->get_mmc_control()) - return; - - /* record strobe does an implicit "Play" command */ - - if (_transport_speed != 1.0) { - - /* start_transport() will move from Enabled->Recording, so we - don't need to do anything here except enable recording. - its not the same as maybe_enable_record() though, because - that *can* switch to Recording, which we do not want. - */ - - save_state ("", true); - g_atomic_int_set (&_record_status, Enabled); - RecordStateChanged (); /* EMIT SIGNAL */ - - request_transport_speed (1.0); - - } else { - - enable_record (); - } -} - -void -Session::mmc_record_exit (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control()) { - disable_record (false); - } -} - -void -Session::mmc_stop (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control()) { - request_stop (); - } -} - -void -Session::mmc_pause (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control()) { - - /* We support RECORD_PAUSE, so the spec says that - we must interpret PAUSE like RECORD_PAUSE if - recording. - */ - - if (actively_recording()) { - maybe_enable_record (); - } else { - request_stop (); - } - } -} - -static bool step_queued = false; - -void -Session::mmc_step (MIDI::MachineControl &mmc, int steps) -{ - if (!Config->get_mmc_control()) { - return; - } - - struct timeval now; - struct timeval diff = { 0, 0 }; - - gettimeofday (&now, 0); - - timersub (&now, &last_mmc_step, &diff); - - gettimeofday (&now, 0); - timersub (&now, &last_mmc_step, &diff); - - if (last_mmc_step.tv_sec != 0 && (diff.tv_usec + (diff.tv_sec * 1000000)) < _engine.usecs_per_cycle()) { - return; - } - - double diff_secs = diff.tv_sec + (diff.tv_usec / 1000000.0); - double cur_speed = (((steps * 0.5) * smpte_frames_per_second()) / diff_secs) / smpte_frames_per_second(); - - if (_transport_speed == 0 || cur_speed * _transport_speed < 0) { - /* change direction */ - step_speed = cur_speed; - } else { - step_speed = (0.6 * step_speed) + (0.4 * cur_speed); - } - - step_speed *= 0.25; - -#if 0 - cerr << "delta = " << diff_secs - << " ct = " << _transport_speed - << " steps = " << steps - << " new speed = " << cur_speed - << " speed = " << step_speed - << endl; -#endif - - request_transport_speed (step_speed); - last_mmc_step = now; - - if (!step_queued) { - midi_timeouts.push_back (mem_fun (*this, &Session::mmc_step_timeout)); - step_queued = true; - } -} - -void -Session::mmc_rewind (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control()) { - request_transport_speed(-8.0f); - } -} - -void -Session::mmc_fast_forward (MIDI::MachineControl &mmc) -{ - if (Config->get_mmc_control()) { - request_transport_speed(8.0f); - } -} - -void -Session::mmc_locate (MIDI::MachineControl &mmc, const MIDI::byte* mmc_tc) -{ - if (!Config->get_mmc_control()) { - return; - } - - nframes_t target_frame; - SMPTE::Time smpte; - - smpte.hours = mmc_tc[0] & 0xf; - smpte.minutes = mmc_tc[1]; - smpte.seconds = mmc_tc[2]; - smpte.frames = mmc_tc[3]; - smpte.rate = smpte_frames_per_second(); - smpte.drop = smpte_drop_frames(); - - // Also takes smpte offset into account: - smpte_to_sample( smpte, target_frame, true /* use_offset */, false /* use_subframes */ ); - - if (target_frame > max_frames) { - target_frame = max_frames; - } - - /* Some (all?) MTC/MMC devices do not send a full MTC frame - at the end of a locate, instead sending only an MMC - locate command. This causes the current position - of an MTC slave to become out of date. Catch this. - */ - - MTC_Slave* mtcs = dynamic_cast (_slave); - - if (mtcs != 0) { - // cerr << "Locate *with* MTC slave\n"; - mtcs->handle_locate (mmc_tc); - } else { - // cerr << "Locate without MTC slave\n"; - request_locate (target_frame, false); - } -} - -void -Session::mmc_shuttle (MIDI::MachineControl &mmc, float speed, bool forw) -{ - if (!Config->get_mmc_control()) { - return; - } - - if (Config->get_shuttle_speed_threshold() >= 0 && speed > Config->get_shuttle_speed_threshold()) { - speed *= Config->get_shuttle_speed_factor(); - } - - if (forw) { - request_transport_speed (speed); - } else { - request_transport_speed (-speed); - } -} - -void -Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled) -{ - if (Config->get_mmc_control()) { - - RouteList::iterator i; - boost::shared_ptr r = routes.reader(); - - for (i = r->begin(); i != r->end(); ++i) { - AudioTrack *at; - - if ((at = dynamic_cast((*i).get())) != 0) { - if (trk == at->remote_control_id()) { - at->set_record_enable (enabled, &mmc); - break; - } - } - } - } -} - -void -Session::change_midi_ports () -{ - MIDIRequest* request = new MIDIRequest; - - request->type = MIDIRequest::PortChange; - midi_requests.write (&request, 1); - poke_midi_thread (); -} - -/** Send MTC Full Frame message (complete SMPTE time) for the start of this cycle. - * This resets the MTC code, the next quarter frame message that is sent will be - * the first one with the beginning of this cycle as the new start point. - */ - -int -Session::send_full_time_code(nframes_t nframes) -{ - /* This function could easily send at a given frame offset, but would - * that be useful? Does ardour do sub-block accurate locating? [DR] */ - - MIDI::byte msg[10]; - SMPTE::Time smpte; - - _send_smpte_update = false; - - if (_mtc_port == 0 || !session_send_mtc) { - return 0; - } - - // Get smpte time for this transport frame - sample_to_smpte(_transport_frame, smpte, true /* use_offset */, false /* no subframes */); - - transmitting_smpte_time = smpte; - outbound_mtc_smpte_frame = _transport_frame; - - // I don't understand this bit yet.. [DR] - if (((mtc_smpte_bits >> 5) != MIDI::MTC_25_FPS) && (transmitting_smpte_time.frames % 2)) { - // start MTC quarter frame transmission on an even frame - SMPTE::increment( transmitting_smpte_time ); - outbound_mtc_smpte_frame += (nframes_t) _frames_per_smpte_frame; - } - - // Compensate for audio latency - outbound_mtc_smpte_frame += _worst_output_latency; - - next_quarter_frame_to_send = 0; - - // Sync slave to the same SMPTE time as we are on - msg[0] = 0xf0; - msg[1] = 0x7f; - msg[2] = 0x7f; - msg[3] = 0x1; - msg[4] = 0x1; - msg[9] = 0xf7; - - msg[5] = mtc_smpte_bits | smpte.hours; - msg[6] = smpte.minutes; - msg[7] = smpte.seconds; - msg[8] = smpte.frames; - - cerr << "MTC: Sending full time code at " << outbound_mtc_smpte_frame << endl; - - // Send message at offset 0, sent time is for the start of this cycle - if (_mtc_port->midimsg (msg, sizeof (msg), 0)) { - error << _("Session: could not send full MIDI time code") << endmsg; - return -1; - } - - return 0; -} - - -/** Sends MTC (quarter-frame) messages for this cycle. - * Must be called exactly once per cycle from the audio thread. Realtime safe. - * This function assumes the state of full SMPTE is sane, eg. the slave is - * expecting quarter frame messages and has the right frame of reference (any - * full MTC SMPTE time messages that needed to be sent should have been sent - * earlier already this cycle by send_full_time_code) - */ -int -Session::send_midi_time_code_for_cycle(nframes_t nframes) -{ - assert (next_quarter_frame_to_send >= 0); - assert (next_quarter_frame_to_send <= 7); - - if (_mtc_port == 0 || !session_send_mtc || transmitting_smpte_time.negative - /*|| (next_quarter_frame_to_send < 0)*/ ) { - // cerr << "(MTC) Not sending MTC\n"; - return 0; - } - - /* Duration of one quarter frame */ - nframes_t quarter_frame_duration = ((long) _frames_per_smpte_frame) >> 2; - - // cerr << "(MTC) TR: " << _transport_frame << " - SF: " << outbound_mtc_smpte_frame - // << " - NQ: " << next_quarter_frame_to_send << " - FD" << quarter_frame_duration << endl; - - // FIXME: this should always be true - //assert((outbound_mtc_smpte_frame + (next_quarter_frame_to_send * quarter_frame_duration)) - // > _transport_frame); - - - // Send quarter frames for this cycle - while (_transport_frame + nframes > (outbound_mtc_smpte_frame + - (next_quarter_frame_to_send * quarter_frame_duration))) { - - // cerr << "(MTC) Next frame to send: " << next_quarter_frame_to_send << endl; - - switch (next_quarter_frame_to_send) { - case 0: - mtc_msg[1] = 0x00 | (transmitting_smpte_time.frames & 0xf); - break; - case 1: - mtc_msg[1] = 0x10 | ((transmitting_smpte_time.frames & 0xf0) >> 4); - break; - case 2: - mtc_msg[1] = 0x20 | (transmitting_smpte_time.seconds & 0xf); - break; - case 3: - mtc_msg[1] = 0x30 | ((transmitting_smpte_time.seconds & 0xf0) >> 4); - break; - case 4: - mtc_msg[1] = 0x40 | (transmitting_smpte_time.minutes & 0xf); - break; - case 5: - mtc_msg[1] = 0x50 | ((transmitting_smpte_time.minutes & 0xf0) >> 4); - break; - case 6: - mtc_msg[1] = 0x60 | ((mtc_smpte_bits|transmitting_smpte_time.hours) & 0xf); - break; - case 7: - mtc_msg[1] = 0x70 | (((mtc_smpte_bits|transmitting_smpte_time.hours) & 0xf0) >> 4); - break; - } - - const nframes_t msg_time = (outbound_mtc_smpte_frame - + (quarter_frame_duration * next_quarter_frame_to_send)); - - // This message must fall within this block or something is broken - assert(msg_time >= _transport_frame); - assert(msg_time < _transport_frame + nframes); - - nframes_t out_stamp = msg_time - _transport_frame; - assert(out_stamp < nframes); - - if (_mtc_port->midimsg (mtc_msg, 2, out_stamp)) { - error << string_compose(_("Session: cannot send quarter-frame MTC message (%1)"), strerror (errno)) - << endmsg; - return -1; - } - - /*cerr << "(MTC) SMPTE: " << transmitting_smpte_time.hours - << ":" << transmitting_smpte_time.minutes - << ":" << transmitting_smpte_time.seconds - << ":" << transmitting_smpte_time.frames - << ", qfm = " << next_quarter_frame_to_send - << ", stamp = " << out_stamp - << ", delta = " << _transport_frame + out_stamp - last_time << endl;*/ - - // Increment quarter frame counter - next_quarter_frame_to_send++; - - if (next_quarter_frame_to_send >= 8) { - // Wrap quarter frame counter - next_quarter_frame_to_send = 0; - // Increment smpte time twice - SMPTE::increment( transmitting_smpte_time ); - SMPTE::increment( transmitting_smpte_time ); - // Re-calculate timing of first quarter frame - //smpte_to_sample( transmitting_smpte_time, outbound_mtc_smpte_frame, true /* use_offset */, false ); - outbound_mtc_smpte_frame += 8 * quarter_frame_duration; - // Compensate for audio latency - outbound_mtc_smpte_frame += _worst_output_latency; - } - } - - return 0; -} - -/*********************************************************************** - OUTBOUND MMC STUFF -**********************************************************************/ - -void -Session::deliver_mmc (MIDI::MachineControl::Command cmd, nframes_t where) -{ - using namespace MIDI; - int nbytes = 4; - SMPTE::Time smpte; - - if (_mmc_port == 0 || !session_send_mmc) { - // cerr << "Not delivering MMC " << _mmc_port << " - " << session_send_mmc << endl; - return; - } - - mmc_buffer[nbytes++] = cmd; - - // cerr << "delivering MMC, cmd = " << hex << (int) cmd << dec << endl; - - switch (cmd) { - case MachineControl::cmdLocate: - smpte_time_subframes (where, smpte); - - mmc_buffer[nbytes++] = 0x6; // byte count - mmc_buffer[nbytes++] = 0x1; // "TARGET" subcommand - mmc_buffer[nbytes++] = smpte.hours; - mmc_buffer[nbytes++] = smpte.minutes; - mmc_buffer[nbytes++] = smpte.seconds; - mmc_buffer[nbytes++] = smpte.frames; - mmc_buffer[nbytes++] = smpte.subframes; - break; - - case MachineControl::cmdStop: - break; - - case MachineControl::cmdPlay: - /* always convert Play into Deferred Play */ - /* Why? [DR] */ - mmc_buffer[4] = MachineControl::cmdDeferredPlay; - break; - - case MachineControl::cmdDeferredPlay: - break; - - case MachineControl::cmdRecordStrobe: - break; - - case MachineControl::cmdRecordExit: - break; - - case MachineControl::cmdRecordPause: - break; - - default: - nbytes = 0; - }; - - if (nbytes) { - - mmc_buffer[nbytes++] = 0xf7; // terminate SysEx/MMC message - - if (_mmc_port->midimsg (mmc_buffer, nbytes, 0)) { - error << string_compose(_("MMC: cannot send command %1%2%3"), &hex, cmd, &dec) << endmsg; - } - } -} - -bool -Session::mmc_step_timeout () -{ - struct timeval now; - struct timeval diff; - double diff_usecs; - gettimeofday (&now, 0); - - timersub (&now, &last_mmc_step, &diff); - diff_usecs = diff.tv_sec * 1000000 + diff.tv_usec; - - if (diff_usecs > 1000000.0 || fabs (_transport_speed) < 0.0000001) { - /* too long or too slow, stop transport */ - request_transport_speed (0.0); - step_queued = false; - return false; - } - - if (diff_usecs < 250000.0) { - /* too short, just keep going */ - return true; - } - - /* slow it down */ - - request_transport_speed (_transport_speed * 0.75); - return true; -} - -/*--------------------------------------------------------------------------- - MIDI THREAD - ---------------------------------------------------------------------------*/ - -int -Session::start_midi_thread () -{ - if (pipe (midi_request_pipe)) { - error << string_compose(_("Cannot create transport request signal pipe (%1)"), strerror (errno)) << endmsg; - return -1; - } - - if (fcntl (midi_request_pipe[0], F_SETFL, O_NONBLOCK)) { - error << string_compose(_("UI: cannot set O_NONBLOCK on " "signal read pipe (%1)"), strerror (errno)) << endmsg; - return -1; - } - - if (fcntl (midi_request_pipe[1], F_SETFL, O_NONBLOCK)) { - error << string_compose(_("UI: cannot set O_NONBLOCK on " "signal write pipe (%1)"), strerror (errno)) << endmsg; - return -1; - } - - if (pthread_create_and_store ("transport", &midi_thread, 0, _midi_thread_work, this)) { - error << _("Session: could not create transport thread") << endmsg; - return -1; - } - - return 0; -} - -void -Session::terminate_midi_thread () -{ - if (midi_thread) { - - MIDIRequest* request = new MIDIRequest; - void* status; - - request->type = MIDIRequest::Quit; - - midi_requests.write (&request, 1); - poke_midi_thread (); - - pthread_join (midi_thread, &status); - } -} - -void -Session::poke_midi_thread () -{ - static char c = 0; - - if (write (midi_request_pipe[1], &c, 1) != 1) { - error << string_compose(_("cannot send signal to midi thread! (%1)"), strerror (errno)) << endmsg; - } -} - -void * -Session::_midi_thread_work (void* arg) -{ - pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, 0); - pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0); - - ((Session *) arg)->midi_thread_work (); - return 0; -} - -void -Session::midi_thread_work () -{ - MIDIRequest* request; - struct pollfd pfd[4]; - int nfds = 0; - int timeout; - int fds_ready; - struct sched_param rtparam; - int x; - bool restart; - vector ports; - - PBD::ThreadCreatedWithRequestSize (pthread_self(), X_("MIDI"), 2048); - - memset (&rtparam, 0, sizeof (rtparam)); - rtparam.sched_priority = 9; /* XXX should be relative to audio (JACK) thread */ - - if ((x = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) { - // do we care? not particularly. - } - - /* set up the port vector; 4 is the largest possible size for now */ - - ports.assign (4, (MIDI::Port*) 0); - - while (1) { - - nfds = 0; - - pfd[nfds].fd = midi_request_pipe[0]; - pfd[nfds].events = POLLIN|POLLHUP|POLLERR; - nfds++; - - if (Config->get_mmc_control() && _mmc_port && _mmc_port->selectable() >= 0) { - pfd[nfds].fd = _mmc_port->selectable(); - pfd[nfds].events = POLLIN|POLLHUP|POLLERR; - ports[nfds] = _mmc_port; - nfds++; - } - - /* if MTC is being handled on a different port from MMC - or we are not handling MMC at all, poll - the relevant port. - */ - - if (_mtc_port && (_mtc_port != _mmc_port || !Config->get_mmc_control()) && _mtc_port->selectable() >= 0) { - pfd[nfds].fd = _mtc_port->selectable(); - pfd[nfds].events = POLLIN|POLLHUP|POLLERR; - ports[nfds] = _mtc_port; - nfds++; - } - - /* if we are using MMC control, we obviously have to listen - the relevant port. - */ - - if (_midi_port && (_midi_port != _mmc_port || !Config->get_mmc_control()) && (_midi_port != _mtc_port) && _midi_port->selectable() >= 0) { - pfd[nfds].fd = _midi_port->selectable(); - pfd[nfds].events = POLLIN|POLLHUP|POLLERR; - ports[nfds] = _midi_port; - nfds++; - } - - if (!midi_timeouts.empty()) { - timeout = 100; /* 10msecs */ - } else { - timeout = -1; /* if there is no data, we don't care */ - } - - again: - // cerr << "MIDI poll on " << nfds << " for " << timeout << endl; - if (poll (pfd, nfds, timeout) < 0) { - if (errno == EINTR) { - /* gdb at work, perhaps */ - goto again; - } - - error << string_compose(_("MIDI thread poll failed (%1)"), strerror (errno)) << endmsg; - - break; - } - // cerr << "MIDI thread wakes at " << get_cycles () << endl; - - fds_ready = 0; - - /* check the transport request pipe */ - - if (pfd[0].revents & ~POLLIN) { - error << _("Error on transport thread request pipe") << endmsg; - break; - } - - if (pfd[0].revents & POLLIN) { - - char foo[16]; - - // cerr << "MIDI request FIFO ready\n"; - fds_ready++; - - /* empty the pipe of all current requests */ - - while (1) { - size_t nread = read (midi_request_pipe[0], &foo, sizeof (foo)); - - if (nread > 0) { - if ((size_t) nread < sizeof (foo)) { - break; - } else { - continue; - } - } else if (nread == 0) { - break; - } else if (errno == EAGAIN) { - break; - } else { - fatal << _("Error reading from transport request pipe") << endmsg; - /*NOTREACHED*/ - } - } - - while (midi_requests.read (&request, 1) == 1) { - - switch (request->type) { - case MIDIRequest::PortChange: - /* restart poll with new ports */ - // cerr << "rebind\n"; - restart = true; - break; - - case MIDIRequest::Quit: - delete request; - pthread_exit_pbd (0); - /*NOTREACHED*/ - break; - - default: - break; - } - - - delete request; - } - - } - - if (restart) { - continue; - } - - /* now read the rest of the ports */ - - for (int p = 1; p < nfds; ++p) { - if ((pfd[p].revents & ~POLLIN)) { - // error << string_compose(_("Transport: error polling MIDI port %1 (revents =%2%3%4"), p, &hex, pfd[p].revents, &dec) << endmsg; - break; - } - - if (pfd[p].revents & POLLIN) { - fds_ready++; - ports[p]->parse (); - } - } - - /* timeout driven */ - - if (fds_ready < 2 && timeout != -1) { - - for (MidiTimeoutList::iterator i = midi_timeouts.begin(); i != midi_timeouts.end(); ) { - - MidiTimeoutList::iterator tmp; - tmp = i; - ++tmp; - - if (!(*i)()) { - midi_timeouts.erase (i); - } - - i = tmp; - } - } - } -} - diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc deleted file mode 100644 index d6890b31ae..0000000000 --- a/libs/ardour/session_process.cc +++ /dev/null @@ -1,886 +0,0 @@ -/* - Copyright (C) 1999-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; -using namespace std; - -/** Called by the audio engine when there is work to be done with JACK. - * @param nframes Number of frames to process. - */ -void -Session::process (nframes_t nframes) -{ - MIDI::Manager::instance()->cycle_start(nframes); - - _silent = false; - - if (synced_to_jack() && waiting_to_start) { - if ( _engine.transport_state() == AudioEngine::TransportRolling) { - actually_start_transport (); - } - } - - if (non_realtime_work_pending()) { - if (!transport_work_requested ()) { - post_transport (); - } - } - - (this->*process_function) (nframes); - - MIDI::Manager::instance()->cycle_end(); - - SendFeedback (); /* EMIT SIGNAL */ -} - -void -Session::prepare_diskstreams () -{ - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->prepare (); - } -} - -int -Session::no_roll (nframes_t nframes, nframes_t offset) -{ - nframes_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ?? - int ret = 0; - bool declick = get_transport_declick_required(); - boost::shared_ptr r = routes.reader (); - - if (_click_io) { - _click_io->silence (nframes, offset); - } - - if (g_atomic_int_get (&processing_prohibited)) { - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->silence (nframes, offset); - } - return 0; - } - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - if ((*i)->is_hidden()) { - continue; - } - - (*i)->set_pending_declick (declick); - - if ((*i)->no_roll (nframes, _transport_frame, end_frame, offset, non_realtime_work_pending(), - actively_recording(), declick)) { - error << string_compose(_("Session: error in no roll for %1"), (*i)->name()) << endmsg; - ret = -1; - break; - } - } - - return ret; -} - -int -Session::process_routes (nframes_t nframes, nframes_t offset) -{ - bool record_active; - int declick = get_transport_declick_required(); - bool rec_monitors = get_rec_monitors_input(); - boost::shared_ptr r = routes.reader (); - - if (transport_sub_state & StopPendingCapture) { - /* force a declick out */ - declick = -1; - } - - record_active = actively_recording(); // || (get_record_enabled() && get_punch_in()); - - const nframes_t start_frame = _transport_frame; - const nframes_t end_frame = _transport_frame + (nframes_t)floor(nframes * _transport_speed); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - int ret; - - if ((*i)->is_hidden()) { - continue; - } - - (*i)->set_pending_declick (declick); - - if ((ret = (*i)->roll (nframes, start_frame, end_frame, offset, declick, record_active, rec_monitors)) < 0) { - - /* we have to do this here. Route::roll() for an AudioTrack will have called AudioDiskstream::process(), - and the DS will expect AudioDiskstream::commit() to be called. but we're aborting from that - call path, so make sure we release any outstanding locks here before we return failure. - */ - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator ids = dsl->begin(); ids != dsl->end(); ++ids) { - (*ids)->recover (); - } - - stop_transport (); - return -1; - } - } - - return 0; -} - -int -Session::silent_process_routes (nframes_t nframes, nframes_t offset) -{ - bool record_active = actively_recording(); - int declick = get_transport_declick_required(); - bool rec_monitors = get_rec_monitors_input(); - boost::shared_ptr r = routes.reader (); - - if (transport_sub_state & StopPendingCapture) { - /* force a declick out */ - declick = -1; - } - - const nframes_t start_frame = _transport_frame; - const nframes_t end_frame = _transport_frame + lrintf(nframes * _transport_speed); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - int ret; - - if ((*i)->is_hidden()) { - continue; - } - - if ((ret = (*i)->silent_roll (nframes, start_frame, end_frame, offset, record_active, rec_monitors)) < 0) { - - /* we have to do this here. Route::roll() for an AudioTrack will have called AudioDiskstream::process(), - and the DS will expect AudioDiskstream::commit() to be called. but we're aborting from that - call path, so make sure we release any outstanding locks here before we return failure. - */ - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator ids = dsl->begin(); ids != dsl->end(); ++ids) { - (*ids)->recover (); - } - - stop_transport (); - return -1; - } - } - - return 0; -} - -void -Session::commit_diskstreams (nframes_t nframes, bool &needs_butler) -{ - int dret; - float pworst = 1.0f; - float cworst = 1.0f; - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - - if ((*i)->hidden()) { - continue; - } - - /* force all diskstreams not handled by a Route to call do their stuff. - Note: the diskstreams that were handled by a route will just return zero - from this call, because they know they were processed. So in fact, this - also runs commit() for every diskstream. - */ - - if ((dret = (*i)->process (_transport_frame, nframes, 0, actively_recording(), get_rec_monitors_input())) == 0) { - if ((*i)->commit (nframes)) { - needs_butler = true; - } - - } else if (dret < 0) { - (*i)->recover(); - } - - pworst = min (pworst, (*i)->playback_buffer_load()); - cworst = min (cworst, (*i)->capture_buffer_load()); - } - - uint32_t pmin = g_atomic_int_get (&_playback_load); - uint32_t pminold = g_atomic_int_get (&_playback_load_min); - uint32_t cmin = g_atomic_int_get (&_capture_load); - uint32_t cminold = g_atomic_int_get (&_capture_load_min); - - g_atomic_int_set (&_playback_load, (uint32_t) floor (pworst * 100.0f)); - g_atomic_int_set (&_capture_load, (uint32_t) floor (cworst * 100.0f)); - g_atomic_int_set (&_playback_load_min, min (pmin, pminold)); - g_atomic_int_set (&_capture_load_min, min (cmin, cminold)); - - if (actively_recording()) { - set_dirty(); - } -} - -/** Process callback used when the auditioner is not active */ -void -Session::process_with_events (nframes_t nframes) -{ - Event* ev; - nframes_t this_nframes; - nframes_t end_frame; - nframes_t offset; - bool session_needs_butler = false; - nframes_t stop_limit; - long frames_moved; - - /* make sure the auditioner is silent */ - - if (auditioner) { - auditioner->silence (nframes, 0); - } - - /* handle any pending events */ - - while (pending_events.read (&ev, 1) == 1) { - merge_event (ev); - } - - /* if we are not in the middle of a state change, - and there are immediate events queued up, - process them. - */ - - while (!non_realtime_work_pending() && !immediate_events.empty()) { - Event *ev = immediate_events.front (); - immediate_events.pop_front (); - process_event (ev); - } - - /* Events caused a transport change, send an MTC Full Frame (SMPTE) message. - * This is sent whether rolling or not, to give slaves an idea of ardour time - * on locates (and allow slow slaves to position and prepare for rolling) - */ - if (_send_smpte_update) { - send_full_time_code(nframes); - } - - if (!process_can_proceed()) { - _silent = true; - return; - } - - if (events.empty() || next_event == events.end()) { - process_without_events (nframes); - return; - } - - end_frame = _transport_frame + (nframes_t)abs(floor(nframes * _transport_speed)); - - { - Event* this_event; - Events::iterator the_next_one; - - if (!process_can_proceed()) { - _silent = true; - return; - } - - if (!_exporting && _slave) { - if (!follow_slave (nframes, 0)) { - return; - } - } - - if (_transport_speed == 0) { - no_roll (nframes, 0); - return; - } - - if (!_exporting) { - send_midi_time_code_for_cycle (nframes); - } - - if (actively_recording()) { - stop_limit = max_frames; - } else { - - if (Config->get_stop_at_session_end()) { - stop_limit = current_end_frame(); - } else { - stop_limit = max_frames; - } - } - - if (maybe_stop (stop_limit)) { - no_roll (nframes, 0); - return; - } - - this_event = *next_event; - the_next_one = next_event; - ++the_next_one; - - offset = 0; - - /* yes folks, here it is, the actual loop where we really truly - process some audio */ - while (nframes) { - - this_nframes = nframes; /* real (jack) time relative */ - frames_moved = (long) floor (_transport_speed * nframes); /* transport relative */ - - /* running an event, position transport precisely to its time */ - if (this_event && this_event->action_frame <= end_frame && this_event->action_frame >= _transport_frame) { - /* this isn't quite right for reverse play */ - frames_moved = (long) (this_event->action_frame - _transport_frame); - this_nframes = (nframes_t) abs( floor(frames_moved / _transport_speed) ); - } - - if (this_nframes) { - - click (_transport_frame, nframes, offset); - - /* now process frames between now and the first event in this block */ - prepare_diskstreams (); - - if (process_routes (this_nframes, offset)) { - no_roll (nframes, 0); - return; - } - - commit_diskstreams (this_nframes, session_needs_butler); - - nframes -= this_nframes; - offset += this_nframes; - - if (frames_moved < 0) { - decrement_transport_position (-frames_moved); - } else { - increment_transport_position (frames_moved); - } - - maybe_stop (stop_limit); - check_declick_out (); - } - - /* now handle this event and all others scheduled for the same time */ - - while (this_event && this_event->action_frame == _transport_frame) { - process_event (this_event); - - if (the_next_one == events.end()) { - this_event = 0; - } else { - this_event = *the_next_one; - ++the_next_one; - } - } - - /* if an event left our state changing, do the right thing */ - - if (non_realtime_work_pending()) { - no_roll (nframes, offset); - break; - } - - /* this is necessary to handle the case of seamless looping */ - end_frame = _transport_frame + (nframes_t) floor (nframes * _transport_speed); - - } - - set_next_event (); - - } /* implicit release of route lock */ - - if (session_needs_butler) - summon_butler (); -} - -void -Session::reset_slave_state () -{ - average_slave_delta = 1800; - delta_accumulator_cnt = 0; - have_first_delta_accumulator = false; - slave_state = Stopped; -} - -bool -Session::transport_locked () const -{ - Slave* sl = _slave; - - if (!locate_pending() && ((Config->get_slave_source() == None) || (sl && sl->ok() && sl->locked()))) { - return true; - } - - return false; -} - -bool -Session::follow_slave (nframes_t nframes, nframes_t offset) -{ - float slave_speed; - nframes_t slave_transport_frame; - nframes_t this_delta; - int dir; - bool starting; - - if (!_slave->ok()) { - stop_transport (); - Config->set_slave_source (None); - goto noroll; - } - - _slave->speed_and_position (slave_speed, slave_transport_frame); - - if (!_slave->locked()) { - goto noroll; - } - - if (slave_transport_frame > _transport_frame) { - this_delta = slave_transport_frame - _transport_frame; - dir = 1; - } else { - this_delta = _transport_frame - slave_transport_frame; - dir = -1; - } - - if ((starting = _slave->starting())) { - slave_speed = 0.0f; - } - -#if 0 - cerr << "delta = " << (int) (dir * this_delta) - << " speed = " << slave_speed - << " ts = " << _transport_speed - << " M@ "<< slave_transport_frame << " S@ " << _transport_frame - << " avgdelta = " << average_slave_delta - << endl; -#endif - - if (_slave->is_always_synced() || Config->get_timecode_source_is_synced()) { - - /* if the TC source is synced, then we assume that its - speed is binary: 0.0 or 1.0 - */ - - if (slave_speed != 0.0f) { - slave_speed = 1.0f; - } - - } else { - - /* TC source is able to drift relative to us (slave) - so we need to keep track of the drift and adjust - our speed to remain locked. - */ - - if (delta_accumulator_cnt >= delta_accumulator_size) { - have_first_delta_accumulator = true; - delta_accumulator_cnt = 0; - } - - if (delta_accumulator_cnt != 0 || this_delta < _current_frame_rate) { - delta_accumulator[delta_accumulator_cnt++] = dir*this_delta; - } - - if (have_first_delta_accumulator) { - average_slave_delta = 0; - for (int i = 0; i < delta_accumulator_size; ++i) { - average_slave_delta += delta_accumulator[i]; - } - average_slave_delta /= delta_accumulator_size; - if (average_slave_delta < 0) { - average_dir = -1; - average_slave_delta = -average_slave_delta; - } else { - average_dir = 1; - } - // cerr << "avgdelta = " << average_slave_delta*average_dir << endl; - } - } - - if (slave_speed != 0.0f) { - - /* slave is running */ - - switch (slave_state) { - case Stopped: - if (_slave->requires_seekahead()) { - slave_wait_end = slave_transport_frame + _current_frame_rate; - locate (slave_wait_end, false, false); - slave_state = Waiting; - starting = true; - - } else { - - slave_state = Running; - - Location* al = _locations.auto_loop_location(); - - if (al && play_loop && (slave_transport_frame < al->start() || slave_transport_frame > al->end())) { - // cancel looping - request_play_loop(false); - } - - if (slave_transport_frame != _transport_frame) { - locate (slave_transport_frame, false, false); - } - } - break; - - case Waiting: - break; - - default: - break; - - } - - if (slave_state == Waiting) { - - // cerr << "waiting at " << slave_transport_frame << endl; - if (slave_transport_frame >= slave_wait_end) { - // cerr << "\tstart at " << _transport_frame << endl; - - slave_state = Running; - - bool ok = true; - nframes_t frame_delta = slave_transport_frame - _transport_frame; - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->can_internal_playback_seek (frame_delta)) { - ok = false; - break; - } - } - - if (ok) { - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->internal_playback_seek (frame_delta); - } - _transport_frame += frame_delta; - - } else { - // cerr << "cannot micro-seek\n"; - /* XXX what? */ - } - - memset (delta_accumulator, 0, sizeof (nframes_t) * delta_accumulator_size); - average_slave_delta = 0; - this_delta = 0; - } - } - - if (slave_state == Running && _transport_speed == 0.0f) { - - // cerr << "slave starts transport\n"; - - start_transport (); - } - - } else { - - /* slave has stopped */ - - if (_transport_speed != 0.0f) { - - // cerr << "slave stops transport: " << slave_speed << " frame: " << slave_transport_frame - // << " tf = " << _transport_frame - // << endl; - - if (Config->get_slave_source() == JACK) { - last_stop_frame = _transport_frame; - } - - stop_transport(); - } - - if (slave_transport_frame != _transport_frame) { - // cerr << "slave stopped, move to " << slave_transport_frame << endl; - force_locate (slave_transport_frame, false); - } - - slave_state = Stopped; - } - - if (slave_state == Running && !_slave->is_always_synced() && !Config->get_timecode_source_is_synced()) { - - - if (_transport_speed != 0.0f) { - - /* - note that average_dir is +1 or -1 - */ - - const float adjust_seconds = 1.0f; - float delta; - - //if (average_slave_delta == 0) { - delta = this_delta; - delta *= dir; -// } else { -// delta = average_slave_delta; -// delta *= average_dir; -// } - - float adjusted_speed = slave_speed + - (delta / (adjust_seconds * _current_frame_rate)); - - // cerr << "adjust using " << delta - // << " towards " << adjusted_speed - // << " ratio = " << adjusted_speed / slave_speed - // << " current = " << _transport_speed - // << " slave @ " << slave_speed - // << endl; - - request_transport_speed (adjusted_speed); - -#if 1 - if ((nframes_t) average_slave_delta > _slave->resolution()) { - // cerr << "not locked\n"; - goto silent_motion; - } -#endif - } - } - - if (!starting && !non_realtime_work_pending()) { - /* speed is set, we're locked, and good to go */ - return true; - } - - silent_motion: - - if (slave_speed && _transport_speed) { - - /* something isn't right, but we should move with the master - for now. - */ - - bool need_butler; - - prepare_diskstreams (); - silent_process_routes (nframes, offset); - commit_diskstreams (nframes, need_butler); - - if (need_butler) { - summon_butler (); - } - - int32_t frames_moved = (int32_t) floor (_transport_speed * nframes); - - if (frames_moved < 0) { - decrement_transport_position (-frames_moved); - } else { - increment_transport_position (frames_moved); - } - - nframes_t stop_limit; - - if (actively_recording()) { - stop_limit = max_frames; - } else { - if (Config->get_stop_at_session_end()) { - stop_limit = current_end_frame(); - } else { - stop_limit = max_frames; - } - } - - maybe_stop (stop_limit); - } - - noroll: - /* don't move at all */ - no_roll (nframes, 0); - return false; -} - -void -Session::process_without_events (nframes_t nframes) -{ - bool session_needs_butler = false; - nframes_t stop_limit; - long frames_moved; - nframes_t offset = 0; - - if (!process_can_proceed()) { - _silent = true; - return; - } - - if (!_exporting && _slave) { - if (!follow_slave (nframes, 0)) { - return; - } - } - - if (_transport_speed == 0) { - no_roll (nframes, 0); - return; - } - - if (!_exporting) { - send_midi_time_code_for_cycle (nframes); - } - - if (actively_recording()) { - stop_limit = max_frames; - } else { - if (Config->get_stop_at_session_end()) { - stop_limit = current_end_frame(); - } else { - stop_limit = max_frames; - } - } - - if (maybe_stop (stop_limit)) { - no_roll (nframes, 0); - return; - } - - if (maybe_sync_start (nframes, offset)) { - return; - } - - click (_transport_frame, nframes, offset); - - prepare_diskstreams (); - - frames_moved = (long) floor (_transport_speed * nframes); - - if (process_routes (nframes, offset)) { - no_roll (nframes, offset); - return; - } - - commit_diskstreams (nframes, session_needs_butler); - - if (frames_moved < 0) { - decrement_transport_position (-frames_moved); - } else { - increment_transport_position (frames_moved); - } - - maybe_stop (stop_limit); - check_declick_out (); - - if (session_needs_butler) - summon_butler (); -} - -/** Process callback used when the auditioner is active. - * @param nframes number of frames to process. - */ -void -Session::process_audition (nframes_t nframes) -{ - Event* ev; - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { - (*i)->silence (nframes, 0); - } - } - - /* run the auditioner, and if it says we need butler service, ask for it */ - - if (auditioner->play_audition (nframes) > 0) { - summon_butler (); - } - - /* handle pending events */ - - while (pending_events.read (&ev, 1) == 1) { - merge_event (ev); - } - - /* if we are not in the middle of a state change, - and there are immediate events queued up, - process them. - */ - - while (!non_realtime_work_pending() && !immediate_events.empty()) { - Event *ev = immediate_events.front (); - immediate_events.pop_front (); - process_event (ev); - } - - if (!auditioner->active()) { - /* auditioner no longer active, so go back to the normal process callback */ - process_function = &Session::process_with_events; - } -} - -bool -Session::maybe_sync_start (nframes_t& nframes, nframes_t& offset) -{ - nframes_t sync_offset; - - if (!waiting_for_sync_offset) { - return false; - } - - if (_engine.get_sync_offset (sync_offset) && sync_offset < nframes) { - - no_roll (sync_offset, 0); - nframes -= sync_offset; - offset += sync_offset; - waiting_for_sync_offset = false; - - if (nframes == 0) { - return true; // done - } - - } else { - no_roll (nframes, 0); - return true; // done - } - - return false; -} - diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc deleted file mode 100644 index c228f3c47b..0000000000 --- a/libs/ardour/session_state.cc +++ /dev/null @@ -1,3219 +0,0 @@ -/* - Copyright (C) 1999-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define __STDC_FORMAT_MACROS 1 -#include - -#include -#include -#include -#include - -#include - -#include /* snprintf(3) ... grrr */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_SYS_VFS_H -#include -#else -#include -#include -#endif - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -void -Session::first_stage_init (string fullpath, string snapshot_name) -{ - if (fullpath.length() == 0) { - destroy (); - throw failed_constructor(); - } - - char buf[PATH_MAX+1]; - if (!realpath (fullpath.c_str(), buf) && (errno != ENOENT)) { - error << string_compose(_("Could not use path %1 (%s)"), buf, strerror(errno)) << endmsg; - destroy (); - throw failed_constructor(); - } - - _path = string(buf); - - if (_path[_path.length()-1] != '/') { - _path += '/'; - } - - /* these two are just provisional settings. set_state() - will likely override them. - */ - - _name = _current_snapshot_name = snapshot_name; - - set_history_depth (Config->get_history_depth()); - - _current_frame_rate = _engine.frame_rate (); - _nominal_frame_rate = _current_frame_rate; - _base_frame_rate = _current_frame_rate; - - _tempo_map = new TempoMap (_current_frame_rate); - _tempo_map->StateChanged.connect (mem_fun (*this, &Session::tempo_map_changed)); - - - - g_atomic_int_set (&processing_prohibited, 0); - insert_cnt = 0; - _transport_speed = 0; - _last_transport_speed = 0; - auto_play_legal = false; - transport_sub_state = 0; - _transport_frame = 0; - last_stop_frame = 0; - end_location = new Location (0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd))); - start_location = new Location (0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart))); - _end_location_is_free = true; - g_atomic_int_set (&_record_status, Disabled); - loop_changing = false; - play_loop = false; - _last_roll_location = 0; - _last_record_location = 0; - pending_locate_frame = 0; - pending_locate_roll = false; - pending_locate_flush = false; - audio_dstream_buffer_size = 0; - midi_dstream_buffer_size = 0; - state_tree = 0; - state_was_pending = false; - set_next_event (); - outbound_mtc_smpte_frame = 0; - next_quarter_frame_to_send = -1; - current_block_size = 0; - solo_update_disabled = false; - currently_soloing = false; - _have_captured = false; - _worst_output_latency = 0; - _worst_input_latency = 0; - _worst_track_latency = 0; - _state_of_the_state = StateOfTheState(CannotSave|InitialConnecting|Loading); - - _slave = 0; - butler_mixdown_buffer = 0; - butler_gain_buffer = 0; - mmc = 0; - session_send_mmc = false; - session_send_mtc = false; - post_transport_work = PostTransportWork (0); - g_atomic_int_set (&butler_should_do_transport_work, 0); - g_atomic_int_set (&butler_active, 0); - g_atomic_int_set (&_playback_load, 100); - g_atomic_int_set (&_capture_load, 100); - g_atomic_int_set (&_playback_load_min, 100); - g_atomic_int_set (&_capture_load_min, 100); - _play_range = false; - waiting_to_start = false; - _exporting = false; - _gain_automation_buffer = 0; - _pan_automation_buffer = 0; - _npan_buffers = 0; - pending_abort = false; - destructive_index = 0; - current_trans = 0; - first_file_data_format_reset = true; - first_file_header_format_reset = true; - butler_thread = (pthread_t) 0; - //midi_thread = (pthread_t) 0; - - AudioDiskstream::allocate_working_buffers(); - - /* default short fade = 15ms */ - - Crossfade::set_short_xfade_length ((nframes_t) floor (Config->get_short_xfade_seconds() * frame_rate())); - SndFileSource::setup_standard_crossfades (frame_rate()); - - last_mmc_step.tv_sec = 0; - last_mmc_step.tv_usec = 0; - step_speed = 0.0; - - /* click sounds are unset by default, which causes us to internal - waveforms for clicks. - */ - - click_data = 0; - click_emphasis_data = 0; - click_length = 0; - click_emphasis_length = 0; - _clicking = false; - - process_function = &Session::process_with_events; - - if (Config->get_use_video_sync()) { - waiting_for_sync_offset = true; - } else { - waiting_for_sync_offset = false; - } - - last_smpte_when = 0; - _smpte_offset = 0; - _smpte_offset_negative = true; - last_smpte_valid = false; - - sync_time_vars (); - - last_rr_session_dir = session_dirs.begin(); - refresh_disk_space (); - - // set_default_fade (0.2, 5.0); /* steepness, millisecs */ - - /* slave stuff */ - - average_slave_delta = 1800; - have_first_delta_accumulator = false; - delta_accumulator_cnt = 0; - slave_state = Stopped; - - _engine.GraphReordered.connect (mem_fun (*this, &Session::graph_reordered)); - - /* These are all static "per-class" signals */ - - RegionFactory::CheckNewRegion.connect (mem_fun (*this, &Session::add_region)); - SourceFactory::SourceCreated.connect (mem_fun (*this, &Session::add_source)); - PlaylistFactory::PlaylistCreated.connect (mem_fun (*this, &Session::add_playlist)); - Processor::ProcessorCreated.connect (mem_fun (*this, &Session::add_processor)); - NamedSelection::NamedSelectionCreated.connect (mem_fun (*this, &Session::add_named_selection)); - AutomationList::AutomationListCreated.connect (mem_fun (*this, &Session::add_automation_list)); - - Controllable::Destroyed.connect (mem_fun (*this, &Session::remove_controllable)); - - IO::PortCountChanged.connect (mem_fun (*this, &Session::ensure_buffers)); - - /* stop IO objects from doing stuff until we're ready for them */ - - IO::disable_panners (); - IO::disable_ports (); - IO::disable_connecting (); -} - -int -Session::second_stage_init (bool new_session) -{ - AudioFileSource::set_peak_dir (_session_dir->peak_path().to_string()); - - if (!new_session) { - if (load_state (_current_snapshot_name)) { - return -1; - } - remove_empty_sounds (); - } - - if (start_butler_thread()) { - return -1; - } - - if (start_midi_thread ()) { - return -1; - } - - // set_state() will call setup_raid_path(), but if it's a new session we need - // to call setup_raid_path() here. - - if (state_tree) { - if (set_state (*state_tree->root())) { - return -1; - } - } else { - setup_raid_path(_path); - } - - /* we can't save till after ::when_engine_running() is called, - because otherwise we save state with no connections made. - therefore, we reset _state_of_the_state because ::set_state() - will have cleared it. - - we also have to include Loading so that any events that get - generated between here and the end of ::when_engine_running() - will be processed directly rather than queued. - */ - - _state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave|Loading); - - - _locations.changed.connect (mem_fun (this, &Session::locations_changed)); - _locations.added.connect (mem_fun (this, &Session::locations_added)); - setup_click_sounds (0); - setup_midi_control (); - - /* Pay attention ... */ - - _engine.Halted.connect (mem_fun (*this, &Session::engine_halted)); - _engine.Xrun.connect (mem_fun (*this, &Session::xrun_recovery)); - - try { - when_engine_running(); - } - - /* handle this one in a different way than all others, so that its clear what happened */ - - catch (AudioEngine::PortRegistrationFailure& err) { - error << _("Unable to create all required ports") - << endmsg; - return -1; - } - - catch (...) { - return -1; - } - - BootMessage (_("Reset Remote Controls")); - - send_full_time_code (0); - _engine.transport_locate (0); - deliver_mmc (MIDI::MachineControl::cmdMmcReset, 0); - deliver_mmc (MIDI::MachineControl::cmdLocate, 0); - - BootMessage (_("Reset Control Protocols")); - - ControlProtocolManager::instance().set_session (*this); - - if (new_session) { - _end_location_is_free = true; - } else { - _end_location_is_free = false; - } - - _state_of_the_state = Clean; - - DirtyChanged (); /* EMIT SIGNAL */ - - if (state_was_pending) { - save_state (_current_snapshot_name); - remove_pending_capture_state (); - state_was_pending = false; - } - - BootMessage (_("Session loading complete")); - - return 0; -} - -string -Session::raid_path () const -{ - SearchPath raid_search_path; - - for (vector::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) { - raid_search_path += sys::path((*i).path); - } - - return raid_search_path.to_string (); -} - -void -Session::setup_raid_path (string path) -{ - if (path.empty()) { - return; - } - - space_and_path sp; - string fspath; - - session_dirs.clear (); - - SearchPath search_path(path); - SearchPath sound_search_path; - SearchPath midi_search_path; - - for ( - SearchPath::const_iterator i = search_path.begin(); - i != search_path.end(); - ++i - ) - { - sp.path = (*i).to_string (); - sp.blocks = 0; // not needed - session_dirs.push_back (sp); - - SessionDirectory sdir(sp.path); - - sound_search_path += sdir.sound_path (); - midi_search_path += sdir.midi_path (); - } - - // set the AudioFileSource and SMFSource search path - - AudioFileSource::set_search_path (sound_search_path.to_string ()); - SMFSource::set_search_path (midi_search_path.to_string ()); - - // reset the round-robin soundfile path thingie - - last_rr_session_dir = session_dirs.begin(); -} - -int -Session::ensure_subdirs () -{ - string dir; - - dir = session_directory().peak_path().to_string(); - - if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session peakfile folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg; - return -1; - } - - dir = session_directory().sound_path().to_string(); - - if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session sounds dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg; - return -1; - } - - dir = session_directory().midi_path().to_string(); - - if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session midi dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg; - return -1; - } - - dir = session_directory().dead_sound_path().to_string(); - - if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session dead sounds folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg; - return -1; - } - - dir = session_directory().export_path().to_string(); - - if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session export folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg; - return -1; - } - - dir = analysis_dir (); - - if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session analysis folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg; - return -1; - } - - return 0; -} - -int -Session::create (bool& new_session, const string& mix_template, nframes_t initial_length) -{ - - if (g_mkdir_with_parents (_path.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session folder \"%1\" (%2)"), _path, strerror (errno)) << endmsg; - return -1; - } - - if (ensure_subdirs ()) { - return -1; - } - - /* check new_session so we don't overwrite an existing one */ - - if (!mix_template.empty()) { - std::string in_path = mix_template; - - ifstream in(in_path.c_str()); - - if (in){ - string out_path = _path; - out_path += _name; - out_path += statefile_suffix; - - ofstream out(out_path.c_str()); - - if (out){ - out << in.rdbuf(); - - // okay, session is set up. Treat like normal saved - // session from now on. - - new_session = false; - return 0; - - } else { - error << string_compose (_("Could not open %1 for writing mix template"), out_path) - << endmsg; - return -1; - } - - } else { - error << string_compose (_("Could not open mix template %1 for reading"), in_path) - << endmsg; - return -1; - } - - } - - /* set initial start + end point */ - - start_location->set_end (0); - _locations.add (start_location); - - end_location->set_end (initial_length); - _locations.add (end_location); - - _state_of_the_state = Clean; - - save_state (""); - - return 0; -} - - -int -Session::load_diskstreams (const XMLNode& node) -{ - XMLNodeList clist; - XMLNodeConstIterator citer; - - clist = node.children(); - - for (citer = clist.begin(); citer != clist.end(); ++citer) { - - try { - /* diskstreams added automatically by DiskstreamCreated handler */ - if ((*citer)->name() == "AudioDiskstream" || (*citer)->name() == "DiskStream") { - boost::shared_ptr dstream (new AudioDiskstream (*this, **citer)); - add_diskstream (dstream); - } else if ((*citer)->name() == "MidiDiskstream") { - boost::shared_ptr dstream (new MidiDiskstream (*this, **citer)); - add_diskstream (dstream); - } else { - error << _("Session: unknown diskstream type in XML") << endmsg; - } - } - - catch (failed_constructor& err) { - error << _("Session: could not load diskstream via XML state") << endmsg; - return -1; - } - } - - return 0; -} - -void -Session::maybe_write_autosave() -{ - if (dirty() && record_status() != Recording) { - save_state("", true); - } -} - -void -Session::remove_pending_capture_state () -{ - sys::path pending_state_file_path(_session_dir->root_path()); - - pending_state_file_path /= _current_snapshot_name + pending_suffix; - - try - { - sys::remove (pending_state_file_path); - } - catch(sys::filesystem_error& ex) - { - error << string_compose(_("Could remove pending capture state at path \"%1\" (%2)"), - pending_state_file_path.to_string(), ex.what()) << endmsg; - } -} - -/** Rename a state file. - * @param snapshot_name Snapshot name. - */ -void -Session::rename_state (string old_name, string new_name) -{ - if (old_name == _current_snapshot_name || old_name == _name) { - /* refuse to rename the current snapshot or the "main" one */ - return; - } - - const string old_xml_filename = old_name + statefile_suffix; - const string new_xml_filename = new_name + statefile_suffix; - - const sys::path old_xml_path = _session_dir->root_path() / old_xml_filename; - const sys::path new_xml_path = _session_dir->root_path() / new_xml_filename; - - try - { - sys::rename (old_xml_path, new_xml_path); - } - catch (const sys::filesystem_error& err) - { - error << string_compose(_("could not rename snapshot %1 to %2 (%3)"), - old_name, new_name, err.what()) << endmsg; - } -} - -/** Remove a state file. - * @param snapshot_name Snapshot name. - */ -void -Session::remove_state (string snapshot_name) -{ - if (snapshot_name == _current_snapshot_name || snapshot_name == _name) { - // refuse to remove the current snapshot or the "main" one - return; - } - - sys::path xml_path(_session_dir->root_path()); - - xml_path /= snapshot_name + statefile_suffix; - - if (!create_backup_file (xml_path)) { - // don't remove it if a backup can't be made - // create_backup_file will log the error. - return; - } - - // and delete it - sys::remove (xml_path); -} - -int -Session::save_state (string snapshot_name, bool pending) -{ - XMLTree tree; - sys::path xml_path(_session_dir->root_path()); - - if (_state_of_the_state & CannotSave) { - return 1; - } - - if (!_engine.connected ()) { - error << _("Ardour's audio engine is not connected and state saving would lose all I/O connections. Session not saved") - << endmsg; - return 1; - } - - /* tell sources we're saving first, in case they write out to a new file - * which should be saved with the state rather than the old one */ - for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) - i->second->session_saved(); - - tree.set_root (&get_state()); - - if (snapshot_name.empty()) { - snapshot_name = _current_snapshot_name; - } - - if (!pending) { - - /* proper save: use statefile_suffix (.ardour in English) */ - - xml_path /= snapshot_name + statefile_suffix; - - /* make a backup copy of the old file */ - - if (sys::exists(xml_path) && !create_backup_file (xml_path)) { - // create_backup_file will log the error - return -1; - } - - } else { - - /* pending save: use pending_suffix (.pending in English) */ - xml_path /= snapshot_name + pending_suffix; - } - - sys::path tmp_path(_session_dir->root_path()); - - tmp_path /= snapshot_name + temp_suffix; - - // cerr << "actually writing state to " << xml_path.to_string() << endl; - - if (!tree.write (tmp_path.to_string())) { - error << string_compose (_("state could not be saved to %1"), tmp_path.to_string()) << endmsg; - sys::remove (tmp_path); - return -1; - - } else { - - if (rename (tmp_path.to_string().c_str(), xml_path.to_string().c_str()) != 0) { - error << string_compose (_("could not rename temporary session file %1 to %2"), - tmp_path.to_string(), xml_path.to_string()) << endmsg; - sys::remove (tmp_path); - return -1; - } - } - - if (!pending) { - - save_history (snapshot_name); - - bool was_dirty = dirty(); - - _state_of_the_state = StateOfTheState (_state_of_the_state & ~Dirty); - - if (was_dirty) { - DirtyChanged (); /* EMIT SIGNAL */ - } - - StateSaved (snapshot_name); /* EMIT SIGNAL */ - } - - return 0; -} - -int -Session::restore_state (string snapshot_name) -{ - if (load_state (snapshot_name) == 0) { - set_state (*state_tree->root()); - } - - return 0; -} - -int -Session::load_state (string snapshot_name) -{ - if (state_tree) { - delete state_tree; - state_tree = 0; - } - - state_was_pending = false; - - /* check for leftover pending state from a crashed capture attempt */ - - sys::path xmlpath(_session_dir->root_path()); - xmlpath /= snapshot_name + pending_suffix; - - if (sys::exists (xmlpath)) { - - /* there is pending state from a crashed capture attempt */ - - if (AskAboutPendingState()) { - state_was_pending = true; - } - } - - if (!state_was_pending) { - xmlpath = _session_dir->root_path(); - xmlpath /= snapshot_name + statefile_suffix; - } - - if (!sys::exists (xmlpath)) { - error << string_compose(_("%1: session state information file \"%2\" doesn't exist!"), _name, xmlpath.to_string()) << endmsg; - return 1; - } - - state_tree = new XMLTree; - - set_dirty(); - - if (!state_tree->read (xmlpath.to_string())) { - error << string_compose(_("Could not understand ardour file %1"), xmlpath.to_string()) << endmsg; - delete state_tree; - state_tree = 0; - return -1; - } - - XMLNode& root (*state_tree->root()); - - if (root.name() != X_("Session")) { - error << string_compose (_("Session file %1 is not an Ardour session"), xmlpath.to_string()) << endmsg; - delete state_tree; - state_tree = 0; - return -1; - } - - const XMLProperty* prop; - bool is_old = false; - - if ((prop = root.property ("version")) == 0) { - /* no version implies very old version of Ardour */ - is_old = true; - } else { - int major_version; - major_version = atoi (prop->value().c_str()); // grab just the first number before the period - if (major_version < 2) { - is_old = true; - } - } - - if (is_old) { - - sys::path backup_path(_session_dir->root_path()); - - backup_path /= snapshot_name + "-1" + statefile_suffix; - - // only create a backup once - if (sys::exists (backup_path)) { - return 0; - } - - info << string_compose (_("Copying old session file %1 to %2\nUse %2 with Ardour versions before 2.0 from now on"), - xmlpath.to_string(), backup_path.to_string()) - << endmsg; - - try - { - sys::copy_file (xmlpath, backup_path); - } - catch(sys::filesystem_error& ex) - { - error << string_compose (_("Unable to make backup of state file %1 (%2)"), - xmlpath.to_string(), ex.what()) - << endmsg; - return -1; - } - } - - return 0; -} - -int -Session::load_options (const XMLNode& node) -{ - XMLNode* child; - XMLProperty* prop; - LocaleGuard lg (X_("POSIX")); - - Config->set_variables (node, ConfigVariableBase::Session); - - if ((child = find_named_node (node, "end-marker-is-free")) != 0) { - if ((prop = child->property ("val")) != 0) { - _end_location_is_free = (prop->value() == "yes"); - } - } - - return 0; -} - -bool -Session::save_config_options_predicate (ConfigVariableBase::Owner owner) const -{ - const ConfigVariableBase::Owner modified_by_session_or_user = (ConfigVariableBase::Owner) - (ConfigVariableBase::Session|ConfigVariableBase::Interface); - - return owner & modified_by_session_or_user; -} - -XMLNode& -Session::get_options () const -{ - XMLNode* child; - LocaleGuard lg (X_("POSIX")); - - XMLNode& option_root = Config->get_variables (mem_fun (*this, &Session::save_config_options_predicate)); - - child = option_root.add_child ("end-marker-is-free"); - child->add_property ("val", _end_location_is_free ? "yes" : "no"); - - return option_root; -} - -XMLNode& -Session::get_state() -{ - return state(true); -} - -XMLNode& -Session::get_template() -{ - /* if we don't disable rec-enable, diskstreams - will believe they need to store their capture - sources in their state node. - */ - - disable_record (false); - - return state(false); -} - -XMLNode& -Session::state(bool full_state) -{ - XMLNode* node = new XMLNode("Session"); - XMLNode* child; - - // store libardour version, just in case - char buf[16]; - snprintf(buf, sizeof(buf), "%d.%d.%d", libardour3_major_version, libardour3_minor_version, libardour3_micro_version); - node->add_property("version", string(buf)); - - /* store configuration settings */ - - if (full_state) { - - node->add_property ("name", _name); - snprintf (buf, sizeof (buf), "%" PRId32, _nominal_frame_rate); - node->add_property ("sample-rate", buf); - - if (session_dirs.size() > 1) { - - string p; - - vector::iterator i = session_dirs.begin(); - vector::iterator next; - - ++i; /* skip the first one */ - next = i; - ++next; - - while (i != session_dirs.end()) { - - p += (*i).path; - - if (next != session_dirs.end()) { - p += ':'; - } else { - break; - } - - ++next; - ++i; - } - - child = node->add_child ("Path"); - child->add_content (p); - } - } - - /* save the ID counter */ - - snprintf (buf, sizeof (buf), "%" PRIu64, ID::counter()); - node->add_property ("id-counter", buf); - - /* various options */ - - node->add_child_nocopy (get_options()); - - child = node->add_child ("Sources"); - - if (full_state) { - Glib::Mutex::Lock sl (source_lock); - - for (SourceMap::iterator siter = sources.begin(); siter != sources.end(); ++siter) { - - /* Don't save information about AudioFileSources that are empty */ - - boost::shared_ptr fs; - - if ((fs = boost::dynamic_pointer_cast (siter->second)) != 0) { - - /* Don't save sources that are empty, unless they're destructive (which are OK - if they are empty, because we will re-use them every time.) - */ - - if (!fs->destructive()) { - if (fs->length() == 0) { - continue; - } - } - } - - child->add_child_nocopy (siter->second->get_state()); - } - } - - child = node->add_child ("Regions"); - - if (full_state) { - Glib::Mutex::Lock rl (region_lock); - - for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - - /* only store regions not attached to playlists */ - - if (i->second->playlist() == 0) { - child->add_child_nocopy (i->second->state (true)); - } - } - } - - child = node->add_child ("DiskStreams"); - - { - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - child->add_child_nocopy ((*i)->get_state()); - } - } - } - - if (full_state) { - node->add_child_nocopy (_locations.get_state()); - } else { - // for a template, just create a new Locations, populate it - // with the default start and end, and get the state for that. - Locations loc; - Location* start = new Location(0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart))); - Location* end = new Location(0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd))); - start->set_end(0); - loc.add (start); - end->set_end(compute_initial_length()); - loc.add (end); - node->add_child_nocopy (loc.get_state()); - } - - child = node->add_child ("Bundles"); - { - Glib::Mutex::Lock lm (bundle_lock); - for (BundleList::iterator i = _bundles.begin(); i != _bundles.end(); ++i) { - boost::shared_ptr b = boost::dynamic_pointer_cast (*i); - if (b) { - child->add_child_nocopy (b->get_state()); - } - } - } - - child = node->add_child ("Routes"); - { - boost::shared_ptr r = routes.reader (); - - RoutePublicOrderSorter cmp; - RouteList public_order (*r); - public_order.sort (cmp); - - for (RouteList::iterator i = public_order.begin(); i != public_order.end(); ++i) { - if (!(*i)->is_hidden()) { - if (full_state) { - child->add_child_nocopy ((*i)->get_state()); - } else { - child->add_child_nocopy ((*i)->get_template()); - } - } - } - } - - - child = node->add_child ("EditGroups"); - for (list::iterator i = edit_groups.begin(); i != edit_groups.end(); ++i) { - child->add_child_nocopy ((*i)->get_state()); - } - - child = node->add_child ("MixGroups"); - for (list::iterator i = mix_groups.begin(); i != mix_groups.end(); ++i) { - child->add_child_nocopy ((*i)->get_state()); - } - - child = node->add_child ("Playlists"); - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - if (!(*i)->hidden()) { - if (!(*i)->empty()) { - if (full_state) { - child->add_child_nocopy ((*i)->get_state()); - } else { - child->add_child_nocopy ((*i)->get_template()); - } - } - } - } - - child = node->add_child ("UnusedPlaylists"); - for (PlaylistList::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) { - if (!(*i)->hidden()) { - if (!(*i)->empty()) { - if (full_state) { - child->add_child_nocopy ((*i)->get_state()); - } else { - child->add_child_nocopy ((*i)->get_template()); - } - } - } - } - - - if (_click_io) { - child = node->add_child ("Click"); - child->add_child_nocopy (_click_io->state (full_state)); - } - - if (full_state) { - child = node->add_child ("NamedSelections"); - for (NamedSelectionList::iterator i = named_selections.begin(); i != named_selections.end(); ++i) { - if (full_state) { - child->add_child_nocopy ((*i)->get_state()); - } - } - } - - node->add_child_nocopy (_tempo_map->get_state()); - - node->add_child_nocopy (get_control_protocol_state()); - - if (_extra_xml) { - node->add_child_copy (*_extra_xml); - } - - return *node; -} - -XMLNode& -Session::get_control_protocol_state () -{ - ControlProtocolManager& cpm (ControlProtocolManager::instance()); - return cpm.get_state(); -} - -int -Session::set_state (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNode* child; - const XMLProperty* prop; - int ret = -1; - - _state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave); - - if (node.name() != X_("Session")){ - fatal << _("programming error: Session: incorrect XML node sent to set_state()") << endmsg; - return -1; - } - - if ((prop = node.property ("name")) != 0) { - _name = prop->value (); - } - - if ((prop = node.property (X_("sample-rate"))) != 0) { - - _nominal_frame_rate = atoi (prop->value()); - - if (_nominal_frame_rate != _current_frame_rate) { - if (AskAboutSampleRateMismatch (_nominal_frame_rate, _current_frame_rate)) { - return -1; - } - } - } - - setup_raid_path(_session_dir->root_path().to_string()); - - if ((prop = node.property (X_("id-counter"))) != 0) { - uint64_t x; - sscanf (prop->value().c_str(), "%" PRIu64, &x); - ID::init_counter (x); - } else { - /* old sessions used a timebased counter, so fake - the startup ID counter based on a standard - timestamp. - */ - time_t now; - time (&now); - ID::init_counter (now); - } - - - IO::disable_ports (); - IO::disable_connecting (); - - /* Object loading order: - - MIDI Control - Path - extra - Options/Config - Locations - Sources - AudioRegions - AudioDiskstreams - Connections - Routes - EditGroups - MixGroups - Click - ControlProtocols - */ - - if (use_config_midi_ports ()) { - } - - if ((child = find_named_node (node, "extra")) != 0) { - _extra_xml = new XMLNode (*child); - } - - if (((child = find_named_node (node, "Options")) != 0)) { /* old style */ - load_options (*child); - } else if ((child = find_named_node (node, "Config")) != 0) { /* new style */ - load_options (*child); - } else { - error << _("Session: XML state has no options section") << endmsg; - } - - if ((child = find_named_node (node, "Locations")) == 0) { - error << _("Session: XML state has no locations section") << endmsg; - goto out; - } else if (_locations.set_state (*child)) { - goto out; - } - - Location* location; - - if ((location = _locations.auto_loop_location()) != 0) { - set_auto_loop_location (location); - } - - if ((location = _locations.auto_punch_location()) != 0) { - set_auto_punch_location (location); - } - - if ((location = _locations.end_location()) == 0) { - _locations.add (end_location); - } else { - delete end_location; - end_location = location; - } - - if ((location = _locations.start_location()) == 0) { - _locations.add (start_location); - } else { - delete start_location; - start_location = location; - } - - AudioFileSource::set_header_position_offset (start_location->start()); - - if ((child = find_named_node (node, "Sources")) == 0) { - error << _("Session: XML state has no sources section") << endmsg; - goto out; - } else if (load_sources (*child)) { - goto out; - } - - if ((child = find_named_node (node, "Regions")) == 0) { - error << _("Session: XML state has no Regions section") << endmsg; - goto out; - } else if (load_regions (*child)) { - goto out; - } - - if ((child = find_named_node (node, "Playlists")) == 0) { - error << _("Session: XML state has no playlists section") << endmsg; - goto out; - } else if (load_playlists (*child)) { - goto out; - } - - if ((child = find_named_node (node, "UnusedPlaylists")) == 0) { - // this is OK - } else if (load_unused_playlists (*child)) { - goto out; - } - - if ((child = find_named_node (node, "NamedSelections")) != 0) { - if (load_named_selections (*child)) { - goto out; - } - } - - if ((child = find_named_node (node, "DiskStreams")) == 0) { - error << _("Session: XML state has no diskstreams section") << endmsg; - goto out; - } else if (load_diskstreams (*child)) { - goto out; - } - - if ((child = find_named_node (node, "Bundles")) == 0) { - warning << _("Session: XML state has no bundles section (2.0 session?)") << endmsg; - //goto out; - } else { - /* We can't load Bundles yet as they need to be able - to convert from port names to Port objects, which can't happen until - later */ - _bundle_xml_node = new XMLNode (*child); - } - - if ((child = find_named_node (node, "EditGroups")) == 0) { - error << _("Session: XML state has no edit groups section") << endmsg; - goto out; - } else if (load_edit_groups (*child)) { - goto out; - } - - if ((child = find_named_node (node, "MixGroups")) == 0) { - error << _("Session: XML state has no mix groups section") << endmsg; - goto out; - } else if (load_mix_groups (*child)) { - goto out; - } - - if ((child = find_named_node (node, "TempoMap")) == 0) { - error << _("Session: XML state has no Tempo Map section") << endmsg; - goto out; - } else if (_tempo_map->set_state (*child)) { - goto out; - } - - if ((child = find_named_node (node, "Routes")) == 0) { - error << _("Session: XML state has no routes section") << endmsg; - goto out; - } else if (load_routes (*child)) { - goto out; - } - - if ((child = find_named_node (node, "Click")) == 0) { - warning << _("Session: XML state has no click section") << endmsg; - } else if (_click_io) { - _click_io->set_state (*child); - } - - if ((child = find_named_node (node, "ControlProtocols")) != 0) { - ControlProtocolManager::instance().set_protocol_states (*child); - } - - /* here beginneth the second phase ... */ - - StateReady (); /* EMIT SIGNAL */ - - return 0; - - out: - return ret; -} - -int -Session::load_routes (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - RouteList new_routes; - - nlist = node.children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - boost::shared_ptr route (XMLRouteFactory (**niter)); - - if (route == 0) { - error << _("Session: cannot create Route from XML description.") << endmsg; - return -1; - } - - BootMessage (string_compose (_("Loaded track/bus %1"), route->name())); - - new_routes.push_back (route); - } - - add_routes (new_routes, false); - - return 0; -} - -boost::shared_ptr -Session::XMLRouteFactory (const XMLNode& node) -{ - if (node.name() != "Route") { - return boost::shared_ptr ((Route*) 0); - } - - bool has_diskstream = (node.property ("diskstream") != 0 || node.property ("diskstream-id") != 0); - - DataType type = DataType::AUDIO; - const XMLProperty* prop = node.property("default-type"); - if (prop) - type = DataType(prop->value()); - - assert(type != DataType::NIL); - - if (has_diskstream) { - if (type == DataType::AUDIO) { - boost::shared_ptr ret (new AudioTrack (*this, node)); - return ret; - } else { - boost::shared_ptr ret (new MidiTrack (*this, node)); - return ret; - } - } else { - boost::shared_ptr ret (new Route (*this, node)); - return ret; - } -} - -int -Session::load_regions (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - boost::shared_ptr region; - - nlist = node.children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((region = XMLRegionFactory (**niter, false)) == 0) { - error << _("Session: cannot create Region from XML description."); - const XMLProperty *name = (**niter).property("name"); - - if (name) { - error << " " << string_compose (_("Can not load state for region '%1'"), name->value()); - } - - error << endmsg; - } - } - - return 0; -} - -boost::shared_ptr -Session::XMLRegionFactory (const XMLNode& node, bool full) -{ - const XMLProperty* type = node.property("type"); - - try { - - if ( !type || type->value() == "audio" ) { - - return boost::shared_ptr(XMLAudioRegionFactory (node, full)); - - } else if (type->value() == "midi") { - - return boost::shared_ptr(XMLMidiRegionFactory (node, full)); - - } - - } catch (failed_constructor& err) { - return boost::shared_ptr (); - } - - return boost::shared_ptr (); -} - -boost::shared_ptr -Session::XMLAudioRegionFactory (const XMLNode& node, bool full) -{ - const XMLProperty* prop; - boost::shared_ptr source; - boost::shared_ptr as; - SourceList sources; - SourceList master_sources; - uint32_t nchans = 1; - char buf[128]; - - if (node.name() != X_("Region")) { - return boost::shared_ptr(); - } - - if ((prop = node.property (X_("channels"))) != 0) { - nchans = atoi (prop->value().c_str()); - } - - if ((prop = node.property ("name")) == 0) { - cerr << "no name for this region\n"; - abort (); - } - - if ((prop = node.property (X_("source-0"))) == 0) { - if ((prop = node.property ("source")) == 0) { - error << _("Session: XMLNode describing a AudioRegion is incomplete (no source)") << endmsg; - return boost::shared_ptr(); - } - } - - PBD::ID s_id (prop->value()); - - if ((source = source_by_id (s_id)) == 0) { - error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), s_id) << endmsg; - return boost::shared_ptr(); - } - - as = boost::dynamic_pointer_cast(source); - if (!as) { - error << string_compose(_("Session: XMLNode describing a AudioRegion references a non-audio source id =%1"), s_id) << endmsg; - return boost::shared_ptr(); - } - - sources.push_back (as); - - /* pickup other channels */ - - for (uint32_t n=1; n < nchans; ++n) { - snprintf (buf, sizeof(buf), X_("source-%d"), n); - if ((prop = node.property (buf)) != 0) { - - PBD::ID id2 (prop->value()); - - if ((source = source_by_id (id2)) == 0) { - error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), id2) << endmsg; - return boost::shared_ptr(); - } - - as = boost::dynamic_pointer_cast(source); - if (!as) { - error << string_compose(_("Session: XMLNode describing a AudioRegion references a non-audio source id =%1"), id2) << endmsg; - return boost::shared_ptr(); - } - sources.push_back (as); - } - } - - for (uint32_t n=1; n < nchans; ++n) { - snprintf (buf, sizeof(buf), X_("master-source-%d"), n); - if ((prop = node.property (buf)) != 0) { - - PBD::ID id2 (prop->value()); - - if ((source = source_by_id (id2)) == 0) { - error << string_compose(_("Session: XMLNode describing a AudioRegion references an unknown source id =%1"), id2) << endmsg; - return boost::shared_ptr(); - } - - as = boost::dynamic_pointer_cast(source); - if (!as) { - error << string_compose(_("Session: XMLNode describing a AudioRegion references a non-audio source id =%1"), id2) << endmsg; - return boost::shared_ptr(); - } - master_sources.push_back (as); - } - } - - try { - boost::shared_ptr region (boost::dynamic_pointer_cast (RegionFactory::create (sources, node))); - - /* a final detail: this is the one and only place that we know how long missing files are */ - - if (region->whole_file()) { - for (SourceList::iterator sx = sources.begin(); sx != sources.end(); ++sx) { - boost::shared_ptr sfp = boost::dynamic_pointer_cast (*sx); - if (sfp) { - sfp->set_length (region->length()); - } - } - } - - if (!master_sources.empty()) { - if (master_sources.size() == nchans) { - error << _("Session: XMLNode describing an AudioRegion is missing some master sources; ignored") << endmsg; - } else { - region->set_master_sources (master_sources); - } - } - - return region; - - } - - catch (failed_constructor& err) { - return boost::shared_ptr(); - } -} - -boost::shared_ptr -Session::XMLMidiRegionFactory (const XMLNode& node, bool full) -{ - const XMLProperty* prop; - boost::shared_ptr source; - boost::shared_ptr ms; - SourceList sources; - uint32_t nchans = 1; - - if (node.name() != X_("Region")) { - return boost::shared_ptr(); - } - - if ((prop = node.property (X_("channels"))) != 0) { - nchans = atoi (prop->value().c_str()); - } - - if ((prop = node.property ("name")) == 0) { - cerr << "no name for this region\n"; - abort (); - } - - // Multiple midi channels? that's just crazy talk - assert(nchans == 1); - - if ((prop = node.property (X_("source-0"))) == 0) { - if ((prop = node.property ("source")) == 0) { - error << _("Session: XMLNode describing a MidiRegion is incomplete (no source)") << endmsg; - return boost::shared_ptr(); - } - } - - PBD::ID s_id (prop->value()); - - if ((source = source_by_id (s_id)) == 0) { - error << string_compose(_("Session: XMLNode describing a MidiRegion references an unknown source id =%1"), s_id) << endmsg; - return boost::shared_ptr(); - } - - ms = boost::dynamic_pointer_cast(source); - if (!ms) { - error << string_compose(_("Session: XMLNode describing a MidiRegion references a non-midi source id =%1"), s_id) << endmsg; - return boost::shared_ptr(); - } - - sources.push_back (ms); - - try { - boost::shared_ptr region (boost::dynamic_pointer_cast (RegionFactory::create (sources, node))); - /* a final detail: this is the one and only place that we know how long missing files are */ - - if (region->whole_file()) { - for (SourceList::iterator sx = sources.begin(); sx != sources.end(); ++sx) { - boost::shared_ptr sfp = boost::dynamic_pointer_cast (*sx); - if (sfp) { - sfp->set_length (region->length()); - } - } - } - - return region; - } - - catch (failed_constructor& err) { - return boost::shared_ptr(); - } -} - -XMLNode& -Session::get_sources_as_xml () - -{ - XMLNode* node = new XMLNode (X_("Sources")); - Glib::Mutex::Lock lm (source_lock); - - for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) { - node->add_child_nocopy (i->second->get_state()); - } - - return *node; -} - -string -Session::path_from_region_name (DataType type, string name, string identifier) -{ - char buf[PATH_MAX+1]; - uint32_t n; - SessionDirectory sdir(get_best_session_directory_for_new_source()); - sys::path source_dir = ((type == DataType::AUDIO) - ? sdir.sound_path() : sdir.midi_path()); - - string ext = ((type == DataType::AUDIO) ? ".wav" : ".mid"); - - for (n = 0; n < 999999; ++n) { - if (identifier.length()) { - snprintf (buf, sizeof(buf), "%s%s%" PRIu32 "%s", name.c_str(), - identifier.c_str(), n, ext.c_str()); - } else { - snprintf (buf, sizeof(buf), "%s-%" PRIu32 "%s", name.c_str(), - n, ext.c_str()); - } - - sys::path source_path = source_dir / buf; - - if (!sys::exists (source_path)) { - return source_path.to_string(); - } - } - - error << string_compose (_("cannot create new file from region name \"%1\" with ident = \"%2\": too many existing files with similar names"), - name, identifier) - << endmsg; - - return ""; -} - - -int -Session::load_sources (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - boost::shared_ptr source; - - nlist = node.children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - try { - if ((source = XMLSourceFactory (**niter)) == 0) { - error << _("Session: cannot create Source from XML description.") << endmsg; - } - } - - catch (non_existent_source& err) { - warning << _("A sound file is missing. It will be replaced by silence.") << endmsg; - source = SourceFactory::createSilent (*this, **niter, max_frames, _current_frame_rate); - } - } - - return 0; -} - -boost::shared_ptr -Session::XMLSourceFactory (const XMLNode& node) -{ - if (node.name() != "Source") { - return boost::shared_ptr(); - } - - try { - /* note: do peak building in another thread when loading session state */ - return SourceFactory::create (*this, node, true); - } - - catch (failed_constructor& err) { - error << _("Found a sound file that cannot be used by Ardour. Talk to the progammers.") << endmsg; - return boost::shared_ptr(); - } -} - -int -Session::save_template (string template_name) -{ - XMLTree tree; - - if (_state_of_the_state & CannotSave) { - return -1; - } - - sys::path user_template_dir(user_template_directory()); - - try - { - sys::create_directories (user_template_dir); - } - catch(sys::filesystem_error& ex) - { - error << string_compose(_("Could not create mix templates directory \"%1\" (%2)"), - user_template_dir.to_string(), ex.what()) << endmsg; - return -1; - } - - tree.set_root (&get_template()); - - sys::path template_file_path(user_template_dir); - template_file_path /= template_name + template_suffix; - - if (sys::exists (template_file_path)) - { - warning << string_compose(_("Template \"%1\" already exists - new version not created"), - template_file_path.to_string()) << endmsg; - return -1; - } - - if (!tree.write (template_file_path.to_string())) { - error << _("mix template not saved") << endmsg; - return -1; - } - - return 0; -} - -void -Session::refresh_disk_space () -{ -#if HAVE_SYS_VFS_H - struct statfs statfsbuf; - vector::iterator i; - Glib::Mutex::Lock lm (space_lock); - double scale; - - /* get freespace on every FS that is part of the session path */ - - _total_free_4k_blocks = 0; - - for (i = session_dirs.begin(); i != session_dirs.end(); ++i) { - statfs ((*i).path.c_str(), &statfsbuf); - - scale = statfsbuf.f_bsize/4096.0; - - (*i).blocks = (uint32_t) floor (statfsbuf.f_bavail * scale); - _total_free_4k_blocks += (*i).blocks; - } -#endif -} - -string -Session::get_best_session_directory_for_new_source () -{ - vector::iterator i; - string result = _session_dir->root_path().to_string(); - - /* handle common case without system calls */ - - if (session_dirs.size() == 1) { - return result; - } - - /* OK, here's the algorithm we're following here: - - We want to select which directory to use for - the next file source to be created. Ideally, - we'd like to use a round-robin process so as to - get maximum performance benefits from splitting - the files across multiple disks. - - However, in situations without much diskspace, an - RR approach may end up filling up a filesystem - with new files while others still have space. - Its therefore important to pay some attention to - the freespace in the filesystem holding each - directory as well. However, if we did that by - itself, we'd keep creating new files in the file - system with the most space until it was as full - as all others, thus negating any performance - benefits of this RAID-1 like approach. - - So, we use a user-configurable space threshold. If - there are at least 2 filesystems with more than this - much space available, we use RR selection between them. - If not, then we pick the filesystem with the most space. - - This gets a good balance between the two - approaches. - */ - - refresh_disk_space (); - - int free_enough = 0; - - for (i = session_dirs.begin(); i != session_dirs.end(); ++i) { - if ((*i).blocks * 4096 >= Config->get_disk_choice_space_threshold()) { - free_enough++; - } - } - - if (free_enough >= 2) { - /* use RR selection process, ensuring that the one - picked works OK. - */ - - i = last_rr_session_dir; - - do { - if (++i == session_dirs.end()) { - i = session_dirs.begin(); - } - - if ((*i).blocks * 4096 >= Config->get_disk_choice_space_threshold()) { - if (create_session_directory ((*i).path)) { - result = (*i).path; - last_rr_session_dir = i; - return result; - } - } - - } while (i != last_rr_session_dir); - - } else { - - /* pick FS with the most freespace (and that - seems to actually work ...) - */ - - vector sorted; - space_and_path_ascending_cmp cmp; - - sorted = session_dirs; - sort (sorted.begin(), sorted.end(), cmp); - - for (i = sorted.begin(); i != sorted.end(); ++i) { - if (create_session_directory ((*i).path)) { - result = (*i).path; - last_rr_session_dir = i; - return result; - } - } - } - - return result; -} - -int -Session::load_playlists (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - boost::shared_ptr playlist; - - nlist = node.children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - if ((playlist = XMLPlaylistFactory (**niter)) == 0) { - error << _("Session: cannot create Playlist from XML description.") << endmsg; - } - } - - return 0; -} - -int -Session::load_unused_playlists (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - boost::shared_ptr playlist; - - nlist = node.children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - if ((playlist = XMLPlaylistFactory (**niter)) == 0) { - error << _("Session: cannot create Playlist from XML description.") << endmsg; - continue; - } - - // now manually untrack it - - track_playlist (false, boost::weak_ptr (playlist)); - } - - return 0; -} - -boost::shared_ptr -Session::XMLPlaylistFactory (const XMLNode& node) -{ - try { - return PlaylistFactory::create (*this, node); - } - - catch (failed_constructor& err) { - return boost::shared_ptr(); - } -} - -int -Session::load_named_selections (const XMLNode& node) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - NamedSelection *ns; - - nlist = node.children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - if ((ns = XMLNamedSelectionFactory (**niter)) == 0) { - error << _("Session: cannot create Named Selection from XML description.") << endmsg; - } - } - - return 0; -} - -NamedSelection * -Session::XMLNamedSelectionFactory (const XMLNode& node) -{ - try { - return new NamedSelection (*this, node); - } - - catch (failed_constructor& err) { - return 0; - } -} - -string -Session::automation_dir () const -{ - string res = _path; - res += "automation/"; - return res; -} - -string -Session::analysis_dir () const -{ - string res = _path; - res += "analysis/"; - return res; -} - -int -Session::load_bundles (XMLNode const & node) -{ - XMLNodeList nlist = node.children(); - XMLNodeConstIterator niter; - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "InputBundle") { - add_bundle (boost::shared_ptr (new UserBundle (**niter, true))); - } else if ((*niter)->name() == "OutputBundle") { - add_bundle (boost::shared_ptr (new UserBundle (**niter, false))); - } else { - error << string_compose(_("Unknown node \"%1\" found in Bundles list from state file"), (*niter)->name()) << endmsg; - return -1; - } - } - - return 0; -} - -int -Session::load_edit_groups (const XMLNode& node) -{ - return load_route_groups (node, true); -} - -int -Session::load_mix_groups (const XMLNode& node) -{ - return load_route_groups (node, false); -} - -int -Session::load_route_groups (const XMLNode& node, bool edit) -{ - XMLNodeList nlist = node.children(); - XMLNodeConstIterator niter; - RouteGroup* rg; - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "RouteGroup") { - if (edit) { - rg = add_edit_group (""); - rg->set_state (**niter); - } else { - rg = add_mix_group (""); - rg->set_state (**niter); - } - } - } - - return 0; -} - -void -Session::auto_save() -{ - save_state (_current_snapshot_name); -} - -static bool -state_file_filter (const string &str, void *arg) -{ - return (str.length() > strlen(statefile_suffix) && - str.find (statefile_suffix) == (str.length() - strlen (statefile_suffix))); -} - -struct string_cmp { - bool operator()(const string* a, const string* b) { - return *a < *b; - } -}; - -static string* -remove_end(string* state) -{ - string statename(*state); - - string::size_type start,end; - if ((start = statename.find_last_of ('/')) != string::npos) { - statename = statename.substr (start+1); - } - - if ((end = statename.rfind(".ardour")) == string::npos) { - end = statename.length(); - } - - return new string(statename.substr (0, end)); -} - -vector * -Session::possible_states (string path) -{ - PathScanner scanner; - vector* states = scanner (path, state_file_filter, 0, false, false); - - transform(states->begin(), states->end(), states->begin(), remove_end); - - string_cmp cmp; - sort (states->begin(), states->end(), cmp); - - return states; -} - -vector * -Session::possible_states () const -{ - return possible_states(_path); -} - -RouteGroup * -Session::add_edit_group (string name) -{ - RouteGroup* rg = new RouteGroup (*this, name); - edit_groups.push_back (rg); - edit_group_added (rg); /* EMIT SIGNAL */ - set_dirty(); - return rg; -} - -RouteGroup * -Session::add_mix_group (string name) -{ - RouteGroup* rg = new RouteGroup (*this, name, RouteGroup::Relative); - mix_groups.push_back (rg); - mix_group_added (rg); /* EMIT SIGNAL */ - set_dirty(); - return rg; -} - -void -Session::remove_edit_group (RouteGroup& rg) -{ - list::iterator i; - - if ((i = find (edit_groups.begin(), edit_groups.end(), &rg)) != edit_groups.end()) { - (*i)->apply (&Route::drop_edit_group, this); - edit_groups.erase (i); - edit_group_removed (); /* EMIT SIGNAL */ - } - - delete &rg; -} - -void -Session::remove_mix_group (RouteGroup& rg) -{ - list::iterator i; - - if ((i = find (mix_groups.begin(), mix_groups.end(), &rg)) != mix_groups.end()) { - (*i)->apply (&Route::drop_mix_group, this); - mix_groups.erase (i); - mix_group_removed (); /* EMIT SIGNAL */ - } - - delete &rg; -} - -RouteGroup * -Session::mix_group_by_name (string name) -{ - list::iterator i; - - for (i = mix_groups.begin(); i != mix_groups.end(); ++i) { - if ((*i)->name() == name) { - return* i; - } - } - return 0; -} - -RouteGroup * -Session::edit_group_by_name (string name) -{ - list::iterator i; - - for (i = edit_groups.begin(); i != edit_groups.end(); ++i) { - if ((*i)->name() == name) { - return* i; - } - } - return 0; -} - -void -Session::begin_reversible_command (const string& name) -{ - current_trans = new UndoTransaction; - current_trans->set_name (name); -} - -void -Session::commit_reversible_command (Command *cmd) -{ - struct timeval now; - - if (cmd) { - current_trans->add_command (cmd); - } - - if (current_trans->empty()) { - return; - } - - gettimeofday (&now, 0); - current_trans->set_timestamp (now); - - _history.add (current_trans); -} - -Session::GlobalRouteBooleanState -Session::get_global_route_boolean (bool (Route::*method)(void) const) -{ - GlobalRouteBooleanState s; - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { - RouteBooleanState v; - - v.first =* i; - Route* r = (*i).get(); - v.second = (r->*method)(); - - s.push_back (v); - } - } - - return s; -} - -Session::GlobalRouteMeterState -Session::get_global_route_metering () -{ - GlobalRouteMeterState s; - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { - RouteMeterState v; - - v.first =* i; - v.second = (*i)->meter_point(); - - s.push_back (v); - } - } - - return s; -} - -void -Session::set_global_route_metering (GlobalRouteMeterState s, void* arg) -{ - for (GlobalRouteMeterState::iterator i = s.begin(); i != s.end(); ++i) { - - boost::shared_ptr r = (i->first.lock()); - - if (r) { - r->set_meter_point (i->second, arg); - } - } -} - -void -Session::set_global_route_boolean (GlobalRouteBooleanState s, void (Route::*method)(bool, void*), void* arg) -{ - for (GlobalRouteBooleanState::iterator i = s.begin(); i != s.end(); ++i) { - - boost::shared_ptr r = (i->first.lock()); - - if (r) { - Route* rp = r.get(); - (rp->*method) (i->second, arg); - } - } -} - -void -Session::set_global_mute (GlobalRouteBooleanState s, void* src) -{ - set_global_route_boolean (s, &Route::set_mute, src); -} - -void -Session::set_global_solo (GlobalRouteBooleanState s, void* src) -{ - set_global_route_boolean (s, &Route::set_solo, src); -} - -void -Session::set_global_record_enable (GlobalRouteBooleanState s, void* src) -{ - set_global_route_boolean (s, &Route::set_record_enable, src); -} - -#if 0 -UndoAction -Session::global_mute_memento (void* src) -{ - return sigc::bind (mem_fun (*this, &Session::set_global_mute), get_global_route_boolean (&Route::muted), src); -} - -UndoAction -Session::global_metering_memento (void* src) -{ - return sigc::bind (mem_fun (*this, &Session::set_global_route_metering), get_global_route_metering (), src); -} - -UndoAction -Session::global_solo_memento (void* src) -{ - return sigc::bind (mem_fun (*this, &Session::set_global_solo), get_global_route_boolean (&Route::soloed), src); -} - -UndoAction -Session::global_record_enable_memento (void* src) -{ - return sigc::bind (mem_fun (*this, &Session::set_global_record_enable), get_global_route_boolean (&Route::record_enabled), src); -} -#endif - -static bool -accept_all_non_peak_files (const string& path, void *arg) -{ - return (path.length() > 5 && path.find (peakfile_suffix) != (path.length() - 5)); -} - -static bool -accept_all_state_files (const string& path, void *arg) -{ - return (path.length() > 7 && path.find (".ardour") == (path.length() - 7)); -} - -int -Session::find_all_sources (string path, set& result) -{ - XMLTree tree; - XMLNode* node; - - if (!tree.read (path)) { - return -1; - } - - if ((node = find_named_node (*tree.root(), "Sources")) == 0) { - return -2; - } - - XMLNodeList nlist; - XMLNodeConstIterator niter; - - nlist = node->children(); - - set_dirty(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - XMLProperty* prop; - - if ((prop = (*niter)->property (X_("name"))) == 0) { - continue; - } - - if (prop->value()[0] == '/') { - /* external file, ignore */ - continue; - } - - sys::path source_path = _session_dir->sound_path (); - - source_path /= prop->value (); - - result.insert (source_path.to_string ()); - } - - return 0; -} - -int -Session::find_all_sources_across_snapshots (set& result, bool exclude_this_snapshot) -{ - PathScanner scanner; - vector* state_files; - string ripped; - string this_snapshot_path; - - result.clear (); - - ripped = _path; - - if (ripped[ripped.length()-1] == '/') { - ripped = ripped.substr (0, ripped.length() - 1); - } - - state_files = scanner (ripped, accept_all_state_files, (void *) 0, false, true); - - if (state_files == 0) { - /* impossible! */ - return 0; - } - - this_snapshot_path = _path; - this_snapshot_path += _current_snapshot_name; - this_snapshot_path += statefile_suffix; - - for (vector::iterator i = state_files->begin(); i != state_files->end(); ++i) { - - if (exclude_this_snapshot && **i == this_snapshot_path) { - continue; - } - - if (find_all_sources (**i, result) < 0) { - return -1; - } - } - - return 0; -} - -struct RegionCounter { - typedef std::map > AudioSourceList; - AudioSourceList::iterator iter; - boost::shared_ptr region; - uint32_t count; - - RegionCounter() : count (0) {} -}; - -int -Session::cleanup_sources (Session::cleanup_report& rep) -{ - // FIXME: needs adaptation to midi - - vector > dead_sources; - vector > playlists_tbd; - PathScanner scanner; - string sound_path; - vector::iterator i; - vector::iterator nexti; - vector* soundfiles; - vector unused; - set all_sources; - bool used; - string spath; - int ret = -1; - - _state_of_the_state = (StateOfTheState) (_state_of_the_state | InCleanup); - - - /* step 1: consider deleting all unused playlists */ - - for (PlaylistList::iterator x = unused_playlists.begin(); x != unused_playlists.end(); ++x) { - int status; - - status = AskAboutPlaylistDeletion (*x); - - switch (status) { - case -1: - ret = 0; - goto out; - break; - - case 0: - playlists_tbd.push_back (*x); - break; - - default: - /* leave it alone */ - break; - } - } - - /* now delete any that were marked for deletion */ - - for (vector >::iterator x = playlists_tbd.begin(); x != playlists_tbd.end(); ++x) { - (*x)->drop_references (); - } - - playlists_tbd.clear (); - - /* step 2: find all un-used sources */ - - rep.paths.clear (); - rep.space = 0; - - for (SourceMap::iterator i = sources.begin(); i != sources.end(); ) { - - SourceMap::iterator tmp; - - tmp = i; - ++tmp; - - /* do not bother with files that are zero size, otherwise we remove the current "nascent" - capture files. - */ - - if (!i->second->used() && i->second->length() > 0) { - dead_sources.push_back (i->second); - i->second->GoingAway(); - } - - i = tmp; - } - - /* build a list of all the possible sound directories for the session */ - - for (i = session_dirs.begin(); i != session_dirs.end(); ) { - - nexti = i; - ++nexti; - - SessionDirectory sdir ((*i).path); - sound_path += sdir.sound_path().to_string(); - - if (nexti != session_dirs.end()) { - sound_path += ':'; - } - - i = nexti; - } - - /* now do the same thing for the files that ended up in the sounds dir(s) - but are not referenced as sources in any snapshot. - */ - - soundfiles = scanner (sound_path, accept_all_non_peak_files, (void *) 0, false, true); - - if (soundfiles == 0) { - return 0; - } - - /* find all sources, but don't use this snapshot because the - state file on disk still references sources we may have already - dropped. - */ - - find_all_sources_across_snapshots (all_sources, true); - - /* add our current source list - */ - - for (SourceMap::iterator i = sources.begin(); i != sources.end(); ++i) { - boost::shared_ptr fs; - - if ((fs = boost::dynamic_pointer_cast (i->second)) != 0) { - all_sources.insert (fs->path()); - } - } - - char tmppath1[PATH_MAX+1]; - char tmppath2[PATH_MAX+1]; - - for (vector::iterator x = soundfiles->begin(); x != soundfiles->end(); ++x) { - - used = false; - spath = **x; - - for (set::iterator i = all_sources.begin(); i != all_sources.end(); ++i) { - - realpath(spath.c_str(), tmppath1); - realpath((*i).c_str(), tmppath2); - - if (strcmp(tmppath1, tmppath2) == 0) { - used = true; - break; - } - } - - if (!used) { - unused.push_back (spath); - } - } - - /* now try to move all unused files into the "dead_sounds" directory(ies) */ - - for (vector::iterator x = unused.begin(); x != unused.end(); ++x) { - struct stat statbuf; - - rep.paths.push_back (*x); - if (stat ((*x).c_str(), &statbuf) == 0) { - rep.space += statbuf.st_size; - } - - string newpath; - - /* don't move the file across filesystems, just - stick it in the `dead_sound_dir_name' directory - on whichever filesystem it was already on. - */ - - if ((*x).find ("/sounds/") != string::npos) { - - /* old school, go up 1 level */ - - newpath = Glib::path_get_dirname (*x); // "sounds" - newpath = Glib::path_get_dirname (newpath); // "session-name" - - } else { - - /* new school, go up 4 levels */ - - newpath = Glib::path_get_dirname (*x); // "audiofiles" - newpath = Glib::path_get_dirname (newpath); // "session-name" - newpath = Glib::path_get_dirname (newpath); // "interchange" - newpath = Glib::path_get_dirname (newpath); // "session-dir" - } - - newpath += '/'; - newpath += dead_sound_dir_name; - - if (g_mkdir_with_parents (newpath.c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create session peakfile folder \"%1\" (%2)"), newpath, strerror (errno)) << endmsg; - return -1; - } - - newpath += '/'; - newpath += Glib::path_get_basename ((*x)); - - if (access (newpath.c_str(), F_OK) == 0) { - - /* the new path already exists, try versioning */ - - char buf[PATH_MAX+1]; - int version = 1; - string newpath_v; - - snprintf (buf, sizeof (buf), "%s.%d", newpath.c_str(), version); - newpath_v = buf; - - while (access (newpath_v.c_str(), F_OK) == 0 && version < 999) { - snprintf (buf, sizeof (buf), "%s.%d", newpath.c_str(), ++version); - newpath_v = buf; - } - - if (version == 999) { - error << string_compose (_("there are already 1000 files with names like %1; versioning discontinued"), - newpath) - << endmsg; - } else { - newpath = newpath_v; - } - - } else { - - /* it doesn't exist, or we can't read it or something */ - - } - - if (::rename ((*x).c_str(), newpath.c_str()) != 0) { - error << string_compose (_("cannot rename audio file source from %1 to %2 (%3)"), - (*x), newpath, strerror (errno)) - << endmsg; - goto out; - } - - /* see if there an easy to find peakfile for this file, and remove it. - */ - - string peakpath = (*x).substr (0, (*x).find_last_of ('.')); - peakpath += peakfile_suffix; - - if (access (peakpath.c_str(), W_OK) == 0) { - if (::unlink (peakpath.c_str()) != 0) { - error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"), - peakpath, _path, strerror (errno)) - << endmsg; - /* try to back out */ - rename (newpath.c_str(), _path.c_str()); - goto out; - } - } - } - - ret = 0; - - /* dump the history list */ - - _history.clear (); - - /* save state so we don't end up a session file - referring to non-existent sources. - */ - - save_state (""); - - out: - _state_of_the_state = (StateOfTheState) (_state_of_the_state & ~InCleanup); - - return ret; -} - -int -Session::cleanup_trash_sources (Session::cleanup_report& rep) -{ - // FIXME: needs adaptation for MIDI - - vector::iterator i; - string dead_sound_dir; - struct dirent* dentry; - struct stat statbuf; - DIR* dead; - - rep.paths.clear (); - rep.space = 0; - - for (i = session_dirs.begin(); i != session_dirs.end(); ++i) { - - dead_sound_dir = (*i).path; - dead_sound_dir += dead_sound_dir_name; - - if ((dead = opendir (dead_sound_dir.c_str())) == 0) { - continue; - } - - while ((dentry = readdir (dead)) != 0) { - - /* avoid '.' and '..' */ - - if ((dentry->d_name[0] == '.' && dentry->d_name[1] == '\0') || - (dentry->d_name[2] == '\0' && dentry->d_name[0] == '.' && dentry->d_name[1] == '.')) { - continue; - } - - string fullpath; - - fullpath = dead_sound_dir; - fullpath += '/'; - fullpath += dentry->d_name; - - if (stat (fullpath.c_str(), &statbuf)) { - continue; - } - - if (!S_ISREG (statbuf.st_mode)) { - continue; - } - - if (unlink (fullpath.c_str())) { - error << string_compose (_("cannot remove dead sound file %1 (%2)"), - fullpath, strerror (errno)) - << endmsg; - } - - rep.paths.push_back (dentry->d_name); - rep.space += statbuf.st_size; - } - - closedir (dead); - - } - - return 0; -} - -void -Session::set_dirty () -{ - bool was_dirty = dirty(); - - _state_of_the_state = StateOfTheState (_state_of_the_state | Dirty); - - - if (!was_dirty) { - DirtyChanged(); /* EMIT SIGNAL */ - } -} - - -void -Session::set_clean () -{ - bool was_dirty = dirty(); - - _state_of_the_state = Clean; - - - if (was_dirty) { - DirtyChanged(); /* EMIT SIGNAL */ - } -} - -void -Session::set_deletion_in_progress () -{ - _state_of_the_state = StateOfTheState (_state_of_the_state | Deletion); - -} - -void -Session::add_controllable (boost::shared_ptr c) -{ - /* this adds a controllable to the list managed by the Session. - this is a subset of those managed by the Controllable class - itself, and represents the only ones whose state will be saved - as part of the session. - */ - - Glib::Mutex::Lock lm (controllables_lock); - controllables.insert (c); -} - -struct null_deleter { void operator()(void const *) const {} }; - -void -Session::remove_controllable (Controllable* c) -{ - if (_state_of_the_state | Deletion) { - return; - } - - Glib::Mutex::Lock lm (controllables_lock); - - Controllables::iterator x = controllables.find( - boost::shared_ptr(c, null_deleter())); - - if (x != controllables.end()) { - controllables.erase (x); - } -} - -boost::shared_ptr -Session::controllable_by_id (const PBD::ID& id) -{ - Glib::Mutex::Lock lm (controllables_lock); - - for (Controllables::iterator i = controllables.begin(); i != controllables.end(); ++i) { - if ((*i)->id() == id) { - return *i; - } - } - - return boost::shared_ptr(); -} - -void -Session::add_instant_xml (XMLNode& node) -{ - Stateful::add_instant_xml (node, _path); - Config->add_instant_xml (node); -} - -XMLNode* -Session::instant_xml (const string& node_name) -{ - return Stateful::instant_xml (node_name, _path); -} - -int -Session::save_history (string snapshot_name) -{ - XMLTree tree; - - if (snapshot_name.empty()) { - snapshot_name = _current_snapshot_name; - } - - const string history_filename = snapshot_name + history_suffix; - const string backup_filename = history_filename + backup_suffix; - const sys::path xml_path = _session_dir->root_path() / history_filename; - const sys::path backup_path = _session_dir->root_path() / backup_filename; - - if (sys::exists (xml_path)) { - try - { - sys::rename (xml_path, backup_path); - } - catch (const sys::filesystem_error& err) - { - error << _("could not backup old history file, current history not saved") << endmsg; - return -1; - } - } - - - if (!Config->get_save_history() || Config->get_saved_history_depth() < 0) { - return 0; - } - - tree.set_root (&_history.get_state (Config->get_saved_history_depth())); - - if (!tree.write (xml_path.to_string())) - { - error << string_compose (_("history could not be saved to %1"), xml_path.to_string()) << endmsg; - - try - { - sys::remove (xml_path); - sys::rename (backup_path, xml_path); - } - catch (const sys::filesystem_error& err) - { - error << string_compose (_("could not restore history file from backup %1 (%2)"), - backup_path.to_string(), err.what()) << endmsg; - } - - return -1; - } - - return 0; -} - -int -Session::restore_history (string snapshot_name) -{ - XMLTree tree; - - if (snapshot_name.empty()) { - snapshot_name = _current_snapshot_name; - } - - const string xml_filename = snapshot_name + history_suffix; - const sys::path xml_path = _session_dir->root_path() / xml_filename; - - cerr << "Loading history from " << xml_path.to_string() << endmsg; - - if (!sys::exists (xml_path)) { - info << string_compose (_("%1: no history file \"%2\" for this session."), - _name, xml_path.to_string()) << endmsg; - return 1; - } - - if (!tree.read (xml_path.to_string())) { - error << string_compose (_("Could not understand session history file \"%1\""), - xml_path.to_string()) << endmsg; - return -1; - } - - // replace history - _history.clear(); - - for (XMLNodeConstIterator it = tree.root()->children().begin(); it != tree.root()->children().end(); it++) { - - XMLNode *t = *it; - UndoTransaction* ut = new UndoTransaction (); - struct timeval tv; - - ut->set_name(t->property("name")->value()); - stringstream ss(t->property("tv_sec")->value()); - ss >> tv.tv_sec; - ss.str(t->property("tv_usec")->value()); - ss >> tv.tv_usec; - ut->set_timestamp(tv); - - for (XMLNodeConstIterator child_it = t->children().begin(); - child_it != t->children().end(); - child_it++) - { - XMLNode *n = *child_it; - Command *c; - - if (n->name() == "MementoCommand" || - n->name() == "MementoUndoCommand" || - n->name() == "MementoRedoCommand") { - - if ((c = memento_command_factory(n))) { - ut->add_command(c); - } - - } else if (n->name() == X_("GlobalRouteStateCommand")) { - - if ((c = global_state_command_factory (*n))) { - ut->add_command (c); - } - - } else if (n->name() == "DeltaCommand") { - PBD::ID id(n->property("midi_source")->value()); - boost::shared_ptr midi_source = - boost::dynamic_pointer_cast(source_by_id(id)); - if(midi_source) { - ut->add_command(new MidiModel::DeltaCommand(midi_source->model(), *n)); - } else { - error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg; - } - } else { - error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg; - } - } - - _history.add (ut); - } - - return 0; -} - -void -Session::config_changed (const char* parameter_name) -{ -#define PARAM_IS(x) (!strcmp (parameter_name, (x))) - - if (PARAM_IS ("seamless-loop")) { - - } else if (PARAM_IS ("rf-speed")) { - - } else if (PARAM_IS ("auto-loop")) { - - } else if (PARAM_IS ("auto-input")) { - - if (Config->get_monitoring_model() == HardwareMonitoring && transport_rolling()) { - /* auto-input only makes a difference if we're rolling */ - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - (*i)->monitor_input (!Config->get_auto_input()); - } - } - } - - } else if (PARAM_IS ("punch-in")) { - - Location* location; - - if ((location = _locations.auto_punch_location()) != 0) { - - if (Config->get_punch_in ()) { - replace_event (Event::PunchIn, location->start()); - } else { - remove_event (location->start(), Event::PunchIn); - } - } - - } else if (PARAM_IS ("punch-out")) { - - Location* location; - - if ((location = _locations.auto_punch_location()) != 0) { - - if (Config->get_punch_out()) { - replace_event (Event::PunchOut, location->end()); - } else { - clear_events (Event::PunchOut); - } - } - - } else if (PARAM_IS ("edit-mode")) { - - Glib::Mutex::Lock lm (playlist_lock); - - for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - (*i)->set_edit_mode (Config->get_edit_mode ()); - } - - } else if (PARAM_IS ("use-video-sync")) { - - waiting_for_sync_offset = Config->get_use_video_sync(); - - } else if (PARAM_IS ("mmc-control")) { - - //poke_midi_thread (); - - } else if (PARAM_IS ("mmc-device-id") || PARAM_IS ("mmc-receive-id")) { - - if (mmc) { - mmc->set_receive_device_id (Config->get_mmc_receive_device_id()); - } - - } else if (PARAM_IS ("mmc-send-id")) { - - if (mmc) { - mmc->set_send_device_id (Config->get_mmc_send_device_id()); - } - - } else if (PARAM_IS ("midi-control")) { - - //poke_midi_thread (); - - } else if (PARAM_IS ("raid-path")) { - - setup_raid_path (Config->get_raid_path()); - - } else if (PARAM_IS ("smpte-format")) { - - sync_time_vars (); - - } else if (PARAM_IS ("video-pullup")) { - - sync_time_vars (); - - } else if (PARAM_IS ("seamless-loop")) { - - if (play_loop && transport_rolling()) { - // to reset diskstreams etc - request_play_loop (true); - } - - } else if (PARAM_IS ("rf-speed")) { - - cumulative_rf_motion = 0; - reset_rf_scale (0); - - } else if (PARAM_IS ("click-sound")) { - - setup_click_sounds (1); - - } else if (PARAM_IS ("click-emphasis-sound")) { - - setup_click_sounds (-1); - - } else if (PARAM_IS ("clicking")) { - - if (Config->get_clicking()) { - if (_click_io && click_data) { // don't require emphasis data - _clicking = true; - } - } else { - _clicking = false; - } - - } else if (PARAM_IS ("send-mtc")) { - - /* only set the internal flag if we have - a port. - */ - - if (_mtc_port != 0) { - session_send_mtc = Config->get_send_mtc(); - if (session_send_mtc) { - /* mark us ready to send */ - next_quarter_frame_to_send = 0; - } - } else { - session_send_mtc = false; - } - - } else if (PARAM_IS ("send-mmc")) { - - /* only set the internal flag if we have - a port. - */ - - if (_mmc_port != 0) { - session_send_mmc = Config->get_send_mmc(); - } else { - mmc = 0; - session_send_mmc = false; - } - - } else if (PARAM_IS ("midi-feedback")) { - - /* only set the internal flag if we have - a port. - */ - - if (_mtc_port != 0) { - session_midi_feedback = Config->get_midi_feedback(); - } - - } else if (PARAM_IS ("jack-time-master")) { - - engine().reset_timebase (); - - } else if (PARAM_IS ("native-file-header-format")) { - - if (!first_file_header_format_reset) { - reset_native_file_format (); - } - - first_file_header_format_reset = false; - - } else if (PARAM_IS ("native-file-data-format")) { - - if (!first_file_data_format_reset) { - reset_native_file_format (); - } - - first_file_data_format_reset = false; - - } else if (PARAM_IS ("slave-source")) { - set_slave_source (Config->get_slave_source()); - } else if (PARAM_IS ("remote-model")) { - set_remote_control_ids (); - } else if (PARAM_IS ("denormal-model")) { - setup_fpu (); - } else if (PARAM_IS ("history-depth")) { - set_history_depth (Config->get_history_depth()); - } else if (PARAM_IS ("sync-all-route-ordering")) { - sync_order_keys (); - } - - set_dirty (); - -#undef PARAM_IS - -} - -void -Session::set_history_depth (uint32_t d) -{ - _history.set_depth (d); -} diff --git a/libs/ardour/session_state_utils.cc b/libs/ardour/session_state_utils.cc deleted file mode 100644 index e57dce039e..0000000000 --- a/libs/ardour/session_state_utils.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include - -#include -#include -#include - -#include -#include - -#include "i18n.h" - -namespace ARDOUR { - -bool -create_backup_file (const sys::path & file_path) -{ - if (!sys::exists (file_path)) return false; - - sys::path backup_path(file_path.to_string() + backup_suffix); - - try - { - sys::copy_file (file_path, backup_path); - } - catch(sys::filesystem_error& ex) - { - error << string_compose (_("Unable to create a backup copy of file %1 (%2)"), - file_path.to_string(), ex.what()) - << endmsg; - return false; - } - return true; -} - -void -get_state_files_in_directory (const sys::path & directory_path, - vector & result) -{ - Glib::PatternSpec state_file_pattern('*' + string(statefile_suffix)); - - find_matching_files_in_directory (directory_path, state_file_pattern, - result); -} - -vector -get_file_names_no_extension (const vector & file_paths) -{ - vector result; - - std::transform (file_paths.begin(), file_paths.end(), - std::back_inserter(result), sys::basename); - - sort (result.begin(), result.end(), std::less()); - - return result; -} - -} // namespace ARDOUR diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc deleted file mode 100644 index a388e31d80..0000000000 --- a/libs/ardour/session_time.cc +++ /dev/null @@ -1,606 +0,0 @@ - -/* - Copyright (C) 1999-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace PBD; - -/* BBT TIME*/ - -void -Session::bbt_time (nframes_t when, BBT_Time& bbt) -{ - _tempo_map->bbt_time (when, bbt); -} - -/* SMPTE TIME */ -float -Session::smpte_frames_per_second() const -{ - switch (Config->get_smpte_format()) { - case smpte_23976: - return 23.976; - - break; - case smpte_24: - return 24; - - break; - case smpte_24976: - return 24.976; - - break; - case smpte_25: - return 25; - - break; - case smpte_2997: - return 29.97; - - break; - case smpte_2997drop: - return 29.97; - - break; - case smpte_30: - return 30; - - break; - case smpte_30drop: - return 30; - - break; - case smpte_5994: - return 59.94; - - break; - case smpte_60: - return 60; - - break; - default: - cerr << "Editor received unexpected smpte type" << endl; - } - return 30.0; -} -bool -Session::smpte_drop_frames() const -{ - switch (Config->get_smpte_format()) { - case smpte_23976: - return false; - - break; - case smpte_24: - return false; - - break; - case smpte_24976: - return false; - - break; - case smpte_25: - return false; - - break; - case smpte_2997: - return false; - - break; - case smpte_2997drop: - return true; - - break; - case smpte_30: - return false; - - break; - case smpte_30drop: - return true; - - break; - case smpte_5994: - return false; - - break; - case smpte_60: - return false; - - break; - default: - cerr << "Editor received unexpected smpte type" << endl; - } - return false; -} -void -Session::sync_time_vars () -{ - _current_frame_rate = (nframes_t) round (_base_frame_rate * (1.0 + (Config->get_video_pullup()/100.0))); - _frames_per_smpte_frame = (double) _current_frame_rate / (double) smpte_frames_per_second(); - if (smpte_drop_frames()) { - _frames_per_hour = (long)(107892 * _frames_per_smpte_frame); - } else { - _frames_per_hour = (long)(3600 * rint(smpte_frames_per_second()) * _frames_per_smpte_frame); - } - _smpte_frames_per_hour = (nframes_t)rint(smpte_frames_per_second() * 3600.0); - - last_smpte_valid = false; - // smpte type bits are the middle two in the upper nibble - switch ((int) ceil (smpte_frames_per_second())) { - case 24: - mtc_smpte_bits = 0; - break; - - case 25: - mtc_smpte_bits = 0x20; - break; - - case 30: - default: - if (smpte_drop_frames()) { - mtc_smpte_bits = 0x40; - } else { - mtc_smpte_bits = 0x60; - } - break; - }; -} - -int -Session::set_smpte_format (SmpteFormat format) -{ - /* this will trigger any other changes needed */ - Config->set_smpte_format (format); - return 0; -} - -void -Session::set_smpte_offset (nframes_t off) -{ - _smpte_offset = off; - last_smpte_valid = false; - - SMPTEOffsetChanged (); /* EMIT SIGNAL */ -} - -void -Session::set_smpte_offset_negative (bool neg) -{ - _smpte_offset_negative = neg; - last_smpte_valid = false; - - SMPTEOffsetChanged (); /* EMIT SIGNAL */ -} - -void -Session::smpte_to_sample( SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes ) const -{ - - if (smpte.drop) { - // The drop frame format was created to better approximate the 30000/1001 = 29.97002997002997.... - // framerate of NTSC color TV. The used frame rate of drop frame is 29.97, which drifts by about - // 0.108 frame per hour, or about 1.3 frames per 12 hours. This is not perfect, but a lot better - // than using 30 non drop, which will drift with about 1.8 frame per minute. - // Using 29.97, drop frame real time can be accurate only every 10th minute (10 minutes of 29.97 fps - // is exactly 17982 frames). One minute is 1798.2 frames, but we count 30 frames per second - // (30 * 60 = 1800). This means that at the first minute boundary (at the end of 0:0:59:29) we - // are 1.8 frames too late relative to real time. By dropping 2 frames (jumping to 0:1:0:2) we are - // approx. 0.2 frames too early. This adds up with 0.2 too early for each minute until we are 1.8 - // frames too early at 0:9:0:2 (9 * 0.2 = 1.8). The 10th minute brings us 1.8 frames later again - // (at end of 0:9:59:29), which sums up to 0 (we are back to zero at 0:10:0:0 :-). - // - // In table form: - // - // SMPTE value frames offset subframes offset seconds (rounded) 44100 sample (rounded) - // 0:00:00:00 0.0 0 0.000 0 (accurate) - // 0:00:59:29 1.8 144 60.027 2647177 - // 0:01:00:02 -0.2 -16 60.060 2648648 - // 0:01:59:29 1.6 128 120.020 5292883 - // 0:02:00:02 -0.4 -32 120.053 5294354 - // 0:02:59:29 1.4 112 180.013 7938588 - // 0:03:00:02 -0.6 -48 180.047 7940060 - // 0:03:59:29 1.2 96 240.007 10584294 - // 0:04:00:02 -0.8 -64 240.040 10585766 - // 0:04:59:29 1.0 80 300.000 13230000 - // 0:05:00:02 -1.0 -80 300.033 13231471 - // 0:05:59:29 0.8 64 359.993 15875706 - // 0:06:00:02 -1.2 -96 360.027 15877177 - // 0:06:59:29 0.6 48 419.987 18521411 - // 0:07:00:02 -1.4 -112 420.020 18522883 - // 0:07:59:29 0.4 32 478.980 21167117 - // 0:08:00:02 -1.6 -128 480.013 21168589 - // 0:08:59:29 0.2 16 539.973 23812823 - // 0:09:00:02 -1.8 -144 540.007 23814294 - // 0:09:59:29 0.0+ 0+ 599.967 26458529 - // 0:10:00:00 0.0 0 600.000 26460000 (accurate) - // - // Per Sigmond - - // Samples inside time dividable by 10 minutes (real time accurate) - nframes_t base_samples = (nframes_t) (((smpte.hours * 107892) + ((smpte.minutes / 10) * 17982)) * _frames_per_smpte_frame); - - // Samples inside time exceeding the nearest 10 minutes (always offset, see above) - long exceeding_df_minutes = smpte.minutes % 10; - long exceeding_df_seconds = (exceeding_df_minutes * 60) + smpte.seconds; - long exceeding_df_frames = (30 * exceeding_df_seconds) + smpte.frames - (2 * exceeding_df_minutes); - nframes_t exceeding_samples = (nframes_t) rint(exceeding_df_frames * _frames_per_smpte_frame); - sample = base_samples + exceeding_samples; - } else { - /* - Non drop is easy.. just note the use of - rint(smpte.rate) * _frames_per_smpte_frame - (frames per SMPTE second), which is larger than - frame_rate() in the non-integer SMPTE rate case. - */ - - sample = (nframes_t)rint((((smpte.hours * 60 * 60) + (smpte.minutes * 60) + smpte.seconds) * (rint(smpte.rate) * _frames_per_smpte_frame)) + (smpte.frames * _frames_per_smpte_frame)); - } - - if (use_subframes) { - sample += (long) (((double)smpte.subframes * _frames_per_smpte_frame) / Config->get_subframes_per_frame()); - } - - if (use_offset) { - if (smpte_offset_negative()) { - if (sample >= smpte_offset()) { - sample -= smpte_offset(); - } else { - /* Prevent song-time from becoming negative */ - sample = 0; - } - } else { - if (smpte.negative) { - if (sample <= smpte_offset()) { - sample = smpte_offset() - sample; - } else { - sample = 0; - } - } else { - sample += smpte_offset(); - } - } - } - -} - - -void -Session::sample_to_smpte( nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const -{ - nframes_t offset_sample; - - if (!use_offset) { - offset_sample = sample; - smpte.negative = false; - } else { - if (_smpte_offset_negative) { - offset_sample = sample + _smpte_offset; - smpte.negative = false; - } else { - if (sample < _smpte_offset) { - offset_sample = (_smpte_offset - sample); - smpte.negative = true; - } else { - offset_sample = sample - _smpte_offset; - smpte.negative = false; - } - } - } - - double smpte_frames_left_exact; - double smpte_frames_fraction; - unsigned long smpte_frames_left; - - // Extract whole hours. Do this to prevent rounding errors with - // high sample numbers in the calculations that follow. - smpte.hours = offset_sample / _frames_per_hour; - offset_sample = offset_sample % _frames_per_hour; - - // Calculate exact number of (exceeding) smpte frames and fractional frames - smpte_frames_left_exact = (double) offset_sample / _frames_per_smpte_frame; - smpte_frames_fraction = smpte_frames_left_exact - floor( smpte_frames_left_exact ); - smpte.subframes = (long) rint(smpte_frames_fraction * Config->get_subframes_per_frame()); - - // XXX Not sure if this is necessary anymore... - if (smpte.subframes == Config->get_subframes_per_frame()) { - // This can happen with 24 fps (and 29.97 fps ?) - smpte_frames_left_exact = ceil( smpte_frames_left_exact ); - smpte.subframes = 0; - } - - // Extract hour-exceeding frames for minute, second and frame calculations - smpte_frames_left = ((long) floor( smpte_frames_left_exact )); - - if (smpte_drop_frames()) { - // See long explanation in smpte_to_sample()... - - // Number of 10 minute chunks - smpte.minutes = (smpte_frames_left / 17982) * 10; // exactly 17982 frames in 10 minutes - // frames exceeding the nearest 10 minute barrier - long exceeding_df_frames = smpte_frames_left % 17982; - - // Find minutes exceeding the nearest 10 minute barrier - if (exceeding_df_frames >= 1800) { // nothing to do if we are inside the first minute (0-1799) - exceeding_df_frames -= 1800; // take away first minute (different number of frames than the others) - long extra_minutes_minus_1 = exceeding_df_frames / 1798; // how many minutes after the first one - exceeding_df_frames -= extra_minutes_minus_1 * 1798; // take away the (extra) minutes just found - smpte.minutes += extra_minutes_minus_1 + 1; // update with exceeding minutes - } - - // Adjust frame numbering for dropped frames (frame 0 and 1 skipped at start of every minute except every 10th) - if (smpte.minutes % 10) { - // Every minute except every 10th - if (exceeding_df_frames < 28) { - // First second, frames 0 and 1 are skipped - smpte.seconds = 0; - smpte.frames = exceeding_df_frames + 2; - } else { - // All other seconds, all 30 frames are counted - exceeding_df_frames -= 28; - smpte.seconds = (exceeding_df_frames / 30) + 1; - smpte.frames = exceeding_df_frames % 30; - } - } else { - // Every 10th minute, all 30 frames counted in all seconds - smpte.seconds = exceeding_df_frames / 30; - smpte.frames = exceeding_df_frames % 30; - } - } else { - // Non drop is easy - smpte.minutes = smpte_frames_left / ((long) rint (smpte_frames_per_second ()) * 60); - smpte_frames_left = smpte_frames_left % ((long) rint (smpte_frames_per_second ()) * 60); - smpte.seconds = smpte_frames_left / (long) rint(smpte_frames_per_second ()); - smpte.frames = smpte_frames_left % (long) rint(smpte_frames_per_second ()); - } - - if (!use_subframes) { - smpte.subframes = 0; - } - /* set frame rate and drop frame */ - smpte.rate = smpte_frames_per_second (); - smpte.drop = smpte_drop_frames(); -} - -void -Session::smpte_time (nframes_t when, SMPTE::Time& smpte) -{ - if (last_smpte_valid && when == last_smpte_when) { - smpte = last_smpte; - return; - } - - sample_to_smpte( when, smpte, true /* use_offset */, false /* use_subframes */ ); - - last_smpte_when = when; - last_smpte = smpte; - last_smpte_valid = true; -} - -void -Session::smpte_time_subframes (nframes_t when, SMPTE::Time& smpte) -{ - if (last_smpte_valid && when == last_smpte_when) { - smpte = last_smpte; - return; - } - - sample_to_smpte( when, smpte, true /* use_offset */, true /* use_subframes */ ); - - last_smpte_when = when; - last_smpte = smpte; - last_smpte_valid = true; -} - -void -Session::smpte_duration (nframes_t when, SMPTE::Time& smpte) const -{ - sample_to_smpte( when, smpte, false /* use_offset */, true /* use_subframes */ ); -} - -void -Session::smpte_duration_string (char* buf, nframes_t when) const -{ - SMPTE::Time smpte; - - smpte_duration (when, smpte); - snprintf (buf, sizeof (buf), "%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames); -} - -void -Session::smpte_time (SMPTE::Time &t) - -{ - smpte_time (_transport_frame, t); -} - -int -Session::jack_sync_callback (jack_transport_state_t state, - jack_position_t* pos) -{ - bool slave = synced_to_jack(); - - switch (state) { - case JackTransportStopped: - if (slave && _transport_frame != pos->frame && post_transport_work == 0) { - request_locate (pos->frame, false); - // cerr << "SYNC: stopped, locate to " << pos->frame << " from " << _transport_frame << endl; - return false; - } else { - return true; - } - - case JackTransportStarting: - // cerr << "SYNC: starting @ " << pos->frame << " a@ " << _transport_frame << " our work = " << post_transport_work << " pos matches ? " << (_transport_frame == pos->frame) << endl; - if (slave) { - return _transport_frame == pos->frame && post_transport_work == 0; - } else { - return true; - } - break; - - case JackTransportRolling: - // cerr << "SYNC: rolling slave = " << slave << endl; - if (slave) { - start_transport (); - } - break; - - default: - error << string_compose (_("Unknown JACK transport state %1 in sync callback"), state) - << endmsg; - } - - return true; -} - -void -Session::jack_timebase_callback (jack_transport_state_t state, - nframes_t nframes, - jack_position_t* pos, - int new_position) -{ - BBT_Time bbt; - - /* frame info */ - - pos->frame = _transport_frame; - pos->valid = JackPositionTimecode; - - /* BBT info */ - - if (_tempo_map) { - - TempoMap::Metric metric (_tempo_map->metric_at (_transport_frame)); - _tempo_map->bbt_time_with_metric (_transport_frame, bbt, metric); - - pos->bar = bbt.bars; - pos->beat = bbt.beats; - pos->tick = bbt.ticks; - - // XXX still need to set bar_start_tick - - pos->beats_per_bar = metric.meter().beats_per_bar(); - pos->beat_type = metric.meter().note_divisor(); - pos->ticks_per_beat = Meter::ticks_per_beat; - pos->beats_per_minute = metric.tempo().beats_per_minute(); - - pos->valid = jack_position_bits_t (pos->valid | JackPositionBBT); - } - -#ifdef HAVE_JACK_VIDEO_SUPPORT - //poke audio video ratio so Ardour can track Video Sync - pos->audio_frames_per_video_frame = frame_rate() / smpte_frames_per_second(); - pos->valid = jack_position_bits_t (pos->valid | JackAudioVideoRatio); -#endif - -#if 0 - /* SMPTE info */ - - t.smpte_offset = _smpte_offset; - t.smpte_frame_rate = smpte_frames_per_second(); - - if (_transport_speed) { - - if (play_loop) { - - Location* location = _locations.auto_loop_location(); - - if (location) { - - t.transport_state = JackTransportLooping; - t.loop_start = location->start(); - t.loop_end = location->end(); - t.valid = jack_transport_bits_t (t.valid | JackTransportLoop); - - } else { - - t.loop_start = 0; - t.loop_end = 0; - t.transport_state = JackTransportRolling; - - } - - } else { - - t.loop_start = 0; - t.loop_end = 0; - t.transport_state = JackTransportRolling; - - } - - } - -#endif -} - -ARDOUR::nframes_t -Session::convert_to_frames_at (nframes_t position, AnyTime& any) -{ - double secs; - - switch (any.type) { - case AnyTime::BBT: - return _tempo_map->frame_time ( any.bbt); - break; - - case AnyTime::SMPTE: - /* XXX need to handle negative values */ - secs = any.smpte.hours * 60 * 60; - secs += any.smpte.minutes * 60; - secs += any.smpte.seconds; - secs += any.smpte.frames / smpte_frames_per_second(); - if (_smpte_offset_negative) - { - return (nframes_t) floor (secs * frame_rate()) - _smpte_offset; - } - else - { - return (nframes_t) floor (secs * frame_rate()) + _smpte_offset; - } - break; - - case AnyTime::Seconds: - return (nframes_t) floor (any.seconds * frame_rate()); - break; - - case AnyTime::Frames: - return any.frames; - break; - } - - return any.frames; -} diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc deleted file mode 100644 index c86a868e56..0000000000 --- a/libs/ardour/session_transport.cc +++ /dev/null @@ -1,1355 +0,0 @@ -/* - Copyright (C) 1999-2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace sigc; -using namespace PBD; - -void -Session::request_input_change_handling () -{ - if (!(_state_of_the_state & (InitialConnecting|Deletion))) { - Event* ev = new Event (Event::InputConfigurationChange, Event::Add, Event::Immediate, 0, 0.0); - queue_event (ev); - } -} - -void -Session::request_slave_source (SlaveSource src) -{ - Event* ev = new Event (Event::SetSlaveSource, Event::Add, Event::Immediate, 0, 0.0); - - if (src == JACK) { - /* could set_seamless_loop() be disposed of entirely?*/ - Config->set_seamless_loop (false); - } else { - Config->set_seamless_loop (true); - } - ev->slave = src; - queue_event (ev); -} - -void -Session::request_transport_speed (float speed) -{ - Event* ev = new Event (Event::SetTransportSpeed, Event::Add, Event::Immediate, 0, speed); - queue_event (ev); -} - -void -Session::request_diskstream_speed (Diskstream& ds, float speed) -{ - Event* ev = new Event (Event::SetDiskstreamSpeed, Event::Add, Event::Immediate, 0, speed); - ev->set_ptr (&ds); - queue_event (ev); -} - -void -Session::request_stop (bool abort) -{ - Event* ev = new Event (Event::SetTransportSpeed, Event::Add, Event::Immediate, 0, 0.0, abort); - queue_event (ev); -} - -void -Session::request_locate (nframes_t target_frame, bool with_roll) -{ - Event *ev = new Event (with_roll ? Event::LocateRoll : Event::Locate, Event::Add, Event::Immediate, target_frame, 0, false); - queue_event (ev); -} - -void -Session::force_locate (nframes_t target_frame, bool with_roll) -{ - Event *ev = new Event (with_roll ? Event::LocateRoll : Event::Locate, Event::Add, Event::Immediate, target_frame, 0, true); - queue_event (ev); -} - -void -Session::request_play_loop (bool yn) -{ - Event* ev; - Location *location = _locations.auto_loop_location(); - - if (location == 0 && yn) { - error << _("Cannot loop - no loop range defined") - << endmsg; - return; - } - - ev = new Event (Event::SetLoop, Event::Add, Event::Immediate, 0, 0.0, yn); - queue_event (ev); - - if (!yn && Config->get_seamless_loop() && transport_rolling()) { - // request an immediate locate to refresh the diskstreams - // after disabling looping - request_locate (_transport_frame-1, false); - } -} - -void -Session::realtime_stop (bool abort) -{ - /* assume that when we start, we'll be moving forwards */ - - // FIXME: where should this really be? [DR] - //send_full_time_code(); - deliver_mmc (MIDI::MachineControl::cmdStop, _transport_frame); - deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame); - - if (_transport_speed < 0.0f) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportStop | PostTransportReverse); - } else { - post_transport_work = PostTransportWork (post_transport_work | PostTransportStop); - } - - if (actively_recording()) { - - /* move the transport position back to where the - request for a stop was noticed. we rolled - past that point to pick up delayed input. - */ - -#ifndef LEAVE_TRANSPORT_UNADJUSTED - decrement_transport_position (_worst_output_latency); -#endif - - /* the duration change is not guaranteed to have happened, but is likely */ - - post_transport_work = PostTransportWork (post_transport_work | PostTransportDuration); - } - - if (abort) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportAbort); - } - - _clear_event_type (Event::StopOnce); - _clear_event_type (Event::RangeStop); - _clear_event_type (Event::RangeLocate); - - disable_record (true); - - reset_slave_state (); - - _transport_speed = 0; - - if (Config->get_use_video_sync()) { - waiting_for_sync_offset = true; - } - - transport_sub_state = ((Config->get_slave_source() == None && Config->get_auto_return()) ? AutoReturning : 0); -} - -void -Session::butler_transport_work () -{ - restart: - bool finished; - boost::shared_ptr r = routes.reader (); - boost::shared_ptr dsl = diskstreams.reader(); - - int on_entry = g_atomic_int_get (&butler_should_do_transport_work); - finished = true; - - if (post_transport_work & PostTransportCurveRealloc) { - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->curve_reallocate(); - } - } - - if (post_transport_work & PostTransportInputChange) { - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->non_realtime_input_change (); - } - } - - if (post_transport_work & PostTransportSpeed) { - non_realtime_set_speed (); - } - - if (post_transport_work & PostTransportReverse) { - - - clear_clicks(); - cumulative_rf_motion = 0; - reset_rf_scale (0); - - /* don't seek if locate will take care of that in non_realtime_stop() */ - - if (!(post_transport_work & PostTransportLocate)) { - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - if ((*i)->speed() != 1.0f || (*i)->speed() != -1.0f) { - (*i)->seek ((nframes_t) (_transport_frame * (double) (*i)->speed())); - } - else { - (*i)->seek (_transport_frame); - } - } - if (on_entry != g_atomic_int_get (&butler_should_do_transport_work)) { - /* new request, stop seeking, and start again */ - g_atomic_int_dec_and_test (&butler_should_do_transport_work); - goto restart; - } - } - } - } - - if (post_transport_work & PostTransportLocate) { - non_realtime_locate (); - } - - if (post_transport_work & PostTransportStop) { - non_realtime_stop (post_transport_work & PostTransportAbort, on_entry, finished); - if (!finished) { - g_atomic_int_dec_and_test (&butler_should_do_transport_work); - goto restart; - } - } - - if (post_transport_work & PostTransportOverWrite) { - non_realtime_overwrite (on_entry, finished); - if (!finished) { - g_atomic_int_dec_and_test (&butler_should_do_transport_work); - goto restart; - } - } - - if (post_transport_work & PostTransportAudition) { - non_realtime_set_audition (); - } - - g_atomic_int_dec_and_test (&butler_should_do_transport_work); -} - -void -Session::non_realtime_set_speed () -{ - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->non_realtime_set_speed (); - } -} - -void -Session::non_realtime_overwrite (int on_entry, bool& finished) -{ - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->pending_overwrite) { - (*i)->overwrite_existing_buffers (); - } - if (on_entry != g_atomic_int_get (&butler_should_do_transport_work)) { - finished = false; - return; - } - } -} - - -void -Session::non_realtime_locate () -{ - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->non_realtime_locate (_transport_frame); - } -} - - -void -Session::non_realtime_stop (bool abort, int on_entry, bool& finished) -{ - struct tm* now; - time_t xnow; - bool did_record; - bool saved; - - did_record = false; - saved = false; - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->get_captured_frames () != 0) { - did_record = true; - break; - } - } - - /* stop and locate are merged here because they share a lot of common stuff */ - - time (&xnow); - now = localtime (&xnow); - - if (auditioner) { - auditioner->cancel_audition (); - } - - clear_clicks(); - cumulative_rf_motion = 0; - reset_rf_scale (0); - - if (did_record) { - begin_reversible_command ("capture"); - - Location* loc = _locations.end_location(); - bool change_end = false; - - if (_transport_frame < loc->end()) { - - /* stopped recording before current end */ - - if (_end_location_is_free) { - - /* first capture for this session, move end back to where we are */ - - change_end = true; - } - - } else if (_transport_frame > loc->end()) { - - /* stopped recording after the current end, extend it */ - - change_end = true; - } - - if (change_end) { - XMLNode &before = loc->get_state(); - loc->set_end(_transport_frame); - XMLNode &after = loc->get_state(); - add_command (new MementoCommand(*loc, &before, &after)); - } - - _end_location_is_free = false; - _have_captured = true; - } - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->transport_stopped (*now, xnow, abort); - } - - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { - (*i)->set_pending_declick (0); - } - } - - if (did_record) { - commit_reversible_command (); - } - - if (_engine.running()) { - update_latency_compensation (true, abort); - } - - if ((Config->get_slave_source() == None && Config->get_auto_return()) || - (post_transport_work & PostTransportLocate) || - (_requested_return_frame >= 0) || - synced_to_jack()) { - - if (pending_locate_flush) { - flush_all_inserts (); - } - - if (((Config->get_slave_source() == None && Config->get_auto_return()) || - synced_to_jack() || - _requested_return_frame >= 0) && - !(post_transport_work & PostTransportLocate)) { - - bool do_locate = false; - - if (_requested_return_frame >= 0) { - _transport_frame = _requested_return_frame; - _requested_return_frame = -1; - do_locate = true; - } else { - _transport_frame = last_stop_frame; - _requested_return_frame = -1; - } - - if (synced_to_jack() && !play_loop) { - do_locate = true; - } - - if (do_locate) { - // cerr << "non-realtimestop: transport locate to " << _transport_frame << endl; - _engine.transport_locate (_transport_frame); - } - } - -#ifndef LEAVE_TRANSPORT_UNADJUSTED - } -#endif - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - if ((*i)->speed() != 1.0f || (*i)->speed() != -1.0f) { - (*i)->seek ((nframes_t) (_transport_frame * (double) (*i)->speed())); - } - else { - (*i)->seek (_transport_frame); - } - } - if (on_entry != g_atomic_int_get (&butler_should_do_transport_work)) { - finished = false; - /* we will be back */ - return; - } - } - -#ifdef LEAVE_TRANSPORT_UNADJUSTED - } -#endif - - if (_requested_return_frame < 0) { - last_stop_frame = _transport_frame; - } else { - last_stop_frame = _requested_return_frame; - _requested_return_frame = -1; - } - - if (did_record) { - - /* XXX its a little odd that we're doing this here - when realtime_stop(), which has already executed, - will have done this. - JLC - so let's not because it seems unnecessary and breaks loop record - */ -#if 0 - if (!Config->get_latched_record_enable()) { - g_atomic_int_set (&_record_status, Disabled); - } else { - g_atomic_int_set (&_record_status, Enabled); - } - RecordStateChanged (); /* emit signal */ -#endif - } - - if ((post_transport_work & PostTransportLocate) && get_record_enabled()) { - /* capture start has been changed, so save pending state */ - save_state ("", true); - saved = true; - } - - /* always try to get rid of this */ - - remove_pending_capture_state (); - - /* save the current state of things if appropriate */ - - if (did_record && !saved) { - save_state (_current_snapshot_name); - } - - if (post_transport_work & PostTransportDuration) { - DurationChanged (); /* EMIT SIGNAL */ - } - - if (post_transport_work & PostTransportStop) { - _play_range = false; - - /* do not turn off autoloop on stop */ - - } - - nframes_t tf = _transport_frame; - - PositionChanged (tf); /* EMIT SIGNAL */ - TransportStateChange (); /* EMIT SIGNAL */ - - /* and start it up again if relevant */ - - if ((post_transport_work & PostTransportLocate) && Config->get_slave_source() == None && pending_locate_roll) { - request_transport_speed (1.0); - pending_locate_roll = false; - } -} - -void -Session::check_declick_out () -{ - bool locate_required = transport_sub_state & PendingLocate; - - /* this is called after a process() iteration. if PendingDeclickOut was set, - it means that we were waiting to declick the output (which has just been - done) before doing something else. this is where we do that "something else". - - note: called from the audio thread. - */ - - if (transport_sub_state & PendingDeclickOut) { - - if (locate_required) { - start_locate (pending_locate_frame, pending_locate_roll, pending_locate_flush); - transport_sub_state &= ~(PendingDeclickOut|PendingLocate); - } else { - stop_transport (pending_abort); - transport_sub_state &= ~(PendingDeclickOut|PendingLocate); - } - } -} - -void -Session::set_play_loop (bool yn) -{ - /* Called from event-handling context */ - - if ((actively_recording() && yn) || _locations.auto_loop_location() == 0) { - return; - } - - set_dirty(); - - if (yn && Config->get_seamless_loop() && synced_to_jack()) { - warning << _("Seamless looping cannot be supported while Ardour is using JACK transport.\n" - "Recommend changing the configured options") - << endmsg; - return; - } - - - if ((play_loop = yn)) { - - Location *loc; - - - if ((loc = _locations.auto_loop_location()) != 0) { - - if (Config->get_seamless_loop()) { - // set all diskstreams to use internal looping - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - (*i)->set_loop (loc); - } - } - } - else { - // set all diskstreams to NOT use internal looping - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - (*i)->set_loop (0); - } - } - } - - /* stick in the loop event */ - - Event* event = new Event (Event::AutoLoop, Event::Replace, loc->end(), loc->start(), 0.0f); - merge_event (event); - - /* locate to start of loop and roll if current pos is outside of the loop range */ - if (_transport_frame < loc->start() || _transport_frame > loc->end()) { - event = new Event (Event::LocateRoll, Event::Add, Event::Immediate, loc->start(), 0, !synced_to_jack()); - merge_event (event); - } - else { - // locate to current position (+ 1 to force reload) - event = new Event (Event::LocateRoll, Event::Add, Event::Immediate, _transport_frame + 1, 0, !synced_to_jack()); - merge_event (event); - } - } - - - - } else { - clear_events (Event::AutoLoop); - - // set all diskstreams to NOT use internal looping - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - (*i)->set_loop (0); - } - } - - } -} - -void -Session::flush_all_inserts () -{ - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->flush_processors (); - } -} - -void -Session::start_locate (nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop) -{ - if (synced_to_jack()) { - - float sp; - nframes_t pos; - - _slave->speed_and_position (sp, pos); - - if (target_frame != pos) { - - /* tell JACK to change transport position, and we will - follow along later in ::follow_slave() - */ - - _engine.transport_locate (target_frame); - - if (sp != 1.0f && with_roll) { - _engine.transport_start (); - } - - } - - } else { - - locate (target_frame, with_roll, with_flush, with_loop); - } -} - -void -Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool with_loop) -{ - if (actively_recording() && !with_loop) { - return; - } - - if (_transport_frame == target_frame && !loop_changing && !with_loop) { - if (with_roll) { - set_transport_speed (1.0, false); - } - loop_changing = false; - return; - } - - // Update SMPTE time - // [DR] FIXME: find out exactly where this should go below - _transport_frame = target_frame; - smpte_time(_transport_frame, transmitting_smpte_time); - outbound_mtc_smpte_frame = _transport_frame; - next_quarter_frame_to_send = 0; - - if (_transport_speed && (!with_loop || loop_changing)) { - /* schedule a declick. we'll be called again when its done */ - - if (!(transport_sub_state & PendingDeclickOut)) { - transport_sub_state |= (PendingDeclickOut|PendingLocate); - pending_locate_frame = target_frame; - pending_locate_roll = with_roll; - pending_locate_flush = with_flush; - return; - } - } - - if (transport_rolling() && (!auto_play_legal || !Config->get_auto_play()) && !with_roll && !(synced_to_jack() && play_loop)) { - realtime_stop (false); - } - - if ( !with_loop || loop_changing) { - - post_transport_work = PostTransportWork (post_transport_work | PostTransportLocate); - - if (with_roll) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportRoll); - } - - schedule_butler_transport_work (); - - } else { - - /* this is functionally what clear_clicks() does but with a tentative lock */ - - Glib::RWLock::WriterLock clickm (click_lock, Glib::TRY_LOCK); - - if (clickm.locked()) { - - for (Clicks::iterator i = clicks.begin(); i != clicks.end(); ++i) { - delete *i; - } - - clicks.clear (); - } - } - - if (with_roll) { - /* switch from input if we're going to roll */ - if (Config->get_monitoring_model() == HardwareMonitoring) { - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - //cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (!Config->get_auto_input()); - } - } - } - } else { - /* otherwise we're going to stop, so do the opposite */ - if (Config->get_monitoring_model() == HardwareMonitoring) { - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - //cerr << "switching to input" << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (true); - } - } - } - } - - /* cancel looped playback if transport pos outside of loop range */ - if (play_loop) { - Location* al = _locations.auto_loop_location(); - - if (al && (_transport_frame < al->start() || _transport_frame > al->end())) { - // cancel looping directly, this is called from event handling context - set_play_loop (false); - } - else if (al && _transport_frame == al->start()) { - if (with_loop) { - // this is only necessary for seamless looping - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - // tell it we've looped, so it can deal with the record state - (*i)->transport_looped(_transport_frame); - } - } - } - - TransportLooped(); // EMIT SIGNAL - } - } - - loop_changing = false; - - _send_smpte_update = true; -} - -/** Set the transport speed. - * @param speed New speed - * @param abort - */ -void -Session::set_transport_speed (float speed, bool abort) -{ - if (_transport_speed == speed) { - return; - } - - if (speed > 0) { - speed = min (8.0f, speed); - } else if (speed < 0) { - speed = max (-8.0f, speed); - } - - if (transport_rolling() && speed == 0.0) { - - /* we are rolling and we want to stop */ - - if (Config->get_monitoring_model() == HardwareMonitoring) - { - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->record_enabled ()) { - //cerr << "switching to input" << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (true); - } - } - } - - if (synced_to_jack ()) { - _engine.transport_stop (); - } else { - stop_transport (abort); - } - - } else if (transport_stopped() && speed == 1.0) { - - /* we are stopped and we want to start rolling at speed 1 */ - - if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) { - return; - } - - if (Config->get_monitoring_model() == HardwareMonitoring) { - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (Config->get_auto_input() && (*i)->record_enabled ()) { - //cerr << "switching from input" << __FILE__ << __LINE__ << endl << endl; - (*i)->monitor_input (false); - } - } - } - - if (synced_to_jack()) { - _engine.transport_start (); - } else { - start_transport (); - } - - } else { - - if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) { - return; - } - - if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) { - warning << _("Global varispeed cannot be supported while Ardour is connected to JACK transport control") - << endmsg; - return; - } - - if (actively_recording()) { - return; - } - - if (speed > 0.0f && _transport_frame == current_end_frame()) { - return; - } - - if (speed < 0.0f && _transport_frame == 0) { - return; - } - - clear_clicks (); - - /* if we are reversing relative to the current speed, or relative to the speed - before the last stop, then we have to do extra work. - */ - - if ((_transport_speed && speed * _transport_speed < 0.0f) || (_last_transport_speed * speed < 0.0f) || (_last_transport_speed == 0.0f && speed < 0.0f)) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportReverse); - } - - _last_transport_speed = _transport_speed; - _transport_speed = speed; - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if ((*i)->realtime_set_speed ((*i)->speed(), true)) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportSpeed); - } - } - - if (post_transport_work & (PostTransportSpeed|PostTransportReverse)) { - schedule_butler_transport_work (); - } - } -} - - -/** Stop the transport. */ -void -Session::stop_transport (bool abort) -{ - if (_transport_speed == 0.0f) { - return; - } - - if (actively_recording() && !(transport_sub_state & StopPendingCapture) && - _worst_output_latency > current_block_size) - { - - /* we need to capture the audio that has still not yet been received by the system - at the time the stop is requested, so we have to roll past that time. - - we want to declick before stopping, so schedule the autostop for one - block before the actual end. we'll declick in the subsequent block, - and then we'll really be stopped. - */ - - Event *ev = new Event (Event::StopOnce, Event::Replace, - _transport_frame + _worst_output_latency - current_block_size, - 0, 0, abort); - - merge_event (ev); - transport_sub_state |= StopPendingCapture; - pending_abort = abort; - return; - } - - - if ((transport_sub_state & PendingDeclickOut) == 0) { - transport_sub_state |= PendingDeclickOut; - /* we'll be called again after the declick */ - pending_abort = abort; - return; - } - - realtime_stop (abort); - schedule_butler_transport_work (); -} - -void -Session::start_transport () -{ - _last_roll_location = _transport_frame; - - /* if record status is Enabled, move it to Recording. if its - already Recording, move it to Disabled. - */ - - switch (record_status()) { - case Enabled: - if (!Config->get_punch_in()) { - enable_record (); - } - break; - - case Recording: - if (!play_loop) { - disable_record (false); - } - break; - - default: - break; - } - - if (!synced_to_jack() || _exporting) { - actually_start_transport (); - } else { - waiting_to_start = true; - } -} - -void -Session::actually_start_transport () -{ - waiting_to_start = false; - - transport_sub_state |= PendingDeclickIn; - _transport_speed = 1.0; - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->realtime_set_speed ((*i)->speed(), true); - } - - deliver_mmc(MIDI::MachineControl::cmdDeferredPlay, _transport_frame); - - TransportStateChange (); /* EMIT SIGNAL */ -} - -/** Do any transport work in the audio thread that needs to be done after the - * transport thread is finished. Audio thread, realtime safe. - */ -void -Session::post_transport () -{ - if (post_transport_work & PostTransportAudition) { - if (auditioner && auditioner->active()) { - process_function = &Session::process_audition; - } else { - process_function = &Session::process_with_events; - } - } - - if (post_transport_work & PostTransportStop) { - - transport_sub_state = 0; - } - - if (post_transport_work & PostTransportLocate) { - - if (((Config->get_slave_source() == None && (auto_play_legal && Config->get_auto_play())) && !_exporting) || (post_transport_work & PostTransportRoll)) { - start_transport (); - - } else { - transport_sub_state = 0; - } - } - - set_next_event (); - - post_transport_work = PostTransportWork (0); -} - -void -Session::reset_rf_scale (nframes_t motion) -{ - cumulative_rf_motion += motion; - - if (cumulative_rf_motion < 4 * _current_frame_rate) { - rf_scale = 1; - } else if (cumulative_rf_motion < 8 * _current_frame_rate) { - rf_scale = 4; - } else if (cumulative_rf_motion < 16 * _current_frame_rate) { - rf_scale = 10; - } else { - rf_scale = 100; - } - - if (motion != 0) { - set_dirty(); - } -} - -void -Session::set_slave_source (SlaveSource src) -{ - bool reverse = false; - bool non_rt_required = false; - - if (_transport_speed) { - error << _("please stop the transport before adjusting slave settings") << endmsg; - return; - } - -// if (src == JACK && Config->get_jack_time_master()) { -// return; -// } - - if (_slave) { - delete _slave; - _slave = 0; - } - - if (_transport_speed < 0.0) { - reverse = true; - } - - switch (src) { - case None: - stop_transport (); - break; - - case MTC: - if (_mtc_port) { - try { - _slave = new MTC_Slave (*this, *_mtc_port); - } - - catch (failed_constructor& err) { - return; - } - - } else { - error << _("No MTC port defined: MTC slaving is impossible.") << endmsg; - return; - } - _desired_transport_speed = _transport_speed; - break; - - case JACK: - _slave = new JACK_Slave (_engine.jack()); - _desired_transport_speed = _transport_speed; - break; - }; - - Config->set_slave_source (src); - - boost::shared_ptr dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - if (!(*i)->hidden()) { - if ((*i)->realtime_set_speed ((*i)->speed(), true)) { - non_rt_required = true; - } - (*i)->set_slaved (_slave); - } - } - - if (reverse) { - reverse_diskstream_buffers (); - } - - if (non_rt_required) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportSpeed); - schedule_butler_transport_work (); - } - - set_dirty(); -} - -void -Session::reverse_diskstream_buffers () -{ - post_transport_work = PostTransportWork (post_transport_work | PostTransportReverse); - schedule_butler_transport_work (); -} - -void -Session::set_diskstream_speed (Diskstream* stream, float speed) -{ - if (stream->realtime_set_speed (speed, false)) { - post_transport_work = PostTransportWork (post_transport_work | PostTransportSpeed); - schedule_butler_transport_work (); - set_dirty (); - } -} - -void -Session::set_audio_range (list& range) -{ - Event *ev = new Event (Event::SetAudioRange, Event::Add, Event::Immediate, 0, 0.0f); - ev->audio_range = range; - queue_event (ev); -} - -void -Session::request_play_range (bool yn) -{ - Event* ev = new Event (Event::SetPlayRange, Event::Add, Event::Immediate, 0, 0.0f, yn); - queue_event (ev); -} - -void -Session::set_play_range (bool yn) -{ - /* Called from event-processing context */ - - if (_play_range != yn) { - _play_range = yn; - setup_auto_play (); - - if (!_play_range) { - /* stop transport */ - Event* ev = new Event (Event::SetTransportSpeed, Event::Add, Event::Immediate, 0, 0.0f, false); - merge_event (ev); - } - } -} - -void -Session::setup_auto_play () -{ - /* Called from event-processing context */ - - Event* ev; - - _clear_event_type (Event::RangeStop); - _clear_event_type (Event::RangeLocate); - - if (!_play_range) { - return; - } - - list::size_type sz = current_audio_range.size(); - - if (sz > 1) { - - list::iterator i = current_audio_range.begin(); - list::iterator next; - - while (i != current_audio_range.end()) { - - next = i; - ++next; - - /* locating/stopping is subject to delays for declicking. - */ - - nframes_t requested_frame = (*i).end; - - if (requested_frame > current_block_size) { - requested_frame -= current_block_size; - } else { - requested_frame = 0; - } - - if (next == current_audio_range.end()) { - ev = new Event (Event::RangeStop, Event::Add, requested_frame, 0, 0.0f); - } else { - ev = new Event (Event::RangeLocate, Event::Add, requested_frame, (*next).start, 0.0f); - } - - merge_event (ev); - - i = next; - } - - } else if (sz == 1) { - - ev = new Event (Event::RangeStop, Event::Add, current_audio_range.front().end, 0, 0.0f); - merge_event (ev); - - } - - /* now start rolling at the right place */ - - ev = new Event (Event::LocateRoll, Event::Add, Event::Immediate, current_audio_range.front().start, 0.0f, false); - merge_event (ev); -} - -void -Session::request_roll_at_and_return (nframes_t start, nframes_t return_to) -{ - Event *ev = new Event (Event::LocateRollLocate, Event::Add, Event::Immediate, return_to, 1.0); - ev->target2_frame = start; - queue_event (ev); -} - -void -Session::request_bounded_roll (nframes_t start, nframes_t end) -{ - request_stop (); - Event *ev = new Event (Event::StopOnce, Event::Replace, end, Event::Immediate, 0.0); - queue_event (ev); - request_locate (start, true); -} - -void -Session::engine_halted () -{ - bool ignored; - - /* there will be no more calls to process(), so - we'd better clean up for ourselves, right now. - - but first, make sure the butler is out of - the picture. - */ - - g_atomic_int_set (&butler_should_do_transport_work, 0); - post_transport_work = PostTransportWork (0); - stop_butler (); - - realtime_stop (false); - non_realtime_stop (false, 0, ignored); - transport_sub_state = 0; - - TransportStateChange (); /* EMIT SIGNAL */ -} - - -void -Session::xrun_recovery () -{ - Xrun (transport_frame()); //EMIT SIGNAL - - if (Config->get_stop_recording_on_xrun() && actively_recording()) { - - /* it didn't actually halt, but we need - to handle things in the same way. - */ - - engine_halted(); - } -} - -void -Session::update_latency_compensation (bool with_stop, bool abort) -{ - bool update_jack = false; - - if (_state_of_the_state & Deletion) { - return; - } - - _worst_track_latency = 0; - - boost::shared_ptr r = routes.reader (); - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - - if (with_stop) { - (*i)->handle_transport_stopped (abort, (post_transport_work & PostTransportLocate), - (!(post_transport_work & PostTransportLocate) || pending_locate_flush)); - } - - nframes_t old_latency = (*i)->signal_latency (); - nframes_t track_latency = (*i)->update_total_latency (); - - if (old_latency != track_latency) { - (*i)->update_port_total_latencies (); - update_jack = true; - } - - if (!(*i)->is_hidden() && ((*i)->active())) { - _worst_track_latency = max (_worst_track_latency, track_latency); - } - } - - if (update_jack) { - _engine.update_total_latencies (); - } - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - (*i)->set_latency_delay (_worst_track_latency); - } - - set_worst_io_latencies (); - - /* reflect any changes in latencies into capture offsets - */ - - boost::shared_ptr dsl = diskstreams.reader(); - - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->set_capture_offset (); - } -} - -void -Session::allow_auto_play (bool yn) -{ - auto_play_legal = yn; -} - -void -Session::reset_jack_connection (jack_client_t* jack) -{ - JACK_Slave* js; - - if (_slave && ((js = dynamic_cast (_slave)) != 0)) { - js->reset_client (jack); - } -} diff --git a/libs/ardour/session_utils.cc b/libs/ardour/session_utils.cc deleted file mode 100644 index 3b2baad69a..0000000000 --- a/libs/ardour/session_utils.cc +++ /dev/null @@ -1,39 +0,0 @@ - -#include - -#include - -#include "i18n.h" - -namespace ARDOUR { - -using namespace PBD; - -bool -create_session_directory (const string& session_directory_path) -{ - SessionDirectory sdir(session_directory_path); - - try - { - // create all the required session directories - sdir.create(); - } - catch(sys::filesystem_error& ex) - { - // log the exception - warning << string_compose - ( - _("Unable to create session directory at path %1 : %2"), - session_directory_path, - ex.what() - ); - - return false; - } - - // successfully created the session directory - return true; -} - -} // namespace ARDOUR diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc deleted file mode 100644 index 16233feba2..0000000000 --- a/libs/ardour/session_vst.cc +++ /dev/null @@ -1,315 +0,0 @@ -/* - Copyright (C) 2004 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include -#include - -#include -#include - -#include "i18n.h" - -// #define DEBUG_CALLBACKS - -#ifdef DEBUG_CALLBACKS -#define SHOW_CALLBACK printf -#else -#define SHOW_CALLBACK(...) -#endif - -using namespace ARDOUR; - -long Session::vst_callback (AEffect* effect, - long opcode, - long index, - long value, - void* ptr, - float opt) -{ - static VstTimeInfo _timeInfo; - VSTPlugin* plug; - Session* session; - - SHOW_CALLBACK ("am callback, opcode = %d", opcode); - - if (effect && effect->user) { - plug = static_cast (effect->user); - session = &plug->session(); - } else { - plug = 0; - session = 0; - } - - switch(opcode){ - - case audioMasterAutomate: - SHOW_CALLBACK ("amc: audioMasterAutomate\n"); - // index, value, returns 0 - if (effect) { - effect->setParameter (effect, index, opt); - } - return 0; - - case audioMasterVersion: - SHOW_CALLBACK ("amc: audioMasterVersion\n"); - // vst version, currently 2 (0 for older) - return 2; - - case audioMasterCurrentId: - SHOW_CALLBACK ("amc: audioMasterCurrentId\n"); - // returns the unique id of a plug that's currently - // loading - return 0; - - case audioMasterIdle: - SHOW_CALLBACK ("amc: audioMasterIdle\n"); - // call application idle routine (this will - // call effEditIdle for all open editors too) - if (effect) { - effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f); - } - return 0; - - case audioMasterPinConnected: - SHOW_CALLBACK ("amc: audioMasterPinConnected\n"); - // inquire if an input or output is beeing connected; - // index enumerates input or output counting from zero: - // value is 0 for input and != 0 otherwise. note: the - // return value is 0 for such that older versions - // will always return true. - return 1; - - case audioMasterWantMidi: - SHOW_CALLBACK ("amc: audioMasterWantMidi\n"); - // is a filter which is currently ignored - return 0; - - case audioMasterGetTime: - SHOW_CALLBACK ("amc: audioMasterGetTime\n"); - // returns const VstTimeInfo* (or 0 if not supported) - // should contain a mask indicating which fields are required - // (see valid masks above), as some items may require extensive - // conversions - memset(&_timeInfo, 0, sizeof(_timeInfo)); - if (session) { - _timeInfo.samplePos = session->transport_frame(); - _timeInfo.sampleRate = session->frame_rate(); - } - return (long)&_timeInfo; - - case audioMasterProcessEvents: - SHOW_CALLBACK ("amc: audioMasterProcessEvents\n"); - // VstEvents* in - return 0; - - case audioMasterSetTime: - SHOW_CALLBACK ("amc: audioMasterSetTime\n"); - // VstTimenfo* in , filter in , not supported - - case audioMasterTempoAt: - SHOW_CALLBACK ("amc: audioMasterTempoAt\n"); - // returns tempo (in bpm * 10000) at sample frame location passed in - return 0; - - case audioMasterGetNumAutomatableParameters: - SHOW_CALLBACK ("amc: audioMasterGetNumAutomatableParameters\n"); - return 0; - - case audioMasterGetParameterQuantization: - SHOW_CALLBACK ("amc: audioMasterGetParameterQuantization\n"); - // returns the integer value for +1.0 representation, - // or 1 if full single float precision is maintained - // in automation. parameter index in (-1: all, any) - return 0; - - case audioMasterIOChanged: - SHOW_CALLBACK ("amc: audioMasterIOChanged\n"); - // numInputs and/or numOutputs has changed - return 0; - - case audioMasterNeedIdle: - SHOW_CALLBACK ("amc: audioMasterNeedIdle\n"); - // plug needs idle calls (outside its editor window) - return 0; - - case audioMasterSizeWindow: - SHOW_CALLBACK ("amc: audioMasterSizeWindow\n"); - // index: width, value: height - return 0; - - case audioMasterGetSampleRate: - SHOW_CALLBACK ("amc: audioMasterGetSampleRate\n"); - return 0; - - case audioMasterGetBlockSize: - SHOW_CALLBACK ("amc: audioMasterGetBlockSize\n"); - return 0; - - case audioMasterGetInputLatency: - SHOW_CALLBACK ("amc: audioMasterGetInputLatency\n"); - return 0; - - case audioMasterGetOutputLatency: - SHOW_CALLBACK ("amc: audioMasterGetOutputLatency\n"); - return 0; - - case audioMasterGetPreviousPlug: - SHOW_CALLBACK ("amc: audioMasterGetPreviousPlug\n"); - // input pin in (-1: first to come), returns cEffect* - return 0; - - case audioMasterGetNextPlug: - SHOW_CALLBACK ("amc: audioMasterGetNextPlug\n"); - // output pin in (-1: first to come), returns cEffect* - - case audioMasterWillReplaceOrAccumulate: - SHOW_CALLBACK ("amc: audioMasterWillReplaceOrAccumulate\n"); - // returns: 0: not supported, 1: replace, 2: accumulate - return 0; - - case audioMasterGetCurrentProcessLevel: - SHOW_CALLBACK ("amc: audioMasterGetCurrentProcessLevel\n"); - // returns: 0: not supported, - // 1: currently in user thread (gui) - // 2: currently in audio thread (where process is called) - // 3: currently in 'sequencer' thread (midi, timer etc) - // 4: currently offline processing and thus in user thread - // other: not defined, but probably pre-empting user thread. - return 0; - - case audioMasterGetAutomationState: - SHOW_CALLBACK ("amc: audioMasterGetAutomationState\n"); - // returns 0: not supported, 1: off, 2:read, 3:write, 4:read/write - // offline - return 0; - - case audioMasterOfflineStart: - SHOW_CALLBACK ("amc: audioMasterOfflineStart\n"); - case audioMasterOfflineRead: - SHOW_CALLBACK ("amc: audioMasterOfflineRead\n"); - // ptr points to offline structure, see below. return 0: error, 1 ok - return 0; - - case audioMasterOfflineWrite: - SHOW_CALLBACK ("amc: audioMasterOfflineWrite\n"); - // same as read - return 0; - - case audioMasterOfflineGetCurrentPass: - SHOW_CALLBACK ("amc: audioMasterOfflineGetCurrentPass\n"); - case audioMasterOfflineGetCurrentMetaPass: - SHOW_CALLBACK ("amc: audioMasterOfflineGetCurrentMetaPass\n"); - return 0; - - case audioMasterSetOutputSampleRate: - SHOW_CALLBACK ("amc: audioMasterSetOutputSampleRate\n"); - // for variable i/o, sample rate in - return 0; - - case audioMasterGetSpeakerArrangement: - SHOW_CALLBACK ("amc: audioMasterGetSpeakerArrangement\n"); - // (long)input in , output in - return 0; - - case audioMasterGetVendorString: - SHOW_CALLBACK ("amc: audioMasterGetVendorString\n"); - // fills with a string identifying the vendor (max 64 char) - strcpy ((char*) ptr, "Linux Audio Systems"); - return 0; - - case audioMasterGetProductString: - SHOW_CALLBACK ("amc: audioMasterGetProductString\n"); - // fills with a string with product name (max 64 char) - strcpy ((char*) ptr, "Ardour"); - return 0; - - case audioMasterGetVendorVersion: - SHOW_CALLBACK ("amc: audioMasterGetVendorVersion\n"); - // returns vendor-specific version - return 900; - - case audioMasterVendorSpecific: - SHOW_CALLBACK ("amc: audioMasterVendorSpecific\n"); - // no definition, vendor specific handling - return 0; - - case audioMasterSetIcon: - SHOW_CALLBACK ("amc: audioMasterSetIcon\n"); - // void* in , format not defined yet - return 0; - - case audioMasterCanDo: - SHOW_CALLBACK ("amc: audioMasterCanDo\n"); - // string in ptr, see below - return 0; - - case audioMasterGetLanguage: - SHOW_CALLBACK ("amc: audioMasterGetLanguage\n"); - // see enum - return 0; - - case audioMasterOpenWindow: - SHOW_CALLBACK ("amc: audioMasterOpenWindow\n"); - // returns platform specific ptr - return 0; - - case audioMasterCloseWindow: - SHOW_CALLBACK ("amc: audioMasterCloseWindow\n"); - // close window, platform specific handle in - return 0; - - case audioMasterGetDirectory: - SHOW_CALLBACK ("amc: audioMasterGetDirectory\n"); - // get plug directory, FSSpec on MAC, else char* - return 0; - - case audioMasterUpdateDisplay: - SHOW_CALLBACK ("amc: audioMasterUpdateDisplay\n"); - // something has changed, update 'multi-fx' display - if (effect) { - effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f); - } - return 0; - - case audioMasterBeginEdit: - SHOW_CALLBACK ("amc: audioMasterBeginEdit\n"); - // begin of automation session (when mouse down), parameter index in - return 0; - - case audioMasterEndEdit: - SHOW_CALLBACK ("amc: audioMasterEndEdit\n"); - // end of automation session (when mouse up), parameter index in - return 0; - - case audioMasterOpenFileSelector: - SHOW_CALLBACK ("amc: audioMasterOpenFileSelector\n"); - // open a fileselector window with VstFileSelect* in - return 0; - - default: - SHOW_CALLBACK ("VST master dispatcher: undefed: %d, %d\n", opcode, effKeysRequired); - break; - } - - return 0; -} - diff --git a/libs/ardour/silentfilesource.cc b/libs/ardour/silentfilesource.cc deleted file mode 100644 index b34944e342..0000000000 --- a/libs/ardour/silentfilesource.cc +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -using namespace ARDOUR; - -SilentFileSource::SilentFileSource (Session& s, const XMLNode& node, nframes_t len, float sr) - : AudioFileSource (s, node, false) -{ - _length = len; - _sample_rate = sr; -} - -SilentFileSource::~SilentFileSource () -{ -} - -void -SilentFileSource::set_length (nframes_t len) -{ - _length = len; -} diff --git a/libs/ardour/smf_reader.cc b/libs/ardour/smf_reader.cc deleted file mode 100644 index 48ec3dc386..0000000000 --- a/libs/ardour/smf_reader.cc +++ /dev/null @@ -1,285 +0,0 @@ -/* - Copyright (C) 2008 Paul Davis - Written by Dave Robillard - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace std; - -namespace ARDOUR { - - -SMFReader::SMFReader(const string filename) - : _fd(NULL) - , _ppqn(0) - , _track(0) - , _track_size(0) -{ - if (filename.length() > 0) { - open(filename); - } -} - - -SMFReader::~SMFReader() -{ - if (_fd) - close(); -} - - -bool -SMFReader::open(const string& filename) throw (logic_error, UnsupportedTime) -{ - if (_fd) - throw logic_error("Attempt to start new read while write in progress."); - - cout << "Opening SMF file " << filename << " for reading." << endl; - - _fd = fopen(filename.c_str(), "r+"); - - if (_fd) { - // Read type (bytes 8..9) - fseek(_fd, 0, SEEK_SET); - char mthd[5]; - mthd[4] = '\0'; - fread(mthd, 1, 4, _fd); - if (strcmp(mthd, "MThd")) { - cerr << filename << " is not an SMF file, aborting." << endl; - fclose(_fd); - _fd = NULL; - return false; - } - - // Read type (bytes 8..9) - fseek(_fd, 8, SEEK_SET); - uint16_t type_be = 0; - fread(&type_be, 2, 1, _fd); - _type = GUINT16_FROM_BE(type_be); - - // Read number of tracks (bytes 10..11) - uint16_t num_tracks_be = 0; - fread(&num_tracks_be, 2, 1, _fd); - _num_tracks = GUINT16_FROM_BE(num_tracks_be); - - // Read PPQN (bytes 12..13) - uint16_t ppqn_be = 0; - fread(&ppqn_be, 2, 1, _fd); - _ppqn = GUINT16_FROM_BE(ppqn_be); - - // TODO: Absolute (SMPTE seconds) time support - if ((_ppqn & 0x8000) != 0) - throw UnsupportedTime(); - - seek_to_track(1); - - return true; - } else { - return false; - } -} - - -/** Seek to the start of a given track, starting from 1. - * Returns true if specified track was found. - */ -bool -SMFReader::seek_to_track(unsigned track) throw (std::logic_error) -{ - if (track == 0) - throw logic_error("Seek to track 0 out of range (must be >= 1)"); - - if (!_fd) - throw logic_error("Attempt to seek to track on unopened SMF file."); - - unsigned track_pos = 0; - - fseek(_fd, 14, SEEK_SET); - char id[5]; - id[4] = '\0'; - uint32_t chunk_size = 0; - - while (!feof(_fd)) { - fread(id, 1, 4, _fd); - - if (!strcmp(id, "MTrk")) { - ++track_pos; - } else { - std::cerr << "Unknown chunk ID " << id << endl; - } - - uint32_t chunk_size_be; - fread(&chunk_size_be, 4, 1, _fd); - chunk_size = GUINT32_FROM_BE(chunk_size_be); - - if (track_pos == track) - break; - - fseek(_fd, chunk_size, SEEK_CUR); - } - - if (!feof(_fd) && track_pos == track) { - _track = track; - _track_size = chunk_size; - return true; - } else { - return false; - } -} - - -/** Read an event from the current position in file. - * - * File position MUST be at the beginning of a delta time, or this will die very messily. - * ev.buffer must be of size ev.size, and large enough for the event. The returned event - * will have it's time field set to it's delta time (so it's the caller's responsibility - * to keep track of delta time, even for ignored events). - * - * Returns event length (including status byte) on success, 0 if event was - * skipped (eg a meta event), or -1 on EOF (or end of track). - * - * If @a buf is not large enough to hold the event, 0 will be returned, but ev_size - * set to the actual size of the event. - */ -int -SMFReader::read_event(size_t buf_len, - uint8_t* buf, - uint32_t* ev_size, - uint32_t* delta_time) - throw (std::logic_error, PrematureEOF, CorruptFile) -{ - if (_track == 0) - throw logic_error("Attempt to read from unopened SMF file"); - - if (!_fd || feof(_fd)) { - return -1; - } - - assert(buf_len > 0); - assert(buf); - assert(ev_size); - assert(delta_time); - - // Running status state - static uint8_t last_status = 0; - static uint32_t last_size = 0; - - *delta_time = read_var_len(_fd); - int status = fgetc(_fd); - if (status == EOF) - throw PrematureEOF(); - else if (status > 0xFF) - throw CorruptFile(); - - if (status < 0x80) { - if (last_status == 0) - throw CorruptFile(); - status = last_status; - *ev_size = last_size; - fseek(_fd, -1, SEEK_CUR); - } else { - last_status = status; - *ev_size = midi_event_size(status) + 1; - last_size = *ev_size; - } - - buf[0] = (uint8_t)status; - - if (status == 0xFF) { - *ev_size = 0; - if (feof(_fd)) - throw PrematureEOF(); - uint8_t type = fgetc(_fd); - const uint32_t size = read_var_len(_fd); - /*cerr.flags(ios::hex); - cerr << "SMF - meta 0x" << (int)type << ", size = "; - cerr.flags(ios::dec); - cerr << size << endl;*/ - - if ((uint8_t)type == 0x2F) { - return -1; // we hit the logical EOF anyway... - } else { - fseek(_fd, size, SEEK_CUR); - return 0; - } - } - - if (*ev_size > buf_len || *ev_size == 0 || feof(_fd)) { - //cerr << "SMF - Skipping event" << endl; - // Skip event, return 0 - fseek(_fd, *ev_size - 1, SEEK_CUR); - return 0; - } else { - // Read event, return size - if (ferror(_fd)) - throw CorruptFile(); - - fread(buf+1, 1, *ev_size - 1, _fd); - - if ((buf[0] & 0xF0) == 0x90 && buf[2] == 0) { - buf[0] = (0x80 | (buf[0] & 0x0F)); - buf[2] = 0x40; - } - - return *ev_size; - } -} - - -void -SMFReader::close() -{ - if (_fd) - fclose(_fd); - - _fd = NULL; -} - - -uint32_t -SMFReader::read_var_len(FILE* fd) throw (PrematureEOF) -{ - if (feof(fd)) - throw PrematureEOF(); - - uint32_t value; - uint8_t c; - - if ( (value = getc(fd)) & 0x80 ) { - value &= 0x7F; - do { - if (feof(fd)) - throw PrematureEOF(); - value = (value << 7) + ((c = getc(fd)) & 0x7F); - } while (c & 0x80); - } - - return value; -} - - -} // namespace ARDOUR - diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc deleted file mode 100644 index bb43d4791a..0000000000 --- a/libs/ardour/smf_source.cc +++ /dev/null @@ -1,971 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; - -string SMFSource::_search_path; - -/*sigc::signal SMFSource::HeaderPositionOffsetChanged; -bool SMFSource::header_position_negative; -uint64_t SMFSource::header_position_offset; -*/ - -SMFSource::SMFSource (Session& s, std::string path, Flag flags) - : MidiSource (s, region_name_from_path(path, false)) - , _flags (Flag(flags | Writable)) // FIXME: this needs to be writable for now - , _allow_remove_if_empty(true) - , _fd (0) - , _last_ev_time(0) - , _track_size(4) // 4 bytes for the ever-present EOT event - , _header_size(22) - , _empty(true) -{ - /* constructor used for new internal-to-session files. file cannot exist */ - - if (init (path, false)) { - throw failed_constructor (); - } - - if (open()) { - throw failed_constructor (); - } - - assert(_name.find("/") == string::npos); -} - -SMFSource::SMFSource (Session& s, const XMLNode& node) - : MidiSource (s, node) - , _flags (Flag (Writable|CanRename)) - , _allow_remove_if_empty(true) - , _fd (0) - , _last_ev_time(0) - , _track_size(4) // 4 bytes for the ever-present EOT event - , _header_size(22) - , _empty(true) -{ - /* constructor used for existing internal-to-session files. file must exist */ - - if (set_state (node)) { - throw failed_constructor (); - } - - if (init (_name, true)) { - throw failed_constructor (); - } - - if (open()) { - throw failed_constructor (); - } - - assert(_name.find("/") == string::npos); -} - -SMFSource::~SMFSource () -{ - if (removable()) { - unlink (_path.c_str()); - } -} - -bool -SMFSource::removable () const -{ - return (_flags & Removable) && ((_flags & RemoveAtDestroy) || - ((_flags & RemovableIfEmpty) && is_empty())); -} - -int -SMFSource::init (string pathstr, bool must_exist) -{ - bool is_new = false; - - if (!find (pathstr, must_exist, is_new)) { - cerr << "cannot find " << pathstr << " with me = " << must_exist << endl; - return -1; - } - - if (is_new && must_exist) { - return -1; - } - - assert(_name.find("/") == string::npos); - return 0; -} - -/** Attempt to open the SMF file for reading and writing. - * - * Currently SMFSource is always read/write. - * - * \return 0 on success - * -1 if the file can not be opened for reading, - * -2 if the file can not be opened for writing - */ -int -SMFSource::open() -{ - //cerr << "Opening SMF file " << path() << " writeable: " << writable() << endl; - - assert(writable()); // FIXME; - - _fd = fopen(path().c_str(), "r+"); - - // File already exists - if (_fd) { - fseek(_fd, _header_size - 4, 0); - uint32_t track_size_be = 0; - fread(&track_size_be, 4, 1, _fd); - _track_size = GUINT32_FROM_BE(track_size_be); - _empty = _track_size > 4; - //cerr << "SMF - read track size " << _track_size << endl; - - // We're making a new file - } else { - _fd = fopen(path().c_str(), "w+"); - if (_fd == NULL) { - cerr << "ERROR: Can not open SMF file " << path() << " for writing: " << - strerror(errno) << endl; - return -2; - } - _track_size = 4; - _empty = true; - - // Write a tentative header just to pad things out so writing happens in the right spot - flush_header(); - flush_footer(); - } - - return (_fd == 0) ? -1 : 0; -} - -void -SMFSource::close() -{ - if (_fd) { - flush_header(); - flush_footer(); - fclose(_fd); - _fd = NULL; - } -} - -void -SMFSource::seek_to_footer_position() -{ - uint8_t buffer[4]; - - // lets check if there is a track end marker at the end of the data - fseek(_fd, -4, SEEK_END); - //cerr << "SMFSource::seek_to_footer_position: At position: " << ftell(_fd); - size_t read_bytes = fread(buffer, sizeof(uint8_t), 4, _fd); - /*cerr << " read size: " << read_bytes << " buffer: "; - for (size_t i=0; i < read_bytes; ++i) { - printf("%x ", buffer[i]); - } - printf("\n"); - */ - - if( (read_bytes == 4) && - buffer[0] == 0x00 && - buffer[1] == 0xFF && - buffer[2] == 0x2F && - buffer[3] == 0x00) { - // there is one, so overwrite it - fseek(_fd, -4, SEEK_END); - } else { - // there is none, so append - fseek(_fd, 0, SEEK_END); - } -} - -int -SMFSource::flush_header() -{ - // FIXME: write timeline position somehow? - - //cerr << path() << " SMF Flushing header\n"; - - assert(_fd); - - const uint16_t type = GUINT16_TO_BE(0); // SMF Type 0 (single track) - const uint16_t ntracks = GUINT16_TO_BE(1); // Number of tracks (always 1 for Type 0) - const uint16_t division = GUINT16_TO_BE(_ppqn); // Pulses per quarter note (beat) - - char data[6]; - memcpy(data, &type, 2); - memcpy(data+2, &ntracks, 2); - memcpy(data+4, &division, 2); - - _fd = freopen(path().c_str(), "r+", _fd); - assert(_fd); - fseek(_fd, 0, SEEK_SET); - write_chunk("MThd", 6, data); - write_chunk_header("MTrk", _track_size); - - fflush(_fd); - - return 0; -} - -int -SMFSource::flush_footer() -{ - //cerr << path() << " SMF Flushing footer\n"; - seek_to_footer_position(); - write_footer(); - seek_to_footer_position(); - - return 0; -} - -void -SMFSource::write_footer() -{ - write_var_len(0); - char eot[3] = { 0xFF, 0x2F, 0x00 }; // end-of-track meta-event - fwrite(eot, 1, 3, _fd); - fflush(_fd); -} - -/** Returns the offset of the first event in the file with a time past @a start, - * relative to the start of the source. - * - * Returns -1 if not found. - */ -/* -long -SMFSource::find_first_event_after(nframes_t start) -{ - // FIXME: obviously this is slooow - - fseek(_fd, _header_size, 0); - - while ( ! feof(_fd) ) { - const uint32_t delta_time = read_var_len(); - - if (delta_time > start) - return delta_time; - } - - return -1; -} -*/ - -/** Read an event from the current position in file. - * - * File position MUST be at the beginning of a delta time, or this will die very messily. - * ev.buffer must be of size ev.size, and large enough for the event. The returned event - * will have it's time field set to it's delta time, in SMF tempo-based ticks, using the - * rate given by ppqn() (it is the caller's responsibility to calculate a real time). - * - * \a size should be the capacity of \a buf. If it is not large enough, \a buf will - * be freed and a new buffer allocated in its place, the size of which will be placed - * in size. - * - * Returns event length (including status byte) on success, 0 if event was - * skipped (eg a meta event), or -1 on EOF (or end of track). - */ -int -SMFSource::read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const -{ - if (feof(_fd)) { - return -1; - } - - assert(delta_t); - assert(size); - assert(buf); - - try { - *delta_t = SMFReader::read_var_len(_fd); - } catch (...) { - return -1; // Premature EOF - } - - if (feof(_fd)) { - return -1; // Premature EOF - } - - const int status = fgetc(_fd); - - if (status == EOF) { - return -1; // Premature EOF - } - - //printf("Status @ %X = %X\n", (unsigned)ftell(_fd) - 1, status); - - if (status == 0xFF) { - if (feof(_fd)) { - return -1; // Premature EOF - } - const int type = fgetc(_fd); - if ((unsigned char)type == 0x2F) { - return -1; // hit end of track - } else { - *size = 0; - return 0; - } - } - - const int event_size = midi_event_size((unsigned char)status) + 1; - if (event_size <= 0) { - *size = 0; - return 0; - } - - // Make sure we have enough scratch buffer - if (*size < (unsigned)event_size) - *buf = (uint8_t*)realloc(*buf, event_size); - - *size = event_size; - - (*buf)[0] = (unsigned char)status; - if (event_size > 1) - fread((*buf) + 1, 1, *size - 1, _fd); - - /*printf("SMFSource %s read event: delta = %u, size = %u, data = ", _name.c_str(), *delta_t, *size); - for (size_t i=0; i < *size; ++i) { - printf("%X ", (*buf)[i]); - } - printf("\n");*/ - - return (int)*size; -} - -/** All stamps in audio frames */ -nframes_t -SMFSource::read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset, nframes_t negative_stamp_offset) const -{ - //cerr << "SMF read_unlocked " << name() << " read " << start << ", count=" << cnt << ", offset=" << stamp_offset << endl; - - // 64 bits ought to be enough for anybody - uint64_t time = 0; // in SMF ticks, 1 tick per _ppqn - - _read_data_count = 0; - - // Output parameters for read_event (which will allocate scratch in buffer as needed) - uint32_t ev_delta_t = 0; - uint32_t ev_size = 0; - uint8_t* ev_buffer = 0; - - size_t scratch_size = 0; // keep track of scratch to minimize reallocs - - // FIXME: don't seek to start and search every read (brutal!) - fseek(_fd, _header_size, SEEK_SET); - - // FIXME: assumes tempo never changes after start - const double frames_per_beat = _session.tempo_map().tempo_at(_timeline_position).frames_per_beat( - _session.engine().frame_rate(), - _session.tempo_map().meter_at(_timeline_position)); - - const uint64_t start_ticks = (uint64_t)((start / frames_per_beat) * _ppqn); - - while (!feof(_fd)) { - int ret = read_event(&ev_delta_t, &ev_size, &ev_buffer); - if (ret == -1) { // EOF - //cerr << "SMF - EOF\n"; - break; - } - - time += ev_delta_t; // accumulate delta time - - if (ret == 0) { // meta-event (skipped, just accumulate time) - //cerr << "SMF - META\n"; - continue; - } - - if (time >= start_ticks) { - const nframes_t ev_frame_time = (nframes_t)( - ((time / (double)_ppqn) * frames_per_beat)) + stamp_offset; - - if (ev_frame_time <= start + cnt) - dst.write(ev_frame_time - negative_stamp_offset, ev_size, ev_buffer); - else - break; - } - - _read_data_count += ev_size; - - if (ev_size > scratch_size) - scratch_size = ev_size; - else - ev_size = scratch_size; // minimize realloc in read_event - } - - return cnt; -} - -/** All stamps in audio frames */ -nframes_t -SMFSource::write_unlocked (MidiRingBuffer& src, nframes_t cnt) -{ - _write_data_count = 0; - - double time; - size_t size; - - size_t buf_capacity = 4; - uint8_t* buf = (uint8_t*)malloc(buf_capacity); - - if (_model && ! _model->writing()) - _model->start_write(); - - MIDI::Event ev(0.0, 4, NULL, true); - - while (true) { - bool ret = src.full_peek(sizeof(double), (uint8_t*)&time); - if (!ret || time - _timeline_position > _length + cnt) - break; - - ret = src.read_prefix(&time, &size); - if (!ret) - break; - - if (size > buf_capacity) { - buf_capacity = size; - buf = (uint8_t*)realloc(buf, size); - } - - ret = src.read_contents(size, buf); - if (!ret) { - cerr << "ERROR: Read time/size but not buffer, corrupt MIDI ring buffer" << endl; - break; - } - - assert(time >= _timeline_position); - time -= _timeline_position; - - ev.set(buf, size, time); - if (! (ev.is_channel_event() || ev.is_smf_meta_event() || ev.is_sysex()) ) { - //cerr << "SMFSource: WARNING: caller tried to write non SMF-Event of type " << std::hex << int(ev.buffer()[0]) << endl; - continue; - } - - append_event_unlocked(Frames, ev); - - if (_model) - _model->append(ev); - } - - fflush(_fd); - free(buf); - - const nframes_t oldlen = _length; - update_length(oldlen, cnt); - - ViewDataRangeReady (_timeline_position + oldlen, cnt); /* EMIT SIGNAL */ - - return cnt; -} - - -void -SMFSource::append_event_unlocked(EventTimeUnit unit, const MIDI::Event& ev) -{ - if (ev.size() == 0) - return; - - /*printf("SMFSource: %s - append_event_unlocked chan = %u, time = %lf, size = %u, data = ", - name().c_str(), (unsigned)ev.channel(), ev.time(), ev.size()); - for (size_t i=0; i < ev.size(); ++i) { - printf("%X ", ev.buffer()[i]); - } - printf("\n");*/ - - assert(ev.time() >= 0); - - if (ev.time() < _last_ev_time) { - cerr << "SMFSource: Warning: Skipping event with ev.time() < _last_ev_time" << endl; - return; - } - - uint32_t delta_time = 0; - - if (unit == Frames) { - // FIXME: assumes tempo never changes after start - const double frames_per_beat = _session.tempo_map().tempo_at(_timeline_position).frames_per_beat( - _session.engine().frame_rate(), - _session.tempo_map().meter_at(_timeline_position)); - - delta_time = (uint32_t)((ev.time() - _last_ev_time) / frames_per_beat * _ppqn); - } else { - assert(unit == Beats); - delta_time = (uint32_t)((ev.time() - _last_ev_time) * _ppqn); - } - - - const size_t stamp_size = write_var_len(delta_time); - fwrite(ev.buffer(), 1, ev.size(), _fd); - - _track_size += stamp_size + ev.size(); - _write_data_count += ev.size(); - _last_ev_time = ev.time(); - - if (ev.size() > 0) - _empty = false; -} - - -XMLNode& -SMFSource::get_state () -{ - XMLNode& root (MidiSource::get_state()); - char buf[16]; - snprintf (buf, sizeof (buf), "0x%x", (int)_flags); - root.add_property ("flags", buf); - return root; -} - -int -SMFSource::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - - if (MidiSource::set_state (node)) { - return -1; - } - - if ((prop = node.property (X_("flags"))) != 0) { - - int ival; - sscanf (prop->value().c_str(), "0x%x", &ival); - _flags = Flag (ival); - - } else { - - _flags = Flag (0); - - } - - assert(_name.find("/") == string::npos); - - return 0; -} - -void -SMFSource::mark_for_remove () -{ - if (!writable()) { - return; - } - _flags = Flag (_flags | RemoveAtDestroy); -} - -void -SMFSource::mark_streaming_midi_write_started (NoteMode mode, nframes_t start_frame) -{ - MidiSource::mark_streaming_midi_write_started (mode, start_frame); - _last_ev_time = 0; - fseek(_fd, _header_size, SEEK_SET); -} - -void -SMFSource::mark_streaming_write_completed () -{ - MidiSource::mark_streaming_write_completed(); - - if (!writable()) { - return; - } - - _model->set_edited(false); - flush_header(); - flush_footer(); -} - -void -SMFSource::mark_take (string id) -{ - if (writable()) { - _take_id = id; - } -} - -int -SMFSource::move_to_trash (const string trash_dir_name) -{ - string newpath; - - if (!writable()) { - return -1; - } - - /* don't move the file across filesystems, just - stick it in the 'trash_dir_name' directory - on whichever filesystem it was already on. - */ - - newpath = Glib::path_get_dirname (_path); - newpath = Glib::path_get_dirname (newpath); - - newpath += '/'; - newpath += trash_dir_name; - newpath += '/'; - newpath += Glib::path_get_basename (_path); - - if (access (newpath.c_str(), F_OK) == 0) { - - /* the new path already exists, try versioning */ - - char buf[PATH_MAX+1]; - int version = 1; - string newpath_v; - - snprintf (buf, sizeof (buf), "%s.%d", newpath.c_str(), version); - newpath_v = buf; - - while (access (newpath_v.c_str(), F_OK) == 0 && version < 999) { - snprintf (buf, sizeof (buf), "%s.%d", newpath.c_str(), ++version); - newpath_v = buf; - } - - if (version == 999) { - PBD::error << string_compose (_("there are already 1000 files with names like %1; versioning discontinued"), - newpath) - << endmsg; - } else { - newpath = newpath_v; - } - - } else { - - /* it doesn't exist, or we can't read it or something */ - - } - - if (::rename (_path.c_str(), newpath.c_str()) != 0) { - PBD::error << string_compose (_("cannot rename midi file source from %1 to %2 (%3)"), - _path, newpath, strerror (errno)) - << endmsg; - return -1; - } -#if 0 - if (::unlink (peakpath.c_str()) != 0) { - PBD::error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"), - peakpath, _path, strerror (errno)) - << endmsg; - /* try to back out */ - rename (newpath.c_str(), _path.c_str()); - return -1; - } - - _path = newpath; - peakpath = ""; -#endif - /* file can not be removed twice, since the operation is not idempotent */ - - _flags = Flag (_flags & ~(RemoveAtDestroy|Removable|RemovableIfEmpty)); - - return 0; -} - -bool -SMFSource::safe_file_extension(const Glib::ustring& file) -{ - return (file.rfind(".mid") != Glib::ustring::npos); -} - -// FIXME: Merge this with audiofilesource somehow (make a generic filesource?) -bool -SMFSource::find (string pathstr, bool must_exist, bool& isnew) -{ - string::size_type pos; - bool ret = false; - - isnew = false; - - /* clean up PATH:CHANNEL notation so that we are looking for the correct path */ - - if ((pos = pathstr.find_last_of (':')) == string::npos) { - pathstr = pathstr; - } else { - pathstr = pathstr.substr (0, pos); - } - - if (pathstr[0] != '/') { - - /* non-absolute pathname: find pathstr in search path */ - - vector dirs; - int cnt; - string fullpath; - string keeppath; - - if (_search_path.length() == 0) { - PBD::error << _("FileSource: search path not set") << endmsg; - goto out; - } - - split (_search_path, dirs, ':'); - - cnt = 0; - - for (vector::iterator i = dirs.begin(); i != dirs.end(); ++i) { - - fullpath = *i; - if (fullpath[fullpath.length()-1] != '/') { - fullpath += '/'; - } - fullpath += pathstr; - - if (access (fullpath.c_str(), R_OK) == 0) { - keeppath = fullpath; - ++cnt; - } - } - - if (cnt > 1) { - - PBD::error << string_compose (_("FileSource: \"%1\" is ambigous when searching %2\n\t"), pathstr, _search_path) << endmsg; - goto out; - - } else if (cnt == 0) { - - if (must_exist) { - PBD::error << string_compose(_("Filesource: cannot find required file (%1): while searching %2"), pathstr, _search_path) << endmsg; - goto out; - } else { - isnew = true; - } - } - - _name = pathstr; - _path = keeppath; - ret = true; - - } else { - - /* external files and/or very very old style sessions include full paths */ - - _path = pathstr; - _name = pathstr.substr (pathstr.find_last_of ('/') + 1); - - if (access (_path.c_str(), R_OK) != 0) { - - /* file does not exist or we cannot read it */ - - if (must_exist) { - PBD::error << string_compose(_("Filesource: cannot find required file (%1): %2"), _path, strerror (errno)) << endmsg; - goto out; - } - - if (errno != ENOENT) { - PBD::error << string_compose(_("Filesource: cannot check for existing file (%1): %2"), _path, strerror (errno)) << endmsg; - goto out; - } - - /* a new file */ - - isnew = true; - ret = true; - - } else { - - /* already exists */ - - ret = true; - } - } - - out: - return ret; -} - -void -SMFSource::set_search_path (string p) -{ - _search_path = p; -} - - -void -SMFSource::set_allow_remove_if_empty (bool yn) -{ - if (writable()) { - _allow_remove_if_empty = yn; - } -} - -int -SMFSource::set_source_name (string newname, bool destructive) -{ - //Glib::Mutex::Lock lm (_lock); FIXME - string oldpath = _path; - string newpath = Session::change_midi_path_by_name (oldpath, _name, newname, destructive); - - if (newpath.empty()) { - PBD::error << string_compose (_("programming error: %1"), "cannot generate a changed midi path") << endmsg; - return -1; - } - - if (rename (oldpath.c_str(), newpath.c_str()) != 0) { - PBD::error << string_compose (_("cannot rename midi file for %1 to %2"), _name, newpath) << endmsg; - return -1; - } - - _name = Glib::path_get_basename (newpath); - _path = newpath; - - return 0;//rename_peakfile (peak_path (_path)); -} - -bool -SMFSource::is_empty () const -{ - return _empty; -} - - -void -SMFSource::write_chunk_header(const char id[4], uint32_t length) -{ - const uint32_t length_be = GUINT32_TO_BE(length); - - fwrite(id, 1, 4, _fd); - fwrite(&length_be, 4, 1, _fd); -} - -void -SMFSource::write_chunk(const char id[4], uint32_t length, void* data) -{ - write_chunk_header(id, length); - - fwrite(data, 1, length, _fd); -} - -/** Returns the size (in bytes) of the value written. */ -size_t -SMFSource::write_var_len(uint32_t value) -{ - size_t ret = 0; - - uint32_t buffer = value & 0x7F; - - while ( (value >>= 7) ) { - buffer <<= 8; - buffer |= ((value & 0x7F) | 0x80); - } - - while (true) { - //printf("Writing var len byte %X\n", (unsigned char)buffer); - ++ret; - fputc(buffer, _fd); - if (buffer & 0x80) - buffer >>= 8; - else - break; - } - - return ret; -} - -void -SMFSource::load_model(bool lock, bool force_reload) -{ - if (_writing) - return; - - if (lock) - Glib::Mutex::Lock lm (_lock); - - if (_model && !force_reload && !_model->empty()) - return; - - if (! _model) { - _model = boost::shared_ptr(new MidiModel(this)); - cerr << _name << " loaded new model " << _model.get() << endl; - } else { - cerr << _name << " reloading model " << _model.get() - << " (" << _model->n_notes() << " notes)" <clear(); - } - - _model->start_write(); - - fseek(_fd, _header_size, SEEK_SET); - - uint64_t time = 0; /* in SMF ticks */ - MIDI::Event ev; - - size_t scratch_size = 0; // keep track of scratch and minimize reallocs - - // FIXME: assumes tempo never changes after start - const double frames_per_beat = _session.tempo_map().tempo_at(_timeline_position).frames_per_beat( - _session.engine().frame_rate(), - _session.tempo_map().meter_at(_timeline_position)); - - uint32_t delta_t = 0; - uint32_t size = 0; - uint8_t* buf = NULL; - int ret; - while ((ret = read_event(&delta_t, &size, &buf)) >= 0) { - - ev.set(buf, size, 0.0); - time += delta_t; - - if (ret > 0) { // didn't skip (meta) event - // make ev.time absolute time in frames - ev.time() = (double)time * frames_per_beat / (double)_ppqn; - _model->append(ev); - } - - if (ev.size() > scratch_size) - scratch_size = ev.size(); - else - ev.size() = scratch_size; - } - - _model->end_write(false); - _model->set_edited(false); - - free(buf); -} - - -void -SMFSource::destroy_model() -{ - //cerr << _name << " destroying model " << _model.get() << endl; - _model.reset(); -} - diff --git a/libs/ardour/sndfile_helpers.cc b/libs/ardour/sndfile_helpers.cc deleted file mode 100644 index 58a51f8bbe..0000000000 --- a/libs/ardour/sndfile_helpers.cc +++ /dev/null @@ -1,209 +0,0 @@ -/* - Copyright (C) 2000-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include - -#include -#include - -#include "i18n.h" - -using std::map; -using namespace std; - -const char * const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1] = { - N_("WAV"), - N_("AIFF"), - N_("CAF"), - N_("W64 (64 bit WAV)"), - N_("raw (no header)"), - 0 -}; - -const char* const sndfile_file_endings_strings[SNDFILE_HEADER_FORMATS+1] = { - N_(".wav"), - N_(".aiff"), - N_(".caf"), - N_(".w64"), - N_(".raw"), - 0 -}; - -int sndfile_header_formats[SNDFILE_HEADER_FORMATS] = { - SF_FORMAT_WAV, - SF_FORMAT_AIFF, - SF_FORMAT_CAF, - SF_FORMAT_W64, - SF_FORMAT_RAW -}; - -const char * const sndfile_bitdepth_formats_strings[SNDFILE_BITDEPTH_FORMATS+1] = { - N_("Signed 16 bit PCM"), - N_("Signed 24 bit PCM"), - N_("Signed 32 bit PCM"), - N_("Signed 8 bit PCM"), - N_("32 bit float"), - 0 -}; - -int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS] = { - SF_FORMAT_PCM_16, - SF_FORMAT_PCM_24, - SF_FORMAT_PCM_32, - SF_FORMAT_PCM_S8, - SF_FORMAT_FLOAT -}; - -const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1] = { - N_("Little-endian (Intel)"), - N_("Big-endian (Mac)"), - 0 -}; - -int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS] = { - SF_ENDIAN_LITTLE, - SF_ENDIAN_BIG -}; - -int -sndfile_header_format_from_string (string str) -{ - for (int n = 0; sndfile_header_formats_strings[n]; ++n) { - if (str == sndfile_header_formats_strings[n]) { - return sndfile_header_formats[n]; - } - } - return -1; -} - -int -sndfile_bitdepth_format_from_string (string str) -{ - for (int n = 0; sndfile_bitdepth_formats_strings[n]; ++n) { - if (str == sndfile_bitdepth_formats_strings[n]) { - return sndfile_bitdepth_formats[n]; - } - } - return -1; -} - -int -sndfile_endian_format_from_string (string str) -{ - for (int n = 0; sndfile_endian_formats_strings[n]; ++n) { - if (str == sndfile_endian_formats_strings[n]) { - return sndfile_endian_formats[n]; - } - } - return -1; -} - -string -sndfile_file_ending_from_string (string str) -{ - static vector file_endings; - - if (file_endings.empty()) { - file_endings = I18N((const char **) sndfile_file_endings_strings); - } - - for (int n = 0; sndfile_header_formats_strings[n]; ++n) { - if (str == sndfile_header_formats_strings[n]) { - return file_endings[n]; - } - } - return 0; -} - -int -sndfile_data_width (int format) -{ - int tval = format & 0xf; - - switch (tval) { - case SF_FORMAT_PCM_S8: - case SF_FORMAT_PCM_U8: - return 8; - case SF_FORMAT_PCM_16: - return 16; - case SF_FORMAT_PCM_24: - return 24; - case SF_FORMAT_PCM_32: - return 32; - case SF_FORMAT_FLOAT: - return 1; // heh, heh - default: - // we don't handle anything else within ardour - return 0; - } -} - -string -sndfile_major_format(int format) -{ - static map m; - - if(m.empty()){ - SF_FORMAT_INFO format_info; - int count; - sf_command(0, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof (int)); - for (int i = 0; i < count; ++i){ - format_info.format = i; - sf_command (0, SFC_GET_FORMAT_MAJOR, - &format_info, sizeof (format_info)); - m[format_info.format & SF_FORMAT_TYPEMASK] = format_info.name; - } - } - - map::iterator p = m.find(format & SF_FORMAT_TYPEMASK); - if(p != m.end()){ - return m[format & SF_FORMAT_TYPEMASK]; - } else { - return "-Unknown-"; - } -} - -string -sndfile_minor_format(int format) -{ - static map m; - - if(m.empty()){ - SF_FORMAT_INFO format_info; - int count; - sf_command(0, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)); - for (int i = 0; i < count; ++i){ - format_info.format = i; - sf_command (0, SFC_GET_FORMAT_SUBTYPE, - &format_info, sizeof (format_info)); - m[format_info.format & SF_FORMAT_SUBMASK] = format_info.name; - } - } - - map::iterator p = m.find(format & SF_FORMAT_SUBMASK); - if(p != m.end()){ - return m[format & SF_FORMAT_SUBMASK]; - } else { - return "-Unknown-"; - } -} - diff --git a/libs/ardour/sndfileimportable.cc b/libs/ardour/sndfileimportable.cc deleted file mode 100644 index eb0e8a8afb..0000000000 --- a/libs/ardour/sndfileimportable.cc +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - -using namespace ARDOUR; -using namespace std; - -SndFileImportableSource::SndFileImportableSource (const string& path) - : in (sf_open (path.c_str(), SFM_READ, &sf_info), sf_close) -{ - if (!in) throw failed_constructor(); -} - -SndFileImportableSource::~SndFileImportableSource () -{ -} - -nframes_t -SndFileImportableSource::read (Sample* buffer, nframes_t nframes) -{ - nframes_t per_channel = nframes / sf_info.channels; - per_channel = sf_readf_float (in.get(), buffer, per_channel); - return per_channel * sf_info.channels; -} - -uint -SndFileImportableSource::channels () const -{ - return sf_info.channels; -} - -nframes_t -SndFileImportableSource::length () const -{ - return sf_info.frames; -} - -nframes_t -SndFileImportableSource::samplerate() const -{ - return sf_info.samplerate; -} - -void -SndFileImportableSource::seek (nframes_t pos) -{ - sf_seek (in.get(), 0, SEEK_SET); -} diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc deleted file mode 100644 index ab090381b4..0000000000 --- a/libs/ardour/sndfilesource.cc +++ /dev/null @@ -1,900 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; -using Glib::ustring; - -gain_t* SndFileSource::out_coefficient = 0; -gain_t* SndFileSource::in_coefficient = 0; -nframes_t SndFileSource::xfade_frames = 64; -const AudioFileSource::Flag SndFileSource::default_writable_flags = AudioFileSource::Flag (AudioFileSource::Writable| - AudioFileSource::Removable| - AudioFileSource::RemovableIfEmpty| - AudioFileSource::CanRename); -SndFileSource::SndFileSource (Session& s, const XMLNode& node) - : AudioFileSource (s, node) -{ - init (); - - if (open()) { - throw failed_constructor (); - } -} - -SndFileSource::SndFileSource (Session& s, ustring path, int chn, Flag flags) - /* files created this way are never writable or removable */ - : AudioFileSource (s, path, Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))) -{ - _channel = chn; - - init (); - - if (open()) { - throw failed_constructor (); - } -} - -SndFileSource::SndFileSource (Session& s, ustring path, SampleFormat sfmt, HeaderFormat hf, nframes_t rate, Flag flags) - : AudioFileSource (s, path, flags, sfmt, hf) -{ - int fmt = 0; - - init (); - - /* this constructor is used to construct new files, not open - existing ones. - */ - - file_is_new = true; - - switch (hf) { - case CAF: - fmt = SF_FORMAT_CAF; - _flags = Flag (_flags & ~Broadcast); - break; - - case AIFF: - fmt = SF_FORMAT_AIFF; - _flags = Flag (_flags & ~Broadcast); - break; - - case BWF: - fmt = SF_FORMAT_WAV; - _flags = Flag (_flags | Broadcast); - break; - - case WAVE: - fmt = SF_FORMAT_WAV; - _flags = Flag (_flags & ~Broadcast); - break; - - case WAVE64: - fmt = SF_FORMAT_W64; - _flags = Flag (_flags & ~Broadcast); - break; - - default: - fatal << string_compose (_("programming error: %1"), X_("unsupported audio header format requested")) << endmsg; - /*NOTREACHED*/ - break; - - } - - switch (sfmt) { - case FormatFloat: - fmt |= SF_FORMAT_FLOAT; - break; - - case FormatInt24: - fmt |= SF_FORMAT_PCM_24; - break; - - case FormatInt16: - fmt |= SF_FORMAT_PCM_16; - break; - } - - _info.channels = 1; - _info.samplerate = rate; - _info.format = fmt; - - if (open()) { - throw failed_constructor(); - } - - if (writable() && (_flags & Broadcast)) { - - _broadcast_info = new SF_BROADCAST_INFO; - memset (_broadcast_info, 0, sizeof (*_broadcast_info)); - - snprintf (_broadcast_info->description, sizeof (_broadcast_info->description), "BWF %s", _name.c_str()); - - struct utsname utsinfo; - - if (uname (&utsinfo)) { - error << string_compose(_("FileSource: cannot get host information for BWF header (%1)"), strerror(errno)) << endmsg; - return; - } - - snprintf (_broadcast_info->originator, sizeof (_broadcast_info->originator), "ardour:%s:%s:%s:%s:%s)", - Glib::get_real_name().c_str(), - utsinfo.nodename, - utsinfo.sysname, - utsinfo.release, - utsinfo.version); - - _broadcast_info->version = 1; - _broadcast_info->time_reference_low = 0; - _broadcast_info->time_reference_high = 0; - - /* XXX do something about this field */ - - snprintf (_broadcast_info->umid, sizeof (_broadcast_info->umid), "%s", "fnord"); - - /* coding history is added by libsndfile */ - - if (sf_command (sf, SFC_SET_BROADCAST_INFO, _broadcast_info, sizeof (_broadcast_info)) != SF_TRUE) { - char errbuf[256]; - sf_error_str (0, errbuf, sizeof (errbuf) - 1); - error << string_compose (_("cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file"), _path, errbuf) << endmsg; - _flags = Flag (_flags & ~Broadcast); - delete _broadcast_info; - _broadcast_info = 0; - } - } -} - -void -SndFileSource::init () -{ - ustring file; - - // lets try to keep the object initalizations here at the top - xfade_buf = 0; - sf = 0; - _broadcast_info = 0; - - if (is_embedded()) { - _name = _path; - } else { - _name = Glib::path_get_basename (_path); - } - - /* although libsndfile says we don't need to set this, - valgrind and source code shows us that we do. - */ - - memset (&_info, 0, sizeof(_info)); - - _capture_start = false; - _capture_end = false; - file_pos = 0; - - if (destructive()) { - xfade_buf = new Sample[xfade_frames]; - timeline_position = header_position_offset; - } - - AudioFileSource::HeaderPositionOffsetChanged.connect (mem_fun (*this, &SndFileSource::handle_header_position_change)); -} - -int -SndFileSource::open () -{ - if ((sf = sf_open (_path.c_str(), (writable() ? SFM_RDWR : SFM_READ), &_info)) == 0) { - char errbuf[256]; - sf_error_str (0, errbuf, sizeof (errbuf) - 1); -#ifndef HAVE_COREAUDIO - /* if we have CoreAudio, we will be falling back to that if libsndfile fails, - so we don't want to see this message. - */ - - error << string_compose(_("SndFileSource: cannot open file \"%1\" for %2 (%3)"), - _path, (writable() ? "read+write" : "reading"), errbuf) << endmsg; -#endif - return -1; - } - - if (_channel >= _info.channels) { -#ifndef HAVE_COREAUDIO - error << string_compose(_("SndFileSource: file only contains %1 channels; %2 is invalid as a channel number"), _info.channels, _channel) << endmsg; -#endif - sf_close (sf); - sf = 0; - return -1; - } - - _length = _info.frames; - - _broadcast_info = new SF_BROADCAST_INFO; - memset (_broadcast_info, 0, sizeof (*_broadcast_info)); - - bool timecode_info_exists; - - set_timeline_position (get_timecode_info (sf, _broadcast_info, timecode_info_exists)); - - if (_length != 0 && !timecode_info_exists) { - delete _broadcast_info; - _broadcast_info = 0; - _flags = Flag (_flags & ~Broadcast); - } - - if (writable()) { - sf_command (sf, SFC_SET_UPDATE_HEADER_AUTO, 0, SF_FALSE); - } - - return 0; -} - -SndFileSource::~SndFileSource () -{ - GoingAway (); /* EMIT SIGNAL */ - - if (sf) { - sf_close (sf); - sf = 0; - - /* stupid libsndfile updated the headers on close, - so touch the peakfile if it exists and has data - to make sure its time is as new as the audio - file. - */ - - touch_peakfile (); - } - - if (_broadcast_info) { - delete _broadcast_info; - } - - if (xfade_buf) { - delete [] xfade_buf; - } -} - -float -SndFileSource::sample_rate () const -{ - return _info.samplerate; -} - -nframes_t -SndFileSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const -{ - int32_t nread; - float *ptr; - uint32_t real_cnt; - nframes_t file_cnt; - - if (start > _length) { - - /* read starts beyond end of data, just memset to zero */ - - file_cnt = 0; - - } else if (start + cnt > _length) { - - /* read ends beyond end of data, read some, memset the rest */ - - file_cnt = _length - start; - - } else { - - /* read is entirely within data */ - - file_cnt = cnt; - } - - if (file_cnt != cnt) { - nframes_t delta = cnt - file_cnt; - memset (dst+file_cnt, 0, sizeof (Sample) * delta); - } - - if (file_cnt) { - - if (sf_seek (sf, (sf_count_t) start, SEEK_SET|SFM_READ) != (sf_count_t) start) { - char errbuf[256]; - sf_error_str (0, errbuf, sizeof (errbuf) - 1); - error << string_compose(_("SndFileSource: could not seek to frame %1 within %2 (%3)"), start, _name.substr (1), errbuf) << endmsg; - return 0; - } - - if (_info.channels == 1) { - nframes_t ret = sf_read_float (sf, dst, file_cnt); - _read_data_count = cnt * sizeof(float); - return ret; - } - } - - real_cnt = cnt * _info.channels; - - Sample* interleave_buf = get_interleave_buffer (real_cnt); - - nread = sf_read_float (sf, interleave_buf, real_cnt); - ptr = interleave_buf + _channel; - nread /= _info.channels; - - /* stride through the interleaved data */ - - for (int32_t n = 0; n < nread; ++n) { - dst[n] = *ptr; - ptr += _info.channels; - } - - _read_data_count = cnt * sizeof(float); - - return nread; -} - -nframes_t -SndFileSource::write_unlocked (Sample *data, nframes_t cnt) -{ - if (destructive()) { - return destructive_write_unlocked (data, cnt); - } else { - return nondestructive_write_unlocked (data, cnt); - } -} - -nframes_t -SndFileSource::nondestructive_write_unlocked (Sample *data, nframes_t cnt) -{ - if (!writable()) { - warning << string_compose (_("attempt to write a non-writable audio file source (%1)"), _path) << endmsg; - return 0; - } - - if (_info.channels != 1) { - fatal << string_compose (_("programming error: %1 %2"), X_("SndFileSource::write called on non-mono file"), _path) << endmsg; - /*NOTREACHED*/ - return 0; - } - - nframes_t oldlen; - int32_t frame_pos = _length; - - if (write_float (data, frame_pos, cnt) != cnt) { - return 0; - } - - oldlen = _length; - update_length (oldlen, cnt); - - if (_build_peakfiles) { - compute_and_write_peaks (data, frame_pos, cnt, false, true); - } - - _write_data_count = cnt; - - return cnt; -} - -nframes_t -SndFileSource::destructive_write_unlocked (Sample* data, nframes_t cnt) -{ - nframes_t old_file_pos; - - if (!writable()) { - warning << string_compose (_("attempt to write a non-writable audio file source (%1)"), _path) << endmsg; - return 0; - } - - if (_capture_start && _capture_end) { - - /* start and end of capture both occur within the data we are writing, - so do both crossfades. - */ - - _capture_start = false; - _capture_end = false; - - /* move to the correct location place */ - file_pos = capture_start_frame - timeline_position; - - // split cnt in half - nframes_t subcnt = cnt / 2; - nframes_t ofilepos = file_pos; - - // fade in - if (crossfade (data, subcnt, 1) != subcnt) { - return 0; - } - - file_pos += subcnt; - Sample * tmpdata = data + subcnt; - - // fade out - subcnt = cnt - subcnt; - if (crossfade (tmpdata, subcnt, 0) != subcnt) { - return 0; - } - - file_pos = ofilepos; // adjusted below - - } else if (_capture_start) { - - /* start of capture both occur within the data we are writing, - so do the fade in - */ - - _capture_start = false; - _capture_end = false; - - /* move to the correct location place */ - file_pos = capture_start_frame - timeline_position; - - if (crossfade (data, cnt, 1) != cnt) { - return 0; - } - - } else if (_capture_end) { - - /* end of capture both occur within the data we are writing, - so do the fade out - */ - - _capture_start = false; - _capture_end = false; - - if (crossfade (data, cnt, 0) != cnt) { - return 0; - } - - } else { - - /* in the middle of recording */ - - if (write_float (data, file_pos, cnt) != cnt) { - return 0; - } - } - - old_file_pos = file_pos; - update_length (file_pos, cnt); - - if (_build_peakfiles) { - compute_and_write_peaks (data, file_pos, cnt, false, true); - } - - file_pos += cnt; - - return cnt; -} - -int -SndFileSource::update_header (nframes_t when, struct tm& now, time_t tnow) -{ - set_timeline_position (when); - - if (_flags & Broadcast) { - if (setup_broadcast_info (when, now, tnow)) { - return -1; - } - } - - return flush_header (); -} - -int -SndFileSource::flush_header () -{ - if (!writable() || (sf == 0)) { - warning << string_compose (_("attempt to flush a non-writable audio file source (%1)"), _path) << endmsg; - return -1; - } - return (sf_command (sf, SFC_UPDATE_HEADER_NOW, 0, 0) != SF_TRUE); -} - -int -SndFileSource::setup_broadcast_info (nframes_t when, struct tm& now, time_t tnow) -{ - if (!writable()) { - warning << string_compose (_("attempt to store broadcast info in a non-writable audio file source (%1)"), _path) << endmsg; - return -1; - } - - if (!(_flags & Broadcast)) { - return 0; - } - - /* random code is 9 digits */ - - int random_code = random() % 999999999; - - snprintf (_broadcast_info->originator_reference, sizeof (_broadcast_info->originator_reference), "%2s%3s%12s%02d%02d%02d%9d", - Config->get_bwf_country_code().c_str(), - Config->get_bwf_organization_code().c_str(), - bwf_serial_number, - now.tm_hour, - now.tm_min, - now.tm_sec, - random_code); - - snprintf (_broadcast_info->origination_date, sizeof (_broadcast_info->origination_date), "%4d-%02d-%02d", - 1900 + now.tm_year, - now.tm_mon, - now.tm_mday); - - snprintf (_broadcast_info->origination_time, sizeof (_broadcast_info->origination_time), "%02d:%02d:%02d", - now.tm_hour, - now.tm_min, - now.tm_sec); - - /* now update header position taking header offset into account */ - - set_header_timeline_position (); - - if (sf_command (sf, SFC_SET_BROADCAST_INFO, _broadcast_info, sizeof (*_broadcast_info)) != SF_TRUE) { - error << string_compose (_("cannot set broadcast info for audio file %1; Dropping broadcast info for this file"), _path) << endmsg; - _flags = Flag (_flags & ~Broadcast); - delete _broadcast_info; - _broadcast_info = 0; - return -1; - } - - return 0; -} - -void -SndFileSource::set_header_timeline_position () -{ - if (!(_flags & Broadcast)) { - return; - } - - _broadcast_info->time_reference_high = (timeline_position >> 32); - _broadcast_info->time_reference_low = (timeline_position & 0xffffffff); - - if (sf_command (sf, SFC_SET_BROADCAST_INFO, _broadcast_info, sizeof (*_broadcast_info)) != SF_TRUE) { - error << string_compose (_("cannot set broadcast info for audio file %1; Dropping broadcast info for this file"), _path) << endmsg; - _flags = Flag (_flags & ~Broadcast); - delete _broadcast_info; - _broadcast_info = 0; - } -} - -nframes_t -SndFileSource::write_float (Sample* data, nframes_t frame_pos, nframes_t cnt) -{ - if (sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) < 0) { - char errbuf[256]; - sf_error_str (0, errbuf, sizeof (errbuf) - 1); - error << string_compose (_("%1: cannot seek to %2 (libsndfile error: %3"), _path, frame_pos, errbuf) << endmsg; - return 0; - } - - if (sf_writef_float (sf, data, cnt) != (ssize_t) cnt) { - return 0; - } - - return cnt; -} - -nframes_t -SndFileSource::natural_position() const -{ - return timeline_position; -} - -bool -SndFileSource::set_destructive (bool yn) -{ - if (yn) { - _flags = Flag (_flags | Destructive); - if (!xfade_buf) { - xfade_buf = new Sample[xfade_frames]; - } - clear_capture_marks (); - timeline_position = header_position_offset; - } else { - _flags = Flag (_flags & ~Destructive); - timeline_position = 0; - /* leave xfade buf alone in case we need it again later */ - } - - return true; -} - -void -SndFileSource::clear_capture_marks () -{ - _capture_start = false; - _capture_end = false; -} - -void -SndFileSource::mark_capture_start (nframes_t pos) -{ - if (destructive()) { - if (pos < timeline_position) { - _capture_start = false; - } else { - _capture_start = true; - capture_start_frame = pos; - } - } -} - -void -SndFileSource::mark_capture_end() -{ - if (destructive()) { - _capture_end = true; - } -} - -nframes_t -SndFileSource::crossfade (Sample* data, nframes_t cnt, int fade_in) -{ - nframes_t xfade = min (xfade_frames, cnt); - nframes_t nofade = cnt - xfade; - Sample* fade_data = 0; - nframes_t fade_position = 0; // in frames - ssize_t retval; - nframes_t file_cnt; - - if (fade_in) { - fade_position = file_pos; - fade_data = data; - } else { - fade_position = file_pos + nofade; - fade_data = data + nofade; - } - - if (fade_position > _length) { - - /* read starts beyond end of data, just memset to zero */ - - file_cnt = 0; - - } else if (fade_position + xfade > _length) { - - /* read ends beyond end of data, read some, memset the rest */ - - file_cnt = _length - fade_position; - - } else { - - /* read is entirely within data */ - - file_cnt = xfade; - } - - if (file_cnt) { - - if ((retval = read_unlocked (xfade_buf, fade_position, file_cnt)) != (ssize_t) file_cnt) { - if (retval >= 0 && errno == EAGAIN) { - /* XXX - can we really trust that errno is meaningful here? yes POSIX, i'm talking to you. - * short or no data there */ - memset (xfade_buf, 0, xfade * sizeof(Sample)); - } else { - error << string_compose(_("SndFileSource: \"%1\" bad read retval: %2 of %5 (%3: %4)"), _path, retval, errno, strerror (errno), xfade) << endmsg; - return 0; - } - } - } - - if (file_cnt != xfade) { - nframes_t delta = xfade - file_cnt; - memset (xfade_buf+file_cnt, 0, sizeof (Sample) * delta); - } - - if (nofade && !fade_in) { - if (write_float (data, file_pos, nofade) != nofade) { - error << string_compose(_("SndFileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg; - return 0; - } - } - - if (xfade == xfade_frames) { - - nframes_t n; - - /* use the standard xfade curve */ - - if (fade_in) { - - /* fade new material in */ - - for (n = 0; n < xfade; ++n) { - xfade_buf[n] = (xfade_buf[n] * out_coefficient[n]) + (fade_data[n] * in_coefficient[n]); - } - - } else { - - - /* fade new material out */ - - for (n = 0; n < xfade; ++n) { - xfade_buf[n] = (xfade_buf[n] * in_coefficient[n]) + (fade_data[n] * out_coefficient[n]); - } - } - - } else if (xfade < xfade_frames) { - - gain_t in[xfade]; - gain_t out[xfade]; - - /* short xfade, compute custom curve */ - - compute_equal_power_fades (xfade, in, out); - - for (nframes_t n = 0; n < xfade; ++n) { - xfade_buf[n] = (xfade_buf[n] * out[n]) + (fade_data[n] * in[n]); - } - - } else if (xfade) { - - /* long xfade length, has to be computed across several calls */ - - } - - if (xfade) { - if (write_float (xfade_buf, fade_position, xfade) != xfade) { - error << string_compose(_("SndFileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg; - return 0; - } - } - - if (fade_in && nofade) { - if (write_float (data + xfade, file_pos + xfade, nofade) != nofade) { - error << string_compose(_("SndFileSource: \"%1\" bad write (%2)"), _path, strerror (errno)) << endmsg; - return 0; - } - } - - return cnt; -} - -nframes_t -SndFileSource::last_capture_start_frame () const -{ - if (destructive()) { - return capture_start_frame; - } else { - return 0; - } -} - -void -SndFileSource::handle_header_position_change () -{ - if (destructive()) { - if ( _length != 0 ) { - error << string_compose(_("Filesource: start time is already set for existing file (%1): Cannot change start time."), _path ) << endmsg; - //in the future, pop up a dialog here that allows user to regenerate file with new start offset - } else if (writable()) { - timeline_position = header_position_offset; - set_header_timeline_position (); //this will get flushed if/when the file is recorded to - } - } -} - -void -SndFileSource::setup_standard_crossfades (nframes_t rate) -{ - /* This static method is assumed to have been called by the Session - before any DFS's are created. - */ - - xfade_frames = (nframes_t) floor ((Config->get_destructive_xfade_msecs () / 1000.0) * rate); - - if (out_coefficient) { - delete [] out_coefficient; - } - - if (in_coefficient) { - delete [] in_coefficient; - } - - out_coefficient = new gain_t[xfade_frames]; - in_coefficient = new gain_t[xfade_frames]; - - compute_equal_power_fades (xfade_frames, in_coefficient, out_coefficient); -} - -void -SndFileSource::set_timeline_position (int64_t pos) -{ - // destructive track timeline postion does not change - // except at instantion or when header_position_offset - // (session start) changes - - if (!destructive()) { - AudioFileSource::set_timeline_position (pos); - } -} - -int -SndFileSource::get_soundfile_info (const ustring& path, SoundFileInfo& info, string& error_msg) -{ - SNDFILE *sf; - SF_INFO sf_info; - SF_BROADCAST_INFO binfo; - bool timecode_exists; - - sf_info.format = 0; // libsndfile says to clear this before sf_open(). - - if ((sf = sf_open ((char*) path.c_str(), SFM_READ, &sf_info)) == 0) { - char errbuf[256]; - error_msg = sf_error_str (0, errbuf, sizeof (errbuf) - 1); - return false; - } - - info.samplerate = sf_info.samplerate; - info.channels = sf_info.channels; - info.length = sf_info.frames; - info.format_name = string_compose("Format: %1, %2", - sndfile_major_format(sf_info.format), - sndfile_minor_format(sf_info.format)); - - memset (&binfo, 0, sizeof (binfo)); - info.timecode = get_timecode_info (sf, &binfo, timecode_exists); - - if (!timecode_exists) { - info.timecode = 0; - } - - sf_close (sf); - - return true; -} - -int64_t -SndFileSource::get_timecode_info (SNDFILE* sf, SF_BROADCAST_INFO* binfo, bool& exists) -{ - if (sf_command (sf, SFC_GET_BROADCAST_INFO, binfo, sizeof (*binfo)) != SF_TRUE) { - exists = false; - return (header_position_offset); - } - - /* XXX 64 bit alert: when JACK switches to a 64 bit frame count, this needs to use the high bits - of the time reference. - */ - - exists = true; - int64_t ret = (uint32_t) binfo->time_reference_high; - ret <<= 32; - ret |= (uint32_t) binfo->time_reference_low; - return ret; -} - -bool -SndFileSource::one_of_several_channels () const -{ - return _info.channels > 1; -} - diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc deleted file mode 100644 index f08d08b86e..0000000000 --- a/libs/ardour/source.cc +++ /dev/null @@ -1,269 +0,0 @@ -/* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; - -Source::Source (Session& s, const string& name, DataType type) - : SessionObject(s, name) - , _type(type) -{ - // not true.. is this supposed to be an assertion? - //assert(_name.find("/") == string::npos); - - _analysed = false; - _timestamp = 0; - _length = 0; - _in_use = 0; -} - -Source::Source (Session& s, const XMLNode& node) - : SessionObject(s, "unnamed source") - , _type(DataType::AUDIO) -{ - _timestamp = 0; - _length = 0; - _analysed = false; - _in_use = 0; - - if (set_state (node) || _type == DataType::NIL) { - throw failed_constructor(); - } -} - -Source::~Source () -{ - notify_callbacks (); -} - -XMLNode& -Source::get_state () -{ - XMLNode *node = new XMLNode ("Source"); - char buf[64]; - - node->add_property ("name", _name); - node->add_property ("type", _type.to_string()); - _id.print (buf, sizeof (buf)); - node->add_property ("id", buf); - - if (_timestamp != 0) { - snprintf (buf, sizeof (buf), "%ld", _timestamp); - node->add_property ("timestamp", buf); - } - - return *node; -} - -int -Source::set_state (const XMLNode& node) -{ - const XMLProperty* prop; - - if ((prop = node.property ("name")) != 0) { - _name = prop->value(); - } else { - return -1; - } - - if ((prop = node.property ("id")) != 0) { - _id = prop->value (); - } else { - return -1; - } - - if ((prop = node.property ("type")) != 0) { - _type = DataType(prop->value()); - } - - if ((prop = node.property ("timestamp")) != 0) { - sscanf (prop->value().c_str(), "%ld", &_timestamp); - } - - // Don't think this is valid, absolute paths fail - //assert(_name.find("/") == string::npos); - - return 0; -} - -void -Source::update_length (nframes_t pos, nframes_t cnt) -{ - if (pos + cnt > _length) { - _length = pos+cnt; - } -} - -void -Source::add_playlist (boost::shared_ptr pl) -{ - std::pair res; - std::pair, uint32_t> newpair (pl, 1); - Glib::Mutex::Lock lm (_playlist_lock); - - res = _playlists.insert (newpair); - - if (!res.second) { - /* it already existed, bump count */ - res.first->second++; - } - - pl->GoingAway.connect (bind (mem_fun (*this, &Source::remove_playlist), boost::weak_ptr (pl))); -} - -void -Source::remove_playlist (boost::weak_ptr wpl) -{ - boost::shared_ptr pl (wpl.lock()); - - if (!pl) { - return; - } - - PlaylistMap::iterator x; - Glib::Mutex::Lock lm (_playlist_lock); - - if ((x = _playlists.find (pl)) != _playlists.end()) { - if (x->second > 1) { - x->second--; - } else { - _playlists.erase (x); - } - } -} - -uint32_t -Source::used () const -{ - return _playlists.size(); -} - -bool -Source::has_been_analysed() const -{ - Glib::Mutex::Lock lm (_analysis_lock); - return _analysed; -} - -void -Source::set_been_analysed (bool yn) -{ - { - Glib::Mutex::Lock lm (_analysis_lock); - _analysed = yn; - } - - if (yn) { - load_transients (get_transients_path()); - AnalysisChanged(); // EMIT SIGNAL - } -} - -int -Source::load_transients (const string& path) -{ - ifstream file (path.c_str()); - - if (!file) { - return -1; - } - - transients.clear (); - - stringstream strstr; - double val; - - while (file.good()) { - file >> val; - - if (!file.fail()) { - nframes64_t frame = (nframes64_t) floor (val * _session.frame_rate()); - transients.push_back (frame); - } - } - - return 0; -} - -string -Source::get_transients_path () const -{ - vector parts; - string s; - - /* old sessions may not have the analysis directory */ - - _session.ensure_subdirs (); - - s = _session.analysis_dir (); - parts.push_back (s); - - s = _id.to_s(); - s += '.'; - s += TransientDetector::operational_identifier(); - parts.push_back (s); - - return Glib::build_filename (parts); -} - -bool -Source::check_for_analysis_data_on_disk () -{ - /* looks to see if the analysis files for this source are on disk. - if so, mark us already analysed. - */ - - string path = get_transients_path (); - bool ok = true; - - if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS)) { - ok = false; - } - - // XXX add other tests here as appropriate - - set_been_analysed (ok); - return ok; -} - diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc deleted file mode 100644 index 5338997659..0000000000 --- a/libs/ardour/source_factory.cc +++ /dev/null @@ -1,278 +0,0 @@ -/* - Copyright (C) 2000-2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef HAVE_COREAUDIO -#define USE_COREAUDIO_FOR_FILES -#endif - -#ifdef USE_COREAUDIO_FOR_FILES -#include -#endif - - -#include "i18n.h" - -using namespace ARDOUR; -using namespace std; -using namespace PBD; - -sigc::signal > SourceFactory::SourceCreated; -Glib::Cond* SourceFactory::PeaksToBuild; -Glib::StaticMutex SourceFactory::peak_building_lock = GLIBMM_STATIC_MUTEX_INIT; -std::list > SourceFactory::files_with_peaks; - -static void -peak_thread_work () -{ - PBD::ThreadCreated (pthread_self(), string ("peakbuilder-") + to_string (pthread_self(), std::dec)); - - while (true) { - - SourceFactory::peak_building_lock.lock (); - - wait: - if (SourceFactory::files_with_peaks.empty()) { - SourceFactory::PeaksToBuild->wait (SourceFactory::peak_building_lock); - } - - if (SourceFactory::files_with_peaks.empty()) { - goto wait; - } - - boost::shared_ptr as (SourceFactory::files_with_peaks.front().lock()); - SourceFactory::files_with_peaks.pop_front (); - SourceFactory::peak_building_lock.unlock (); - - if (!as) { - continue; - } - - as->setup_peakfile (); - } -} - -void -SourceFactory::init () -{ - PeaksToBuild = new Glib::Cond(); - - for (int n = 0; n < 2; ++n) { - Glib::Thread::create (sigc::ptr_fun (::peak_thread_work), false); - } -} - -int -SourceFactory::setup_peakfile (boost::shared_ptr s, bool async) -{ - boost::shared_ptr as (boost::dynamic_pointer_cast (s)); - - if (as) { - - if (async) { - - Glib::Mutex::Lock lm (peak_building_lock); - files_with_peaks.push_back (boost::weak_ptr (as)); - PeaksToBuild->broadcast (); - - } else { - - if (as->setup_peakfile ()) { - error << string_compose("SourceFactory: could not set up peakfile for %1", as->name()) << endmsg; - return -1; - } - } - } - - return 0; -} - -boost::shared_ptr -SourceFactory::createSilent (Session& s, const XMLNode& node, nframes_t nframes, float sr) -{ - boost::shared_ptr ret (new SilentFileSource (s, node, nframes, sr)); - // no analysis data - the file is non-existent - SourceCreated (ret); - return ret; -} - -boost::shared_ptr -SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) -{ - DataType type = DataType::AUDIO; - const XMLProperty* prop = node.property("type"); - - if (prop) { - type = DataType(prop->value()); - } - - if (type == DataType::AUDIO) { - - try { - - boost::shared_ptr ret (new SndFileSource (s, node)); - if (setup_peakfile (ret, defer_peaks)) { - return boost::shared_ptr(); - } - ret->check_for_analysis_data_on_disk (); - SourceCreated (ret); - return ret; - } - - catch (failed_constructor& err) { - -#ifdef USE_COREAUDIO_FOR_FILES - - /* this is allowed to throw */ - - boost::shared_ptr ret (new CoreAudioSource (s, node)); - - if (setup_peakfile (ret, defer_peaks)) { - return boost::shared_ptr(); - } - - ret->check_for_analysis_data_on_disk (); - SourceCreated (ret); - return ret; -#else - throw; // rethrow -#endif - } - - } else if (type == DataType::MIDI) { - boost::shared_ptr ret (new SMFSource (s, node)); - ret->check_for_analysis_data_on_disk (); - SourceCreated (ret); - return ret; - } - - return boost::shared_ptr(); -} - -boost::shared_ptr -SourceFactory::createReadable (DataType type, Session& s, string path, int chn, AudioFileSource::Flag flags, bool announce, bool defer_peaks) -{ - if (type == DataType::AUDIO) { - - if (!(flags & Destructive)) { - - try { - - boost::shared_ptr ret (new SndFileSource (s, path, chn, flags)); - - if (setup_peakfile (ret, defer_peaks)) { - return boost::shared_ptr(); - } - - ret->check_for_analysis_data_on_disk (); - if (announce) { - SourceCreated (ret); - } - return ret; - } - - catch (failed_constructor& err) { -#ifdef USE_COREAUDIO_FOR_FILES - - boost::shared_ptr ret (new CoreAudioSource (s, path, chn, flags)); - if (setup_peakfile (ret, defer_peaks)) { - return boost::shared_ptr(); - } - ret->check_for_analysis_data_on_disk (); - if (announce) { - SourceCreated (ret); - } - return ret; - -#else - throw; // rethrow -#endif - } - - } else { - // eh? - } - - } else if (type == DataType::MIDI) { - - // FIXME: flags? - boost::shared_ptr ret (new SMFSource (s, path, SMFSource::Flag(0))); - - if (announce) { - SourceCreated (ret); - } - - return ret; - - } - - return boost::shared_ptr(); -} - -boost::shared_ptr -SourceFactory::createWritable (DataType type, Session& s, std::string path, bool destructive, nframes_t rate, bool announce, bool defer_peaks) -{ - /* this might throw failed_constructor(), which is OK */ - - if (type == DataType::AUDIO) { - boost::shared_ptr ret (new SndFileSource - (s, path, - Config->get_native_file_data_format(), - Config->get_native_file_header_format(), - rate, - (destructive ? AudioFileSource::Flag (SndFileSource::default_writable_flags | AudioFileSource::Destructive) : - SndFileSource::default_writable_flags))); - - if (setup_peakfile (ret, defer_peaks)) { - return boost::shared_ptr(); - } - - // no analysis data - this is a new file - - if (announce) { - SourceCreated (ret); - } - return ret; - - } else if (type == DataType::MIDI) { - - boost::shared_ptr ret (new SMFSource (s, path)); - - // no analysis data - this is a new file - - if (announce) { - SourceCreated (ret); - } - return ret; - - } - - return boost::shared_ptr (); -} diff --git a/libs/ardour/sse_functions.s b/libs/ardour/sse_functions.s deleted file mode 100644 index 934ce6887a..0000000000 --- a/libs/ardour/sse_functions.s +++ /dev/null @@ -1,531 +0,0 @@ -/* - Copyright (C) 2005 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Author: Sampo Savolainen - - $Id$ -*/ - - -#; void x86_sse_mix_buffers_with_gain (float *dst, float *src, long nframes, float gain); - -.globl x86_sse_mix_buffers_with_gain - .type x86_sse_mix_buffers_with_gain,@function - -x86_sse_mix_buffers_with_gain: -#; 8(%ebp) = float *dst = %edi -#; 12(%ebp) = float *src = %esi -#; 16(%ebp) = long nframes = %ecx -#; 20(%ebp) = float gain = st(0) - - pushl %ebp - movl %esp, %ebp - - #; save the registers -#; pushl %eax - pushl %ebx -#; pushl %ecx - pushl %edi - pushl %esi - - #; if nframes == 0, go to end - movl 16(%ebp), %ecx #; nframes - cmp $0, %ecx - je .MBWG_END - - #; Check for alignment - - movl 8(%ebp), %edi #; dst - movl 12(%ebp), %esi #; src - - movl %edi, %eax - andl $12, %eax #; mask alignemnt offset - - movl %esi, %ebx - andl $12, %ebx #; mask alignment offset - - cmp %eax, %ebx - jne .MBWG_NONALIGN #; if not aligned, calculate manually - - #; if we are aligned - cmp $0, %ebx - jz .MBWG_SSE - - #; Pre-loop, we need to run 1-3 frames "manually" without - #; SSE instructions - - movss 20(%ebp), %xmm1 #; xmm1 - -.MBWG_PRELOOP: - - movss (%esi), %xmm0 - mulss %xmm1, %xmm0 - addss (%edi), %xmm0 - movss %xmm0, (%edi) - - addl $4, %edi #; dst++ - addl $4, %esi #; src++ - decl %ecx #; nframes-- - jz .MBWG_END - -#; cmp $0, %ecx -#; je .MBWG_END #; if we run out of frames, go to end - - addl $4, %ebx - - cmp $16, %ebx #; test if we've reached 16 byte alignment - jne .MBWG_PRELOOP - - -.MBWG_SSE: - - cmp $4, %ecx #; we know it's not zero, but if it's not >=4, then - jnge .MBWG_NONALIGN #; we jump straight to the "normal" code - - #; copy gain to fill %xmm1 - movss 20(%ebp), %xmm1 - shufps $0x00, %xmm1, %xmm1 - - -.MBWG_SSELOOP: - - movaps (%esi), %xmm0 #; source => xmm0 - mulps %xmm1, %xmm0 #; apply gain to source - addps (%edi), %xmm0 #; mix with destination - movaps %xmm0, (%edi) #; copy result to destination - - addl $16, %edi #; dst+=4 - addl $16, %esi #; src+=4 - - subl $4, %ecx #; nframes-=4 - cmp $4, %ecx - jge .MBWG_SSELOOP - - cmp $0, %ecx - je .MBWG_END - - #; if there are remaining frames, the nonalign code will do nicely - #; for the rest 1-3 frames. - -.MBWG_NONALIGN: - #; not aligned! - - movss 20(%ebp), %xmm1 #; gain => xmm1 - -.MBWG_NONALIGNLOOP: - - movss (%esi), %xmm0 - mulss %xmm1, %xmm0 - addss (%edi), %xmm0 - movss %xmm0, (%edi) - - addl $4, %edi - addl $4, %esi - - decl %ecx - jnz .MBWG_NONALIGNLOOP - -.MBWG_END: - - popl %esi - popl %edi -#; popl %ecx - popl %ebx -#; popl %eax - - #; return - leave - ret - -.size x86_sse_mix_buffers_with_gain, .-x86_sse_mix_buffers_with_gain - - - - -#; void x86_sse_mix_buffers_no_gain (float *dst, float *src, long nframes); - -.globl x86_sse_mix_buffers_no_gain - .type x86_sse_mix_buffers_no_gain,@function - -x86_sse_mix_buffers_no_gain: -#; 8(%ebp) = float *dst = %edi -#; 12(%ebp) = float *src = %esi -#; 16(%ebp) = long nframes = %ecx - - pushl %ebp - movl %esp, %ebp - - #; save the registers -#; pushl %eax - pushl %ebx -#; pushl %ecx - pushl %edi - pushl %esi - - #; the real function - - #; if nframes == 0, go to end - movl 16(%ebp), %ecx #; nframes - cmp $0, %ecx - je .MBNG_END - - #; Check for alignment - - movl 8(%ebp), %edi #; dst - movl 12(%ebp), %esi #; src - - movl %edi, %eax - andl $12, %eax #; mask alignemnt offset - - movl %esi, %ebx - andl $12, %ebx #; mask alignment offset - - cmp %eax, %ebx - jne .MBNG_NONALIGN #; if not aligned, calculate manually - - cmp $0, %ebx - je .MBNG_SSE - - #; Pre-loop, we need to run 1-3 frames "manually" without - #; SSE instructions - -.MBNG_PRELOOP: - - movss (%esi), %xmm0 - addss (%edi), %xmm0 - movss %xmm0, (%edi) - - addl $4, %edi #; dst++ - addl $4, %esi #; src++ - decl %ecx #; nframes-- - jz .MBNG_END - addl $4, %ebx - - cmp $16, %ebx #; test if we've reached 16 byte alignment - jne .MBNG_PRELOOP - -.MBNG_SSE: - - cmp $4, %ecx #; if there are frames left, but less than 4 - jnge .MBNG_NONALIGN #; we can't run SSE - -.MBNG_SSELOOP: - - movaps (%esi), %xmm0 #; source => xmm0 - addps (%edi), %xmm0 #; mix with destination - movaps %xmm0, (%edi) #; copy result to destination - - addl $16, %edi #; dst+=4 - addl $16, %esi #; src+=4 - - subl $4, %ecx #; nframes-=4 - cmp $4, %ecx - jge .MBNG_SSELOOP - - cmp $0, %ecx - je .MBNG_END - - #; if there are remaining frames, the nonalign code will do nicely - #; for the rest 1-3 frames. - -.MBNG_NONALIGN: - #; not aligned! - - movss (%esi), %xmm0 #; src => xmm0 - addss (%edi), %xmm0 #; xmm0 += dst - movss %xmm0, (%edi) #; xmm0 => dst - - addl $4, %edi - addl $4, %esi - - decl %ecx - jnz .MBNG_NONALIGN - -.MBNG_END: - - popl %esi - popl %edi -#; popl %ecx - popl %ebx -#; popl %eax - - #; return - leave - ret - -.size x86_sse_mix_buffers_no_gain, .-x86_sse_mix_buffers_no_gain - - - - -#; void x86_sse_apply_gain_to_buffer (float *buf, long nframes, float gain); - -.globl x86_sse_apply_gain_to_buffer - .type x86_sse_apply_gain_to_buffer,@function - -x86_sse_apply_gain_to_buffer: -#; 8(%ebp) = float *buf = %edi -#; 12(%ebp) = long nframes = %ecx -#; 16(%ebp) = float gain = st(0) - - pushl %ebp - movl %esp, %ebp - - #; save %edi - pushl %edi - - #; the real function - - #; if nframes == 0, go to end - movl 12(%ebp), %ecx #; nframes - cmp $0, %ecx - je .AG_END - - #; create the gain buffer in %xmm1 - movss 16(%ebp), %xmm1 - shufps $0x00, %xmm1, %xmm1 - - #; Check for alignment - - movl 8(%ebp), %edi #; buf - movl %edi, %edx #; buf => %edx - andl $12, %edx #; mask bits 1 & 2, result = 0, 4, 8 or 12 - jz .AG_SSE #; if buffer IS aligned - - #; PRE-LOOP - #; we iterate 1-3 times, doing normal x87 float comparison - #; so we reach a 16 byte aligned "buf" (=%edi) value - -.AGLP_START: - - #; Load next value from the buffer - movss (%edi), %xmm0 - mulss %xmm1, %xmm0 - movss %xmm0, (%edi) - - #; increment buffer, decrement counter - addl $4, %edi #; buf++; - - decl %ecx #; nframes-- - jz .AG_END #; if we run out of frames, we go to the end - - addl $4, %edx #; one non-aligned byte less - cmp $16, %edx - jne .AGLP_START #; if more non-aligned frames exist, we do a do-over - -.AG_SSE: - - #; We have reached the 16 byte aligned "buf" ("edi") value - - #; Figure out how many loops we should do - movl %ecx, %eax #; copy remaining nframes to %eax for division - movl $0, %edx #; 0 the edx register - - - pushl %edi - movl $4, %edi - divl %edi #; %edx = remainder == 0 - popl %edi - - #; %eax = SSE iterations - cmp $0, %eax - je .AGPOST_START - - -.AGLP_SSE: - - movaps (%edi), %xmm0 - mulps %xmm1, %xmm0 - movaps %xmm0, (%edi) - - addl $16, %edi -#; subl $4, %ecx #; nframes-=4 - - decl %eax - jnz .AGLP_SSE - - #; Next we need to post-process all remaining frames - #; the remaining frame count is in %ecx - - #; if no remaining frames, jump to the end -#; cmp $0, %ecx - andl $3, %ecx #; nframes % 4 - je .AG_END - -.AGPOST_START: - - movss (%edi), %xmm0 - mulss %xmm1, %xmm0 - movss %xmm0, (%edi) - - #; increment buffer, decrement counter - addl $4, %edi #; buf++; - - decl %ecx #; nframes-- - jnz .AGPOST_START #; if we run out of frames, we go to the end - -.AG_END: - - - popl %edi - - #; return - leave - ret - -.size x86_sse_apply_gain_to_buffer, .-x86_sse_apply_gain_to_buffer -#; end proc - - - -#; float x86_sse_compute_peak(float *buf, long nframes, float current); - -.globl x86_sse_compute_peak - .type x86_sse_compute_peak,@function - -x86_sse_compute_peak: -#; 8(%ebp) = float *buf = %edi -#; 12(%ebp) = long nframes = %ecx -#; 16(%ebp) = float current = st(0) - - pushl %ebp - movl %esp, %ebp - - #; save %edi - pushl %edi - - #; the real function - - #; Load "current" in xmm0 - movss 16(%ebp), %xmm0 - - #; if nframes == 0, go to end - movl 12(%ebp), %ecx #; nframes - cmp $0, %ecx - je .CP_END - - #; create the "abs" mask in %xmm2 - pushl $2147483647 - movss (%esp), %xmm2 - addl $4, %esp - shufps $0x00, %xmm2, %xmm2 - - #; Check for alignment - - movl 8(%ebp), %edi #; buf - movl %edi, %edx #; buf => %edx - andl $12, %edx #; mask bits 1 & 2, result = 0, 4, 8 or 12 - jz .CP_SSE #; if buffer IS aligned - - #; PRE-LOOP - #; we iterate 1-3 times, doing normal x87 float comparison - #; so we reach a 16 byte aligned "buf" (=%edi) value - -.LP_START: - - #; Load next value from the buffer - movss (%edi), %xmm1 - andps %xmm2, %xmm1 - maxss %xmm1, %xmm0 - - #; increment buffer, decrement counter - addl $4, %edi #; buf++; - - decl %ecx #; nframes-- - jz .CP_END #; if we run out of frames, we go to the end - - addl $4, %edx #; one non-aligned byte less - cmp $16, %edx - jne .LP_START #; if more non-aligned frames exist, we do a do-over - -.CP_SSE: - - #; We have reached the 16 byte aligned "buf" ("edi") value - - #; Figure out how many loops we should do - movl %ecx, %eax #; copy remaining nframes to %eax for division - - shr $2,%eax #; unsigned divide by 4 - jz .POST_START - - #; %eax = SSE iterations - - #; current maximum is at %xmm0, but we need to .. - shufps $0x00, %xmm0, %xmm0 #; shuffle "current" to all 4 FP's - - #;prefetcht0 16(%edi) - -.LP_SSE: - - movaps (%edi), %xmm1 - andps %xmm2, %xmm1 - maxps %xmm1, %xmm0 - - addl $16, %edi - - decl %eax - jnz .LP_SSE - - #; Calculate the maximum value contained in the 4 FP's in %xmm0 - movaps %xmm0, %xmm1 - shufps $0x4e, %xmm1, %xmm1 #; shuffle left & right pairs (1234 => 3412) - maxps %xmm1, %xmm0 #; maximums of the two pairs - movaps %xmm0, %xmm1 - shufps $0xb1, %xmm1, %xmm1 #; shuffle the floats inside the two pairs (1234 => 2143) - maxps %xmm1, %xmm0 - - #; now every float in %xmm0 is the same value, current maximum value - - #; Next we need to post-process all remaining frames - #; the remaining frame count is in %ecx - - #; if no remaining frames, jump to the end - - andl $3, %ecx #; nframes % 4 - jz .CP_END - -.POST_START: - - movss (%edi), %xmm1 - andps %xmm2, %xmm1 - maxss %xmm1, %xmm0 - - addl $4, %edi #; buf++; - - decl %ecx #; nframes--; - jnz .POST_START - -.CP_END: - - #; Load the value from xmm0 to the float stack for returning - movss %xmm0, 16(%ebp) - flds 16(%ebp) - - popl %edi - - #; return - leave - ret - -.size x86_sse_compute_peak, .-x86_sse_compute_peak -#; end proc - -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - - diff --git a/libs/ardour/sse_functions_64bit.s b/libs/ardour/sse_functions_64bit.s deleted file mode 100644 index 0242db3e77..0000000000 --- a/libs/ardour/sse_functions_64bit.s +++ /dev/null @@ -1,609 +0,0 @@ -/* - Copyright (C) 2005-2006 Paul Davis, John Rigg - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Author: Sampo Savolainen - 64-bit conversion: John Rigg - - $Id$ -*/ - - -#; void x86_sse_mix_buffers_with_gain (float *dst, float *src, unsigned int nframes, float gain); - -.globl x86_sse_mix_buffers_with_gain - .type x86_sse_mix_buffers_with_gain,@function - -x86_sse_mix_buffers_with_gain: - -#; %rdi float *dst -#; %rsi float *src -#; %rdx unsigned int nframes -#; %xmm0 float gain - - pushq %rbp - movq %rsp, %rbp - - #; save the registers - pushq %rbx - pushq %rdi - pushq %rsi - - #; if nframes == 0, go to end - cmp $0, %rdx - je .MBWG_END - - #; Check for alignment - - movq %rdi, %rax - andq $12, %rax #; mask alignment offset - - movq %rsi, %rbx - andq $12, %rbx #; mask alignment offset - - cmp %rax, %rbx - jne .MBWG_NONALIGN #; if not aligned, calculate manually - - #; if we are aligned - cmp $0, %rbx - jz .MBWG_SSE - - #; Pre-loop, we need to run 1-3 frames "manually" without - #; SSE instructions - -.MBWG_PRELOOP: - - #; gain is already in %xmm0 - movss (%rsi), %xmm1 - mulss %xmm0, %xmm1 - addss (%rdi), %xmm1 - movss %xmm1, (%rdi) - - addq $4, %rdi #; dst++ - addq $4, %rsi #; src++ - decq %rdx #; nframes-- - jz .MBWG_END - - addq $4, %rbx - - cmp $16, %rbx #; test if we've reached 16 byte alignment - jne .MBWG_PRELOOP - - -.MBWG_SSE: - - cmp $4, %rdx #; we know it's not zero, but if it's not >=4, then - jnge .MBWG_NONALIGN #; we jump straight to the "normal" code - - #; gain is already in %xmm0 - shufps $0x00, %xmm0, %xmm0 - - -.MBWG_SSELOOP: - - movaps (%rsi), %xmm1 #; source => xmm0 - mulps %xmm0, %xmm1 #; apply gain to source - addps (%rdi), %xmm1 #; mix with destination - movaps %xmm1, (%rdi) #; copy result to destination - - addq $16, %rdi #; dst+=4 - addq $16, %rsi #; src+=4 - - subq $4, %rdx #; nframes-=4 - cmp $4, %rdx - jge .MBWG_SSELOOP - - cmp $0, %rdx - je .MBWG_END - - #; if there are remaining frames, the nonalign code will do nicely - #; for the rest 1-3 frames. - -.MBWG_NONALIGN: - #; not aligned! - - #; gain is already in %xmm0 - -.MBWG_NONALIGNLOOP: - - movss (%rsi), %xmm1 - mulss %xmm0, %xmm1 - addss (%rdi), %xmm1 - movss %xmm1, (%rdi) - - addq $4, %rdi - addq $4, %rsi - - decq %rdx - jnz .MBWG_NONALIGNLOOP - -.MBWG_END: - - popq %rsi - popq %rdi - popq %rbx - - #; return - leave - ret - -.size x86_sse_mix_buffers_with_gain, .-x86_sse_mix_buffers_with_gain - - -#; void x86_sse_mix_buffers_no_gain (float *dst, float *src, unsigned int nframes); - -.globl x86_sse_mix_buffers_no_gain - .type x86_sse_mix_buffers_no_gain,@function - -x86_sse_mix_buffers_no_gain: - -#; %rdi float *dst -#; %rsi float *src -#; %rdx unsigned int nframes - - pushq %rbp - movq %rsp, %rbp - - #; save the registers - pushq %rbx - pushq %rdi - pushq %rsi - - #; the real function - - #; if nframes == 0, go to end - cmp $0, %rdx - je .MBNG_END - - #; Check for alignment - - movq %rdi, %rax - andq $12, %rax #; mask alignment offset - - movq %rsi, %rbx - andq $12, %rbx #; mask alignment offset - - cmp %rax, %rbx - jne .MBNG_NONALIGN #; if not aligned, calculate manually - - cmp $0, %rbx - je .MBNG_SSE - - #; Pre-loop, we need to run 1-3 frames "manually" without - #; SSE instructions - -.MBNG_PRELOOP: - - movss (%rsi), %xmm0 - addss (%rdi), %xmm0 - movss %xmm0, (%rdi) - - addq $4, %rdi #; dst++ - addq $4, %rsi #; src++ - decq %rdx #; nframes-- - jz .MBNG_END - addq $4, %rbx - - cmp $16, %rbx #; test if we've reached 16 byte alignment - jne .MBNG_PRELOOP - -.MBNG_SSE: - - cmp $4, %rdx #; if there are frames left, but less than 4 - jnge .MBNG_NONALIGN #; we can't run SSE - -.MBNG_SSELOOP: - - movaps (%rsi), %xmm0 #; source => xmm0 - addps (%rdi), %xmm0 #; mix with destination - movaps %xmm0, (%rdi) #; copy result to destination - - addq $16, %rdi #; dst+=4 - addq $16, %rsi #; src+=4 - - subq $4, %rdx #; nframes-=4 - cmp $4, %rdx - jge .MBNG_SSELOOP - - cmp $0, %rdx - je .MBNG_END - - #; if there are remaining frames, the nonalign code will do nicely - #; for the rest 1-3 frames. - -.MBNG_NONALIGN: - #; not aligned! - - movss (%rsi), %xmm0 #; src => xmm0 - addss (%rdi), %xmm0 #; xmm0 += dst - movss %xmm0, (%rdi) #; xmm0 => dst - - addq $4, %rdi - addq $4, %rsi - - decq %rdx - jnz .MBNG_NONALIGN - -.MBNG_END: - - popq %rsi - popq %rdi - popq %rbx - - #; return - leave - ret - -.size x86_sse_mix_buffers_no_gain, .-x86_sse_mix_buffers_no_gain - - -#; void x86_sse_apply_gain_to_buffer (float *buf, unsigned int nframes, float gain); - -.globl x86_sse_apply_gain_to_buffer - .type x86_sse_apply_gain_to_buffer,@function - -x86_sse_apply_gain_to_buffer: - -#; %rdi float *buf 32(%rbp) -#; %rsi unsigned int nframes -#; %xmm0 float gain -#; %xmm1 float buf[0] - - pushq %rbp - movq %rsp, %rbp - - #; save %rdi - pushq %rdi - - #; the real function - - #; if nframes == 0, go to end - movq %rsi, %rcx #; nframes - cmp $0, %rcx - je .AG_END - - #; set up the gain buffer (gain is already in %xmm0) - shufps $0x00, %xmm0, %xmm0 - - #; Check for alignment - - movq %rdi, %rdx #; buf => %rdx - andq $12, %rdx #; mask bits 1 & 2, result = 0, 4, 8 or 12 - jz .AG_SSE #; if buffer IS aligned - - #; PRE-LOOP - #; we iterate 1-3 times, doing normal x87 float comparison - #; so we reach a 16 byte aligned "buf" (=%rdi) value - -.AGLP_START: - - #; Load next value from the buffer into %xmm1 - movss (%rdi), %xmm1 - mulss %xmm0, %xmm1 - movss %xmm1, (%rdi) - - #; increment buffer, decrement counter - addq $4, %rdi #; buf++; - - decq %rcx #; nframes-- - jz .AG_END #; if we run out of frames, we go to the end - - addq $4, %rdx #; one non-aligned byte less - cmp $16, %rdx - jne .AGLP_START #; if more non-aligned frames exist, we do a do-over - -.AG_SSE: - - #; We have reached the 16 byte aligned "buf" ("rdi") value - - #; Figure out how many loops we should do - movq %rcx, %rax #; copy remaining nframes to %rax for division - movq $0, %rdx #; 0 the edx register - - - pushq %rdi - movq $4, %rdi - divq %rdi #; %rdx = remainder == 0 - popq %rdi - - #; %rax = SSE iterations - cmp $0, %rax - je .AGPOST_START - - -.AGLP_SSE: - - movaps (%rdi), %xmm1 - mulps %xmm0, %xmm1 - movaps %xmm1, (%rdi) - - addq $16, %rdi - subq $4, %rcx #; nframes-=4 - - decq %rax - jnz .AGLP_SSE - - #; Next we need to post-process all remaining frames - #; the remaining frame count is in %rcx - - #; if no remaining frames, jump to the end - cmp $0, %rcx - andq $3, %rcx #; nframes % 4 - je .AG_END - -.AGPOST_START: - - movss (%rdi), %xmm1 - mulss %xmm0, %xmm1 - movss %xmm1, (%rdi) - - #; increment buffer, decrement counter - addq $4, %rdi #; buf++; - - decq %rcx #; nframes-- - jnz .AGPOST_START #; if we run out of frames, we go to the end - -.AG_END: - - - popq %rdi - - #; return - leave - ret - -.size x86_sse_apply_gain_to_buffer, .-x86_sse_apply_gain_to_buffer -#; end proc - - -#; x86_sse_apply_gain_vector(float *buf, float *gain_vector, unsigned int nframes) - -.globl x86_sse_apply_gain_vector - .type x86_sse_apply_gain_vector,@function - -x86_sse_apply_gain_vector: - -#; %rdi float *buf -#; %rsi float *gain_vector -#; %rdx unsigned int nframes - - pushq %rbp - movq %rsp, %rbp - - #; Save registers - pushq %rdi - pushq %rsi - pushq %rbx - - #; if nframes == 0 go to end - cmp $0, %rdx - je .AGA_END - - #; Check alignment - movq %rdi, %rax - andq $12, %rax - - movq %rsi, %rbx - andq $12, %rbx - - cmp %rax,%rbx - jne .AGA_ENDLOOP - - cmp $0, %rax - jz .AGA_SSE #; if buffers are aligned, jump to the SSE loop - -#; Buffers aren't 16 byte aligned, but they are unaligned by the same amount -.AGA_ALIGNLOOP: - - movss (%rdi), %xmm0 #; buf => xmm0 - movss (%rsi), %xmm1 #; gain value => xmm1 - mulss %xmm1, %xmm0 #; xmm1 * xmm0 => xmm0 - movss %xmm0, (%rdi) #; signal with gain => buf - - decq %rdx - jz .AGA_END - - addq $4, %rdi #; buf++ - addq $4, %rsi #; gab++ - - addq $4, %rax - cmp $16, %rax - jne .AGA_ALIGNLOOP - -#; There are frames left for sure, as that is checked in the beginning -#; and within the previous loop. BUT, there might be less than 4 frames -#; to process - -.AGA_SSE: - movq %rdx, %rax #; nframes => %rax - shr $2, %rax #; unsigned divide by 4 - - cmp $0, %rax #; Jos toimii ilman tätä, niin kiva - je .AGA_ENDLOOP - -.AGA_SSELOOP: - movaps (%rdi), %xmm0 - movaps (%rsi), %xmm1 - mulps %xmm1, %xmm0 - movaps %xmm0, (%rdi) - - addq $16, %rdi - addq $16, %rsi - - decq %rax - jnz .AGA_SSELOOP - - andq $3, %rdx #; Remaining frames are nframes & 3 - jz .AGA_END - - -#; Inside this loop, we know there are frames left to process -#; but because either there are < 4 frames left, or the buffers -#; are not aligned, we can't use the parallel SSE ops -.AGA_ENDLOOP: - movss (%rdi), %xmm0 #; buf => xmm0 - movss (%rsi), %xmm1 #; gain value => xmm1 - mulss %xmm1, %xmm0 #; xmm1 * xmm0 => xmm0 - movss %xmm0, (%rdi) #; signal with gain => buf - - addq $4,%rdi - addq $4,%rsi - decq %rdx #; nframes-- - jnz .AGA_ENDLOOP - -.AGA_END: - - popq %rbx - popq %rsi - popq %rdi - - leave - ret - -.size x86_sse_apply_gain_vector, .-x86_sse_apply_gain_vector -#; end proc - - -#; float x86_sse_compute_peak(float *buf, long nframes, float current); - -.globl x86_sse_compute_peak - .type x86_sse_compute_peak,@function - - -x86_sse_compute_peak: - -#; %rdi float *buf 32(%rbp) -#; %rsi unsigned int nframes -#; %xmm0 float current -#; %xmm1 float buf[0] - - pushq %rbp - movq %rsp, %rbp - - #; save %rdi - pushq %rdi - - #; if nframes == 0, go to end - movq %rsi, %rcx #; nframes - cmp $0, %rcx - je .CP_END - - #; create the "abs" mask in %xmm2 - pushq $2147483647 - movss (%rsp), %xmm2 - addq $8, %rsp - shufps $0x00, %xmm2, %xmm2 - - #; Check for alignment - - #;movq 8(%rbp), %rdi #; buf - movq %rdi, %rdx #; buf => %rdx - andq $12, %rdx #; mask bits 1 & 2, result = 0, 4, 8 or 12 - jz .CP_SSE #; if buffer IS aligned - - #; PRE-LOOP - #; we iterate 1-3 times, doing normal x87 float comparison - #; so we reach a 16 byte aligned "buf" (=%rdi) value - -.LP_START: - - #; Load next value from the buffer - movss (%rdi), %xmm1 - andps %xmm2, %xmm1 - maxss %xmm1, %xmm0 - - #; increment buffer, decrement counter - addq $4, %rdi #; buf++; - - decq %rcx #; nframes-- - jz .CP_END #; if we run out of frames, we go to the end - - addq $4, %rdx #; one non-aligned byte less - cmp $16, %rdx - jne .LP_START #; if more non-aligned frames exist, we do a do-over - -.CP_SSE: - - #; We have reached the 16 byte aligned "buf" ("rdi") value - - #; Figure out how many loops we should do - movq %rcx, %rax #; copy remaining nframes to %rax for division - - shr $2,%rax #; unsigned divide by 4 - jz .POST_START - - #; %rax = SSE iterations - - #; current maximum is at %xmm0, but we need to .. - shufps $0x00, %xmm0, %xmm0 #; shuffle "current" to all 4 FP's - - #;prefetcht0 16(%rdi) - -.LP_SSE: - - movaps (%rdi), %xmm1 - andps %xmm2, %xmm1 - maxps %xmm1, %xmm0 - - addq $16, %rdi - - decq %rax - jnz .LP_SSE - - #; Calculate the maximum value contained in the 4 FP's in %xmm0 - movaps %xmm0, %xmm1 - shufps $0x4e, %xmm1, %xmm1 #; shuffle left & right pairs (1234 => 3412) - maxps %xmm1, %xmm0 #; maximums of the two pairs - movaps %xmm0, %xmm1 - shufps $0xb1, %xmm1, %xmm1 #; shuffle the floats inside the two pairs (1234 => 2143) - maxps %xmm1, %xmm0 - - #; now every float in %xmm0 is the same value, current maximum value - - #; Next we need to post-process all remaining frames - #; the remaining frame count is in %rcx - - #; if no remaining frames, jump to the end - - andq $3, %rcx #; nframes % 4 - jz .CP_END - -.POST_START: - - movss (%rdi), %xmm1 - andps %xmm2, %xmm1 - maxss %xmm1, %xmm0 - - addq $4, %rdi #; buf++; - - decq %rcx #; nframes--; - jnz .POST_START - -.CP_END: - - popq %rdi - - #; return - leave - ret - -.size x86_sse_compute_peak, .-x86_sse_compute_peak -#; end proc - -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - diff --git a/libs/ardour/sse_functions_xmm.cc b/libs/ardour/sse_functions_xmm.cc deleted file mode 100644 index 9b37c37912..0000000000 --- a/libs/ardour/sse_functions_xmm.cc +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright (C) 2007 Paul sDavis - Written by Sampo Savolainen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -void -x86_sse_find_peaks(const ARDOUR::Sample* buf, nframes_t nframes, float *min, float *max) -{ - __m128 current_max, current_min, work; - - // Load max and min values into all four slots of the XMM registers - current_min = _mm_set1_ps(*min); - current_max = _mm_set1_ps(*max); - - // Work input until "buf" reaches 16 byte alignment - while ( ((unsigned long)buf) % 16 != 0 && nframes > 0) { - - // Load the next float into the work buffer - work = _mm_set1_ps(*buf); - - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - - buf++; - nframes--; - } - - // use 64 byte prefetch for quadruple quads - while (nframes >= 16) { - __builtin_prefetch(buf+64,0,0); - - work = _mm_load_ps(buf); - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - buf+=4; - work = _mm_load_ps(buf); - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - buf+=4; - work = _mm_load_ps(buf); - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - buf+=4; - work = _mm_load_ps(buf); - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - buf+=4; - nframes-=16; - } - - // work through aligned buffers - while (nframes >= 4) { - - work = _mm_load_ps(buf); - - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - - buf+=4; - nframes-=4; - } - - // work through the rest < 4 samples - while ( nframes > 0) { - - // Load the next float into the work buffer - work = _mm_set1_ps(*buf); - - current_min = _mm_min_ps(current_min, work); - current_max = _mm_max_ps(current_max, work); - - buf++; - nframes--; - } - - // Find min & max value in current_max through shuffle tricks - - work = current_min; - work = _mm_shuffle_ps(work, work, _MM_SHUFFLE(2, 3, 0, 1)); - work = _mm_min_ps (work, current_min); - current_min = work; - work = _mm_shuffle_ps(work, work, _MM_SHUFFLE(1, 0, 3, 2)); - work = _mm_min_ps (work, current_min); - - _mm_store_ss(min, work); - - work = current_max; - work = _mm_shuffle_ps(work, work, _MM_SHUFFLE(2, 3, 0, 1)); - work = _mm_max_ps (work, current_max); - current_max = work; - work = _mm_shuffle_ps(work, work, _MM_SHUFFLE(1, 0, 3, 2)); - work = _mm_max_ps (work, current_max); - - _mm_store_ss(max, work); -} - - - diff --git a/libs/ardour/st_pitch.cc b/libs/ardour/st_pitch.cc deleted file mode 100644 index 3999c1a746..0000000000 --- a/libs/ardour/st_pitch.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2004-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -Pitch::Pitch (Session& s, TimeFXRequest& req) - : Filter (s) - , tsr (req) - -{ - tsr.progress = 0.0f; -} - -int -Pitch::run (boost::shared_ptr region) -{ - tsr.progress = 1.0f; - tsr.done = true; - - return 1; -} diff --git a/libs/ardour/st_stretch.cc b/libs/ardour/st_stretch.cc deleted file mode 100644 index e96cd79f2d..0000000000 --- a/libs/ardour/st_stretch.cc +++ /dev/null @@ -1,215 +0,0 @@ -/* - Copyright (C) 2004-2007 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; -using namespace soundtouch; - -Stretch::Stretch (Session& s, TimeFXRequest& req) - : Filter (s) - , tsr (req) -{ - float percentage; - - /* the soundtouch code wants a *tempo* change percentage, which is - of opposite sign to the length change. - */ - - percentage = -tsr.time_fraction; - - st.setSampleRate (s.frame_rate()); - st.setChannels (1); - st.setTempoChange (percentage); - st.setPitchSemiTones (0); - st.setRateChange (0); - - st.setSetting(SETTING_USE_QUICKSEEK, tsr.quick_seek); - st.setSetting(SETTING_USE_AA_FILTER, tsr.antialias); - - tsr.progress = 0.0f; -} - -Stretch::~Stretch () -{ -} - -int -Stretch::run (boost::shared_ptr a_region) -{ - SourceList nsrcs; - nframes_t total_frames; - nframes_t done; - int ret = -1; - const nframes_t bufsize = 16384; - gain_t *gain_buffer = 0; - Sample *buffer = 0; - char suffix[32]; - string new_name; - string::size_type at; - - tsr.progress = 0.0f; - tsr.done = false; - - boost::shared_ptr region = boost::dynamic_pointer_cast(a_region); - - total_frames = region->length() * region->n_channels(); - done = 0; - - /* the name doesn't need to be super-precise, but allow for 2 fractional - digits just to disambiguate close but not identical stretches. - */ - - snprintf (suffix, sizeof (suffix), "@%d", (int) floor (tsr.time_fraction * 100.0f)); - - /* create new sources */ - - if (make_new_sources (region, nsrcs, suffix)) { - goto out; - } - - gain_buffer = new gain_t[bufsize]; - buffer = new Sample[bufsize]; - - // soundtouch throws runtime_error on error - - try { - for (uint32_t i = 0; i < nsrcs.size(); ++i) { - - boost::shared_ptr asrc - = boost::dynamic_pointer_cast(nsrcs[i]); - - nframes_t pos = 0; - nframes_t this_read = 0; - - st.clear(); - - while (!tsr.cancel && pos < region->length()) { - nframes_t this_time; - - this_time = min (bufsize, region->length() - pos); - - /* read from the master (original) sources for the region, - not the ones currently in use, in case it's already been - subject to timefx. - */ - - if ((this_read = region->master_read_at (buffer, buffer, gain_buffer, pos + region->position(), this_time)) != this_time) { - error << string_compose (_("tempoize: error reading data from %1"), asrc->name()) << endmsg; - goto out; - } - - pos += this_read; - done += this_read; - - tsr.progress = (float) done / total_frames; - - st.putSamples (buffer, this_read); - - while ((this_read = st.receiveSamples (buffer, bufsize)) > 0 && !tsr.cancel) { - if (asrc->write (buffer, this_read) != this_read) { - error << string_compose (_("error writing tempo-adjusted data to %1"), asrc->name()) << endmsg; - goto out; - } - } - } - - if (!tsr.cancel) { - st.flush (); - } - - while (!tsr.cancel && (this_read = st.receiveSamples (buffer, bufsize)) > 0) { - if (asrc->write (buffer, this_read) != this_read) { - error << string_compose (_("error writing tempo-adjusted data to %1"), asrc->name()) << endmsg; - goto out; - } - } - } - - } catch (runtime_error& err) { - error << _("timefx code failure. please notify ardour-developers.") << endmsg; - error << err.what() << endmsg; - goto out; - } - - new_name = region->name(); - at = new_name.find ('@'); - - // remove any existing stretch indicator - - if (at != string::npos && at > 2) { - new_name = new_name.substr (0, at - 1); - } - - new_name += suffix; - - ret = finish (region, nsrcs, new_name); - - /* now reset ancestral data for each new region */ - - for (vector >::iterator x = results.begin(); x != results.end(); ++x) { - nframes64_t astart = (*x)->ancestral_start(); - nframes64_t alength = (*x)->ancestral_length(); - nframes_t start; - nframes_t length; - - // note: tsr.fraction is a percentage of original length. 100 = no change, - // 50 is half as long, 200 is twice as long, etc. - - float stretch = (*x)->stretch() * (tsr.time_fraction/100.0); - - start = (nframes_t) floor (astart + ((astart - (*x)->start()) / stretch)); - length = (nframes_t) floor (alength / stretch); - - (*x)->set_ancestral_data (start, length, stretch, (*x)->shift()); - } - - out: - - if (gain_buffer) { - delete [] gain_buffer; - } - - if (buffer) { - delete [] buffer; - } - - if (ret || tsr.cancel) { - for (SourceList::iterator si = nsrcs.begin(); si != nsrcs.end(); ++si) { - (*si)->mark_for_remove (); - } - } - - tsr.done = true; - - return ret; -} diff --git a/libs/ardour/tape_file_matcher.cc b/libs/ardour/tape_file_matcher.cc deleted file mode 100644 index 835a951f8a..0000000000 --- a/libs/ardour/tape_file_matcher.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include - -#include - -#include "i18n.h" - -namespace { - -const char* const tape_file_regex_string = X_("/T[0-9][0-9][0-9][0-9]-"); - -} - -namespace ARDOUR { - -TapeFileMatcher::TapeFileMatcher() -{ - int err; - - if ((err = regcomp (&m_compiled_pattern, - tape_file_regex_string, REG_EXTENDED|REG_NOSUB))) - { - char msg[256]; - - regerror (err, &m_compiled_pattern, msg, sizeof (msg)); - - PBD::error << string_compose (_("Cannot compile tape track regexp for use (%1)"), msg) << endmsg; - // throw - } - -} - -bool -TapeFileMatcher::matches (const string& audio_filename) const -{ - - if (regexec (&m_compiled_pattern, audio_filename.c_str(), 0, 0, 0) == 0) - { - // matches - return true; - } - return false; -} - -} // namespace ARDOUR diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc deleted file mode 100644 index 171939dac2..0000000000 --- a/libs/ardour/template_utils.cc +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -#include -#include -#include - -namespace ARDOUR { - -sys::path -system_template_directory () -{ - SearchPath spath(system_data_search_path()); - spath.add_subdirectory_to_paths(templates_dir_name); - - // just return the first directory in the search path that exists - SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists); - - if (i == spath.end()) return sys::path(); - - return *i; -} - -sys::path -user_template_directory () -{ - sys::path p(user_config_directory()); - p /= templates_dir_name; - - return p; -} - -} // namespace ARDOUR diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc deleted file mode 100644 index ab7b7c096e..0000000000 --- a/libs/ardour/tempo.cc +++ /dev/null @@ -1,1539 +0,0 @@ -/* - Copyright (C) 2000-2002 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include - -#include - -#include - -#include -#include -#include -#include - -#include "i18n.h" -#include - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -/* _default tempo is 4/4 qtr=120 */ - -Meter TempoMap::_default_meter (4.0, 4.0); -Tempo TempoMap::_default_tempo (120.0); - -const double Meter::ticks_per_beat = 1920.0; - -double Tempo::frames_per_beat (nframes_t sr, const Meter& meter) const -{ - return ((60.0 * sr) / (_beats_per_minute * meter.note_divisor()/_note_type)); -} - -/***********************************************************************/ - -double -Meter::frames_per_bar (const Tempo& tempo, nframes_t sr) const -{ - return ((60.0 * sr * _beats_per_bar) / (tempo.beats_per_minute() * _note_type/tempo.note_type())); -} - -/***********************************************************************/ - -const string TempoSection::xml_state_node_name = "Tempo"; - -TempoSection::TempoSection (const XMLNode& node) - : MetricSection (BBT_Time()), Tempo (TempoMap::default_tempo()) -{ - const XMLProperty *prop; - BBT_Time start; - LocaleGuard lg (X_("POSIX")); - - if ((prop = node.property ("start")) == 0) { - error << _("TempoSection XML node has no \"start\" property") << endmsg; - throw failed_constructor(); - } - - if (sscanf (prop->value().c_str(), "%" PRIu32 "|%" PRIu32 "|%" PRIu32, - &start.bars, - &start.beats, - &start.ticks) < 3) { - error << _("TempoSection XML node has an illegal \"start\" value") << endmsg; - throw failed_constructor(); - } - - set_start (start); - - if ((prop = node.property ("beats-per-minute")) == 0) { - error << _("TempoSection XML node has no \"beats-per-minute\" property") << endmsg; - throw failed_constructor(); - } - - if (sscanf (prop->value().c_str(), "%lf", &_beats_per_minute) != 1 || _beats_per_minute < 0.0) { - error << _("TempoSection XML node has an illegal \"beats_per_minute\" value") << endmsg; - throw failed_constructor(); - } - - if ((prop = node.property ("note-type")) == 0) { - /* older session, make note type be quarter by default */ - _note_type = 4.0; - } else { - if (sscanf (prop->value().c_str(), "%lf", &_note_type) != 1 || _note_type < 1.0) { - error << _("TempoSection XML node has an illegal \"note-type\" value") << endmsg; - throw failed_constructor(); - } - } - - if ((prop = node.property ("movable")) == 0) { - error << _("TempoSection XML node has no \"movable\" property") << endmsg; - throw failed_constructor(); - } - - set_movable (prop->value() == "yes"); -} - -XMLNode& -TempoSection::get_state() const -{ - XMLNode *root = new XMLNode (xml_state_node_name); - char buf[256]; - LocaleGuard lg (X_("POSIX")); - - snprintf (buf, sizeof (buf), "%" PRIu32 "|%" PRIu32 "|%" PRIu32, - start().bars, - start().beats, - start().ticks); - root->add_property ("start", buf); - snprintf (buf, sizeof (buf), "%f", _beats_per_minute); - root->add_property ("beats-per-minute", buf); - snprintf (buf, sizeof (buf), "%f", _note_type); - root->add_property ("note-type", buf); - snprintf (buf, sizeof (buf), "%s", movable()?"yes":"no"); - root->add_property ("movable", buf); - - return *root; -} - -/***********************************************************************/ - -const string MeterSection::xml_state_node_name = "Meter"; - -MeterSection::MeterSection (const XMLNode& node) - : MetricSection (BBT_Time()), Meter (TempoMap::default_meter()) -{ - const XMLProperty *prop; - BBT_Time start; - LocaleGuard lg (X_("POSIX")); - - if ((prop = node.property ("start")) == 0) { - error << _("MeterSection XML node has no \"start\" property") << endmsg; - throw failed_constructor(); - } - - if (sscanf (prop->value().c_str(), "%" PRIu32 "|%" PRIu32 "|%" PRIu32, - &start.bars, - &start.beats, - &start.ticks) < 3) { - error << _("MeterSection XML node has an illegal \"start\" value") << endmsg; - throw failed_constructor(); - } - - set_start (start); - - if ((prop = node.property ("beats-per-bar")) == 0) { - error << _("MeterSection XML node has no \"beats-per-bar\" property") << endmsg; - throw failed_constructor(); - } - - if (sscanf (prop->value().c_str(), "%lf", &_beats_per_bar) != 1 || _beats_per_bar < 0.0) { - error << _("MeterSection XML node has an illegal \"beats-per-bar\" value") << endmsg; - throw failed_constructor(); - } - - if ((prop = node.property ("note-type")) == 0) { - error << _("MeterSection XML node has no \"note-type\" property") << endmsg; - throw failed_constructor(); - } - - if (sscanf (prop->value().c_str(), "%lf", &_note_type) != 1 || _note_type < 0.0) { - error << _("MeterSection XML node has an illegal \"note-type\" value") << endmsg; - throw failed_constructor(); - } - - if ((prop = node.property ("movable")) == 0) { - error << _("MeterSection XML node has no \"movable\" property") << endmsg; - throw failed_constructor(); - } - - set_movable (prop->value() == "yes"); -} - -XMLNode& -MeterSection::get_state() const -{ - XMLNode *root = new XMLNode (xml_state_node_name); - char buf[256]; - LocaleGuard lg (X_("POSIX")); - - snprintf (buf, sizeof (buf), "%" PRIu32 "|%" PRIu32 "|%" PRIu32, - start().bars, - start().beats, - start().ticks); - root->add_property ("start", buf); - snprintf (buf, sizeof (buf), "%f", _note_type); - root->add_property ("note-type", buf); - snprintf (buf, sizeof (buf), "%f", _beats_per_bar); - root->add_property ("beats-per-bar", buf); - snprintf (buf, sizeof (buf), "%s", movable()?"yes":"no"); - root->add_property ("movable", buf); - - return *root; -} - -/***********************************************************************/ - -struct MetricSectionSorter { - bool operator() (const MetricSection* a, const MetricSection* b) { - return a->start() < b->start(); - } -}; - -TempoMap::TempoMap (nframes_t fr) -{ - metrics = new Metrics; - _frame_rate = fr; - last_bbt_valid = false; - BBT_Time start; - - start.bars = 1; - start.beats = 1; - start.ticks = 0; - - TempoSection *t = new TempoSection (start, _default_tempo.beats_per_minute(), _default_tempo.note_type()); - MeterSection *m = new MeterSection (start, _default_meter.beats_per_bar(), _default_meter.note_divisor()); - - t->set_movable (false); - m->set_movable (false); - - /* note: frame time is correct (zero) for both of these */ - - metrics->push_back (t); - metrics->push_back (m); -} - -TempoMap::~TempoMap () -{ -} - -int -TempoMap::move_metric_section (MetricSection& section, const BBT_Time& when) -{ - if (when == section.start() || !section.movable()) { - return -1; - } - - Glib::RWLock::WriterLock lm (lock); - MetricSectionSorter cmp; - - if (when.beats != 1) { - - /* position by audio frame, then recompute BBT timestamps from the audio ones */ - - nframes_t frame = frame_time (when); - // cerr << "nominal frame time = " << frame << endl; - - nframes_t prev_frame = round_to_type (frame, -1, Beat); - nframes_t next_frame = round_to_type (frame, 1, Beat); - - // cerr << "previous beat at " << prev_frame << " next at " << next_frame << endl; - - /* use the closest beat */ - - if ((frame - prev_frame) < (next_frame - frame)) { - frame = prev_frame; - } else { - frame = next_frame; - } - - // cerr << "actual frame time = " << frame << endl; - section.set_frame (frame); - // cerr << "frame time = " << section.frame() << endl; - timestamp_metrics (false); - // cerr << "new BBT time = " << section.start() << endl; - metrics->sort (cmp); - - } else { - - /* positioned at bar start already, so just put it there */ - - section.set_start (when); - metrics->sort (cmp); - timestamp_metrics (true); - } - - - return 0; -} - -void -TempoMap::move_tempo (TempoSection& tempo, const BBT_Time& when) -{ - if (move_metric_section (tempo, when) == 0) { - StateChanged (Change (0)); - } -} - -void -TempoMap::move_meter (MeterSection& meter, const BBT_Time& when) -{ - if (move_metric_section (meter, when) == 0) { - StateChanged (Change (0)); - } -} - -void -TempoMap::remove_tempo (const TempoSection& tempo) -{ - bool removed = false; - - { - Glib::RWLock::WriterLock lm (lock); - Metrics::iterator i; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - if (dynamic_cast (*i) != 0) { - if (tempo.frame() == (*i)->frame()) { - if ((*i)->movable()) { - metrics->erase (i); - removed = true; - break; - } - } - } - } - } - - if (removed) { - StateChanged (Change (0)); - } -} - -void -TempoMap::remove_meter (const MeterSection& tempo) -{ - bool removed = false; - - { - Glib::RWLock::WriterLock lm (lock); - Metrics::iterator i; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - if (dynamic_cast (*i) != 0) { - if (tempo.frame() == (*i)->frame()) { - if ((*i)->movable()) { - metrics->erase (i); - removed = true; - break; - } - } - } - } - } - - if (removed) { - StateChanged (Change (0)); - } -} - -void -TempoMap::do_insert (MetricSection* section, bool with_bbt) -{ - Metrics::iterator i; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - - if (with_bbt) { - if ((*i)->start() < section->start()) { - continue; - } - } else { - if ((*i)->frame() < section->frame()) { - continue; - } - } - - metrics->insert (i, section); - break; - } - - if (i == metrics->end()) { - metrics->insert (metrics->end(), section); - } - - timestamp_metrics (with_bbt); -} - -void -TempoMap::add_tempo (const Tempo& tempo, BBT_Time where) -{ - { - Glib::RWLock::WriterLock lm (lock); - - /* new tempos always start on a beat */ - - where.ticks = 0; - - do_insert (new TempoSection (where, tempo.beats_per_minute(), tempo.note_type()), true); - } - - StateChanged (Change (0)); -} - -void -TempoMap::add_tempo (const Tempo& tempo, nframes_t where) -{ - { - Glib::RWLock::WriterLock lm (lock); - do_insert (new TempoSection (where, tempo.beats_per_minute(), tempo.note_type()), false); - } - - StateChanged (Change (0)); -} - -void -TempoMap::replace_tempo (TempoSection& existing, const Tempo& replacement) -{ - bool replaced = false; - - { - Glib::RWLock::WriterLock lm (lock); - Metrics::iterator i; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - TempoSection *ts; - - if ((ts = dynamic_cast(*i)) != 0 && ts == &existing) { - - *((Tempo *) ts) = replacement; - - replaced = true; - timestamp_metrics (true); - - break; - } - } - } - - if (replaced) { - StateChanged (Change (0)); - } -} - -void -TempoMap::add_meter (const Meter& meter, BBT_Time where) -{ - { - Glib::RWLock::WriterLock lm (lock); - - /* a new meter always starts a new bar on the first beat. so - round the start time appropriately. remember that - `where' is based on the existing tempo map, not - the result after we insert the new meter. - - */ - - if (where.beats != 1) { - where.beats = 1; - where.bars++; - } - - /* new meters *always* start on a beat. */ - - where.ticks = 0; - - do_insert (new MeterSection (where, meter.beats_per_bar(), meter.note_divisor()), true); - } - - StateChanged (Change (0)); -} - -void -TempoMap::add_meter (const Meter& meter, nframes_t where) -{ - { - Glib::RWLock::WriterLock lm (lock); - do_insert (new MeterSection (where, meter.beats_per_bar(), meter.note_divisor()), false); - } - - StateChanged (Change (0)); -} - -void -TempoMap::replace_meter (MeterSection& existing, const Meter& replacement) -{ - bool replaced = false; - - { - Glib::RWLock::WriterLock lm (lock); - Metrics::iterator i; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - MeterSection *ms; - if ((ms = dynamic_cast(*i)) != 0 && ms == &existing) { - - *((Meter*) ms) = replacement; - - replaced = true; - timestamp_metrics (true); - break; - } - } - } - - if (replaced) { - StateChanged (Change (0)); - } -} - -void -TempoMap::change_initial_tempo (double beats_per_minute, double note_type) -{ - Tempo newtempo (beats_per_minute, note_type); - TempoSection* t; - - for (Metrics::iterator i = metrics->begin(); i != metrics->end(); ++i) { - if ((t = dynamic_cast (*i)) != 0) { - *((Tempo*) t) = newtempo; - StateChanged (Change (0)); - break; - } - } -} - -void -TempoMap::change_existing_tempo_at (nframes_t where, double beats_per_minute, double note_type) -{ - Tempo newtempo (beats_per_minute, note_type); - - TempoSection* prev; - TempoSection* first; - Metrics::iterator i; - - /* find the TempoSection immediately preceding "where" - */ - - for (first = 0, i = metrics->begin(), prev = 0; i != metrics->end(); ++i) { - - if ((*i)->frame() > where) { - break; - } - - TempoSection* t; - - if ((t = dynamic_cast(*i)) != 0) { - if (!first) { - first = t; - } - prev = t; - } - } - - if (!prev) { - if (!first) { - error << string_compose (_("no tempo sections defined in tempo map - cannot change tempo @ %1"), where) << endmsg; - return; - } - - prev = first; - } - - /* reset */ - - *((Tempo*)prev) = newtempo; - StateChanged (Change (0)); -} - -const MeterSection& -TempoMap::first_meter () const -{ - const MeterSection *m = 0; - - for (Metrics::const_iterator i = metrics->begin(); i != metrics->end(); ++i) { - if ((m = dynamic_cast (*i)) != 0) { - return *m; - } - } - - fatal << _("programming error: no tempo section in tempo map!") << endmsg; - /*NOTREACHED*/ - return *m; -} - -const TempoSection& -TempoMap::first_tempo () const -{ - const TempoSection *t = 0; - - for (Metrics::const_iterator i = metrics->begin(); i != metrics->end(); ++i) { - if ((t = dynamic_cast (*i)) != 0) { - return *t; - } - } - - fatal << _("programming error: no tempo section in tempo map!") << endmsg; - /*NOTREACHED*/ - return *t; -} - -void -TempoMap::timestamp_metrics (bool use_bbt) -{ - Metrics::iterator i; - const Meter* meter; - const Tempo* tempo; - Meter *m; - Tempo *t; - - meter = &first_meter (); - tempo = &first_tempo (); - - if (use_bbt) { - - // cerr << "\n\n\n ######################\nTIMESTAMP via BBT ##############\n" << endl; - - nframes_t current = 0; - nframes_t section_frames; - BBT_Time start; - BBT_Time end; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - - end = (*i)->start(); - - section_frames = count_frames_between_metrics (*meter, *tempo, start, end); - - current += section_frames; - - start = end; - - (*i)->set_frame (current); - - if ((t = dynamic_cast(*i)) != 0) { - tempo = t; - } else if ((m = dynamic_cast(*i)) != 0) { - meter = m; - } else { - fatal << _("programming error: unhandled MetricSection type") << endmsg; - /*NOTREACHED*/ - } - } - - } else { - - // cerr << "\n\n\n ######################\nTIMESTAMP via AUDIO ##############\n" << endl; - - bool first = true; - MetricSection* prev = 0; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - - BBT_Time bbt; - Metric metric (*meter, *tempo); - - if (prev) { - metric.set_start (prev->start()); - } else { - // metric will be at frames=0 bbt=1|1|0 by default - // which is correct for our purpose - } - - bbt_time_with_metric ((*i)->frame(), bbt, metric); - - // cerr << "timestamp @ " << (*i)->frame() << " with " << bbt.bars << "|" << bbt.beats << "|" << bbt.ticks << " => "; - - - if (first) { - first = false; - } else { - - if (bbt.ticks > Meter::ticks_per_beat/2) { - /* round up to next beat */ - bbt.beats += 1; - } - - bbt.ticks = 0; - - if (bbt.beats != 1) { - /* round up to next bar */ - bbt.bars += 1; - bbt.beats = 1; - } - } - - //s cerr << bbt.bars << "|" << bbt.beats << "|" << bbt.ticks << endl; - - (*i)->set_start (bbt); - - if ((t = dynamic_cast(*i)) != 0) { - tempo = t; - // cerr << "NEW TEMPO, frame = " << (*i)->frame() << " start = " << (*i)->start() <(*i)) != 0) { - meter = m; - // cerr << "NEW METER, frame = " << (*i)->frame() << " start = " << (*i)->start() <begin(); i != metrics->end(); ++i) { - - if ((*i)->frame() > frame) { - break; - } - - if ((tempo = dynamic_cast(*i)) != 0) { - m.set_tempo (*tempo); - } else if ((meter = dynamic_cast(*i)) != 0) { - m.set_meter (*meter); - } - - m.set_frame ((*i)->frame ()); - m.set_start ((*i)->start ()); - } - - return m; -} - -TempoMap::Metric -TempoMap::metric_at (BBT_Time bbt) const -{ - Metric m (first_meter(), first_tempo()); - const Meter* meter; - const Tempo* tempo; - - /* at this point, we are *guaranteed* to have m.meter and m.tempo pointing - at something, because we insert the default tempo and meter during - TempoMap construction. - - now see if we can find better candidates. - */ - - for (Metrics::const_iterator i = metrics->begin(); i != metrics->end(); ++i) { - - BBT_Time section_start ((*i)->start()); - - if (section_start.bars > bbt.bars || (section_start.bars == bbt.bars && section_start.beats > bbt.beats)) { - break; - } - - if ((tempo = dynamic_cast(*i)) != 0) { - m.set_tempo (*tempo); - } else if ((meter = dynamic_cast(*i)) != 0) { - m.set_meter (*meter); - } - - m.set_frame ((*i)->frame ()); - m.set_start (section_start); - } - - return m; -} - -void -TempoMap::bbt_time (nframes_t frame, BBT_Time& bbt) const -{ - { - Glib::RWLock::ReaderLock lm (lock); - bbt_time_unlocked (frame, bbt); - } -} - -void -TempoMap::bbt_time_unlocked (nframes_t frame, BBT_Time& bbt) const -{ - bbt_time_with_metric (frame, bbt, metric_at (frame)); -} - -void -TempoMap::bbt_time_with_metric (nframes_t frame, BBT_Time& bbt, const Metric& metric) const -{ - nframes_t frame_diff; - - uint32_t xtra_bars = 0; - double xtra_beats = 0; - double beats = 0; - - // cerr << "---- BBT time for " << frame << " using metric @ " << metric.frame() << " BBT " << metric.start() << endl; - - const double beats_per_bar = metric.meter().beats_per_bar(); - const double frames_per_bar = metric.meter().frames_per_bar (metric.tempo(), _frame_rate); - const double beat_frames = metric.tempo().frames_per_beat (_frame_rate, metric.meter()); - - /* now compute how far beyond that point we actually are. */ - - frame_diff = frame - metric.frame(); - - // cerr << "----\tdelta = " << frame_diff << endl; - - xtra_bars = (uint32_t) floor (frame_diff / frames_per_bar); - frame_diff -= (uint32_t) floor (xtra_bars * frames_per_bar); - xtra_beats = (double) frame_diff / beat_frames; - - // cerr << "---\tmeaning " << xtra_bars << " xtra bars and " << xtra_beats << " xtra beats\n"; - - /* and set the returned value */ - - /* and correct beat/bar shifts to match the meter. - remember: beat and bar counting is 1-based, - not zero-based - also the meter may contain a fraction - */ - - bbt.bars = metric.start().bars + xtra_bars; - - beats = (double) metric.start().beats + xtra_beats; - - bbt.bars += (uint32_t) floor(beats/ (beats_per_bar+1) ); - - beats = fmod(beats - 1, beats_per_bar )+ 1.0; - bbt.ticks = (uint32_t)( round((beats - floor(beats)) *(double) Meter::ticks_per_beat)); - bbt.beats = (uint32_t) floor(beats); - - // cerr << "-----\t RETURN " << bbt << endl; -} - -nframes_t -TempoMap::count_frames_between ( const BBT_Time& start, const BBT_Time& end) const -{ - /* for this to work with fractional measure types, start and end have to be "legal" BBT types, - that means that the beats and ticks should be inside a bar - */ - - nframes_t frames = 0; - nframes_t start_frame = 0; - nframes_t end_frame = 0; - - Metric m = metric_at (start); - - uint32_t bar_offset = start.bars - m.start().bars; - - double beat_offset = bar_offset*m.meter().beats_per_bar() - (m.start().beats-1) + (start.beats -1) - + start.ticks/Meter::ticks_per_beat; - - - start_frame = m.frame() + (nframes_t) rint( beat_offset * m.tempo().frames_per_beat(_frame_rate, m.meter())); - - m = metric_at(end); - - bar_offset = end.bars - m.start().bars; - - beat_offset = bar_offset * m.meter().beats_per_bar() - (m.start().beats -1) + (end.beats - 1) - + end.ticks/Meter::ticks_per_beat; - - end_frame = m.frame() + (nframes_t) rint(beat_offset * m.tempo().frames_per_beat(_frame_rate, m.meter())); - - frames = end_frame - start_frame; - - return frames; - -} - -nframes_t -TempoMap::count_frames_between_metrics (const Meter& meter, const Tempo& tempo, const BBT_Time& start, const BBT_Time& end) const -{ - /* this is used in timestamping the metrics by actually counting the beats */ - - nframes_t frames = 0; - uint32_t bar = start.bars; - double beat = (double) start.beats; - double beats_counted = 0; - double beats_per_bar = 0; - double beat_frames = 0; - - beats_per_bar = meter.beats_per_bar(); - beat_frames = tempo.frames_per_beat (_frame_rate,meter); - - frames = 0; - - while (bar < end.bars || (bar == end.bars && beat < end.beats)) { - - if (beat >= beats_per_bar) { - beat = 1; - ++bar; - ++beats_counted; - - if (beat > beats_per_bar) { - - /* this is a fractional beat at the end of a fractional bar - so it should only count for the fraction - */ - - beats_counted -= (ceil(beats_per_bar) - beats_per_bar); - } - - } else { - ++beat; - ++beats_counted; - } - } - - // cerr << "Counted " << beats_counted << " from " << start << " to " << end - // << " bpb were " << beats_per_bar - // << " fpb was " << beat_frames - // << endl; - - frames = (nframes_t) floor (beats_counted * beat_frames); - - return frames; - -} - -nframes_t -TempoMap::frame_time (const BBT_Time& bbt) const -{ - BBT_Time start ; /* 1|1|0 */ - - return count_frames_between ( start, bbt); -} - -nframes_t -TempoMap::bbt_duration_at (nframes_t pos, const BBT_Time& bbt, int dir) const -{ - nframes_t frames = 0; - - BBT_Time when; - bbt_time(pos,when); - - { - Glib::RWLock::ReaderLock lm (lock); - frames = bbt_duration_at_unlocked (when, bbt,dir); - } - - return frames; -} - -nframes_t -TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const -{ - - nframes_t frames = 0; - - double beats_per_bar; - BBT_Time result; - - result.bars = max(1U,when.bars + dir * bbt.bars) ; - result.beats = 1; - result.ticks = 0; - - Metric metric = metric_at(result); - beats_per_bar = metric.meter().beats_per_bar(); - - - - /*reduce things to legal bbt values - we have to handle possible fractional=shorter beats at the end of measures - and things like 0|11|9000 as a duration in a 4.5/4 measure - the musical decision is that the fractional beat is also a beat , although a shorter one - */ - - - if (dir >= 0) { - result.beats = when.beats + bbt.beats; - result.ticks = when.ticks + bbt.ticks; - - while (result.beats >= (beats_per_bar+1)) { - result.bars++; - result.beats -= (uint32_t) ceil(beats_per_bar); - metric = metric_at(result); // maybe there is a meter change - beats_per_bar = metric.meter().beats_per_bar(); - - } - /*we now counted the beats and landed in the target measure, now deal with ticks - this seems complicated, but we want to deal with the corner case of a sequence of time signatures like 0.2/4-0.7/4 - and with request like bbt = 3|2|9000 ,so we repeat the same loop but add ticks - */ - - /* of course gtk_ardour only allows bar with at least 1.0 beats ..... - */ - - uint32_t ticks_at_beat = (uint32_t) ( result.beats == ceil(beats_per_bar) ? - (1 - (ceil(beats_per_bar) - beats_per_bar))* Meter::ticks_per_beat - : Meter::ticks_per_beat ); - - while (result.ticks >= ticks_at_beat) { - result.beats++; - result.ticks -= ticks_at_beat; - if (result.beats >= (beats_per_bar+1)) { - result.bars++; - result.beats = 1; - metric = metric_at(result); // maybe there is a meter change - beats_per_bar = metric.meter().beats_per_bar(); - } - ticks_at_beat= (uint32_t) ( result.beats == ceil(beats_per_bar) ? - (1 - (ceil(beats_per_bar) - beats_per_bar) )* Meter::ticks_per_beat - : Meter::ticks_per_beat); - - } - - - } else { - uint32_t b = bbt.beats; - - /* count beats */ - while( b > when.beats ) { - - result.bars = max(1U,result.bars-- ) ; - metric = metric_at(result); // maybe there is a meter change - beats_per_bar = metric.meter().beats_per_bar(); - if (b >= ceil(beats_per_bar)) { - - b -= (uint32_t) ceil(beats_per_bar); - } else { - b = (uint32_t) ceil(beats_per_bar)- b + when.beats ; - } - } - result.beats = when.beats - b; - - /*count ticks */ - - if (bbt.ticks <= when.ticks) { - result.ticks = when.ticks - bbt.ticks; - } else { - - uint32_t ticks_at_beat= (uint32_t) Meter::ticks_per_beat; - uint32_t t = bbt.ticks - when.ticks; - - do { - - if (result.beats == 1) { - result.bars = max(1U,result.bars-- ) ; - metric = metric_at(result); // maybe there is a meter change - beats_per_bar = metric.meter().beats_per_bar(); - result.beats = (uint32_t) ceil(beats_per_bar); - ticks_at_beat = (uint32_t) ((1 - (ceil(beats_per_bar) - beats_per_bar))* Meter::ticks_per_beat) ; - } else { - result.beats --; - ticks_at_beat = (uint32_t) Meter::ticks_per_beat; - } - - if (t <= ticks_at_beat) { - result.ticks = ticks_at_beat - t; - } else { - t-= ticks_at_beat; - } - } while (t > ticks_at_beat); - - } - - - } - - if (dir < 0 ) { - frames = count_frames_between( result,when); - } else { - frames = count_frames_between(when,result); - } - - return frames; -} - - - -nframes_t -TempoMap::round_to_bar (nframes_t fr, int dir) -{ - { - Glib::RWLock::ReaderLock lm (lock); - return round_to_type (fr, dir, Bar); - } -} - - -nframes_t -TempoMap::round_to_beat (nframes_t fr, int dir) -{ - { - Glib::RWLock::ReaderLock lm (lock); - return round_to_type (fr, dir, Beat); - } -} - -nframes_t - -TempoMap::round_to_beat_subdivision (nframes_t fr, int sub_num) -{ - - BBT_Time the_beat; - uint32_t ticks_one_half_subdivisions_worth; - uint32_t ticks_one_subdivisions_worth; - - bbt_time(fr, the_beat); - - ticks_one_subdivisions_worth = (uint32_t)Meter::ticks_per_beat / sub_num; - ticks_one_half_subdivisions_worth = ticks_one_subdivisions_worth / 2; - - if (the_beat.ticks % ticks_one_subdivisions_worth > ticks_one_half_subdivisions_worth) { - uint32_t difference = ticks_one_subdivisions_worth - (the_beat.ticks % ticks_one_subdivisions_worth); - if (the_beat.ticks + difference >= (uint32_t)Meter::ticks_per_beat) { - the_beat.beats++; - the_beat.ticks += difference; - the_beat.ticks -= (uint32_t)Meter::ticks_per_beat; - } else { - the_beat.ticks += difference; - } - } else { - the_beat.ticks -= the_beat.ticks % ticks_one_subdivisions_worth; - } - - return frame_time (the_beat); -} - -nframes_t -TempoMap::round_to_type (nframes_t frame, int dir, BBTPointType type) -{ - Metric metric = metric_at (frame); - BBT_Time bbt; - BBT_Time start; - bbt_time_with_metric (frame, bbt, metric); - - switch (type) { - case Bar: - if (dir < 0) { - /* relax */ - } else if (dir > 0) { - if (bbt.beats > 0) { - bbt.bars++; - } else if (metric.frame() < frame) { - bbt.bars++; - } - } else { - if (bbt.beats > metric.meter().beats_per_bar()/2) { - bbt.bars++; - } - } - bbt.beats = 1; - bbt.ticks = 0; - break; - - case Beat: - if (dir < 0) { - /* relax */ - } else if (dir > 0) { - if (bbt.ticks > 0) { - bbt.beats++; - } else if (metric.frame() < frame) { - bbt.beats++; - } - } else { - if (bbt.ticks >= (Meter::ticks_per_beat/2)) { - bbt.beats++; - } - } - if (bbt.beats > ceil(metric.meter().beats_per_bar()) ) { - bbt.beats = 1; - bbt.bars++; - } - bbt.ticks = 0; - break; - - } - - /* - cerr << "for " << frame << " round to " << bbt << " using " - << metric.start() - << endl; - */ - return metric.frame() + count_frames_between (metric.start(), bbt); -} - -TempoMap::BBTPointList * -TempoMap::get_points (nframes_t lower, nframes_t upper) const -{ - - Metrics::const_iterator i; - BBTPointList *points; - double current; - const MeterSection* meter; - const MeterSection* m; - const TempoSection* tempo; - const TempoSection* t; - uint32_t bar; - uint32_t beat; - double beats_per_bar; - double beat_frame; - double beat_frames; - double frames_per_bar; - double delta_bars; - double delta_beats; - double dummy; - nframes_t limit; - - meter = &first_meter (); - tempo = &first_tempo (); - - /* find the starting point */ - - for (i = metrics->begin(); i != metrics->end(); ++i) { - - if ((*i)->frame() > lower) { - break; - } - - if ((t = dynamic_cast(*i)) != 0) { - tempo = t; - } else if ((m = dynamic_cast(*i)) != 0) { - meter = m; - } - } - - /* We now have: - - meter -> the Meter for "lower" - tempo -> the Tempo for "lower" - i -> for first new metric after "lower", possibly metrics->end() - - Now start generating points. - */ - - beats_per_bar = meter->beats_per_bar (); - frames_per_bar = meter->frames_per_bar (*tempo, _frame_rate); - beat_frames = tempo->frames_per_beat (_frame_rate, *meter); - - if (meter->frame() > tempo->frame()) { - bar = meter->start().bars; - beat = meter->start().beats; - current = meter->frame(); - } else { - bar = tempo->start().bars; - beat = tempo->start().beats; - current = tempo->frame(); - } - - /* initialize current to point to the bar/beat just prior to the - lower frame bound passed in. assumes that current is initialized - above to be on a beat. - */ - - delta_bars = (lower-current) / frames_per_bar; - delta_beats = modf(delta_bars, &dummy) * beats_per_bar; - current += (floor(delta_bars) * frames_per_bar) + (floor(delta_beats) * beat_frames); - - // adjust bars and beats too - bar += (uint32_t) (floor(delta_bars)); - beat += (uint32_t) (floor(delta_beats)); - - points = new BBTPointList; - - do { - - if (i == metrics->end()) { - limit = upper; - // cerr << "== limit set to end of request @ " << limit << endl; - } else { - // cerr << "== limit set to next metric @ " << (*i)->frame() << endl; - limit = (*i)->frame(); - } - - limit = min (limit, upper); - - while (current < limit) { - - /* if we're at the start of a bar, add bar point */ - - if (beat == 1) { - if (current >= lower) { - // cerr << "Add Bar at " << bar << "|1" << " @ " << current << endl; - points->push_back (BBTPoint (*meter, *tempo,(nframes_t)rint(current), Bar, bar, 1)); - - } - } - - /* add some beats if we can */ - - beat_frame = current; - - while (beat <= ceil( beats_per_bar) && beat_frame < limit) { - if (beat_frame >= lower) { - // cerr << "Add Beat at " << bar << '|' << beat << " @ " << beat_frame << endl; - points->push_back (BBTPoint (*meter, *tempo, (nframes_t) rint(beat_frame), Beat, bar, beat)); - } - beat_frame += beat_frames; - current+= beat_frames; - - beat++; - } - - // cerr << "out of beats, @ end ? " << (i == metrics->end()) << " out of bpb ? " - // << (beat > ceil(beats_per_bar)) - // << endl; - - if (beat > ceil(beats_per_bar) || i != metrics->end()) { - - /* we walked an entire bar. its - important to move `current' forward - by the actual frames_per_bar, not move it to - an integral beat_frame, so that metrics with - non-integral beats-per-bar have - their bar positions set - correctly. consider a metric with - 9-1/2 beats-per-bar. the bar we - just filled had 10 beat marks, - but the bar end is 1/2 beat before - the last beat mark. - And it is also possible that a tempo - change occured in the middle of a bar, - so we subtract the possible extra fraction from the current - */ - - if (beat > ceil (beats_per_bar)) { - /* next bar goes where the numbers suggest */ - current -= beat_frames * (ceil(beats_per_bar)-beats_per_bar); - // cerr << "++ next bar from numbers\n"; - } else { - /* next bar goes where the next metric is */ - current = limit; - // cerr << "++ next bar at next metric\n"; - } - bar++; - beat = 1; - } - - } - - /* if we're done, then we're done */ - - if (current >= upper) { - break; - } - - /* i is an iterator that refers to the next metric (or none). - if there is a next metric, move to it, and continue. - */ - - if (i != metrics->end()) { - - if ((t = dynamic_cast(*i)) != 0) { - tempo = t; - } else if ((m = dynamic_cast(*i)) != 0) { - meter = m; - /* new MeterSection, beat always returns to 1 */ - beat = 1; - } - - current = (*i)->frame (); - // cerr << "loop around with current @ " << current << endl; - - beats_per_bar = meter->beats_per_bar (); - frames_per_bar = meter->frames_per_bar (*tempo, _frame_rate); - beat_frames = tempo->frames_per_beat (_frame_rate, *meter); - - ++i; - } - - } while (1); - - return points; -} - -const TempoSection& -TempoMap::tempo_section_at (nframes_t frame) -{ - Glib::RWLock::ReaderLock lm (lock); - Metrics::iterator i; - TempoSection* prev = 0; - - for (i = metrics->begin(); i != metrics->end(); ++i) { - TempoSection* t; - - if ((t = dynamic_cast (*i)) != 0) { - - if ((*i)->frame() > frame) { - break; - } - - prev = t; - } - } - - if (prev == 0) { - fatal << endmsg; - } - - return *prev; -} - -const Tempo& -TempoMap::tempo_at (nframes_t frame) -{ - Metric m (metric_at (frame)); - return m.tempo(); -} - - -const Meter& -TempoMap::meter_at (nframes_t frame) -{ - Metric m (metric_at (frame)); - return m.meter(); -} - -XMLNode& -TempoMap::get_state () -{ - Metrics::const_iterator i; - XMLNode *root = new XMLNode ("TempoMap"); - - { - Glib::RWLock::ReaderLock lm (lock); - for (i = metrics->begin(); i != metrics->end(); ++i) { - root->add_child_nocopy ((*i)->get_state()); - } - } - - return *root; -} - -int -TempoMap::set_state (const XMLNode& node) -{ - { - Glib::RWLock::WriterLock lm (lock); - - XMLNodeList nlist; - XMLNodeConstIterator niter; - Metrics old_metrics (*metrics); - - metrics->clear(); - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - XMLNode* child = *niter; - - if (child->name() == TempoSection::xml_state_node_name) { - - try { - metrics->push_back (new TempoSection (*child)); - } - - catch (failed_constructor& err){ - error << _("Tempo map: could not set new state, restoring old one.") << endmsg; - *metrics = old_metrics; - break; - } - - } else if (child->name() == MeterSection::xml_state_node_name) { - - try { - metrics->push_back (new MeterSection (*child)); - } - - catch (failed_constructor& err) { - error << _("Tempo map: could not set new state, restoring old one.") << endmsg; - *metrics = old_metrics; - break; - } - } - } - - if (niter == nlist.end()) { - - MetricSectionSorter cmp; - metrics->sort (cmp); - timestamp_metrics (true); - } - } - - StateChanged (Change (0)); - - return 0; -} - -void -TempoMap::dump (std::ostream& o) const -{ - const MeterSection* m; - const TempoSection* t; - - for (Metrics::const_iterator i = metrics->begin(); i != metrics->end(); ++i) { - - if ((t = dynamic_cast(*i)) != 0) { - o << "Tempo @ " << *i << ' ' << t->beats_per_minute() << " BPM (denom = " << t->note_type() << ") at " << t->start() << " frame= " << t->frame() << " (move? " - << t->movable() << ')' << endl; - } else if ((m = dynamic_cast(*i)) != 0) { - o << "Meter @ " << *i << ' ' << m->beats_per_bar() << '/' << m->note_divisor() << " at " << m->start() << " frame= " << m->frame() - << " (move? " << m->movable() << ')' << endl; - } - } -} - -int -TempoMap::n_tempos() const -{ - Glib::RWLock::ReaderLock lm (lock); - int cnt = 0; - - for (Metrics::const_iterator i = metrics->begin(); i != metrics->end(); ++i) { - if (dynamic_cast(*i) != 0) { - cnt++; - } - } - - return cnt; -} - -int -TempoMap::n_meters() const -{ - Glib::RWLock::ReaderLock lm (lock); - int cnt = 0; - - for (Metrics::const_iterator i = metrics->begin(); i != metrics->end(); ++i) { - if (dynamic_cast(*i) != 0) { - cnt++; - } - } - - return cnt; -} diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc deleted file mode 100644 index 052105cc85..0000000000 --- a/libs/ardour/track.cc +++ /dev/null @@ -1,224 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace std; -using namespace ARDOUR; -using namespace PBD; - -Track::Track (Session& sess, string name, Route::Flag flag, TrackMode mode, DataType default_type) - : Route (sess, name, 1, -1, -1, -1, flag, default_type) - , _rec_enable_control (new RecEnableControllable(*this)) -{ - _declickable = true; - _freeze_record.state = NoFreeze; - _saved_meter_point = _meter_point; - _mode = mode; -} - -Track::Track (Session& sess, const XMLNode& node, DataType default_type) - : Route (sess, node) - , _rec_enable_control (new RecEnableControllable(*this)) -{ - _freeze_record.state = NoFreeze; - _declickable = true; - _saved_meter_point = _meter_point; -} - -Track::~Track () -{ -} - -void -Track::set_meter_point (MeterPoint p, void *src) -{ - Route::set_meter_point (p, src); -} - -XMLNode& -Track::get_state () -{ - return state (true); -} - -XMLNode& -Track::get_template () -{ - return state (false); -} - -void -Track::toggle_monitor_input () -{ - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) { - i->ensure_monitor_input(!i->monitoring_input()); - } -} - -ARDOUR::nframes_t -Track::update_total_latency () -{ - nframes_t old = _own_latency; - - if (_user_latency) { - _own_latency = _user_latency; - } else { - _own_latency = 0; - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - if ((*i)->active ()) { - _own_latency += (*i)->signal_latency (); - } - } - } - - set_port_latency (_own_latency); - - if (old != _own_latency) { - signal_latency_changed (); /* EMIT SIGNAL */ - } - - return _own_latency; -} - -Track::FreezeRecord::~FreezeRecord () -{ - for (vector::iterator i = processor_info.begin(); i != processor_info.end(); ++i) { - delete *i; - } -} - -Track::FreezeState -Track::freeze_state() const -{ - return _freeze_record.state; -} - -Track::RecEnableControllable::RecEnableControllable (Track& s) - : Controllable (X_("recenable")), track (s) -{ -} - -void -Track::RecEnableControllable::set_value (float val) -{ - bool bval = ((val >= 0.5f) ? true: false); - track.set_record_enable (bval, this); -} - -float -Track::RecEnableControllable::get_value (void) const -{ - if (track.record_enabled()) { return 1.0f; } - return 0.0f; -} - -bool -Track::record_enabled () const -{ - return _diskstream->record_enabled (); -} - -bool -Track::can_record() -{ - bool will_record = true; - for (PortSet::iterator i = _inputs.begin(); i != _inputs.end() && will_record; ++i) { - if (!i->connected()) - will_record = false; - } - - return will_record; -} - -void -Track::set_record_enable (bool yn, void *src) -{ - if (_freeze_record.state == Frozen) { - return; - } - - if (_mix_group && src != _mix_group && _mix_group->is_active()) { - _mix_group->apply (&Track::set_record_enable, yn, _mix_group); - return; - } - - /* keep track of the meter point as it was before we rec-enabled */ - if (!_diskstream->record_enabled()) { - _saved_meter_point = _meter_point; - } - - _diskstream->set_record_enabled (yn); - - if (_diskstream->record_enabled()) { - set_meter_point (MeterInput, this); - } else { - set_meter_point (_saved_meter_point, this); - } - - _rec_enable_control->Changed (); -} - - -bool -Track::set_name (const string& str) -{ - bool ret; - - if (record_enabled() && _session.actively_recording()) { - /* this messes things up if done while recording */ - return false; - } - - if (_diskstream->set_name (str)) { - return false; - } - - /* save state so that the statefile fully reflects any filename changes */ - - if ((ret = IO::set_name (str)) == 0) { - _session.save_state (""); - } - - return ret; -} - -void -Track::set_latency_delay (nframes_t longest_session_latency) -{ - Route::set_latency_delay (longest_session_latency); - _diskstream->set_roll_delay (_roll_delay); -} - diff --git a/libs/ardour/transient_detector.cc b/libs/ardour/transient_detector.cc deleted file mode 100644 index d3200d72e4..0000000000 --- a/libs/ardour/transient_detector.cc +++ /dev/null @@ -1,118 +0,0 @@ -#include - -#include "i18n.h" - -using namespace Vamp; -using namespace ARDOUR; -using namespace std; - -/* need a static initializer function for this */ - -string TransientDetector::_op_id = X_("libardourvampplugins:percussiononsets:2"); - -TransientDetector::TransientDetector (float sr) - : AudioAnalyser (sr, X_("libardourvampplugins:percussiononsets")) -{ - /* update the op_id */ - - _op_id = X_("libardourvampplugins:percussiononsets"); - - // XXX this should load the above-named plugin and get the current version - - _op_id += ":2"; -} - -TransientDetector::~TransientDetector() -{ -} - -string -TransientDetector::operational_identifier() -{ - return _op_id; -} - -int -TransientDetector::run (const std::string& path, Readable* src, uint32_t channel, AnalysisFeatureList& results) -{ - current_results = &results; - int ret = analyse (path, src, channel); - - current_results = 0; - return ret; -} - -int -TransientDetector::use_features (Plugin::FeatureSet& features, ostream* out) -{ - const Plugin::FeatureList& fl (features[0]); - - for (Plugin::FeatureList::const_iterator f = fl.begin(); f != fl.end(); ++f) { - - if ((*f).hasTimestamp) { - - if (out) { - (*out) << (*f).timestamp.toString() << endl; - } - - current_results->push_back (RealTime::realTime2Frame ((*f).timestamp, (nframes_t) floor(sample_rate))); - } - } - - return 0; -} - -void -TransientDetector::set_threshold (float val) -{ - if (plugin) { - plugin->setParameter ("threshold", val); - } -} - -void -TransientDetector::set_sensitivity (float val) -{ - if (plugin) { - plugin->setParameter ("sensitivity", val); - } -} - -void -TransientDetector::cleanup_transients (AnalysisFeatureList& t, float sr, float gap_msecs) -{ - if (t.empty()) { - return; - } - - t.sort (); - - /* remove duplicates or other things that are too close */ - - AnalysisFeatureList::iterator i = t.begin(); - AnalysisFeatureList::iterator f, b; - const nframes64_t gap_frames = (nframes64_t) floor (gap_msecs * (sr / 1000.0)); - - while (i != t.end()) { - - // move front iterator to just past i, and back iterator the same place - - f = i; - ++f; - b = f; - - // move f until we find a new value that is far enough away - - while ((f != t.end()) && (((*f) - (*i)) < gap_frames)) { - ++f; - } - - i = f; - - // if f moved forward from b, we had duplicates/too-close points: get rid of them - - if (b != f) { - t.erase (b, f); - } - } -} diff --git a/libs/ardour/user_bundle.cc b/libs/ardour/user_bundle.cc deleted file mode 100644 index 471d823496..0000000000 --- a/libs/ardour/user_bundle.cc +++ /dev/null @@ -1,198 +0,0 @@ -#include -#include -#include -#include -#include "ardour/user_bundle.h" -#include "ardour/port_set.h" -#include "ardour/io.h" -#include "ardour/session.h" -#include "ardour/audioengine.h" -#include "i18n.h" - -ARDOUR::UserBundle::UserBundle (std::string const & n) - : Bundle (n) -{ - -} - -ARDOUR::UserBundle::UserBundle (XMLNode const & x, bool i) - : Bundle (i) -{ - if (set_state (x)) { - throw failed_constructor (); - } -} - -uint32_t -ARDOUR::UserBundle::nchannels () const -{ - Glib::Mutex::Lock lm (_ports_mutex); - return _ports.size (); -} - -const ARDOUR::PortList& -ARDOUR::UserBundle::channel_ports (uint32_t n) const -{ - assert (n < nchannels ()); - - Glib::Mutex::Lock lm (_ports_mutex); - return _ports[n]; -} - -void -ARDOUR::UserBundle::add_port_to_channel (uint32_t c, std::string const & p) -{ - assert (c < nchannels ()); - - PortsWillChange (c); - - { - Glib::Mutex::Lock lm (_ports_mutex); - _ports[c].push_back (p); - } - - PortsHaveChanged (c); -} - -void -ARDOUR::UserBundle::remove_port_from_channel (uint32_t c, std::string const & p) -{ - assert (c < nchannels ()); - - PortsWillChange (c); - - { - Glib::Mutex::Lock lm (_ports_mutex); - PortList::iterator i = std::find (_ports[c].begin(), _ports[c].end(), p); - if (i != _ports[c].end()) { - _ports[c].erase (i); - } - } - - PortsHaveChanged (c); -} - -bool -ARDOUR::UserBundle::port_attached_to_channel (uint32_t c, std::string const & p) const -{ - assert (c < nchannels ()); - - Glib::Mutex::Lock lm (_ports_mutex); - return std::find (_ports[c].begin(), _ports[c].end(), p) != _ports[c].end(); -} - -void -ARDOUR::UserBundle::add_channel () -{ - ConfigurationWillChange (); - - { - Glib::Mutex::Lock lm (_ports_mutex); - _ports.resize (_ports.size() + 1); - } - - ConfigurationHasChanged (); -} - -void -ARDOUR::UserBundle::set_channels (uint32_t n) -{ - ConfigurationWillChange (); - - { - Glib::Mutex::Lock lm (_ports_mutex); - _ports.resize (n); - } - - ConfigurationHasChanged (); -} - -void -ARDOUR::UserBundle::remove_channel (uint32_t r) -{ - assert (r < nchannels ()); - - ConfigurationWillChange (); - - { - Glib::Mutex::Lock lm (_ports_mutex); - _ports.erase (_ports.begin() + r, _ports.begin() + r + 1); - } - - ConfigurationHasChanged (); -} - -int -ARDOUR::UserBundle::set_state (XMLNode const & node) -{ - XMLProperty const * name; - - if ((name = node.property ("name")) == 0) { - PBD::error << _("Node for Bundle has no \"name\" property") << endmsg; - return -1; - } - - set_name (name->value ()); - - XMLNodeList const channels = node.children (); - - int n = 0; - for (XMLNodeConstIterator i = channels.begin(); i != channels.end(); ++i) { - - if ((*i)->name() != "Channel") { - PBD::error << string_compose (_("Unknown node \"%s\" in Bundle"), (*i)->name()) << endmsg; - return -1; - } - - add_channel (); - - XMLNodeList const ports = (*i)->children (); - - for (XMLNodeConstIterator j = ports.begin(); j != ports.end(); ++j) { - if ((*j)->name() != "Port") { - PBD::error << string_compose (_("Unknown node \"%s\" in Bundle"), (*j)->name()) << endmsg; - return -1; - } - - if ((name = (*j)->property ("name")) == 0) { - PBD::error << _("Node for Port has no \"name\" property") << endmsg; - return -1; - } - - add_port_to_channel (n, name->value ()); - } - - ++n; - } - - return 0; -} - -XMLNode& -ARDOUR::UserBundle::get_state () -{ - XMLNode *node; - - if (ports_are_inputs ()) { - node = new XMLNode ("InputBundle"); - } else { - node = new XMLNode ("OutputBundle"); - } - - node->add_property ("name", name ()); - - for (std::vector::iterator i = _ports.begin(); i != _ports.end(); ++i) { - - XMLNode* c = new XMLNode ("Channel"); - - for (PortList::iterator j = i->begin(); j != i->end(); ++j) { - XMLNode* p = new XMLNode ("Port"); - p->add_property ("name", *j); - c->add_child_nocopy (*p); - } - - node->add_child_nocopy (*c); - } - - return *node; -} diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc deleted file mode 100644 index f30f568f9d..0000000000 --- a/libs/ardour/utils.cc +++ /dev/null @@ -1,529 +0,0 @@ -/* - Copyright (C) 2000-2003 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define __STDC_FORMAT_MACROS 1 -#include - -#include /* for sprintf */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_WORDEXP -#include -#endif - -#include -#include -#include -#include -#include - -#include "i18n.h" - -using namespace ARDOUR; -using namespace std; -using namespace PBD; -using Glib::ustring; - -ustring -legalize_for_path (ustring str) -{ - ustring::size_type pos; - ustring legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+=: "; - ustring legal; - - legal = str; - pos = 0; - - while ((pos = legal.find_first_not_of (legal_chars, pos)) != string::npos) { - legal.replace (pos, 1, "_"); - pos += 1; - } - - return legal; -} - -string bump_name_once(std::string name) -{ - string::size_type period; - string newname; - - if ((period = name.find_last_of ('.')) == string::npos) { - newname = name; - newname += ".1"; - } else { - int isnumber = 1; - const char *last_element = name.c_str() + period + 1; - for (size_t i = 0; i < strlen(last_element); i++) { - if (!isdigit(last_element[i])) { - isnumber = 0; - break; - } - } - - errno = 0; - long int version = strtol (name.c_str()+period+1, (char **)NULL, 10); - - if (isnumber == 0 || errno != 0) { - // last_element is not a number, or is too large - newname = name; - newname += ".1"; - } else { - char buf[32]; - - snprintf (buf, sizeof(buf), "%ld", version+1); - - newname = name.substr (0, period+1); - newname += buf; - } - } - - return newname; - -} - -ostream& -operator<< (ostream& o, const BBT_Time& bbt) -{ - o << bbt.bars << '|' << bbt.beats << '|' << bbt.ticks; - return o; -} - -XMLNode * -find_named_node (const XMLNode& node, string name) -{ - XMLNodeList nlist; - XMLNodeConstIterator niter; - XMLNode* child; - - nlist = node.children(); - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - child = *niter; - - if (child->name() == name) { - return child; - } - } - - return 0; -} - -int -cmp_nocase (const string& s, const string& s2) -{ - string::const_iterator p = s.begin(); - string::const_iterator p2 = s2.begin(); - - while (p != s.end() && p2 != s2.end()) { - if (toupper(*p) != toupper(*p2)) { - return (toupper(*p) < toupper(*p2)) ? -1 : 1; - } - ++p; - ++p2; - } - - return (s2.size() == s.size()) ? 0 : (s.size() < s2.size()) ? -1 : 1; -} - -int -touch_file (ustring path) -{ - int fd = open (path.c_str(), O_RDWR|O_CREAT, 0660); - if (fd >= 0) { - close (fd); - return 0; - } - return 1; -} - -ustring -region_name_from_path (ustring path, bool strip_channels, bool add_channel_suffix, uint32_t total, uint32_t this_one) -{ - path = PBD::basename_nosuffix (path); - - if (strip_channels) { - - /* remove any "?R", "?L" or "?[a-z]" channel identifier */ - - ustring::size_type len = path.length(); - - if (len > 3 && (path[len-2] == '%' || path[len-2] == '?' || path[len-2] == '.') && - (path[len-1] == 'R' || path[len-1] == 'L' || (islower (path[len-1])))) { - - path = path.substr (0, path.length() - 2); - } - } - - if (add_channel_suffix) { - - path += '%'; - - if (total > 2) { - path += (char) ('a' + this_one); - } else { - path += (char) (this_one == 0 ? 'L' : 'R'); - } - } - - return path; -} - -bool -path_is_paired (ustring path, ustring& pair_base) -{ - ustring::size_type pos; - - /* remove any leading path */ - - if ((pos = path.find_last_of ('/')) != string::npos) { - path = path.substr(pos+1); - } - - /* remove filename suffixes etc. */ - - if ((pos = path.find_last_of ('.')) != string::npos) { - path = path.substr (0, pos); - } - - ustring::size_type len = path.length(); - - /* look for possible channel identifier: "?R", "%R", ".L" etc. */ - - if (len > 3 && (path[len-2] == '%' || path[len-2] == '?' || path[len-2] == '.') && - (path[len-1] == 'R' || path[len-1] == 'L' || (islower (path[len-1])))) { - - pair_base = path.substr (0, len-2); - return true; - - } - - return false; -} - -ustring -path_expand (ustring path) -{ -#ifdef HAVE_WORDEXP - /* Handle tilde and environment variable expansion in session path */ - string ret = path; - - wordexp_t expansion; - switch (wordexp (path.c_str(), &expansion, WRDE_NOCMD|WRDE_UNDEF)) { - case 0: - break; - default: - error << string_compose (_("illegal or badly-formed string used for path (%1)"), path) << endmsg; - goto out; - } - - if (expansion.we_wordc > 1) { - error << string_compose (_("path (%1) is ambiguous"), path) << endmsg; - goto out; - } - - ret = expansion.we_wordv[0]; - out: - wordfree (&expansion); - return ret; - -#else - return path; -#endif -} - -#if defined(HAVE_COREAUDIO) || defined(HAVE_AUDIOUNITS) -string -CFStringRefToStdString(CFStringRef stringRef) -{ - CFIndex size = - CFStringGetMaximumSizeForEncoding(CFStringGetLength(stringRef) , - kCFStringEncodingUTF8); - char *buf = new char[size]; - - std::string result; - - if(CFStringGetCString(stringRef, buf, size, kCFStringEncodingUTF8)) { - result = buf; - } - delete [] buf; - return result; -} -#endif // HAVE_COREAUDIO - -void -compute_equal_power_fades (nframes_t nframes, float* in, float* out) -{ - double step; - - step = 1.0/nframes; - - in[0] = 0.0f; - - for (nframes_t i = 1; i < nframes - 1; ++i) { - in[i] = in[i-1] + step; - } - - in[nframes-1] = 1.0; - - const float pan_law_attenuation = -3.0f; - const float scale = 2.0f - 4.0f * powf (10.0f,pan_law_attenuation/20.0f); - - for (nframes_t n = 0; n < nframes; ++n) { - float inVal = in[n]; - float outVal = 1 - inVal; - out[n] = outVal * (scale * outVal + 1.0f - scale); - in[n] = inVal * (scale * inVal + 1.0f - scale); - } -} - -EditMode -string_to_edit_mode (string str) -{ - if (str == _("Splice Edit")) { - return Splice; - } else if (str == _("Slide Edit")) { - return Slide; - } else if (str == _("Lock Edit")) { - return Lock; - } - fatal << string_compose (_("programming error: unknown edit mode string \"%1\""), str) << endmsg; - /*NOTREACHED*/ - return Slide; -} - -const char* -edit_mode_to_string (EditMode mode) -{ - switch (mode) { - case Slide: - return _("Slide Edit"); - - case Lock: - return _("Lock Edit"); - - default: - case Splice: - return _("Splice Edit"); - } -} - -SlaveSource -string_to_slave_source (string str) -{ - if (str == _("Internal")) { - return None; - } - - if (str == _("MTC")) { - return MTC; - } - - if (str == _("JACK")) { - return JACK; - } - - fatal << string_compose (_("programming error: unknown slave source string \"%1\""), str) << endmsg; - /*NOTREACHED*/ - return None; -} - -const char* -slave_source_to_string (SlaveSource src) -{ - switch (src) { - case JACK: - return _("JACK"); - - case MTC: - return _("MTC"); - - default: - case None: - return _("Internal"); - - } -} - -/* I don't really like hard-coding these falloff rates here - * Probably should use a map of some kind that could be configured - * These rates are db/sec. -*/ - -#define METER_FALLOFF_OFF 0.0f -#define METER_FALLOFF_SLOWEST 6.6f // BBC standard -#define METER_FALLOFF_SLOW 8.6f // BBC standard -#define METER_FALLOFF_MEDIUM 20.0f -#define METER_FALLOFF_FAST 32.0f -#define METER_FALLOFF_FASTER 46.0f -#define METER_FALLOFF_FASTEST 70.0f - -float -meter_falloff_to_float (MeterFalloff falloff) -{ - switch (falloff) { - case MeterFalloffOff: - return METER_FALLOFF_OFF; - case MeterFalloffSlowest: - return METER_FALLOFF_SLOWEST; - case MeterFalloffSlow: - return METER_FALLOFF_SLOW; - case MeterFalloffMedium: - return METER_FALLOFF_MEDIUM; - case MeterFalloffFast: - return METER_FALLOFF_FAST; - case MeterFalloffFaster: - return METER_FALLOFF_FASTER; - case MeterFalloffFastest: - return METER_FALLOFF_FASTEST; - default: - return METER_FALLOFF_FAST; - } -} - -MeterFalloff -meter_falloff_from_float (float val) -{ - if (val == METER_FALLOFF_OFF) { - return MeterFalloffOff; - } - else if (val <= METER_FALLOFF_SLOWEST) { - return MeterFalloffSlowest; - } - else if (val <= METER_FALLOFF_SLOW) { - return MeterFalloffSlow; - } - else if (val <= METER_FALLOFF_MEDIUM) { - return MeterFalloffMedium; - } - else if (val <= METER_FALLOFF_FAST) { - return MeterFalloffFast; - } - else if (val <= METER_FALLOFF_FASTER) { - return MeterFalloffFaster; - } - else { - return MeterFalloffFastest; - } -} - -float -meter_hold_to_float (MeterHold hold) -{ - switch (hold) { - case MeterHoldOff: - return 0.0f; - case MeterHoldShort: - return 40.0f; - case MeterHoldMedium: - return 100.0f; - case MeterHoldLong: - default: - return 200.0f; - } -} - -AutoState -ARDOUR::string_to_auto_state (std::string str) -{ - if (str == X_("Off")) { - return Off; - } else if (str == X_("Play")) { - return Play; - } else if (str == X_("Write")) { - return Write; - } else if (str == X_("Touch")) { - return Touch; - } - - fatal << string_compose (_("programming error: %1 %2"), "illegal AutoState string: ", str) << endmsg; - /*NOTREACHED*/ - return Touch; -} - -string -ARDOUR::auto_state_to_string (AutoState as) -{ - /* to be used only for XML serialization, no i18n done */ - - switch (as) { - case Off: - return X_("Off"); - break; - case Play: - return X_("Play"); - break; - case Write: - return X_("Write"); - break; - case Touch: - return X_("Touch"); - } - - fatal << string_compose (_("programming error: %1 %2"), "illegal AutoState type: ", as) << endmsg; - /*NOTREACHED*/ - return ""; -} - -AutoStyle -ARDOUR::string_to_auto_style (std::string str) -{ - if (str == X_("Absolute")) { - return Absolute; - } else if (str == X_("Trim")) { - return Trim; - } - - fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle string: ", str) << endmsg; - /*NOTREACHED*/ - return Trim; -} - -string -ARDOUR::auto_style_to_string (AutoStyle as) -{ - /* to be used only for XML serialization, no i18n done */ - - switch (as) { - case Absolute: - return X_("Absolute"); - break; - case Trim: - return X_("Trim"); - break; - } - - fatal << string_compose (_("programming error: %1 %2"), "illegal AutoStyle type: ", as) << endmsg; - /*NOTREACHED*/ - return ""; -} - -extern "C" { - void c_stacktrace() { stacktrace (cerr); } -} diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc deleted file mode 100644 index 47b5cb4fba..0000000000 --- a/libs/ardour/vst_plugin.cc +++ /dev/null @@ -1,512 +0,0 @@ -/* - Copyright (C) 2004 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include -#include - -#include -#include // so libraptor doesn't complain -#include -#include -#include // for memmove -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include "i18n.h" -#include - -using namespace ARDOUR; -using namespace PBD; -using std::min; -using std::max; - -VSTPlugin::VSTPlugin (AudioEngine& e, Session& session, FSTHandle* h) - : Plugin (e, session) -{ - handle = h; - - if ((_fst = fst_instantiate (handle, Session::vst_callback, this)) == 0) { - throw failed_constructor(); - } - - _plugin = _fst->plugin; - _plugin->user = this; - - /* set rate and blocksize */ - - _plugin->dispatcher (_plugin, effSetSampleRate, 0, 0, NULL, - (float) session.frame_rate()); - _plugin->dispatcher (_plugin, effSetBlockSize, 0, - session.get_block_size(), NULL, 0.0f); - - /* set program to zero */ - - _plugin->dispatcher (_plugin, effSetProgram, 0, 0, NULL, 0.0f); - - Plugin::setup_controls (); -} - -VSTPlugin::VSTPlugin (const VSTPlugin &other) - : Plugin (other) -{ - handle = other.handle; - - if ((_fst = fst_instantiate (handle, Session::vst_callback, this)) == 0) { - throw failed_constructor(); - } - _plugin = _fst->plugin; - - Plugin::setup_controls (); -} - -VSTPlugin::~VSTPlugin () -{ - deactivate (); - GoingAway (); /* EMIT SIGNAL */ - fst_close (_fst); -} - -void -VSTPlugin::set_block_size (nframes_t nframes) -{ - deactivate (); - _plugin->dispatcher (_plugin, effSetBlockSize, 0, nframes, NULL, 0.0f); - activate (); -} - -float -VSTPlugin::default_value (uint32_t port) -{ - return 0; -} - -void -VSTPlugin::set_parameter (uint32_t which, float val) -{ - _plugin->setParameter (_plugin, which, val); - //ParameterChanged (which, val); /* EMIT SIGNAL */ -} - -float -VSTPlugin::get_parameter (uint32_t which) const -{ - return _plugin->getParameter (_plugin, which); - -} - -uint32_t -VSTPlugin::nth_parameter (uint32_t n, bool& ok) const -{ - ok = true; - return n; -} - -XMLNode& -VSTPlugin::get_state() -{ - XMLNode *root = new XMLNode (state_node_name()); - LocaleGuard lg (X_("POSIX")); - - if (_plugin->flags & effFlagsProgramChunks) { - - /* fetch the current chunk */ - - void* data; - long data_size; - - if ((data_size = _plugin->dispatcher (_plugin, effGetChunk, 0, 0, &data, false)) == 0) { - return *root; - } - - /* save it to a file */ - - string path; - struct stat sbuf; - - sys::path user_vst_directory(user_config_directory()); - - user_vst_directory /= "vst"; - - path = user_vst_directory.to_string(); - - if (stat (path.c_str(), &sbuf)) { - if (errno == ENOENT) { - if (g_mkdir_with_parents (path.c_str(), 0600)) { - error << string_compose (_("cannot create VST chunk directory: %1"), - strerror (errno)) - << endmsg; - return *root; - } - - } else { - - warning << string_compose (_("cannot check VST chunk directory: %1"), strerror (errno)) - << endmsg; - return *root; - } - - } else if (!S_ISDIR (sbuf.st_mode)) { - error << string_compose (_("%1 exists but is not a directory"), path) - << endmsg; - return *root; - } - - path += "something"; - - /* store information */ - - XMLNode* chunk_node = new XMLNode (X_("chunk")); - chunk_node->add_property ("path", path); - - root->add_child_nocopy (*chunk_node); - - } else { - - XMLNode* parameters = new XMLNode ("parameters"); - - for (long n = 0; n < _plugin->numParams; ++n) { - char index[64]; - char val[32]; - snprintf (index, sizeof (index), "param_%ld", n); - snprintf (val, sizeof (val), "%.12g", _plugin->getParameter (_plugin, n)); - parameters->add_property (index, val); - } - - root->add_child_nocopy (*parameters); - } - - return *root; -} - -int -VSTPlugin::set_state(const XMLNode& node) -{ - LocaleGuard lg (X_("POSIX")); - - if (node.name() != state_node_name()) { - error << _("Bad node sent to VSTPlugin::set_state") << endmsg; - return 0; - } - - XMLNode* child; - - if ((child = find_named_node (node, X_("chunks"))) != 0) { - - return 0; - - } else if ((child = find_named_node (node, X_("parameters"))) != 0) { - - XMLPropertyList::const_iterator i; - - for (i = child->properties().begin(); i != child->properties().end(); ++i) { - long param; - float val; - - sscanf ((*i)->name().c_str(), "param_%ld", ¶m); - sscanf ((*i)->value().c_str(), "%f", &val); - - _plugin->setParameter (_plugin, param, val); - } - - return 0; - } - - return -1; -} - -int -VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) const -{ - VstParameterProperties prop; - - desc.min_unbound = false; - desc.max_unbound = false; - - if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) { - - /* i have yet to find or hear of a VST plugin that uses this */ - - if (prop.flags & kVstParameterUsesIntegerMinMax) { - desc.lower = prop.minInteger; - desc.upper = prop.maxInteger; - } else { - desc.lower = 0; - desc.upper = 1.0; - } - - if (prop.flags & kVstParameterUsesIntStep) { - - desc.step = prop.stepInteger; - desc.smallstep = prop.stepInteger; - desc.largestep = prop.stepInteger; - - } else if (prop.flags & kVstParameterUsesFloatStep) { - - desc.step = prop.stepFloat; - desc.smallstep = prop.smallStepFloat; - desc.largestep = prop.largeStepFloat; - - } else { - - float range = desc.upper - desc.lower; - - desc.step = range / 100.0f; - desc.smallstep = desc.step / 2.0f; - desc.largestep = desc.step * 10.0f; - } - - desc.toggled = prop.flags & kVstParameterIsSwitch; - desc.logarithmic = false; - desc.sr_dependent = false; - desc.label = prop.label; - - } else { - - /* old style */ - - char label[64]; - label[0] = '\0'; - - _plugin->dispatcher (_plugin, effGetParamName, which, 0, label, 0); - - desc.label = label; - desc.integer_step = false; - desc.lower = 0.0f; - desc.upper = 1.0f; - desc.step = 0.01f; - desc.smallstep = 0.005f; - desc.largestep = 0.1f; - desc.toggled = false; - desc.logarithmic = false; - desc.sr_dependent = false; - } - - return 0; -} - -bool -VSTPlugin::load_preset (string name) -{ - if (_plugin->flags & effFlagsProgramChunks) { - error << _("no support for presets using chunks at this time") - << endmsg; - return false; - } - return Plugin::load_preset (name); -} - -bool -VSTPlugin::save_preset (string name) -{ - if (_plugin->flags & effFlagsProgramChunks) { - error << _("no support for presets using chunks at this time") - << endmsg; - return false; - } - return Plugin::save_preset (name, "vst"); -} - -string -VSTPlugin::describe_parameter (uint32_t param) -{ - char name[64]; - _plugin->dispatcher (_plugin, effGetParamName, param, 0, name, 0); - return name; -} - -nframes_t -VSTPlugin::signal_latency () const -{ - if (_user_latency) { - return _user_latency; - } - - return _plugin->initialDelay; -} - -set -VSTPlugin::automatable () const -{ - set ret; - - for (uint32_t i = 0; i < parameter_count(); ++i){ - ret.insert (ret.end(), i); - } - - return ret; -} - -int -VSTPlugin::connect_and_run (BufferSet& bufs, uint32_t& in_index, uint32_t& out_index, nframes_t nframes, nframes_t offset) -{ - float *ins[_plugin->numInputs]; - float *outs[_plugin->numOutputs]; - int32_t i; - - const uint32_t nbufs = bufs.count().n_audio(); - - for (i = 0; i < (int32_t) _plugin->numInputs; ++i) { - ins[i] = bufs.get_audio(min((uint32_t) in_index, nbufs - 1)).data() + offset; - in_index++; - } - - for (i = 0; i < (int32_t) _plugin->numOutputs; ++i) { - outs[i] = bufs.get_audio(min((uint32_t) out_index, nbufs - 1)).data() + offset; - - /* unbelievably, several VST plugins still rely on Cubase - behaviour and do not silence the buffer in processReplacing - when they have no output. - */ - - // memset (outs[i], 0, sizeof (Sample) * nframes); - out_index++; - } - - - /* we already know it can support processReplacing */ - - _plugin->processReplacing (_plugin, ins, outs, nframes); - - return 0; -} - -void -VSTPlugin::deactivate () -{ - _plugin->dispatcher (_plugin, effMainsChanged, 0, 0, NULL, 0.0f); -} - -void -VSTPlugin::activate () -{ - _plugin->dispatcher (_plugin, effMainsChanged, 0, 1, NULL, 0.0f); -} - -string -VSTPlugin::unique_id() const -{ - char buf[32]; - snprintf (buf, sizeof (buf), "%d", _plugin->uniqueID); - return string (buf); -} - - -const char * -VSTPlugin::name () const -{ - return handle->name; -} - -const char * -VSTPlugin::maker () const -{ - return "imadeit"; -} - -const char * -VSTPlugin::label () const -{ - return handle->name; -} - -uint32_t -VSTPlugin::parameter_count() const -{ - return _plugin->numParams; -} - -bool -VSTPlugin::has_editor () const -{ - return _plugin->flags & effFlagsHasEditor; -} - -void -VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const -{ - char lab[9]; - char *first_nonws; - - _plugin->dispatcher (_plugin, effGetParamLabel, param, 0, lab, 0); - _plugin->dispatcher (_plugin, effGetParamDisplay, param, 0, buf, 0); - - if (buf[0] == '\0') { - return; - } - - first_nonws = buf; - while (*first_nonws && isspace (*first_nonws)) { - first_nonws++; - } - if (*first_nonws == '\0') { - return; - } - - memmove (buf, first_nonws, strlen (buf) - (first_nonws - buf) + 1); -} - -PluginPtr -VSTPluginInfo::load (Session& session) -{ - try { - PluginPtr plugin; - - if (Config->get_use_vst()) { - FSTHandle* handle; - - handle = fst_load(path.c_str()); - - if ( (int)handle == -1) { - error << string_compose(_("VST: cannot load module from \"%1\""), path) << endmsg; - } else { - plugin.reset (new VSTPlugin (session.engine(), session, handle)); - } - } else { - error << _("You asked ardour to not use any VST plugins") << endmsg; - return PluginPtr ((Plugin*) 0); - } - - plugin->set_info(PluginInfoPtr(new VSTPluginInfo(*this))); - return plugin; - } - - catch (failed_constructor &err) { - return PluginPtr ((Plugin*) 0); - } -} diff --git a/libs/cairomm/AUTHORS b/libs/cairomm/AUTHORS deleted file mode 100644 index 2c4d00679a..0000000000 --- a/libs/cairomm/AUTHORS +++ /dev/null @@ -1,10 +0,0 @@ -Please do not email us directly - use the mailing list. -See http://cairographics.org/lists - -Maintainers: ----------- -Murray Cumming -Jonathon Jongsma - -Based on code from Leonard Ritter. - diff --git a/libs/cairomm/COPYING b/libs/cairomm/COPYING deleted file mode 100644 index f5030495bf..0000000000 --- a/libs/cairomm/COPYING +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/libs/cairomm/ChangeLog b/libs/cairomm/ChangeLog deleted file mode 100644 index baaa1449e3..0000000000 --- a/libs/cairomm/ChangeLog +++ /dev/null @@ -1,964 +0,0 @@ -== 1.4.6 == - -2007-11-10 Jonathon Jongsma - - * docs/reference/Doxyfile.in: update doxygen config file since my version of - doxygen now complains that there are obsolete config keys - -2007-11-10 Jonathon Jongsma - - * NEWS: update news for 1.4.6 release - * configure.in: bumped version - -2007-08-13 Murray Cumming - - * cairomm/context.cc: Add #include - to fix the build on MacOS. Thanks to Elias N (Bug #11972). - -== 1.4.4 == - -2007-07-21 Murray Cumming - - * m4/reduced.m4: Added, containing CAIROMM_ARG_ENABLE_API_EXCEPTIONS(). - * configure.in: Use CAIROMM_ARG_ENABLE_API_EXCEPTIONS() to add a - --enable-api-exceptions=yes/no option. - Used to generate a cairomm/cairommconfig.h config file, which - defines (or not) CAIROMM_EXCEPTIONS_ENABLED. - * cairomm/cairommconfig.h.in: Added, used to generate cairommconfig.h - * cairomm/private.cc: - * cairomm/private.h: Use ifdef to replace throw_exception() with an empty - implementation when exceptions are disabled. - This allows cairomm to be built when using CXXFLAGS=-fno-exceptions. - -2007-07-14 Jonathon Jongsma - - * configure.in: post-release version number bump - -=== 1.4.2 === - -2007-07-14 Jonathon Jongsma - - * NEWS: updated for 1.4.2 release - * configure.in: bumped version to 1.4.2 - -2007-06-14 Dave Beckett - - * configure.in: Update the GENERIC_LIBRARY_VERSION correctly - Was: 1:0:0 in 1.2.4 - current: interfaces were added, increment to 2 - revision: set to zero since current was incremented - age: increment since interfaces were added - Changed to: 2:0:1 - -2007-06-14 Murray Cumming - - * cairomm/refptr.h: Added RefPtr(object, refcount) constructor - for use in cast_*(), so that the casted RefPtr shares the same - refcount, avoiding an early deletion. I do not like making - this constructor public, but I do not see another way. - -=== 1.4.0 === - -2007-07-12 Jonathon Jongsma - - * Makefile.am: add doc-publish target and make release-publish depend on - this. This automatically uploads the new API documentation on release - * docs/reference/Makefile.am: upload the html documentation and a tarball of - the documentation to the cairographics.org site - -2007-07-12 Jonathon Jongsma - - * docs/reference/Makefile.am: hacky workaround to get distcheck to pass - -2007-07-10 Jonathon Jongsma - - * NEWS: Update NEWS for release - * configure.in: bump version for release - -2007-07-10 Jonathon Jongsma - - * cairomm/context.cc: add ability to use dynamic casting with the return - values from more functions, including: - Context::get_target() - Context::get_target() const - Context::get_source() - Context::get_source() const - Context::get_group_target() - Context::get_group_target() const - Context::pop_group() - * tests/test-context.cc: a few additional tests to verify the const / - non-const versions both work with dynamic casting. - -2007-07-10 Jonathon Jongsma - - * docs/reference/cairomm.css: Improve the documentation style a little bit - to make it more readable - * docs/reference/Doxyfile.in: build the reference doc for the new - QuartzSurface class - -2007-07-10 Jonathon Jongsma - - * cairomm/context.cc: - * cairomm/context.h: add alternate API for set_dash() which takes a - std::vector argument instead of the slightly unexpected std::valarray - argument - * tests/test-context.cc: test that both API work correctly and compile - correctly without any problems - -2007-07-04 Jonathon Jongsma - - * tests/test-context.cc: add some tests for matrix transformations and - user-to-device coordinate mappings. The matrix transformation 'test' does - nothing more than call the functions to excercise them a bit, but it's - causing an unexpected exception to be triggered when calling - Context::set_matrix(). The odd thing is that exception.what() results in - 'success' being printed. This requires further investigation - Also used BOOST_CHECK_EQUAL in most places instead of BOOST_CHECK to get - more meaningful failure messages. - -2007-07-04 Jonathon Jongsma - - * cairomm/private.cc: add missing 'break;' on the I/O error case statement - -2007-07-04 Jonathon Jongsma - - * cairomm/context.cc: when getting the source pattern of a Cairo::Context, - check which type of Pattern it is so that we create the correct C++ wrapper. - Without this, RefPtr<>::cast_dynamic() doesn't seem to work as we would - expect it to. - * tests/test-context.cc: improve the Context::get_source() / - Context::set_source () tests now that dynamic casting works correctly - -2007-07-04 Jonathon Jongsma - - * examples/pdf-surface/main.cc: - * examples/png_file/main.cc: - * examples/ps-surface/main.cc: - * examples/svg-surface/main.cc: - * examples/text-rotate/text-rotate.cc: - * tests/test-context.cc: fix a bunch of minor compile errors when compiling - with -Werror - -2007-07-04 Jonathon Jongsma - - * configure.in: enable extra compiler warnings and -Werror if the - CAIROMM_DEVEL environment variable is set to 'on'. This caught the - following mistake. - * cairomm/pattern.cc: forgot to return the ColorStop vector - -2007-07-04 Jonathon Jongsma - - * cairomm/context.cc: fix a FIXME to match the style of - ScaledFont::glyph_extents since MSVC (and possibly other compilers) complain - when allocating an array on the stack and the size of the array is not a - compile-time constante - -2007-04-16 Hugo Vincent - - * Added QuartzSurface for MacOS X (when cairo is built with Quartz support), - similar to the existing Win32Surface and XlibSurface. These allow use of - platform-specific features and data structures. - -2007-03-23 Jonathon Jongsma - - * Makefile.am: - * autogen.sh: - * configure.in: - * m4/ax_boost_base.m4: - * m4/ax_boost_unit_test_framework.m4: Add some basic test infrastructure. - It's disabled by default, and must be explicitly enabled by passing - --enable-tests to configure (or by setting the CAIROMM_DEVEL environment - variable to "on"). It uses the boost unit test framework, but this should - not be required unless you've explicitly enabled tests. If tests are - enabled, you can easily run them with 'make check' - * tests/Makefile.am: - * tests/test-context.cc: added the beginning of a test for Cairo::Context. - Most of these tests are really very interesting. Basically what I'm trying - to do is a) test some basic behaviors, and b) excercise the functionality a - little bit. One of the tests currently fails due to a RefPtr::cast_dynamic - failure, so I have to see what's going on there. - -2007-03-22 Murray Cumming - - * cairomm/enums.h: Restored FORMAT_RGB16_565 and marked it as deprecated. - Note that CAIRO_FORMAT_RGB16_565 has not really been removed from cairo. - It has just moved from the enum to a #define in cairo-deprecated. - * cairomm/context.cc: - * cairomm/context.h: Made get_dash() const. - Renamed clip_extents() to get_clip_extents(), to match the other get_*_extents() methods - (in Context, if not in other classes), and made it const. - Made copy_clip_rectangle_list() const. - * cairomm/pattern.cc: - * cairomm/pattern.h: Make the RadialGradient::get_radial_circles(), LinearGradient::get_linear_points(), - and Gradient::get_color_stops() methods const. - Added a non-const method overload of get_surface(). - Correc the get_color_stops() implementation to match the declaration. - -2007-03-22 Jonathon Jongsma - - * cairomm/context.cc: Minor comment cleanups - * cairomm/pattern.cc: get the gradient stops by reference parameter instead - of returning by value. This saves an extra copy of the vector. - -2007-03-21 Jonathon Jongsma - - * cairomm/context.cc: - * cairomm/context.h: - * cairomm/enums.h: - * cairomm/pattern.cc: - * cairomm/pattern.h: - * configure.in: Add initial support for new cairo 1.4.x API. It will - probably still need quite a bit of work, but I wanted to commit what I have - now so that it doesn't keep sitting in my working directory. - (Extra note from Murray: - This was: - - Pattern::create_rgba() - a new method overload with 4 args, including alpha. - - SurfacePattern::get_surface() - - Gradient::get_color_stops() (with a new ColorStop struct) - - LinearGradient::get_linear_points() - - RadialGradient::get_radial_circles() - - Context::clip_extents() - - Context::copy_clip_rectangle_list() - - Context::get_dash() - - SURFACE_TYPE_OS2 was added - - FORMAT_RGB16_565 was removed (but that is not allowed, so I'll fix that.) - -2007-02-01 Jonathon Jongsma - - * configure.in: Fixes for building on Cygwin from - yselkowitz@users.sourceforge.net. Closes bug #9726 - -2007-01-28 Jonathon Jongsma - - * configure.in: bump rev to 1.2.5 - -2007-01-28 Jonathon Jongsma - - * docs/reference/Doxyfile.in: fixes building the cairomm documentation where - builddir != srcdir. Patch from yselkowitz@users.sourceforge.net for bug - #9727 - -1.2.4: - -2007-01-17 Jonathon Jongsma - - * NEWS: updated news for 1.2.4 release - * configure.in: bumped version to 1.2.4 - -2006-09-27 Murray Cumming - - * cairomm/refptr.h: cast_static() and cast_dynamic(): - Use the refcount_() accessor instead of the member variable, - to avoid compilation errors, as we already do in the - templated copy constructor. - -1.2.2: - -2006-08-21 Jonathon Jongsma - - * NEWS: update for 1.2.2 - * configure.in: bump to next even number (1.2.2) - -2006-08-21 Cedric Gustin - - * cairomm/win32_surface.cc: Explicitly cast Cairo::Format to - cairo_format_t. - -2006-08-20 Jonathon Jongsma - - * Makefile.am: fix up the release announcement template to explain what - cairomm is at the top of the email before telling where to get it. - * configure.in: post-release bump (1.2.1) - -1.2.0: - -2006-08-20 Jonathon Jongsma - - * NEWS: Update information about new stuff in 1.2.0 - * configure.in: bump the release version number to 1.2.0 and the shared - library version number to 1:0:0 since interfaces were changed and added and - we're now guaranteeing API/ABI stability - -2006-08-20 Jonathon Jongsma - - * examples/pdf-surface/.cvsignore: - * examples/png_file/.cvsignore: - * examples/ps-surface/.cvsignore: - * examples/svg-surface/.cvsignore: added image files produced by the example - programs to .cvsignore - -2006-08-19 Jonathon Jongsma - - * Makefile.am: get rid of the concept of a snapshot. It doesn't really make - that much sense for cairomm, honestly, since we're just a simple wrapper - library. - -2006-08-19 Jonathon Jongsma - - * MSVC/examples/.cvsignore: - * MSVC/examples/Makefile.am: - * MSVC/examples/pdf-surface/.cvsignore: - * MSVC/examples/pdf-surface/Makefile.am: - * MSVC/examples/pdf-surface/pdf-surface.vcproj: - * MSVC/examples/png_file/.cvsignore: - * MSVC/examples/png_file/Makefile.am: - * MSVC/examples/png_file/png_file.vcproj: - * MSVC/examples/ps-surface/.cvsignore: - * MSVC/examples/ps-surface/Makefile.am: - * MSVC/examples/ps-surface/ps-surface.vcproj: - * MSVC/examples/svg-surface/.cvsignore: - * MSVC/examples/svg-surface/Makefile.am: - * MSVC/examples/svg-surface/svg-surface.vcproj: - * MSVC/examples/text-rotate/.cvsignore: - * MSVC/examples/text-rotate/Makefile.am: - * MSVC/examples/text-rotate/text-rotate.vcproj: - * MSVC/gendef/.cvsignore: - * MSVC/gendef/Makefile.am: - * MSVC/gendef/gendef.cc: - * MSVC/gendef/gendef.vcproj: added a bunch of MSVC / windows-specific things - that got missed last time. - -2006-08-18 Jonathon Jongsma - - * cairomm/win32_surface.cc: - * cairomm/win32_surface.h: add some missing win32 API that I had overlooked: - cairo_win32_surface_get_dc() and cairo_win32_surface_create_with_dib(), - updated documentation for standard Win32Surface::create() function. - -2006-08-18 Cedric Gustin - - * cairomm/context.cc: Define M_PI for MSVC. - * cairomm/scaledfont.cc: Allocate glyph_array as a synamic array - as MSVC does not like non-const arguments as array size. - * examples/pdf-surface/main.cc, examples/png_file/main.cc, - examples/ps-surface/main.cc, examples/svg-surface/main.cc, - examples/text-rotate/text-rotate.cc: Define M_PI for MSVC. - * configure.in, Makefile.am: Generate Makefiles in the MSVC - subdirectories. - * .cvsignore: Added Eclipse .project to the list of ignored files. - * MSVC/*: Added project and resource files for Visual Studio 2005. - -2006-08-18 Jonathon Jongsma - - * cairomm/context.cc: - * cairomm/context.h: API CHANGE: some API was changed to maintain a closer - similarity to the underlying cairo API (while also attempting to avoid - confusion with the C++ 'new' keyword) in preparation for freezing the - cairomm API. Two functions are affected: - - Context::clear_path() -> Context::begin_new_path() - - Context::new_sub_path() -> Context::begin_new_sub_path() - * configure.in: bump the libtool version to indicate API change - -2006-08-15 Jonathon Jongsma - - * cairomm/context.cc: remove another TODO. I looked at cairo_append_path, - and it just copies the data from the supplied path and appends that to the - current path -- it doesn't modify the passed in path -- so it can stay - const. - -2006-08-15 Jonathon Jongsma - - * cairomm/context.h: remove a FIXME that was resolved on the mailing list - -2006-07-11 Murray Cumming - - * cairomm/refptr.h: unref(): Only delete the refcount int when the refcount has - reached 0, instead of deleting it every time. Thanks valgrind. - -2006-07-11 Murray Cumming - - * cairomm/refptr.h: From-C-object Constructor: Added documentation explaining - how/when to use it and when to do an extra reference(). This will help us, - though it should rarely be necessary for an application developer to understand - it. - Made pCppRefcount_ mutable, so that refcount_() can be a const method so that - the templated constructor compiles. - Added class documentation to explain why we even want to use this class. - -2006-07-05 Jonathon Jongsma - - * cairomm/refptr.h: copy constructors: initialize the pCppRefcount_ member - variable, using a public refcount_() method when necessary to access a - different RefPtr<> specialization. - -2006-07-11 Murray Cumming - - * cairomm/refptr.h: Use an int to reference-count the C++ object, and - only reference/unreference the object (and hence the underlying C object) - when receiving/deleting the C++ object. Without this, we never delete - the C++ object. Fixes bug #7442. - -2006-07-09 Jonathon Jongsma - - * NEWS: add NEWS for 1.1.10 release - * configure.in: bump version to 1.1.12 - -2006-07-05 Jonathon Jongsma - - * Makefile.am: Ooops, I had accidentally removed dependency info for - release-publish target - -2006-07-05 Murray Cumming - - * cairomm/context.h: - * cairomm/fontface.h: - * cairomm/pattern.h: - * cairomm/surface.cc: - * cairomm/surface.h: - * cairomm/xlib_surface.cc: - * cairomm/xlib_surface.h: Fix the generic text about reference-counted - objects, because we no longer use copy constructors for this. And some - pedantic white space changes. - -2006-07-05 Murray Cumming - - * cairomm/scaledfont.cc: - * cairomm/scaledfont.h: create(): Make the font_matrix and ctm - parameters const (they are now const in the C API too). Maybe the font - parameter should be const, but maybe there is a reason that it is not - const in the C API. Pass FontOptions by const reference instead of - by value. - glyph_extents(): Pass the vector by const reference instead of by - value. - I would prefere to make all the extents() functions use return values - instead of output parameters, but I suppose this might be slightly - less efficient in some circumstances. - -2006-07-05 Murray Cumming - - * cairomm/cairomm.h: - * cairomm/context.h: - * cairomm/path.h: - * cairomm/scaledfont.h: - * cairomm/surface.h: - * cairomm/win32_surface.h: - * cairomm/xlib_surface.h: Use @ instead of \ for doxygen - commands, to be consistent with gtkmm, which uses it because it is the - same as JavaDoc, with which some people are already familiar. - -2006-07-04 Jonathon Jongsma - - * Makefile.am: add ability to do snapshot releases to the - cairographics.org/snapshots/ directory in addition to official releases - * configure.in: bumped the revision to 1.1.10 in preparation for a snapshot - release of the 1.2 API - * docs/reference/Makefile.am: fixed some distcheck errors - -2006-07-04 Jonathon Jongsma - - * .cvsignore, cairomm/.cvsignore: ignore some autotools files and *.swp - files (from vim) - -2006-07-04 Jonathon Jongsma - - * cairomm/scaledfont.cc, cairomm/scaledfont.h: wrap ScaledFont, including - new API for cairo 1.2 - * cairomm/Makefile.am: add scaledfont.* to list of sources - -2006-07-04 Jonathon Jongsma - - * cairomm/surface.h: Remove comments stating that PDF, PS, and SVG are - experimental surfaces. As of 1.2.0, these three surfaces are officially - supported by the cairo library. - -2006-07-04 Jonathon Jongsma - - * cairomm/xlib_surface.h: add a bit more documentation for the new - XlibSurface API - -2006-07-04 Jonathon Jongsma - - * cairomm/surface.cc, cairomm/surface.h: added SvgSurface::get_versions() - and SvgSurface::version_to_string() API. They're implemented as static - members right now. - -2006-06-30 Jonathon Jongsma - - * configure.in: bumped cairomm version to 0.7.0 and bumped cairo requirement - to 1.2.0 - -2006-06-30 Jonathon Jongsma - - * cairomm/xlib_surface.cc, cairomm/xlib_surface.h: add new get_height() and - get_width() API to XlibSurface - -2006-06-27 Jonathon Jongsma - - * cairomm/enums.h: Added enum types to support the new get_type() and SVG - Version API - * cairomm/fontface.cc, cairomm/fontface.h: add new get_type() API - * cairomm/pattern.cc, cairomm/pattern.h: add new get_type() API - * cairomm/surface.cc, cairomm/surface.h: add new get_type() API and - SvgSurface::restrict_to_version() API - -2006-06-26 Jonathon Jongsma - - * cairomm/surface.cc, cairomm/surface.h: add new PsSurface and PdfSurface - API: set_size, dsc_comment, dsc_begin_setup, dsc_begin_page_setup - * cairomm/xlib_surface.cc, cairomm/xlib_surface.h: add new XlibSurface API: - get_display, get_drawable, get_screen, get_visual, get_depth - -2006-06-26 Jonathon Jongsma - - * cairomm/surface.cc: - * cairomm/surface.h: Added new Surface and ImageSurface API from 1.1.x - snapshots - -2006-06-23 Jonathon Jongsma - - * cairomm/context.cc: - * cairomm/context.h: added Context::new_sub_path() and new push/pop group - API. - -2006-06-23 Jonathon Jongsma - - * cairomm/enums.h: fix stupid error from last commit - -2006-06-23 Jonathon Jongsma - - * cairomm/enums.h: add new FORMAT_RGB16_565 format - -2006-06-12 Jonathon Jongsma - - * configure.in: bump required cairo version to >= 1.1.7 - * cairomm/surface.cc, cairomm/surface.h: update to new cairo API - cairo_surface_set_fallback_resolution - -2006-05-10 Jonathon Jongsma - - * docs/reference/cairomm.css: minor documentation stylesheet fix - -2006-05-08 Jonathon Jongsma - - * cairomm/context.h: - * cairomm/path.h: added some preliminary documentation explaining that the - caller is responsible for freeing Path objects returned from - Context::copy_path() and Context::copy_path_flat(). - -2006-05-08 Jonathon Jongsma - - * cairomm/cairomm.h: Add doxygen API introduction test here. - * docs/reference/Doxyfile.in: - * docs/reference/Makefile.am: - * docs/reference/cairomm-header.html: - * docs/reference/cairomm.css: - * docs/reference/introduction.h: fix up some documentation presentation - issues that turned up with newer versions of doxygen. - -2006-05-08 Jonathon Jongsma - - * configure.in: remove check for perl since we're not using any of the - gmmproc stuff for cairomm - * docs/reference/Makefile.am: add documentation dependency on all of the - headers in the cairomm/ directory so that if a header changes the - documentation will be rebuilt. - -2006-04-20 Murray Cumming - - * cairomm/context.cc: - * cairomm/context.h: mask(pattern) and mask(surface): Make the parameter - const, because I am fairly sure that the C function does not change it. - -2006-04-06 Jonathon Jongsma - - * Makefile.am: Add a brief description of cairomm to the release - announcement template - -2006-04-04 Jonathon Jongsma - - * docs/reference/Doxyfile.in: - * docs/reference/Makefile.am: A couple minor build fixes to make distcheck - happy - -2006-04-04 Jonathon Jongsma - - * NEWS: add news for 0.6.0 release - * configure.in: bump version to 0.6.0 - -2006-04-03 Jonathon Jongsma - - * examples/text-rotate/text-rotate.cc: protect PNG functions with #ifdef in - case cairo wasn't compiled with PNG support - -2006-03-31 Danilo Piazzalunga - - * Makefile.am: - * docs/Makefile.am: - * docs/reference/Makefile.am: add convenience targets for cleaning and - rebuilding documentation (doc-clean and doc-rebuild). - -2006-03-30 Danilo Piazzalunga - - * configure.in: enable documentation even if doxygen and/or graphviz - are missing, so the docs will be installed when building a release. - * docs/reference/Makefile.am: don't remove html directory with `make clean`, - so that users of the tarball releases don't destroy the pre-built - documentation when running make clean. Change to maintainer-clean - -2006-03-29 Jonathon Jongsma - - * configure.in: added tests for doxygen and graphviz which displays a - warning if the user has --enable-docs set but doesn't have doxygen or - graphviz installed. - -2006-03-28 Danilo Piazzalunga - - * cairomm/enums.h: Stop using CAIRO_EXTEND_PAD, as it only exists - in the 1.1.1 development branch. - -2006-03-14 Jonathon Jongsma - - * configure.in: - * examples/Makefile.am: - * examples/text-rotate/.cvsignore: - * examples/text-rotate/Makefile.am: - * examples/text-rotate/text-rotate.cc: Added another basic example, - borrowed from a test-case in cairo. This one is just a simple example of - using text in cairomm - -2006-03-14 Jonathon Jongsma - - * cairomm/fontface.h: - * cairomm/fontoptions.h: - * cairomm/path.h: - * cairomm/pattern.h: include instead of since it - didn't want to compile on windows without these - * cairomm/win32_surface.cc: - * cairomm/win32_surface.h: Move the include of cairo-win32.h from the - source file to the header since the declaration of create() needs the HDC - type definition. - With these changes, cairomm should compile the Win32Surface cleanly with - mingw on Microsoft Windows - -2006-03-12 Danilo Piazzalunga - - * autogen.sh: Allow overriding aclocal, automake, autoconf and libtoolize - using environment variables. Taken from cairo's autogen.sh. - -2006-03-06 Jonathon Jongsma - - * cairomm/*.cc, *.h: add vim modelines to set proper indentation for - cairomm when using vim - -2006-02-28 Jonathon Jongsma - - * cairomm/context.cc: - * cairomm/context.h: - * cairomm/enums.h: - * cairomm/fontoptions.cc: - * cairomm/fontoptions.h: - * cairomm/pattern.cc: - * cairomm/pattern.h: - * cairomm/surface.h: wrapped all of the enum types with cairomm - types within the Cairo namespace, so now (for example) the values for - Cairo::Format are something like Cairo::FORMAT_ARGB32 instead of the base - cairo types like CAIRO_FORMAT_ARGB_32. - * examples/png_file/main.cc: fixed example to work with the new namespaced - enum types - -2006-02-27 Jonathon Jongsma - - * cairomm/exception.h: - * docs/reference/Doxyfile.in: - * docs/reference/Makefile.am: hide some of the private types and functions - from the Doxygen API reference documentation - -2006-02-27 Stefan Kersten - - * cairomm/surface.cc: fix an extra trailing parentheses in - GlitzSurface::create() - -2006-02-22 Danilo Piazzalunga - - * examples/README: Write some basic information about each example - -2006-02-22 Jonathon Jongsma - - * docs/reference/Makefile.am: add target for publishing the API reference - to cairographics.org - -2006-02-20 Danilo Piazzalunga - - * Makefile.am: Include MAINTAINERS in distribution. Fixes Bug #5982 - -2006-02-17 Danilo Piazzalunga - - * COPYING: Use the text from the Library GPL 2.0, which is the actual - license of cairomm. Fixes Bug #5934 - -2006-02-17 Danilo Piazzalunga - - * autogen.sh: - * cairomm/cairomm.h: - * cairomm/context.cc: - * cairomm/context.h: - * cairomm/enums.h: - * cairomm/exception.cc: - * cairomm/exception.h: - * cairomm/fontface.cc: - * cairomm/fontface.h: - * cairomm/fontoptions.cc: - * cairomm/fontoptions.h: - * cairomm/path.cc: - * cairomm/path.h: - * cairomm/pattern.cc: - * cairomm/pattern.h: - * cairomm/private.cc: - * cairomm/private.h: - * cairomm/refptr.h: - * cairomm/surface.cc: - * cairomm/surface.h: - * cairomm/win32_surface.cc: - * cairomm/win32_surface.h: - * cairomm/xlib_surface.cc: - * cairomm/xlib_surface.h: Update FSF's postal address in GPL/LGPL - comment headings. Fixes Bug #5933 - -2006-02-17 Danilo Piazzalunga - - * examples/*/.cvsignore: Bug #5927: added .cvsignore files to examples - directories - -2006-02-17 Danilo Piazzalunga - - * AUTHORS: - * INSTALL: - * README: - * cairomm/exception.cc: - * cairomm/exception.h: Remove lingering references to libxml++ - -2006-02-17 Danilo Piazzalunga - - * configure.in: Bug #5929: Output files in docs subdir only if - --enable-docs is set. This prevents configure from generating files which - are not cleaned up when --disable-docs is used. - Use AC_CONFIG_FILES and AC_OUTPUT as recommended. - -2006-02-16 Jonathon Jongsma - - * docs/reference/Doxyfile.in: - * docs/reference/cairomm.css: added some style customisations to the API - doc so that it fits in with the overall Cairo style a bit better - -2006-02-16 Jonathon Jongsma - - * AUTHORS: - * MAINTAINERS: Add my information to the Maintainers and authors file - -0.5.0: - -2006-02-09 Jonathon Jongsma - - * docs/reference/Makefile.am: added a 'html' target to satisfy the dist - rule - -2006-02-08 Jonathon Jongsma - - * cairomm/context.h: Added a lot of documentation for the Cairo::Context - class taken from the cairo docs. It's not complete, but the basics are all - covered now. - * docs/reference/Makefile.am: make use of existing Makefile variable - * NEWS: update for 0.5.0 release - -2006-02-07 Jonathon Jongsma - - * Makefile.am: add docs/ subdir - * configure.in: added an --enable-docs switch to the configure script - (enabled by default), and added AC_OUTPUT directives for the documentation - Makefiles, etc. - * docs/.cvsignore: - * docs/Makefile.am: - * docs/reference/.cvsignore: - * docs/reference/Doxyfile.in: - * docs/reference/Makefile.am: - * docs/reference/introduction.h: Added infrastructure to build and install - the API documentation for cairomm (based on libxml++ makefiles). - -2006-01-27 Jonathon Jongsma - - * .cvsignore: - * cairomm/.cvsignore: update .cvsignore files - * cairomm/surface.cc: - * cairomm/surface.h: change Surface::create function to take a - RefPtr instead of Surface& - -2006-01-27 Murray Cumming - - * examples/pdf-surface/Makefile.am: Remove extra LDADD that was breaking - the distcheck. - -2006-01-26 Murray Cumming - - * examples/ps-surface/main.cc: - * examples/svg-surface/main.cc: Correct the text of the messages. - -2006-01-25 Jonathon Jongsma - - * configure.in: - * examples/Makefile.am: - * examples/pdf-surface/: - * examples/ps-surface/: - * examples/svg-surface/: add examples for additional surfaces - -2006-01-24 Murray Cumming - - * cairomm/Makefile.am: - * cairomm/surface.cc: - * cairomm/surface.h: - * cairomm/xlib_surface.cc: - * cairomm/xlib_surface.h: - * cairomm/win32_surface.cc: - * cairomm/win32_surface.h: Moved XlibSurface and - Win32Surface into separate files, not #included by - the main cairomm.h file, so that developers do not need to - suffer the Xlib.h or Windows namespace pollution unless they really need to. - For instance, this fixes the gtkmm 2.9 build which was broken by the - Display struct in Xlib.h. - -2006-01-15 Jonathon Jongsma - - * cairomm/surface.cc: - * cairomm/surface.h: backwards-incompatible API change for the Surface - types. Cairo::Surface is now a base class for all of the other surface - types, and should not be used directly. New Surface types include - ImageSurface, XlibSurface, Win32Surface, PdfSurface, PsSurface, - SvgSurface, and GlitzSurface. - Modified Surface::write_to_png() and Surface::write_to_png_stream() so - that they throw exceptions like the other functions instead of returning a - cairo_status_t value. - Added API documentation for all Surface classes and all member functions - of the Surface class heirarchy. - * examples/png_file/Makefile.am: added generated PNG file to CLEANFILES - * examples/png_file/main.cc: updated the PNG example to use the new - ImageSurface class instead of using the Surface class directly. - * cairomm/*: Renamed the Cairo::Status type to Cairo::ErrorStatus since it - conflicts with a #define Status in XLib and is not used exposed in the API - anyway. - -2006-01-06 Jonathon Jongsma - - * cairomm/surface.cc: - * cairomm/surface.h: Added implementation of write_to_png() and - write_to_png_stream() when PNG support is available in the base cairo - library - * examples/png_file/*: Added an example of creating an image surface and - saving it to a png image file - * examples/Makefile.am: add new example directory to SUBDIRS list - * configure.in: added output declaration for examples/png_file/Makefile - * examples/makefile.am_fragment: fix leftover libxml boilerplate - -2006-01-03 Jonathon Jongsma - - * cairomm/surface.cc: added missing implementations for reference() and - unreference() functions - -0.4.0: - -2005-12-17 Murray Cumming - - * cairomm/Makefile.am: - * cairomm/refptr.h: Add shared - reference-counting smartpointer, using - the reference-count in the object. A copy - of the tried and tested glibmm RefPtr. - * cairomm/context.cc: - * cairomm/context.h: - * cairomm/fontface.cc: - * cairomm/fontface.h: - * cairomm/pattern.cc: - * cairomm/pattern.h: - * cairomm/surface.cc: - * cairomm/surface.h: Make constructors protected - and add public static create() methods that return - instances in RefPtr<>s. This allows reference-counted - objects to be clearly const or non-const, and allows - casting between related types. - -2005-12-17 Murray Cumming - - * cairomm/context.cc: - * cairomm/context.h: Change set_dash(void) to - unset_dash(). Change rotate_deg() to - rotate_degrees(). Change identity_matrix() to - set_identity_matrix(). Change new_path() to - clear_path(). - * cairomm/fontface.cc: - * cairomm/fontface.h: Comment-out - get/set_user_data(), because it seems useless. - -0.3.0: - -2005-12-08 Murray Cumming - - * cairomm/pattern.cc: - * cairomm/pattern.h: Create a hierarchy of pattern - classes, as suggested by the C documentation, because - not all functions are meaningful for all pattern types. - -2005-12-07 Murray Cumming - - * cairomm/context.cc: - * cairomm/context.h: font_extents(), stroke_extents(), - glyph_extents(), fill_extents(): Add get_ prefix and - make them const. - -2005-12-07 Murray Cumming - - * cairomm/context.cc: - * cairomm/context.h: Add typedef for Matrix, though we - probably want to derive a class with a C++-like matrix - API, with operator overloading. - -2005-12-07 Murray Cumming - - * cairomm/exception.cc: - * cairomm/exception.h: Rename to logic_error, because - the cairo documentation says that most of them are - programming errors, not runtime errors. Derive from - std::logic_error because of this. - * cairomm/private.cc: - * cairomm/private.h: Throw std::bad_alloc for memory - errors, and std::io_base::failure for read/write runtime - errors, as suggested by the cairo language-binding - documentation. - -2005-12-07 Murray Cumming - - * cairomm/context.cc: - * cairomm/fontoptions.cc: - * cairomm/surface.cc: Check for errors in - constructors, as per the error-handling advice in the - language bindings section of the cairo documentation. - -2005-12-07 Murray Cumming - - * cairomm/context.cc: - * cairomm/context.h: Change mask_surface() to - mask() and set_source_surface() to set_source(), - as per the method overloading advice in the - language bindings section of the cairo documentation. - -0.2.0: - -2005-12-02 Murray Cumming - - * cairomm/cairomm.h: Put sensible stuff in here, - instead of my copy/paste stuff from libxml++. - * cairomm/context.cc: - * cairomm/context.h: - * cairomm/enums.h: - * cairomm/exception.cc: - * cairomm/exception.h: - * cairomm/fontface.cc: - * cairomm/fontface.h: - * cairomm/fontoptions.cc: - * cairomm/fontoptions.h: - * cairomm/path.cc: - * cairomm/path.h: - * cairomm/pattern.cc: - * cairomm/pattern.h: - * cairomm/private.cc: - * cairomm/private.h: - * cairomm/surface.cc: - * cairomm/surface.h: Add LGPL comment headings. - diff --git a/libs/cairomm/INSTALL b/libs/cairomm/INSTALL deleted file mode 100644 index 88dee826fd..0000000000 --- a/libs/cairomm/INSTALL +++ /dev/null @@ -1,9 +0,0 @@ -Simple install procedure -======================== - - % tar zxvf cairomm-.tar.gz # unpack the sources - % cd cairomm- # change to toplevel directory - % ./configure # run the `configure' script - % make # build cairomm - % make install # install cairomm - diff --git a/libs/cairomm/MAINTAINERS b/libs/cairomm/MAINTAINERS deleted file mode 100644 index 54d06c9176..0000000000 --- a/libs/cairomm/MAINTAINERS +++ /dev/null @@ -1,8 +0,0 @@ -Please use the mailing list (cairo@cairographics.org) rather than emailing -developers directly. - -Murray Cumming -Email: murrayc@murrayc.com - -Jonathon Jongsma -Email: jonathon.jongsma@gmail.com diff --git a/libs/cairomm/MSVC/Makefile.am b/libs/cairomm/MSVC/Makefile.am deleted file mode 100644 index 976d5a51aa..0000000000 --- a/libs/cairomm/MSVC/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = gendef cairomm examples - -EXTRA_DIST = blank.cpp cairomm.sln README diff --git a/libs/cairomm/MSVC/Makefile.in b/libs/cairomm/MSVC/Makefile.in deleted file mode 100644 index 0176016440..0000000000 --- a/libs/cairomm/MSVC/Makefile.in +++ /dev/null @@ -1,498 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = gendef cairomm examples -EXTRA_DIST = blank.cpp cairomm.sln README -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/README b/libs/cairomm/MSVC/README deleted file mode 100644 index 81886cdb70..0000000000 --- a/libs/cairomm/MSVC/README +++ /dev/null @@ -1,12 +0,0 @@ -Building cairomm-1.0 with Visual Studio .NET 2005 - -* You will need Visual Studio .NET 2005 (MSVC 8.0). Earlier versions of the compiler, including 6.0 and 7.0 might also work but have not been tested. -* Install the latest Win32 GTK+ Development Environment from the Glade for Windows project, http://gladewin32.sourceforge.net. -* Add libsigc++ to the include and lib paths in Visual Studio. -* Load the cairomm/MSVC3/cairomm.sln solution. -* Build the entire solution. -* Run the tests. - -Cedric Gustin -08/18/2006 - diff --git a/libs/cairomm/MSVC/blank.cpp b/libs/cairomm/MSVC/blank.cpp deleted file mode 100644 index 98feb66329..0000000000 --- a/libs/cairomm/MSVC/blank.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// This file may very well be the most annoying workaround of all time. -// It is included here to simplify working with glibmm using the -// MSVC IDE. -// -// This file is included in all of the MSVC projects to force the -// IDE to display the C/C++ property pages for editing. Apparently, -// the MSVC IDE does not recognize .cc files as C++ source code, even -// though the compiler does! -// -// Tim Shead, tshead@k-3d.com -// 10/12/2004 diff --git a/libs/cairomm/MSVC/cairomm.sln b/libs/cairomm/MSVC/cairomm.sln deleted file mode 100644 index ebedfae590..0000000000 --- a/libs/cairomm/MSVC/cairomm.sln +++ /dev/null @@ -1,73 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gendef", "gendef\gendef.vcproj", "{07324745-C9BE-4D65-B08A-9C88188C0C28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cairomm-1.0", "cairomm\cairomm.vcproj", "{58B2B53C-C4FF-47FD-817B-095E45B7F7D4}" - ProjectSection(ProjectDependencies) = postProject - {07324745-C9BE-4D65-B08A-9C88188C0C28} = {07324745-C9BE-4D65-B08A-9C88188C0C28} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_pdf-surface", "examples\pdf-surface\pdf-surface.vcproj", "{129ECC08-6D30-4884-B824-4AF96EF0A45C}" - ProjectSection(ProjectDependencies) = postProject - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_png_file", "examples\png_file\png_file.vcproj", "{45EEED29-0231-45C6-9682-CAB2E042C51E}" - ProjectSection(ProjectDependencies) = postProject - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_ps-surface", "examples\ps-surface\ps-surface.vcproj", "{CAE46373-7375-4607-AAB7-0EBA8F0E5B55}" - ProjectSection(ProjectDependencies) = postProject - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_svg-surface", "examples\svg-surface\svg-surface.vcproj", "{BCA44D2B-1832-41F5-9EE9-FE1F709EE584}" - ProjectSection(ProjectDependencies) = postProject - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_text-rotate", "examples\text-rotate\text-rotate.vcproj", "{F4D455E4-464D-49CC-A120-DB9B8AE0207E}" - ProjectSection(ProjectDependencies) = postProject - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {07324745-C9BE-4D65-B08A-9C88188C0C28}.Debug|Win32.ActiveCfg = Debug|Win32 - {07324745-C9BE-4D65-B08A-9C88188C0C28}.Debug|Win32.Build.0 = Debug|Win32 - {07324745-C9BE-4D65-B08A-9C88188C0C28}.Release|Win32.ActiveCfg = Release|Win32 - {07324745-C9BE-4D65-B08A-9C88188C0C28}.Release|Win32.Build.0 = Release|Win32 - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Debug|Win32.Build.0 = Debug|Win32 - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Release|Win32.ActiveCfg = Release|Win32 - {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Release|Win32.Build.0 = Release|Win32 - {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Debug|Win32.ActiveCfg = Debug|Win32 - {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Debug|Win32.Build.0 = Debug|Win32 - {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Release|Win32.ActiveCfg = Release|Win32 - {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Release|Win32.Build.0 = Release|Win32 - {45EEED29-0231-45C6-9682-CAB2E042C51E}.Debug|Win32.ActiveCfg = Debug|Win32 - {45EEED29-0231-45C6-9682-CAB2E042C51E}.Debug|Win32.Build.0 = Debug|Win32 - {45EEED29-0231-45C6-9682-CAB2E042C51E}.Release|Win32.ActiveCfg = Release|Win32 - {45EEED29-0231-45C6-9682-CAB2E042C51E}.Release|Win32.Build.0 = Release|Win32 - {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Debug|Win32.Build.0 = Debug|Win32 - {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Release|Win32.ActiveCfg = Release|Win32 - {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Release|Win32.Build.0 = Release|Win32 - {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Debug|Win32.ActiveCfg = Debug|Win32 - {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Debug|Win32.Build.0 = Debug|Win32 - {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Release|Win32.ActiveCfg = Release|Win32 - {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Release|Win32.Build.0 = Release|Win32 - {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Debug|Win32.Build.0 = Debug|Win32 - {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Release|Win32.ActiveCfg = Release|Win32 - {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/libs/cairomm/MSVC/cairomm/Makefile.am b/libs/cairomm/MSVC/cairomm/Makefile.am deleted file mode 100644 index b0c0ced3ed..0000000000 --- a/libs/cairomm/MSVC/cairomm/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -BUILT_SOURCES = cairomm.rc - -MAINTAINERCLEANFILES = $(built_sources) - -EXTRA_DIST = cairomm.vcproj cairomm.rc diff --git a/libs/cairomm/MSVC/cairomm/Makefile.in b/libs/cairomm/MSVC/cairomm/Makefile.in deleted file mode 100644 index a30d8d2a98..0000000000 --- a/libs/cairomm/MSVC/cairomm/Makefile.in +++ /dev/null @@ -1,350 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/cairomm -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/cairomm.rc.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = cairomm.rc -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -BUILT_SOURCES = cairomm.rc -MAINTAINERCLEANFILES = $(built_sources) -EXTRA_DIST = cairomm.vcproj cairomm.rc -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/cairomm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/cairomm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -cairomm.rc: $(top_builddir)/config.status $(srcdir)/cairomm.rc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile -installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/cairomm/cairomm.rc b/libs/cairomm/MSVC/cairomm/cairomm.rc deleted file mode 100644 index 925e3109f9..0000000000 --- a/libs/cairomm/MSVC/cairomm/cairomm.rc +++ /dev/null @@ -1,72 +0,0 @@ -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS - -#include "afxres.h" - -#undef APSTUDIO_READONLY_SYMBOLS - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,4,6,1 - PRODUCTVERSION 1,4,6,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "The cairomm development team (see AUTHORS)" - VALUE "FileDescription", "The official C++ wrapper for cairo" - VALUE "FileVersion", "1.4.6" - VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)" - VALUE "OriginalFilename", "cairomm-1.0" - VALUE "ProductName", "cairomm" - VALUE "ProductVersion", "1.4.6" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources - -#ifndef APSTUDIO_INVOKED - -#endif // not APSTUDIO_INVOKED diff --git a/libs/cairomm/MSVC/cairomm/cairomm.rc.in b/libs/cairomm/MSVC/cairomm/cairomm.rc.in deleted file mode 100644 index 8c968cf05d..0000000000 --- a/libs/cairomm/MSVC/cairomm/cairomm.rc.in +++ /dev/null @@ -1,72 +0,0 @@ -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS - -#include "afxres.h" - -#undef APSTUDIO_READONLY_SYMBOLS - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -VS_VERSION_INFO VERSIONINFO - FILEVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,1 - PRODUCTVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "The cairomm development team (see AUTHORS)" - VALUE "FileDescription", "The official C++ wrapper for cairo" - VALUE "FileVersion", "@VERSION@" - VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)" - VALUE "OriginalFilename", "cairomm-1.0" - VALUE "ProductName", "cairomm" - VALUE "ProductVersion", "@VERSION@" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources - -#ifndef APSTUDIO_INVOKED - -#endif // not APSTUDIO_INVOKED diff --git a/libs/cairomm/MSVC/cairomm/cairomm.vcproj b/libs/cairomm/MSVC/cairomm/cairomm.vcproj deleted file mode 100644 index ff0136d63b..0000000000 --- a/libs/cairomm/MSVC/cairomm/cairomm.vcproj +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/MSVC/examples/Makefile.am b/libs/cairomm/MSVC/examples/Makefile.am deleted file mode 100644 index a436d388b3..0000000000 --- a/libs/cairomm/MSVC/examples/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = pdf-surface png_file ps-surface svg-surface text-rotate diff --git a/libs/cairomm/MSVC/examples/Makefile.in b/libs/cairomm/MSVC/examples/Makefile.in deleted file mode 100644 index 0035f00efb..0000000000 --- a/libs/cairomm/MSVC/examples/Makefile.in +++ /dev/null @@ -1,497 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/examples -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = pdf-surface png_file ps-surface svg-surface text-rotate -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/examples/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/examples/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/examples/pdf-surface/Makefile.am b/libs/cairomm/MSVC/examples/pdf-surface/Makefile.am deleted file mode 100644 index e94dba186c..0000000000 --- a/libs/cairomm/MSVC/examples/pdf-surface/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = pdf-surface.vcproj diff --git a/libs/cairomm/MSVC/examples/pdf-surface/Makefile.in b/libs/cairomm/MSVC/examples/pdf-surface/Makefile.in deleted file mode 100644 index 2e03ccee59..0000000000 --- a/libs/cairomm/MSVC/examples/pdf-surface/Makefile.in +++ /dev/null @@ -1,340 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/examples/pdf-surface -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = pdf-surface.vcproj -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/examples/pdf-surface/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/examples/pdf-surface/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/examples/pdf-surface/pdf-surface.vcproj b/libs/cairomm/MSVC/examples/pdf-surface/pdf-surface.vcproj deleted file mode 100644 index 4b33ff71da..0000000000 --- a/libs/cairomm/MSVC/examples/pdf-surface/pdf-surface.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/MSVC/examples/png_file/Makefile.am b/libs/cairomm/MSVC/examples/png_file/Makefile.am deleted file mode 100644 index 41f7722c22..0000000000 --- a/libs/cairomm/MSVC/examples/png_file/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = png_file.vcproj diff --git a/libs/cairomm/MSVC/examples/png_file/Makefile.in b/libs/cairomm/MSVC/examples/png_file/Makefile.in deleted file mode 100644 index 595d6525ce..0000000000 --- a/libs/cairomm/MSVC/examples/png_file/Makefile.in +++ /dev/null @@ -1,340 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/examples/png_file -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = png_file.vcproj -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/examples/png_file/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/examples/png_file/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/examples/png_file/png_file.vcproj b/libs/cairomm/MSVC/examples/png_file/png_file.vcproj deleted file mode 100644 index 364ddc377f..0000000000 --- a/libs/cairomm/MSVC/examples/png_file/png_file.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/MSVC/examples/ps-surface/Makefile.am b/libs/cairomm/MSVC/examples/ps-surface/Makefile.am deleted file mode 100644 index d827e579d9..0000000000 --- a/libs/cairomm/MSVC/examples/ps-surface/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = ps-surface.vcproj diff --git a/libs/cairomm/MSVC/examples/ps-surface/Makefile.in b/libs/cairomm/MSVC/examples/ps-surface/Makefile.in deleted file mode 100644 index 07beebac98..0000000000 --- a/libs/cairomm/MSVC/examples/ps-surface/Makefile.in +++ /dev/null @@ -1,340 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/examples/ps-surface -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = ps-surface.vcproj -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/examples/ps-surface/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/examples/ps-surface/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/examples/ps-surface/ps-surface.vcproj b/libs/cairomm/MSVC/examples/ps-surface/ps-surface.vcproj deleted file mode 100644 index 5100f8f6f1..0000000000 --- a/libs/cairomm/MSVC/examples/ps-surface/ps-surface.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/MSVC/examples/svg-surface/Makefile.am b/libs/cairomm/MSVC/examples/svg-surface/Makefile.am deleted file mode 100644 index 4ce523efe4..0000000000 --- a/libs/cairomm/MSVC/examples/svg-surface/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = svg-surface.vcproj diff --git a/libs/cairomm/MSVC/examples/svg-surface/Makefile.in b/libs/cairomm/MSVC/examples/svg-surface/Makefile.in deleted file mode 100644 index 0783ac304c..0000000000 --- a/libs/cairomm/MSVC/examples/svg-surface/Makefile.in +++ /dev/null @@ -1,340 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/examples/svg-surface -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = svg-surface.vcproj -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/examples/svg-surface/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/examples/svg-surface/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/examples/svg-surface/svg-surface.vcproj b/libs/cairomm/MSVC/examples/svg-surface/svg-surface.vcproj deleted file mode 100644 index 439783303b..0000000000 --- a/libs/cairomm/MSVC/examples/svg-surface/svg-surface.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/MSVC/examples/text-rotate/Makefile.am b/libs/cairomm/MSVC/examples/text-rotate/Makefile.am deleted file mode 100644 index 6eb15e42cd..0000000000 --- a/libs/cairomm/MSVC/examples/text-rotate/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = text-rotate.vcproj diff --git a/libs/cairomm/MSVC/examples/text-rotate/Makefile.in b/libs/cairomm/MSVC/examples/text-rotate/Makefile.in deleted file mode 100644 index c3e98ba68f..0000000000 --- a/libs/cairomm/MSVC/examples/text-rotate/Makefile.in +++ /dev/null @@ -1,340 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/examples/text-rotate -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = text-rotate.vcproj -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/examples/text-rotate/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/examples/text-rotate/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/examples/text-rotate/text-rotate.vcproj b/libs/cairomm/MSVC/examples/text-rotate/text-rotate.vcproj deleted file mode 100644 index ec6bc5041a..0000000000 --- a/libs/cairomm/MSVC/examples/text-rotate/text-rotate.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/MSVC/gendef/Makefile.am b/libs/cairomm/MSVC/gendef/Makefile.am deleted file mode 100644 index 3a435c34a2..0000000000 --- a/libs/cairomm/MSVC/gendef/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = gendef.vcproj gendef.cc - diff --git a/libs/cairomm/MSVC/gendef/Makefile.in b/libs/cairomm/MSVC/gendef/Makefile.in deleted file mode 100644 index 7e2688b6dd..0000000000 --- a/libs/cairomm/MSVC/gendef/Makefile.in +++ /dev/null @@ -1,340 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = MSVC/gendef -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = gendef.vcproj gendef.cc -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu MSVC/gendef/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu MSVC/gendef/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/MSVC/gendef/gendef.cc b/libs/cairomm/MSVC/gendef/gendef.cc deleted file mode 100644 index cf665604ae..0000000000 --- a/libs/cairomm/MSVC/gendef/gendef.cc +++ /dev/null @@ -1,94 +0,0 @@ -/* - * MICO --- an Open Source CORBA implementation - * Copyright (c) 2003 Harald Böhme - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * For more information, visit the MICO Home Page at - * http://www.mico.org/ - */ - -/* Modified by Cedric Gustin on 2006/01/13 : - * Redirect the output of dumpbin to dumpbin.out instead of reading the - * output stream of popen, as it fails with Visual Studio 2005 in - * pre-link build events. - */ - -#include -#include -#include - -using namespace std; - -int main(int argc,char** argv) -{ - if (argc < 4) { - cerr << "Usage: " << argv[0] << " ...." << endl; - return 2; - } - - // CG : Explicitly redirect stdout to dumpbin.out. - string dumpbin = "dumpbin /SYMBOLS /OUT:dumpbin.out"; - int i = 3; - - for(;i fct - def_file << " " << (s+1) << endl; - else - if(strchr(s,'?')!=0 && strncmp(s,"??_G",4)!=0 && strncmp(s,"??_E",4)!=0) { - def_file << " " << s << endl; - } - } - } - } - - // CG : Close dumpbin.out and delete it. - fclose(dump); - remove("dumpbin.out"); - - cout << dumpbin.c_str() << endl; -} diff --git a/libs/cairomm/MSVC/gendef/gendef.vcproj b/libs/cairomm/MSVC/gendef/gendef.vcproj deleted file mode 100644 index fb05b48598..0000000000 --- a/libs/cairomm/MSVC/gendef/gendef.vcproj +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/cairomm/Makefile.am b/libs/cairomm/Makefile.am deleted file mode 100644 index 8d5ce0ec61..0000000000 --- a/libs/cairomm/Makefile.am +++ /dev/null @@ -1,126 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS = cairomm examples MSVC $(DOCS_SUBDIR) tests -#docs examples -ACLOCAL_AMFLAGS = -I m4 - -EXTRA_DIST = MAINTAINERS cairomm-1.0.pc.in - -DIST_SUBDIRS = $(SUBDIRS) - -# Install the pkg-config file: -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = cairomm-1.0.pc - -# Copied from cairo/Makefile.am: -# -# Some custom targets to make it easier to release things. -# Use either: -# make release-check -# or make release-publish - -RELEASE_UPLOAD_HOST = cairographics.org -RELEASE_UPLOAD_BASE = /srv/cairo.freedesktop.org/www -RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)/releases -RELEASE_URL_BASE = http://cairographics.org/releases -RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org (and CC gnome-announce-list@gnome.org) -GIT = $(top_srcdir)/missing --run git - -#MANUAL_DATED = cairo-manual-`date +%Y%m%d` -#MANUAL_TAR_FILE = $(MANUAL_DATED).tar.gz -#MANUAL_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE) - -tar_file = $(PACKAGE)-$(VERSION).tar.gz -sha1_file = $(tar_file).sha1 -gpg_file = $(sha1_file).asc - -$(sha1_file): $(tar_file) - sha1sum $^ > $@ - -$(gpg_file): $(sha1_file) - @echo "Please enter your GPG password to sign the checksum." - gpg --armor --sign $^ - -release-verify-even-micro: - @echo -n "Checking that $(VERSION) has an even micro component..." - @test "$(GENERIC_MICRO_VERSION)" = "`echo $(GENERIC_MICRO_VERSION)/2*2 | bc`" \ - || (echo "Ouch." && echo "The version micro component '$(GENERIC_MICRO_VERSION)' is not an even number." \ - && echo "The version in configure.in must be incremented before a new release." \ - && false) - @echo "Good." - -release-verify-newer: - @echo -n "Checking that no $(VERSION) release already exists..." - @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \ - || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \ - && echo "Are you sure you have an updated git checkout?" \ - && echo "This should never happen." \ - && false) - @echo "Good." - -release-remove-old: - rm -f $(tar_file) $(sha1_file) $(gpg_file) - -# Maybe it's just my system, but somehow group sticky bits keep -# getting set and this causes failures in un-tarring on some systems. -# Until I figure out where the sticky bit is coming from, just clean -# these up before building a release. -release-cleanup-group-sticky: - find . -type f | xargs chmod g-s - -release-check: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky distcheck - -release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file) - mkdir -p releases - scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR) - mv $(tar_file) $(sha1_file) $(gpg_file) releases - ssh $(RELEASE_UPLOAD_HOST) "rm -f $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_file) $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-$(VERSION)" - $(GIT) tag -s -m "$(PACKAGE) release $(VERSION)" v$(VERSION) - -doc-publish: - (cd docs/reference && $(MAKE) $(AM_MAKEFLAGS) publish) - -release-publish: release-upload doc-publish releases/$(sha1_file) - @echo "" - @echo "Please send an announcement to $(RELEASE_ANNOUNCE_LIST)" - @echo "including the following:" - @echo "" - @echo "Subject: $(PACKAGE) release $(VERSION) now available" - @echo "" - @echo "============================== CUT HERE ==============================" - @echo "cairomm is a C++ API for the cairo graphics library. For more " - @echo "information, see http://cairographics.org/cairomm" - @echo "" - @echo "A new $(PACKAGE) release $(VERSION) is now available from:" - @echo "" - @echo " $(RELEASE_URL_BASE)/$(tar_file)" - @echo "" - @echo " which can be verified with:" - @echo "" - @echo " $(RELEASE_URL_BASE)/$(sha1_file)" - @echo -n " " - @cat releases/$(sha1_file) - @echo "" - @echo " $(RELEASE_URL_BASE)/$(gpg_file)" - @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)" - @echo "" - @echo "WHAT'S NEW" - @echo "==========" - @echo "" - @echo "============================== CUT HERE ==============================" - @echo "Also, please include the new entries from the NEWS file." - @echo "" - @echo "Last but not least, do not forget to bump up the micro" - @echo "version component to the next (odd) number and commit." - - -doc-clean-recursive: - (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-clean) - -doc-clean: doc-clean-recursive - -doc-rebuild: - (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-rebuild) - -.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish doc-clean doc-clean-recursive doc-rebuild - diff --git a/libs/cairomm/Makefile.in b/libs/cairomm/Makefile.in deleted file mode 100644 index e1361e3ad7..0000000000 --- a/libs/cairomm/Makefile.in +++ /dev/null @@ -1,770 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/cairomm-1.0.pc.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - config.guess config.sub depcomp install-sh ltmain.sh missing -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = cairomm-1.0.pc -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(pkgconfigdir)" -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = cairomm examples MSVC $(DOCS_SUBDIR) tests -#docs examples -ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = MAINTAINERS cairomm-1.0.pc.in -DIST_SUBDIRS = $(SUBDIRS) - -# Install the pkg-config file: -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = cairomm-1.0.pc - -# Copied from cairo/Makefile.am: -# -# Some custom targets to make it easier to release things. -# Use either: -# make release-check -# or make release-publish -RELEASE_UPLOAD_HOST = cairographics.org -RELEASE_UPLOAD_BASE = /srv/cairo.freedesktop.org/www -RELEASE_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE)/releases -RELEASE_URL_BASE = http://cairographics.org/releases -RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org (and CC gnome-announce-list@gnome.org) -GIT = $(top_srcdir)/missing --run git - -#MANUAL_DATED = cairo-manual-`date +%Y%m%d` -#MANUAL_TAR_FILE = $(MANUAL_DATED).tar.gz -#MANUAL_UPLOAD_DIR = $(RELEASE_UPLOAD_BASE) -tar_file = $(PACKAGE)-$(VERSION).tar.gz -sha1_file = $(tar_file).sha1 -gpg_file = $(sha1_file).asc -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -cairomm-1.0.pc: $(top_builddir)/config.status $(srcdir)/cairomm-1.0.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/MSVC/cairomm $(distdir)/docs/reference $(distdir)/m4 - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(DATA) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-pkgconfigDATA - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am uninstall-pkgconfigDATA - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-libtool distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-pkgconfigDATA \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am \ - uninstall-pkgconfigDATA - - -$(sha1_file): $(tar_file) - sha1sum $^ > $@ - -$(gpg_file): $(sha1_file) - @echo "Please enter your GPG password to sign the checksum." - gpg --armor --sign $^ - -release-verify-even-micro: - @echo -n "Checking that $(VERSION) has an even micro component..." - @test "$(GENERIC_MICRO_VERSION)" = "`echo $(GENERIC_MICRO_VERSION)/2*2 | bc`" \ - || (echo "Ouch." && echo "The version micro component '$(GENERIC_MICRO_VERSION)' is not an even number." \ - && echo "The version in configure.in must be incremented before a new release." \ - && false) - @echo "Good." - -release-verify-newer: - @echo -n "Checking that no $(VERSION) release already exists..." - @ssh $(RELEASE_UPLOAD_HOST) test ! -e $(RELEASE_UPLOAD_DIR)/$(tar_file) \ - || (echo "Ouch." && echo "Found: $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR)/$(tar_file)" \ - && echo "Are you sure you have an updated git checkout?" \ - && echo "This should never happen." \ - && false) - @echo "Good." - -release-remove-old: - rm -f $(tar_file) $(sha1_file) $(gpg_file) - -# Maybe it's just my system, but somehow group sticky bits keep -# getting set and this causes failures in un-tarring on some systems. -# Until I figure out where the sticky bit is coming from, just clean -# these up before building a release. -release-cleanup-group-sticky: - find . -type f | xargs chmod g-s - -release-check: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky distcheck - -release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file) - mkdir -p releases - scp $(tar_file) $(sha1_file) $(gpg_file) $(RELEASE_UPLOAD_HOST):$(RELEASE_UPLOAD_DIR) - mv $(tar_file) $(sha1_file) $(gpg_file) releases - ssh $(RELEASE_UPLOAD_HOST) "rm -f $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_file) $(RELEASE_UPLOAD_DIR)/LATEST-$(PACKAGE)-$(VERSION)" - $(GIT) tag -s -m "$(PACKAGE) release $(VERSION)" v$(VERSION) - -doc-publish: - (cd docs/reference && $(MAKE) $(AM_MAKEFLAGS) publish) - -release-publish: release-upload doc-publish releases/$(sha1_file) - @echo "" - @echo "Please send an announcement to $(RELEASE_ANNOUNCE_LIST)" - @echo "including the following:" - @echo "" - @echo "Subject: $(PACKAGE) release $(VERSION) now available" - @echo "" - @echo "============================== CUT HERE ==============================" - @echo "cairomm is a C++ API for the cairo graphics library. For more " - @echo "information, see http://cairographics.org/cairomm" - @echo "" - @echo "A new $(PACKAGE) release $(VERSION) is now available from:" - @echo "" - @echo " $(RELEASE_URL_BASE)/$(tar_file)" - @echo "" - @echo " which can be verified with:" - @echo "" - @echo " $(RELEASE_URL_BASE)/$(sha1_file)" - @echo -n " " - @cat releases/$(sha1_file) - @echo "" - @echo " $(RELEASE_URL_BASE)/$(gpg_file)" - @echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)" - @echo "" - @echo "WHAT'S NEW" - @echo "==========" - @echo "" - @echo "============================== CUT HERE ==============================" - @echo "Also, please include the new entries from the NEWS file." - @echo "" - @echo "Last but not least, do not forget to bump up the micro" - @echo "version component to the next (odd) number and commit." - -doc-clean-recursive: - (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-clean) - -doc-clean: doc-clean-recursive - -doc-rebuild: - (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-rebuild) - -.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish doc-clean doc-clean-recursive doc-rebuild -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/NEWS b/libs/cairomm/NEWS deleted file mode 100644 index a6cd00118f..0000000000 --- a/libs/cairomm/NEWS +++ /dev/null @@ -1,107 +0,0 @@ -1.4.6: - - * Bugfixes: - - Bug #11972: Cannot build cairomm with Quartz enabled - -1.4.4: - - * Added the --enable-api-exceptions=yes/no configure option, to allow - cairomm to build when exceptions are disabled. For instance, when using - CXXFLAGS=-fno-exceptions with g++. - -1.4.2: - - * Bugfixes: - - Bug #11596: Fixed broken shared library versioning (Dave Beckett) - - Bug #8511: RefPtr: refcounting broken with cast_*() methods (Murray - Cumming) - -1.4.0: - - * Wrapped new API added in cairo 1.4 - * Added support for Quartz surfaces - * ability to use dynamic casting for surfaces and patterns returned from - Context::get_target(), Context::get_source(), etc. - * Various build and bug fixes - -1.2.4: - - * Fixed an error that prevented Cairo::RefPtr<>::cast_static() and - Cairo::RefPtr<>::cast_dynamic() from compiling. - -1.2.2: - -* Fixed an issue when compiling on windows with MSVC - -1.2.0: - -* This is the first release that guarantees API and ABI stability -* Changed API: - - Context::clear_path() is now Context::begin_new_path() - - Context::new_sub_path() is now Context::begin_new_sub_path() -* new API: - - Win32Surface::get_dc() - - Win32Surface::create() for device-independent bitmaps -* Bugfixes - - fixed a memory leak where C++ wrapper objects were not being destroyed -* Fixes for compiling with MSVC (also includes project and resource files for - Visual Studio 2005. See the MSVC/ directory) - -1.1.10: - -* API: - - Wrap new API from cairo 1.2 - - Wrap ScaledFont -* Improved Documentation -* Build fixes - -0.6.0: - -* API: - - enumerations are now wrapped within the Cairo namespace. So, for example, - CAIRO_FORMAT_ARGB32 becomes Cairo::FORMAT_ARGB32 -* Examples: added simple text example translated from Cairo. -* Bugfixes for the Glitz and Windows backends. -* Build and installation improvements (Danilo Piazzalunga) - -0.5.0: - -* Surface: - - Created derived classes for PDF, PS, SVG, Glitz, - X11 and Win32 surfaces, which are only available if your copy - of cairo supports those surfaces. The X11 and Win32 Surface headers - must be #included explicitly. - (Jonathon Jongsma) - - Added write_to_png() and write_to_png_stream(), available when PNG - support is available in Cairo. - (Jonathon Jongsma) -* Examples: Added PNG, PDF, PS, and SVG Surface examples. - (Jonathon Jongsma) -* Added API documentation generation with doxygen (Jonathon Jongsma) - -0.4.0: - -* Add Cairo::RefPtr<> and use all reference-counted - objects via it. Use the static create() methods - instead of new for these classes. -* Context: - - Change set_dash(void) to unset_dash(). - - Change rotate_deg() to rotate_degrees(). - - Change identity_matrix() to set_identity_matrix().\ - - Change new_path() to clear_path(). -* FontFace: Remove get/set_user_data(), because it seems useless. - -0.3.0: - -* Context: - - Change mask_surface() to mask() and - set_source_surface() to set_source(). - - Add typedef for Matrix, but a real Matrix - class would be nice. -* Pattern: Created hierarchy of classes. -* Check for errors in constructors. -* Exception: Rename to logic_error, and throw - std::bad_alloc or std::io_base::failure instead - when appropriate. - (Murray Cumming) - diff --git a/libs/cairomm/README b/libs/cairomm/README deleted file mode 100644 index 6605a4e338..0000000000 --- a/libs/cairomm/README +++ /dev/null @@ -1,13 +0,0 @@ -cairomm -------------- - -This library provides a C++ interface to cairo. - -Read the file 'INSTALL' for instructions to compile and install the library. - -See the examples directory for example code. - -Use pkg-config to discover the necessary include and linker arguments. For instance, - pkg-config cairomm-1.0 --cflags --libs -Ideally you would use PKG_CHECK_MODULES in your configure.ac file. -See http://www.openismus.com for generic help with that. diff --git a/libs/cairomm/SConscript b/libs/cairomm/SConscript deleted file mode 100644 index 3af7019e52..0000000000 --- a/libs/cairomm/SConscript +++ /dev/null @@ -1,33 +0,0 @@ -# -*- python -*- - -import os -import os.path -import glob - -cairomm_files = glob.glob('cairomm/*.cc') - -Import('env libraries install_prefix') - -cairomm = env.Copy() -cairomm.Merge([libraries['cairo']]) - -cairomm.Append(CXXFLAGS='-DHAVE_CONFIG_H') - -libcairomm = cairomm.SharedLibrary('cairomm', cairomm_files) - -Default([libcairomm]) - -env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour3'), libcairomm)) - -env.Alias('tarball', env.Distribute (env['DISTTREE'], - [ 'SConscript', - 'cairomm/cairomm.h', - 'configure', - 'Makefile.in', - 'cairomm/cairomm-1.0.pc.in', - 'cairomm/Makefile.in' - ] + - cairomm_files + - glob.glob('cairomm/*.h') - )) - diff --git a/libs/cairomm/aclocal.m4 b/libs/cairomm/aclocal.m4 deleted file mode 100644 index 6753636ee0..0000000000 --- a/libs/cairomm/aclocal.m4 +++ /dev/null @@ -1,7604 +0,0 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 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. - -# 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. - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_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. -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'] - -# 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 avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# 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_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_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=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_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_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_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. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_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 conftest* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_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. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_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_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_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. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${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 </dev/null 2>&1 && unset CDPATH - -if test -z "$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 && - echo_test_string=`eval $cmd` && - (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. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_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*|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*) - 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_TRY_LINK([],[],[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" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$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 - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_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 conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# 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*) - # 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 - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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 -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_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 < -#endif - -#include - -#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 - -#ifdef __cplusplus -extern "C" void exit (int); -#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 ()); - - exit (status); -}] -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_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_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*) - 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="-dld"], - [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="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - 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_AC_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_AC_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 -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_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_AC_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 .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_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 -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_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 -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[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 -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -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" -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]) -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' - ;; - -aix4* | aix5*) - 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.so - # instead of lib.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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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 - # 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' - ;; - -netbsdelf*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_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=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 - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 - -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 -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_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 - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_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]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])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 &1 /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 - ;; - -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* | netbsdelf*-gnu) - 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=unknown - ;; - -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 - ;; - -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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - 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 -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible 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 - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[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_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([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 -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[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_AC_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_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# 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 - ;; - -aix4* | aix5*) - 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]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_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(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - 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]].*|aix5*) - 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_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_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 - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_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' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_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 $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - 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_AC_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_AC_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 $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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' - - # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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. - # 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. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -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 -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([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. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -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... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_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_AC_TAGVAR(objext, $1)=$objext - -# 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_AC_SYS_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" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -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 - ;; -aix4* | aix5*) - 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_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_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_AC_SYS_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" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_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_AC_SYS_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" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then 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 -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# 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//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# 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 - -# 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=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\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 -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# 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]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - 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 - -# 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 - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, 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. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $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 < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -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_AC_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 -f 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 -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # 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*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # 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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_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' - ;; - linux* | k*bsd*-gnu) - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # 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. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` 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 - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_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_AC_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' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_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_AC_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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - 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_AC_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_AC_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]].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - 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_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_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 - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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*) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_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' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - -# 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. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_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]) -]) - -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - -# Copyright (C) 2002, 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_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) - -# 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 -# 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 7 - -# 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]) -AC_SUBST([$1_FALSE]) -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 -# 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 - -# 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], 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 - 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 - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} 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]) -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; 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. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /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 -# 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 12 - -# 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.58])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 -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -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 - 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) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -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 -]) -]) - - -# 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_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# 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_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -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])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 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 3 - -# 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 done -.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 -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -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, 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 4 - -# 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 -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# 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 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 whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='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. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 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 3 - -# _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], -[AC_FOREACH([_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 -# 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_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# 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 /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 - -m4_include([m4/ax_boost_base.m4]) -m4_include([m4/ax_boost_unit_test_framework.m4]) -m4_include([m4/reduced.m4]) diff --git a/libs/cairomm/cairomm-1.0.pc.in b/libs/cairomm/cairomm-1.0.pc.in deleted file mode 100644 index c2832250fb..0000000000 --- a/libs/cairomm/cairomm-1.0.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: cairomm -Description: C++ wrapper for cairo -Requires: cairo -Version: @VERSION@ -Libs: -L${libdir} -lcairomm-1.0 -Cflags: -I${includedir}/cairomm-1.0 - diff --git a/libs/cairomm/cairomm/Makefile.am b/libs/cairomm/cairomm/Makefile.am deleted file mode 100644 index 547242d240..0000000000 --- a/libs/cairomm/cairomm/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -SUBDIRS = - -INCLUDES = -I$(top_srcdir) @CAIROMM_CFLAGS@ - -h_sources_public = cairomm.h context.h enums.h fontface.h fontoptions.h path.h pattern.h quartz_surface.h surface.h xlib_surface.h win32_surface.h exception.h refptr.h scaledfont.h -h_sources_private = private.h context_private.h -cc_sources = context.cc fontface.cc fontoptions.cc path.cc pattern.cc quartz_surface.cc surface.cc xlib_surface.cc win32_surface.cc exception.cc scaledfont.cc -cc_sources_private = private.cc context_surface_quartz.cc context_surface_win32.cc context_surface_xlib.cc - -# Support for DLL on cygwin/mingw using libtool > 1.4 -if PLATFORM_WIN32 -win32_dlls_ldflags = -no-undefined -Wl,--export-all-symbols -else -win32_dlls_ldflags = -endif - -lib_LTLIBRARIES = libcairomm-1.0.la -libcairomm_1_0_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION) $(win32_dlls_ldflags) -libcairomm_1_0_la_LIBADD = @CAIROMM_LIBS@ -libcairomm_1_0_la_SOURCES = $(cc_sources) $(h_sources_public) $(h_sources_private) $(cc_sources_private) - -# Install the headers: -library_includedir=$(includedir)/cairomm-1.0/cairomm -library_include_HEADERS = $(h_sources_public) diff --git a/libs/cairomm/cairomm/Makefile.in b/libs/cairomm/cairomm/Makefile.in deleted file mode 100644 index e1ef6c5f23..0000000000 --- a/libs/cairomm/cairomm/Makefile.in +++ /dev/null @@ -1,674 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = cairomm -DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/cairommconfig.h.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = cairommconfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(library_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libcairomm_1_0_la_DEPENDENCIES = -am__objects_1 = context.lo fontface.lo fontoptions.lo path.lo \ - pattern.lo quartz_surface.lo surface.lo xlib_surface.lo \ - win32_surface.lo exception.lo scaledfont.lo -am__objects_2 = -am__objects_3 = private.lo -am_libcairomm_1_0_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ - $(am__objects_2) $(am__objects_3) -libcairomm_1_0_la_OBJECTS = $(am_libcairomm_1_0_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libcairomm_1_0_la_SOURCES) -DIST_SOURCES = $(libcairomm_1_0_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -library_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(library_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = -INCLUDES = -I$(top_srcdir) @CAIROMM_CFLAGS@ -h_sources_public = cairomm.h context.h enums.h fontface.h fontoptions.h path.h pattern.h quartz_surface.h surface.h xlib_surface.h win32_surface.h exception.h refptr.h scaledfont.h -h_sources_private = private.h -cc_sources = context.cc fontface.cc fontoptions.cc path.cc pattern.cc quartz_surface.cc surface.cc xlib_surface.cc win32_surface.cc exception.cc scaledfont.cc -cc_sources_private = private.cc -@PLATFORM_WIN32_FALSE@win32_dlls_ldflags = - -# Support for DLL on cygwin/mingw using libtool > 1.4 -@PLATFORM_WIN32_TRUE@win32_dlls_ldflags = -no-undefined -Wl,--export-all-symbols -lib_LTLIBRARIES = libcairomm-1.0.la -libcairomm_1_0_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION) $(win32_dlls_ldflags) -libcairomm_1_0_la_LIBADD = @CAIROMM_LIBS@ -libcairomm_1_0_la_SOURCES = $(cc_sources) $(h_sources_public) $(h_sources_private) $(cc_sources_private) - -# Install the headers: -library_includedir = $(includedir)/cairomm-1.0/cairomm -library_include_HEADERS = $(h_sources_public) -all: cairommconfig.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .cc .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cairomm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu cairomm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -cairommconfig.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/cairommconfig.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status cairomm/cairommconfig.h -$(srcdir)/cairommconfig.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f cairommconfig.h stamp-h1 -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libcairomm-1.0.la: $(libcairomm_1_0_la_OBJECTS) $(libcairomm_1_0_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libcairomm_1_0_la_LDFLAGS) $(libcairomm_1_0_la_OBJECTS) $(libcairomm_1_0_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontoptions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/private.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartz_surface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scaledfont.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/surface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_surface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xlib_surface.Plo@am__quote@ - -.cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: -install-library_includeHEADERS: $(library_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(library_includedir)" || $(mkdir_p) "$(DESTDIR)$(library_includedir)" - @list='$(library_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(library_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(library_includedir)/$$f'"; \ - $(library_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(library_includedir)/$$f"; \ - done - -uninstall-library_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(library_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(library_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(library_includedir)/$$f"; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) cairommconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) cairommconfig.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) cairommconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) cairommconfig.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) cairommconfig.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-library_includeHEADERS - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-library_includeHEADERS - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-recursive ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-recursive distclean-tags distdir \ - dvi dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-library_includeHEADERS install-man install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-library_includeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/cairomm/cairomm.h b/libs/cairomm/cairomm/cairomm.h deleted file mode 100644 index 7f78a79a66..0000000000 --- a/libs/cairomm/cairomm/cairomm.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_H -#define __CAIROMM_H - -/** @mainpage Cairomm: A C++ wrapper for the cairo graphics library - * - * @section License - * Cairomm is available under the terms of the LGPL license - * - * @section Introduction - * If you're just beginning to learn cairomm, a good place to start is with the - * Cairo::Surface and Cairo::Context classes. In general terms, you draw onto - * a Surface using the graphics settings specified in your Context. - * - */ - -#include -#include -#include -#include -#include -#include - -#endif //__CAIROMM_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/cairommconfig.h.in b/libs/cairomm/cairomm/cairommconfig.h.in deleted file mode 100644 index f1c7895bff..0000000000 --- a/libs/cairomm/cairomm/cairommconfig.h.in +++ /dev/null @@ -1,73 +0,0 @@ -/* cairomm/cairommconfig.h.in. Generated from configure.in by autoheader. */ - -/* Defined when the --enable-api-exceptions configure argument was given */ -#undef CAIROMM_EXCEPTIONS_ENABLED - -/* define if the Boost library is available */ -#undef HAVE_BOOST - -/* define if the Boost::Unit_Test_Framework library is available */ -#undef HAVE_BOOST_UNIT_TEST_FRAMEWORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIST - -/* Define to 1 if you have the header file. */ -#undef HAVE_MAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION diff --git a/libs/cairomm/cairomm/context.cc b/libs/cairomm/cairomm/context.cc deleted file mode 100644 index 107b195079..0000000000 --- a/libs/cairomm/cairomm/context.cc +++ /dev/null @@ -1,797 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include -#include -#include - -/* M_PI is defined in math.h in the case of Microsoft Visual C++ */ -#if defined(_MSC_VER) -#define _USE_MATH_DEFINES -#include -#endif - -using namespace Cairo::Private; - -namespace Cairo -{ - -Context::Context(const RefPtr& target) -: m_cobject(0) -{ - m_cobject = cairo_create(target->cobj()); - check_object_status_and_throw_exception(*this); -} - -RefPtr Context::create(const RefPtr& target) -{ - return RefPtr(new Context(target)); -} - -Context::Context(cairo_t* cobject, bool has_reference) -: m_cobject(0) -{ - if(has_reference) - m_cobject = cobject; - else - m_cobject = cairo_reference(cobject); -} - -Context::~Context() -{ - if(m_cobject) - cairo_destroy(m_cobject); -} - - -void Context::reference() const -{ - cairo_reference(m_cobject); -} - -void Context::unreference() const -{ - cairo_destroy(m_cobject); -} - -void Context::save() -{ - cairo_save(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::restore() -{ - cairo_restore(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::set_operator(Operator op) -{ - cairo_set_operator(m_cobject, static_cast(op)); - check_object_status_and_throw_exception(*this); -} - -void Context::set_source(const RefPtr& source) -{ - cairo_set_source(m_cobject, const_cast(source->cobj())); - check_object_status_and_throw_exception(*this); -} - -void Context::set_source_rgb(double red, double green, double blue) -{ - cairo_set_source_rgb(m_cobject, red, green, blue); - check_object_status_and_throw_exception(*this); -} - -void Context::set_source_rgba(double red, double green, double blue, -double alpha) -{ - cairo_set_source_rgba(m_cobject, red, green, blue, alpha); - check_object_status_and_throw_exception(*this); -} - -void Context::set_source(const RefPtr& surface, double x, double y) -{ - cairo_set_source_surface(m_cobject, surface->cobj(), x, y); - check_object_status_and_throw_exception(*this); -} - -void Context::set_tolerance(double tolerance) -{ - cairo_set_tolerance(m_cobject, tolerance); - check_object_status_and_throw_exception(*this); -} - -void Context::set_antialias(Antialias antialias) -{ - cairo_set_antialias(m_cobject, static_cast(antialias)); - check_object_status_and_throw_exception(*this); -} - -void Context::set_fill_rule(FillRule fill_rule) -{ - cairo_set_fill_rule(m_cobject, static_cast(fill_rule)); - check_object_status_and_throw_exception(*this); -} - -void Context::set_line_width(double width) -{ - cairo_set_line_width(m_cobject, width); - check_object_status_and_throw_exception(*this); -} - -void Context::set_line_cap(LineCap line_cap) -{ - cairo_set_line_cap(m_cobject, static_cast(line_cap)); - check_object_status_and_throw_exception(*this); -} - -void Context::set_line_join(LineJoin line_join) -{ - cairo_set_line_join(m_cobject, static_cast(line_join)); - check_object_status_and_throw_exception(*this); -} - -void Context::set_dash(std::valarray& dashes, double offset) -{ - cairo_set_dash(m_cobject, &dashes[0], dashes.size(), offset); - check_object_status_and_throw_exception(*this); -} - -void Context::set_dash(std::vector& dashes, double offset) -{ - cairo_set_dash(m_cobject, &dashes[0], dashes.size(), offset); - check_object_status_and_throw_exception(*this); -} - -void Context::unset_dash() -{ - cairo_set_dash(m_cobject, NULL, 0, 0.0); - check_object_status_and_throw_exception(*this); -} - -void Context::set_miter_limit(double limit) -{ - cairo_set_miter_limit(m_cobject, limit); - check_object_status_and_throw_exception(*this); -} - -void Context::translate(double tx, double ty) -{ - cairo_translate(m_cobject, tx, ty); - check_object_status_and_throw_exception(*this); -} - -void Context::scale(double sx, double sy) -{ - cairo_scale(m_cobject, sx, sy); - check_object_status_and_throw_exception(*this); -} - -void Context::rotate(double angle_radians) -{ - cairo_rotate(m_cobject, angle_radians); - check_object_status_and_throw_exception(*this); -} - -void Context::rotate_degrees(double angle_degrees) -{ - cairo_rotate(m_cobject, angle_degrees * M_PI/180.0); - check_object_status_and_throw_exception(*this); -} - -void Context::transform(const Matrix& matrix) -{ - cairo_transform(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -void Context::set_matrix(const Matrix& matrix) -{ - cairo_set_matrix(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -void Context::set_identity_matrix() -{ - cairo_identity_matrix(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::user_to_device(double& x, double& y) -{ - cairo_user_to_device(m_cobject, &x, &y); - check_object_status_and_throw_exception(*this); -} - -void Context::user_to_device_distance(double& dx, double& dy) -{ - cairo_user_to_device_distance(m_cobject, &dx, &dy); - check_object_status_and_throw_exception(*this); -} - -void Context::device_to_user(double& x, double& y) -{ - cairo_device_to_user(m_cobject, &x, &y); - check_object_status_and_throw_exception(*this); -} - -void Context::device_to_user_distance(double& dx, double& dy) -{ - cairo_device_to_user_distance(m_cobject, &dx, &dy); - check_object_status_and_throw_exception(*this); -} - -void Context::begin_new_path() -{ - cairo_new_path(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::begin_new_sub_path() -{ - cairo_new_sub_path(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::move_to(double x, double y) -{ - cairo_move_to(m_cobject, x, y); - check_object_status_and_throw_exception(*this); -} - -void Context::line_to(double x, double y) -{ - cairo_line_to(m_cobject, x, y); - check_object_status_and_throw_exception(*this); -} - -void Context::curve_to(double x1, double y1, double x2, double y2, double x3, double y3) -{ - cairo_curve_to(m_cobject, x1, y1, x2, y2, x3, y3); - check_object_status_and_throw_exception(*this); -} - -void Context::arc(double xc, double yc, double radius, double angle1, double angle2) -{ - cairo_arc(m_cobject, xc, yc, radius, angle1, angle2); - check_object_status_and_throw_exception(*this); -} - -void Context::arc_negative(double xc, double yc, double radius, double angle1, double angle2) -{ - cairo_arc_negative(m_cobject, xc, yc, radius, angle1, angle2); - check_object_status_and_throw_exception(*this); -} - -void Context::rel_move_to(double dx, double dy) -{ - cairo_rel_move_to(m_cobject, dx, dy); - check_object_status_and_throw_exception(*this); -} - -void Context::rel_line_to(double dx, double dy) -{ - cairo_rel_line_to(m_cobject, dx, dy); - check_object_status_and_throw_exception(*this); -} - -void Context::rel_curve_to(double dx1, double dy1, double dx2, double dy2, double dx3, double dy3) -{ - cairo_rel_curve_to(m_cobject, dx1, dy1, dx2, dy2, dx3, dy3); - check_object_status_and_throw_exception(*this); -} - -void Context::rectangle(double x, double y, double width, double height) -{ - cairo_rectangle(m_cobject, x, y, width, height); - check_object_status_and_throw_exception(*this); -} - -void Context::close_path() -{ - cairo_close_path(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::paint() -{ - cairo_paint(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::paint_with_alpha(double alpha) -{ - cairo_paint_with_alpha(m_cobject, alpha); - check_object_status_and_throw_exception(*this); -} - -void Context::mask(const RefPtr& pattern) -{ - cairo_mask(m_cobject, const_cast(pattern->cobj())); - check_object_status_and_throw_exception(*this); -} - -void Context::mask(const RefPtr& surface, double surface_x, double surface_y) -{ - cairo_mask_surface(m_cobject, const_cast(surface->cobj()), surface_x, surface_y); - check_object_status_and_throw_exception(*this); -} - -void Context::stroke() -{ - cairo_stroke(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::stroke_preserve() -{ - cairo_stroke_preserve(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::fill() -{ - cairo_fill(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::fill_preserve() -{ - cairo_fill_preserve(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::copy_page() -{ - cairo_copy_page(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::show_page() -{ - cairo_show_page(m_cobject); - check_object_status_and_throw_exception(*this); -} - -bool Context::in_stroke(double x, double y) const -{ - const bool result = cairo_in_stroke(m_cobject, x, y); - check_object_status_and_throw_exception(*this); - return result; -} - -bool Context::in_fill(double x, double y) const -{ - const bool result = cairo_in_fill(m_cobject, x, y); - check_object_status_and_throw_exception(*this); - return result; -} - -void Context::get_stroke_extents(double& x1, double& y1, double& x2, double& y2) const -{ - cairo_stroke_extents(m_cobject, &x1, &y1, &x2, &y2); - check_object_status_and_throw_exception(*this); -} - -void Context::get_fill_extents(double& x1, double& y1, double& x2, double& y2) const -{ - cairo_fill_extents(m_cobject, &x1, &y1, &x2, &y2); - check_object_status_and_throw_exception(*this); -} - -void Context::reset_clip() -{ - cairo_reset_clip(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::clip() -{ - cairo_clip(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::clip_preserve() -{ - cairo_clip_preserve(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::get_clip_extents(double& x1, double& y1, double& x2, double& y2) const -{ - cairo_clip_extents(const_cast(m_cobject), &x1, &y1, &x2, &y2); - check_object_status_and_throw_exception(*this); -} - -void Context::copy_clip_rectangle_list(std::vector& rectangles) const -{ - cairo_rectangle_list_t* c_list = 0; - // It would be nice if the cairo interface didn't copy it into a C array first - // and just let us do the copying... - c_list = cairo_copy_clip_rectangle_list(const_cast(m_cobject)); - // the rectangle list contains a status field that we need to check and the - // cairo context also has a status that we need to check - // FIXME: do we want to throw an exception if the clip can't be represented by - // rectangles? or do we just want to return an empty list? - check_status_and_throw_exception(c_list->status); - check_object_status_and_throw_exception(*this); - // copy the C array into the passed C++ list - rectangles.assign(c_list->rectangles, - c_list->rectangles + c_list->num_rectangles); - // free the memory allocated to the C array since we've copied it into a - // standard C++ container - cairo_rectangle_list_destroy(c_list); -} - -void Context::select_font_face(const std::string& family, FontSlant slant, FontWeight weight) -{ - cairo_select_font_face(m_cobject, family.c_str(), - static_cast(slant), - static_cast(weight)); - check_object_status_and_throw_exception(*this); -} - -void Context::set_font_size(double size) -{ - cairo_set_font_size(m_cobject, size); - check_object_status_and_throw_exception(*this); -} - -void Context::set_font_matrix(const Matrix& matrix) -{ - cairo_set_font_matrix(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -void Context::get_font_matrix(Matrix& matrix) const -{ - cairo_get_font_matrix(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -void Context::set_font_options(const FontOptions& options) -{ - cairo_set_font_options(m_cobject, options.cobj()); - check_object_status_and_throw_exception(*this); -} - -void Context::show_text(const std::string& utf8) -{ - cairo_show_text(m_cobject, utf8.c_str()); - check_object_status_and_throw_exception(*this); -} - -void Context::show_glyphs(const std::vector& glyphs) -{ - cairo_show_glyphs(m_cobject, const_cast(&glyphs[0]), glyphs.size()); - check_object_status_and_throw_exception(*this); -} - -RefPtr Context::get_font_face() -{ - cairo_font_face_t* cfontface = cairo_get_font_face(m_cobject); - check_object_status_and_throw_exception(*this); - return RefPtr(new FontFace(cfontface, false /* does not have reference */)); -} - -RefPtr Context::get_font_face() const -{ - cairo_font_face_t* cfontface = cairo_get_font_face(m_cobject); - check_object_status_and_throw_exception(*this); - return RefPtr(new FontFace(cfontface, false /* does not have reference */)); -} - -void Context::get_font_extents(FontExtents& extents) const -{ - cairo_font_extents(m_cobject, &extents); - check_object_status_and_throw_exception(*this); -} - -void Context::set_font_face(const RefPtr& font_face) -{ - cairo_set_font_face(m_cobject, const_cast(font_face->cobj())); - check_object_status_and_throw_exception(*this); -} - -void Context::get_text_extents(const std::string& utf8, TextExtents& extents) const -{ - cairo_text_extents(m_cobject, utf8.c_str(), &extents); - check_object_status_and_throw_exception(*this); -} - -void Context::get_glyph_extents(const std::vector& glyphs, TextExtents& extents) const -{ - cairo_glyph_extents(m_cobject, const_cast(&glyphs[0]), glyphs.size(), &extents); - check_object_status_and_throw_exception(*this); -} - -void Context::text_path(const std::string& utf8) -{ - cairo_text_path(m_cobject, utf8.c_str()); - check_object_status_and_throw_exception(*this); -} - -void Context::glyph_path(const std::vector& glyphs) -{ - cairo_glyph_path(m_cobject, const_cast(&glyphs[0]), glyphs.size()); - check_object_status_and_throw_exception(*this); -} - -Operator Context::get_operator() const -{ - const Operator result = static_cast(cairo_get_operator(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -static RefPtr get_pattern_wrapper (cairo_pattern_t* pattern) -{ - cairo_pattern_type_t pattern_type = cairo_pattern_get_type (pattern); - switch (pattern_type) - { - case CAIRO_PATTERN_TYPE_SOLID: - return RefPtr(new SolidPattern(pattern, false /* does not have reference */)); - break; - case CAIRO_PATTERN_TYPE_SURFACE: - return RefPtr(new SurfacePattern(pattern, false /* does not have reference */)); - break; - case CAIRO_PATTERN_TYPE_LINEAR: - return RefPtr(new LinearGradient(pattern, false /* does not have reference */)); - break; - case CAIRO_PATTERN_TYPE_RADIAL: - return RefPtr(new RadialGradient(pattern, false /* does not have reference */)); - break; - default: - return RefPtr(new Pattern(pattern, false /* does not have reference */)); - } -} - -RefPtr Context::get_source() -{ - cairo_pattern_t* pattern = cairo_get_source(m_cobject); - check_object_status_and_throw_exception(*this); - return get_pattern_wrapper (pattern); -} - -RefPtr Context::get_source() const -{ - cairo_pattern_t* pattern = cairo_get_source(m_cobject); - check_object_status_and_throw_exception(*this); - return RefPtr::cast_const (get_pattern_wrapper (pattern)); -} - -double Context::get_tolerance() const -{ - const double result = cairo_get_tolerance(m_cobject); - check_object_status_and_throw_exception(*this); - return result; -} - -Antialias Context::get_antialias() const -{ - const Antialias result = static_cast(cairo_get_antialias(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -void Context::get_current_point(double& x, double& y) const -{ - cairo_get_current_point(m_cobject, &x, &y); - check_object_status_and_throw_exception(*this); -} - -FillRule Context::get_fill_rule() const -{ - const FillRule result = static_cast(cairo_get_fill_rule(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -double Context::get_line_width() const -{ - const double result = cairo_get_line_width(m_cobject); - check_object_status_and_throw_exception(*this); - return result; -} - -LineCap Context::get_line_cap() const -{ - const LineCap result = static_cast(cairo_get_line_cap(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -LineJoin Context::get_line_join() const -{ - const LineJoin result = static_cast(cairo_get_line_join(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -double Context::get_miter_limit() const -{ - const double result = cairo_get_miter_limit(m_cobject); - check_object_status_and_throw_exception(*this); - return result; -} - -void -Context::get_dash(std::vector& dashes, double& offset) const -{ - // Allocate this array dynamically because some compilers complain about - // allocating arrays on the stack when the array size isn't a compile-time - // constant... - const int cnt = cairo_get_dash_count(m_cobject); - double* dash_array = new double[cnt]; - cairo_get_dash(const_cast(m_cobject), dash_array, &offset); - check_object_status_and_throw_exception(*this); - dashes.assign(dash_array, dash_array + cnt); - delete[] dash_array; -} - -void Context::get_matrix(Matrix& matrix) -{ - cairo_get_matrix(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -static -RefPtr get_surface_wrapper (cairo_surface_t* surface) -{ - cairo_surface_type_t surface_type = cairo_surface_get_type (surface); - switch (surface_type) - { - case CAIRO_SURFACE_TYPE_IMAGE: - return RefPtr(new ImageSurface(surface, false /* does not have reference */)); - break; -#if CAIRO_HAS_PDF_SURFACE - case CAIRO_SURFACE_TYPE_PDF: - return RefPtr(new PdfSurface(surface, false /* does not have reference */)); - break; -#endif -#if CAIRO_HAS_PS_SURFACE - case CAIRO_SURFACE_TYPE_PS: - return RefPtr(new PsSurface(surface, false /* does not have reference */)); - break; -#endif -#if CAIRO_HAS_XLIB_SURFACE - case CAIRO_SURFACE_TYPE_XLIB: - return wrap_surface_xlib(surface); - break; -#endif -#if CAIRO_HAS_GLITZ_SURFACE - case CAIRO_SURFACE_TYPE_GLITZ: - return RefPtr(new GlitzSurface(surface, false /* does not have reference */)); - break; -#endif -#if CAIRO_HAS_QUARTZ_SURFACE - case CAIRO_SURFACE_TYPE_QUARTZ: - return wrap_surface_quartz(surface); - break; -#endif -#if CAIRO_HAS_WIN32_SURFACE - case CAIRO_SURFACE_TYPE_WIN32: - return wrap_surface_win32(surface); - break; -#endif -#if CAIRO_HAS_SVG_SURFACE - case CAIRO_SURFACE_TYPE_SVG: - return RefPtr(new SvgSurface(surface, false /* does not have reference */)); - break; -#endif - // the following surfaces are not directly supported in cairomm yet - case CAIRO_SURFACE_TYPE_DIRECTFB: - case CAIRO_SURFACE_TYPE_OS2: - case CAIRO_SURFACE_TYPE_BEOS: - case CAIRO_SURFACE_TYPE_XCB: - default: - return RefPtr(new Surface(surface, false /* does not have reference */)); - } -} - -RefPtr Context::get_target() -{ - cairo_surface_t* surface = cairo_get_target(const_cast(m_cobject)); - check_object_status_and_throw_exception(*this); - return get_surface_wrapper (surface); -} - -RefPtr Context::get_target() const -{ - cairo_surface_t* surface = cairo_get_target(const_cast(m_cobject)); - check_object_status_and_throw_exception(*this); - return RefPtr::cast_const (get_surface_wrapper (surface)); -} - -Path* Context::copy_path() const -{ - cairo_path_t* cresult = cairo_copy_path(const_cast(m_cobject)); - check_object_status_and_throw_exception(*this); - return new Path(cresult, true /* take ownership */); //The caller must delete it. -} - -Path* Context::copy_path_flat() const -{ - cairo_path_t* cresult = cairo_copy_path_flat(const_cast(m_cobject)); - check_object_status_and_throw_exception(*this); - return new Path(cresult, true /* take ownership */); //The caller must delete it. -} - -void Context::append_path(const Path& path) -{ - cairo_append_path(m_cobject, const_cast(path.cobj())); - check_object_status_and_throw_exception(*this); -} - -void Context::push_group() -{ - cairo_push_group(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Context::push_group_with_content(Content content) -{ - cairo_push_group_with_content(m_cobject, static_cast(content)); - check_object_status_and_throw_exception(*this); -} - -RefPtr Context::pop_group() -{ - cairo_pattern_t* pattern = cairo_pop_group(m_cobject); - check_object_status_and_throw_exception(*this); - return get_pattern_wrapper(pattern); -} - -void Context::pop_group_to_source() -{ - cairo_pop_group_to_source(m_cobject); - check_object_status_and_throw_exception(*this); -} - -RefPtr Context::get_group_target() -{ - cairo_surface_t* surface = cairo_get_group_target(m_cobject); - // surface can be NULL if you're not between push/pop group calls - if(!surface) - { - // FIXME: is this really the right way to handle this? - throw_exception(CAIRO_STATUS_NULL_POINTER); - } - - return get_surface_wrapper(surface); -} - -RefPtr Context::get_group_target() const -{ - cairo_surface_t* surface = cairo_get_group_target(m_cobject); - // surface can be NULL if you're not between push/pop group calls - if(!surface) - { - // FIXME: is this really the right way to handle this? - throw_exception(CAIRO_STATUS_NULL_POINTER); - } - - return get_surface_wrapper(surface); -} - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/context.h b/libs/cairomm/cairomm/context.h deleted file mode 100644 index 4e31cda1f6..0000000000 --- a/libs/cairomm/cairomm/context.h +++ /dev/null @@ -1,978 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_CONTEXT_H -#define __CAIROMM_CONTEXT_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace Cairo -{ - -typedef cairo_glyph_t Glyph; //A simple struct. -typedef cairo_font_extents_t FontExtents; //A simple struct. -typedef cairo_text_extents_t TextExtents; //A simple struct. -typedef cairo_matrix_t Matrix; //A simple struct. //TODO: Derive and add operator[] and operator. matrix multiplication? -typedef cairo_rectangle_t Rectangle; - -/** Context is the main class used to draw in cairomm. - * In the simplest case, create a Context with its target Surface, set its - * drawing options (line width, color, etc), create shapes with methods like - * move_to() and line_to(), and then draw the shapes to the Surface using - * methods such as stroke() or fill(). - * - * Context is a reference-counted object that should be used via Cairo::RefPtr. - */ -class Context -{ -protected: - explicit Context(const RefPtr& target); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit Context(cairo_t* cobject, bool has_reference = false); - - static RefPtr create(const RefPtr& target); - - virtual ~Context(); - - /** Makes a copy of the current state of the Context and saves it on an - * internal stack of saved states. When restore() is called, it will be - * restored to the saved state. Multiple calls to save() and restore() can be - * nested; each call to restore() restores the state from the matching paired - * save(). - * - * It isn't necessary to clear all saved states before a cairo_t is freed. - * Any saved states will be freed when the Context is destroyed. - * - * @sa restore() - */ - void save(); - - /** Restores cr to the state saved by a preceding call to save() and removes - * that state from the stack of saved states. - * - * @sa save() - */ - void restore(); - - /** Sets the compositing operator to be used for all drawing operations. See - * Operator for details on the semantics of each available compositing - * operator. - * - * @param op a compositing operator, specified as a Operator - */ - void set_operator(Operator op); - - /** Sets the source pattern within the Context to source. This Pattern will - * then be used for any subsequent drawing operation until a new source - * pattern is set. - * - * Note: The Pattern's transformation matrix will be locked to the user space - * in effect at the time of set_source(). This means that further - * modifications of the current transformation matrix will not affect the - * source pattern. - * - * @param source a Pattern to be used as the source for subsequent drawing - * operations. - * - * @sa Pattern::set_matrix() - * @sa set_source_rgb() - * @sa set_source_rgba() - * @sa set_source(const RefPtr& surface, double x, double y) - */ - void set_source(const RefPtr& source); - - /** Sets the source pattern within the Context to an opaque color. This - * opaque color will then be used for any subsequent drawing operation until - * a new source pattern is set. - * - * The color components are floating point numbers in the range 0 to 1. If - * the values passed in are outside that range, they will be clamped. - * - * @param red red component of color - * @param green green component of color - * @param blue blue component of color - * - * @sa set_source_rgba() - * @sa set_source() - */ - void set_source_rgb(double red, double green, double blue); - - /** Sets the source pattern within the Context to a translucent color. This - * color will then be used for any subsequent drawing operation until a new - * source pattern is set. - * - * The color and alpha components are floating point numbers in the range 0 - * to 1. If the values passed in are outside that range, they will be - * clamped. - * - * @param red red component of color - * @param green green component of color - * @param blue blue component of color - * @param alpha alpha component of color - * - * @sa set_source_rgb() - * @sa set_source() - */ - void set_source_rgba(double red, double green, double blue, double alpha); - - /** This is a convenience function for creating a pattern from a Surface and - * setting it as the source - * - * The x and y parameters give the user-space coordinate at which the Surface - * origin should appear. (The Surface origin is its upper-left corner before - * any transformation has been applied.) The x and y patterns are negated and - * then set as translation values in the pattern matrix. - * - * Other than the initial translation pattern matrix, as described above, all - * other pattern attributes, (such as its extend mode), are set to the - * default values as in Context::create(const RefPtr& target). The - * resulting pattern can be queried with get_source() so that these - * attributes can be modified if desired, (eg. to create a repeating pattern - * with Pattern::set_extend()). - * - * @param surface : a Surface to be used to set the source pattern - * @param x : User-space X coordinate for surface origin - * @param y : User-space Y coordinate for surface origin - */ - void set_source(const RefPtr& surface, double x, double y); - - /** Sets the tolerance used when converting paths into trapezoids. Curved - * segments of the path will be subdivided until the maximum deviation - * between the original path and the polygonal approximation is less than - * tolerance. The default value is 0.1. A larger value will give better - * performance, a smaller value, better appearance. (Reducing the value from - * the default value of 0.1 is unlikely to improve appearance significantly.) - * - * @param tolerance the tolerance, in device units (typically pixels) - */ - void set_tolerance(double tolerance); - - /** Set the antialiasing mode of the rasterizer used for drawing shapes. This - * value is a hint, and a particular backend may or may not support a - * particular value. At the current time, no backend supports - * CAIRO_ANTIALIAS_SUBPIXEL when drawing shapes. - * - * Note that this option does not affect text rendering, instead see - * FontOptions::set_antialias(). - * - * @param antialias the new antialiasing mode - */ - void set_antialias(Antialias antialias); - - /** Set the current fill rule within the cairo Context. The fill rule is used - * to determine which regions are inside or outside a complex (potentially - * self-intersecting) path. The current fill rule affects both fill() and - * clip(). See FillRule for details on the semantics of each available fill - * rule. - * - * @param fill_rule a fill rule, specified as a FillRule - */ - void set_fill_rule(FillRule fill_rule); - - /** Sets the current line width within the cairo Context. The line width - * specifies the diameter of a pen that is circular in user-space. - * - * As with the other stroke parameters, the current line cap style is - * examined by stroke(), stroke_extents(), and stroke_to_path(), but does not - * have any effect during path construction. - * - * @param width a line width, as a user-space value - */ - void set_line_width(double width); - - /** Sets the current line cap style within the cairo Context. See - * LineCap for details about how the available line cap styles are drawn. - * - * As with the other stroke parameters, the current line cap style is - * examined by stroke(), stroke_extents(), and stroke_to_path(), but does not - * have any effect during path construction. - * - * @param line_cap a line cap style, as a LineCap - */ - void set_line_cap(LineCap line_cap); - - /** Sets the current line join style within the cairo Context. See LineJoin - * for details about how the available line join styles are drawn. - * - * As with the other stroke parameters, the current line join style is - * examined by stroke(), stroke_extents(), and stroke_to_path(), but does not - * have any effect during path construction. - * - * @param line_join a line joint style, as a LineJoin - */ - void set_line_join(LineJoin line_join); - - /** - * Alternate version of set_dash(). You'll probably want to use the one that - * takes a std::vector argument instead. - */ - void set_dash(std::valarray& dashes, double offset); - /** Sets the dash pattern to be used by stroke(). A dash pattern is specified - * by dashes, an array of positive values. Each value provides the user-space - * length of altenate "on" and "off" portions of the stroke. The offset - * specifies an offset into the pattern at which the stroke begins. - * - * If dashes is empty dashing is disabled. If the size of dashes is 1, a - * symmetric pattern is assumed with alternating on and off portions of the - * size specified by the single value in dashes. - * - * It is invalid for any value in dashes to be negative, or for all values to - * be 0. If this is the case, an exception will be thrown - * - * @param dashes an array specifying alternate lengths of on and off portions - * @param offset an offset into the dash pattern at which the stroke should start - * - * @exception - */ - void set_dash(std::vector& dashes, double offset); - - /** This function disables a dash pattern that was set with set_dash() - */ - void unset_dash(); - void set_miter_limit(double limit); - - /** Modifies the current transformation matrix (CTM) by translating the - * user-space origin by (tx, ty). This offset is interpreted as a user-space - * coordinate according to the CTM in place before the new call to - * cairo_translate. In other words, the translation of the user-space origin - * takes place after any existing transformation. - * - * @param tx amount to translate in the X direction - * @param ty amount to translate in the Y direction - */ - void translate(double tx, double ty); - - /** Modifies the current transformation matrix (CTM) by scaling the X and Y - * user-space axes by sx and sy respectively. The scaling of the axes takes - * place after any existing transformation of user space. - * - * @param sx scale factor for the X dimension - * @param sy scale factor for the Y dimension - */ - void scale(double sx, double sy); - - /** Modifies the current transformation matrix (CTM) by rotating the - * user-space axes by angle radians. The rotation of the axes takes places - * after any existing transformation of user space. The rotation direction - * for positive angles is from the positive X axis toward the positive Y - * axis. - * - * @param angle angle (in radians) by which the user-space axes will be - * rotated - */ - void rotate(double angle_radians); - - /** A convenience wrapper around rotate() that accepts angles in degrees - * - * @param angle_degrees angle (in degrees) by which the user-space axes - * should be rotated - */ - void rotate_degrees(double angle_degres); - - /** Modifies the current transformation matrix (CTM) by applying matrix as an - * additional transformation. The new transformation of user space takes - * place after any existing transformation. - * - * @param matrix a transformation to be applied to the user-space axes - */ - void transform(const Matrix& matrix); - - /** Modifies the current transformation matrix (CTM) by setting it equal to - * matrix. - * - * @param matrix a transformation matrix from user space to device space - */ - void set_matrix(const Matrix& matrix); - - /** Resets the current transformation matrix (CTM) by setting it equal to the - * identity matrix. That is, the user-space and device-space axes will be - * aligned and one user-space unit will transform to one device-space unit. - */ - void set_identity_matrix(); - - /** Transform a coordinate from user space to device space by multiplying the - * given point by the current transformation matrix (CTM). - * - * @param x X value of coordinate (in/out parameter) - * @param y Y value of coordinate (in/out parameter) - */ - void user_to_device(double& x, double& y); - - /** Transform a distance vector from user space to device space. This - * function is similar to user_to_device() except that the translation - * components of the CTM will be ignored when transforming (dx,dy). - * - * @param dx X component of a distance vector (in/out parameter) - * @param dy Y component of a distance vector (in/out parameter) - */ - void user_to_device_distance(double& dx, double& dy); - - /** Transform a coordinate from device space to user space by multiplying the - * given point by the inverse of the current transformation matrix (CTM). - * - * @param x X value of coordinate (in/out parameter) - * @param y Y value of coordinate (in/out parameter) - */ - void device_to_user(double& x, double& y); - - /** Transform a distance vector from device space to user space. This - * function is similar to device_to_user() except that the translation - * components of the inverse CTM will be ignored when transforming (dx,dy). - * - * @param dx X component of a distance vector (in/out parameter) - * @param dy Y component of a distance vector (in/out parameter) - */ - void device_to_user_distance(double& dx, double& dy); - - /** Clears the current path. After this call there will be no current point. - */ - void begin_new_path(); - - /** Begin a new subpath. Note that the existing path is not affected. After - * this call there will be no current point. - * - * In many cases, this call is not needed since new subpaths are frequently - * started with move_to(). - * - * A call to begin_new_sub_path() is particularly useful when beginning a new - * subpath with one of the arc() calls. This makes things easier as it is no - * longer necessary to manually compute the arc's initial coordinates for a - * call to move_to(). - */ - void begin_new_sub_path(); - - /** If the current subpath is not empty, begin a new subpath. After this call - * the current point will be (x, y). - * - * @param x the X coordinate of the new position - * @param y the Y coordinate of the new position - */ - void move_to(double x, double y); - - /** Adds a line to the path from the current point to position (x, y) in - * user-space coordinates. After this call the current point will be (x, y). - * - * @param x the X coordinate of the end of the new line - * @param y the Y coordinate of the end of the new line - */ - void line_to(double x, double y); - - /** Adds a cubic Bezier spline to the path from the current point to position - * (x3, y3) in user-space coordinates, using (x1, y1) and (x2, y2) as the - * control points. After this call the current point will be (x3, y3). - * - * @param x1 the X coordinate of the first control point - * @param y1 the Y coordinate of the first control point - * @param x2 the X coordinate of the second control point - * @param y2 the Y coordinate of the second control point - * @param x3 the X coordinate of the end of the curve - * @param y3 the Y coordinate of the end of the curve - */ - void curve_to(double x1, double y1, double x2, double y2, double x3, double y3); - - /** Adds a circular arc of the given radius to the current path. The arc is - * centered at (xc, yc), begins at angle1 and proceeds in the direction of - * increasing angles to end at angle2. If angle2 is less than angle1 it will - * be progressively increased by 2*M_PI until it is greater than angle1. - * - * If there is a current point, an initial line segment will be added to the - * path to connect the current point to the beginning of the arc. - * - * Angles are measured in radians. An angle of 0 is in the direction of the - * positive X axis (in user-space). An angle of M_PI radians (90 degrees) is - * in the direction of the positive Y axis (in user-space). Angles increase - * in the direction from the positive X axis toward the positive Y axis. So - * with the default transformation matrix, angles increase in a clockwise - * direction. - * - * (To convert from degrees to radians, use degrees * (M_PI / 180.).) - * - * This function gives the arc in the direction of increasing angles; see - * arc_negative() to get the arc in the direction of decreasing angles. - * - * The arc is circular in user-space. To achieve an elliptical arc, you can - * scale the current transformation matrix by different amounts in the X and - * Y directions. For example, to draw an ellipse in the box given by x, y, - * width, height: - * - * @code - * context->save(); - * context->translate(x, y); - * context->scale(width / 2.0, height / 2.0); - * context->arc(0.0, 0.0, 1.0, 0.0, 2 * M_PI); - * context->restore(); - * @endcode - * - * @param xc X position of the center of the arc - * @param yc Y position of the center of the arc - * @param radius the radius of the arc - * @param angle1 the start angle, in radians - * @param angle2 the end angle, in radians - */ - void arc(double xc, double yc, double radius, double angle1, double angle2); - - /** Adds a circular arc of the given radius to the current path. The arc is - * centered at (xc, yc), begins at angle1 and proceeds in the direction of - * decreasing angles to end at angle2. If angle2 is greater than angle1 it - * will be progressively decreased by 2*M_PI until it is greater than angle1. - * - * See arc() for more details. This function differs only in the direction of - * the arc between the two angles. - * - * @param xc X position of the center of the arc - * @param yc Y position of the center of the arc - * @param radius the radius of the arc - * @param angle1 the start angle, in radians - * @param angle2 the end angle, in radians - */ - void arc_negative(double xc, double yc, double radius, double angle1, double angle2); - - /** If the current subpath is not empty, begin a new subpath. After this call - * the current point will offset by (x, y). - * - * Given a current point of (x, y), - * @code - * rel_move_to(dx, dy) - * @endcode - * is logically equivalent to - * @code - * move_to(x + dx, y + dy) - * @endcode - * - * @param dx the X offset - * @param dy the Y offset - */ - void rel_move_to(double dx, double dy); - - /** Relative-coordinate version of line_to(). Adds a line to the path from - * the current point to a point that is offset from the current point by (dx, - * dy) in user space. After this call the current point will be offset by - * (dx, dy). - * - * Given a current point of (x, y), - * @code - * rel_line_to(dx, dy) - * @endcode - * is logically equivalent to - * @code - * line_to(x + dx, y + dy). - * @endcode - * - * @param dx the X offset to the end of the new line - * @param dy the Y offset to the end of the new line - */ - void rel_line_to(double dx, double dy); - - /** Relative-coordinate version of curve_to(). All offsets are relative to - * the current point. Adds a cubic Bezier spline to the path from the current - * point to a point offset from the current point by (dx3, dy3), using points - * offset by (dx1, dy1) and (dx2, dy2) as the control points. After this - * call the current point will be offset by (dx3, dy3). - * - * Given a current point of (x, y), - * @code - * rel_curve_to(dx1, dy1, dx2, dy2, dx3, dy3) - * @endcode - * is logically equivalent to - * @code - * curve_to(x + dx1, y + dy1, x + dx2, y + dy2, x + dx3, y + dy3). - * @endcode - * - * @param dx1 the X offset to the first control point - * @param dy1 the Y offset to the first control point - * @param dx2 the X offset to the second control point - * @param dy2 the Y offset to the second control point - * @param dx3 the X offset to the end of the curve - * @param dy3 the Y offset to the end of the curve - */ - void rel_curve_to(double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); - - /** Adds a closed-subpath rectangle of the given size to the current path at - * position (x, y) in user-space coordinates. - * - * This function is logically equivalent to: - * - * @code - * context->move_to(x, y); - * context->rel_line_to(width, 0); - * context->rel_line_to(0, height); - * context->rel_line_to(-width, 0); - * context->close_path(); - * @endcode - * - * @param x the X coordinate of the top left corner of the rectangle - * @param y the Y coordinate to the top left corner of the rectangle - * @param width the width of the rectangle - * @param height the height of the rectangle - */ - void rectangle(double x, double y, double width, double height); - - /** Adds a line segment to the path from the current point to the beginning - * of the current subpath, (the most recent point passed to move_to()), and - * closes this subpath. - * - * The behavior of close_path() is distinct from simply calling line_to() - * with the equivalent coordinate in the case of stroking. When a closed - * subpath is stroked, there are no caps on the ends of the subpath. Instead, - * there is a line join connecting the final and initial segments of the - * subpath. - */ - void close_path(); - - /** A drawing operator that paints the current source everywhere within the - * current clip region. - */ - void paint(); - - /** A drawing operator that paints the current source everywhere within the - * current clip region using a mask of constant alpha value alpha. The effect - * is similar to paint(), but the drawing is faded out using the alpha - * value. - * - * @param alpha an alpha value, between 0 (transparent) and 1 (opaque) - */ - void paint_with_alpha(double alpha); - - /** A drawing operator that paints the current source using the alpha channel - * of pattern as a mask. (Opaque areas of mask are painted with the source, - * transparent areas are not painted.) - * - * @param pattern a Pattern - */ - void mask(const RefPtr& pattern); - - /** A drawing operator that paints the current source using the alpha channel - * of surface as a mask. (Opaque areas of surface are painted with the - * source, transparent areas are not painted.) - * - * @param surface a Surface - * @param surface_x X coordinate at which to place the origin of surface - * @param surface_y Y coordinate at which to place the origin of surface - */ - void mask(const RefPtr& surface, double surface_x, double surface_y); - - /** A drawing operator that strokes the current Path according to the current - * line width, line join, line cap, and dash settings. After stroke(), - * the current Path will be cleared from the cairo Context. - * - * @sa set_line_width() - * @sa set_line_join() - * @sa set_line_cap() - * @sa set_dash() - * @sa stroke_preserve(). - */ - void stroke(); - - /** A drawing operator that strokes the current Path according to the current - * line width, line join, line cap, and dash settings. Unlike stroke(), - * stroke_preserve() preserves the Path within the cairo Context. - * - * @sa set_line_width() - * @sa set_line_join() - * @sa set_line_cap() - * @sa set_dash() - * @sa stroke_preserve(). - */ - void stroke_preserve(); - - /** A drawing operator that fills the current path according to the current - * fill rule, (each sub-path is implicitly closed before being filled). After - * fill(), the current path will be cleared from the cairo context. - * - * @sa set_fill_rule() - * @sa fill_preserve() - */ - void fill(); - - /** A drawing operator that fills the current path according to the current - * fill rule, (each sub-path is implicitly closed before being filled). - * Unlike fill(), fill_preserve() preserves the path within the - * cairo Context. - * - * @sa set_fill_rule() - * @sa fill(). - */ - void fill_preserve(); - void copy_page(); - void show_page(); - bool in_stroke(double x, double y) const; - bool in_fill(double x, double y) const; - void get_stroke_extents(double& x1, double& y1, double& x2, double& y2) const; - void get_fill_extents(double& x1, double& y1, double& x2, double& y2) const; - - /** Reset the current clip region to its original, unrestricted state. That - * is, set the clip region to an infinitely large shape containing the target - * surface. Equivalently, if infinity is too hard to grasp, one can imagine - * the clip region being reset to the exact bounds of the target surface. - * - * Note that code meant to be reusable should not call reset_clip() as it - * will cause results unexpected by higher-level code which calls clip(). - * Consider using save() and restore() around clip() as a more robust means - * of temporarily restricting the clip region. - */ - void reset_clip(); - - /** Establishes a new clip region by intersecting the current clip region - * with the current Path as it would be filled by fill() and according to the - * current fill rule. - * - * After clip(), the current path will be cleared from the cairo Context. - * - * The current clip region affects all drawing operations by effectively - * masking out any changes to the surface that are outside the current clip - * region. - * - * Calling clip() can only make the clip region smaller, never larger. But - * the current clip is part of the graphics state, so a temporary restriction - * of the clip region can be achieved by calling cairo_clip() within a - * save()/restore() pair. The only other means of increasing the size of the - * clip region is reset_clip(). - * - * @sa set_fill_rule() - */ - void clip(); - - /** Establishes a new clip region by intersecting the current clip region - * with the current path as it would be filled by fill() and according to the - * current fill rule. - * - * Unlike clip(), cairo_clip_preserve preserves the path within the cairo - * Context. - * - * @sa clip() - * @sa set_fill_rule() - */ - void clip_preserve(); - - /** - * Computes a bounding box in user coordinates covering the area inside the - * current clip. - * - * @param x1 left of the resulting extents - * @param y1 top of the resulting extents - * @param x2 right of the resulting extents - * @param y2 bottom of the resulting extents - * - * @since 1.4 - **/ - void get_clip_extents(double& x1, double& y1, double& x2, double& y2) const; - - /** - * Returns the current clip region as a list of rectangles in user coordinates. - * - * This function will throw an exception if the clip region cannot be - * represented as a list of user-space rectangles. - * - * @Since 1.4 - **/ - void copy_clip_rectangle_list(std::vector& rectangles) const; - - void select_font_face(const std::string& family, FontSlant slant, FontWeight weight); - void set_font_size(double size); - void set_font_matrix(const Matrix& matrix); - void get_font_matrix(Matrix& matrix) const; - void set_font_options(const FontOptions& options); - void show_text(const std::string& utf8); - void show_glyphs(const std::vector& glyphs); - RefPtr get_font_face(); - RefPtr get_font_face() const; - void get_font_extents(FontExtents& extents) const; - void set_font_face(const RefPtr& font_face); - void get_text_extents(const std::string& utf8, TextExtents& extents) const; - void get_glyph_extents(const std::vector& glyphs, TextExtents& extents) const; - void text_path(const std::string& utf8); - void glyph_path(const std::vector& glyphs); - - /** Gets the current compositing operator for a cairo Context - */ - Operator get_operator() const; - - /** Gets the current source pattern for the Context - */ - RefPtr get_source(); - RefPtr get_source() const; - - /** Gets the current tolerance value, as set by set_tolerance() - */ - double get_tolerance() const; - - /** Gets the current shape antialiasing mode, as set by set_antialias() - */ - Antialias get_antialias() const; - - /** Gets the current point of the current path, which is conceptually the - * final point reached by the path so far. - * - * The current point is returned in the user-space coordinate system. If - * there is no defined current point then x and y will both be set to 0.0. - * - * Most path construction functions alter the current point. See the - * following for details on how they affect the current point: clear_path(), - * move_to(), line_to(), curve_to(), arc(), rel_move_to(), rel_line_to(), - * rel_curve_to(), arc(), and text_path() - * - * @param x return value for X coordinate of the current point - * @param y return value for Y coordinate of the current point - */ - void get_current_point (double& x, double& y) const; - - /** Gets the current fill rule, as set by set_fill_rule(). - */ - FillRule get_fill_rule() const; - - /** Gets the current line width, as set by set_line_width() - */ - double get_line_width() const; - - /** Gets the current line cap style, as set by set_line_cap() - */ - LineCap get_line_cap() const; - - /** Gets the current line join style, as set by set_line_join() - */ - LineJoin get_line_join() const; - - /** Gets the current miter limit, as set by set_miter_limit() - */ - double get_miter_limit() const; - - /** - * Gets the current dash array and offset. - * - * @param dashes return value for the dash array - * @param offset return value for the current dash offset - * - * Since: 1.4 - **/ - void get_dash(std::vector& dashes, double& offset) const; - - - /** Stores the current transformation matrix (CTM) into matrix. - * - * @param matrix return value for the matrix - */ - void get_matrix(Matrix& matrix); - - /** Gets the target surface associated with this Context. - * - * @exception - */ - RefPtr get_target(); - - /** Gets the target surface associated with this Context. - * - * @exception - */ - RefPtr get_target() const; - - //TODO: Copy or reference-count a Path somethow instead of asking the caller to delete it? - /** Creates a copy of the current path and returns it to the user. - * - * @todo See cairo_path_data_t for hints on how to iterate over the returned - * data structure. - * - * @note The caller owns the Path object returned from this function. The - * Path object must be freed when you are finished with it. - */ - Path* copy_path() const; - - /** Gets a flattened copy of the current path and returns it to the user - * - * @todo See cairo_path_data_t for hints on how to iterate over the returned - * data structure. - * - * This function is like copy_path() except that any curves in the path will - * be approximated with piecewise-linear approximations, (accurate to within - * the current tolerance value). That is, the result is guaranteed to not have - * any elements of type CAIRO_PATH_CURVE_TO which will instead be - * replaced by a series of CAIRO_PATH_LINE_TO elements. - * - * @note The caller owns the Path object returned from this function. The - * Path object must be freed when you are finished with it. - */ - Path* copy_path_flat() const; - - /** Append the path onto the current path. The path may be either the return - * value from one of copy_path() or copy_path_flat() or it may be constructed - * manually. - * - * @param path path to be appended - */ - void append_path(const Path& path); - - /** Temporarily redirects drawing to an intermediate surface known as a group. - * The redirection lasts until the group is completed by a call to pop_group() - * or pop_group_to_source(). These calls provide the result of any drawing to - * the group as a pattern, (either as an explicit object, or set as the source - * pattern). - * - * This group functionality can be convenient for performing intermediate - * compositing. One common use of a group is to render objects as opaque - * within the group, (so that they occlude each other), and then blend the - * result with translucence onto the destination. - * - * Groups can be nested arbitrarily deep by making balanced calls to - * push_group()/pop_group(). Each call pushes/pops the new target group - * onto/from a stack. - * - * The push_group() function calls save() so that any changes to the graphics - * state will not be visible outside the group, (the pop_group functions call - * restore()). - * - * By default the intermediate group will have a content type of - * CONTENT_COLOR_ALPHA. Other content types can be chosen for the group by - * using push_group_with_content() instead. - * - * As an example, here is how one might fill and stroke a path with - * translucence, but without any portion of the fill being visible under the - * stroke: - * - * @code - * cr->push_group(); - * cr->set_source(fill_pattern); - * cr->fill_preserve(); - * cr->set_source(stroke_pattern); - * cr->stroke(); - * cr->pop_group_to_source(); - * cr->paint_with_alpha(alpha); - * @endcode - */ - void push_group(); - - /** - * Temporarily redirects drawing to an intermediate surface known as a - * group. The redirection lasts until the group is completed by a call - * to pop_group() or pop_group_to_source(). These calls provide the result of - * any drawing to the group as a pattern, (either as an explicit object, or set - * as the source pattern). - * - * The group will have a content type of @content. The ability to control this - * content type is the only distinction between this function and push_group() - * which you should see for a more detailed description of group rendering. - * - * @param content: indicates the type of group that will be created - */ - void push_group_with_content(Content content); - - /** - * Terminates the redirection begun by a call to push_group() or - * push_group_with_content() and returns a new pattern containing the results - * of all drawing operations performed to the group. - * - * The pop_group() function calls restore(), (balancing a call to save() by - * the push_group function), so that any changes to the graphics state will - * not be visible outside the group. - * - * @return a (surface) pattern containing the results of all drawing - * operations performed to the group. - **/ - RefPtr pop_group(); - - /** - * Terminates the redirection begun by a call to push_group() or - * push_group_with_content() and installs the resulting pattern as the source - * pattern in the given cairo Context. - * - * The behavior of this function is equivalent to the sequence of operations: - * - * @code - * RefPtr group = cr->pop_group(); - * cr->set_source(group); - * @endcode - * - * but is more convenient as their is no need for a variable to store - * the short-lived pointer to the pattern. - * - * The pop_group() function calls restore(), (balancing a call to save() by - * the push_group function), so that any changes to the graphics state will - * not be visible outside the group. - **/ - void pop_group_to_source(); - - /** - * Gets the target surface for the current group as started by the most recent - * call to push_group() or push_group_with_content(). - * - * This function will return NULL if called "outside" of any group rendering - * blocks, (that is, after the last balancing call to pop_group() or - * pop_group_to_source()). - * - * @exception - * - **/ - RefPtr get_group_target(); - - /** - * Same as the non-const version but returns a reference to a const Surface - */ - RefPtr get_group_target() const; - - /** The base cairo C type that is wrapped by Cairo::Context - */ - typedef cairo_t cobject; - - /** Gets a pointer to the base C type that is wrapped by the Context - */ - inline cobject* cobj() { return m_cobject; } - - /** Gets a pointer to the base C type that is wrapped by the Context - */ - inline const cobject* cobj() const { return m_cobject; } - - #ifndef DOXYGEN_IGNORE_THIS - ///For use only by the cairomm implementation. - inline ErrorStatus get_status() const - { return cairo_status(const_cast(cobj())); } - - void reference() const; - void unreference() const; - #endif //DOXYGEN_IGNORE_THIS - -protected: - - - cobject* m_cobject; -}; - - RefPtr get_surface_quartz(cairo_surface_t*); - RefPtr get_surface_win32(cairo_surface_t*); - RefPtr get_surface_xlib(cairo_surface_t*); - -} // namespace Cairo - -#endif //__CAIROMM_CONTEXT_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/context_private.h b/libs/cairomm/cairomm/context_private.h deleted file mode 100644 index 9118d8fc18..0000000000 --- a/libs/cairomm/cairomm/context_private.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2008 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_CONTEXT_PRIVATE_H -#define __CAIROMM_CONTEXT_PRIVATE_H - -#ifdef ENABLE_GCC_VISIBILITY - #define VISIBILITY_HIDDEN __attribute__ ((visibility("hidden"))) -#else - #define VISIBILITY_HIDDEN -#endif - -#include -#include - -namespace Cairo -{ - -namespace Private -{ - -VISIBILITY_HIDDEN RefPtr wrap_surface_quartz(cairo_surface_t*); -VISIBILITY_HIDDEN RefPtr wrap_surface_win32(cairo_surface_t*); -VISIBILITY_HIDDEN RefPtr wrap_surface_xlib(cairo_surface_t*); - -} // namespace Private - -} // namespace Cairo - -#endif // __CAIROMM_CONTEXT_PRIVATE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/context_surface_quartz.cc b/libs/cairomm/cairomm/context_surface_quartz.cc deleted file mode 100644 index 8d8ed9cf87..0000000000 --- a/libs/cairomm/cairomm/context_surface_quartz.cc +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2008 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include -#include - -namespace Cairo -{ - -namespace Private -{ - -VISIBILITY_HIDDEN RefPtr wrap_surface_quartz(cairo_surface_t* surface) -{ -#if CAIRO_HAS_QUARTZ_SURFACE - return RefPtr(new QuartzSurface(surface, false /* does not have reference */)); -#else - return RefPtr(new Surface(surface, false /* does not have reference */)); -#endif -} - -} // namespace Private - -} // namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/context_surface_win32.cc b/libs/cairomm/cairomm/context_surface_win32.cc deleted file mode 100644 index cde6d7fa3b..0000000000 --- a/libs/cairomm/cairomm/context_surface_win32.cc +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2008 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include -#include - -namespace Cairo -{ - -namespace Private -{ - -VISIBILITY_HIDDEN RefPtr wrap_surface_win32(cairo_surface_t* surface) -{ -#if CAIRO_HAS_WIN32_SURFACE - return RefPtr(new Win32Surface(surface, false /* does not have reference */)); -#else - return RefPtr(new Surface(surface, false /* does not have reference */)); -#endif -} - -} // namespace Private - -} // namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/context_surface_xlib.cc b/libs/cairomm/cairomm/context_surface_xlib.cc deleted file mode 100644 index cf943fa812..0000000000 --- a/libs/cairomm/cairomm/context_surface_xlib.cc +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2008 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include -#include - -namespace Cairo -{ - -namespace Private -{ - -VISIBILITY_HIDDEN RefPtr wrap_surface_xlib(cairo_surface_t* surface) -{ -#if CAIRO_HAS_WIN32_SURFACE - return RefPtr(new XlibSurface(surface, false /* does not have reference */)); -#else - return RefPtr(new Surface(surface, false /* does not have reference */)); -#endif -} - -} // namespace Private - -} // namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/enums.h b/libs/cairomm/cairomm/enums.h deleted file mode 100644 index 349d9781b3..0000000000 --- a/libs/cairomm/cairomm/enums.h +++ /dev/null @@ -1,202 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_ENUMS_H -#define __CAIROMM_ENUMS_H - -#include - -namespace Cairo -{ - -#ifndef DOXYGEN_IGNORE_THIS -//This is only used internally, but it must be in a public header because we inline some methods. -typedef cairo_status_t ErrorStatus; -#endif //DOXYGEN_IGNORE_THIS - - -typedef enum -{ - OPERATOR_CLEAR = CAIRO_OPERATOR_CLEAR, - - OPERATOR_SOURCE = CAIRO_OPERATOR_SOURCE, - OPERATOR_OVER = CAIRO_OPERATOR_OVER, - OPERATOR_IN = CAIRO_OPERATOR_IN, - OPERATOR_OUT = CAIRO_OPERATOR_OUT, - OPERATOR_ATOP = CAIRO_OPERATOR_ATOP, - - OPERATOR_DEST = CAIRO_OPERATOR_DEST, - OPERATOR_DEST_OVER = CAIRO_OPERATOR_DEST_OVER, - OPERATOR_DEST_IN = CAIRO_OPERATOR_DEST_IN, - OPERATOR_DEST_OUT = CAIRO_OPERATOR_DEST_OUT, - OPERATOR_DEST_ATOP = CAIRO_OPERATOR_DEST_ATOP, - - OPERATOR_XOR = CAIRO_OPERATOR_XOR, - OPERATOR_ADD = CAIRO_OPERATOR_ADD, - OPERATOR_SATURATE = CAIRO_OPERATOR_SATURATE -} Operator; - - -typedef enum -{ - ANTIALIAS_DEFAULT = CAIRO_ANTIALIAS_DEFAULT, - ANTIALIAS_NONE = CAIRO_ANTIALIAS_NONE, - ANTIALIAS_GRAY = CAIRO_ANTIALIAS_GRAY, - ANTIALIAS_SUBPIXEL = CAIRO_ANTIALIAS_SUBPIXEL -} Antialias; - -typedef enum -{ - FILL_RULE_WINDING = CAIRO_FILL_RULE_WINDING, - FILL_RULE_EVEN_ODD = CAIRO_FILL_RULE_EVEN_ODD -} FillRule; - - -typedef enum -{ - LINE_CAP_BUTT = CAIRO_LINE_CAP_BUTT, - LINE_CAP_ROUND = CAIRO_LINE_CAP_ROUND, - LINE_CAP_SQUARE = CAIRO_LINE_CAP_SQUARE -} LineCap; - - -typedef enum -{ - LINE_JOIN_MITER = CAIRO_LINE_JOIN_MITER, - LINE_JOIN_ROUND = CAIRO_LINE_JOIN_ROUND, - LINE_JOIN_BEVEL = CAIRO_LINE_JOIN_BEVEL -} LineJoin; - - -typedef enum -{ - FONT_SLANT_NORMAL = CAIRO_FONT_SLANT_NORMAL, - FONT_SLANT_ITALIC = CAIRO_FONT_SLANT_ITALIC, - FONT_SLANT_OBLIQUE = CAIRO_FONT_SLANT_OBLIQUE -} FontSlant; - -typedef enum -{ - FONT_WEIGHT_NORMAL = CAIRO_FONT_WEIGHT_NORMAL, - FONT_WEIGHT_BOLD = CAIRO_FONT_WEIGHT_BOLD -} FontWeight; - - -typedef enum -{ - CONTENT_COLOR = CAIRO_CONTENT_COLOR, - CONTENT_ALPHA = CAIRO_CONTENT_ALPHA, - CONTENT_COLOR_ALPHA = CAIRO_CONTENT_COLOR_ALPHA -} Content; - - -typedef enum -{ - FORMAT_ARGB32 = CAIRO_FORMAT_ARGB32, - FORMAT_RGB24 = CAIRO_FORMAT_RGB24, - FORMAT_A8 = CAIRO_FORMAT_A8, - FORMAT_A1 = CAIRO_FORMAT_A1, - FORMAT_RGB16_565 = CAIRO_FORMAT_RGB16_565 /* @< @deprecated This format value is deprecated. It has never been properly implemented in cairo and is unnecessary. */ -} Format; - - -typedef enum -{ - EXTEND_NONE = CAIRO_EXTEND_NONE, - EXTEND_REPEAT = CAIRO_EXTEND_REPEAT, - EXTEND_REFLECT = CAIRO_EXTEND_REFLECT, -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,1,1) - EXTEND_PAD = CAIRO_EXTEND_PAD -#endif /* CAIRO_VERSION > CAIRO_VERSION_ENCODE(1,1,1) */ -} Extend; - - -typedef enum -{ - FILTER_FAST = CAIRO_FILTER_FAST, - FILTER_GOOD = CAIRO_FILTER_GOOD, - FILTER_BEST = CAIRO_FILTER_BEST, - FILTER_NEAREST = CAIRO_FILTER_NEAREST, - FILTER_BILINEAR = CAIRO_FILTER_BILINEAR, - FILTER_GAUSSIAN = CAIRO_FILTER_GAUSSIAN -} Filter; - -typedef enum -{ - SUBPIXEL_ORDER_DEFAULT = CAIRO_SUBPIXEL_ORDER_DEFAULT, - SUBPIXEL_ORDER_RGB = CAIRO_SUBPIXEL_ORDER_RGB, - SUBPIXEL_ORDER_BGR = CAIRO_SUBPIXEL_ORDER_BGR, - SUBPIXEL_ORDER_VRGB = CAIRO_SUBPIXEL_ORDER_VRGB, - SUBPIXEL_ORDER_VBGR = CAIRO_SUBPIXEL_ORDER_VBGR -} SubpixelOrder; - - -typedef enum -{ - HINT_STYLE_DEFAULT = CAIRO_HINT_STYLE_DEFAULT, - HINT_STYLE_NONE = CAIRO_HINT_STYLE_NONE, - HINT_STYLE_SLIGHT = CAIRO_HINT_STYLE_SLIGHT, - HINT_STYLE_MEDIUM = CAIRO_HINT_STYLE_MEDIUM, - HINT_STYLE_FULL = CAIRO_HINT_STYLE_FULL -} HintStyle; - - -typedef enum -{ - HINT_METRICS_DEFAULT = CAIRO_HINT_METRICS_DEFAULT, - HINT_METRICS_OFF = CAIRO_HINT_METRICS_OFF, - HINT_METRICS_ON = CAIRO_HINT_METRICS_ON -} HintMetrics; - -typedef enum -{ - SURFACE_TYPE_IMAGE = CAIRO_SURFACE_TYPE_IMAGE, - SURFACE_TYPE_PDF = CAIRO_SURFACE_TYPE_PDF, - SURFACE_TYPE_PS = CAIRO_SURFACE_TYPE_PS, - SURFACE_TYPE_XLIB = CAIRO_SURFACE_TYPE_XLIB, - SURFACE_TYPE_XCB = CAIRO_SURFACE_TYPE_XCB, - SURFACE_TYPE_GLITZ = CAIRO_SURFACE_TYPE_GLITZ, - SURFACE_TYPE_QUARTZ = CAIRO_SURFACE_TYPE_QUARTZ, - SURFACE_TYPE_WIN32 = CAIRO_SURFACE_TYPE_WIN32, - SURFACE_TYPE_BEOS = CAIRO_SURFACE_TYPE_BEOS, - SURFACE_TYPE_DIRECTFB = CAIRO_SURFACE_TYPE_DIRECTFB, - SURFACE_TYPE_SVG = CAIRO_SURFACE_TYPE_SVG, - SURFACE_TYPE_OS2 = CAIRO_SURFACE_TYPE_OS2 -} SurfaceType; - -typedef enum -{ - PATTERN_TYPE_SOLID = CAIRO_PATTERN_TYPE_SOLID, - PATTERN_TYPE_SURFACE = CAIRO_PATTERN_TYPE_SURFACE, - PATTERN_TYPE_LINEAR = CAIRO_PATTERN_TYPE_LINEAR, - PATTERN_TYPE_RADIAL = CAIRO_PATTERN_TYPE_RADIAL -} PatternType; - -typedef enum -{ - FONT_TYPE_TOY = CAIRO_FONT_TYPE_TOY, - FONT_TYPE_FT = CAIRO_FONT_TYPE_FT, - FONT_TYPE_WIN32 = CAIRO_FONT_TYPE_WIN32, - FONT_TYPE_ATSUI = CAIRO_FONT_TYPE_ATSUI -} FontType; - -} // namespace Cairo - -#endif //__CAIROMM_ENUMS_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/exception.cc b/libs/cairomm/cairomm/exception.cc deleted file mode 100644 index 0144f08a0b..0000000000 --- a/libs/cairomm/cairomm/exception.cc +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include - -namespace Cairo -{ - -inline static const char* string_or_empty(const char* text) -{ - return (text ? text : ""); -} - -//TODO: Is it wise to assume that the string is ASCII, as expected by std::logic_error? -logic_error::logic_error(ErrorStatus status) -: std::logic_error( string_or_empty(cairo_status_to_string((cairo_status_t)m_status)) ), - m_status(status) -{ -} - -logic_error::~logic_error() throw() -{} - -/* -const char* logic_error::what() const throw() -{ - //Hopefully this is a const char* to a static string. - return cairo_status_to_string((cairo_status_t)m_status); -} -*/ - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/exception.h b/libs/cairomm/cairomm/exception.h deleted file mode 100644 index 6205a84c16..0000000000 --- a/libs/cairomm/cairomm/exception.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIRO_EXCEPTION_H -#define __CAIRO_EXCEPTION_H - -#include -#include - -namespace Cairo -{ - -/** - */ -class logic_error: public std::logic_error -{ -public: - explicit logic_error(ErrorStatus status); - virtual ~logic_error() throw(); - - //virtual const char* what() const throw(); - -private: - ErrorStatus m_status; -}; - -} // namespace Cairo - -#endif // __CAIRO_EXCEPTION_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/fontface.cc b/libs/cairomm/cairomm/fontface.cc deleted file mode 100644 index 0e1642a45a..0000000000 --- a/libs/cairomm/cairomm/fontface.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - -namespace Cairo -{ - -FontFace::FontFace(cairo_font_face_t* cobject, bool has_reference) -: m_cobject(0) -{ - if(has_reference) - m_cobject = cobject; - else - m_cobject = cairo_font_face_reference(cobject); -} - -FontFace::~FontFace() -{ - if(m_cobject) - cairo_font_face_destroy(m_cobject); -} - -void FontFace::reference() const -{ - cairo_font_face_reference(m_cobject); -} - -void FontFace::unreference() const -{ - cairo_font_face_destroy(m_cobject); -} - -/* -void* FontFace::get_user_data(const cairo_user_data_key_t *key) -{ - void* result = cairo_font_face_get_user_data(m_cobject, key); - check_object_status_and_throw_exception(*this); - return result; -} - -void FontFace::set_user_data(const cairo_user_data_key_t* key, void *user_data, cairo_destroy_func_t destroy) -{ - const ErrorStatus status = (ErrorStatus)cairo_font_face_set_user_data(m_cobject, key, user_data, destroy); - check_status_and_throw_exception(status); -} -*/ - -FontType FontFace::get_type() const -{ - cairo_font_type_t font_type = cairo_font_face_get_type(m_cobject); - check_object_status_and_throw_exception(*this); - return static_cast(font_type); -} - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/fontface.h b/libs/cairomm/cairomm/fontface.h deleted file mode 100644 index 612820cc8b..0000000000 --- a/libs/cairomm/cairomm/fontface.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_FONTFACE_H -#define __CAIROMM_FONTFACE_H - -#include -#include - - -namespace Cairo -{ - -/** - * This is a reference-counted object that should be used via Cairo::RefPtr. - */ -class FontFace -{ -protected: - - //TODO?: FontFace(cairo_font_face_t *target); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit FontFace(cairo_font_face_t* cobject, bool has_reference = false); - - - virtual ~FontFace(); - - /* Don't wrap these until we know what they are good for. - void* get_user_data(const cairo_user_data_key_t *key); - - void set_user_data(const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); - */ - - FontType get_type() const; - - typedef cairo_font_face_t cobject; - inline cobject* cobj() { return m_cobject; } - inline const cobject* cobj() const { return m_cobject; } - - #ifndef DOXYGEN_IGNORE_THIS - ///For use only by the cairomm implementation. - inline ErrorStatus get_status() const - { return cairo_font_face_status(const_cast(cobj())); } - #endif //DOXYGEN_IGNORE_THIS - - void reference() const; - void unreference() const; - -protected: - - cobject* m_cobject; -}; - -} // namespace Cairo - -#endif //__CAIROMM_FONTFACE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/fontoptions.cc b/libs/cairomm/cairomm/fontoptions.cc deleted file mode 100644 index 864037c8fb..0000000000 --- a/libs/cairomm/cairomm/fontoptions.cc +++ /dev/null @@ -1,159 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - -namespace Cairo -{ - -FontOptions::FontOptions() -: m_cobject(0) -{ - m_cobject = cairo_font_options_create(); - check_object_status_and_throw_exception(*this); -} - -FontOptions::FontOptions(cairo_font_options_t* cobject, bool take_ownership) -: m_cobject(0) -{ - if(take_ownership) - m_cobject = cobject; - else - m_cobject = cairo_font_options_copy(cobject); - - check_object_status_and_throw_exception(*this); -} - -FontOptions::FontOptions(const FontOptions& src) -{ - //Reference-counting, instead of copying by value: - if(!src.m_cobject) - m_cobject = 0; - else - m_cobject = cairo_font_options_copy(src.m_cobject); - - check_object_status_and_throw_exception(*this); -} - -FontOptions::~FontOptions() -{ - if(m_cobject) - cairo_font_options_destroy(m_cobject); -} - - -FontOptions& FontOptions::operator=(const FontOptions& src) -{ - //Reference-counting, instead of copying by value: - - if(this == &src) - return *this; - - if(m_cobject == src.m_cobject) - return *this; - - if(m_cobject) - { - cairo_font_options_destroy(m_cobject); - m_cobject = 0; - } - - if(!src.m_cobject) - return *this; - - m_cobject = cairo_font_options_copy(src.m_cobject); - - return *this; -} - -bool FontOptions::operator==(const FontOptions& src) const -{ - return cairo_font_options_equal(m_cobject, src.cobj()); -} - -void FontOptions::merge(const FontOptions& src) -{ - cairo_font_options_merge(m_cobject, src.cobj()); - check_object_status_and_throw_exception(*this); -} - -unsigned long FontOptions::hash() const -{ - const unsigned long result = cairo_font_options_hash(m_cobject); - check_object_status_and_throw_exception(*this); - return result; -} - -void FontOptions::set_antialias(Antialias antialias) -{ - cairo_font_options_set_antialias(m_cobject, static_cast(antialias)); - check_object_status_and_throw_exception(*this); -} - -Antialias FontOptions::get_antialias() const -{ - const Antialias result = static_cast(cairo_font_options_get_antialias(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -void FontOptions::set_subpixel_order(SubpixelOrder subpixel_order) -{ - cairo_font_options_set_subpixel_order(m_cobject, static_cast(subpixel_order)); - check_object_status_and_throw_exception(*this); -} - -SubpixelOrder FontOptions::get_subpixel_order() const -{ - const SubpixelOrder result = static_cast(cairo_font_options_get_subpixel_order(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -void FontOptions::set_hint_style(HintStyle hint_style) -{ - cairo_font_options_set_hint_style(m_cobject, static_cast(hint_style)); - check_object_status_and_throw_exception(*this); -} - -HintStyle FontOptions::get_hint_style() const -{ - const HintStyle result = static_cast(cairo_font_options_get_hint_style(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -void FontOptions::set_hint_metrics(HintMetrics hint_metrics) -{ - cairo_font_options_set_hint_metrics(m_cobject, - static_cast(hint_metrics)); - check_object_status_and_throw_exception(*this); -} - -HintMetrics FontOptions::get_hint_metrics() const -{ - const HintMetrics result = - static_cast(cairo_font_options_get_hint_metrics(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/fontoptions.h b/libs/cairomm/cairomm/fontoptions.h deleted file mode 100644 index 3c35176121..0000000000 --- a/libs/cairomm/cairomm/fontoptions.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_FONTOPTIONS_H -#define __CAIROMM_FONTOPTIONS_H - -#include -#include -#include - - -namespace Cairo -{ - -/** How a font should be rendered. - */ -class FontOptions -{ -public: - FontOptions(); - explicit FontOptions(cairo_font_options_t* cobject, bool take_ownership = false); - FontOptions(const FontOptions& src); - - virtual ~FontOptions(); - - FontOptions& operator=(const FontOptions& src); - - bool operator ==(const FontOptions& src) const; - //bool operator !=(const FontOptions& src) const; - - void merge(const FontOptions& other); - - unsigned long hash() const; - - void set_antialias(Antialias antialias); - Antialias get_antialias() const; - - void set_subpixel_order(SubpixelOrder subpixel_order); - SubpixelOrder get_subpixel_order() const; - - void set_hint_style(HintStyle hint_style); - HintStyle get_hint_style() const; - - void set_hint_metrics(HintMetrics hint_metrics); - HintMetrics get_hint_metrics() const; - - typedef cairo_font_options_t cobject; - inline cobject* cobj() { return m_cobject; } - inline const cobject* cobj() const { return m_cobject; } - - #ifndef DOXYGEN_IGNORE_THIS - ///For use only by the cairomm implementation. - inline ErrorStatus get_status() const - { return cairo_font_options_status(const_cast(cobj())); } - #endif //DOXYGEN_IGNORE_THIS - -protected: - - cobject* m_cobject; -}; - -} // namespace Cairo - -#endif //__CAIROMM_FONTOPTIONS_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/path.cc b/libs/cairomm/cairomm/path.cc deleted file mode 100644 index 8040aa3e6b..0000000000 --- a/libs/cairomm/cairomm/path.cc +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include -#include - -namespace Cairo -{ - -/* -Path::Path() -: m_cobject(0) -{ - m_cobject = cairo_path_create(); -} -*/ - -Path::Path(cairo_path_t* cobject, bool take_ownership) -: m_cobject(0) -{ - if(take_ownership) - m_cobject = cobject; - else - { - std::cerr << "cairomm: Path::Path(): copying of the underlying cairo_path_t* is not yet implemented." << std::endl; - //m_cobject = cairo_path_copy(cobject); - } -} - -/* -Path::Path(const Path& src) -{ - //Reference-counting, instead of copying by value: - if(!src.m_cobject) - m_cobject = 0; - else - m_cobject = cairo_path_copy(src.m_cobject); -} -*/ - -Path::~Path() -{ - if(m_cobject) - cairo_path_destroy(m_cobject); -} - -/* -Path& Path::operator=(const Path& src) -{ - //Reference-counting, instead of copying by value: - - if(this == &src) - return *this; - - if(m_cobject == src.m_cobject) - return *this; - - if(m_cobject) - { - cairo_path_destroy(m_cobject); - m_cobject = 0; - } - - if(!src.m_cobject) - return *this; - - m_cobject = cairo_path_copy(src.m_cobject); - - return *this; -} -*/ - -/* -bool Path::operator==(const Path& src) const -{ - return cairo_path_equal(m_cobject, src.cobj()); -} -*/ - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/path.h b/libs/cairomm/cairomm/path.h deleted file mode 100644 index f5f7480908..0000000000 --- a/libs/cairomm/cairomm/path.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_PATH_H -#define __CAIROMM_PATH_H - -#include -#include -#include - - -namespace Cairo -{ - -/** A data structure for holding a path. - * Use Context::copy_path() or Context::copy_path_flat() to instantiate a new - * Path. The application is responsible for freeing the Path object when it is - * no longer needed. - * - * @todo There's currently no way to access the path data without reverting to - * the C object (see cobj()) - */ -class Path -{ -public: - //Path(); - explicit Path(cairo_path_t* cobject, bool take_ownership = false); - //Path(const Path& src); - - virtual ~Path(); - - //Path& operator=(const Path& src); - - //bool operator ==(const Path& src) const; - //bool operator !=(const Path& src) const; - - typedef cairo_path_t cobject; - inline cobject* cobj() { return m_cobject; } - inline const cobject* cobj() const { return m_cobject; } - - #ifndef DOXYGEN_IGNORE_THIS - ///For use only by the cairomm implementation. - //There is no *_status() function for this object: - //inline ErrorStatus get_status() const - //{ return cairo_path_status(const_cast(cobj())); } - #endif //DOXYGEN_IGNORE_THIS - -protected: - - cobject* m_cobject; -}; - -} // namespace Cairo - -#endif //__CAIROMM_PATH_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/pattern.cc b/libs/cairomm/cairomm/pattern.cc deleted file mode 100644 index 420ed824d1..0000000000 --- a/libs/cairomm/cairomm/pattern.cc +++ /dev/null @@ -1,286 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - -namespace Cairo -{ - -Pattern::Pattern() -: m_cobject(0) -{ -} - -Pattern::Pattern(cairo_pattern_t* cobject, bool has_reference) -: m_cobject(0) -{ - if(has_reference) - m_cobject = cobject; - else - m_cobject = cairo_pattern_reference(cobject); -} - -Pattern::~Pattern() -{ - if(m_cobject) - cairo_pattern_destroy(m_cobject); -} - -void Pattern::reference() const -{ - cairo_pattern_reference(m_cobject); -} - -void Pattern::unreference() const -{ - cairo_pattern_destroy(m_cobject); -} - -void Pattern::set_matrix(const cairo_matrix_t &matrix) -{ - cairo_pattern_set_matrix(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -void Pattern::get_matrix(cairo_matrix_t &matrix) const -{ - cairo_pattern_get_matrix(m_cobject, &matrix); - check_object_status_and_throw_exception(*this); -} - -PatternType Pattern::get_type() const -{ - cairo_pattern_type_t pattern_type = cairo_pattern_get_type(m_cobject); - check_object_status_and_throw_exception(*this); - return static_cast(pattern_type); -} - - - -SolidPattern::SolidPattern(cairo_pattern_t* cobject, bool has_reference) -: Pattern(cobject, has_reference) -{ -} -void -SolidPattern::get_rgba(double& red, double& green, - double& blue, double& alpha) const -{ - // ignore the return value since we know that this is a solid color pattern - cairo_pattern_get_rgba(m_cobject, &red, &green, &blue, &alpha); - check_object_status_and_throw_exception(*this); -} - -SolidPattern::~SolidPattern() -{ -} - -RefPtr SolidPattern::create_rgb(double red, double green, double blue) -{ - cairo_pattern_t* cobject = cairo_pattern_create_rgb(red, green, blue); - check_status_and_throw_exception(cairo_pattern_status(cobject)); - return RefPtr(new SolidPattern(cobject, true /* has reference */)); -} - -RefPtr SolidPattern::create_rgba(double red, double green, double blue, double alpha) -{ - cairo_pattern_t* cobject = cairo_pattern_create_rgba(red, green, blue, alpha); - check_status_and_throw_exception(cairo_pattern_status(cobject)); - return RefPtr(new SolidPattern(cobject, true /* has reference */)); -} - - -SurfacePattern::SurfacePattern(const RefPtr& surface) -{ - m_cobject = cairo_pattern_create_for_surface(surface->cobj()); - check_object_status_and_throw_exception(*this); -} - -RefPtr -SurfacePattern::get_surface() -{ - cairo_surface_t* surface = 0; - // we can ignore the return value since we know this is a surface pattern - cairo_pattern_get_surface(const_cast(m_cobject), &surface); - check_object_status_and_throw_exception(*this); - return RefPtr(new Surface(surface, false /* does not have reference */)); -} - -RefPtr -SurfacePattern::get_surface() const -{ - return const_cast(this)->get_surface(); -} - -RefPtr SurfacePattern::create(const RefPtr& surface) -{ - return RefPtr(new SurfacePattern(surface)); -} - -SurfacePattern::SurfacePattern(cairo_pattern_t* cobject, bool has_reference) -: Pattern(cobject, has_reference) -{ -} - -SurfacePattern::~SurfacePattern() -{ -} - -void SurfacePattern::set_extend(Extend extend) -{ - cairo_pattern_set_extend(m_cobject, (cairo_extend_t)extend); - check_object_status_and_throw_exception(*this); -} - -Extend SurfacePattern::get_extend() const -{ - const Extend result = static_cast(cairo_pattern_get_extend(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - -void SurfacePattern::set_filter(Filter filter) -{ - cairo_pattern_set_filter(m_cobject, (cairo_filter_t)filter); - check_object_status_and_throw_exception(*this); -} - -Filter SurfacePattern::get_filter() const -{ - Filter result = static_cast(cairo_pattern_get_filter(m_cobject)); - check_object_status_and_throw_exception(*this); - return result; -} - - - -Gradient::Gradient() -{ -} - -Gradient::Gradient(cairo_pattern_t* cobject, bool has_reference) -: Pattern(cobject, has_reference) -{ -} - -Gradient::~Gradient() -{ -} - -void Gradient::add_color_stop_rgb(double offset, double red, double green, double blue) -{ - cairo_pattern_add_color_stop_rgb(m_cobject, offset, red, green, blue); - check_object_status_and_throw_exception(*this); -} - -void Gradient::add_color_stop_rgba(double offset, double red, double green, double blue, double alpha) -{ - cairo_pattern_add_color_stop_rgba(m_cobject, offset, red, green, blue, alpha); - check_object_status_and_throw_exception(*this); -} - -std::vector -Gradient::get_color_stops() const -{ - std::vector stops; - - int num_stops = 0; - // we can ignore the return value since we know this is a gradient pattern - cairo_pattern_get_color_stop_count(m_cobject, &num_stops); - // since we know the total number of stops, we can avoid re-allocation with - // each addition to the vector by pre-allocating the required number - stops.reserve(num_stops); - for(int i = 0; i < num_stops; ++i) - { - ColorStop stop; - cairo_pattern_get_color_stop_rgba(m_cobject, i, &stop.offset, &stop.red, - &stop.green, &stop.blue, &stop.alpha); - stops.push_back(stop); - } - return stops; -} - - -LinearGradient::LinearGradient(double x0, double y0, double x1, double y1) -{ - m_cobject = cairo_pattern_create_linear(x0, y0, x1, y1); - check_object_status_and_throw_exception(*this); -} - -void -LinearGradient::get_linear_points(double &x0, double &y0, - double &x1, double &y1) const -{ - // ignore the return value since we know that this is a linear gradient - // pattern - cairo_pattern_get_linear_points(m_cobject, &x0, &y0, &x1, &y1); - check_object_status_and_throw_exception(*this); -} - - -RefPtr LinearGradient::create(double x0, double y0, double x1, double y1) -{ - return RefPtr(new LinearGradient(x0, y0, x1, y1)); -} - -LinearGradient::LinearGradient(cairo_pattern_t* cobject, bool has_reference) -: Gradient(cobject, has_reference) -{ -} - -LinearGradient::~LinearGradient() -{ -} - - -RadialGradient::RadialGradient(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1) -{ - m_cobject = cairo_pattern_create_radial(cx0, cy0, radius0, cx1, cy1, radius1); - check_object_status_and_throw_exception(*this); -} - -void -RadialGradient::get_radial_circles(double& x0, double& y0, double& r0, - double& x1, double& y1, double& r1) const -{ - // ignore the return value since we know that this is a radial gradient - // pattern - cairo_pattern_get_radial_circles(const_cast(m_cobject), - &x0, &y0, &r0, &x1, &y1, &r1); - check_object_status_and_throw_exception(*this); -} - - -RefPtr RadialGradient::create(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1) -{ - return RefPtr(new RadialGradient(cx0, cy0, radius0, cx1, cy1, radius1)); -} - -RadialGradient::RadialGradient(cairo_pattern_t* cobject, bool has_reference) -: Gradient(cobject, has_reference) -{ -} - -RadialGradient::~RadialGradient() -{ -} - - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/pattern.h b/libs/cairomm/cairomm/pattern.h deleted file mode 100644 index e56d38339e..0000000000 --- a/libs/cairomm/cairomm/pattern.h +++ /dev/null @@ -1,290 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_PATTERN_H -#define __CAIROMM_PATTERN_H - -#include -#include -#include - - -namespace Cairo -{ -struct ColorStop -{ - double offset; - double red, green, blue, alpha; -}; - -/** - * This is a reference-counted object that should be used via Cairo::RefPtr. - */ -class Pattern -{ -protected: - //Use derived constructors. - - //TODO?: Pattern(cairo_pattern_t *target); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit Pattern(cairo_pattern_t* cobject, bool has_reference = false); - - virtual ~Pattern(); - - void set_matrix(const cairo_matrix_t &matrix); - void get_matrix(cairo_matrix_t &matrix) const; - PatternType get_type() const; - - typedef cairo_pattern_t cobject; - inline cobject* cobj() { return m_cobject; } - inline const cobject* cobj() const { return m_cobject; } - - #ifndef DOXYGEN_IGNORE_THIS - ///For use only by the cairomm implementation. - inline ErrorStatus get_status() const - { return cairo_pattern_status(const_cast(cobj())); } - #endif //DOXYGEN_IGNORE_THIS - - void reference() const; - void unreference() const; - -protected: - //Used by derived types only. - Pattern(); - - cobject* m_cobject; -}; - -class SolidPattern : public Pattern -{ -protected: - -public: - - /** Create a C++ wrapper for the C instance. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit SolidPattern(cairo_pattern_t* cobject, bool has_reference = false); - - /** - * Gets the solid color for a solid color pattern. - * - * @param red return value for red component of color - * @param green return value for green component of color - * @param blue return value for blue component of color - * @param alpha return value for alpha component of color - * - * @since 1.4 - **/ - void get_rgba (double& red, double& green, - double& blue, double& alpha) const; - - //TODO: Documentation - static RefPtr create_rgb(double red, double green, double blue); - - //TODO: Documentation - static RefPtr create_rgba(double red, double green, - double blue, double alpha); - - //TODO?: SolidPattern(cairo_pattern_t *target); - virtual ~SolidPattern(); -}; - -class SurfacePattern : public Pattern -{ -protected: - - explicit SurfacePattern(const RefPtr& surface); - - //TODO?: SurfacePattern(cairo_pattern_t *target); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit SurfacePattern(cairo_pattern_t* cobject, bool has_reference = false); - - /** - * Gets the surface associated with this pattern - * - * @since 1.4 - **/ - RefPtr get_surface () const; - - /** - * Gets the surface associated with this pattern - * - * @since 1.4 - **/ - RefPtr get_surface (); - - virtual ~SurfacePattern(); - - static RefPtr create(const RefPtr& surface); - - void set_extend(Extend extend); - Extend get_extend() const; - void set_filter(Filter filter); - Filter get_filter() const; -}; - -class Gradient : public Pattern -{ -protected: - //Use derived constructors. - - //TODO?: Gradient(cairo_pattern_t *target); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit Gradient(cairo_pattern_t* cobject, bool has_reference = false); - - virtual ~Gradient(); - - /** - * Adds an opaque color stop to a gradient pattern. The offset - * specifies the location along the gradient's control vector. For - * example, a linear gradient's control vector is from (x0,y0) to - * (x1,y1) while a radial gradient's control vector is from any point - * on the start circle to the corresponding point on the end circle. - * - * The color is specified in the same way as in Context::set_source_rgb(). - * - * @param offset an offset in the range [0.0 .. 1.0] - * @param red red component of color - * @param green green component of color - * @param blue blue component of color - **/ - void add_color_stop_rgb(double offset, double red, double green, double blue); - - /** - * Adds a translucent color stop to a gradient pattern. The offset - * specifies the location along the gradient's control vector. For - * example, a linear gradient's control vector is from (x0,y0) to - * (x1,y1) while a radial gradient's control vector is from any point - * on the start circle to the corresponding point on the end circle. - * - * The color is specified in the same way as in Context::set_source_rgba(). - * - * @param offset an offset in the range [0.0 .. 1.0] - * @param red red component of color - * @param green green component of color - * @param blue blue component of color - * @param alpha alpha component of color - */ - void add_color_stop_rgba(double offset, double red, double green, double blue, double alpha); - - /* - * Gets the color stops and offsets for this Gradient - * - * @since 1.4 - */ - std::vector get_color_stops() const; - - -protected: - Gradient(); -}; - -class LinearGradient : public Gradient -{ -protected: - - LinearGradient(double x0, double y0, double x1, double y1); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit LinearGradient(cairo_pattern_t* cobject, bool has_reference = false); - - /** - * @param x0 return value for the x coordinate of the first point - * @param y0 return value for the y coordinate of the first point - * @param x1 return value for the x coordinate of the second point - * @param y1 return value for the y coordinate of the second point - * - * Gets the gradient endpoints for a linear gradient. - * - * @since 1.4 - **/ - void get_linear_points(double &x0, double &y0, - double &x1, double &y1) const; - - //TODO?: LinearGradient(cairo_pattern_t *target); - virtual ~LinearGradient(); - - static RefPtr create(double x0, double y0, double x1, double y1); -}; - -class RadialGradient : public Gradient -{ -protected: - - RadialGradient(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference. - */ - explicit RadialGradient(cairo_pattern_t* cobject, bool has_reference = false); - - /** - * @param x0 return value for the x coordinate of the center of the first (inner) circle - * @param y0 return value for the y coordinate of the center of the first (inner) circle - * @param r0 return value for the radius of the first (inner) circle - * @param x1 return value for the x coordinate of the center of the second (outer) circle - * @param y1 return value for the y coordinate of the center of the second (outer) circle - * @param r1 return value for the radius of the second (outer) circle - * - * Gets the gradient endpoint circles for a radial gradient, each - * specified as a center coordinate and a radius. - * - * @since 1.4 - **/ - void get_radial_circles(double& x0, double& y0, double& r0, - double& x1, double& y1, double& r1) const; - - //TODO?: RadialGradient(cairo_pattern_t *target); - virtual ~RadialGradient(); - - static RefPtr create(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); -}; - -} // namespace Cairo - -#endif //__CAIROMM_PATTERN_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/private.cc b/libs/cairomm/cairomm/private.cc deleted file mode 100644 index d71f0dfa2c..0000000000 --- a/libs/cairomm/cairomm/private.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -//#include //For CAIROMM_EXCEPTIONS_ENABLED -#include -#include -#include -#include - -namespace Cairo -{ - -#ifdef CAIROMM_EXCEPTIONS_ENABLED -void throw_exception(ErrorStatus status) -{ - switch(status) - { - case CAIRO_STATUS_SUCCESS: - // we should never get here, but just in case - break; - - case CAIRO_STATUS_NO_MEMORY: - throw std::bad_alloc(); - break; - - // Programmer error - case CAIRO_STATUS_INVALID_RESTORE: - case CAIRO_STATUS_INVALID_POP_GROUP: - case CAIRO_STATUS_NO_CURRENT_POINT: - case CAIRO_STATUS_INVALID_MATRIX: - //No longer in API?: case CAIRO_STATUS_NO_TARGET_SURFACE: - case CAIRO_STATUS_INVALID_STRING: - case CAIRO_STATUS_SURFACE_FINISHED: - //No longer in API?: case CAIRO_STATUS_BAD_NESTING: - throw Cairo::logic_error(status); - break; - - // Language binding implementation: - case CAIRO_STATUS_NULL_POINTER: - case CAIRO_STATUS_INVALID_PATH_DATA: - case CAIRO_STATUS_SURFACE_TYPE_MISMATCH: - throw Cairo::logic_error(status); - break; - - // Other - case CAIRO_STATUS_READ_ERROR: - case CAIRO_STATUS_WRITE_ERROR: - { - //The Cairo language binding advice suggests that these are stream errors - //that should be mapped to their C++ equivalents. - const char* error_message = cairo_status_to_string(status); - throw std::ios_base::failure( error_message ? error_message : std::string() ); - } - break; - - default: - throw Cairo::logic_error(status); - break; - } -} -#else -void throw_exception(ErrorStatus /* status */) -{ - //Do nothing. The application should call get_status() instead. -} -#endif //CAIROMM_EXCEPTIONS_ENABLED - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/private.h b/libs/cairomm/cairomm/private.h deleted file mode 100644 index 6b911b558a..0000000000 --- a/libs/cairomm/cairomm/private.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_PRIVATE_H -#define __CAIROMM_PRIVATE_H - -#include -#include -#include - -#ifndef DOXYGEN_IGNORE_THIS -namespace Cairo -{ - -/// Throws the appropriate exception, if exceptions are enabled. -void throw_exception(ErrorStatus status); - -//We inline this because it is called so often. -inline void check_status_and_throw_exception(ErrorStatus status) -{ - if(status != CAIRO_STATUS_SUCCESS) - throw_exception(status); //This part doesn't need to be inline because it would rarely be called. -} - -template -void check_object_status_and_throw_exception(const T& object) -{ - //get_status() is normally an inlined member method. - check_status_and_throw_exception(object.get_status()); -} - -} // namespace Cairo -#endif //DOXYGEN_IGNORE_THIS - -#endif //__CAIROMM_PRIVATE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/quartz_surface.cc b/libs/cairomm/cairomm/quartz_surface.cc deleted file mode 100644 index b5000c6f1b..0000000000 --- a/libs/cairomm/cairomm/quartz_surface.cc +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 2007 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - -namespace Cairo -{ - -#ifdef CAIRO_HAS_QUARTZ_SURFACE - -QuartzSurface::QuartzSurface(cairo_surface_t* cobject, bool has_reference) : - Surface(cobject, has_reference) -{} - -QuartzSurface::~QuartzSurface() -{ - // surface is destroyed in base class -} - -CGContextRef QuartzSurface::get_cg_context() const -{ - return cairo_quartz_surface_get_cg_context(m_cobject); -} - -RefPtr QuartzSurface::create(CGContextRef cg_context, int width, int height) -{ - cairo_surface_t* cobject = cairo_quartz_surface_create_for_cg_context(cg_context, - width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new QuartzSurface(cobject, true /* has reference */)); -} - -RefPtr QuartzSurface::create(Format format, int width, int height) -{ - cairo_surface_t* cobject = cairo_quartz_surface_create((cairo_format_t)format, width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new QuartzSurface(cobject, true /* has reference */)); -} - -#endif // CAIRO_HAS_QUARTZ_SURFACE - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/quartz_surface.h b/libs/cairomm/cairomm/quartz_surface.h deleted file mode 100644 index 246a45a1b8..0000000000 --- a/libs/cairomm/cairomm/quartz_surface.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) 2007 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_QUARTZ_SURFACE_H -#define __CAIROMM_QUARTZ_SURFACE_H - -#include - -#ifdef CAIRO_HAS_QUARTZ_SURFACE -#include -#endif - -namespace Cairo -{ - -#ifdef CAIRO_HAS_QUARTZ_SURFACE - -/** A QuartzSurface provides a way to render within Apple Mac OS X. If you - * want to draw to the screen within a Mac OS X application, you - * should use this Surface type. - * - * @note For this Surface to be available, cairo must have been compiled with - * (native) Quartz support (requires Cairo > 1.4.0) - */ -class QuartzSurface : public Surface -{ -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit QuartzSurface(cairo_surface_t* cobject, bool has_reference = false); - virtual ~QuartzSurface(); - - /** Returns the CGContextRef associated with this surface, or NULL if none. Also - * returns NULL if the surface is not a Quartz surface. - * - * @return CGContextRef or NULL if no CGContextRef available. - */ - CGContextRef get_cg_context() const; - - /** Creates a cairo surface that targets the given CGContext. - * - * @param cg_context the CGContext to create a surface for - * @return the newly created surface - */ - static RefPtr create(CGContextRef cg_context, int width, int height); - - /** Creates a device-independent-bitmap surface not associated with any - * particular existing surface or device context. The created bitmap will be - * unititialized. - * - * @param format format of pixels in the surface to create - * @param width width of the surface, in pixels - * @param height height of the surface, in pixels - * @return the newly created surface - */ - static RefPtr create(Format format, int width, int height); - -}; - -#endif // CAIRO_HAS_QUARTZ_SURFACE - - -} // namespace Cairo - -#endif //__CAIROMM_QUARTZ_SURFACE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/refptr.h b/libs/cairomm/cairomm/refptr.h deleted file mode 100644 index 90b8240192..0000000000 --- a/libs/cairomm/cairomm/refptr.h +++ /dev/null @@ -1,399 +0,0 @@ -// -*- c++ -*- -#ifndef _cairo_REFPTR_H -#define _cairo_REFPTR_H - -/* $Id: refptr.h,v 1.6 2006-09-27 18:38:57 murrayc Exp $ */ - -/* Copyright 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - - -namespace Cairo -{ - -/** RefPtr<> is a reference-counting shared smartpointer. - * - * Reference counting means that a shared reference count is incremented each - * time a RefPtr is copied, and decremented each time a RefPtr is destroyed, - * for instance when it leaves its scope. When the reference count reaches - * zero, the contained object is deleted - * - * cairomm uses RefPtr so that you don't need to remember - * to delete the object explicitly, or know when a method expects you to delete - * the object that it returns, and to prevent any need to manually reference - * and unreference() cairo objects. - */ -template -class RefPtr -{ -public: - /** Default constructor - * - * Afterwards it will be null and use of -> will cause a segmentation fault. - */ - inline RefPtr(); - - /// Destructor - decrements reference count. - inline ~RefPtr(); - - /** For use only in the internal implementation of cairomm, gtkmm, etc. - * - * This takes ownership of @a pCppObject, so it will be deleted when the - * last RefPtr is deleted, for instance when it goes out of scope. - * - * This assumes that @a pCppObject already has a starting reference for its underlying cairo object, - * so that destruction of @a @pCppObject will cause a corresponding unreference of its underlying - * cairo object. For instance, a cairo_*_create() function usually provides a starting reference, - * but a cairo_*_get_*() function requires the caller to manually reference the returned object. - * In this case, you should call reference() on @a pCppObject before passing it to this constructor. - */ - explicit inline RefPtr(T_CppObject* pCppObject); - - /// For use only in the internal implementation of sharedptr. - explicit inline RefPtr(T_CppObject* pCppObject, int* refcount); - - /** Copy constructor - * - * This increments the shared reference count. - */ - inline RefPtr(const RefPtr& src); - - /** Copy constructor (from different, but castable type). - * - * Increments the reference count. - */ - template - inline RefPtr(const RefPtr& src); - - /** Swap the contents of two RefPtr<>. - * This method swaps the internal pointers to T_CppObject. This can be - * done safely without involving a reference/unreference cycle and is - * therefore highly efficient. - */ - inline void swap(RefPtr& other); - - /// Copy from another RefPtr: - inline RefPtr& operator=(const RefPtr& src); - - /** Copy from different, but castable type). - * - * Increments the reference count. - */ - template - inline RefPtr& operator=(const RefPtr& src); - - /// Tests whether the RefPtr<> point to the same underlying instance. - inline bool operator==(const RefPtr& src) const; - - /// See operator==(). - inline bool operator!=(const RefPtr& src) const; - - /** Dereferencing. - * - * Use the methods of the underlying instance like so: - * refptr->memberfun(). - */ - inline T_CppObject* operator->() const; - - /** Test whether the RefPtr<> points to any underlying instance. - * - * Mimics usage of ordinary pointers: - * @code - * if (ptr) - * do_something(); - * @endcode - */ - inline operator bool() const; - - /// Set underlying instance to 0, decrementing reference count of existing instance appropriately. - inline void clear(); - - - /** Dynamic cast to derived class. - * - * The RefPtr can't be cast with the usual notation so instead you can use - * @code - * ptr_derived = RefPtr::cast_dynamic(ptr_base); - * @endcode - */ - template - static inline RefPtr cast_dynamic(const RefPtr& src); - - /** Static cast to derived class. - * - * Like the dynamic cast; the notation is - * @code - * ptr_derived = RefPtr::cast_static(ptr_base); - * @endcode - */ - template - static inline RefPtr cast_static(const RefPtr& src); - - /** Cast to non-const. - * - * The RefPtr can't be cast with the usual notation so instead you can use - * @code - * ptr_unconst = RefPtr::cast_const(ptr_const); - * @endcode - */ - template - static inline RefPtr cast_const(const RefPtr& src); - - -#ifndef DOXYGEN_IGNORE_THIS - - // Warning: This is for internal use only. Do not manually modify the - // reference count with this pointer. - inline int* refcount_() const { return pCppRefcount_; } - -#endif // DOXYGEN_IGNORE_THIS - -private: - void unref(); - - T_CppObject* pCppObject_; - mutable int* pCppRefcount_; -}; - - -#ifndef DOXYGEN_IGNORE_THIS - -// RefPtr<>::operator->() comes first here since it's used by other methods. -// If it would come after them it wouldn't be inlined. - -template inline -T_CppObject* RefPtr::operator->() const -{ - return pCppObject_; -} - -template inline -RefPtr::RefPtr() -: - pCppObject_(0), - pCppRefcount_(0) -{} - -template inline -RefPtr::~RefPtr() -{ - unref(); -} - -template inline -void RefPtr::unref() -{ - if(pCppRefcount_) - { - --(*pCppRefcount_); - - if(*pCppRefcount_ == 0) - { - if(pCppObject_) - { - delete pCppObject_; - pCppObject_ = 0; - } - - delete pCppRefcount_; - pCppRefcount_ = 0; - } - } -} - - -template inline -RefPtr::RefPtr(T_CppObject* pCppObject) -: - pCppObject_(pCppObject), - pCppRefcount_(0) -{ - if(pCppObject) - { - pCppRefcount_ = new int; - *pCppRefcount_ = 1; //This will be decremented in the destructor. - } -} - -//Used by cast_*() implementations: -template inline -RefPtr::RefPtr(T_CppObject* pCppObject, int* refcount) -: - pCppObject_(pCppObject), - pCppRefcount_(refcount) -{ - if(pCppObject_ && pCppRefcount_) - ++(*pCppRefcount_); -} - -template inline -RefPtr::RefPtr(const RefPtr& src) -: - pCppObject_ (src.pCppObject_), - pCppRefcount_(src.pCppRefcount_) -{ - if(pCppObject_ && pCppRefcount_) - ++(*pCppRefcount_); -} - -// The templated ctor allows copy construction from any object that's -// castable. Thus, it does downcasts: -// base_ref = derived_ref -template - template -inline -RefPtr::RefPtr(const RefPtr& src) -: - // A different RefPtr<> will not allow us access to pCppObject_. We need - // to add a get_underlying() for this, but that would encourage incorrect - // use, so we use the less well-known operator->() accessor: - pCppObject_ (src.operator->()), - pCppRefcount_(src.refcount_()) -{ - if(pCppObject_ && pCppRefcount_) - ++(*pCppRefcount_); -} - -template inline -void RefPtr::swap(RefPtr& other) -{ - T_CppObject *const temp = pCppObject_; - int* temp_count = pCppRefcount_; - - pCppObject_ = other.pCppObject_; - pCppRefcount_ = other.pCppRefcount_; - - other.pCppObject_ = temp; - other.pCppRefcount_ = temp_count; -} - -template inline -RefPtr& RefPtr::operator=(const RefPtr& src) -{ - // In case you haven't seen the swap() technique to implement copy - // assignment before, here's what it does: - // - // 1) Create a temporary RefPtr<> instance via the copy ctor, thereby - // increasing the reference count of the source object. - // - // 2) Swap the internal object pointers of *this and the temporary - // RefPtr<>. After this step, *this already contains the new pointer, - // and the old pointer is now managed by temp. - // - // 3) The destructor of temp is executed, thereby unreferencing the - // old object pointer. - // - // This technique is described in Herb Sutter's "Exceptional C++", and - // has a number of advantages over conventional approaches: - // - // - Code reuse by calling the copy ctor. - // - Strong exception safety for free. - // - Self assignment is handled implicitely. - // - Simplicity. - // - It just works and is hard to get wrong; i.e. you can use it without - // even thinking about it to implement copy assignment whereever the - // object data is managed indirectly via a pointer, which is very common. - - RefPtr temp (src); - this->swap(temp); - return *this; -} - -template - template -inline -RefPtr& RefPtr::operator=(const RefPtr& src) -{ - RefPtr temp (src); - this->swap(temp); - return *this; -} - -template inline -bool RefPtr::operator==(const RefPtr& src) const -{ - return (pCppObject_ == src.pCppObject_); -} - -template inline -bool RefPtr::operator!=(const RefPtr& src) const -{ - return (pCppObject_ != src.pCppObject_); -} - -template inline -RefPtr::operator bool() const -{ - return (pCppObject_ != 0); -} - -template inline -void RefPtr::clear() -{ - RefPtr temp; // swap with an empty RefPtr<> to clear *this - this->swap(temp); -} - -template - template -inline -RefPtr RefPtr::cast_dynamic(const RefPtr& src) -{ - T_CppObject *const pCppObject = dynamic_cast(src.operator->()); - - if(pCppObject) //Check whether dynamic_cast<> succeeded so we don't pass a null object with a used refcount: - return RefPtr(pCppObject, src.refcount_()); - else - return RefPtr(); -} - -template - template -inline -RefPtr RefPtr::cast_static(const RefPtr& src) -{ - T_CppObject *const pCppObject = static_cast(src.operator->()); - - return RefPtr(pCppObject, src.refcount_()); -} - -template - template -inline -RefPtr RefPtr::cast_const(const RefPtr& src) -{ - T_CppObject *const pCppObject = const_cast(src.operator->()); - - return RefPtr(pCppObject, src.refcount_()); -} - -#endif /* DOXYGEN_IGNORE_THIS */ - -/** @relates Glib::RefPtr */ -template inline -void swap(RefPtr& lhs, RefPtr& rhs) -{ - lhs.swap(rhs); -} - -} // namespace Cairo - - -#endif /* _cairo_REFPTR_H */ - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/scaledfont.cc b/libs/cairomm/cairomm/scaledfont.cc deleted file mode 100644 index 02fb11c567..0000000000 --- a/libs/cairomm/cairomm/scaledfont.cc +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 2006 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include // for check_status_and_throw_exception - -namespace Cairo -{ - -ScaledFont::ScaledFont(cobject* cobj, bool has_reference) -{ - if(has_reference) - m_cobject = cobj; - else - m_cobject = cairo_scaled_font_reference(cobj); -} - -RefPtr ScaledFont::create(FontFace& font_face, const Matrix& font_matrix, - const Matrix& ctm, const FontOptions& options) -{ - cairo_scaled_font_t* cobj = cairo_scaled_font_create(font_face.cobj(), &font_matrix, &ctm, options.cobj()); - check_status_and_throw_exception(cairo_scaled_font_status(cobj)); - return RefPtr(new ScaledFont(cobj, false)); -} - -void ScaledFont::extents(FontExtents& extents) const -{ - cairo_scaled_font_extents(m_cobject, static_cast(&extents)); - check_object_status_and_throw_exception(*this); -} - -void ScaledFont::text_extents(const std::string& utf8, TextExtents& extents) const -{ - cairo_scaled_font_text_extents(m_cobject, utf8.c_str(), static_cast(&extents)); - check_object_status_and_throw_exception(*this); -} - -void ScaledFont::glyph_extents(const std::vector& glyphs, TextExtents& extents) -{ - // copy the data from the vector to a standard C array. I don't believe - // this will be a frequently used function so I think the performance hit is - // more than offset by the increased flexibility of the STL interface. - - // Use new to allocate memory as MSCV complains about non-const array size with - // Glyph glyph_array[glyphs.size()] - Glyph* glyph_array= new Glyph[glyphs.size()]; - std::copy(glyphs.begin(), glyphs.end(), glyph_array); - - cairo_scaled_font_glyph_extents(m_cobject, glyph_array, glyphs.size(), - static_cast(&extents)); - check_object_status_and_throw_exception(*this); - delete[] glyph_array; -} - -RefPtr ScaledFont::get_font_face() const -{ - cairo_font_face_t* face = cairo_scaled_font_get_font_face(m_cobject); - check_object_status_and_throw_exception(*this); - return RefPtr(new FontFace(face, true)); -} - -void ScaledFont::get_font_options(FontOptions& options) const -{ - cairo_scaled_font_get_font_options(m_cobject, options.cobj()); - check_object_status_and_throw_exception(*this); -} - -void ScaledFont::get_font_matrix(Matrix& font_matrix) const -{ - cairo_scaled_font_get_font_matrix(m_cobject, - static_cast(&font_matrix)); - check_object_status_and_throw_exception(*this); -} - -void ScaledFont::get_ctm(Matrix& ctm) const -{ - cairo_scaled_font_get_ctm(m_cobject, static_cast(&ctm)); - check_object_status_and_throw_exception(*this); -} - -FontType ScaledFont::get_type() const -{ - cairo_font_type_t font_type = cairo_scaled_font_get_type(m_cobject); - check_object_status_and_throw_exception(*this); - return static_cast(font_type); -} - -} // namespace Cairo -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/scaledfont.h b/libs/cairomm/cairomm/scaledfont.h deleted file mode 100644 index 2648054605..0000000000 --- a/libs/cairomm/cairomm/scaledfont.h +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright (C) 2006 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_SCALEDFONT_H -#define __CAIROMM_SCALEDFONT_H - -#include -#include - -namespace Cairo -{ - -typedef enum -{ -} ScaledFontType; - -/** A ScaledFont is a font scaled to a particular size and device resolution. It - * is most useful for low-level font usage where a library or application wants - * to cache a reference to a scaled font to speed up the computation of metrics. - */ -class ScaledFont -{ - -public: - /** The underlying C cairo object type */ - typedef cairo_scaled_font_t cobject; - - /** Provides acces to the underlying C cairo object */ - inline cobject* cobj() { return m_cobject; } - - /** Provides acces to the underlying C cairo object */ - inline const cobject* cobj() const { return m_cobject; } - -#ifndef DOXYGEN_IGNORE_THIS - // For use only by the cairomm implementation. - inline ErrorStatus get_status() const - { return cairo_scaled_font_status(const_cast(cobj())); } - - // for RefPtr - void reference() const { cairo_scaled_font_reference(m_cobject); } - void unreference() const { cairo_scaled_font_destroy(m_cobject); } -#endif //DOXYGEN_IGNORE_THIS - - /** Createa C++ wrapper object from the C instance. This C++ object should - * then be given to a RefPtr. - */ - explicit ScaledFont(cobject* cobj, bool has_reference = false); - - /** Creates a ScaledFont object from a font face and matrices that describe - * the size of the font and the environment in which it will be used. - * - * @param font_face A font face. - * @param font_matrix font space to user space transformation matrix for the - * font. In the simplest case of a N point font, this matrix is just a scale - * by N, but it can also be used to shear the font or stretch it unequally - * along the two axes. See Context::set_font_matrix(). - * @param ctm user to device transformation matrix with which the font will be - * used. - * @param options: options to use when getting metrics for the font and - * rendering with it. - */ - static RefPtr create(FontFace& font_face, const Matrix& font_matrix, - const Matrix& ctm, const FontOptions& options); - - //TODO: This should really be get_extents(). - /** Gets the metrics for a ScaledFont */ - void extents(FontExtents& extents) const; - - //TODO: This should really be get_text_extents(). - /** Gets the extents for a string of text. The extents describe a user-space - * rectangle that encloses the "inked" portion of the text drawn at the origin - * (0,0) (as it would be drawn by Context::show_text() if the cairo graphics - * state were set to the same font_face, font_matrix, ctm, and font_options as - * the ScaledFont object). Additionally, the x_advance and y_advance values - * indicate the amount by which the current point would be advanced by - * Context::show_text(). - * - * Note that whitespace characters do not directly contribute to the size of - * the rectangle (extents.width and extents.height). They do contribute - * indirectly by changing the position of non-whitespace characters. In - * particular, trailing whitespace characters are likely to not affect the - * size of the rectangle, though they will affect the x_advance and y_advance - * values. - * - * @param utf8 a string of text, encoded in UTF-8 - * @param extents Returns the extents of the given string - * - * @since 1.2 - */ - void text_extents(const std::string& utf8, TextExtents& extents) const; - - //TODO: This should really be get_glyph_extents(). - /** Gets the extents for an array of glyphs. The extents describe a user-space - * rectangle that encloses the "inked" portion of the glyphs, (as they would - * be drawn by Context::show_glyphs() if the cairo graphics state were set to the - * same font_face, font_matrix, ctm, and font_options as the ScaledFont - * object). Additionally, the x_advance and y_advance values indicate the - * amount by which the current point would be advanced by Context::show_glyphs(). - * - * Note that whitespace glyphs do not contribute to the size of the rectangle - * (extents.width and extents.height). - * - * @param glyphs A vector of glyphs to calculate the extents of - * @param extents Returns the extents for the array of glyphs - **/ - void glyph_extents(const std::vector& glyphs, TextExtents& extents); - - /** The FontFace with which this ScaledFont was created. - * @since 1.2 - */ - RefPtr get_font_face() const; - - /** Gets the FontOptions with which the ScaledFont was created. - * @since 1.2 - */ - void get_font_options(FontOptions& options) const; - - /** Gets the font matrix with which the ScaledFont was created. - * @since 1.2 - */ - void get_font_matrix(Matrix& font_matrix) const; - - /** Gets the CTM with which the ScaledFont was created. - * @since 1.2 - */ - void get_ctm(Matrix& ctm) const; - - /** Gets the type of scaled Font - * @since 1.2 - */ - FontType get_type() const; - - protected: - /** The underlying C cairo object that is wrapped by this ScaledFont */ - cobject* m_cobject; -}; - -} - -#endif // __CAIROMM_SCALEDFONT_H -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/surface.cc b/libs/cairomm/cairomm/surface.cc deleted file mode 100644 index 90cc303f05..0000000000 --- a/libs/cairomm/cairomm/surface.cc +++ /dev/null @@ -1,382 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - -namespace Cairo -{ - -Surface::Surface(cairo_surface_t* cobject, bool has_reference) -: m_cobject(0) -{ - if(has_reference) - m_cobject = cobject; - else - m_cobject = cairo_surface_reference(cobject); -} - -Surface::~Surface() -{ - if(m_cobject) - cairo_surface_destroy(m_cobject); -} - -void Surface::finish() -{ - cairo_surface_finish(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Surface::get_font_options(FontOptions& options) const -{ - cairo_font_options_t* cfontoptions = cairo_font_options_create(); - cairo_surface_get_font_options(m_cobject, cfontoptions); - options = FontOptions(cfontoptions); - cairo_font_options_destroy(cfontoptions); - check_object_status_and_throw_exception(*this); -} - -void Surface::flush() -{ - cairo_surface_flush(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Surface::mark_dirty() -{ - cairo_surface_mark_dirty(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void Surface::mark_dirty(int x, int y, int width, int height) -{ - cairo_surface_mark_dirty_rectangle(m_cobject, x, y, width, height); - check_object_status_and_throw_exception(*this); -} - -void Surface::set_device_offset(double x_offset, double y_offset) -{ - cairo_surface_set_device_offset(m_cobject, x_offset, y_offset); - check_object_status_and_throw_exception(*this); -} - -void Surface::get_device_offset(double& x_offset, double& y_offset) const -{ - cairo_surface_get_device_offset(const_cast(m_cobject), &x_offset, &y_offset); -} - -void Surface::set_fallback_resolution(double x_pixels_per_inch, double y_pixels_per_inch) -{ - cairo_surface_set_fallback_resolution(m_cobject, x_pixels_per_inch, y_pixels_per_inch); - check_object_status_and_throw_exception(*this); -} - -SurfaceType Surface::get_type() const -{ - cairo_surface_type_t surface_type = cairo_surface_get_type(m_cobject); - check_object_status_and_throw_exception(*this); - return static_cast(surface_type); -} - -#ifdef CAIRO_HAS_PNG_FUNCTIONS -void Surface::write_to_png(const std::string& filename) -{ - ErrorStatus status = cairo_surface_write_to_png(m_cobject, filename.c_str()); - check_status_and_throw_exception(status); -} - -void Surface::write_to_png(cairo_write_func_t write_func, void *closure) -{ - ErrorStatus status = cairo_surface_write_to_png_stream(m_cobject, write_func, closure); - check_status_and_throw_exception(status); -} -#endif - -void Surface::reference() const -{ - cairo_surface_reference(m_cobject); -} - -void Surface::unreference() const -{ - cairo_surface_destroy(m_cobject); -} - -RefPtr Surface::create(const RefPtr other, Content content, int width, int height) -{ - cairo_surface_t* cobject = cairo_surface_create_similar(other->m_cobject, (cairo_content_t)content, width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new Surface(cobject, true /* has reference */)); -} - - - -ImageSurface::ImageSurface(cairo_surface_t* cobject, bool has_reference) -: Surface(cobject, has_reference) -{ } - -ImageSurface::~ImageSurface() -{ - // surface is destroyed in base class -} - -RefPtr ImageSurface::create(Format format, int width, int height) -{ - cairo_surface_t* cobject = cairo_image_surface_create((cairo_format_t)format, width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new ImageSurface(cobject, true /* has reference */)); -} - -RefPtr ImageSurface::create(unsigned char* data, Format format, int width, int height, int stride) -{ - cairo_surface_t* cobject = cairo_image_surface_create_for_data(data, (cairo_format_t)format, width, height, stride); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new ImageSurface(cobject, true /* has reference */)); -} - -#ifdef CAIRO_HAS_PNG_FUNCTIONS - -RefPtr ImageSurface::create_from_png(std::string filename) -{ - cairo_surface_t* cobject = cairo_image_surface_create_from_png(filename.c_str()); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new ImageSurface(cobject, true /* has reference */)); -} - -RefPtr ImageSurface::create_from_png(cairo_read_func_t read_func, void *closure) -{ - cairo_surface_t* cobject = cairo_image_surface_create_from_png_stream(read_func, closure); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new ImageSurface(cobject, true /* has reference */)); -} - -#endif // CAIRO_HAS_PNG_FUNCTIONS - -int ImageSurface::get_width() const -{ - const int result = cairo_image_surface_get_width(m_cobject); - check_object_status_and_throw_exception(*this); - return result; -} - -int ImageSurface::get_height() const -{ - const int result = cairo_image_surface_get_height(m_cobject); - check_object_status_and_throw_exception(*this); - return result; -} - -unsigned char* ImageSurface::get_data() -{ - return cairo_image_surface_get_data(m_cobject); -} - -const unsigned char* ImageSurface::get_data() const -{ - return cairo_image_surface_get_data(m_cobject); -} - -Format ImageSurface::get_format() const -{ - return static_cast(cairo_image_surface_get_format(m_cobject)); -} - -int ImageSurface::get_stride() const -{ - return cairo_image_surface_get_stride(m_cobject); -} - - -/******************************************************************************* - * THE FOLLOWING SURFACE TYPES ARE EXPERIMENTAL AND NOT FULLY SUPPORTED - ******************************************************************************/ - -#ifdef CAIRO_HAS_PDF_SURFACE - -PdfSurface::PdfSurface(cairo_surface_t* cobject, bool has_reference) : - Surface(cobject, has_reference) -{} - -PdfSurface::~PdfSurface() -{ - // surface is destroyed in base class -} - -RefPtr PdfSurface::create(std::string filename, double width_in_points, double height_in_points) -{ - cairo_surface_t* cobject = cairo_pdf_surface_create(filename.c_str(), width_in_points, height_in_points); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new PdfSurface(cobject, true /* has reference */)); -} - -RefPtr PdfSurface::create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points) -{ - cairo_surface_t* cobject = cairo_pdf_surface_create_for_stream(write_func, closure, width_in_points, height_in_points); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new PdfSurface(cobject, true /* has reference */)); -} - -void PdfSurface::set_size(double width_in_points, double height_in_points) -{ - cairo_pdf_surface_set_size(m_cobject, width_in_points, height_in_points); - check_object_status_and_throw_exception(*this); -} - -#endif // CAIRO_HAS_PDF_SURFACE - - - - -#ifdef CAIRO_HAS_PS_SURFACE - -PsSurface::PsSurface(cairo_surface_t* cobject, bool has_reference) : - Surface(cobject, has_reference) -{} - -PsSurface::~PsSurface() -{ - // surface is destroyed in base class -} - -RefPtr PsSurface::create(std::string filename, double width_in_points, double height_in_points) -{ - cairo_surface_t* cobject = cairo_ps_surface_create(filename.c_str(), width_in_points, height_in_points); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new PsSurface(cobject, true /* has reference */)); -} - -RefPtr PsSurface::create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points) -{ - cairo_surface_t* cobject = cairo_ps_surface_create_for_stream(write_func, closure, width_in_points, height_in_points); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new PsSurface(cobject, true /* has reference */)); -} - -void PsSurface::set_size(double width_in_points, double height_in_points) -{ - cairo_ps_surface_set_size(m_cobject, width_in_points, height_in_points); - check_object_status_and_throw_exception(*this); -} - - -void PsSurface::dsc_comment(std::string comment) -{ - cairo_ps_surface_dsc_comment(m_cobject, comment.c_str()); - check_object_status_and_throw_exception(*this); -} - -void PsSurface::dsc_begin_setup() -{ - cairo_ps_surface_dsc_begin_setup(m_cobject); - check_object_status_and_throw_exception(*this); -} - -void PsSurface::dsc_begin_page_setup() -{ - cairo_ps_surface_dsc_begin_page_setup(m_cobject); - check_object_status_and_throw_exception(*this); -} - - -#endif // CAIRO_HAS_PS_SURFACE - - - - -#ifdef CAIRO_HAS_SVG_SURFACE - -SvgSurface::SvgSurface(cairo_surface_t* cobject, bool has_reference) : - Surface(cobject, has_reference) -{} - -SvgSurface::~SvgSurface() -{ - // surface is destroyed in base class -} - -RefPtr SvgSurface::create(std::string filename, double width_in_points, double height_in_points) -{ - cairo_surface_t* cobject = cairo_svg_surface_create(filename.c_str(), width_in_points, height_in_points); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new SvgSurface(cobject, true /* has reference */)); -} - -RefPtr SvgSurface::create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points) -{ - cairo_surface_t* cobject = cairo_svg_surface_create_for_stream(write_func, closure, width_in_points, height_in_points); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new SvgSurface(cobject, true /* has reference */)); -} - -void SvgSurface::restrict_to_version(SvgVersion version) -{ - cairo_svg_surface_restrict_to_version(m_cobject, static_cast(version)); - check_object_status_and_throw_exception(*this); -} - -const std::vector SvgSurface::get_versions() -{ - cairo_svg_version_t const *versions; - int num_versions; - cairo_svg_get_versions(&versions, &num_versions); - - // Just copy the version array out into a std::vector. This is a rarely used - // function and the array of versions is going to be very small, so there's no - // real performance hit. - std::vector vec; - for (int i = 0; i < num_versions; ++i) - { - vec.push_back(static_cast(versions[i])); - } - return vec; -} - -std::string SvgSurface::version_to_string(SvgVersion version) -{ - return std::string(cairo_svg_version_to_string(static_cast(version))); -} - -#endif // CAIRO_HAS_SVG_SURFACE - - - - -#ifdef CAIRO_HAS_GLITZ_SURFACE - -GlitzSurface::GlitzSurface(cairo_surface_t* cobject, bool has_reference) -: Surface(cobject, has_reference) -{ } - -GlitzSurface::~GlitzSurface() -{ - // surface is destroyed in base class -} - -RefPtr GlitzSurface::create(glitz_surface_t *surface) -{ - cairo_surface_t* cobject = cairo_glitz_surface_create(surface); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new GlitzSurface(cobject, true /* has reference */)); -} - -#endif // CAIRO_HAS_GLITZ_SURFACE - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/surface.h b/libs/cairomm/cairomm/surface.h deleted file mode 100644 index 15f0f9b092..0000000000 --- a/libs/cairomm/cairomm/surface.h +++ /dev/null @@ -1,632 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_SURFACE_H -#define __CAIROMM_SURFACE_H - -#include -#include -#include -#include -#include -#include - -//See xlib_surface.h for XlibSurface. -//See win32_surface.h for Win32Surface. -//See quartz_surface.h for QuartzSurface (Mac OS X). - -#ifdef CAIRO_HAS_PDF_SURFACE -#include -#endif // CAIRO_HAS_PDF_SURFACE -#ifdef CAIRO_HAS_PS_SURFACE -#include -#endif // CAIRO_HAS_PS_SURFACE -#ifdef CAIRO_HAS_SVG_SURFACE -#include -#endif // CAIRO_HAS_SVG_SURFACE - -// Experimental surfaces -#ifdef CAIRO_HAS_GLITZ_SURFACE -#include -#endif // CAIRO_HAS_GLITZ_SURFACE - - -namespace Cairo -{ - -/** A cairo surface represents an image, either as the destination of a drawing - * operation or as source when drawing onto another surface. There are - * different subtypes of cairo surface for different drawing backends. This - * class is a base class for all subtypes and should not be used directly - * - * Surfaces are reference-counted objects that should be used via Cairo::RefPtr. - */ -class Surface -{ -public: - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit Surface(cairo_surface_t* cobject, bool has_reference = false); - - virtual ~Surface(); - - /** Retrieves the default font rendering options for the surface. This allows - * display surfaces to report the correct subpixel order for rendering on - * them, print surfaces to disable hinting of metrics and so forth. The - * result can then be used with cairo_scaled_font_create(). - * - * @param options a FontOptions object into which to store the retrieved - * options. All existing values are overwritten - */ - void get_font_options(FontOptions& options) const; - - /** This function finishes the surface and drops all references to external - * resources. For example, for the Xlib backend it means that cairo will no - * longer access the drawable, which can be freed. After calling - * finish() the only valid operations on a surface are getting and setting - * user data and referencing and destroying it. Further drawing to the - * surface will not affect the surface but will instead trigger a - * CAIRO_STATUS_SURFACE_FINISHED error. - * - * When the Surface is destroyed, cairo will call finish() if it hasn't been - * called already, before freeing the resources associated with the Surface. - */ - void finish(); - - /** Do any pending drawing for the surface and also restore any temporary - * modifications cairo has made to the surface's state. This function must - * be called before switching from drawing on the surface with cairo to - * drawing on it directly with native APIs. If the surface doesn't support - * direct access, then this function does nothing. - */ - void flush(); - - /** Tells cairo to consider the data buffer dirty. - * - * In particular, if you've created an ImageSurface with a data buffer that - * you've allocated yourself and you draw to that data buffer using means - * other than cairo, you must call mark_dirty() before doing any additional - * drawing to that surface with cairo. - * - * Note that if you do draw to the Surface outside of cairo, you must call - * flush() before doing the drawing. - */ - void mark_dirty(); - - /** Marks a rectangular area of the given surface dirty. - * - * @param x X coordinate of dirty rectangle - * @param y Y coordinate of dirty rectangle - * @param width width of dirty rectangle - * @param height height of dirty rectangle - */ - void mark_dirty(int x, int y, int width, int height); - - /** Sets an offset that is added to the device coordinates determined by the - * CTM when drawing to surface. One use case for this function is when we - * want to create a Surface that redirects drawing for a portion of - * an onscreen surface to an offscreen surface in a way that is completely - * invisible to the user of the cairo API. Setting a transformation via - * cairo_translate() isn't sufficient to do this, since functions like - * Cairo::Context::device_to_user() will expose the hidden offset. - * - * Note that the offset only affects drawing to the surface, not using the - * surface in a surface pattern. - * - * @param x_offset the offset in the X direction, in device units - * @param y_offset the offset in the Y direction, in device units - */ - void set_device_offset(double x_offset, double y_offset); - - /** Returns a previous device offset set by set_device_offset(). - */ - void get_device_offset(double& x_offset, double& y_offset) const; - - /** Sets the fallback resolution of the image in dots per inch - * - * @param x_pixels_per_inch Pixels per inch in the x direction - * @param y_pixels_per_inch Pixels per inch in the y direction - */ - void set_fallback_resolution(double x_pixels_per_inch, double y_pixels_per_inch); - - SurfaceType get_type() const; - -#ifdef CAIRO_HAS_PNG_FUNCTIONS - - /** Writes the contents of surface to a new file filename as a PNG image. - * - * @note For this function to be available, cairo must have been compiled - * with PNG support - * - * @param filename the name of a file to write to - */ - void write_to_png(const std::string& filename); - - /** Writes the Surface to the write function. - * - * @note For this function to be available, cairo must have been compiled - * with PNG support - * - * @param write_func The function to be called when the backend needs to - * write data to an output stream - * @param closure closure data for the write function - */ - void write_to_png(cairo_write_func_t write_func, void *closure); //TODO: Use a sigc::slot? - -#endif // CAIRO_HAS_PNG_FUNCTIONS - - - /** The underlying C cairo surface type - */ - typedef cairo_surface_t cobject; - /** Provides acces to the underlying C cairo surface - */ - inline cobject* cobj() { return m_cobject; } - /** Provides acces to the underlying C cairo surface - */ - inline const cobject* cobj() const { return m_cobject; } - - #ifndef DOXYGEN_IGNORE_THIS - ///For use only by the cairomm implementation. - inline ErrorStatus get_status() const - { return cairo_surface_status(const_cast(cobj())); } - - void reference() const; - void unreference() const; - #endif //DOXYGEN_IGNORE_THIS - - /** Create a new surface that is as compatible as possible with an existing - * surface. The new surface will use the same backend as other unless that is - * not possible for some reason. - * - * @param other an existing surface used to select the backend of the new surface - * @param content the content for the new surface - * @param width width of the new surface, (in device-space units) - * @param height height of the new surface (in device-space units) - * @return a RefPtr to the newly allocated surface. - */ - static RefPtr create(const RefPtr other, Content content, int width, int height); - -protected: - /** The underlying C cairo surface type that is wrapped by this Surface - */ - cobject* m_cobject; -}; - - -/** Image surfaces provide the ability to render to memory buffers either - * allocated by cairo or by the calling code. The supported image formats are - * those defined in Cairo::Format - * - * An ImageSurface is the most generic type of Surface and the only one that is - * available by default. You can either create an ImageSurface whose data is - * managed by Cairo, or you can create an ImageSurface with a data buffer that - * you allocated yourself so that you can have full access to the data. - * - * When you create an ImageSurface with your own data buffer, you are free to - * examine the results at any point and do whatever you want with it. Note that - * if you modify anything and later want to continue to draw to the surface - * with cairo, you must let cairo know via Cairo::Surface::mark_dirty() - * - * Note that like all surfaces, an ImageSurface is a reference-counted object that should be used via Cairo::RefPtr. - */ -class ImageSurface : public Surface -{ -protected: - //TODO?: Surface(cairo_surface_t *target); - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * @param cobject The C instance. - * @param has_reference Whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit ImageSurface(cairo_surface_t* cobject, bool has_reference = false); - - virtual ~ImageSurface(); - - /** Gets the width of the ImageSurface in pixels - */ - int get_width() const; - - /** Gets the height of the ImageSurface in pixels - */ - int get_height() const; - - /** - * Get a pointer to the data of the image surface, for direct - * inspection or modification. - * - * Return value: a pointer to the image data of this surface or NULL - * if @surface is not an image surface. - */ - unsigned char* get_data(); - const unsigned char* get_data() const; - - /** gets the format of the surface - */ - Format get_format() const; - - /** - * Return value: the stride of the image surface in bytes (or 0 if - * @surface is not an image surface). The stride is the distance in - * bytes from the beginning of one row of the image data to the - * beginning of the next row. - */ - int get_stride() const; - - - /** Creates an image surface of the specified format and dimensions. The - * initial contents of the surface is undefined; you must explicitely clear - * the buffer, using, for example, Cairo::Context::rectangle() and - * Cairo::Context::fill() if you want it cleared. - * - * Use this function to create the surface if you don't need access to the - * internal data and want cairo to manage it for you. Since you don't have - * access to the internal data, the resulting surface can only be saved to a - * PNG image file (if cairo has been compiled with PNG support) or as a - * source surface (see Cairo::SurfacePattern). - * - * @param format format of pixels in the surface to create - * @param width width of the surface, in pixels - * @param height height of the surface, in pixels - * @return a RefPtr to the newly created surface. - */ - static RefPtr create(Format format, int width, int height); - - /** Creates an image surface for the provided pixel data. The output buffer - * must be kept around until the Surface is destroyed or finish() is called - * on the surface. The initial contents of buffer will be used as the inital - * image contents; you must explicitely clear the buffer, using, for example, - * Cairo::Context::rectangle() and Cairo::Context::fill() if you want it - * cleared. - * - * If you want to be able to manually manipulate or extract the data after - * drawing to the surface with Cairo, you should use this function to create - * the Surface. Since you own the internal data, you can do anything you - * want with it. - * - * @param data a pointer to a buffer supplied by the application in which - * to write contents. - * @param format the format of pixels in the buffer - * @param width the width of the image to be stored in the buffer - * @param height the height of the image to be stored in the buffer - * @param stride the number of bytes between the start of rows in the - * buffer. Having this be specified separate from width allows for padding at - * the end of rows, or for writing to a subportion of a larger image. - * @return a RefPtr to the newly created surface. - */ - static RefPtr create(unsigned char* data, Format format, int width, int height, int stride); - -#ifdef CAIRO_HAS_PNG_FUNCTIONS - - /** Creates a new image surface and initializes the contents to the given PNG - * file. - * - * @note For this function to be available, cairo must have been compiled - * with PNG support. - * - * @param filename name of PNG file to load - * @return a RefPtr to the new cairo_surface_t initialized with the - * contents of the PNG image file. - */ - static RefPtr create_from_png(std::string filename); - - /** Creates a new image surface from PNG data read incrementally via the - * read_func function. - * - * @note For this function to be available, cairo must have been compiled - * with PNG support. - * - * @param read_func function called to read the data of the file - * @param closure data to pass to read_func. - * @return a RefPtr to the new cairo_surface_t initialized with the - * contents of the PNG image file. - */ - static RefPtr create_from_png(cairo_read_func_t read_func, void *closure); - -#endif // CAIRO_HAS_PNG_FUNCTIONS - -}; - - -#ifdef CAIRO_HAS_PDF_SURFACE - -/** A PdfSurface provides a way to render PDF documents from cairo. This - * surface is not rendered to the screen but instead renders the drawing to a - * PDF file on disk. - * - * @note For this Surface to be available, cairo must have been compiled with - * PDF support - */ -class PdfSurface : public Surface -{ -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit PdfSurface(cairo_surface_t* cobject, bool has_reference = false); - virtual ~PdfSurface(); - - /** Creates a PdfSurface with a specified dimensions that will be saved as - * the given filename - * - * @param filename The name of the PDF file to save the surface to - * @param width_in_points The width of the PDF document in points - * @param height_in_points The height of the PDF document in points - */ - static RefPtr create(std::string filename, double width_in_points, double height_in_points); - - /** Creates a PdfSurface with a specified dimensions that will be written to - * the given write function instead of saved directly to disk - * - * @param write_func The function to be called when the backend needs to - * write data to an output stream - * @param closure closure data for the write function - * @param width_in_points The width of the PDF document in points - * @param height_in_points The height of the PDF document in points - */ - static RefPtr create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); - -/** - * Changes the size of a PDF surface for the current (and subsequent) pages. - * - * This function should only be called before any drawing operations have been - * performed on the current page. The simplest way to do this is to call this - * function immediately after creating the surface or immediately after - * completing a page with either Context::show_page() or Context::copy_page(). - * - * @param width_in_points new surface width, in points (1 point == 1/72.0 inch) - * @param height_in_points new surface height, in points (1 point == 1/72.0 inch) - **/ - void set_size(double width_in_points, double height_in_points); - -}; - -#endif // CAIRO_HAS_PDF_SURFACE - - -#ifdef CAIRO_HAS_PS_SURFACE - -/** A PsSurface provides a way to render PostScript documents from cairo. This - * surface is not rendered to the screen but instead renders the drawing to a - * PostScript file on disk. - * - * @note For this Surface to be available, cairo must have been compiled with - * PostScript support - */ -class PsSurface : public Surface -{ -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit PsSurface(cairo_surface_t* cobject, bool has_reference = false); - virtual ~PsSurface(); - - /** Creates a PsSurface with a specified dimensions that will be saved as the - * given filename - * - * @param filename The name of the PostScript file to save the surface to - * @param width_in_points The width of the PostScript document in points - * @param height_in_points The height of the PostScript document in points - */ - static RefPtr create(std::string filename, double width_in_points, double height_in_points); - - /** Creates a PsSurface with a specified dimensions that will be written to - * the given write function instead of saved directly to disk - * - * @param write_func The function to be called when the backend needs to - * write data to an output stream - * @param closure closure data for the write function - * @param width_in_points The width of the PostScript document in points - * @param height_in_points The height of the PostScript document in points - */ - static RefPtr create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); - - /** - * Changes the size of a PostScript surface for the current (and - * subsequent) pages. - * - * This function should only be called before any drawing operations have been - * performed on the current page. The simplest way to do this is to call this - * function immediately after creating the surface or immediately after - * completing a page with either Context::show_page() or Context::copy_page(). - * - * @param width_in_points new surface width, in points (1 point == 1/72.0 inch) - * @param height_in_points new surface height, in points (1 point == 1/72.0 inch) - */ - void set_size(double width_in_points, double height_in_points); - - /** Emit a comment into the PostScript output for the given surface. See the - * cairo reference documentation for more information. - * - * @param comment a comment string to be emitted into the PostScript output - */ - void dsc_comment(std::string comment); - - /** - * This function indicates that subsequent calls to dsc_comment() should direct - * comments to the Setup section of the PostScript output. - * - * This function should be called at most once per surface, and must be called - * before any call to dsc_begin_page_setup() and before any drawing is performed - * to the surface. - */ - void dsc_begin_setup(); - - /** This function indicates that subsequent calls to dsc_comment() should - * direct comments to the PageSetup section of the PostScript output. - * - * This function call is only needed for the first page of a surface. It - * should be called after any call to dsc_begin_setup() and before any drawing - * is performed to the surface. - */ - void dsc_begin_page_setup(); - -}; - -#endif // CAIRO_HAS_PS_SURFACE - - -#ifdef CAIRO_HAS_SVG_SURFACE - -typedef enum -{ - SVG_VERSION_1_1 = CAIRO_SVG_VERSION_1_1, - SVG_VERSION_1_2 = CAIRO_SVG_VERSION_1_2 -} SvgVersion; - -/** A SvgSurface provides a way to render Scalable Vector Graphics (SVG) images - * from cairo. This surface is not rendered to the screen but instead renders - * the drawing to an SVG file on disk. - * - * @note For this Surface to be available, cairo must have been compiled with - * SVG support - */ -class SvgSurface : public Surface -{ -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit SvgSurface(cairo_surface_t* cobject, bool has_reference = false); - virtual ~SvgSurface(); - - - /** Creates a SvgSurface with a specified dimensions that will be saved as the - * given filename - * - * @param filename The name of the SVG file to save the surface to - * @param width_in_points The width of the SVG document in points - * @param height_in_points The height of the SVG document in points - */ - static RefPtr create(std::string filename, double width_in_points, double height_in_points); - - /** Creates a SvgSurface with a specified dimensions that will be written to - * the given write function instead of saved directly to disk - * - * @param write_func The function to be called when the backend needs to - * write data to an output stream - * @param closure closure data for the write function - * @param width_in_points The width of the SVG document in points - * @param height_in_points The height of the SVG document in points - */ - static RefPtr create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); - - /** - * Restricts the generated SVG file to the given version. See get_versions() - * for a list of available version values that can be used here. - * - * This function should only be called before any drawing operations have been - * performed on the given surface. The simplest way to do this is to call this - * function immediately after creating the surface. - * - * @since 1.2 - */ - void restrict_to_version(SvgVersion version); - - /** Retrieves the list of SVG versions supported by cairo. See - * restrict_to_version(). - * - * @since 1.2 - */ - static const std::vector get_versions(); - - /** Get the string representation of the given version id. The returned string - * will be empty if version isn't valid. See get_versions() for a way to get - * the list of valid version ids. - * - * Since: 1.2 - */ - static std::string version_to_string(SvgVersion version); -}; - -#endif // CAIRO_HAS_SVG_SURFACE - - -/******************************************************************************* - * THE FOLLOWING SURFACE TYPES ARE EXPERIMENTAL AND NOT FULLY SUPPORTED - ******************************************************************************/ - -#ifdef CAIRO_HAS_GLITZ_SURFACE - -/** A GlitzSurface provides a way to render to the X Window System using Glitz. - * This provides a way to use OpenGL-accelerated graphics from cairo. If you - * want to use hardware-accelerated graphics within the X Window system, you - * should use this Surface type. - * - * @note For this Surface to be available, cairo must have been compiled with - * Glitz support - * - * @warning This is an experimental surface. It is not yet marked as a fully - * supported surface by the cairo library - */ -class GlitzSurface : public Surface -{ - -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit GlitzSurface(cairo_surface_t* cobject, bool has_reference = false); - - virtual ~GlitzSurface(); - - /** Creates a new GlitzSurface - * - * @param surface a glitz surface type - */ - static RefPtr create(glitz_surface_t *surface); - -}; - -#endif // CAIRO_HAS_GLITZ_SURFACE - -} // namespace Cairo - -#endif //__CAIROMM_SURFACE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/win32_surface.cc b/libs/cairomm/cairomm/win32_surface.cc deleted file mode 100644 index e0e388721b..0000000000 --- a/libs/cairomm/cairomm/win32_surface.cc +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - -namespace Cairo -{ - -#ifdef CAIRO_HAS_WIN32_SURFACE - -Win32Surface::Win32Surface(cairo_surface_t* cobject, bool has_reference) : - Surface(cobject, has_reference) -{} - -Win32Surface::~Win32Surface() -{ - // surface is destroyed in base class -} - -HDC Win32Surface::get_dc() const -{ - return cairo_win32_surface_get_dc(m_cobject); -} - -RefPtr Win32Surface::create(HDC hdc) -{ - cairo_surface_t* cobject = cairo_win32_surface_create(hdc); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new Win32Surface(cobject, true /* has reference */)); -} - -RefPtr Win32Surface::create(Format format, int width, int height) -{ - cairo_surface_t* cobject = cairo_win32_surface_create_with_dib((cairo_format_t)format, width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new Win32Surface(cobject, true /* has reference */)); -} - -#endif // CAIRO_HAS_WIN32_SURFACE - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/win32_surface.h b/libs/cairomm/cairomm/win32_surface.h deleted file mode 100644 index 2c9e6a7242..0000000000 --- a/libs/cairomm/cairomm/win32_surface.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_WIN32_SURFACE_H -#define __CAIROMM_WIN32_SURFACE_H - -#include -#include - -#ifdef CAIRO_HAS_WIN32_SURFACE -#include -#endif - -// This header is not included by cairomm.h because it requires Windows headers that -// tend to pollute the namespace with non-prefixed #defines and typedefs. -// You may include it directly if you need to use this API. - -namespace Cairo -{ - -#ifdef CAIRO_HAS_WIN32_SURFACE - -/** A Win32Surface provides a way to render within Microsoft Windows. If you - * want to draw to the screen within a Microsoft Windows application, you - * should use this Surface type. - * - * @note For this Surface to be available, cairo must have been compiled with - * Win32 support - */ -class Win32Surface : public Surface -{ -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit Win32Surface(cairo_surface_t* cobject, bool has_reference = false); - virtual ~Win32Surface(); - - /** Returns the HDC associated with this surface, or NULL if none. Also - * returns NULL if the surface is not a win32 surface. - * - * @return HDC or NULL if no HDC available. - */ - HDC get_dc() const; - - /** Creates a cairo surface that targets the given DC. The DC will be queried - * for its initial clip extents, and this will be used as the size of the - * cairo surface. Also, if the DC is a raster DC, it will be queried for its - * pixel format and the cairo surface format will be set appropriately. - * - * @param hdc the DC to create a surface for - * @return the newly created surface - */ - static RefPtr create(HDC hdc); - - /** Creates a device-independent-bitmap surface not associated with any - * particular existing surface or device context. The created bitmap will be - * unititialized. - * - * @param format format of pixels in the surface to create - * @param width width of the surface, in pixels - * @param height height of the surface, in pixels - * @return the newly created surface - */ - static RefPtr create(Format format, int width, int height); - -}; - -#endif // CAIRO_HAS_WIN32_SURFACE - - -} // namespace Cairo - -#endif //__CAIROMM_WIN32_SURFACE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/xlib_surface.cc b/libs/cairomm/cairomm/xlib_surface.cc deleted file mode 100644 index 8320521927..0000000000 --- a/libs/cairomm/cairomm/xlib_surface.cc +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include - - -namespace Cairo -{ - -#ifdef CAIRO_HAS_XLIB_SURFACE - -XlibSurface::XlibSurface(cairo_surface_t* cobject, bool has_reference) : - Surface(cobject, has_reference) -{} - -XlibSurface::~XlibSurface() -{ - // surface is destroyed in base class -} - -RefPtr XlibSurface::create(Display* dpy, Drawable drawable, Visual* visual, int width, int height) -{ - cairo_surface_t* cobject = cairo_xlib_surface_create(dpy, drawable, visual, width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new XlibSurface(cobject, true /* has reference */)); -} - -RefPtr XlibSurface::create(Display* dpy, Pixmap bitmap, Screen* screen, int width, int height) -{ - cairo_surface_t* cobject = cairo_xlib_surface_create_for_bitmap(dpy, bitmap, screen, width, height); - check_status_and_throw_exception(cairo_surface_status(cobject)); - return RefPtr(new XlibSurface(cobject, true /* has reference */)); -} - -void XlibSurface::set_size(int width, int height) -{ - cairo_xlib_surface_set_size(m_cobject, width, height); - check_object_status_and_throw_exception(*this); -} - -void XlibSurface::set_drawable(Drawable drawable, int width, int height) -{ - cairo_xlib_surface_set_drawable(m_cobject, drawable, width, height); - check_object_status_and_throw_exception(*this); -} - -Drawable XlibSurface::get_drawable() const -{ - Drawable drawable = cairo_xlib_surface_get_drawable(m_cobject); - check_object_status_and_throw_exception(*this); - return drawable; -} - -const Display* XlibSurface::get_display() const -{ - const Display* dpy = cairo_xlib_surface_get_display(m_cobject); - check_object_status_and_throw_exception(*this); - return dpy; -} - -Display* XlibSurface::get_display() -{ - Display* dpy = cairo_xlib_surface_get_display(m_cobject); - check_object_status_and_throw_exception(*this); - return dpy; -} - -Screen* XlibSurface::get_screen() -{ - Screen* screen = cairo_xlib_surface_get_screen(m_cobject); - check_object_status_and_throw_exception(*this); - return screen; -} - -const Screen* XlibSurface::get_screen() const -{ - const Screen* screen = cairo_xlib_surface_get_screen(m_cobject); - check_object_status_and_throw_exception(*this); - return screen; -} - -Visual* XlibSurface::get_visual() -{ - Visual* visual = cairo_xlib_surface_get_visual(m_cobject); - check_object_status_and_throw_exception(*this); - return visual; -} - -const Visual* XlibSurface::get_visual() const -{ - const Visual* visual = cairo_xlib_surface_get_visual(m_cobject); - check_object_status_and_throw_exception(*this); - return visual; -} - -int XlibSurface::get_depth() const -{ - int depth = cairo_xlib_surface_get_depth(m_cobject); - check_object_status_and_throw_exception(*this); - return depth; -} - -int XlibSurface::get_height() const -{ - int h = cairo_xlib_surface_get_height(m_cobject); - check_object_status_and_throw_exception(*this); - return h; -} - -int XlibSurface::get_width() const -{ - int w = cairo_xlib_surface_get_width(m_cobject); - check_object_status_and_throw_exception(*this); - return w; -} - -#endif // CAIRO_HAS_XLIB_SURFACE - -} //namespace Cairo - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/cairomm/xlib_surface.h b/libs/cairomm/cairomm/xlib_surface.h deleted file mode 100644 index cddd8806ac..0000000000 --- a/libs/cairomm/cairomm/xlib_surface.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright (C) 2005 The cairomm Development Team - * - * 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; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __CAIROMM_XLIB_SURFACE_H -#define __CAIROMM_XLIB_SURFACE_H - -#include - -// This header is not included by cairomm.h because it requires X headers that -// tend to pollute the namespace with non-prefixed #defines and typedefs. -// You may include it directly if you need to use this API. - -#ifdef CAIRO_HAS_XLIB_SURFACE -#include //Needed for the X11 "Display" struct (which pollutes the namespace because it has no prefix.) -#endif - - -namespace Cairo -{ - -#ifdef CAIRO_HAS_XLIB_SURFACE - -/** An XlibSurface provides a way to render to the X Window System using XLib. - * If you want to draw to the screen within an application that uses the X - * Window system, you should use this Surface type. - * - * @note For this surface to be availabe, cairo must have been compiled with - * support for XLib Surfaces - */ -class XlibSurface : public Surface -{ -public: - - /** Create a C++ wrapper for the C instance. This C++ instance should then be - * given to a RefPtr. - * - * @param cobject The C instance. - * @param has_reference whether we already have a reference. Otherwise, the - * constructor will take an extra reference. - */ - explicit XlibSurface(cairo_surface_t* cobject, bool has_reference = false); - virtual ~XlibSurface(); - - /** Creates an Xlib surface that draws to the given drawable. The way that - * colors are represented in the drawable is specified by the provided - * visual. - * - * @note If drawable is a Window, then the function - * cairo_xlib_surface_set_size must be called whenever the size of the window - * changes. - * - * @param dpy an X Display - * @param drawable an X Drawable, (a Pixmap or a Window) - * @param visual the visual to use for drawing to drawable. The depth of the visual must match the depth of the drawable. Currently, only TrueColor visuals are fully supported. - * @param width the current width of drawable. - * @param height the current height of drawable. - * @return A RefPtr to the newly created surface - */ - static RefPtr create(Display* dpy, Drawable drawable, Visual* visual, int width, int height); - - /** Creates an Xlib surface that draws to the given bitmap. This will be - * drawn to as a CAIRO_FORMAT_A1 object. - * - * @param dpy an X Display - * @param bitmap an X Drawable, (a depth-1 Pixmap) - * @param screen the X Screen associated with bitmap - * @param width the current width of bitmap. - * @param height the current height of bitmap. - * @return A RefPtr to the newly created surface - */ - static RefPtr create(Display *dpy, Pixmap bitmap, Screen *screen, int width, int height); - - /** Informs cairo of the new size of the X Drawable underlying the surface. - * For a surface created for a Window (rather than a Pixmap), this function - * must be called each time the size of the window changes. (For a subwindow, - * you are normally resizing the window yourself, but for a toplevel window, - * it is necessary to listen for ConfigureNotify events.) - * - * A Pixmap can never change size, so it is never necessary to call this - * function on a surface created for a Pixmap. - * - * @param width the new width of the surface - * @param height the new height of the surface - */ - void set_size(int width, int height); - - /** Informs cairo of a new X Drawable underlying the surface. The drawable - * must match the display, screen and format of the existing drawable or the - * application will get X protocol errors and will probably terminate. No - * checks are done by this function to ensure this compatibility. - * - * @param drawable the new drawable for the surface - * @param width the width of the new drawable - * @param height the height of the new drawable - */ - void set_drawable(Drawable drawable, int width, int height); - - /** gets the Drawable object associated with this surface */ - Drawable get_drawable() const; - - /** Get the X Display for the underlying X Drawable. */ - const Display* get_display() const; - /** Get the X Display for the underlying X Drawable. */ - Display* get_display(); - - /** Get the X Screen for the underlying X Drawable */ - Screen* get_screen(); - /** Get the X Screen for the underlying X Drawable */ - const Screen* get_screen() const; - - /** Get the X Visual for the underlying X Drawable */ - Visual* get_visual(); - /** Get the X Visual for the underlying X Drawable */ - const Visual* get_visual() const; - - /** Get the number of bits used to represent each pixel value. */ - int get_depth() const; - - /** Get the height in pixels of the X Drawable underlying the surface */ - int get_height() const; - - /** Get the width in pixels of the X Drawable underlying the surface */ - int get_width() const; - -}; - -#endif // CAIRO_HAS_XLIB_SURFACE - -} // namespace Cairo - -#endif //__CAIROMM_XLIB_SURFACE_H - -// vim: ts=2 sw=2 et diff --git a/libs/cairomm/config.guess b/libs/cairomm/config.guess deleted file mode 100755 index 0f0fe712ae..0000000000 --- a/libs/cairomm/config.guess +++ /dev/null @@ -1,1516 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-03-06' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/libs/cairomm/config.sub b/libs/cairomm/config.sub deleted file mode 100755 index 5defff65a6..0000000000 --- a/libs/cairomm/config.sub +++ /dev/null @@ -1,1622 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-01-18' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/libs/cairomm/configure b/libs/cairomm/configure deleted file mode 100755 index 421eb11d58..0000000000 --- a/libs/cairomm/configure +++ /dev/null @@ -1,22654 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 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=: - # 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 - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -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 - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # 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 - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # 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 - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -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 -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${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 </dev/null 2>&1 && unset CDPATH - -if test -z "$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 && - echo_test_string=`eval $cmd` && - (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. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="cairomm/cairomm.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -GENERIC_MAJOR_VERSION -GENERIC_MINOR_VERSION -GENERIC_MICRO_VERSION -GENERIC_VERSION -GENERIC_LIBRARY_VERSION -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -CXX -CXXFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CXX -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CXXCPP -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -CC -CFLAGS -ac_ct_CC -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -SED -GREP -EGREP -LN_S -ECHO -AR -RANLIB -DLLTOOL -AS -OBJDUMP -CPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL -PLATFORM_WIN32_TRUE -PLATFORM_WIN32_FALSE -OS_WIN32_TRUE -OS_WIN32_FALSE -PKG_CONFIG -CAIROMM_CFLAGS -CAIROMM_LIBS -BOOST_CPPFLAGS -BOOST_LDFLAGS -BOOST_UNIT_TEST_FRAMEWORK_LIB -AUTOTESTS_TRUE -AUTOTESTS_FALSE -DOXYGEN -DOT -DOCS_SUBDIR -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CXX -CXXFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCC -CXXCPP -CC -CFLAGS -CPP -F77 -FFLAGS -PKG_CONFIG -CAIROMM_CFLAGS -CAIROMM_LIBS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# 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}' -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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=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 ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - 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'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -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 - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - 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 .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - 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 .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package 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/PACKAGE] - --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 - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --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) - --enable-tests=yes|no enable automated tests (default is no) - --enable-api-exceptions Build exceptions API. - [default=yes] - --enable-docs build the included docs [default=yes] - -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-tags[=TAGS] include additional configurations [automatic] - --with-boost[=DIR] use boost (default is No) - it is possible to - specify the root directory for boost (optional) - --with-boost-unit-test-framework[=special-lib] - use the Unit_Test_Framework library from boost - it - is possible to specify a certain library for the - linker e.g. - --with-boost-unit-test-framework=boost_unit_test_framework-gcc - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CXXCPP C++ preprocessor - CC C compiler command - CFLAGS C compiler flags - CPP C preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - PKG_CONFIG path to pkg-config utility - CAIROMM_CFLAGS - C compiler flags for CAIROMM, overriding pkg-config - CAIROMM_LIBS - linker flags for CAIROMM, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_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" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`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 - 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 -configure -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.61. 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=. - 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - 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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - 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 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -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,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -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 - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -#release versioning -GENERIC_MAJOR_VERSION=1 -GENERIC_MINOR_VERSION=4 -GENERIC_MICRO_VERSION=6 -GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION - - - - - -#shared library versioning -GENERIC_LIBRARY_VERSION=2:0:1 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed - - - -VERSION=$GENERIC_VERSION - -am__api_version="1.9" -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# 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. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -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 -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$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' - -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}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 $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='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. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`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 - echo $ECHO_N "(cached) $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } -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=cairomm - VERSION=$GENERIC_VERSION - - -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"} - -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - -# 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 -' - - - - - - -ac_config_headers="$ac_config_headers cairomm/cairommconfig.h" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.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. -{ echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 -echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 -echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_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="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - 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 - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} 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_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - - -if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -# 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. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -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 -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - - -# Check whether --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 --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 - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$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 -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - 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 - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} 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 -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$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 - - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 - -fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - -# 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. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 -aix4* | aix5*) - 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 - ;; - -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* | netbsdelf*-gnu) - 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=unknown - ;; - -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 - ;; - -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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$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 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 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:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; 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 5145 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; 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*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; 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*) - 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" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$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:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-cygwin* | *-*-mingw* | *-*-pw32*) - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 -echo "${ECHO_T}$DLLTOOL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 -echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $AS" >&5 -echo "${ECHO_T}$AS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 -echo "${ECHO_T}$ac_ct_AS" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&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}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -echo "${ECHO_T}$OBJDUMP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - - ;; - -esac - -need_locks="$enable_libtool_lock" - - -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 -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 - echo $ECHO_N "(cached) $ECHO_C" >&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 to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$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 to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_prog_f77_g=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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*) - # 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 - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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 - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi - - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - 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 - -# 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 - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, 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. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && 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 < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -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:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && 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 -f 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 - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi - -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -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. -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' - -# 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 avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# 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 - -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 -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 - -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 - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 <&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 - -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 - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -enable_dlopen=no -enable_win32_dll=yes - -# 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 - - -# 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 - -# Use C for the default configuration in the libtool script -tagname= -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 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 conftest* - - - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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:7700: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7704: \$? = $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 -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$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= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&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*) - # 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' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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' - ;; - - 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 - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # 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='-fPIC' - ;; - esac - ;; - - *) - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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' - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - 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' - ;; - *) - 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 - ;; - - 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 - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_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:7990: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7994: \$? = $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_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } - -if test x"$lt_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 -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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_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_prog_compiler_static_works=yes - fi - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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:8094: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8098: \$? = $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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$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 - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # 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_" - # 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. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - 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>/dev/null` 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 - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - 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 - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach 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*) - # _LT_AC_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/'\'' -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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - 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' ;; - 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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; 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 - link_all_deplibs=no - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - 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 <&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. - -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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$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 - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - 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].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - 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_libdir_separator=':' - link_all_deplibs=yes - - 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 - - # 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 "${wl}${allow_undefined_flag}"; 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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*) - 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 - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - 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 "$deplibs" | $SED -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*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = 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' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - 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_separator=: - - hardcode_direct=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 ${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_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - 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 - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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 - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - 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' - 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -# -# 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 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:$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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - 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* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -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" - -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 -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' - ;; - -aix4* | aix5*) - 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.so - # instead of lib.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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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 - # 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' - ;; - -netbsdelf*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_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=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 - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existant 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_AC_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 -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } - -if test "$hardcode_action" = relink; 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 - -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}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" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -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*) - 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 - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = 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 - - ;; - - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* 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 (); -/* 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_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* 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 (); -/* 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_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -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" - - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 < -#endif - -#include - -#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 - -#ifdef __cplusplus -extern "C" void exit (int); -#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 ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && 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 -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$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\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 < -#endif - -#include - -#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 - -#ifdef __cplusplus -extern "C" void exit (int); -#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 ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && 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 -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$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 - - -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# 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//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# 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 - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# 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 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# 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 and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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 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 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# 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 - -# 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 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_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 - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\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 -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi - - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$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(int, char *[]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# 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 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 conftest* - - -# 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 -compiler_CXX=$CC -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-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - -# 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. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_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 - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${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 - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - 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. - archive_cmds_CXX='$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 -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - 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].*|aix5*) - 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. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - 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 - hardcode_direct_CXX=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_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - 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 - - # 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_CXX=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_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${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_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$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 - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$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... - archive_expsym_cmds_CXX='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 - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$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' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=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 - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$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 - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=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 - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$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 $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$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 - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${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_CXX='$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_CXX='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++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - 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. - archive_cmds_CXX='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' - archive_expsym_cmds_CXX='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 $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # 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."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$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 - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$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' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${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++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$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 - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # 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 $templist | $SED "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 $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${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' - - # 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. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - 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. - archive_cmds_CXX='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' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # 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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # 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 - ld_shlibs_CXX=no - fi - ;; - esac - ;; - 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. - archive_cmds_CXX='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' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # 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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # 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 - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$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' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=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?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=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. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$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. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$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. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$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 - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$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. - # 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. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; 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 - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - 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 "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${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 "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${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 "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -# PORTME: override above test on systems where it is broken -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. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -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 - postdeps_CXX='-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 - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-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_CXX='-Bstatic' - fi - ;; - amigaos*) - # 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_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # 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_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - 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_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # 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*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -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:12976: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12980: \$? = $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_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=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_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=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:13080: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13084: \$? = $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_CXX=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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # 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_CXX='$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_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$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' - ;; - linux* | k*bsd*-gnu) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -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' - ;; - -aix4* | aix5*) - 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.so - # instead of lib.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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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_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 - # 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' - ;; - -netbsdelf*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_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=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 - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != 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_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink; 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 - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_CXX - -# 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_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# 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_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# 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 - -# 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_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -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 - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# 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. - -# 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 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 conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -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-%%"` - - -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-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_F77='-Bstatic' - fi - ;; - - amigaos*) - # 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_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - 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_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # 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_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-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_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # 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:14657: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14661: \$? = $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_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=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_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=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:14761: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14765: \$? = $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_F77=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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # 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_F77="_GLOBAL_OFFSET_TABLE_" - # 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. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_F77=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_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` 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 - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$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_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$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_F77='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_F77=no - fi - ;; - - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${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_F77='${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' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$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 - link_all_deplibs_F77=no - else - ld_shlibs_F77=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$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_F77=no - cat <&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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$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_F77=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_F77=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - 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_F77='$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_F77='$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].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - 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_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - 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_F77=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_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - 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 - - # 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_F77=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_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$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 >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$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*) - archive_cmds_F77='$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_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$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_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$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_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$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' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=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_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$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_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -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' - ;; - -aix4* | aix5*) - 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.so - # instead of lib.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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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_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 - # 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' - ;; - -netbsdelf*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_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=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 - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } - -if test "$hardcode_action_F77" = relink; 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 - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_F77 - -# 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_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# 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_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# 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 - -# 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_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$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. - -# 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 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 conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -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-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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:16961: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16965: \$? = $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 -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # 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_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_GCJ='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - 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_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # 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_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # 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:17251: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17255: \$? = $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_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=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_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=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:17355: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:17359: \$? = $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_GCJ=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 .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -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 - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # 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_GCJ="_GLOBAL_OFFSET_TABLE_" - # 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. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=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_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` 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 - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$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_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$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_GCJ='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_GCJ=no - fi - ;; - - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${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_GCJ='${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' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$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 - link_all_deplibs_GCJ=no - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$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_GCJ=no - cat <&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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - 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_GCJ='$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_GCJ='$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].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - 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_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - 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_GCJ=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_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - 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 - - # 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_GCJ=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_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$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*) - archive_cmds_GCJ='$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_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$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_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=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_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -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' - ;; - -aix4* | aix5*) - 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.so - # instead of lib.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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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_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 - # 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' - ;; - -netbsdelf*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_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=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 - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$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 - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; 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 - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_GCJ - -# 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_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# 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_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# 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 - -# 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_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$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. - -# 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 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 conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -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-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# 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_RC - -# 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_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# 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_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# 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 - -# 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_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - -{ echo "$as_me:$LINENO: checking for some Win32 platform" >&5 -echo $ECHO_N "checking for some Win32 platform... $ECHO_C" >&6; } -case "$host" in - *-*-mingw*|*-*-cygwin*) - platform_win32=yes - ;; - *) - platform_win32=no - ;; -esac -{ echo "$as_me:$LINENO: result: $platform_win32" >&5 -echo "${ECHO_T}$platform_win32" >&6; } - - -if test "$platform_win32" = "yes"; then - PLATFORM_WIN32_TRUE= - PLATFORM_WIN32_FALSE='#' -else - PLATFORM_WIN32_TRUE='#' - PLATFORM_WIN32_FALSE= -fi - - -{ echo "$as_me:$LINENO: checking for native Win32" >&5 -echo $ECHO_N "checking for native Win32... $ECHO_C" >&6; } -case "$host" in - *-*-mingw*) - os_win32=yes - ;; - *) - os_win32=no - ;; -esac -{ echo "$as_me:$LINENO: result: $os_win32" >&5 -echo "${ECHO_T}$os_win32" >&6; } - - -if test "$os_win32" = "yes"; then - OS_WIN32_TRUE= - OS_WIN32_FALSE='#' -else - OS_WIN32_TRUE='#' - OS_WIN32_FALSE= -fi - - -# Ensure MSVC-compatible struct packing convention is used when -# compiling for Win32 with gcc. -# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while -# gcc2 uses "-fnative-struct". -if test x"$os_win32" = xyes; then - if test x"$GCC" = xyes; then - msnative_struct='' - { echo "$as_me:$LINENO: checking how to get MSVC-compatible struct packing" >&5 -echo $ECHO_N "checking how to get MSVC-compatible struct packing... $ECHO_C" >&6; } - if test -z "$ac_cv_prog_CC"; then - our_gcc="$CC" - else - our_gcc="$ac_cv_prog_CC" - fi - case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in - 2.) - if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then - msnative_struct='-fnative-struct' - fi - ;; - *) - if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then - msnative_struct='-mms-bitfields' - fi - ;; - esac - if test x"$msnative_struct" = x ; then - { echo "$as_me:$LINENO: result: no way" >&5 -echo "${ECHO_T}no way" >&6; } - { echo "$as_me:$LINENO: WARNING: produced libraries might be incompatible with MSVC-compiled code" >&5 -echo "$as_me: WARNING: produced libraries might be incompatible with MSVC-compiled code" >&2;} - else - CXXFLAGS="$CXXFLAGS $msnative_struct" - { echo "$as_me:$LINENO: result: ${msnative_struct}" >&5 -echo "${ECHO_T}${msnative_struct}" >&6; } - fi - fi -fi - - - - - -for ac_header in string list map -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - exit -fi - -done - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - PKG_CONFIG="" - fi - -fi - -pkg_failed=no -{ echo "$as_me:$LINENO: checking for CAIROMM" >&5 -echo $ECHO_N "checking for CAIROMM... $ECHO_C" >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$CAIROMM_CFLAGS"; then - pkg_cv_CAIROMM_CFLAGS="$CAIROMM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.4\"") >&5 - ($PKG_CONFIG --exists --print-errors "cairo >= 1.4") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CAIROMM_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.4" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$CAIROMM_LIBS"; then - pkg_cv_CAIROMM_LIBS="$CAIROMM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.4\"") >&5 - ($PKG_CONFIG --exists --print-errors "cairo >= 1.4") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CAIROMM_LIBS=`$PKG_CONFIG --libs "cairo >= 1.4" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CAIROMM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.4"` - else - CAIROMM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.4"` - fi - # Put the nasty error message in config.log where it belongs - echo "$CAIROMM_PKG_ERRORS" >&5 - - { { echo "$as_me:$LINENO: error: Package requirements (cairo >= 1.4) were not met: - -$CAIROMM_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables CAIROMM_CFLAGS -and CAIROMM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -echo "$as_me: error: Package requirements (cairo >= 1.4) were not met: - -$CAIROMM_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables CAIROMM_CFLAGS -and CAIROMM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables CAIROMM_CFLAGS -and CAIROMM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables CAIROMM_CFLAGS -and CAIROMM_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - CAIROMM_CFLAGS=$pkg_cv_CAIROMM_CFLAGS - CAIROMM_LIBS=$pkg_cv_CAIROMM_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - : -fi - -# Check whether --enable-tests was given. -if test "${enable_tests+set}" = set; then - enableval=$enable_tests; ENABLE_TESTS=$enableval -else - ENABLE_TESTS=no -fi - -if test x$CAIROMM_DEVEL = xon ; then - ENABLE_TESTS=yes -fi - -if test x$ENABLE_TESTS = xyes ; then - - -# Check whether --with-boost was given. -if test "${with_boost+set}" = set; then - withval=$with_boost; - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - -else - want_boost="yes" -fi - - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=1.33.1 - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - { echo "$as_me:$LINENO: checking for boostlib >= $boost_lib_version_req" >&5 -echo $ECHO_N "checking for boostlib >= $boost_lib_version_req... $ECHO_C" >&6; } - succeeded=no - - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in /usr /usr/local /opt ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - succeeded=yes - found_system=yes - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - for ac_boost_path in /usr /usr/local /opt ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - BOOST_LDFLAGS="-L$best_path/lib" - - if test "x$BOOST_ROOT" != "x"; then - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" ; then - { echo "$as_me:$LINENO: We will use a staged boost library from $BOOST_ROOT" >&5 -echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;} - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - succeeded=yes - found_system=yes - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - fi - - if test "$succeeded" != "yes" ; then - if test "$_version" = "0" ; then - { { echo "$as_me:$LINENO: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&5 -echo "$as_me: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&2;} - { (exit 1); exit 1; }; } - else - { echo "$as_me:$LINENO: Your boost libraries seems to old (version $_version)." >&5 -echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;} - fi - else - - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BOOST -_ACEOF - - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" -fi - - - - -# Check whether --with-boost-unit-test-framework was given. -if test "${with_boost_unit_test_framework+set}" = set; then - withval=$with_boost_unit_test_framework; - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_unit_test_framework_lib="" - else - want_boost="yes" - ax_boost_user_unit_test_framework_lib="$withval" - fi - -else - want_boost="yes" - -fi - - - if test "x$want_boost" = "xyes"; then - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - { echo "$as_me:$LINENO: checking whether the Boost::Unit_Test_Framework library is available" >&5 -echo $ECHO_N "checking whether the Boost::Unit_Test_Framework library is available... $ECHO_C" >&6; } -if test "${ax_cv_boost_unit_test_framework+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -using boost::unit_test::test_suite; - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ax_cv_boost_unit_test_framework=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ax_cv_boost_unit_test_framework=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -fi -{ echo "$as_me:$LINENO: result: $ax_cv_boost_unit_test_framework" >&5 -echo "${ECHO_T}$ax_cv_boost_unit_test_framework" >&6; } - if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BOOST_UNIT_TEST_FRAMEWORK -_ACEOF - - BN=boost_unit_test_framework - if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then - saved_ldflags="${LDFLAGS}" - for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \ - lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \ - $BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do - LDFLAGS="${LDFLAGS} -l$ax_lib" - { echo "$as_me:$LINENO: checking Boost::UnitTestFramework library linkage" >&5 -echo $ECHO_N "checking Boost::UnitTestFramework library linkage... $ECHO_C" >&6; } -if test "${ax_cv_boost_unit_test_framework_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - using boost::unit_test::test_suite; - test_suite* init_unit_test_suite( int argc, char * argv[] ) { - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return test; - } - -int -main () -{ - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - link_unit_test_framework="yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - link_unit_test_framework="no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -fi -{ echo "$as_me:$LINENO: result: $ax_cv_boost_unit_test_framework_link" >&5 -echo "${ECHO_T}$ax_cv_boost_unit_test_framework_link" >&6; } - LDFLAGS="${saved_ldflags}" - - if test "x$link_unit_test_framework" = "xyes"; then - BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib" - - break - fi - done - else - saved_ldflags="${LDFLAGS}" - for ax_lib in $ax_boost_user_unit_test_framework_lib $BN-$ax_boost_user_unit_test_framework_lib; do - LDFLAGS="${LDFLAGS} -l$ax_lib" - { echo "$as_me:$LINENO: checking Boost::UnitTestFramework library linkage" >&5 -echo $ECHO_N "checking Boost::UnitTestFramework library linkage... $ECHO_C" >&6; } -if test "${ax_cv_boost_unit_test_framework_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - using boost::unit_test::test_suite; - test_suite* init_unit_test_suite( int argc, char * argv[] ) { - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return test; - } - -int -main () -{ - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - link_unit_test_framework="yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - link_unit_test_framework="no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -fi -{ echo "$as_me:$LINENO: result: $ax_cv_boost_unit_test_framework_link" >&5 -echo "${ECHO_T}$ax_cv_boost_unit_test_framework_link" >&6; } - LDFLAGS="${saved_ldflags}" - if test "x$link_unit_test_framework" = "xyes"; then - BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib" - - break - fi - done - fi - if test "x$link_unit_test_framework" = "xno"; then - { { echo "$as_me:$LINENO: error: Could not link against $ax_lib !" >&5 -echo "$as_me: error: Could not link against $ax_lib !" >&2;} - { (exit 1); exit 1; }; } - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi - -{ echo "$as_me:$LINENO: support of automated tests enabled" >&5 -echo "$as_me: support of automated tests enabled" >&6;} -else - { echo "$as_me:$LINENO: disabled support of automated tests" >&5 -echo "$as_me: disabled support of automated tests" >&6;} -fi - - -if test x$ENABLE_TESTS = xyes; then - AUTOTESTS_TRUE= - AUTOTESTS_FALSE='#' -else - AUTOTESTS_TRUE='#' - AUTOTESTS_FALSE= -fi - - -if test "x$CAIROMM_DEVEL" = "xon" ; then - CXXFLAGS="$CXXFLAGS -Wall -g -Werror -Wextra" -fi - - - # Check whether --enable-api-exceptions was given. -if test "${enable_api_exceptions+set}" = set; then - enableval=$enable_api_exceptions; cairomm_enable_api_exceptions="$enableval" -else - cairomm_enable_api_exceptions='yes' -fi - - - if test "x$cairomm_enable_api_exceptions" = "xyes"; then - { - -cat >>confdefs.h <<\_ACEOF -#define CAIROMM_EXCEPTIONS_ENABLED 1 -_ACEOF - - } - fi - - -DOCS_SUBDIR="" # Check whether --enable-docs was given. -if test "${enable_docs+set}" = set; then - enableval=$enable_docs; -else - enable_docs=yes -fi - -if test "x$enable_docs" = "xyes"; then - for ac_prog in doxygen -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DOXYGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DOXYGEN"; then - ac_cv_prog_DOXYGEN="$DOXYGEN" # 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_DOXYGEN="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DOXYGEN=$ac_cv_prog_DOXYGEN -if test -n "$DOXYGEN"; then - { echo "$as_me:$LINENO: result: $DOXYGEN" >&5 -echo "${ECHO_T}$DOXYGEN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$DOXYGEN" && break -done -test -n "$DOXYGEN" || DOXYGEN="no" - - if test x$DOXYGEN = xno; then - { echo "$as_me:$LINENO: WARNING: Doxygen not found, documentation will not be rebuilt" >&5 -echo "$as_me: WARNING: Doxygen not found, documentation will not be rebuilt" >&2;} - else - for ac_prog in dot -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DOT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DOT"; then - ac_cv_prog_DOT="$DOT" # 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_DOT="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DOT=$ac_cv_prog_DOT -if test -n "$DOT"; then - { echo "$as_me:$LINENO: result: $DOT" >&5 -echo "${ECHO_T}$DOT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$DOT" && break -done -test -n "$DOT" || DOT="no" - - if test x$DOT = xno; then - { echo "$as_me:$LINENO: WARNING: graphviz / dot not found, documentation graphs will not be rebuilt" >&5 -echo "$as_me: WARNING: graphviz / dot not found, documentation graphs will not be rebuilt" >&2;} - fi - fi - - DOCS_SUBDIR="docs" - ac_config_files="$ac_config_files docs/Makefile docs/reference/Makefile docs/reference/Doxyfile" - -fi - - - -ac_config_files="$ac_config_files Makefile cairomm/Makefile examples/Makefile examples/png_file/Makefile examples/pdf-surface/Makefile examples/ps-surface/Makefile examples/svg-surface/Makefile examples/text-rotate/Makefile tests/Makefile cairomm-1.0.pc" - - -ac_config_files="$ac_config_files MSVC/Makefile MSVC/gendef/Makefile MSVC/cairomm/Makefile MSVC/cairomm/cairomm.rc MSVC/examples/Makefile MSVC/examples/pdf-surface/Makefile MSVC/examples/png_file/Makefile MSVC/examples/ps-surface/Makefile MSVC/examples/svg-surface/Makefile MSVC/examples/text-rotate/Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -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=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${PLATFORM_WIN32_TRUE}" && test -z "${PLATFORM_WIN32_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"PLATFORM_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"PLATFORM_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"OS_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"OS_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${AUTOTESTS_TRUE}" && test -z "${AUTOTESTS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AUTOTESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AUTOTESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## 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=: - # 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 - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -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 - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -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 -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. 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 - -cat >>$CONFIG_STATUS <<_ACEOF -# 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_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet 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 ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 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' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -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 ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - 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. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "cairomm/cairommconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS cairomm/cairommconfig.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; - "docs/reference/Doxyfile") CONFIG_FILES="$CONFIG_FILES docs/reference/Doxyfile" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "cairomm/Makefile") CONFIG_FILES="$CONFIG_FILES cairomm/Makefile" ;; - "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "examples/png_file/Makefile") CONFIG_FILES="$CONFIG_FILES examples/png_file/Makefile" ;; - "examples/pdf-surface/Makefile") CONFIG_FILES="$CONFIG_FILES examples/pdf-surface/Makefile" ;; - "examples/ps-surface/Makefile") CONFIG_FILES="$CONFIG_FILES examples/ps-surface/Makefile" ;; - "examples/svg-surface/Makefile") CONFIG_FILES="$CONFIG_FILES examples/svg-surface/Makefile" ;; - "examples/text-rotate/Makefile") CONFIG_FILES="$CONFIG_FILES examples/text-rotate/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "cairomm-1.0.pc") CONFIG_FILES="$CONFIG_FILES cairomm-1.0.pc" ;; - "MSVC/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/Makefile" ;; - "MSVC/gendef/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/gendef/Makefile" ;; - "MSVC/cairomm/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/cairomm/Makefile" ;; - "MSVC/cairomm/cairomm.rc") CONFIG_FILES="$CONFIG_FILES MSVC/cairomm/cairomm.rc" ;; - "MSVC/examples/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/examples/Makefile" ;; - "MSVC/examples/pdf-surface/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/examples/pdf-surface/Makefile" ;; - "MSVC/examples/png_file/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/examples/png_file/Makefile" ;; - "MSVC/examples/ps-surface/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/examples/ps-surface/Makefile" ;; - "MSVC/examples/svg-surface/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/examples/svg-surface/Makefile" ;; - "MSVC/examples/text-rotate/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC/examples/text-rotate/Makefile" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -GENERIC_MAJOR_VERSION!$GENERIC_MAJOR_VERSION$ac_delim -GENERIC_MINOR_VERSION!$GENERIC_MINOR_VERSION$ac_delim -GENERIC_MICRO_VERSION!$GENERIC_MICRO_VERSION$ac_delim -GENERIC_VERSION!$GENERIC_VERSION$ac_delim -GENERIC_LIBRARY_VERSION!$GENERIC_LIBRARY_VERSION$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CXXCPP!$CXXCPP$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -SED!$SED$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -DLLTOOL!$DLLTOOL$ac_delim -AS!$AS$ac_delim -OBJDUMP!$OBJDUMP$ac_delim -CPP!$CPP$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -PLATFORM_WIN32_TRUE!$PLATFORM_WIN32_TRUE$ac_delim -PLATFORM_WIN32_FALSE!$PLATFORM_WIN32_FALSE$ac_delim -OS_WIN32_TRUE!$OS_WIN32_TRUE$ac_delim -OS_WIN32_FALSE!$OS_WIN32_FALSE$ac_delim -PKG_CONFIG!$PKG_CONFIG$ac_delim -CAIROMM_CFLAGS!$CAIROMM_CFLAGS$ac_delim -CAIROMM_LIBS!$CAIROMM_LIBS$ac_delim -BOOST_CPPFLAGS!$BOOST_CPPFLAGS$ac_delim -BOOST_LDFLAGS!$BOOST_LDFLAGS$ac_delim -BOOST_UNIT_TEST_FRAMEWORK_LIB!$BOOST_UNIT_TEST_FRAMEWORK_LIB$ac_delim -AUTOTESTS_TRUE!$AUTOTESTS_TRUE$ac_delim -AUTOTESTS_FALSE!$AUTOTESTS_FALSE$ac_delim -DOXYGEN!$DOXYGEN$ac_delim -DOT!$DOT$ac_delim -DOCS_SUBDIR!$DOCS_SUBDIR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_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 -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - 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 || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`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 || -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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`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 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# 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= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - 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 - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;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 -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -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"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -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 - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then 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. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $ac_file | $ac_file:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $ac_file" >`$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 || -echo X$ac_file | - 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) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /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 || -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 || -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 - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`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 || -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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/libs/cairomm/configure.in b/libs/cairomm/configure.in deleted file mode 100644 index 46f9785ee3..0000000000 --- a/libs/cairomm/configure.in +++ /dev/null @@ -1,189 +0,0 @@ -AC_INIT(cairomm/cairomm.h) - -#release versioning -GENERIC_MAJOR_VERSION=1 -GENERIC_MINOR_VERSION=4 -GENERIC_MICRO_VERSION=6 -GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION -AC_SUBST(GENERIC_MAJOR_VERSION) -AC_SUBST(GENERIC_MINOR_VERSION) -AC_SUBST(GENERIC_MICRO_VERSION) -AC_SUBST(GENERIC_VERSION) - -#shared library versioning -GENERIC_LIBRARY_VERSION=2:0:1 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed -AC_SUBST(GENERIC_LIBRARY_VERSION) - - -VERSION=$GENERIC_VERSION - -AM_INIT_AUTOMAKE(cairomm, $GENERIC_VERSION) - -AM_CONFIG_HEADER(cairomm/cairommconfig.h) - -AC_PROG_CXX -AC_PROG_CXXCPP -AC_LANG_CPLUSPLUS -AC_PROG_INSTALL -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL - -dnl Used for enabling the "-no-undefined" and "-export-all-symbols" flags -dnl while generating DLLs. Borrowed from the official gtk+-2 configure.in -AC_MSG_CHECKING([for some Win32 platform]) -case "$host" in - *-*-mingw*|*-*-cygwin*) - platform_win32=yes - ;; - *) - platform_win32=no - ;; -esac -AC_MSG_RESULT([$platform_win32]) -AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") - -AC_MSG_CHECKING([for native Win32]) -case "$host" in - *-*-mingw*) - os_win32=yes - ;; - *) - os_win32=no - ;; -esac -AC_MSG_RESULT([$os_win32]) -AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") - -# Ensure MSVC-compatible struct packing convention is used when -# compiling for Win32 with gcc. -# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while -# gcc2 uses "-fnative-struct". -if test x"$os_win32" = xyes; then - if test x"$GCC" = xyes; then - msnative_struct='' - AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) - if test -z "$ac_cv_prog_CC"; then - our_gcc="$CC" - else - our_gcc="$ac_cv_prog_CC" - fi - case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in - 2.) - if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then - msnative_struct='-fnative-struct' - fi - ;; - *) - if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then - msnative_struct='-mms-bitfields' - fi - ;; - esac - if test x"$msnative_struct" = x ; then - AC_MSG_RESULT([no way]) - AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code]) - else - CXXFLAGS="$CXXFLAGS $msnative_struct" - AC_MSG_RESULT([${msnative_struct}]) - fi - fi -fi - -AC_CHECK_HEADERS(string list map, , exit) - -PKG_CHECK_MODULES(CAIROMM, cairo >= 1.4) - -AC_ARG_ENABLE(tests, - AC_HELP_STRING([--enable-tests=yes|no], - [enable automated tests (default is no)]), - ENABLE_TESTS=$enableval, - ENABLE_TESTS=no) -if test x$CAIROMM_DEVEL = xon ; then - ENABLE_TESTS=yes -fi - -if test x$ENABLE_TESTS = xyes ; then -AX_BOOST_BASE([1.33.1]) -AX_BOOST_UNIT_TEST_FRAMEWORK -AC_MSG_NOTICE(support of automated tests enabled) -else - AC_MSG_NOTICE(disabled support of automated tests) -fi -AM_CONDITIONAL(AUTOTESTS, test x$ENABLE_TESTS = xyes) - -dnl enable compiler warnings when the CAIROMM_DEVEL environment variable is set to 'on' -if test "x$CAIROMM_DEVEL" = "xon" ; then - CXXFLAGS="$CXXFLAGS -Wall -g -Werror -Wextra" -fi - -CAIROMM_ARG_ENABLE_API_EXCEPTIONS() - -dnl Check whether to build the documentation directory -DOCS_SUBDIR="" dnl set DOCS_SUBDIR initially blank -AC_ARG_ENABLE(docs, [AC_HELP_STRING([--enable-docs], - [build the included docs [default=yes]])],, - [enable_docs=yes]) -if test "x$enable_docs" = "xyes"; then - dnl check if doxygen is installed - AC_CHECK_PROGS(DOXYGEN, [doxygen], no) - if test x$DOXYGEN = xno; then - AC_MSG_WARN([Doxygen not found, documentation will not be rebuilt]) - else - dnl check if graphviz / dot is installed (used by doxygen) - AC_CHECK_PROGS(DOT, [dot], no) - if test x$DOT = xno; then - AC_MSG_WARN([graphviz / dot not found, documentation graphs will not be rebuilt]) - fi - fi - - DOCS_SUBDIR="docs" - AC_CONFIG_FILES( - docs/Makefile - docs/reference/Makefile - docs/reference/Doxyfile - ) -fi -AC_SUBST(DOCS_SUBDIR) - - -AC_CONFIG_FILES( - Makefile - cairomm/Makefile - - examples/Makefile - examples/png_file/Makefile - examples/pdf-surface/Makefile - examples/ps-surface/Makefile - examples/svg-surface/Makefile - examples/text-rotate/Makefile - - tests/Makefile - - cairomm-1.0.pc -) - -AC_CONFIG_FILES([ - MSVC/Makefile - MSVC/gendef/Makefile - MSVC/cairomm/Makefile - MSVC/cairomm/cairomm.rc - MSVC/examples/Makefile - MSVC/examples/pdf-surface/Makefile - MSVC/examples/png_file/Makefile - MSVC/examples/ps-surface/Makefile - MSVC/examples/svg-surface/Makefile - MSVC/examples/text-rotate/Makefile -]) - -AC_OUTPUT() diff --git a/libs/cairomm/depcomp b/libs/cairomm/depcomp deleted file mode 100755 index 04701da536..0000000000 --- a/libs/cairomm/depcomp +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2005-07-09.11 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -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 . -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 - -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. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" - 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. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$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" - ;; - -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 mecanism 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 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 $1 != '--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 $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - 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. - -*|$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 $1 != '--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, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -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-end: "$" -# End: diff --git a/libs/cairomm/install-sh b/libs/cairomm/install-sh deleted file mode 100755 index 4d4a9519ea..0000000000 --- a/libs/cairomm/install-sh +++ /dev/null @@ -1,323 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2005-05-14.22 - -# 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. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -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: --c (ignored) --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. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; - esac -done - -if test -z "$1"; 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 - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi - 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 "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # 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: $dstarg: Is a directory" >&2 - exit 1 - fi - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit - fi - pathcomp=$pathcomp/ - done - fi - - if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - - else - dstfile=`basename "$dst"` - - # 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 - trap '(exit $?); exit' 1 2 13 15 - - # Copy the file name to the temp name. - $doit $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 "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } -done - -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); 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-end: "$" -# End: diff --git a/libs/cairomm/ltmain.sh b/libs/cairomm/ltmain.sh deleted file mode 100644 index 2160ef7b98..0000000000 --- a/libs/cairomm/ltmain.sh +++ /dev/null @@ -1,6938 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# 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: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="1.5.24 Debian 1.5.24-1ubuntu1" -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" - -# Be Bourne compatible (taken from Autoconf:_AS_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 - -# 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 <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# 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 "$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" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# 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 () -{ - 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 -e '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_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 () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - 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. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - 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 - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run 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 - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - 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 - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - 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" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - 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 have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - 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}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $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" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 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." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - 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) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -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,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - 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. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # 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 - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $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 - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - 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 - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - 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. - libobjs="$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 - non_pic_objects="$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" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - 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*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$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*) - # 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 -framework System" - 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 - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -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* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @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*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -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*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - 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 - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - 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. - libobjs="$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 - non_pic_objects="$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" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_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. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$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%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - 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" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - 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 (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - 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 - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - 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 - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 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 used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = 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 - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - 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 - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - 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 - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - 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 - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; 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 - *" $dir "*) ;; - *" $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 - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if 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 - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - 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 module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; 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 - 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; 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 - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; 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) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - 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 "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - 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" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # 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 - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # 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="$2" - number_minor="$3" - number_revision="$4" - # - # 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) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - 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]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - 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]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - 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]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - 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 - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - 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 - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - 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 - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, 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) - ;; - $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 - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-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. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - 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 - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - 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 \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - 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 - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - 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" | ${SED} -e "1s,^X,," -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 is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # 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 - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - 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 - realname="$2" - shift; 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` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "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"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - 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"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$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:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # 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= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$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\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - 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 ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "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" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - 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\" - 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 - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(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 - $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 - $show "${rm}r $gentop" - $run ${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 - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec 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" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $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" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - 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*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$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 - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /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/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - 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" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $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" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - 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 our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - 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 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#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 -# 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 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#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); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -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; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -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; - - DEBUG("(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 * -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); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_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 variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - 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 $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - 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" - 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" - 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 - # 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 - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$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 - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_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 - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$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= - 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 - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - 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) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# 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 - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - 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. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "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. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # 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 - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # 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 - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$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) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $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" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG 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 - 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 - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - 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. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $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) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # 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 - $show "$rm $rmfiles" - $run $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 - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -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 - -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] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# 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 -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/libs/cairomm/m4/ax_boost_base.m4 b/libs/cairomm/m4/ax_boost_base.m4 deleted file mode 100644 index 575a51ef6b..0000000000 --- a/libs/cairomm/m4/ax_boost_base.m4 +++ /dev/null @@ -1,198 +0,0 @@ -##### http://autoconf-archive.cryp.to/ax_boost_base.html -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION]) -# -# DESCRIPTION -# -# Test for the Boost C++ libraries of a particular version (or newer) -# -# If no path to the installed boost library is given the macro -# searchs under /usr, /usr/local, and /opt, and evaluates the -# $BOOST_ROOT environment variable. Further documentation is -# available at . -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# LAST MODIFICATION -# -# 2006-12-28 -# -# COPYLEFT -# -# Copyright (c) 2006 Thomas Porschberg -# -# Copying and distribution of this file, with or without -# modification, are permitted in any medium without royalty provided -# the copyright notice and this notice are preserved. - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is No) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in /usr /usr/local /opt ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes"; then - _version=0 - if test "$ac_boost_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_path/lib" - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" - done - fi - else - for ac_boost_path in /usr /usr/local /opt ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - BOOST_LDFLAGS="-L$best_path/lib" - - if test "x$BOOST_ROOT" != "x"; then - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "$V_CHECK" = "1" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "$succeeded" != "yes" ; then - if test "$_version" = "0" ; then - AC_MSG_ERROR([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) - else - AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) - fi - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" -fi - -]) diff --git a/libs/cairomm/m4/ax_boost_unit_test_framework.m4 b/libs/cairomm/m4/ax_boost_unit_test_framework.m4 deleted file mode 100644 index 11e5d8d5a3..0000000000 --- a/libs/cairomm/m4/ax_boost_unit_test_framework.m4 +++ /dev/null @@ -1,138 +0,0 @@ -##### http://autoconf-archive.cryp.to/ax_boost_unit_test_framework.html -# -# SYNOPSIS -# -# AX_BOOST_UNIT_TEST_FRAMEWORK -# -# DESCRIPTION -# -# Test for Unit_Test_Framework library from the Boost C++ libraries. -# The macro requires a preceding call to AX_BOOST_BASE. Further -# documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) -# -# And sets: -# -# HAVE_BOOST_UNIT_TEST_FRAMEWORK -# -# LAST MODIFICATION -# -# 2006-12-28 -# -# COPYLEFT -# -# Copyright (c) 2006 Thomas Porschberg -# -# Copying and distribution of this file, with or without -# modification, are permitted in any medium without royalty provided -# the copyright notice and this notice are preserved. - -AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], -[ - AC_ARG_WITH([boost-unit-test-framework], - AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@], - [use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_unit_test_framework_lib="" - else - want_boost="yes" - ax_boost_user_unit_test_framework_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available, - ax_cv_boost_unit_test_framework, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include ]], - [[using boost::unit_test::test_suite; - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]]), - ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no) - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then - AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available]) - BN=boost_unit_test_framework - if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then - saved_ldflags="${LDFLAGS}" - for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \ - lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \ - $BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do - LDFLAGS="${LDFLAGS} -l$ax_lib" - AC_CACHE_CHECK(Boost::UnitTestFramework library linkage, - ax_cv_boost_unit_test_framework_link, - [AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include - using boost::unit_test::test_suite; - test_suite* init_unit_test_suite( int argc, char * argv[] ) { - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return test; - } - ]], - [[ return 0;]])], - link_unit_test_framework="yes",link_unit_test_framework="no") - AC_LANG_POP([C++]) - ]) - LDFLAGS="${saved_ldflags}" - - if test "x$link_unit_test_framework" = "xyes"; then - BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib" - AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) - break - fi - done - else - saved_ldflags="${LDFLAGS}" - for ax_lib in $ax_boost_user_unit_test_framework_lib $BN-$ax_boost_user_unit_test_framework_lib; do - LDFLAGS="${LDFLAGS} -l$ax_lib" - AC_CACHE_CHECK(Boost::UnitTestFramework library linkage, - ax_cv_boost_unit_test_framework_link, - [AC_LANG_PUSH([C++]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include - using boost::unit_test::test_suite; - test_suite* init_unit_test_suite( int argc, char * argv[] ) { - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return test; - } - ]], - [[ return 0;]])], - link_unit_test_framework="yes",link_unit_test_framework="no") - AC_LANG_POP([C++]) - ]) - LDFLAGS="${saved_ldflags}" - if test "x$link_unit_test_framework" = "xyes"; then - BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib" - AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) - break - fi - done - fi - if test "x$link_unit_test_framework" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) diff --git a/libs/cairomm/m4/reduced.m4 b/libs/cairomm/m4/reduced.m4 deleted file mode 100644 index 5a941fc148..0000000000 --- a/libs/cairomm/m4/reduced.m4 +++ /dev/null @@ -1,20 +0,0 @@ -## CAIROMM_ARG_ENABLE_API_EXCEPTIONS() -## -## Provide the --enable-api-exceptions configure argument, enabled -## by default. -## -AC_DEFUN([CAIROMM_ARG_ENABLE_API_EXCEPTIONS], -[ - AC_ARG_ENABLE([api-exceptions], - [ --enable-api-exceptions Build exceptions API. - [[default=yes]]], - [cairomm_enable_api_exceptions="$enableval"], - [cairomm_enable_api_exceptions='yes']) - - if test "x$cairomm_enable_api_exceptions" = "xyes"; then - { - AC_DEFINE([CAIROMM_EXCEPTIONS_ENABLED],[1], [Defined when the --enable-api-exceptions configure argument was given]) - } - fi -]) - diff --git a/libs/cairomm/missing b/libs/cairomm/missing deleted file mode 100755 index 894e786e16..0000000000 --- a/libs/cairomm/missing +++ /dev/null @@ -1,360 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2005-06-08.21 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# 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' - 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] - -Send bug reports to ." - 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 - -# 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). -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 "$1" 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 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - 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 [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -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 [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -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 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - 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 's/.*-o \([^ ]*\).*/\1/p'` - 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-end: "$" -# End: diff --git a/libs/cairomm/tests/Makefile.am b/libs/cairomm/tests/Makefile.am deleted file mode 100644 index 366ccfee51..0000000000 --- a/libs/cairomm/tests/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -if AUTOTESTS - -# build automated 'tests' -noinst_PROGRAMS = test-context -test_context_SOURCES=test-context.cc -TESTS=test-context - -else - -#don't build anything -TESTS= - -endif - -#Where to find the header files needed by the source files: -INCLUDES = -I$(top_srcdir) @CAIROMM_CFLAGS@ - -#The libraries that the executable needs to link against: -LIBS = $(top_builddir)/cairomm/libcairomm-1.0.la @LIBS@ @CAIROMM_LIBS@ @BOOST_UNIT_TEST_FRAMEWORK_LIB@ diff --git a/libs/cairomm/tests/Makefile.in b/libs/cairomm/tests/Makefile.in deleted file mode 100644 index 0d386a5960..0000000000 --- a/libs/cairomm/tests/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@AUTOTESTS_TRUE@noinst_PROGRAMS = test-context$(EXEEXT) -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_base.m4 \ - $(top_srcdir)/m4/ax_boost_unit_test_framework.m4 \ - $(top_srcdir)/m4/reduced.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/cairomm/cairommconfig.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am__test_context_SOURCES_DIST = test-context.cc -@AUTOTESTS_TRUE@am_test_context_OBJECTS = test-context.$(OBJEXT) -test_context_OBJECTS = $(am_test_context_OBJECTS) -test_context_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/cairomm -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(test_context_SOURCES) -DIST_SOURCES = $(am__test_context_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUTOTESTS_FALSE = @AUTOTESTS_FALSE@ -AUTOTESTS_TRUE = @AUTOTESTS_TRUE@ -AWK = @AWK@ -BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ -BOOST_LDFLAGS = @BOOST_LDFLAGS@ -BOOST_UNIT_TEST_FRAMEWORK_LIB = @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -CAIROMM_CFLAGS = @CAIROMM_CFLAGS@ -CAIROMM_LIBS = @CAIROMM_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOCS_SUBDIR = @DOCS_SUBDIR@ -DOT = @DOT@ -DOXYGEN = @DOXYGEN@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GENERIC_LIBRARY_VERSION = @GENERIC_LIBRARY_VERSION@ -GENERIC_MAJOR_VERSION = @GENERIC_MAJOR_VERSION@ -GENERIC_MICRO_VERSION = @GENERIC_MICRO_VERSION@ -GENERIC_MINOR_VERSION = @GENERIC_MINOR_VERSION@ -GENERIC_VERSION = @GENERIC_VERSION@ -GREP = @GREP@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ - -#The libraries that the executable needs to link against: -LIBS = $(top_builddir)/cairomm/libcairomm-1.0.la @LIBS@ @CAIROMM_LIBS@ @BOOST_UNIT_TEST_FRAMEWORK_LIB@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLATFORM_WIN32_FALSE = @PLATFORM_WIN32_FALSE@ -PLATFORM_WIN32_TRUE = @PLATFORM_WIN32_TRUE@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -@AUTOTESTS_TRUE@test_context_SOURCES = test-context.cc - -#don't build anything -@AUTOTESTS_FALSE@TESTS = -@AUTOTESTS_TRUE@TESTS = test-context - -#Where to find the header files needed by the source files: -INCLUDES = -I$(top_srcdir) @CAIROMM_CFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .cc .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -test-context$(EXEEXT): $(test_context_OBJECTS) $(test_context_DEPENDENCIES) - @rm -f test-context$(EXEEXT) - $(CXXLINK) $(test_context_LDFLAGS) $(test_context_OBJECTS) $(test_context_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-context.Po@am__quote@ - -.cc.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list='$(TESTS)'; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/cairomm/tests/test-context.cc b/libs/cairomm/tests/test-context.cc deleted file mode 100644 index 9cfaec2f01..0000000000 --- a/libs/cairomm/tests/test-context.cc +++ /dev/null @@ -1,349 +0,0 @@ -// vim: ts=2 sw=2 et -/* - * These tests are of limited usefulness. In fact, you might even say that - * they're not really tests at all. But I felt that it would be useful to have - * some basic usage of most functions just to verify that things compile and - * work generally - */ - -#include -#include -#include -#include -using namespace boost::unit_test; -#include - -#define CREATE_CONTEXT(varname) \ - Cairo::RefPtr surf = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 10, 10); \ - Cairo::RefPtr cr = Cairo::Context::create(surf); - -void -test_dashes () -{ - CREATE_CONTEXT(cr); - std::valarray dash_array(4); - dash_array[0] = 0.1; - dash_array[1] = 0.2; - dash_array[2] = 0.04; - dash_array[3] = 0.31; - cr->set_dash(dash_array, 0.54); - - std::vector get_array; - double get_offset; - cr->get_dash (get_array, get_offset); - BOOST_CHECK_EQUAL (dash_array[0], get_array[0]); - BOOST_CHECK_EQUAL (dash_array[1], get_array[1]); - BOOST_CHECK_EQUAL (dash_array[2], get_array[2]); - BOOST_CHECK_EQUAL (dash_array[3], get_array[3]); - BOOST_CHECK_EQUAL (0.54, get_offset); - - std::vector dash_vect(4); - dash_vect[0] = 0.5; - dash_vect[1] = 0.25; - dash_vect[2] = 0.93; - dash_vect[3] = 1.31; - cr->set_dash(dash_vect, 0.4); - - cr->get_dash (get_array, get_offset); - BOOST_CHECK_EQUAL (dash_vect[0], get_array[0]); - BOOST_CHECK_EQUAL (dash_vect[1], get_array[1]); - BOOST_CHECK_EQUAL (dash_vect[2], get_array[2]); - BOOST_CHECK_EQUAL (dash_vect[3], get_array[3]); - BOOST_CHECK_EQUAL (0.4, get_offset); - - cr->unset_dash (); - cr->get_dash (get_array, get_offset); - BOOST_CHECK (get_array.empty ()); -} - -void -test_save_restore () -{ - CREATE_CONTEXT(cr); - cr->set_line_width (2.3); - cr->save (); - cr->set_line_width (4.0); - BOOST_CHECK_EQUAL (4.0, cr->get_line_width ()); - cr->restore (); - BOOST_CHECK_EQUAL (2.3, cr->get_line_width ()); -} - -void -test_operator () -{ - CREATE_CONTEXT(cr); - cr->set_operator (Cairo::OPERATOR_ATOP); - BOOST_CHECK_EQUAL (Cairo::OPERATOR_ATOP, cr->get_operator ()); - cr->set_operator (Cairo::OPERATOR_CLEAR); - BOOST_CHECK_EQUAL (Cairo::OPERATOR_CLEAR, cr->get_operator ()); -} - -void -test_source () -{ - CREATE_CONTEXT(cr); - Cairo::RefPtr solid_pattern = - Cairo::SolidPattern::create_rgb (1.0, 0.5, 0.25); - Cairo::RefPtr gradient_pattern = - Cairo::LinearGradient::create (0.0, 0.0, 1.0, 1.0); - - cr->set_source (solid_pattern); - { - Cairo::RefPtr retrieved_solid = - Cairo::RefPtr::cast_dynamic(cr->get_source ()); - BOOST_REQUIRE (retrieved_solid); - double r, g, b, a; - retrieved_solid->get_rgba (r, g, b, a); - BOOST_CHECK_EQUAL (1.0, r); - BOOST_CHECK_EQUAL (0.5, g); - BOOST_CHECK_EQUAL (0.25, b); - - // now try for const objects.. - Cairo::RefPtr cr2 = cr; - Cairo::RefPtr retrieved_solid2 = - Cairo::RefPtr::cast_dynamic(cr2->get_source ()); - BOOST_REQUIRE (retrieved_solid2); - } - - cr->set_source (gradient_pattern); - { - Cairo::RefPtr retrieved_linear = - Cairo::RefPtr::cast_dynamic(cr->get_source ()); - BOOST_REQUIRE (retrieved_linear); - double x0, x1, y0, y1; - retrieved_linear->get_linear_points (x0, y0, x1, y1); - BOOST_CHECK_EQUAL (0.0, x0); - BOOST_CHECK_EQUAL (0.0, y0); - BOOST_CHECK_EQUAL (1.0, x1); - BOOST_CHECK_EQUAL (1.0, y1); - } - - cr->set_source_rgb (1.0, 0.5, 0.25); - { - Cairo::RefPtr solid = - Cairo::RefPtr::cast_dynamic(cr->get_source ()); - BOOST_REQUIRE (solid); - double rx, gx, bx, ax; - solid->get_rgba (rx, gx, bx, ax); - BOOST_CHECK_EQUAL (1.0, rx); - BOOST_CHECK_EQUAL (0.5, gx); - BOOST_CHECK_EQUAL (0.25, bx); - } - cr->set_source_rgba (0.1, 0.3, 0.5, 0.7); - { - Cairo::RefPtr solid = - Cairo::RefPtr::cast_dynamic(cr->get_source ()); - BOOST_REQUIRE (solid); - double rx, gx, bx, ax; - solid->get_rgba (rx, gx, bx, ax); - BOOST_CHECK_EQUAL (0.1, rx); - BOOST_CHECK_EQUAL (0.3, gx); - BOOST_CHECK_EQUAL (0.5, bx); - BOOST_CHECK_EQUAL (0.7, ax); - } -} - -void -test_tolerance () -{ - CREATE_CONTEXT(cr); - cr->set_tolerance (3.0); - BOOST_CHECK_EQUAL (3.0, cr->get_tolerance ()); -} - -void -test_antialias () -{ - CREATE_CONTEXT(cr); - cr->set_antialias (Cairo::ANTIALIAS_GRAY); - BOOST_CHECK_EQUAL (Cairo::ANTIALIAS_GRAY, cr->get_antialias ()); - - cr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); - BOOST_CHECK_EQUAL (Cairo::ANTIALIAS_SUBPIXEL, cr->get_antialias ()); -} - -void -test_fill_rule () -{ - CREATE_CONTEXT(cr); - cr->set_fill_rule (Cairo::FILL_RULE_EVEN_ODD); - BOOST_CHECK_EQUAL (Cairo::FILL_RULE_EVEN_ODD, cr->get_fill_rule ()); - cr->set_fill_rule (Cairo::FILL_RULE_WINDING); - BOOST_CHECK_EQUAL (Cairo::FILL_RULE_WINDING, cr->get_fill_rule ()); -} - -void -test_line_width () -{ - CREATE_CONTEXT(cr); - cr->set_line_width (1.0); - BOOST_CHECK_EQUAL (1.0, cr->get_line_width ()); - cr->set_line_width (4.0); - BOOST_CHECK_EQUAL (4.0, cr->get_line_width ()); -} - -void -test_line_cap () -{ - CREATE_CONTEXT(cr); - cr->set_line_cap (Cairo::LINE_CAP_BUTT); - BOOST_CHECK_EQUAL (Cairo::LINE_CAP_BUTT, cr->get_line_cap ()); - cr->set_line_cap (Cairo::LINE_CAP_ROUND); - BOOST_CHECK_EQUAL (Cairo::LINE_CAP_ROUND, cr->get_line_cap ()); -} - -void -test_line_join () -{ - CREATE_CONTEXT(cr); - cr->set_line_join (Cairo::LINE_JOIN_BEVEL); - BOOST_CHECK_EQUAL (Cairo::LINE_JOIN_BEVEL, cr->get_line_join ()); - cr->set_line_join (Cairo::LINE_JOIN_MITER); - BOOST_CHECK_EQUAL (Cairo::LINE_JOIN_MITER, cr->get_line_join ()); -} - -void -test_miter_limit () -{ - CREATE_CONTEXT (cr); - cr->set_miter_limit (1.3); - BOOST_CHECK_EQUAL (1.3, cr->get_miter_limit ()); - cr->set_miter_limit (4.12); - BOOST_CHECK_EQUAL (4.12, cr->get_miter_limit ()); -} - -void -test_matrix () -{ - // just excercise the functionality - CREATE_CONTEXT (cr); - Cairo::Matrix matrix; - cairo_matrix_init (&matrix, 1.0, 0.1, 0.1, 1.0, 1.5, 1.5); - cr->transform(matrix); - cairo_matrix_init (&matrix, 1.0, -0.1, -0.1, 1.0, 1.5, 1.5); - cr->set_matrix(matrix); - cr->set_identity_matrix (); - cr->get_matrix (matrix); -} - -void -test_user_device () -{ - // scale / transform a context, and then verify that user-to-device and - // device-to-user things work. - CREATE_CONTEXT (cr); - cr->scale (2.3, 2.3); - double x = 1.8, y = 1.8; - cr->user_to_device (x, y); - // x = (0.0 + x) * 2.3 => 1.8 * 2.3 = 5.29 - BOOST_CHECK_EQUAL (4.14, x); - BOOST_CHECK_EQUAL (4.14, y); - cr->device_to_user (x, y); - BOOST_CHECK_EQUAL (1.8, x); - BOOST_CHECK_EQUAL (1.8, y); - cr->translate (0.5, 0.5); - cr->user_to_device (x, y); - // x = (0.5 + x) * 2.3 => 2.3 * 2.3 = 5.29 - BOOST_CHECK_CLOSE (5.29, x, FLT_EPSILON); - BOOST_CHECK_CLOSE (5.29, y, FLT_EPSILON); -} - -void -test_draw () -{ - CREATE_CONTEXT (cr); - // just call a bunch of drawing functions to excercise them a bit. There's no - // rhyme or reason to this, don't expect it to draw anything interesting. - cr->begin_new_path (); - cr->move_to (1.0, 1.0); - cr->line_to (2.0, 2.0); - cr->curve_to (0.5, 0.5, 0.5, 0.5, 1.0, 1.0); - cr->arc (1.5, 0.5, 0.5, 0, 2 * M_PI); - cr->stroke (); - cr->arc_negative (1.5, 0.5, 0.5, 0, 2 * M_PI); - cr->rel_move_to (0.1, 0.1); - cr->rel_line_to (0.5, -0.5); - cr->rel_curve_to (0.5, 0.5, 0.5, 0.5, 1.0, 1.0); - cr->rectangle (0.0, 0.0, 1.0, 1.0); - cr->close_path (); - cr->paint (); -} - -void -test_clip () -{ - CREATE_CONTEXT (cr); - cr->rectangle (0.0, 0.0, 1.0, 1.0); - cr->clip (); - double x1, y1, x2, y2; - cr->get_clip_extents (x1, y1, x2, y2); - BOOST_CHECK (x1 == 0.0); - BOOST_CHECK (y1 == 0.0); - BOOST_CHECK (x2 == 1.0); - BOOST_CHECK (y2 == 1.0); -} - -void -test_current_point () -{ - CREATE_CONTEXT (cr); - cr->move_to (2.0, 3.0); - double x, y; - cr->get_current_point (x, y); - BOOST_CHECK (x == 2.0); - BOOST_CHECK (y == 3.0); -} - -void -test_target () -{ - Cairo::RefPtr surf = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 10, 10); \ - Cairo::RefPtr cr = Cairo::Context::create(surf); - - Cairo::RefPtr target_surface = - Cairo::RefPtr::cast_dynamic(cr->get_target ()); - Cairo::RefPtr bad_surface = - Cairo::RefPtr::cast_dynamic(cr->get_target ()); - BOOST_CHECK (target_surface); - BOOST_CHECK (!bad_surface); - - // now check for const objects... - Cairo::RefPtr cr2 = Cairo::Context::create(surf); - - Cairo::RefPtr target_surface2 = - Cairo::RefPtr::cast_dynamic(cr2->get_target ()); - Cairo::RefPtr bad_surface2 = - Cairo::RefPtr::cast_dynamic(cr2->get_target ()); - BOOST_CHECK (target_surface2); - BOOST_CHECK (!bad_surface2); - -} - -test_suite* -init_unit_test_suite(int argc, char* argv[]) -{ - // compile even with -Werror - if (argc && argv) {} - - test_suite* test= BOOST_TEST_SUITE( "Cairo::Context Tests" ); - - test->add (BOOST_TEST_CASE (&test_dashes)); - test->add (BOOST_TEST_CASE (&test_save_restore)); - test->add (BOOST_TEST_CASE (&test_operator)); - test->add (BOOST_TEST_CASE (&test_source)); - test->add (BOOST_TEST_CASE (&test_tolerance)); - test->add (BOOST_TEST_CASE (&test_antialias)); - test->add (BOOST_TEST_CASE (&test_fill_rule)); - test->add (BOOST_TEST_CASE (&test_line_width)); - test->add (BOOST_TEST_CASE (&test_line_cap)); - test->add (BOOST_TEST_CASE (&test_line_join)); - test->add (BOOST_TEST_CASE (&test_miter_limit)); - test->add (BOOST_TEST_CASE (&test_matrix)); - test->add (BOOST_TEST_CASE (&test_user_device)); - test->add (BOOST_TEST_CASE (&test_draw)); - test->add (BOOST_TEST_CASE (&test_clip)); - test->add (BOOST_TEST_CASE (&test_current_point)); - test->add (BOOST_TEST_CASE (&test_target)); - - return test; -} diff --git a/libs/clearlooks/SConscript b/libs/clearlooks/SConscript deleted file mode 100644 index 3b496fb3f1..0000000000 --- a/libs/clearlooks/SConscript +++ /dev/null @@ -1,43 +0,0 @@ -# -*- python -*- - -import os.path -import glob - -libclearlooks_files = [ - 'animation.c', - 'cairo-support.c', - 'clearlooks_draw.c', - 'clearlooks_draw_glossy.c', - 'clearlooks_draw_gummy.c', - 'clearlooks_draw_inverted.c', - 'clearlooks_rc_style.c', - 'clearlooks_style.c', - 'clearlooks_theme_main.c', - 'support.c', - 'widget-information.c' - ] - -Import ('env install_prefix') - -clearlooks = env.Copy() - -clearlooks.Replace(CCFLAGS = ' `pkg-config --cflags gtk+-2.0 cairo` ', - LINKFLAGS = ' `pkg-config --libs gtk+-2.0 cairo` ') - -if env['GTKOSX']: - clearlooks.Append (CCFLAGS = '-DGTKOSX') - -libclearlooks = clearlooks.SharedLibrary('clearlooks', libclearlooks_files) - -usable_libclearlooks = clearlooks.Install ('engines', libclearlooks) -Default (usable_libclearlooks) - -env.Alias('install', - env.Install(os.path.join(install_prefix,env['LIBDIR'], 'ardour3', 'engines'), - libclearlooks)) - -env.Alias('tarball', env.Distribute (env['DISTTREE'], - [ 'SConscript', 'bits.c'] + - libclearlooks_files + - glob.glob('*.h') - )) diff --git a/libs/clearlooks/animation.c b/libs/clearlooks/animation.c deleted file mode 100644 index 82af498949..0000000000 --- a/libs/clearlooks/animation.c +++ /dev/null @@ -1,337 +0,0 @@ -/* Clearlooks theme engine - * - * Copyright (C) 2006 Kulyk Nazar - * Copyright (C) 2006 Benjamin Berg - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -/* This code is responsible for the clearlooks animation support. The code - * works by forcing a redraw on the animated widget. - */ - -#include "animation.h" - -#ifdef HAVE_ANIMATION -#include - -struct _AnimationInfo { - GTimer *timer; - - gdouble start_modifier; - gdouble stop_time; - GtkWidget *widget; -}; -typedef struct _AnimationInfo AnimationInfo; - -struct _SignalInfo { - GtkWidget *widget; - gulong handler_id; -}; -typedef struct _SignalInfo SignalInfo; - -static GSList *connected_widgets = NULL; -static GHashTable *animated_widgets = NULL; -static int animation_timer_id = 0; - - -static gboolean animation_timeout_handler (gpointer data); - -/* This forces a redraw on a widget */ -static void -force_widget_redraw (GtkWidget *widget) -{ - if (GE_IS_PROGRESS_BAR (widget)) - gtk_widget_queue_resize (widget); - else - gtk_widget_queue_draw (widget); -} - -/* ensures that the timer is running */ -static void -start_timer () -{ - if (animation_timer_id == 0) - animation_timer_id = g_timeout_add (ANIMATION_DELAY, animation_timeout_handler, NULL); -} - -/* ensures that the timer is stopped */ -static void -stop_timer () -{ - if (animation_timer_id != 0) - { - g_source_remove(animation_timer_id); - animation_timer_id = 0; - } -} - - -/* destroys an AnimationInfo structure including the GTimer */ -static void -animation_info_destroy (AnimationInfo *animation_info) -{ - g_timer_destroy (animation_info->timer); - g_free (animation_info); -} - - -/* This function does not unref the weak reference, because the object - * is beeing destroyed currently. */ -static void -on_animated_widget_destruction (gpointer data, GObject *object) -{ - /* steal the animation info from the hash table (destroying it would - * result in the weak reference to be unrefed, which does not work - * as the widget is already destroyed. */ - g_hash_table_steal (animated_widgets, object); - animation_info_destroy ((AnimationInfo*) data); -} - -/* This function also needs to unref the weak reference. */ -static void -destroy_animation_info_and_weak_unref (gpointer data) -{ - AnimationInfo *animation_info = data; - - /* force a last redraw. This is so that if the animation is removed, - * the widget is left in a sane state. */ - force_widget_redraw (animation_info->widget); - - g_object_weak_unref (G_OBJECT (animation_info->widget), on_animated_widget_destruction, data); - animation_info_destroy (animation_info); -} - -/* Find and return a pointer to the data linked to this widget, if it exists */ -static AnimationInfo* -lookup_animation_info (const GtkWidget *widget) -{ - if (animated_widgets) - return g_hash_table_lookup (animated_widgets, widget); - - return NULL; -} - -/* Create all the relevant information for the animation, and insert it into the hash table. */ -static void -add_animation (const GtkWidget *widget, gdouble stop_time) -{ - AnimationInfo *value; - - /* object already in the list, do not add it twice */ - if (lookup_animation_info (widget)) - return; - - if (animated_widgets == NULL) - animated_widgets = g_hash_table_new_full (g_direct_hash, g_direct_equal, - NULL, destroy_animation_info_and_weak_unref); - - value = g_new(AnimationInfo, 1); - - value->widget = (GtkWidget*) widget; - - value->timer = g_timer_new (); - value->stop_time= stop_time; - value->start_modifier = 0.0; - - g_object_weak_ref (G_OBJECT (widget), on_animated_widget_destruction, value); - g_hash_table_insert (animated_widgets, (GtkWidget*) widget, value); - - start_timer (); -} - -/* update the animation information for each widget. This will also queue a redraw - * and stop the animation if it is done. */ -static gboolean -update_animation_info (gpointer key, gpointer value, gpointer user_data) -{ - AnimationInfo *animation_info = value; - GtkWidget *widget = key; - - g_assert ((widget != NULL) && (animation_info != NULL)); - - /* remove the widget from the hash table if it is not drawable */ - if (!GTK_WIDGET_DRAWABLE (widget)) - { - return TRUE; - } - - if (GE_IS_PROGRESS_BAR (widget)) - { - gfloat fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (widget)); - - /* stop animation for filled/not filled progress bars */ - if (fraction <= 0.0 || fraction >= 1.0) - return TRUE; - } - - force_widget_redraw (widget); - - /* stop at stop_time */ - if (animation_info->stop_time != 0 && - g_timer_elapsed (animation_info->timer, NULL) > animation_info->stop_time) - return TRUE; - - return FALSE; -} - -/* This gets called by the glib main loop every once in a while. */ -static gboolean -animation_timeout_handler (gpointer data) -{ - /*g_print("** TICK **\n");*/ - - /* enter threads as update_animation_info will use gtk/gdk. */ - gdk_threads_enter (); - g_hash_table_foreach_remove (animated_widgets, update_animation_info, NULL); - /* leave threads again */ - gdk_threads_leave (); - - if(g_hash_table_size(animated_widgets)==0) - { - stop_timer (); - return FALSE; - } - - return TRUE; -} - -static void -on_checkbox_toggle (GtkWidget *widget, gpointer data) -{ - AnimationInfo *animation_info = lookup_animation_info (widget); - - if (animation_info != NULL) - { - gfloat elapsed = g_timer_elapsed (animation_info->timer, NULL); - - animation_info->start_modifier = elapsed - animation_info->start_modifier; - } - else - { - add_animation (widget, CHECK_ANIMATION_TIME); - } -} - -static void -on_connected_widget_destruction (gpointer data, GObject *widget) -{ - connected_widgets = g_slist_remove (connected_widgets, data); - g_free (data); -} - -static void -disconnect_all_signals () -{ - GSList * item = connected_widgets; - while (item != NULL) - { - SignalInfo *signal_info = (SignalInfo*) item->data; - - g_signal_handler_disconnect (signal_info->widget, signal_info->handler_id); - g_object_weak_unref (G_OBJECT (signal_info->widget), on_connected_widget_destruction, signal_info); - g_free (signal_info); - - item = g_slist_next (item); - } - - g_slist_free (connected_widgets); - connected_widgets = NULL; -} - -/* helper function for clearlooks_animation_connect_checkbox */ -static gint -find_signal_info (gconstpointer signal_info, gconstpointer widget) -{ - if (((SignalInfo*)signal_info)->widget == widget) - return 0; - else - return 1; -} - - -/* external interface */ - -/* adds a progress bar */ -void -clearlooks_animation_progressbar_add (GtkWidget *progressbar) -{ - gdouble fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progressbar)); - - if (fraction < 1.0 && fraction > 0.0) - add_animation ((GtkWidget*) progressbar, 0.0); -} - -/* hooks up the signals for check and radio buttons */ -void -clearlooks_animation_connect_checkbox (GtkWidget *widget) -{ - if (GE_IS_CHECK_BUTTON (widget)) - { - if (!g_slist_find_custom (connected_widgets, widget, find_signal_info)) - { - SignalInfo * signal_info = g_new (SignalInfo, 1); - - signal_info->widget = widget; - signal_info->handler_id = g_signal_connect ((GObject*)widget, "toggled", G_CALLBACK (on_checkbox_toggle), NULL); - - connected_widgets = g_slist_append (connected_widgets, signal_info); - g_object_weak_ref (G_OBJECT (widget), on_connected_widget_destruction, signal_info); - } - } -} - -/* returns TRUE if the widget is animated, and FALSE otherwise */ -gboolean -clearlooks_animation_is_animated (GtkWidget *widget) -{ - return lookup_animation_info (widget) != NULL ? TRUE : FALSE; -} - -/* returns the elapsed time for the animation */ -gdouble -clearlooks_animation_elapsed (gpointer data) -{ - AnimationInfo *animation_info = lookup_animation_info (data); - - if (animation_info) - return g_timer_elapsed (animation_info->timer, NULL) - - animation_info->start_modifier; - else - return 0.0; -} - -/* cleans up all resources of the animation system */ -void -clearlooks_animation_cleanup () -{ - disconnect_all_signals (); - - if (animated_widgets != NULL) - { - g_hash_table_destroy (animated_widgets); - animated_widgets = NULL; - } - - stop_timer (); -} -#else /* !HAVE_ANIMATION */ -static void clearlooks_animation_dummy_function_so_wall_shuts_up_when_animations_is_disabled() -{ - clearlooks_animation_dummy_function_so_wall_shuts_up_when_animations_is_disabled(); -} -#endif /* HAVE_ANIMATION */ diff --git a/libs/clearlooks/animation.h b/libs/clearlooks/animation.h deleted file mode 100644 index da70b6ce66..0000000000 --- a/libs/clearlooks/animation.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Clearlooks Engine - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#ifdef HAVE_ANIMATION -#include -#include - -#define CL_IS_PROGRESS_BAR(widget) GE_IS_PROGRESS_BAR(widget) && widget->allocation.x != -1 && widget->allocation.y != -1 -#define ANIMATION_DELAY 100 -#define CHECK_ANIMATION_TIME 0.5 - -GE_INTERNAL void clearlooks_animation_progressbar_add (GtkWidget *progressbar); -GE_INTERNAL void clearlooks_animation_connect_checkbox (GtkWidget *widget); -GE_INTERNAL gboolean clearlooks_animation_is_animated (GtkWidget *widget); -GE_INTERNAL gdouble clearlooks_animation_elapsed (gpointer data); -GE_INTERNAL void clearlooks_animation_cleanup (); -#endif /* HAVE_ANIMATION */ diff --git a/libs/clearlooks/bits.c b/libs/clearlooks/bits.c deleted file mode 100644 index 1e871bc5d3..0000000000 --- a/libs/clearlooks/bits.c +++ /dev/null @@ -1,121 +0,0 @@ -static unsigned char dot_intensity[] = { -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x98,0xb9,0xc6,0xb9,0x91,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0xb9,0xbd,0xac,0x9e,0x65,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0xc6,0xac,0x9e,0x96,0x5c,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0xb9,0x9e,0x96,0x62,0x55,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x91,0x65,0x5c,0x55,0x68,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e,0x6e, -}; -static unsigned char dot_alpha[] = { -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x66,0xc4,0xff,0xc4,0x66,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x66,0xdf,0xff,0xff,0xff,0xdf,0x66,0x00,0x00,0x00, -0x00,0x00,0x00,0xc4,0xff,0xff,0xff,0xff,0xff,0xc4,0x00,0x00,0x00, -0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, -0x00,0x00,0x00,0xc4,0xff,0xff,0xff,0xff,0xff,0xc4,0x00,0x00,0x00, -0x00,0x00,0x00,0x66,0xdf,0xff,0xff,0xff,0xdf,0x66,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x66,0xc4,0xff,0xc4,0x66,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; - -static unsigned char circle_alpha[] = { -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x23,0x62,0x92,0xb3,0xb2,0x95,0x2b,0x00,0x00,0x00, -0x00,0x00,0x3e,0xab,0xc9,0xeb,0xf9,0xf5,0xfd,0xff,0x57,0x00,0x00, -0x00,0x1f,0xb5,0xd8,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x00, -0x00,0x67,0xb9,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9c,0x00, -0x00,0x9a,0xe2,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe5,0x00, -0x00,0xba,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xc0,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe5,0x00, -0x00,0x9b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9c,0x00, -0x00,0x2b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x00, -0x00,0x00,0x57,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x00,0x00, -0x00,0x00,0x00,0x2b,0x9c,0xe5,0xff,0xe5,0x9c,0x2b,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; -static unsigned char outline_alpha[] = { -0x00,0x00,0x00,0x4a,0xac,0xe9,0xff,0xe9,0xac,0x4a,0x00,0x00,0x00, -0x00,0x00,0x98,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x98,0x00,0x00, -0x00,0x98,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x98,0x00, -0x4a,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a, -0xac,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xac, -0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe9, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe9, -0xac,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xac, -0x4a,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a, -0x00,0x98,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x98,0x00, -0x00,0x00,0x98,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x98,0x00,0x00, -0x00,0x00,0x00,0x4a,0xac,0xe9,0xff,0xe9,0xac,0x4a,0x00,0x00,0x00, -}; -static unsigned char inconsistent_alpha[] = { -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, -0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00, -0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; -static unsigned char check_base_alpha[] = { -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; -static unsigned char check_alpha[] = { -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 11, 137, 151,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00, 9, 183, 172, 7,0x00,0x00, -0x00,0x00, 12, 18,0x00,0x00, 3, 161, 233, 27,0x00,0x00,0x00, -0x00,0x00, 199, 239, 101,0x00, 85, 253, 108,0x00,0x00,0x00,0x00, -0x00,0x00, 83, 245, 250, 75, 206, 230, 8,0x00,0x00,0x00,0x00, -0x00,0x00,0x00, 104, 252, 243, 253, 124,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00, 2, 162, 255, 241, 28,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00, 18, 228, 163,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00, 78, 62,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; -static unsigned char check_inconsistent_alpha[] = { -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, -0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, -0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; diff --git a/libs/clearlooks/cairo-support.c b/libs/clearlooks/cairo-support.c deleted file mode 100644 index dbe6fd3d34..0000000000 --- a/libs/clearlooks/cairo-support.c +++ /dev/null @@ -1,815 +0,0 @@ -#include -#include "general-support.h" -#include "cairo-support.h" - -/*********************************************** - * ge_hsb_from_color - - * - * Get HSB values from RGB values. - * - * Modified from Smooth but originated in GTK+ - ***********************************************/ -void -ge_hsb_from_color (const CairoColor *color, - gdouble *hue, - gdouble *saturation, - gdouble *brightness) -{ - gdouble min, max, delta; - gdouble red, green, blue; - - red = color->r; - green = color->g; - blue = color->b; - - if (red > green) - { - max = MAX(red, blue); - min = MIN(green, blue); - } - else - { - max = MAX(green, blue); - min = MIN(red, blue); - } - - *brightness = (max + min) / 2; - - if (fabs(max - min) < 0.0001) - { - *hue = 0; - *saturation = 0; - } - else - { - if (*brightness <= 0.5) - *saturation = (max - min) / (max + min); - else - *saturation = (max - min) / (2 - max - min); - - delta = max -min; - - if (red == max) - *hue = (green - blue) / delta; - else if (green == max) - *hue = 2 + (blue - red) / delta; - else if (blue == max) - *hue = 4 + (red - green) / delta; - - *hue *= 60; - if (*hue < 0.0) - *hue += 360; - } -} - -/*********************************************** - * ge_color_from_hsb - - * - * Get RGB values from HSB values. - * - * Modified from Smooth but originated in GTK+ - ***********************************************/ -#define MODULA(number, divisor) (((gint)number % divisor) + (number - (gint)number)) -void -ge_color_from_hsb (gdouble hue, - gdouble saturation, - gdouble brightness, - CairoColor *color) -{ - gint i; - gdouble hue_shift[3], color_shift[3]; - gdouble m1, m2, m3; - - if (!color) return; - - if (brightness <= 0.5) - m2 = brightness * (1 + saturation); - else - m2 = brightness + saturation - brightness * saturation; - - m1 = 2 * brightness - m2; - - hue_shift[0] = hue + 120; - hue_shift[1] = hue; - hue_shift[2] = hue - 120; - - color_shift[0] = color_shift[1] = color_shift[2] = brightness; - - i = (saturation == 0)?3:0; - - for (; i < 3; i++) - { - m3 = hue_shift[i]; - - if (m3 > 360) - m3 = MODULA(m3, 360); - else if (m3 < 0) - m3 = 360 - MODULA(ABS(m3), 360); - - if (m3 < 60) - color_shift[i] = m1 + (m2 - m1) * m3 / 60; - else if (m3 < 180) - color_shift[i] = m2; - else if (m3 < 240) - color_shift[i] = m1 + (m2 - m1) * (240 - m3) / 60; - else - color_shift[i] = m1; - } - - color->r = color_shift[0]; - color->g = color_shift[1]; - color->b = color_shift[2]; - color->a = 1.0; -} - -void -ge_gdk_color_to_cairo (const GdkColor *c, CairoColor *cc) -{ - gdouble r, g, b; - - g_return_if_fail (c && cc); - - r = c->red / 65535.0; - g = c->green / 65535.0; - b = c->blue / 65535.0; - - cc->r = r; - cc->g = g; - cc->b = b; - cc->a = 1.0; -} - -void -ge_cairo_color_to_gtk (const CairoColor *cc, GdkColor *c) -{ - gdouble r, g, b; - - g_return_if_fail (c && cc); - - r = cc->r * 65535.0; - g = cc->g * 65535.0; - b = cc->b * 65535.0; - - c->red = r; - c->green = g; - c->blue = b; -} - -void -ge_gtk_style_to_cairo_color_cube (GtkStyle * style, CairoColorCube *cube) -{ - int i; - - g_return_if_fail (style && cube); - - for (i = 0; i < 5; i++) - { - ge_gdk_color_to_cairo (&style->bg[i], &cube->bg[i]); - ge_gdk_color_to_cairo (&style->fg[i], &cube->fg[i]); - - ge_gdk_color_to_cairo (&style->dark[i], &cube->dark[i]); - ge_gdk_color_to_cairo (&style->light[i], &cube->light[i]); - ge_gdk_color_to_cairo (&style->mid[i], &cube->mid[i]); - - ge_gdk_color_to_cairo (&style->base[i], &cube->base[i]); - ge_gdk_color_to_cairo (&style->text[i], &cube->text[i]); - ge_gdk_color_to_cairo (&style->text_aa[i], &cube->text_aa[i]); - } - - cube->black.r = cube->black.g = cube->black.b = 0; - cube->black.a = 1; - - cube->white.r = cube->white.g = cube->white.b = 1; - cube->white.a = 1; -} - -void -ge_shade_color(const CairoColor *base, gdouble shade_ratio, CairoColor *composite) -{ - gdouble hue = 0; - gdouble saturation = 0; - gdouble brightness = 0; - - g_return_if_fail (base && composite); - - ge_hsb_from_color (base, &hue, &saturation, &brightness); - - brightness = MIN(brightness*shade_ratio, 1.0); - brightness = MAX(brightness, 0.0); - - saturation = MIN(saturation*shade_ratio, 1.0); - saturation = MAX(saturation, 0.0); - - ge_color_from_hsb (hue, saturation, brightness, composite); - composite->a = base->a; -} - -void -ge_saturate_color (const CairoColor *base, gdouble saturate_level, CairoColor *composite) -{ - gdouble hue = 0; - gdouble saturation = 0; - gdouble brightness = 0; - - g_return_if_fail (base && composite); - - ge_hsb_from_color (base, &hue, &saturation, &brightness); - - saturation = MIN(saturation*saturate_level, 1.0); - saturation = MAX(saturation, 0.0); - - ge_color_from_hsb (hue, saturation, brightness, composite); - composite->a = base->a; -} - -void -ge_mix_color (const CairoColor *color1, const CairoColor *color2, - gdouble mix_factor, CairoColor *composite) -{ - g_return_if_fail (color1 && color2 && composite); - - composite->r = color1->r * (1-mix_factor) + color2->r * mix_factor; - composite->g = color1->g * (1-mix_factor) + color2->g * mix_factor; - composite->b = color1->b * (1-mix_factor) + color2->b * mix_factor; - composite->a = 1.0; -} - -cairo_t * -ge_gdk_drawable_to_cairo (GdkDrawable *window, GdkRectangle *area) -{ - cairo_t *cr; - - g_return_val_if_fail (window != NULL, NULL); - - cr = (cairo_t*) gdk_cairo_create (window); - cairo_set_line_width (cr, 1.0); - cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); - cairo_set_line_join (cr, CAIRO_LINE_JOIN_MITER); - - if (area) - { - cairo_rectangle (cr, area->x, area->y, area->width, area->height); - cairo_clip_preserve (cr); - cairo_new_path (cr); - } - - return cr; -} - -void -ge_cairo_set_color (cairo_t *cr, const CairoColor *color) -{ - g_return_if_fail (cr && color); - - cairo_set_source_rgba (cr, color->r, color->g, color->b, color->a); -} - -void -ge_cairo_set_gdk_color_with_alpha (cairo_t *cr, const GdkColor *color, gdouble alpha) -{ - g_return_if_fail (cr && color); - - cairo_set_source_rgba (cr, color->red / 65535.0, - color->green / 65535.0, - color->blue / 65535.0, - alpha); -} - -void -ge_cairo_pattern_add_color_stop_color (cairo_pattern_t *pattern, - gfloat offset, - const CairoColor *color) -{ - g_return_if_fail (pattern && color); - - cairo_pattern_add_color_stop_rgba (pattern, offset, color->r, color->g, color->b, color->a); -} - -void -ge_cairo_pattern_add_color_stop_shade(cairo_pattern_t *pattern, - gdouble offset, - const CairoColor *color, - gdouble shade) -{ - CairoColor shaded; - - g_return_if_fail (pattern && color && (shade >= 0) && (shade <= 3)); - - shaded = *color; - - if (shade != 1) - { - ge_shade_color(color, shade, &shaded); - } - - ge_cairo_pattern_add_color_stop_color(pattern, offset, &shaded); -} - -/* This function will draw a rounded corner at position x,y. If the radius - * is very small (or negative) it will instead just do a line_to. - * ge_cairo_rounded_corner assumes clockwise drawing. */ -void -ge_cairo_rounded_corner (cairo_t *cr, - double x, - double y, - double radius, - CairoCorners corner) -{ - if (radius < 0.0001) - { - cairo_line_to (cr, x, y); - } - else - { - switch (corner) { - case CR_CORNER_NONE: - cairo_line_to (cr, x, y); - break; - case CR_CORNER_TOPLEFT: - cairo_arc (cr, x + radius, y + radius, radius, G_PI, G_PI * 3/2); - break; - case CR_CORNER_TOPRIGHT: - cairo_arc (cr, x - radius, y + radius, radius, G_PI * 3/2, G_PI * 2); - break; - case CR_CORNER_BOTTOMRIGHT: - cairo_arc (cr, x - radius, y - radius, radius, 0, G_PI * 1/2); - break; - case CR_CORNER_BOTTOMLEFT: - cairo_arc (cr, x + radius, y - radius, radius, G_PI * 1/2, G_PI); - break; - - default: - /* A bitfield and not a sane value ... */ - g_assert_not_reached (); - cairo_line_to (cr, x, y); - return; - } - } -} - -void -ge_cairo_rounded_rectangle (cairo_t *cr, - double x, double y, double w, double h, - double radius, CairoCorners corners) -{ - g_return_if_fail (cr != NULL); - - if (radius < 0.0001 || corners == CR_CORNER_NONE) - { - cairo_rectangle (cr, x, y, w, h); - return; - } -#ifdef DEVELOPMENT - if ((corners == CR_CORNER_ALL) && (radius > w / 2.0 || radius > h / 2.0)) - g_warning ("Radius is too large for width/height in ge_rounded_rectangle.\n"); - else if (radius > w || radius > h) /* This isn't perfect. Assumes that only one corner is set. */ - g_warning ("Radius is too large for width/height in ge_rounded_rectangle.\n"); -#endif - - if (corners & CR_CORNER_TOPLEFT) - cairo_move_to (cr, x+radius, y); - else - cairo_move_to (cr, x, y); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x+w-radius, y+radius, radius, G_PI * 1.5, G_PI * 2); - else - cairo_line_to (cr, x+w, y); - - if (corners & CR_CORNER_BOTTOMRIGHT) - cairo_arc (cr, x+w-radius, y+h-radius, radius, 0, G_PI * 0.5); - else - cairo_line_to (cr, x+w, y+h); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x+radius, y+h-radius, radius, G_PI * 0.5, G_PI); - else - cairo_line_to (cr, x, y+h); - - if (corners & CR_CORNER_TOPLEFT) - cairo_arc (cr, x+radius, y+radius, radius, G_PI, G_PI * 1.5); - else - cairo_line_to (cr, x, y); -} - - -/* ge_cairo_stroke_rectangle. - * - * A simple function to stroke the rectangle { x, y, w, h}. - * (This function only exists because of a cairo performance bug that - * has been fixed and it may be a good idea to get rid of it again.) - */ -void -ge_cairo_stroke_rectangle (cairo_t *cr, double x, double y, double w, double h) -{ - cairo_rectangle (cr, x, y, w, h); - cairo_stroke (cr); -} - -/*********************************************** - * ge_cairo_simple_border - - * - * A simple routine to draw thin squared - * borders with a topleft and bottomright color. - * - * It originated in Smooth-Engine. - ***********************************************/ -void -ge_cairo_simple_border (cairo_t *cr, - const CairoColor * tl, const CairoColor * br, - gint x, gint y, gint width, gint height, - gboolean topleft_overlap) -{ - gboolean solid_color; - - g_return_if_fail (cr != NULL); - g_return_if_fail (tl != NULL); - g_return_if_fail (br != NULL); - - - solid_color = (tl == br) || ((tl->r == br->r) && (tl->g == br->g) && (tl->b == br->b) && (tl->a == br->a)); - - topleft_overlap &= !solid_color; - - cairo_save(cr); - - cairo_set_line_width (cr, 1); - - if (topleft_overlap) - { - ge_cairo_set_color(cr, br); - - cairo_move_to(cr, x + 0.5, y + height - 0.5); - cairo_line_to(cr, x + width - 0.5, y + height - 0.5); - cairo_line_to(cr, x + width - 0.5, y + 0.5); - - cairo_stroke (cr); - } - - ge_cairo_set_color(cr, tl); - - cairo_move_to(cr, x + 0.5, y + height - 0.5); - cairo_line_to(cr, x + 0.5, y + 0.5); - cairo_line_to(cr, x + width - 0.5, y + 0.5); - - if (!topleft_overlap) - { - if (!solid_color) - { - cairo_stroke(cr); - ge_cairo_set_color(cr, br); - } - - cairo_move_to(cr, x + 0.5, y + height - 0.5); - cairo_line_to(cr, x + width - 0.5, y + height - 0.5); - cairo_line_to(cr, x + width - 0.5, y + 0.5); - } - - cairo_stroke(cr); - - cairo_restore(cr); -} - -void ge_cairo_polygon (cairo_t *cr, - const CairoColor *color, - GdkPoint *points, - gint npoints) -{ - int i = 0; - - cairo_save(cr); - - ge_cairo_set_color(cr, color); - cairo_move_to(cr, points[0].x, points[0].y); - - for (i = 1; i < npoints; i++) - { - if (!((points[i].x == points[i + 1].x) && - (points[i].y == points[i + 1].y))) - { - cairo_line_to(cr, points[i].x, points[i].y); - } - } - - if ((points[npoints-1].x != points[0].y) || - (points[npoints-1].y != points[0].y)) - { - cairo_line_to(cr, points[0].x, points[0].y); - } - - cairo_fill(cr); - - cairo_restore(cr); -} - -void ge_cairo_line (cairo_t *cr, - const CairoColor *color, - gint x1, - gint y1, - gint x2, - gint y2) -{ - cairo_save(cr); - - ge_cairo_set_color(cr, color); - cairo_set_line_width (cr, 1); - - cairo_move_to(cr, x1 + 0.5, y1 + 0.5); - cairo_line_to(cr, x2 + 0.5, y2 + 0.5); - - cairo_stroke(cr); - - cairo_restore(cr); -} - -void -ge_cairo_mirror (cairo_t *cr, - CairoMirror mirror, - gint *x, - gint *y, - gint *width, - gint *height) -{ - cairo_matrix_t matrix; - - cairo_matrix_init_identity (&matrix); - - cairo_translate (cr, *x, *y); - *x = 0; - *y = 0; - - if (mirror & CR_MIRROR_HORIZONTAL) - { - cairo_matrix_scale (&matrix, -1, 1); - *x = -*width; - } - if (mirror & CR_MIRROR_VERTICAL) - { - cairo_matrix_scale (&matrix, 1, -1); - *y = -*height; - } - - cairo_transform (cr, &matrix); -} - -void -ge_cairo_exchange_axis (cairo_t *cr, - gint *x, - gint *y, - gint *width, - gint *height) -{ - gint tmp; - cairo_matrix_t matrix; - - cairo_translate (cr, *x, *y); - cairo_matrix_init (&matrix, 0, 1, 1, 0, 0, 0); - - cairo_transform (cr, &matrix); - - /* swap width/height */ - tmp = *width; - *x = 0; - *y = 0; - *width = *height; - *height = tmp; -} - - -/*********************************************** - * ge_cairo_pattern_fill - - * - * Fill an area with some pattern - * Scaling or tiling if needed - ***********************************************/ -void -ge_cairo_pattern_fill(cairo_t *canvas, - CairoPattern *pattern, - gint x, - gint y, - gint width, - gint height) -{ - cairo_matrix_t original_matrix, current_matrix; - - if (pattern->operator == CAIRO_OPERATOR_DEST) - { - return; - } - - cairo_pattern_get_matrix(pattern->handle, &original_matrix); - current_matrix = original_matrix; - - if (pattern->scale != GE_DIRECTION_NONE) - { - gdouble scale_x = 1.0; - gdouble scale_y = 1.0; - - if ((pattern->scale == GE_DIRECTION_VERTICAL) || (pattern->scale == GE_DIRECTION_BOTH)) - { - scale_x = 1.0/width; - } - - if ((pattern->scale == GE_DIRECTION_HORIZONTAL) || (pattern->scale == GE_DIRECTION_BOTH)) - { - scale_y = 1.0/height; - } - - cairo_matrix_scale(¤t_matrix, scale_x, scale_y); - } - - if (pattern->translate != GE_DIRECTION_NONE) - { - gdouble translate_x = 0; - gdouble translate_y = 0; - - if ((pattern->translate == GE_DIRECTION_VERTICAL) || (pattern->translate == GE_DIRECTION_BOTH)) - { - translate_x = 0.0-x; - } - - if ((pattern->translate == GE_DIRECTION_HORIZONTAL) || (pattern->translate == GE_DIRECTION_BOTH)) - { - translate_y = 0.0-y; - } - - cairo_matrix_translate(¤t_matrix, translate_x, translate_y); - } - - cairo_pattern_set_matrix(pattern->handle, ¤t_matrix); - - cairo_save(canvas); - - cairo_set_source(canvas, pattern->handle); - cairo_set_operator(canvas, pattern->operator); - cairo_rectangle(canvas, x, y, width, height); - - cairo_fill (canvas); - - cairo_restore(canvas); - - cairo_pattern_set_matrix(pattern->handle, &original_matrix); -} - -/*********************************************** - * ge_cairo_color_pattern - - * - * Create A Solid Color Pattern - ***********************************************/ -CairoPattern* -ge_cairo_color_pattern(CairoColor *base) -{ - CairoPattern * result = g_new0(CairoPattern, 1); - - #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2))) - result->type = CAIRO_PATTERN_TYPE_SOLID; - #endif - - result->scale = GE_DIRECTION_NONE; - result->translate = GE_DIRECTION_NONE; - - result->handle = cairo_pattern_create_rgba(base->r, - base->g, - base->b, - base->a); - - result->operator = CAIRO_OPERATOR_SOURCE; - - return result; -} - -/*********************************************** - * ge_cairo_pixbuf_pattern - - * - * Create A Tiled Pixbuf Pattern - ***********************************************/ -CairoPattern* -ge_cairo_pixbuf_pattern(GdkPixbuf *pixbuf) -{ - CairoPattern * result = g_new0(CairoPattern, 1); - - cairo_t *canvas; - cairo_surface_t * surface; - gint width, height; - - #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2))) - result->type = CAIRO_PATTERN_TYPE_SURFACE; - #endif - - result->scale = GE_DIRECTION_NONE; - result->translate = GE_DIRECTION_BOTH; - - width = gdk_pixbuf_get_width(pixbuf); - height = gdk_pixbuf_get_height(pixbuf); - - surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); - - canvas = cairo_create(surface); - - gdk_cairo_set_source_pixbuf (canvas, pixbuf, 0, 0); - cairo_rectangle (canvas, 0, 0, width, height); - cairo_fill (canvas); - cairo_destroy(canvas); - - result->handle = cairo_pattern_create_for_surface (surface); - cairo_surface_destroy(surface); - - cairo_pattern_set_extend (result->handle, CAIRO_EXTEND_REPEAT); - - result->operator = CAIRO_OPERATOR_SOURCE; - - return result; -} - -/*********************************************** - * ge_cairo_pixmap_pattern - - * - * Create A Tiled Pixmap Pattern - ***********************************************/ -CairoPattern* -ge_cairo_pixmap_pattern(GdkPixmap *pixmap) -{ - CairoPattern * result = NULL; - - GdkPixbuf * pixbuf; - gint width, height; - - gdk_drawable_get_size (GDK_DRAWABLE (pixmap), &width, &height); - - pixbuf = gdk_pixbuf_get_from_drawable(NULL, GDK_DRAWABLE (pixmap), - gdk_drawable_get_colormap(GDK_DRAWABLE (pixmap)), - 0, 0, 0, 0, width, height); - - result = ge_cairo_pixbuf_pattern(pixbuf); - - g_object_unref (pixbuf); - - return result; -} - -/*********************************************** - * ge_cairo_linear_shade_gradient_pattern - - * - * Create A Linear Shade Gradient Pattern - * Aka Smooth Shade Gradient, from/to gradient - * With End points defined as shades of the - * base color - ***********************************************/ -CairoPattern * -ge_cairo_linear_shade_gradient_pattern(CairoColor *base, - gdouble shade1, - gdouble shade2, - gboolean vertical) -{ - CairoPattern * result = g_new0(CairoPattern, 1); - - #if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2))) - result->type = CAIRO_PATTERN_TYPE_LINEAR; - #endif - - if (vertical) - { - result->scale = GE_DIRECTION_VERTICAL; - - result->handle = cairo_pattern_create_linear(0, 0, 1, 0); - } - else - { - result->scale = GE_DIRECTION_HORIZONTAL; - - result->handle = cairo_pattern_create_linear(0, 0, 0, 1); - } - - result->translate = GE_DIRECTION_BOTH; - result->operator = CAIRO_OPERATOR_SOURCE; - - ge_cairo_pattern_add_color_stop_shade(result->handle, 0, base, shade1); - ge_cairo_pattern_add_color_stop_shade(result->handle, 1, base, shade2); - - return result; -} - -void -ge_cairo_pattern_destroy(CairoPattern *pattern) -{ - if (pattern) - { - if (pattern->handle) - cairo_pattern_destroy(pattern->handle); - - g_free(pattern); - } -} - -/* The following function will be called by GTK+ when the module - * is loaded and checks to see if we are compatible with the - * version of GTK+ that loads us. - */ -GE_EXPORT const gchar* g_module_check_init (GModule *module); -const gchar* -g_module_check_init (GModule *module) -{ - return gtk_check_version (GTK_MAJOR_VERSION, - GTK_MINOR_VERSION, - GTK_MICRO_VERSION - GTK_INTERFACE_AGE); -} diff --git a/libs/clearlooks/cairo-support.h b/libs/clearlooks/cairo-support.h deleted file mode 100644 index 12163b0469..0000000000 --- a/libs/clearlooks/cairo-support.h +++ /dev/null @@ -1,118 +0,0 @@ -/* Helpful functions when dealing with cairo in gtk engines */ - -#include -#include - -typedef struct -{ - gdouble r; - gdouble g; - gdouble b; - gdouble a; -} CairoColor; - -typedef struct -{ - CairoColor bg[5]; - CairoColor fg[5]; - - CairoColor dark[5]; - CairoColor light[5]; - CairoColor mid[5]; - - CairoColor base[5]; - CairoColor text[5]; - CairoColor text_aa[5]; - - CairoColor black; - CairoColor white; -} CairoColorCube; - -typedef enum -{ - CR_CORNER_NONE = 0, - CR_CORNER_TOPLEFT = 1, - CR_CORNER_TOPRIGHT = 2, - CR_CORNER_BOTTOMLEFT = 4, - CR_CORNER_BOTTOMRIGHT = 8, - CR_CORNER_ALL = 15 -} CairoCorners; - -typedef enum -{ - CR_MIRROR_NONE = 0, - CR_MIRROR_HORIZONTAL = 1 << 0, - CR_MIRROR_VERTICAL = 1 << 1 -} CairoMirror; - -/*****************************/ -/* Pattern Fills */ -/*****************************/ -typedef enum { - GE_DIRECTION_VERTICAL, - GE_DIRECTION_HORIZONTAL, - GE_DIRECTION_BOTH, - GE_DIRECTION_NONE -} GeDirection; - -#if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2))) -typedef enum _cairo_pattern_type { - CAIRO_PATTERN_TYPE_SOLID, - CAIRO_PATTERN_TYPE_SURFACE, - CAIRO_PATTERN_TYPE_LINEAR, - CAIRO_PATTERN_TYPE_RADIAL -} cairo_pattern_type_t; - -# define CAIRO_PATTERN_TYPE(pattern) pattern->type; -#else -# define CAIRO_PATTERN_TYPE(pattern) cairo_pattern_get_type (pattern->handle); -#endif - -typedef struct -{ -#if ((CAIRO_VERSION_MAJOR < 1) || ((CAIRO_VERSION_MAJOR == 1) && (CAIRO_VERSION_MINOR < 2))) - cairo_pattern_type_t type; -#endif - GeDirection scale; - GeDirection translate; - - cairo_pattern_t *handle; - cairo_operator_t operator; -} CairoPattern; - -GE_INTERNAL void ge_hsb_from_color (const CairoColor *color, gdouble *hue, gdouble *saturation, gdouble *brightness); -GE_INTERNAL void ge_color_from_hsb (gdouble hue, gdouble saturation, gdouble brightness, CairoColor *color); - -GE_INTERNAL void ge_gdk_color_to_cairo (const GdkColor * gc, CairoColor * cc); -GE_INTERNAL void ge_cairo_color_to_gtk (const CairoColor *cc, GdkColor *c); -GE_INTERNAL void ge_gtk_style_to_cairo_color_cube (GtkStyle * style, CairoColorCube *cube); - -GE_INTERNAL void ge_shade_color(const CairoColor *base, gdouble shade_ratio, CairoColor *composite); -GE_INTERNAL void ge_saturate_color (const CairoColor * base, gdouble saturate_level, CairoColor *composite); -GE_INTERNAL void ge_mix_color (const CairoColor *color1, const CairoColor *color2, gdouble mix_factor, CairoColor *composite); - -GE_INTERNAL cairo_t * ge_gdk_drawable_to_cairo (GdkDrawable *window, GdkRectangle *area); -GE_INTERNAL void ge_cairo_set_color (cairo_t *cr, const CairoColor *color); -GE_INTERNAL void ge_cairo_set_gdk_color_with_alpha (cairo_t *cr, const GdkColor *color, gdouble alpha); -GE_INTERNAL void ge_cairo_pattern_add_color_stop_color (cairo_pattern_t *pattern, gfloat offset, const CairoColor *color); -GE_INTERNAL void ge_cairo_pattern_add_color_stop_shade (cairo_pattern_t *pattern, gdouble offset, const CairoColor *color, gdouble shade); - -GE_INTERNAL void ge_cairo_rounded_corner (cairo_t *cr, double x, double y, double radius, CairoCorners corner); -GE_INTERNAL void ge_cairo_rounded_rectangle (cairo_t *cr, double x, double y, double w, double h, double radius, CairoCorners corners); - -GE_INTERNAL void ge_cairo_stroke_rectangle (cairo_t *cr, double x, double y, double w, double h); -GE_INTERNAL void ge_cairo_simple_border (cairo_t *cr, const CairoColor * tl, const CairoColor * br, gint x, gint y, gint width, gint height, gboolean topleft_overlap); - -GE_INTERNAL void ge_cairo_line (cairo_t *cr, const CairoColor *color, gint x1, gint y1, gint x2, gint y2); -GE_INTERNAL void ge_cairo_polygon (cairo_t *cr, const CairoColor *color, GdkPoint *points, gint npoints); - -GE_INTERNAL void ge_cairo_mirror (cairo_t *cr, CairoMirror mirror, gint *x, gint *y, gint *width, gint *height); -GE_INTERNAL void ge_cairo_exchange_axis (cairo_t *cr, gint *x, gint *y, gint *width, gint *height); - -GE_INTERNAL void ge_cairo_pattern_fill(cairo_t *canvas, CairoPattern *pattern, gint x, gint y, gint width, gint height); - -GE_INTERNAL CairoPattern *ge_cairo_color_pattern(CairoColor *base); -GE_INTERNAL CairoPattern *ge_cairo_pixbuf_pattern(GdkPixbuf *pixbuf); -GE_INTERNAL CairoPattern *ge_cairo_pixmap_pattern(GdkPixmap *pixmap); -GE_INTERNAL CairoPattern *ge_cairo_linear_shade_gradient_pattern(CairoColor *base, gdouble shade1, gdouble shade2, gboolean vertical); -GE_INTERNAL void ge_cairo_pattern_destroy(CairoPattern *pattern); diff --git a/libs/clearlooks/clearlooks_draw.c b/libs/clearlooks/clearlooks_draw.c deleted file mode 100644 index 614317ea3b..0000000000 --- a/libs/clearlooks/clearlooks_draw.c +++ /dev/null @@ -1,2279 +0,0 @@ -/* Clearlooks theme engine - * Copyright (C) 2006 Richard Stellingwerff - * Copyright (C) 2006 Daniel Borgman - * Copyright (C) 2007 Benjamin Berg - * Copyright (C) 2007 Andrea Cimitan - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#include "clearlooks_draw.h" -#include "clearlooks_style.h" -#include "clearlooks_types.h" - -#include "support.h" -#include -#include - -#include - -typedef void (*menubar_draw_proto) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const MenuBarParameters *menubar, - int x, int y, int width, int height); - -static void -clearlooks_draw_inset (cairo_t *cr, - const CairoColor *bg_color, - double x, double y, double w, double h, - double radius, uint8 corners) -{ - CairoColor shadow; - CairoColor highlight; - - /* not really sure of shading ratios... we will think */ - ge_shade_color (bg_color, 0.94, &shadow); - ge_shade_color (bg_color, 1.06, &highlight); - - /* highlight */ - cairo_move_to (cr, x + w + (radius * -0.2928932188), y - (radius * -0.2928932188)); /* 0.2928932... 1-sqrt(2)/2 gives middle of curve */ - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x + w - radius, y + radius, radius, G_PI * 1.75, G_PI * 2); - else - cairo_line_to (cr, x + w, y); - - if (corners & CR_CORNER_BOTTOMRIGHT) - cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, G_PI * 0.5); - else - cairo_line_to (cr, x + w, y + h); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x + radius, y + h - radius, radius, G_PI * 0.5, G_PI * 0.75); - else - cairo_line_to (cr, x, y + h); - - ge_cairo_set_color (cr, &highlight); - cairo_stroke (cr); - - /* shadow */ - cairo_move_to (cr, x + (radius * 0.2928932188), y + h + (radius * -0.2928932188)); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.75, M_PI); - else - cairo_line_to (cr, x, y + h); - - if (corners & CR_CORNER_TOPLEFT) - cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5); - else - cairo_line_to (cr, x, y); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x + w - radius, y + radius, radius, M_PI * 1.5, M_PI * 1.75); - else - cairo_line_to (cr, x + w, y); - - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); -} - -static void -clearlooks_draw_shadow (cairo_t *cr, const ClearlooksColors *colors, gfloat radius, int width, int height) -{ - CairoColor shadow; - ge_shade_color (&colors->shade[6], 0.92, &shadow); - - cairo_set_line_width (cr, 1.0); - - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.1); - - cairo_move_to (cr, width, radius); - ge_cairo_rounded_corner (cr, width, height, radius, CR_CORNER_BOTTOMRIGHT); - cairo_line_to (cr, radius, height); - - cairo_stroke (cr); -} - -static void -clearlooks_draw_top_left_highlight (cairo_t *cr, const CairoColor *color, - const WidgetParameters *params, - int width, int height, gdouble radius) -{ - CairoColor hilight; - - double light_top = params->ythickness-1, - light_bottom = height - params->ythickness - 1, - light_left = params->xthickness-1, - light_right = width - params->xthickness - 1; - - ge_shade_color (color, 1.3, &hilight); - cairo_move_to (cr, light_left, light_bottom - (int)radius/2); - - ge_cairo_rounded_corner (cr, light_left, light_top, radius, params->corners & CR_CORNER_TOPLEFT); - - cairo_line_to (cr, light_right - (int)radius/2, light_top); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - cairo_stroke (cr); -} - -#ifdef DEVELOPMENT -#warning seems to be very slow in scrollbar_stepper -#endif - -static void -clearlooks_draw_highlight_and_shade (cairo_t *cr, const ClearlooksColors *colors, - const ShadowParameters *params, - int width, int height, gdouble radius) -{ - CairoColor hilight; - CairoColor shadow; - uint8 corners = params->corners; - double x = 1.0; - double y = 1.0; - - ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 1.06, &hilight); - ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 0.94, &shadow); - - width -= 3; - height -= 3; - - cairo_save (cr); - - /* Top/Left highlight */ - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_move_to (cr, x, y+height-radius); - else - cairo_move_to (cr, x, y+height); - - ge_cairo_rounded_corner (cr, x, y, radius, corners & CR_CORNER_TOPLEFT); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_line_to (cr, x+width-radius, y); - else - cairo_line_to (cr, x+width, y); - - if (params->shadow & CL_SHADOW_OUT) - ge_cairo_set_color (cr, &hilight); - else - ge_cairo_set_color (cr, &shadow); - - cairo_stroke (cr); - - /* Bottom/Right highlight -- this includes the corners */ - cairo_move_to (cr, x+width-radius, y); /* topright and by radius to the left */ - ge_cairo_rounded_corner (cr, x+width, y, radius, corners & CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, x+width, y+height, radius, corners & CR_CORNER_BOTTOMRIGHT); - ge_cairo_rounded_corner (cr, x, y+height, radius, corners & CR_CORNER_BOTTOMLEFT); - - if (params->shadow & CL_SHADOW_OUT) - ge_cairo_set_color (cr, &shadow); - else - ge_cairo_set_color (cr, &hilight); - - cairo_stroke (cr); - - cairo_restore (cr); -} - -static void -clearlooks_set_border_gradient (cairo_t *cr, const CairoColor *color, double hilight, int width, int height) -{ - cairo_pattern_t *pattern; - - CairoColor bottom_shade; - ge_shade_color (color, hilight, &bottom_shade); - - pattern = cairo_pattern_create_linear (0, 0, width, height); - cairo_pattern_add_color_stop_rgb (pattern, 0, color->r, color->g, color->b); - cairo_pattern_add_color_stop_rgb (pattern, 1, bottom_shade.r, bottom_shade.g, bottom_shade.b); - - cairo_set_source (cr, pattern); - cairo_pattern_destroy (pattern); -} - -static void -clearlooks_draw_gripdots (cairo_t *cr, const ClearlooksColors *colors, int x, int y, - int width, int height, int xr, int yr, - float contrast) -{ - const CairoColor *dark = &colors->shade[4]; - CairoColor hilight; - int i, j; - int xoff, yoff; - - ge_shade_color (dark, 1.5, &hilight); - - for ( i = 0; i < xr; i++ ) - { - for ( j = 0; j < yr; j++ ) - { - xoff = x -(xr * 3 / 2) + 3 * i; - yoff = y -(yr * 3 / 2) + 3 * j; - - cairo_rectangle (cr, width/2+0.5+xoff, height/2+0.5+yoff, 2, 2); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.8+contrast); - cairo_fill (cr); - cairo_rectangle (cr, width/2+0.5+xoff, height/2+0.5+yoff, 1, 1); - cairo_set_source_rgba (cr, dark->r, dark->g, dark->b, 0.8+contrast); - cairo_fill (cr); - } - } -} - -static void -clearlooks_draw_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - double xoffset = 0, yoffset = 0; - double radius = params->radius; - const CairoColor *fill = &colors->bg[params->state_type]; - const CairoColor *border_normal = &colors->shade[6]; - const CairoColor *border_disabled = &colors->shade[4]; - - CairoColor shadow; - ge_shade_color (border_normal, 0.925, &shadow); - - cairo_save (cr); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - if (params->xthickness == 3 || params->ythickness == 3) - { - if (params->xthickness == 3) - xoffset = 1; - if (params->ythickness == 3) - yoffset = 1; - } - - radius = MIN (radius, MIN ((width - 2.0 - xoffset * 2.0) / 2.0, (height - 2.0 - yoffset * 2) / 2.0)); - - if (params->xthickness == 3 || params->ythickness == 3) - { - cairo_translate (cr, 0.5, 0.5); - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, radius+1, params->corners); - cairo_translate (cr, -0.5, -0.5); - } - - ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1, - width-(xoffset*2)-2, - height-(yoffset*2)-2, - radius, params->corners); - - if (!params->active) - { - cairo_pattern_t *pattern; - gdouble shade_size = ((100.0/height)*8.0)/100.0; - CairoColor top_shade, bottom_shade, middle_shade; - - ge_shade_color (fill, 1.1, &top_shade); - ge_shade_color (fill, 0.98, &middle_shade); - ge_shade_color (fill, 0.93, &bottom_shade); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, top_shade.r, top_shade.g, top_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, shade_size, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0 - shade_size, middle_shade.r, middle_shade.g, middle_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, (height-(yoffset*2)-1)/height, bottom_shade.r, bottom_shade.g, bottom_shade.b); - cairo_pattern_add_color_stop_rgba (pattern, (height-(yoffset*2)-1)/height, bottom_shade.r, bottom_shade.g, bottom_shade.b, 0.7); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, bottom_shade.r, bottom_shade.g, bottom_shade.b, 0.7); - - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - cairo_pattern_t *pattern; - - ge_cairo_set_color (cr, fill); - cairo_fill_preserve (cr); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_pattern_add_color_stop_rgba (pattern, 0.4, shadow.r, shadow.g, shadow.b, 0.0); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.2); - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - pattern = cairo_pattern_create_linear (0, yoffset+1, 0, 3+yoffset); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, params->disabled ? 0.125 : 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - pattern = cairo_pattern_create_linear (xoffset+1, 0, 3+xoffset, 0); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, params->disabled ? 0.125 : 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - - - /* Drawing the border */ - if (!params->active && params->is_default) - { - const CairoColor *l = &colors->shade[4]; - const CairoColor *d = &colors->shade[4]; - ge_cairo_set_color (cr, l); - ge_cairo_stroke_rectangle (cr, 2.5, 2.5, width-5, height-5); - - ge_cairo_set_color (cr, d); - ge_cairo_stroke_rectangle (cr, 3.5, 3.5, width-7, height-7); - } - - ge_cairo_rounded_rectangle (cr, xoffset + 0.5, yoffset + 0.5, width-(xoffset*2)-1, height-(yoffset*2)-1, radius, params->corners); - - if (params->disabled) - ge_cairo_set_color (cr, border_disabled); - else - if (!params->active) - clearlooks_set_border_gradient (cr, border_normal, 1.32, 0, height); - else - ge_cairo_set_color (cr, border_normal); - - cairo_stroke (cr); - - /* Draw the "shadow" */ - if (!params->active) - { - cairo_translate (cr, 0.5, 0.5); - /* Draw right shadow */ - cairo_move_to (cr, width-params->xthickness, params->ythickness - 1); - cairo_line_to (cr, width-params->xthickness, height - params->ythickness - 1); - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.1); - cairo_stroke (cr); - - /* Draw topleft shadow */ - clearlooks_draw_top_left_highlight (cr, fill, params, width, height, radius); - } - cairo_restore (cr); -} - -static void -clearlooks_draw_entry (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *base = &colors->base[params->state_type]; - CairoColor border = colors->shade[params->disabled ? 4 : 6]; - double radius = MIN (params->radius, MIN ((width - 4.0) / 2.0, (height - 4.0) / 2.0)); - - if (params->focus) - border = colors->spot[2]; - - cairo_translate (cr, x+0.5, y+0.5); - cairo_set_line_width (cr, 1.0); - - /* Fill the background (shouldn't have to) */ - cairo_rectangle (cr, -0.5, -0.5, width, height); - ge_cairo_set_color (cr, ¶ms->parentbg); - cairo_fill (cr); - - /* Fill the entry's base color (why isn't is large enough by default?) */ - cairo_rectangle (cr, 1.5, 1.5, width-4, height-4); - ge_cairo_set_color (cr, base); - cairo_fill (cr); - - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, radius+1, params->corners); - - /* Draw the inner shadow */ - if (params->focus) - { - /* ge_cairo_rounded_rectangle (cr, 2, 2, width-5, height-5, RADIUS-1, params->corners); */ - ge_cairo_set_color (cr, &colors->spot[0]); - ge_cairo_stroke_rectangle (cr, 2, 2, width-5, height-5); - } - else - { - CairoColor shadow; - ge_shade_color (&border, 0.925, &shadow); - - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, params->disabled ? 0.05 : 0.1); - /* - cairo_move_to (cr, 2, height-3); - cairo_arc (cr, params->xthickness+RADIUS-1, params->ythickness+RADIUS-1, RADIUS, G_PI, 270*(G_PI/180)); - cairo_line_to (cr, width-3, 2);*/ - cairo_move_to (cr, 2, height-3); - cairo_line_to (cr, 2, 2); - cairo_line_to (cr, width-3, 2); - cairo_stroke (cr); - } - - ge_cairo_rounded_rectangle (cr, 1, 1, width-3, height-3, radius, params->corners); - if (params->focus || params->disabled) - ge_cairo_set_color (cr, &border); - else - clearlooks_set_border_gradient (cr, &border, 1.32, 0, height); - cairo_stroke (cr); -} - -static void -clearlooks_draw_spinbutton (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[!params->disabled ? 5 : 3]; - CairoColor hilight; - - params->style_functions->draw_button (cr, colors, params, x, y, width, height); - - ge_shade_color (border, 1.5, &hilight); - - cairo_translate (cr, x, y); - - cairo_move_to (cr, params->xthickness + 0.5, (height/2) + 0.5); - cairo_line_to (cr, width-params->xthickness - 0.5, (height/2) + 0.5); - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - cairo_move_to (cr, params->xthickness + 0.5, (height/2)+1.5); - cairo_line_to (cr, width-params->xthickness - 0.5, (height/2)+1.5); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); -} - -static void -clearlooks_draw_spinbutton_down (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - cairo_pattern_t *pattern; - double radius = MIN (params->radius, MIN ((width - 4.0) / 2.0, (height - 4.0) / 2.0)); - CairoColor shadow; - ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 0.8, &shadow); - - cairo_translate (cr, x+1, y+1); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-4, height-4, radius, params->corners); - - ge_cairo_set_color (cr, &colors->bg[params->state_type]); - - cairo_fill_preserve (cr); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shadow.r, shadow.g, shadow.b); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - - cairo_set_source (cr, pattern); - cairo_fill (cr); - - cairo_pattern_destroy (pattern); -} - -static void -clearlooks_scale_draw_gradient (cairo_t *cr, - const CairoColor *c1, - const CairoColor *c2, - const CairoColor *c3, - int x, int y, int width, int height, - boolean horizontal) -{ - cairo_pattern_t *pattern; - - pattern = cairo_pattern_create_linear (0, 0, horizontal ? 0 : width, horizontal ? height : 0); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, c1->r, c1->g, c1->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, c2->r, c2->g, c2->b); - - cairo_rectangle (cr, x+0.5, y+0.5, width-1, height-1); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, c3); - ge_cairo_stroke_rectangle (cr, x, y, width, height); -} - -#define TROUGH_SIZE 6 -static void -clearlooks_draw_scale_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - int trough_width, trough_height; - double translate_x, translate_y; - - if (slider->horizontal) - { - trough_width = width-3; - trough_height = TROUGH_SIZE-2; - - translate_x = x + 0.5; - translate_y = y + 0.5 + (height/2) - (TROUGH_SIZE/2); - } - else - { - trough_width = TROUGH_SIZE-2; - trough_height = height-3; - - translate_x = x + 0.5 + (width/2) - (TROUGH_SIZE/2); - translate_y = y + 0.5; - } - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, translate_x, translate_y); - - if (!slider->fill_level) - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, trough_width+2, trough_height+2, 0, 0); - - cairo_translate (cr, 1, 1); - - if (!slider->lower && ! slider->fill_level) - clearlooks_scale_draw_gradient (cr, &colors->shade[3], /* top */ - &colors->shade[2], /* bottom */ - &colors->shade[6], /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal); - else - clearlooks_scale_draw_gradient (cr, &colors->spot[1], /* top */ - &colors->spot[0], /* bottom */ - &colors->spot[2], /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal); -} - -static void -clearlooks_draw_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[params->disabled ? 4 : 6]; - const CairoColor *spot = &colors->spot[1]; - const CairoColor *fill = &colors->shade[2]; - double radius = MIN (params->radius, MIN ((width - 1.0) / 2.0, (height - 1.0) / 2.0)); - - cairo_pattern_t *pattern; - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - if (params->prelight) - border = &colors->spot[2]; - - /* fill the widget */ - cairo_rectangle (cr, 0.5, 0.5, width-2, height-2); - - /* Fake light */ - if (!params->disabled) - { - const CairoColor *top = &colors->shade[0]; - const CairoColor *bot = &colors->shade[2]; - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, top->r, top->g, top->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, bot->r, bot->g, bot->b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - ge_cairo_set_color (cr, fill); - cairo_rectangle (cr, 0.5, 0.5, width-2, height-2); - cairo_fill (cr); - } - - /* Set the clip */ - cairo_save (cr); - cairo_rectangle (cr, 0.5, 0.5, 6, height-2); - cairo_rectangle (cr, width-7.5, 0.5, 6 , height-2); - cairo_clip_preserve (cr); - - cairo_new_path (cr); - - /* Draw the handles */ - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, params->corners); - pattern = cairo_pattern_create_linear (0.5, 0.5, 0.5, 0.5+height); - - if (params->prelight) - { - CairoColor highlight; - ge_shade_color (spot, 1.5, &highlight); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, highlight.r, highlight.g, highlight.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, spot->r, spot->g, spot->b); - cairo_set_source (cr, pattern); - } - else - { - CairoColor hilight; - ge_shade_color (fill, 1.5, &hilight); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - } - - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); - - /* Draw the border */ - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - if (params->prelight || params->disabled) - ge_cairo_set_color (cr, border); - else - clearlooks_set_border_gradient (cr, border, 1.2, 0, height); - cairo_stroke (cr); - - /* Draw handle lines */ - if (width > 14) - { - cairo_move_to (cr, 6, 0.5); - cairo_line_to (cr, 6, height-1); - - cairo_move_to (cr, width-7, 0.5); - cairo_line_to (cr, width-7, height-1); - - cairo_set_line_width (cr, 1.0); - cairo_set_source_rgba (cr, border->r, - border->g, - border->b, - 0.3); - cairo_stroke (cr); - } -} - -static void -clearlooks_draw_slider_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - cairo_set_line_width (cr, 1.0); - - if (!slider->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - cairo_translate (cr, x+0.5, y+0.5); - - params->style_functions->draw_shadow (cr, colors, radius, width-1, height-1); - params->style_functions->draw_slider (cr, colors, params, 1, 1, width-2, height-2); - - if (width > 24) - params->style_functions->draw_gripdots (cr, colors, 0, 0, width-2, height-2, 3, 3, 0); -} - -static void -clearlooks_draw_progressbar_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[6]; - CairoColor shadow; - cairo_pattern_t *pattern; - double radius = MIN (params->radius, MIN ((height-2.0) / 2.0, (width-2.0) / 2.0)); - - cairo_save (cr); - - cairo_set_line_width (cr, 1.0); - - /* Fill with bg color */ - ge_cairo_set_color (cr, &colors->bg[params->state_type]); - - cairo_rectangle (cr, x, y, width, height); - cairo_fill (cr); - - /* Create trough box */ - ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners); - ge_cairo_set_color (cr, &colors->shade[3]); - cairo_fill (cr); - - /* Draw border */ - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, radius, params->corners); - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - /* clip the corners of the shadows */ - ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners); - cairo_clip (cr); - - ge_shade_color (border, 0.925, &shadow); - - /* Top shadow */ - cairo_rectangle (cr, x+1, y+1, width-2, 4); - pattern = cairo_pattern_create_linear (x, y, x, y+4); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Left shadow */ - cairo_rectangle (cr, x+1, y+1, 4, height-2); - pattern = cairo_pattern_create_linear (x, y, x+4, y); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); -} - -static void -clearlooks_draw_progressbar_fill (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ProgressBarParameters *progressbar, - int x, int y, int width, int height, - gint offset) -{ - boolean is_horizontal = progressbar->orientation < 2; - double tile_pos = 0; - double stroke_width; - double radius; - int x_step; - - cairo_pattern_t *pattern; - CairoColor bg_shade; - CairoColor border; - CairoColor shadow; - - radius = MAX (0, params->radius - params->xthickness); - - cairo_save (cr); - - if (!is_horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - if ((progressbar->orientation == CL_ORIENTATION_RIGHT_TO_LEFT) || (progressbar->orientation == CL_ORIENTATION_BOTTOM_TO_TOP)) - ge_cairo_mirror (cr, CR_MIRROR_HORIZONTAL, &x, &y, &width, &height); - - /* Clamp the radius so that the _height_ fits ... */ - radius = MIN (radius, height / 2.0); - - stroke_width = height*2; - x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */ - - cairo_translate (cr, x, y); - - cairo_save (cr); - /* This is kind of nasty ... Clip twice from each side in case the length - * of the fill is smaller than twice the radius. */ - ge_cairo_rounded_rectangle (cr, 0, 0, width + radius, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius, 0, width + radius, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - /* Draw the background gradient */ - ge_shade_color (&colors->spot[1], 1.1, &bg_shade); - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, bg_shade.r, bg_shade.g, bg_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.6, colors->spot[1].r, colors->spot[1].g, colors->spot[1].b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, bg_shade.r, bg_shade.g, bg_shade.b); - cairo_set_source (cr, pattern); - cairo_paint (cr); - cairo_pattern_destroy (pattern); - - /* Draw the Strokes */ - while (tile_pos <= width+x_step) - { - cairo_move_to (cr, stroke_width/2-x_step, 0); - cairo_line_to (cr, stroke_width-x_step, 0); - cairo_line_to (cr, stroke_width/2-x_step, height); - cairo_line_to (cr, -x_step, height); - - cairo_translate (cr, stroke_width, 0); - tile_pos += stroke_width; - } - - cairo_set_source_rgba (cr, colors->spot[2].r, - colors->spot[2].g, - colors->spot[2].b, - 0.15); - - cairo_fill (cr); - cairo_restore (cr); /* rounded clip region */ - - /* inner highlight border - * This is again kinda ugly. Draw once from each side, clipping away the other. */ - cairo_set_source_rgba (cr, colors->spot[0].r, colors->spot[0].g, colors->spot[0].b, 0.5); - - /* left side */ - cairo_save (cr); - cairo_rectangle (cr, 0, 0, width / 2, height); - cairo_clip (cr); - - if (progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, 1.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - else - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - /* right side */ - cairo_save (cr); - cairo_rectangle (cr, width / 2, 0, (width+1) / 2, height); - cairo_clip (cr); - - if (progressbar->value < 1.0 || progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, -1.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - else - ge_cairo_rounded_rectangle (cr, -0.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - - /* Draw the dark lines and the shadow */ - cairo_save (cr); - /* Again, this weird clip area. */ - ge_cairo_rounded_rectangle (cr, -1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius - 1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - border = colors->spot[2]; - border.a = 0.5; - shadow.r = 0.0; - shadow.g = 0.0; - shadow.b = 0.0; - shadow.a = 0.1; - - if (progressbar->pulsing) - { - /* At the beginning of the bar. */ - cairo_move_to (cr, 0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, 0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, -0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, -0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, -0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - if (progressbar->value < 1.0 || progressbar->pulsing) - { - /* At the end of the bar. */ - cairo_move_to (cr, width - 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width - 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width - 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, width + 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width + 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width + 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - - cairo_restore (cr); - - cairo_restore (cr); /* rotation, mirroring */ -} - -static void -clearlooks_draw_optionmenu (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const OptionMenuParameters *optionmenu, - int x, int y, int width, int height) -{ - SeparatorParameters separator; - int offset = params->ythickness + 1; - - params->style_functions->draw_button (cr, colors, params, x, y, width, height); - - separator.horizontal = FALSE; - params->style_functions->draw_separator (cr, colors, params, &separator, x+optionmenu->linepos, y + offset, 2, height - offset*2); -} - -static void -clearlooks_draw_menu_item_separator (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SeparatorParameters *separator, - int x, int y, int width, int height) -{ - cairo_save (cr); - cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); - ge_cairo_set_color (cr, &colors->shade[5]); - - if (separator->horizontal) - cairo_rectangle (cr, x, y, width, 1); - else - cairo_rectangle (cr, x, y, 1, height); - - cairo_fill (cr); - - cairo_restore (cr); -} - -static void -clearlooks_draw_menubar0 (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const MenuBarParameters *menubar, - int x, int y, int width, int height) -{ -/* const CairoColor *light = &colors->shade[0]; */ - const CairoColor *dark = &colors->shade[3]; - - cairo_set_line_width (cr, 1); - cairo_translate (cr, x, y+0.5); - -/* cairo_move_to (cr, 0, 0); */ -/* cairo_line_to (cr, width, 0); */ -/* ge_cairo_set_color (cr, light); */ -/* cairo_stroke (cr); */ - - cairo_move_to (cr, 0, height-1); - cairo_line_to (cr, width, height-1); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); -} - -static void -clearlooks_draw_menubar2 (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const MenuBarParameters *menubar, - int x, int y, int width, int height) -{ - CairoColor lower; - cairo_pattern_t *pattern; - - ge_shade_color (&colors->bg[0], 0.96, &lower); - - cairo_translate (cr, x, y); - cairo_rectangle (cr, 0, 0, width, height); - - /* Draw the gradient */ - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, colors->bg[0].r, - colors->bg[0].g, - colors->bg[0].b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, lower.r, - lower.g, - lower.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Draw bottom line */ - cairo_set_line_width (cr, 1.0); - cairo_move_to (cr, 0, height-0.5); - cairo_line_to (cr, width, height-0.5); - ge_cairo_set_color (cr, &colors->shade[3]); - cairo_stroke (cr); -} - -static void -clearlooks_draw_menubar1 (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const MenuBarParameters *menubar, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[3]; - - clearlooks_draw_menubar2 (cr, colors, params, menubar, - x, y, width, height); - - ge_cairo_set_color (cr, border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); -} - - -static menubar_draw_proto clearlooks_menubar_draw[3] = -{ - clearlooks_draw_menubar0, - clearlooks_draw_menubar1, - clearlooks_draw_menubar2 -}; - -static void -clearlooks_draw_menubar (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const MenuBarParameters *menubar, - int x, int y, int width, int height) -{ - if (menubar->style < 0 || menubar->style > 3) - return; - - clearlooks_menubar_draw[menubar->style](cr, colors, params, menubar, - x, y, width, height); -} - -static void -clearlooks_get_frame_gap_clip (int x, int y, int width, int height, - const FrameParameters *frame, - ClearlooksRectangle *bevel, - ClearlooksRectangle *border) -{ - if (frame->gap_side == CL_GAP_TOP) - { - CLEARLOOKS_RECTANGLE_SET ((*bevel), 1.5 + frame->gap_x, -0.5, - frame->gap_width - 3, 2.0); - CLEARLOOKS_RECTANGLE_SET ((*border), 0.5 + frame->gap_x, -0.5, - frame->gap_width - 2, 2.0); - } - else if (frame->gap_side == CL_GAP_BOTTOM) - { - CLEARLOOKS_RECTANGLE_SET ((*bevel), 1.5 + frame->gap_x, height - 2.5, - frame->gap_width - 3, 2.0); - CLEARLOOKS_RECTANGLE_SET ((*border), 0.5 + frame->gap_x, height - 1.5, - frame->gap_width - 2, 2.0); - } - else if (frame->gap_side == CL_GAP_LEFT) - { - CLEARLOOKS_RECTANGLE_SET ((*bevel), -0.5, 1.5 + frame->gap_x, - 2.0, frame->gap_width - 3); - CLEARLOOKS_RECTANGLE_SET ((*border), -0.5, 0.5 + frame->gap_x, - 1.0, frame->gap_width - 2); - } - else if (frame->gap_side == CL_GAP_RIGHT) - { - CLEARLOOKS_RECTANGLE_SET ((*bevel), width - 2.5, 1.5 + frame->gap_x, - 2.0, frame->gap_width - 3); - CLEARLOOKS_RECTANGLE_SET ((*border), width - 1.5, 0.5 + frame->gap_x, - 1.0, frame->gap_width - 2); - } -} - -static void -clearlooks_draw_frame (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const FrameParameters *frame, - int x, int y, int width, int height) -{ - const CairoColor *border = frame->border; - const CairoColor *dark = (CairoColor*)&colors->shade[4]; - ClearlooksRectangle bevel_clip = {0, 0, 0, 0}; - ClearlooksRectangle frame_clip = {0, 0, 0, 0}; - double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - CairoColor hilight; - - ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 1.05, &hilight); - - if (frame->shadow == CL_SHADOW_NONE) - return; - - if (frame->gap_x != -1) - clearlooks_get_frame_gap_clip (x, y, width, height, - frame, &bevel_clip, &frame_clip); - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y+0.5); - - /* save everything */ - cairo_save (cr); - /* Set clip for the bevel */ - if (frame->gap_x != -1) - { - /* Set clip for gap */ - cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_rectangle (cr, -0.5, -0.5, width, height); - cairo_rectangle (cr, bevel_clip.x, bevel_clip.y, bevel_clip.width, bevel_clip.height); - cairo_clip (cr); - } - - /* Draw the bevel */ - if (frame->shadow == CL_SHADOW_ETCHED_IN || frame->shadow == CL_SHADOW_ETCHED_OUT) - { - ge_cairo_set_color (cr, &hilight); - if (frame->shadow == CL_SHADOW_ETCHED_IN) - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, params->corners); - else - ge_cairo_rounded_rectangle (cr, 0, 0, width-2, height-2, radius, params->corners); - cairo_stroke (cr); - } - else if (frame->shadow != CL_SHADOW_NONE) - { - ShadowParameters shadow; - shadow.corners = params->corners; - shadow.shadow = frame->shadow; - clearlooks_draw_highlight_and_shade (cr, colors, &shadow, width, height, 0); - } - - /* restore the previous clip region */ - cairo_restore (cr); - cairo_save (cr); - if (frame->gap_x != -1) - { - /* Set clip for gap */ - cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_rectangle (cr, -0.5, -0.5, width, height); - cairo_rectangle (cr, frame_clip.x, frame_clip.y, frame_clip.width, frame_clip.height); - cairo_clip (cr); - } - - /* Draw frame */ - if (frame->shadow == CL_SHADOW_ETCHED_IN || frame->shadow == CL_SHADOW_ETCHED_OUT) - { - ge_cairo_set_color (cr, dark); - if (frame->shadow == CL_SHADOW_ETCHED_IN) - ge_cairo_rounded_rectangle (cr, 0, 0, width-2, height-2, radius, params->corners); - else - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, params->corners); - } - else - { - ge_cairo_set_color (cr, border); - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - } - cairo_stroke (cr); - - cairo_restore (cr); -} - -static void -clearlooks_draw_tab (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const TabParameters *tab, - int x, int y, int width, int height) -{ - const CairoColor *border1 = &colors->shade[6]; - const CairoColor *border2 = &colors->shade[5]; - const CairoColor *stripe_fill = &colors->spot[1]; - const CairoColor *stripe_border = &colors->spot[2]; - const CairoColor *fill; - CairoColor hilight; - - cairo_pattern_t *pattern; - - double radius; - double strip_size; - - radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - /* Set clip */ - cairo_rectangle (cr, x, y, width, height); - cairo_clip (cr); - cairo_new_path (cr); - - /* Translate and set line width */ - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y+0.5); - - - /* Make the tabs slightly bigger than they should be, to create a gap */ - /* And calculate the strip size too, while you're at it */ - if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) - { - height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ - - if (tab->gap_side == CL_GAP_TOP) - cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ - } - else - { - width += 3.0; - strip_size = 2.0/width; - - if (tab->gap_side == CL_GAP_LEFT) - cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ - } - - /* Set the fill color */ - fill = &colors->bg[params->state_type]; - - /* Set tab shape */ - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, - radius, params->corners); - - /* Draw fill */ - ge_cairo_set_color (cr, fill); - cairo_fill (cr); - - - ge_shade_color (fill, 1.3, &hilight); - - /* Draw highlight */ - if (!params->active) - { - ShadowParameters shadow; - - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = params->corners; - - clearlooks_draw_highlight_and_shade (cr, colors, &shadow, - width, - height, radius); - } - - - if (params->active) - { - CairoColor shadow; - pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-1 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 1, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0 ); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - ge_shade_color (fill, 0.92, &shadow); - - cairo_pattern_add_color_stop_rgba (pattern, 0.0, hilight.r, hilight.g, hilight.b, 0.4); - cairo_pattern_add_color_stop_rgba (pattern, 1.0/height, hilight.r, hilight.g, hilight.b, 0.4); - cairo_pattern_add_color_stop_rgb (pattern, 1.0/height, fill->r,fill->g,fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shadow.r,shadow.g,shadow.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - /* Draw shade */ - pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-2 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 0, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0 ); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b); - cairo_pattern_add_color_stop_rgb (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b); - cairo_pattern_add_color_stop_rgba (pattern, strip_size, hilight.r, hilight.g, hilight.b, 0.5); - cairo_pattern_add_color_stop_rgba (pattern, 0.8, hilight.r, hilight.g, hilight.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - if (params->active) - { - ge_cairo_set_color (cr, border2); - cairo_stroke (cr); - } - else - { - pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-2 : 2, - tab->gap_side == CL_GAP_TOP ? height-2 : 2, - tab->gap_side == CL_GAP_RIGHT ? width : 2, - tab->gap_side == CL_GAP_BOTTOM ? height : 2 ); - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_border->r, stripe_border->g, stripe_border->b); - cairo_pattern_add_color_stop_rgb (pattern, strip_size, stripe_border->r, stripe_border->g, stripe_border->b); - cairo_pattern_add_color_stop_rgb (pattern, strip_size, border1->r, border1->g, border1->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, border2->r, border2->g, border2->b); - cairo_set_source (cr, pattern); - cairo_stroke (cr); - cairo_pattern_destroy (pattern); - } -} - -static void -clearlooks_draw_separator (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SeparatorParameters *separator, - int x, int y, int width, int height) -{ - CairoColor color = colors->shade[3]; - CairoColor hilight; - ge_shade_color (&color, 1.4, &hilight); - - cairo_save (cr); - cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); - - if (separator->horizontal) - { - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y+0.5); - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, width, 0.0); - ge_cairo_set_color (cr, &color); - cairo_stroke (cr); - - cairo_move_to (cr, 0.0, 1.0); - cairo_line_to (cr, width, 1.0); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - } - else - { - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y); - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, 0.0, height); - ge_cairo_set_color (cr, &color); - cairo_stroke (cr); - - cairo_move_to (cr, 1.0, 0.0); - cairo_line_to (cr, 1.0, height); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - } - - cairo_restore (cr); -} - -static void -clearlooks_draw_list_view_header (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ListViewHeaderParameters *header, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[5]; - cairo_pattern_t *pattern; - CairoColor hilight; - CairoColor shadow; - - ge_shade_color (border, 1.5, &hilight); - ge_shade_color (border, 0.925, &shadow); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - /* Draw highlight */ - if (header->order == CL_ORDER_FIRST) - { - cairo_move_to (cr, 0.5, height-1); - cairo_line_to (cr, 0.5, 0.5); - } - else - cairo_move_to (cr, 0.0, 0.5); - - cairo_line_to (cr, width, 0.5); - - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - - /* Draw bottom border */ - cairo_move_to (cr, 0.0, height-0.5); - cairo_line_to (cr, width, height-0.5); - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - /* Draw bottom shade */ - pattern = cairo_pattern_create_linear (0.0, height-5.0, 0.0, height-1.0); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.3); - - cairo_rectangle (cr, 0.0, height-5.0, width, 4.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Draw resize grip */ - if ((params->ltr && header->order != CL_ORDER_LAST) || - (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable) - { - SeparatorParameters separator; - separator.horizontal = FALSE; - - if (params->ltr) - params->style_functions->draw_separator (cr, colors, params, &separator, - width-1.5, 4.0, 2, height-8.0); - else - params->style_functions->draw_separator (cr, colors, params, &separator, - 1.5, 4.0, 2, height-8.0); - } -} - -/* We can't draw transparent things here, since it will be called on the same - * surface multiple times, when placed on a handlebox_bin or dockitem_bin */ -static void -clearlooks_draw_toolbar (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ToolbarParameters *toolbar, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL]; - const CairoColor *dark = &colors->shade[3]; - CairoColor light; - ge_shade_color (fill, 1.1, &light); - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - ge_cairo_set_color (cr, fill); - cairo_paint (cr); - - if (!toolbar->topmost) - { - /* Draw highlight */ - cairo_move_to (cr, 0, 0.5); - cairo_line_to (cr, width-1, 0.5); - ge_cairo_set_color (cr, &light); - cairo_stroke (cr); - } - - /* Draw shadow */ - cairo_move_to (cr, 0, height-0.5); - cairo_line_to (cr, width-1, height-0.5); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); -} - -static void -clearlooks_draw_menuitem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - CairoColor fill_shade; - CairoColor border = colors->spot[2]; - cairo_pattern_t *pattern; - - ge_shade_color (&border, 1.05, &border); - ge_shade_color (fill, 0.85, &fill_shade); - cairo_set_line_width (cr, 1.0); - - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width - 1, height - 1, widget->radius, widget->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, fill_shade.r, fill_shade.g, fill_shade.b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); -} - -static void -clearlooks_draw_menubaritem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - CairoColor fill_shade; - CairoColor border = colors->spot[2]; - cairo_pattern_t *pattern; - - ge_shade_color (&border, 1.05, &border); - ge_shade_color (fill, 0.85, &fill_shade); - - cairo_set_line_width (cr, 1.0); - ge_cairo_rounded_rectangle (cr, x + 0.5, y + 0.5, width - 1, height, widget->radius, widget->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, fill_shade.r, fill_shade.g, fill_shade.b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, &border); - cairo_stroke_preserve (cr); -} - -static void -clearlooks_draw_selected_cell (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - CairoColor upper_color; - CairoColor lower_color; - CairoColor border; - cairo_pattern_t *pattern; - cairo_save (cr); - - cairo_translate (cr, x, y); - - if (params->focus) - upper_color = colors->base[params->state_type]; - else - upper_color = colors->base[GTK_STATE_ACTIVE]; - - ge_shade_color(&upper_color, 0.92, &lower_color); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, upper_color.r, - upper_color.g, - upper_color.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, lower_color.r, - lower_color.g, - lower_color.b); - - cairo_set_source (cr, pattern); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - cairo_pattern_destroy (pattern); - - ge_shade_color(&upper_color, 0.8, &border); - - cairo_move_to (cr, 0, 0.5); - cairo_rel_line_to (cr, width, 0); - cairo_move_to (cr, 0, height-0.5); - cairo_rel_line_to (cr, width, 0); - - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_restore (cr); -} - - -static void -clearlooks_draw_scrollbar_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height) -{ - const CairoColor *bg = &colors->shade[2]; - const CairoColor *border = &colors->shade[5]; - CairoColor bg_shade; - cairo_pattern_t *pattern; - - ge_shade_color (bg, 0.95, &bg_shade); - - cairo_set_line_width (cr, 1); - /* cairo_translate (cr, x, y); */ - - if (scrollbar->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x, y); - - /* Draw fill */ - cairo_rectangle (cr, 1, 0, width-2, height); - ge_cairo_set_color (cr, bg); - cairo_fill (cr); - - /* Draw shadow */ - pattern = cairo_pattern_create_linear (1, 0, 3, 0); - cairo_pattern_add_color_stop_rgb (pattern, 0, bg_shade.r, bg_shade.g, bg_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, bg->r, bg->g, bg->b); - cairo_rectangle (cr, 1, 0, 4, height); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Draw border */ - ge_cairo_set_color (cr, border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); -} - -static void -clearlooks_draw_scrollbar_stepper (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - const ScrollBarStepperParameters *stepper, - int x, int y, int width, int height) -{ - CairoCorners corners = CR_CORNER_NONE; - CairoColor border; - CairoColor s1, s2, s3, s4; - cairo_pattern_t *pattern; - ShadowParameters shadow; - double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - ge_shade_color(&colors->shade[6], 1.05, &border); - - if (scrollbar->horizontal) - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - } - else - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners); - - if (scrollbar->horizontal) - pattern = cairo_pattern_create_linear (0, 0, 0, height); - else - pattern = cairo_pattern_create_linear (0, 0, width, 0); - - s2 = colors->bg[widget->state_type]; - ge_shade_color(&s2, 1.06, &s1); - ge_shade_color(&s2, 0.98, &s3); - ge_shade_color(&s2, 0.94, &s4); - - cairo_pattern_add_color_stop_rgb(pattern, 0, s1.r, s1.g, s1.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, s2.r, s2.g, s2.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.7, s3.r, s3.g, s3.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, s4.r, s4.g, s4.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_translate (cr, 0.5, 0.5); - clearlooks_draw_top_left_highlight (cr, &s2, widget, width, height, (stepper->stepper == CL_STEPPER_A) ? radius : 0); - cairo_translate (cr, -0.5, -0.5); - - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners); - clearlooks_set_border_gradient (cr, &border, 1.2, (scrollbar->horizontal ? 0 : width), (scrollbar->horizontal ? height: 0)); - cairo_stroke (cr); - - cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; - /* - clearlooks_draw_highlight_and_shade (cr, &shadow, - width, - height, params->radius);*/ -} - -static void -clearlooks_draw_scrollbar_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height) -{ - if (scrollbar->junction & CL_JUNCTION_BEGIN) - { - if (scrollbar->horizontal) - { - x -= 1; - width += 1; - } - else - { - y -= 1; - height += 1; - } - } - if (scrollbar->junction & CL_JUNCTION_END) - { - if (scrollbar->horizontal) - width += 1; - else - height += 1; - } - - if (!scrollbar->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x, y); - - if (scrollbar->has_color) - { - const CairoColor *border = &colors->shade[7]; - CairoColor fill = scrollbar->color; - CairoColor hilight; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - if (widget->prelight) - ge_shade_color (&fill, 1.1, &fill); - - cairo_set_line_width (cr, 1); - - ge_shade_color (&fill, 1.3, &hilight); - ge_shade_color (&fill, 1.1, &shade1); - ge_shade_color (&fill, 1.05, &shade2); - ge_shade_color (&fill, 0.98, &shade3); - - pattern = cairo_pattern_create_linear (1, 1, 1, height-2); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade3.r, shade3.g, shade3.b); - cairo_pattern_add_color_stop_rgb (pattern, 1, fill.r, fill.g, fill.b); - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - ge_cairo_stroke_rectangle (cr, 1.5, 1.5, width-3, height-3); - - ge_cairo_set_color (cr, border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); - } - else - { - const CairoColor *dark = &colors->shade[4]; - const CairoColor *light = &colors->shade[0]; - CairoColor border; - CairoColor s1, s2, s3, s4, s5; - cairo_pattern_t *pattern; - int bar_x, i; - - ge_shade_color(&colors->shade[6], 1.05, &border); - - s2 = colors->bg[widget->state_type]; - ge_shade_color(&s2, 1.06, &s1); - ge_shade_color(&s2, 0.98, &s3); - ge_shade_color(&s2, 0.94, &s4); - - pattern = cairo_pattern_create_linear(1, 1, 1, height-1); - cairo_pattern_add_color_stop_rgb(pattern, 0, s1.r, s1.g, s1.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, s2.r, s2.g, s2.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.7, s3.r, s3.g, s3.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, s4.r, s4.g, s4.b); - - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source(cr, pattern); - cairo_fill(cr); - cairo_pattern_destroy(pattern); - - clearlooks_set_border_gradient (cr, &border, 1.2, 0, height); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); - - cairo_move_to (cr, 1.5, height-1.5); - cairo_line_to (cr, 1.5, 1.5); - cairo_line_to (cr, width-1.5, 1.5); - ge_shade_color (&s2, 1.3, &s5); - cairo_set_source_rgba (cr, s5.r, s5.g, s5.b, 0.5); - cairo_stroke(cr); - - /* draw handles */ - cairo_set_line_width (cr, 1); - - bar_x = width/2 - 4; - cairo_translate(cr, 0.5, 0.5); - for (i=0; i<3; i++) - { - cairo_move_to (cr, bar_x, 4); - cairo_line_to (cr, bar_x, height-5); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); - - cairo_move_to (cr, bar_x+1, 4); - cairo_line_to (cr, bar_x+1, height-5); - ge_cairo_set_color (cr, light); - cairo_stroke (cr); - - bar_x += 3; - } - } - -} - -static void -clearlooks_draw_statusbar (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - const CairoColor *dark = &colors->shade[3]; - CairoColor hilight; - - ge_shade_color (dark, 1.4, &hilight); - - cairo_set_line_width (cr, 1); - cairo_translate (cr, x, y+0.5); - cairo_move_to (cr, 0, 0); - cairo_line_to (cr, width, 0); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); - - cairo_translate (cr, 0, 1); - cairo_move_to (cr, 0, 0); - cairo_line_to (cr, width, 0); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); -} - -static void -clearlooks_draw_menu_frame (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[5]; - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); -/* - cairo_set_source_rgba (cr, colors->bg[0].r, colors->bg[0].g, colors->bg[0].b, 0.9); - cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); - cairo_paint (cr); -*/ - ge_cairo_set_color (cr, border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); -} - -static void -clearlooks_draw_tooltip (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - CairoColor border; - - ge_shade_color (&colors->bg[widget->state_type], 0.6, &border); - - cairo_save (cr); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - ge_cairo_set_color (cr, &colors->bg[widget->state_type]); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - ge_cairo_set_color (cr, &border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); - - cairo_restore (cr); -} - -static void -clearlooks_draw_handle (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const HandleParameters *handle, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->bg[params->state_type]; - int num_bars = 6; /* shut up gcc warnings */ - int bar_spacing; - - switch (handle->type) - { - case CL_HANDLE_TOOLBAR: - num_bars = 6; - bar_spacing = 3; - break; - case CL_HANDLE_SPLITTER: - num_bars = 16; - bar_spacing = 3; - break; - } - - if (params->prelight) - { - cairo_rectangle (cr, x, y, width, height); - ge_cairo_set_color (cr, fill); - cairo_fill (cr); - } - - cairo_translate (cr, x+0.5, y+0.5); - - cairo_set_line_width (cr, 1); - - if (handle->horizontal) - { - params->style_functions->draw_gripdots (cr, colors, 0, 0, width, height, num_bars, 2, 0.1); - } - else - { - params->style_functions->draw_gripdots (cr, colors, 0, 0, width, height, 2, num_bars, 0.1); - } -} - -static void -clearlooks_draw_resize_grip (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ResizeGripParameters *grip, - int x, int y, int width, int height) -{ - const CairoColor *dark = &colors->shade[4]; - CairoColor hilight; - int lx, ly; - int x_down; - int y_down; - int dots; - - ge_shade_color (dark, 1.5, &hilight); - - /* The number of dots fitting into the area. Just hardcoded to 4 right now. */ - /* dots = MIN (width - 2, height - 2) / 3; */ - dots = 4; - - cairo_save (cr); - - switch (grip->edge) - { - case CL_WINDOW_EDGE_NORTH_EAST: - x_down = 0; - y_down = 0; - cairo_translate (cr, x + width - 3*dots + 2, y + 1); - break; - case CL_WINDOW_EDGE_SOUTH_EAST: - x_down = 0; - y_down = 1; - cairo_translate (cr, x + width - 3*dots + 2, y + height - 3*dots + 2); - break; - case CL_WINDOW_EDGE_SOUTH_WEST: - x_down = 1; - y_down = 1; - cairo_translate (cr, x + 1, y + height - 3*dots + 2); - break; - case CL_WINDOW_EDGE_NORTH_WEST: - x_down = 1; - y_down = 0; - cairo_translate (cr, x + 1, y + 1); - break; - default: - /* Not implemented. */ - return; - } - - for (lx = 0; lx < dots; lx++) /* horizontally */ - { - for (ly = 0; ly <= lx; ly++) /* vertically */ - { - int mx, my; - mx = x_down * dots + (1 - x_down * 2) * lx - x_down; - my = y_down * dots + (1 - y_down * 2) * ly - y_down; - - ge_cairo_set_color (cr, &hilight); - cairo_rectangle (cr, mx*3-1, my*3-1, 2, 2); - cairo_fill (cr); - - ge_cairo_set_color (cr, dark); - cairo_rectangle (cr, mx*3-1, my*3-1, 1, 1); - cairo_fill (cr); - } - } - - cairo_restore (cr); -} - -static void -clearlooks_draw_radiobutton (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height) -{ - const CairoColor *border; - const CairoColor *dot; - CairoColor shadow; - CairoColor highlight; - cairo_pattern_t *pt; - gboolean inconsistent; - gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN); - - inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN); - draw_bullet |= inconsistent; - - if (widget->disabled) - { - border = &colors->shade[5]; - dot = &colors->shade[6]; - } - else - { - border = &colors->shade[6]; - dot = &colors->text[0]; - } - - ge_shade_color (&widget->parentbg, 0.9, &shadow); - ge_shade_color (&widget->parentbg, 1.1, &highlight); - - pt = cairo_pattern_create_linear (0, 0, 13, 13); - cairo_pattern_add_color_stop_rgb (pt, 0.0, shadow.r, shadow.b, shadow.g); - cairo_pattern_add_color_stop_rgba (pt, 0.5, shadow.r, shadow.b, shadow.g, 0.5); - cairo_pattern_add_color_stop_rgba (pt, 0.5, highlight.r, highlight.g, highlight.b, 0.5); - cairo_pattern_add_color_stop_rgb (pt, 1.0, highlight.r, highlight.g, highlight.b); - - cairo_translate (cr, x, y); - - cairo_set_line_width (cr, 2); - cairo_arc (cr, 7, 7, 6, 0, G_PI*2); - cairo_set_source (cr, pt); - cairo_stroke (cr); - cairo_pattern_destroy (pt); - - cairo_set_line_width (cr, 1); - - cairo_arc (cr, 7, 7, 5.5, 0, G_PI*2); - - if (!widget->disabled) - { - ge_cairo_set_color (cr, &colors->base[0]); - cairo_fill_preserve (cr); - } - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - if (draw_bullet) - { - if (inconsistent) - { - cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); - cairo_set_line_width (cr, 4); - - cairo_move_to(cr, 5, 7); - cairo_line_to(cr, 9, 7); - - ge_cairo_set_color (cr, dot); - cairo_stroke (cr); - } - else - { - cairo_arc (cr, 7, 7, 3, 0, G_PI*2); - ge_cairo_set_color (cr, dot); - cairo_fill (cr); - - cairo_arc (cr, 6, 6, 1, 0, G_PI*2); - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - cairo_fill (cr); - } - } -} - -static void -clearlooks_draw_checkbox (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height) -{ - const CairoColor *border; - const CairoColor *dot; - gboolean inconsistent = FALSE; - gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN); - - inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN); - draw_bullet |= inconsistent; - - if (widget->disabled) - { - border = &colors->shade[5]; - dot = &colors->shade[6]; - } - else - { - border = &colors->shade[6]; - dot = &colors->text[GTK_STATE_NORMAL]; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - if (widget->xthickness > 2 && widget->ythickness > 2) - { - widget->style_functions->draw_inset (cr, &widget->parentbg, 0.5, 0.5, width-1, height-1, 1, CR_CORNER_ALL); - - /* Draw the rectangle for the checkbox itself */ - ge_cairo_rounded_rectangle (cr, 1.5, 1.5, width-3, height-3, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - } - else - { - /* Draw the rectangle for the checkbox itself */ - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - } - - if (!widget->disabled) - { - ge_cairo_set_color (cr, &colors->base[0]); - cairo_fill_preserve (cr); - } - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - if (draw_bullet) - { - if (inconsistent) /* Inconsistent */ - { - cairo_set_line_width (cr, 2.0); - cairo_move_to (cr, 3, height*0.5); - cairo_line_to (cr, width-3, height*0.5); - } - else - { - cairo_set_line_width (cr, 1.7); - cairo_move_to (cr, 0.5 + (width*0.2), (height*0.5)); - cairo_line_to (cr, 0.5 + (width*0.4), (height*0.7)); - - cairo_curve_to (cr, 0.5 + (width*0.4), (height*0.7), - 0.5 + (width*0.5), (height*0.4), - 0.5 + (width*0.70), (height*0.25)); - - } - - ge_cairo_set_color (cr, dot); - cairo_stroke (cr); - } -} - -static void -clearlooks_draw_normal_arrow (cairo_t *cr, const CairoColor *color, - double x, double y, double width, double height) -{ - double arrow_width; - double arrow_height; - double line_width_2; - - cairo_save (cr); - - arrow_width = MIN (height * 2.0 + MAX (1.0, ceil (height * 2.0 / 6.0 * 2.0) / 2.0) / 2.0, width); - line_width_2 = MAX (1.0, ceil (arrow_width / 6.0 * 2.0) / 2.0) / 2.0; - arrow_height = arrow_width / 2.0 + line_width_2; - - cairo_translate (cr, x, y - arrow_height / 2.0); - - cairo_move_to (cr, -arrow_width / 2.0, line_width_2); - cairo_line_to (cr, -arrow_width / 2.0 + line_width_2, 0); - /* cairo_line_to (cr, 0, arrow_height - line_width_2); */ - cairo_arc_negative (cr, 0, arrow_height - 2*line_width_2 - 2*line_width_2 * sqrt(2), 2*line_width_2, G_PI_2 + G_PI_4, G_PI_4); - cairo_line_to (cr, arrow_width / 2.0 - line_width_2, 0); - cairo_line_to (cr, arrow_width / 2.0, line_width_2); - cairo_line_to (cr, 0, arrow_height); - cairo_close_path (cr); - - ge_cairo_set_color (cr, color); - cairo_fill (cr); - - cairo_restore (cr); -} - -static void -clearlooks_draw_combo_arrow (cairo_t *cr, const CairoColor *color, - double x, double y, double width, double height) -{ - double arrow_width = MIN (height * 2 / 3.0, width); - double arrow_height = arrow_width / 2.0; - double gap_size = 1.0 * arrow_height; - - cairo_save (cr); - cairo_translate (cr, x, y - (arrow_height + gap_size) / 2.0); - cairo_rotate (cr, G_PI); - clearlooks_draw_normal_arrow (cr, color, 0, 0, arrow_width, arrow_height); - cairo_restore (cr); - - clearlooks_draw_normal_arrow (cr, color, x, y + (arrow_height + gap_size) / 2.0, arrow_width, arrow_height); -} - -static void -_clearlooks_draw_arrow (cairo_t *cr, const CairoColor *color, - ClearlooksDirection dir, ClearlooksArrowType type, - double x, double y, double width, double height) -{ - double rotate; - - if (dir == CL_DIRECTION_LEFT) - rotate = G_PI*1.5; - else if (dir == CL_DIRECTION_RIGHT) - rotate = G_PI*0.5; - else if (dir == CL_DIRECTION_UP) - rotate = G_PI; - else if (dir == CL_DIRECTION_DOWN) - rotate = 0; - else - return; - - if (type == CL_ARROW_NORMAL) - { - cairo_translate (cr, x, y); - cairo_rotate (cr, -rotate); - clearlooks_draw_normal_arrow (cr, color, 0, 0, width, height); - } - else if (type == CL_ARROW_COMBO) - { - cairo_translate (cr, x, y); - clearlooks_draw_combo_arrow (cr, color, 0, 0, width, height); - } -} - -static void -clearlooks_draw_arrow (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ArrowParameters *arrow, - int x, int y, int width, int height) -{ - const CairoColor *color = &colors->fg[widget->state_type]; - gdouble tx, ty; - - tx = x + width/2.0; - ty = y + height/2.0; - - if (widget->disabled) - { - _clearlooks_draw_arrow (cr, &colors->shade[0], - arrow->direction, arrow->type, - tx+0.5, ty+0.5, width, height); - } - - cairo_identity_matrix (cr); - - _clearlooks_draw_arrow (cr, color, arrow->direction, arrow->type, - tx, ty, width, height); -} - -void -clearlooks_register_style_classic (ClearlooksStyleFunctions *functions) -{ - g_assert (functions); - - functions->draw_button = clearlooks_draw_button; - functions->draw_scale_trough = clearlooks_draw_scale_trough; - functions->draw_progressbar_trough = clearlooks_draw_progressbar_trough; - functions->draw_progressbar_fill = clearlooks_draw_progressbar_fill; - functions->draw_slider_button = clearlooks_draw_slider_button; - functions->draw_entry = clearlooks_draw_entry; - functions->draw_spinbutton = clearlooks_draw_spinbutton; - functions->draw_spinbutton_down = clearlooks_draw_spinbutton_down; - functions->draw_optionmenu = clearlooks_draw_optionmenu; - functions->draw_inset = clearlooks_draw_inset; - functions->draw_menubar = clearlooks_draw_menubar; - functions->draw_tab = clearlooks_draw_tab; - functions->draw_frame = clearlooks_draw_frame; - functions->draw_separator = clearlooks_draw_separator; - functions->draw_menu_item_separator = clearlooks_draw_menu_item_separator; - functions->draw_list_view_header = clearlooks_draw_list_view_header; - functions->draw_toolbar = clearlooks_draw_toolbar; - functions->draw_menuitem = clearlooks_draw_menuitem; - functions->draw_menubaritem = clearlooks_draw_menubaritem; - functions->draw_selected_cell = clearlooks_draw_selected_cell; - functions->draw_scrollbar_stepper = clearlooks_draw_scrollbar_stepper; - functions->draw_scrollbar_slider = clearlooks_draw_scrollbar_slider; - functions->draw_scrollbar_trough = clearlooks_draw_scrollbar_trough; - functions->draw_statusbar = clearlooks_draw_statusbar; - functions->draw_menu_frame = clearlooks_draw_menu_frame; - functions->draw_tooltip = clearlooks_draw_tooltip; - functions->draw_handle = clearlooks_draw_handle; - functions->draw_resize_grip = clearlooks_draw_resize_grip; - functions->draw_arrow = clearlooks_draw_arrow; - functions->draw_checkbox = clearlooks_draw_checkbox; - functions->draw_radiobutton = clearlooks_draw_radiobutton; - functions->draw_shadow = clearlooks_draw_shadow; - functions->draw_slider = clearlooks_draw_slider; - functions->draw_gripdots = clearlooks_draw_gripdots; -} diff --git a/libs/clearlooks/clearlooks_draw.h b/libs/clearlooks/clearlooks_draw.h deleted file mode 100644 index a3f26764da..0000000000 --- a/libs/clearlooks/clearlooks_draw.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef CLEARLOOKS_DRAW_H -#define CLEARLOOKS_DRAW_H - -#include "clearlooks_types.h" -#include "clearlooks_style.h" - -#include -#include - -#include - -GE_INTERNAL void clearlooks_register_style_classic (ClearlooksStyleFunctions *functions); -GE_INTERNAL void clearlooks_register_style_glossy (ClearlooksStyleFunctions *functions); -GE_INTERNAL void clearlooks_register_style_gummy (ClearlooksStyleFunctions *functions); -GE_INTERNAL void clearlooks_register_style_inverted (ClearlooksStyleFunctions *functions); - -#endif /* CLEARLOOKS_DRAW_H */ diff --git a/libs/clearlooks/clearlooks_draw_glossy.c b/libs/clearlooks/clearlooks_draw_glossy.c deleted file mode 100644 index 8a5921efc2..0000000000 --- a/libs/clearlooks/clearlooks_draw_glossy.c +++ /dev/null @@ -1,1422 +0,0 @@ -/* Clearlooks Glossy style - * Copyright (C) 2006 Benjamin Berg - * Copyright (C) 2007 Andrea Cimitan - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Written by Andrea Cimitan - * and Benjamin Berg - * Based on code by Richard Stellingwerff - * and Daniel Borgmann - * from the ubuntulooks engine. - */ - -#include "clearlooks_draw.h" -#include "clearlooks_style.h" -#include "clearlooks_types.h" - -#include "support.h" -#include - -#include - - -static void -clearlooks_draw_glossy_gradient (cairo_t *cr, - double x, double y, int width, int height, - const CairoColor *color, - gboolean disabled, gboolean radius, CairoCorners corners) -{ - CairoColor a, b, c, d; - cairo_pattern_t *pt; - - ge_shade_color (color, disabled? 1.06 : 1.16, &a); - ge_shade_color (color, disabled? 1.02 : 1.08, &b); - ge_shade_color (color, disabled? 0.98 : 1.00, &c); - ge_shade_color (color, disabled? 1.02 : 1.08, &d); - - pt = cairo_pattern_create_linear (x, y, x, y+height); - cairo_pattern_add_color_stop_rgb (pt, 0.0, a.r, a.g, a.b); - cairo_pattern_add_color_stop_rgb (pt, 0.5, b.r, b.g, b.b); - cairo_pattern_add_color_stop_rgb (pt, 0.5, c.r, c.g, c.b); - cairo_pattern_add_color_stop_rgb (pt, 1.0, d.r, d.g, d.b); - - cairo_set_source (cr, pt); - ge_cairo_rounded_rectangle (cr, x, y, width, height, radius, corners); - cairo_fill (cr); - - cairo_pattern_destroy (pt); -} - -static void -clearlooks_set_mixed_color (cairo_t *cr, - const CairoColor *color1, - const CairoColor *color2, - gdouble mix_factor) -{ - CairoColor composite; - - ge_mix_color (color1, color2, mix_factor, &composite); - ge_cairo_set_color (cr, &composite); -} - -static void -clearlooks_glossy_draw_inset (cairo_t *cr, - const CairoColor *bg_color, - double x, double y, double w, double h, - double radius, uint8 corners) -{ - CairoColor shadow; - CairoColor highlight; - - /* not really sure of shading ratios... we will think */ - ge_shade_color (bg_color, 0.93, &shadow); - ge_shade_color (bg_color, 1.07, &highlight); - - /* highlight */ - cairo_move_to (cr, x + w + (radius * -0.2928932188), y - (radius * -0.2928932188)); /* 0.2928932... 1-sqrt(2)/2 gives middle of curve */ - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x + w - radius, y + radius, radius, G_PI * 1.75, G_PI * 2); - else - cairo_line_to (cr, x + w, y); - - if (corners & CR_CORNER_BOTTOMRIGHT) - cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, G_PI * 0.5); - else - cairo_line_to (cr, x + w, y + h); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x + radius, y + h - radius, radius, G_PI * 0.5, G_PI * 0.75); - else - cairo_line_to (cr, x, y + h); - - ge_cairo_set_color (cr, &highlight); - cairo_stroke (cr); - - /* shadow */ - cairo_move_to (cr, x + (radius * 0.2928932188), y + h + (radius * -0.2928932188)); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.75, M_PI); - else - cairo_line_to (cr, x, y + h); - - if (corners & CR_CORNER_TOPLEFT) - cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5); - else - cairo_line_to (cr, x, y); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x + w - radius, y + radius, radius, M_PI * 1.5, M_PI * 1.75); - else - cairo_line_to (cr, x + w, y); - - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); -} - -static void -clearlooks_glossy_draw_light_inset (cairo_t *cr, - const CairoColor *bg_color, - double x, double y, double w, double h, - double radius, uint8 corners) -{ - CairoColor shadow; - CairoColor highlight; - - /* not really sure of shading ratios... we will think */ - ge_shade_color (bg_color, 0.95, &shadow); - ge_shade_color (bg_color, 1.05, &highlight); - - /* highlight */ - cairo_move_to (cr, x + w + (radius * -0.2928932188), y - (radius * -0.2928932188)); /* 0.2928932... 1-sqrt(2)/2 gives middle of curve */ - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x + w - radius, y + radius, radius, G_PI * 1.75, G_PI * 2); - else - cairo_line_to (cr, x + w, y); - - if (corners & CR_CORNER_BOTTOMRIGHT) - cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, G_PI * 0.5); - else - cairo_line_to (cr, x + w, y + h); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x + radius, y + h - radius, radius, G_PI * 0.5, G_PI * 0.75); - else - cairo_line_to (cr, x, y + h); - - ge_cairo_set_color (cr, &highlight); - cairo_stroke (cr); - - /* shadow */ - cairo_move_to (cr, x + (radius * 0.2928932188), y + h + (radius * -0.2928932188)); - - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.75, M_PI); - else - cairo_line_to (cr, x, y + h); - - if (corners & CR_CORNER_TOPLEFT) - cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5); - else - cairo_line_to (cr, x, y); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_arc (cr, x + w - radius, y + radius, radius, M_PI * 1.5, M_PI * 1.75); - else - cairo_line_to (cr, x + w, y); - - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); -} - -static void -clearlooks_glossy_draw_highlight_and_shade (cairo_t *cr, - const CairoColor *bg_color, - const ShadowParameters *params, - int width, int height, gdouble radius) -{ - CairoColor shadow; - CairoColor highlight; - uint8 corners = params->corners; - double x = 1.0; - double y = 1.0; - - /* not really sure of shading ratios... we will think */ - ge_shade_color (bg_color, 0.8, &shadow); - ge_shade_color (bg_color, 1.2, &highlight); - - cairo_save (cr); - - /* Top/Left highlight */ - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_move_to (cr, x, y+height-radius); - else - cairo_move_to (cr, x, y+height); - - ge_cairo_rounded_corner (cr, x, y, radius, corners & CR_CORNER_TOPLEFT); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_line_to (cr, x+width-radius, y); - else - cairo_line_to (cr, x+width, y); - - if (params->shadow & CL_SHADOW_OUT) - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - else - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5); - - cairo_stroke (cr); - - /* Bottom/Right highlight -- this includes the corners */ - cairo_move_to (cr, x+width-radius, y); /* topright and by radius to the left */ - ge_cairo_rounded_corner (cr, x+width, y, radius, corners & CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, x+width, y+height, radius, corners & CR_CORNER_BOTTOMRIGHT); - ge_cairo_rounded_corner (cr, x, y+height, radius, corners & CR_CORNER_BOTTOMLEFT); - - if (params->shadow & CL_SHADOW_OUT) - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5); - else - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - - cairo_stroke (cr); - - cairo_restore (cr); -} - -static void -clearlooks_glossy_draw_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - double xoffset = 0, yoffset = 0; - CairoColor fill = colors->bg[params->state_type]; - CairoColor border_normal = colors->shade[6]; - CairoColor border_disabled = colors->shade[4]; - double radius; - - cairo_pattern_t *pattern; - - cairo_save (cr); - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - /* Shadows and Glow */ - if (params->xthickness == 3 || params->ythickness == 3) - { - if (params->xthickness == 3) - xoffset = 1; - if (params->ythickness == 3) - yoffset = 1; - } - - radius = MIN (params->radius, MIN ((width - 2.0 - 2*xoffset) / 2.0, (height - 2.0 - 2*yoffset) / 2.0)); - - if (params->xthickness == 3 || params->ythickness == 3) - { - cairo_translate (cr, 0.5, 0.5); - - /* if (params->enable_glow && !params->active && !params->disabled) */ - if (params->prelight && params->enable_glow && !params->active) - { - /* Glow becomes a shadow to have 3d prelight buttons :) */ - CairoColor glow; - - radius = MIN (params->radius, MIN ((width - 2.0 - 2*xoffset) / 2.0 - 1.0, (height - 2.0 - 2*yoffset) / 2.0 - 1.0)); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius+1, params->corners); - ge_shade_color (¶ms->parentbg, 0.96, &glow); - ge_cairo_set_color (cr, &glow); - cairo_stroke (cr); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius+1, params->corners); - ge_shade_color (¶ms->parentbg, 0.92, &glow); - ge_cairo_set_color (cr, &glow); - cairo_stroke (cr); - } - - /* if (!(params->enable_glow && !params->active && !params->disabled)) */ - if (!(params->prelight && params->enable_glow && !params->active)) - if (!(params->disabled)) - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners); - else - /*Draw a lighter inset */ - clearlooks_glossy_draw_light_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners); - cairo_translate (cr, -0.5, -0.5); - } - - clearlooks_draw_glossy_gradient (cr, xoffset+1, yoffset+1, - width-(xoffset*2)-2, height-(yoffset*2)-2, - &fill, params->disabled, radius, params->corners); - - /* Pressed button shadow */ - if (params->active) - { - CairoColor shadow; - ge_shade_color (&fill, 0.92, &shadow); - - cairo_save (cr); - - ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1, width-(xoffset*2)-2, height, radius, params->corners & (CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMLEFT)); - cairo_clip (cr); - cairo_rectangle (cr, xoffset+1, yoffset+1, width-(xoffset*2)-2, 3); - - pattern = cairo_pattern_create_linear (xoffset+1, yoffset+1, xoffset+1, yoffset+4); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.58); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_rectangle (cr, xoffset+1, yoffset+1, 3, height-(yoffset*2)-2); - - pattern = cairo_pattern_create_linear (xoffset+1, yoffset+1, xoffset+4, yoffset+1); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.58); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); - } - - /* Default button highlight */ - if (params->is_default && !params->active && !params->disabled) - { - const CairoColor *glow = &colors->spot[0]; - double hh = (height-5)/2.0 + 1; - - cairo_rectangle (cr, 3.5, 3.5, width-7, height-7); - ge_cairo_set_color (cr, glow); - cairo_stroke (cr); - - glow = &colors->spot[0]; - cairo_move_to (cr, 2.5, 2.5+hh); cairo_rel_line_to (cr, 0, -hh); - cairo_rel_line_to (cr, width-5, 0); cairo_rel_line_to (cr, 0, hh); - ge_cairo_set_color (cr, glow); - cairo_stroke (cr); - - hh--; - - glow = &colors->spot[1]; - cairo_move_to (cr, 2.5, 2.5+hh); cairo_rel_line_to (cr, 0, hh); - cairo_rel_line_to (cr, width-5, 0); cairo_rel_line_to (cr, 0, -hh); - ge_cairo_set_color (cr, glow); - cairo_stroke (cr); - } - - /* Border */ - if (params->is_default || (params->prelight && params->enable_glow)) - border_normal = colors->spot[2]; - /* ge_mix_color (&border_normal, &colors->spot[2], 0.5, &border_normal); */ - if (params->disabled) - ge_cairo_set_color (cr, &border_disabled); - else - clearlooks_set_mixed_color (cr, &border_normal, &fill, 0.2); - ge_cairo_rounded_rectangle (cr, xoffset + 0.5, yoffset + 0.5, - width-(xoffset*2)-1, height-(yoffset*2)-1, - radius, params->corners); - cairo_stroke (cr); - cairo_restore (cr); -} - -static void -clearlooks_glossy_draw_progressbar_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[6]; - CairoColor shadow; - cairo_pattern_t *pattern; - double radius = MIN (params->radius, MIN ((height-2.0) / 2.0, (width-2.0) / 2.0)); - - cairo_save (cr); - - cairo_set_line_width (cr, 1.0); - - /* Fill with bg color */ - ge_cairo_set_color (cr, &colors->bg[params->state_type]); - - cairo_rectangle (cr, x, y, width, height); - cairo_fill (cr); - - /* Create trough box */ - ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners); - ge_cairo_set_color (cr, &colors->shade[2]); - cairo_fill (cr); - - /* Draw border */ - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, radius, params->corners); - clearlooks_set_mixed_color (cr, border, &colors->shade[2], 0.3); - cairo_stroke (cr); - - /* clip the corners of the shadows */ - ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners); - cairo_clip (cr); - - ge_shade_color (border, 0.92, &shadow); - - /* Top shadow */ - cairo_rectangle (cr, x+1, y+1, width-2, 4); - pattern = cairo_pattern_create_linear (x, y, x, y+4); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Left shadow */ - cairo_rectangle (cr, x+1, y+1, 4, height-2); - pattern = cairo_pattern_create_linear (x, y, x+4, y); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); -} - -static void -clearlooks_glossy_draw_progressbar_fill (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ProgressBarParameters *progressbar, - int x, int y, int width, int height, - gint offset) -{ - boolean is_horizontal = progressbar->orientation < 2; - double tile_pos = 0; - double stroke_width; - double radius; - int x_step; - - cairo_pattern_t *pattern; - CairoColor a; - CairoColor b; - CairoColor e; - CairoColor border; - CairoColor shadow; - - radius = MAX (0, params->radius - params->xthickness); - - cairo_save (cr); - - if (!is_horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - if ((progressbar->orientation == CL_ORIENTATION_RIGHT_TO_LEFT) || (progressbar->orientation == CL_ORIENTATION_BOTTOM_TO_TOP)) - ge_cairo_mirror (cr, CR_MIRROR_HORIZONTAL, &x, &y, &width, &height); - - /* Clamp the radius so that the _height_ fits ... */ - radius = MIN (radius, height / 2.0); - - stroke_width = height*2; - x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */ - - cairo_translate (cr, x, y); - - cairo_save (cr); - /* This is kind of nasty ... Clip twice from each side in case the length - * of the fill is smaller than twice the radius. */ - ge_cairo_rounded_rectangle (cr, 0, 0, width + radius, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius, 0, width + radius, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - /* Draw the background gradient */ - ge_shade_color (&colors->spot[1], 1.16, &a); - ge_shade_color (&colors->spot[1], 1.08, &b); - ge_shade_color (&colors->spot[1], 1.08, &e); - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, a.r, a.g, a.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, b.r, b.g, b.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, colors->spot[1].r, colors->spot[1].g, colors->spot[1].b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, e.r, e.g, e.b); - cairo_set_source (cr, pattern); - cairo_paint (cr); - cairo_pattern_destroy (pattern); - - /* Draw the Strokes */ - while (tile_pos <= width+x_step) - { - cairo_move_to (cr, stroke_width/2-x_step, 0); - cairo_line_to (cr, stroke_width-x_step, 0); - cairo_line_to (cr, stroke_width/2-x_step, height); - cairo_line_to (cr, -x_step, height); - - cairo_translate (cr, stroke_width, 0); - tile_pos += stroke_width; - } - - cairo_set_source_rgba (cr, colors->spot[2].r, - colors->spot[2].g, - colors->spot[2].b, - 0.15); - - cairo_fill (cr); - cairo_restore (cr); /* rounded clip region */ - - /* inner highlight border - * This is again kinda ugly. Draw once from each side, clipping away the other. */ - cairo_set_source_rgba (cr, colors->spot[0].r, colors->spot[0].g, colors->spot[0].b, 0.3); - - /* left side */ - cairo_save (cr); - cairo_rectangle (cr, 0, 0, width / 2, height); - cairo_clip (cr); - - if (progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, 1.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - else - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - /* right side */ - cairo_save (cr); - cairo_rectangle (cr, width / 2, 0, (width+1) / 2, height); - cairo_clip (cr); - - if (progressbar->value < 1.0 || progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, -1.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - else - ge_cairo_rounded_rectangle (cr, -0.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - - /* Draw the dark lines and the shadow */ - cairo_save (cr); - /* Again, this weird clip area. */ - ge_cairo_rounded_rectangle (cr, -1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius - 1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - border = colors->spot[2]; - border.a = 0.5; - ge_shade_color (&colors->shade[6], 0.92, &shadow); - shadow.a = 0.2; - - if (progressbar->pulsing) - { - /* At the beginning of the bar. */ - cairo_move_to (cr, 0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, 0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, -0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, -0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, -0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - if (progressbar->value < 1.0 || progressbar->pulsing) - { - /* At the end of the bar. */ - cairo_move_to (cr, width - 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width - 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width - 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, width + 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width + 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width + 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - - cairo_restore (cr); - - cairo_restore (cr); /* rotation, mirroring */ -} - -static void -clearlooks_glossy_scale_draw_gradient (cairo_t *cr, - const CairoColor *c1, - const CairoColor *c2, - const CairoColor *c3, - int x, int y, int width, int height, - boolean horizontal) -{ - cairo_pattern_t *pattern; - - pattern = cairo_pattern_create_linear (0, 0, horizontal ? 0 : width, horizontal ? height : 0); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, c1->r, c1->g, c1->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, c2->r, c2->g, c2->b); - - cairo_rectangle (cr, x+0.5, y+0.5, width-1, height-1); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - clearlooks_set_mixed_color (cr, c3, c1, 0.3); - ge_cairo_stroke_rectangle (cr, x, y, width, height); -} - -#define TROUGH_SIZE 6 -static void -clearlooks_glossy_draw_scale_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - int trough_width, trough_height; - double translate_x, translate_y; - - if (slider->horizontal) - { - trough_width = width-3; - trough_height = TROUGH_SIZE-2; - - translate_x = x + 0.5; - translate_y = y + 0.5 + (height/2) - (TROUGH_SIZE/2); - } - else - { - trough_width = TROUGH_SIZE-2; - trough_height = height-3; - - translate_x = x + 0.5 + (width/2) - (TROUGH_SIZE/2); - translate_y = y + 0.5; - } - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, translate_x, translate_y); - - if (!slider->fill_level) - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, trough_width+2, trough_height+2, 0, 0); - - cairo_translate (cr, 1, 1); - - if (!slider->lower && !slider->fill_level) - clearlooks_glossy_scale_draw_gradient (cr, &colors->shade[3], /* top */ - &colors->shade[2], /* bottom */ - &colors->shade[6], /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal); - else - clearlooks_glossy_scale_draw_gradient (cr, &colors->spot[1], /* top */ - &colors->spot[0], /* bottom */ - &colors->spot[2], /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal); -} - -static void -clearlooks_glossy_draw_tab (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const TabParameters *tab, - int x, int y, int width, int height) -{ - - const CairoColor *border = &colors->shade[5]; - const CairoColor *stripe_fill = &colors->spot[1]; - const CairoColor *stripe_border = &colors->spot[2]; - const CairoColor *fill; - CairoColor hilight; - - cairo_pattern_t *pattern; - - double radius; - double strip_size; - - radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - /* Set clip */ - cairo_rectangle (cr, x, y, width, height); - cairo_clip (cr); - cairo_new_path (cr); - - /* Translate and set line width */ - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y+0.5); - - - /* Make the tabs slightly bigger than they should be, to create a gap */ - /* And calculate the strip size too, while you're at it */ - if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) - { - height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ - - if (tab->gap_side == CL_GAP_TOP) - cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ - } - else - { - width += 3.0; - strip_size = 2.0/width; - - if (tab->gap_side == CL_GAP_LEFT) - cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ - } - - /* Set the fill color */ - fill = &colors->bg[params->state_type]; - - /* Set tab shape */ - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, - radius, params->corners); - - /* Draw fill */ - ge_cairo_set_color (cr, fill); - cairo_fill (cr); - - ge_shade_color (fill, 1.3, &hilight); - - /* Draw highlight */ - if (!params->active) - { - ShadowParameters shadow; - - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = params->corners; - - clearlooks_glossy_draw_highlight_and_shade (cr, &colors->bg[0], &shadow, - width, - height, radius); - } - - if (params->active) - { - CairoColor shadow, hilight, f1, f2; - - pattern = cairo_pattern_create_linear (tab->gap_side == CL_GAP_LEFT ? width-1 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 1, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - ge_shade_color (fill, 1.06, &shadow); - ge_shade_color (fill, 1.18, &hilight); - ge_shade_color (fill, 1.12, &f1); - ge_shade_color (fill, 1.06, &f2); - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, hilight.r, hilight.g, hilight.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0/height, hilight.r, hilight.g, hilight.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0/height, f1.r, f1.g, f1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.45, f2.r, f2.g, f2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.45, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shadow.r, shadow.g, shadow.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - /* Draw shade */ - pattern = cairo_pattern_create_linear (tab->gap_side == CL_GAP_LEFT ? width-2 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 0, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - - cairo_pattern_add_color_stop_rgba (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b, 0.5); - cairo_pattern_add_color_stop_rgba (pattern, 0.8, fill->r, fill->g, fill->b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - if (params->active) - { - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - } - else - { - pattern = cairo_pattern_create_linear (tab->gap_side == CL_GAP_LEFT ? width-2 : 2, - tab->gap_side == CL_GAP_TOP ? height-2 : 2, - tab->gap_side == CL_GAP_RIGHT ? width : 2, - tab->gap_side == CL_GAP_BOTTOM ? height : 2); - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_border->r, stripe_border->g, stripe_border->b); - cairo_pattern_add_color_stop_rgb (pattern, 0.8, border->r, border->g, border->b); - cairo_set_source (cr, pattern); - cairo_stroke (cr); - cairo_pattern_destroy (pattern); - } -} - -static void -clearlooks_glossy_draw_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[7]; - CairoColor fill; - CairoColor hilight; - CairoColor a, b, c, d; - cairo_pattern_t *pattern; - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - cairo_translate (cr, -0.5, -0.5); - - ge_shade_color (&colors->bg[params->state_type], 1.0, &fill); - if (params->prelight) - ge_shade_color (&fill, 1.1, &fill); - - ge_shade_color (&fill, 1.25, &hilight); - ge_shade_color (&fill, 1.16, &a); - ge_shade_color (&fill, 1.08, &b); - ge_shade_color (&fill, 1.0, &c); - ge_shade_color (&fill, 1.08, &d); - - pattern = cairo_pattern_create_linear (1, 1, 1, height-2); - cairo_pattern_add_color_stop_rgb (pattern, 0, a.r, a.g, a.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, b.r, b.g, b.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, c.r, c.g, c.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, d.r, d.g, d.b); - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - clearlooks_set_mixed_color (cr, border, &fill, 0.2); - if (params->prelight) - ge_cairo_set_color (cr, &colors->spot[2]); - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, 2.5, params->corners); - cairo_stroke (cr); - - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - ge_cairo_rounded_rectangle (cr, 1.5, 1.5, width-3, height-3, 2.0, params->corners); - cairo_stroke (cr); -} - -static void -clearlooks_glossy_draw_slider_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - double radius = MIN (params->radius, MIN ((width - 1.0) / 2.0, (height - 1.0) / 2.0)); - - cairo_set_line_width (cr, 1.0); - - if (!slider->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x+0.5, y+0.5); - - params->style_functions->draw_shadow (cr, colors, radius, width-1, height-1); - params->style_functions->draw_slider (cr, colors, params, 1, 1, width-2, height-2); -} - -static void -clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - const ScrollBarStepperParameters *stepper, - int x, int y, int width, int height) -{ - CairoCorners corners = CR_CORNER_NONE; - const CairoColor *border = &colors->shade[7]; - CairoColor fill, s1, s2, s4; - cairo_pattern_t *pattern; - ShadowParameters shadow; - double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - if (scrollbar->horizontal) - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - } - else - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners); - - if (scrollbar->horizontal) - pattern = cairo_pattern_create_linear (0, 0, 0, height); - else - pattern = cairo_pattern_create_linear (0, 0, width, 0); - - fill = colors->bg[widget->state_type]; - ge_shade_color(&fill, 1.16, &s1); - ge_shade_color(&fill, 1.08, &s2); - ge_shade_color(&fill, 1.08, &s4); - - cairo_pattern_add_color_stop_rgb(pattern, 0, s1.r, s1.g, s1.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, s2.r, s2.g, s2.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, s4.r, s4.g, s4.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_translate (cr, 0.5, 0.5); - cairo_translate (cr, -0.5, -0.5); - - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners); - clearlooks_set_mixed_color (cr, border, &fill, 0.2); - if (widget->prelight) - ge_cairo_set_color (cr, &colors->spot[2]); - cairo_stroke (cr); - - cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; -} - -static void -clearlooks_glossy_draw_scrollbar_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[7]; - CairoColor fill = scrollbar->color; - CairoColor hilight; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - if (scrollbar->junction & CL_JUNCTION_BEGIN) - { - if (scrollbar->horizontal) - { - x -= 1; - width += 1; - } - else - { - y -= 1; - height += 1; - } - } - if (scrollbar->junction & CL_JUNCTION_END) - { - if (scrollbar->horizontal) - width += 1; - else - height += 1; - } - - if (!scrollbar->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x, y); - - if (widget->prelight) - ge_shade_color (&fill, 1.1, &fill); - - cairo_set_line_width (cr, 1); - - ge_shade_color (&fill, 1.25, &hilight); - ge_shade_color (&fill, 1.16, &shade1); - ge_shade_color (&fill, 1.08, &shade2); - ge_shade_color (&fill, 1.08, &shade3); - - pattern = cairo_pattern_create_linear (1, 1, 1, height-2); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb (pattern, 1, shade3.r, shade3.g, shade3.b); - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - if (scrollbar->has_color) - { - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - ge_cairo_stroke_rectangle (cr, 1.5, 1.5, width-3, height-3); - } - - clearlooks_set_mixed_color (cr, border, &fill, scrollbar->has_color? 0.4 : 0.2); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); -} - -static void -clearlooks_glossy_draw_list_view_header (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ListViewHeaderParameters *header, - int x, int y, int width, int height) -{ -/* - CairoColor *border = !params->prelight? (CairoColor*)&colors->shade[4] : (CairoColor*)&colors->spot[1]; -*/ - const CairoColor *border = &colors->shade[4]; - const CairoColor *fill = &colors->bg[params->state_type]; - CairoColor hilight; - CairoColor shade1, shade2, shade3; - - cairo_pattern_t *pattern; - - ge_shade_color (fill, 1.2, &hilight); - ge_shade_color (fill, 1.08, &shade1); - ge_shade_color (fill, 1.04, &shade2); - ge_shade_color (fill, 1.04, &shade3); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - /* Draw the fill */ - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0-1.0/height, shade3.r, shade3.g, shade3.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0-1.0/height, border->r, border->g, border->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, border->r, border->g, border->b); - - cairo_set_source (cr, pattern); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - cairo_pattern_destroy (pattern); - - /* Draw highlight */ - if (header->order == CL_ORDER_FIRST) - { - cairo_move_to (cr, 0.5, height-1); - cairo_line_to (cr, 0.5, 0.5); - } - else - cairo_move_to (cr, 0.0, 0.5); - - cairo_line_to (cr, width, 0.5); - - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - cairo_stroke (cr); - - /* Draw resize grip */ - if ((params->ltr && header->order != CL_ORDER_LAST) || - (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable) - { - SeparatorParameters separator; - separator.horizontal = FALSE; - - if (params->ltr) - params->style_functions->draw_separator (cr, colors, params, &separator, - width-1.5, 4.0, 2, height-8.0); - else - params->style_functions->draw_separator (cr, colors, params, &separator, - 1.5, 4.0, 2, height-8.0); - } -} - -static void -clearlooks_glossy_draw_toolbar (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ToolbarParameters *toolbar, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL]; - const CairoColor *dark = &colors->shade[3]; - CairoColor light; - ge_shade_color (fill, 1.1, &light); - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - if (toolbar->style == 1) /* Enable Extra features */ - { - cairo_pattern_t *pattern; - CairoColor shade1, shade2, shade3; - - ge_shade_color (fill, 1.08, &shade1); - ge_shade_color (fill, 1.04, &shade2); - ge_shade_color (fill, 1.04, &shade3); - - /* Draw the fill */ - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pattern); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - cairo_pattern_destroy (pattern); - } - else /* Flat */ - { - ge_cairo_set_color (cr, fill); - cairo_paint (cr); - - if (!toolbar->topmost) - { - /* Draw highlight */ - cairo_move_to (cr, 0, 0.5); - cairo_line_to (cr, width-1, 0.5); - ge_cairo_set_color (cr, &light); - cairo_stroke (cr); - } - } - - /* Draw shadow */ - cairo_move_to (cr, 0, height-0.5); - cairo_line_to (cr, width-1, height-0.5); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); -} - -static void -clearlooks_glossy_draw_menuitem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - const CairoColor *border = &colors->spot[2]; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - ge_shade_color (fill, 1.16, &shade1); - ge_shade_color (fill, 1.08, &shade2); - ge_shade_color (fill, 1.08, &shade3); - cairo_set_line_width (cr, 1.0); - - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width - 1, height - 1, params->radius, params->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); -} - -static void -clearlooks_glossy_draw_menubaritem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - const CairoColor *border = &colors->spot[2]; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - ge_shade_color (fill, 1.16, &shade1); - ge_shade_color (fill, 1.08, &shade2); - ge_shade_color (fill, 1.08, &shade3); - cairo_set_line_width (cr, 1.0); - - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width - 1, height - 1, params->radius, params->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); -} - -static void -clearlooks_glossy_draw_selected_cell (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - CairoColor color; - - if (params->focus) - color = colors->base[params->state_type]; - else - color = colors->base[GTK_STATE_ACTIVE]; - - clearlooks_draw_glossy_gradient (cr, x, y, width, height, &color, params->disabled, 0.0, CR_CORNER_NONE); -} - - -static void -clearlooks_glossy_draw_radiobutton (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height) -{ - const CairoColor *border; - const CairoColor *dot; - CairoColor shadow; - CairoColor highlight; - cairo_pattern_t *pt; - gboolean inconsistent; - gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN); - - inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN); - draw_bullet |= inconsistent; - - if (widget->disabled) - { - border = &colors->shade[5]; - dot = &colors->shade[6]; - } - else - { - if (widget->prelight) - border = &colors->spot[2]; - else - border = &colors->shade[6]; - dot = &colors->text[0]; - } - - ge_shade_color (&widget->parentbg, 0.9, &shadow); - ge_shade_color (&widget->parentbg, 1.1, &highlight); - - pt = cairo_pattern_create_linear (0, 0, 13, 13); - cairo_pattern_add_color_stop_rgb (pt, 0.0, shadow.r, shadow.b, shadow.g); - cairo_pattern_add_color_stop_rgba (pt, 0.5, shadow.r, shadow.b, shadow.g, 0.5); - cairo_pattern_add_color_stop_rgba (pt, 0.5, highlight.r, highlight.g, highlight.b, 0.5); - cairo_pattern_add_color_stop_rgb (pt, 1.0, highlight.r, highlight.g, highlight.b); - - cairo_translate (cr, x, y); - - cairo_set_line_width (cr, 2); - cairo_arc (cr, 7, 7, 6, 0, G_PI*2); - cairo_set_source (cr, pt); - cairo_stroke (cr); - cairo_pattern_destroy (pt); - - cairo_set_line_width (cr, 1); - - cairo_arc (cr, 7, 7, 5.5, 0, G_PI*2); - - if (!widget->disabled) - { - if (widget->prelight) - clearlooks_set_mixed_color (cr, &colors->base[0], &colors->spot[1], 0.5); - else - ge_cairo_set_color (cr, &colors->base[0]); - cairo_fill_preserve (cr); - } - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - if (draw_bullet) - { - if (inconsistent) - { - cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); - cairo_set_line_width (cr, 4); - - cairo_move_to(cr, 5, 7); - cairo_line_to(cr, 9, 7); - - ge_cairo_set_color (cr, dot); - cairo_stroke (cr); - } - else - { - cairo_arc (cr, 7, 7, 3, 0, G_PI*2); - ge_cairo_set_color (cr, dot); - cairo_fill (cr); - - cairo_arc (cr, 6, 6, 1, 0, G_PI*2); - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - cairo_fill (cr); - } - } -} - -static void -clearlooks_glossy_draw_checkbox (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height) -{ - const CairoColor *border; - const CairoColor *dot; - gboolean inconsistent = FALSE; - gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN); - - inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN); - draw_bullet |= inconsistent; - - if (widget->disabled) - { - border = &colors->shade[5]; - dot = &colors->shade[6]; - } - else - { - if (widget->prelight) - border = &colors->spot[2]; - else - border = &colors->shade[6]; - dot = &colors->text[GTK_STATE_NORMAL]; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - if (widget->xthickness > 2 && widget->ythickness > 2) - { - widget->style_functions->draw_inset (cr, &widget->parentbg, 0.5, 0.5, - width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - - /* Draw the rectangle for the checkbox itself */ - ge_cairo_rounded_rectangle (cr, 1.5, 1.5, - width-3, height-3, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - } - else - { - /* Draw the rectangle for the checkbox itself */ - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, - width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - } - - if (!widget->disabled) - { - if (widget->prelight) - clearlooks_set_mixed_color (cr, &colors->base[0], &colors->spot[1], 0.5); - else - ge_cairo_set_color (cr, &colors->base[0]); - cairo_fill_preserve (cr); - } - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - if (draw_bullet) - { - if (inconsistent) /* Inconsistent */ - { - cairo_set_line_width (cr, 2.0); - cairo_move_to (cr, 3, height*0.5); - cairo_line_to (cr, width-3, height*0.5); - } - else - { - cairo_set_line_width (cr, 1.7); - cairo_move_to (cr, 0.5 + (width*0.2), (height*0.5)); - cairo_line_to (cr, 0.5 + (width*0.4), (height*0.7)); - - cairo_curve_to (cr, 0.5 + (width*0.4), (height*0.7), - 0.5 + (width*0.5), (height*0.4), - 0.5 + (width*0.70), (height*0.25)); - - } - - ge_cairo_set_color (cr, dot); - cairo_stroke (cr); - } -} - -void -clearlooks_register_style_glossy (ClearlooksStyleFunctions *functions) -{ - functions->draw_inset = clearlooks_glossy_draw_inset; - functions->draw_button = clearlooks_glossy_draw_button; - functions->draw_progressbar_trough = clearlooks_glossy_draw_progressbar_trough; - functions->draw_progressbar_fill = clearlooks_glossy_draw_progressbar_fill; - functions->draw_scale_trough = clearlooks_glossy_draw_scale_trough; - functions->draw_tab = clearlooks_glossy_draw_tab; - functions->draw_slider = clearlooks_glossy_draw_slider; - functions->draw_slider_button = clearlooks_glossy_draw_slider_button; - functions->draw_scrollbar_stepper = clearlooks_glossy_draw_scrollbar_stepper; - functions->draw_scrollbar_slider = clearlooks_glossy_draw_scrollbar_slider; - functions->draw_list_view_header = clearlooks_glossy_draw_list_view_header; - functions->draw_toolbar = clearlooks_glossy_draw_toolbar; - functions->draw_menuitem = clearlooks_glossy_draw_menuitem; - functions->draw_menubaritem = clearlooks_glossy_draw_menubaritem; - functions->draw_selected_cell = clearlooks_glossy_draw_selected_cell; - functions->draw_checkbox = clearlooks_glossy_draw_checkbox; - functions->draw_radiobutton = clearlooks_glossy_draw_radiobutton; -} diff --git a/libs/clearlooks/clearlooks_draw_gummy.c b/libs/clearlooks/clearlooks_draw_gummy.c deleted file mode 100644 index e2a990230b..0000000000 --- a/libs/clearlooks/clearlooks_draw_gummy.c +++ /dev/null @@ -1,1524 +0,0 @@ -/* Clearlooks Gummy style - * Copyright (C) 2007 Andrea Cimitan - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Written by Andrea Cimitan - */ - -#include "clearlooks_draw.h" -#include "clearlooks_style.h" -#include "clearlooks_types.h" - -#include "support.h" -#include - -#include - -/* Normal shadings */ -#define SHADE_TOP 1.08 -#define SHADE_CENTER_TOP 1.02 -#define SHADE_BOTTOM 0.94 - -/* Topleft highlight */ -#define TOPLEFT_HIGHLIGHT_SHADE 1.3 -#define TOPLEFT_HIGHLIGHT_ALPHA 0.4 - -/* Listview */ -#define LISTVIEW_SHADE_TOP 1.06 -#define LISTVIEW_SHADE_CENTER_TOP 1.02 -#define LISTVIEW_SHADE_BOTTOM 0.96 - -/* Toolbar */ -#define TOOLBAR_SHADE_TOP 1.04 -#define TOOLBAR_SHADE_CENTER_TOP 1.01 -#define TOOLBAR_SHADE_BOTTOM 0.97 - - -static void -clearlooks_draw_gummy_gradient (cairo_t *cr, - double x, double y, int width, int height, - const CairoColor *color, - gboolean disabled, gboolean radius, CairoCorners corners) -{ - CairoColor fill; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pt; - - ge_shade_color (color, disabled? 1.04 : SHADE_TOP, &shade1); - ge_shade_color (color, disabled? 1.01 : SHADE_CENTER_TOP, &shade2); - ge_shade_color (color, disabled? 0.99 : 1.0, &fill); - ge_shade_color (color, disabled? 0.96 : SHADE_BOTTOM, &shade3); - - pt = cairo_pattern_create_linear (x, y, x, y+height); - cairo_pattern_add_color_stop_rgb (pt, 0.0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pt, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pt, 0.5, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb (pt, 1.0, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pt); - ge_cairo_rounded_rectangle (cr, x, y, width, height, radius, corners); - cairo_fill (cr); - - cairo_pattern_destroy (pt); -} - -static void -clearlooks_set_mixed_color (cairo_t *cr, - const CairoColor *color1, - const CairoColor *color2, - gdouble mix_factor) -{ - CairoColor composite; - - ge_mix_color (color1, color2, mix_factor, &composite); - ge_cairo_set_color (cr, &composite); -} - -static void -clearlooks_gummy_draw_highlight_and_shade (cairo_t *cr, - const CairoColor *bg_color, - const ShadowParameters *params, - int width, int height, gdouble radius) -{ - CairoColor shadow; - CairoColor highlight; - uint8 corners = params->corners; - double x = 1.0; - double y = 1.0; - - /* not really sure of shading ratios... we will think */ - ge_shade_color (bg_color, 0.8, &shadow); - ge_shade_color (bg_color, 1.2, &highlight); - - cairo_save (cr); - - /* Top/Left highlight */ - if (corners & CR_CORNER_BOTTOMLEFT) - cairo_move_to (cr, x, y+height-radius); - else - cairo_move_to (cr, x, y+height); - - ge_cairo_rounded_corner (cr, x, y, radius, corners & CR_CORNER_TOPLEFT); - - if (corners & CR_CORNER_TOPRIGHT) - cairo_line_to (cr, x+width-radius, y); - else - cairo_line_to (cr, x+width, y); - - if (params->shadow & CL_SHADOW_OUT) - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - else - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5); - - cairo_stroke (cr); - - /* Bottom/Right highlight -- this includes the corners */ - cairo_move_to (cr, x+width-radius, y); /* topright and by radius to the left */ - ge_cairo_rounded_corner (cr, x+width, y, radius, corners & CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, x+width, y+height, radius, corners & CR_CORNER_BOTTOMRIGHT); - ge_cairo_rounded_corner (cr, x, y+height, radius, corners & CR_CORNER_BOTTOMLEFT); - - if (params->shadow & CL_SHADOW_OUT) - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.5); - else - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - - cairo_stroke (cr); - - cairo_restore (cr); -} - -static void -clearlooks_gummy_draw_top_left_highlight (cairo_t *cr, const CairoColor *color, - const WidgetParameters *params, - int width, int height, gdouble radius) -{ - CairoColor hilight; - - double light_top = params->ythickness-1, - light_bottom = height - params->ythickness - 1, - light_left = params->xthickness-1, - light_right = width - params->xthickness - 1; - - ge_shade_color (color, TOPLEFT_HIGHLIGHT_SHADE, &hilight); - cairo_move_to (cr, light_left, light_bottom - (int)radius/2); - - ge_cairo_rounded_corner (cr, light_left, light_top, radius, params->corners & CR_CORNER_TOPLEFT); - - cairo_line_to (cr, light_right - (int)radius/2, light_top); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, TOPLEFT_HIGHLIGHT_ALPHA); - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - double xoffset = 0, yoffset = 0; - CairoColor fill = colors->bg[params->state_type]; - CairoColor border_normal = colors->shade[6]; - CairoColor border_disabled = colors->shade[4]; - double radius; - - cairo_pattern_t *pattern; - - cairo_save (cr); - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - /* Shadows and Glow */ - if (params->xthickness == 3 || params->ythickness == 3) - { - if (params->xthickness == 3) - xoffset = 1; - if (params->ythickness == 3) - yoffset = 1; - } - - radius = MIN (params->radius, MIN ((width - 2.0 - 2*xoffset) / 2.0, (height - 2.0 - 2*yoffset) / 2.0)); - - if (params->xthickness == 3 || params->ythickness == 3) - { - cairo_translate (cr, 0.5, 0.5); - - if (params->enable_glow && !params->active && !params->disabled && !params->is_default) - { - CairoColor shadow; - - radius = MIN (params->radius, MIN ((width - 2.0 - 2*xoffset) / 2.0 - 1.0, (height - 2.0 - 2*yoffset) / 2.0 - 1.0)); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius+1, params->corners); - ge_shade_color (¶ms->parentbg, 0.97, &shadow); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius+1, params->corners); - ge_shade_color (¶ms->parentbg, 0.93, &shadow); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - - if (params->is_default) - { - CairoColor shadow = colors->spot[1]; - - radius = MIN (params->radius, MIN ((width - 2.0 - 2*xoffset) / 2.0 - 1.0, (height - 2.0 - 2*yoffset) / 2.0 - 1.0)); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius+1, params->corners); - clearlooks_set_mixed_color (cr, ¶ms->parentbg, &shadow, 0.5); - cairo_stroke (cr); - } - - if (!(params->enable_glow && !params->active && !params->disabled)) - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners); - cairo_translate (cr, -0.5, -0.5); - } - - clearlooks_draw_gummy_gradient (cr, xoffset+1, yoffset+1, - width-(xoffset*2)-2, height-(yoffset*2)-2, - &fill, params->disabled, radius, params->corners); - - /* Pressed button shadow */ - if (params->active) - { - CairoColor shadow; - ge_shade_color (&fill, 0.92, &shadow); - - cairo_save (cr); - - ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1, width-(xoffset*2)-2, height, radius, - params->corners & (CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMLEFT)); - cairo_clip (cr); - cairo_rectangle (cr, xoffset+1, yoffset+1, width-(xoffset*2)-2, 3); - - pattern = cairo_pattern_create_linear (xoffset+1, yoffset+1, xoffset+1, yoffset+4); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.58); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_rectangle (cr, xoffset+1, yoffset+1, 3, height-(yoffset*2)-2); - - pattern = cairo_pattern_create_linear (xoffset+1, yoffset+1, xoffset+4, yoffset+1); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.58); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); - } - - /* Border */ - if (params->is_default) /* || (params->prelight && params->enable_glow)) */ - border_normal = colors->spot[2]; - if (params->disabled) - ge_cairo_set_color (cr, &border_disabled); - else - clearlooks_set_mixed_color (cr, &border_normal, &fill, 0.2); - ge_cairo_rounded_rectangle (cr, xoffset + 0.5, yoffset + 0.5, - width-(xoffset*2)-1, height-(yoffset*2)-1, - radius, params->corners); - cairo_stroke (cr); - - if (!params->active) - { - cairo_translate (cr, 0.5, 0.5); - clearlooks_gummy_draw_top_left_highlight (cr, &fill, params, width, height, radius); - } - cairo_restore (cr); -} - -static void -clearlooks_gummy_draw_entry (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *base = &colors->base[params->state_type]; - CairoColor border = colors->shade[params->disabled ? 4 : 6]; - double radius = MIN (params->radius, MIN ((width - 4.0) / 2.0, (height - 4.0) / 2.0)); - - if (params->focus) - border = colors->spot[2]; - - cairo_translate (cr, x+0.5, y+0.5); - cairo_set_line_width (cr, 1.0); - - /* Fill the background to get the correct corners. */ - cairo_rectangle (cr, -0.5, -0.5, width, height); - ge_cairo_set_color (cr, ¶ms->parentbg); - cairo_fill (cr); - - /* Fill with the base color, because it was just cleared above */ - cairo_rectangle (cr, 1.5, 1.5, width-4, height-4); - ge_cairo_set_color (cr, base); - cairo_fill (cr); - - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, radius+1, params->corners); - - /* Draw the inner shadow */ - if (params->focus) - { - /* ge_cairo_rounded_rectangle (cr, 2, 2, width-5, height-5, RADIUS-1, params->corners); */ - ge_cairo_set_color (cr, &colors->spot[0]); - ge_cairo_stroke_rectangle (cr, 2, 2, width-5, height-5); - } - else - { - CairoColor shadow; - ge_shade_color (&border, 0.92, &shadow); - - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, params->disabled ? 0.09 : 0.18); - /* - cairo_move_to (cr, 2, height-3); - cairo_arc (cr, params->xthickness+RADIUS-1, params->ythickness+RADIUS-1, RADIUS, G_PI, 270*(G_PI/180)); - cairo_line_to (cr, width-3, 2); - */ - cairo_move_to (cr, 2, height-3); - cairo_line_to (cr, 2, 2); - cairo_line_to (cr, width-3, 2); - cairo_stroke (cr); - } - - ge_cairo_rounded_rectangle (cr, 1, 1, width-3, height-3, radius, params->corners); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_progressbar_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[7]; - CairoColor shadow; - cairo_pattern_t *pattern; - double radius = MIN (params->radius, MIN ((height-2.0) / 2.0, (width-2.0) / 2.0)); - - cairo_save (cr); - - cairo_set_line_width (cr, 1.0); - - /* Fill with bg color */ - ge_cairo_set_color (cr, &colors->bg[params->state_type]); - - cairo_rectangle (cr, x, y, width, height); - cairo_fill (cr); - - /* Create trough box */ - ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners); - ge_cairo_set_color (cr, &colors->shade[2]); - cairo_fill (cr); - - /* Draw border */ - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, radius, params->corners); - clearlooks_set_mixed_color (cr, border, &colors->shade[2], 0.3); - cairo_stroke (cr); - - /* clip the corners of the shadows */ - ge_cairo_rounded_rectangle (cr, x+1, y+1, width-2, height-2, radius, params->corners); - cairo_clip (cr); - - ge_shade_color (border, 0.92, &shadow); - - /* Top shadow */ - cairo_rectangle (cr, x+1, y+1, width-2, 4); - pattern = cairo_pattern_create_linear (x, y, x, y+4); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Left shadow */ - cairo_rectangle (cr, x+1, y+1, 4, height-2); - pattern = cairo_pattern_create_linear (x, y, x+4, y); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); -} - -static void -clearlooks_gummy_draw_progressbar_fill (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ProgressBarParameters *progressbar, - int x, int y, int width, int height, gint offset) -{ - boolean is_horizontal = progressbar->orientation < 2; - double tile_pos = 0; - double stroke_width; - double radius; - int x_step; - - cairo_pattern_t *pattern; - CairoColor shade1, shade2, shade3; - CairoColor border; - CairoColor shadow; - - radius = MAX (0, params->radius - params->xthickness); - - cairo_save (cr); - - if (!is_horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - if ((progressbar->orientation == CL_ORIENTATION_RIGHT_TO_LEFT) || (progressbar->orientation == CL_ORIENTATION_BOTTOM_TO_TOP)) - ge_cairo_mirror (cr, CR_MIRROR_HORIZONTAL, &x, &y, &width, &height); - - /* Clamp the radius so that the _height_ fits ... */ - radius = MIN (radius, height / 2.0); - - stroke_width = height*2; - x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */ - - cairo_translate (cr, x, y); - - cairo_save (cr); - /* This is kind of nasty ... Clip twice from each side in case the length - * of the fill is smaller than twice the radius. */ - ge_cairo_rounded_rectangle (cr, 0, 0, width + radius, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius, 0, width + radius, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - /* Draw the background gradient */ - ge_shade_color (&colors->spot[1], SHADE_TOP, &shade1); - ge_shade_color (&colors->spot[1], SHADE_CENTER_TOP, &shade2); - ge_shade_color (&colors->spot[1], SHADE_BOTTOM, &shade3); - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, colors->spot[1].r, colors->spot[1].g, colors->spot[1].b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shade3.r, shade3.g, shade3.b); - cairo_set_source (cr, pattern); - cairo_paint (cr); - cairo_pattern_destroy (pattern); - - /* Draw the Strokes */ - while (tile_pos <= width+x_step) - { - cairo_move_to (cr, stroke_width/2-x_step, 0); - cairo_line_to (cr, stroke_width-x_step, 0); - cairo_line_to (cr, stroke_width/2-x_step, height); - cairo_line_to (cr, -x_step, height); - - cairo_translate (cr, stroke_width, 0); - tile_pos += stroke_width; - } - - cairo_set_source_rgba (cr, colors->spot[2].r, - colors->spot[2].g, - colors->spot[2].b, - 0.15); - - cairo_fill (cr); - cairo_restore (cr); /* rounded clip region */ - - /* inner highlight border - * This is again kinda ugly. Draw once from each side, clipping away the other. */ - cairo_set_source_rgba (cr, colors->spot[0].r, colors->spot[0].g, colors->spot[0].b, 0.2); - - /* left side */ - cairo_save (cr); - cairo_rectangle (cr, 0, 0, width / 2, height); - cairo_clip (cr); - - if (progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, 1.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - else - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - /* right side */ - cairo_save (cr); - cairo_rectangle (cr, width / 2, 0, (width+1) / 2, height); - cairo_clip (cr); - - if (progressbar->value < 1.0 || progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, -1.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - else - ge_cairo_rounded_rectangle (cr, -0.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - - /* Draw the dark lines and the shadow */ - cairo_save (cr); - /* Again, this weird clip area. */ - ge_cairo_rounded_rectangle (cr, -1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius - 1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - border = colors->spot[2]; - border.a = 0.6; - ge_shade_color (&colors->shade[7], 0.92, &shadow); - shadow.a = 0.2; - - if (progressbar->pulsing) - { - /* At the beginning of the bar. */ - cairo_move_to (cr, 0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, 0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, -0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, -0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, -0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - if (progressbar->value < 1.0 || progressbar->pulsing) - { - /* At the end of the bar. */ - cairo_move_to (cr, width - 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width - 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width - 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, width + 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width + 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width + 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - - cairo_restore (cr); - - cairo_restore (cr); /* rotation, mirroring */ -} - -static void -clearlooks_gummy_scale_draw_gradient (cairo_t *cr, - const CairoColor *fill, - const CairoColor *border, - int x, int y, int width, int height, - gboolean horizontal, gboolean in) -{ - cairo_pattern_t *pattern; - - CairoColor f1, f2; - - ge_shade_color (fill, in? 0.95 : 1.1, &f1); - ge_shade_color (fill, in? 1.05 : 0.9, &f2); - - pattern = cairo_pattern_create_linear (0, 0, horizontal ? 0 : width, horizontal ? height : 0); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, f1.r, f1.g, f1.b, f1.a); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, f2.r, f2.g, f2.b, f2.a); - - cairo_rectangle (cr, x+0.5, y+0.5, width-1, height-1); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - clearlooks_set_mixed_color (cr, border, fill, 0.2); - ge_cairo_stroke_rectangle (cr, x, y, width, height); -} - -#define TROUGH_SIZE 6 -static void -clearlooks_gummy_draw_scale_trough (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - int trough_width, trough_height; - double translate_x, translate_y; - - if (slider->horizontal) - { - trough_width = width-3; - trough_height = TROUGH_SIZE-2; - - translate_x = x + 0.5; - translate_y = y + 0.5 + (height/2) - (TROUGH_SIZE/2); - } - else - { - trough_width = TROUGH_SIZE-2; - trough_height = height-3; - - translate_x = x + 0.5 + (width/2) - (TROUGH_SIZE/2); - translate_y = y + 0.5; - } - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, translate_x, translate_y); - - if (!slider->fill_level) - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, trough_width+2, trough_height+2, 0, 0); - - cairo_translate (cr, 1, 1); - - if (!slider->lower && !slider->fill_level) - clearlooks_gummy_scale_draw_gradient (cr, - &colors->shade[2], /* bottom */ - &colors->shade[6], /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal, TRUE); - else if (!slider->fill_level) - clearlooks_gummy_scale_draw_gradient (cr, - &colors->spot[1], /* bottom */ - &colors->spot[2], /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal, FALSE); - else { - CairoColor c1 = colors->spot[1]; - CairoColor c2 = colors->spot[2]; - - c1.a = 0.25; - c2.a = 0.25; - - clearlooks_gummy_scale_draw_gradient (cr, - &c1, /* bottom */ - &c2, /* border */ - 0, 0, trough_width, trough_height, - slider->horizontal, FALSE); - } - -} - -static void -clearlooks_gummy_draw_tab (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const TabParameters *tab, - int x, int y, int width, int height) -{ - - const CairoColor *border = &colors->shade[5]; - const CairoColor *stripe_fill = &colors->spot[1]; - const CairoColor *stripe_border = &colors->spot[2]; - const CairoColor *fill; - - cairo_pattern_t *pattern; - - double radius; - double strip_size; - - radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - /* Set clip */ - cairo_rectangle (cr, x, y, width, height); - cairo_clip (cr); - cairo_new_path (cr); - - /* Translate and set line width */ - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y+0.5); - - /* Make the tabs slightly bigger than they should be, to create a gap */ - /* And calculate the strip size too, while you're at it */ - if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) - { - height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ - - if (tab->gap_side == CL_GAP_TOP) - cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ - } - else - { - width += 3.0; - strip_size = 2.0/width; - - if (tab->gap_side == CL_GAP_LEFT) - cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ - } - - /* Set the fill color */ - fill = &colors->bg[params->state_type]; - - /* Set tab shape */ - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, - radius, params->corners); - - /* Draw fill */ - ge_cairo_set_color (cr, fill); - cairo_fill (cr); - - /* Draw highlight */ - if (!params->active) - { - ShadowParameters shadow; - - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = params->corners; - - clearlooks_gummy_draw_highlight_and_shade (cr, &colors->bg[0], &shadow, - width, height, radius); - } - - if (params->active) - { - CairoColor hilight; - CairoColor shade1, shade2, shade3; - - pattern = cairo_pattern_create_linear (tab->gap_side == CL_GAP_LEFT ? width-1 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 1, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - ge_shade_color (fill, 1.14, &hilight); - ge_shade_color (fill, SHADE_TOP, &shade1); - ge_shade_color (fill, SHADE_CENTER_TOP, &shade2); - ge_shade_color (fill, SHADE_BOTTOM, &shade3); - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, hilight.r, hilight.g, hilight.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0/height, hilight.r, hilight.g, hilight.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0/height, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.45, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.45, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shade3.r, shade3.g, shade3.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - /* Draw shade */ - pattern = cairo_pattern_create_linear (tab->gap_side == CL_GAP_LEFT ? width-2 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 0, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - cairo_pattern_add_color_stop_rgba (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b, 0.5); - cairo_pattern_add_color_stop_rgba (pattern, 0.8, fill->r, fill->g, fill->b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - if (params->active) - { - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - } - else - { - pattern = cairo_pattern_create_linear (tab->gap_side == CL_GAP_LEFT ? width-2 : 2, - tab->gap_side == CL_GAP_TOP ? height-2 : 2, - tab->gap_side == CL_GAP_RIGHT ? width : 2, - tab->gap_side == CL_GAP_BOTTOM ? height : 2); - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_border->r, stripe_border->g, stripe_border->b); - cairo_pattern_add_color_stop_rgb (pattern, 0.8, border->r, border->g, border->b); - cairo_set_source (cr, pattern); - cairo_stroke (cr); - cairo_pattern_destroy (pattern); - } -} - -static void -clearlooks_gummy_draw_separator (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SeparatorParameters *separator, - int x, int y, int width, int height) -{ - CairoColor color = colors->shade[3]; - CairoColor hilight; - ge_shade_color (&color, 1.3, &hilight); - - cairo_save (cr); - cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT); - - if (separator->horizontal) - { - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y+0.5); - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, width, 0.0); - ge_cairo_set_color (cr, &color); - cairo_stroke (cr); - - cairo_move_to (cr, 0.0, 1.0); - cairo_line_to (cr, width, 1.0); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - } - else - { - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y); - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, 0.0, height); - ge_cairo_set_color (cr, &color); - cairo_stroke (cr); - - cairo_move_to (cr, 1.0, 0.0); - cairo_line_to (cr, 1.0, height); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - } - - cairo_restore (cr); -} - -static void -clearlooks_gummy_draw_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[7]; - CairoColor fill; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - int bar_x, i; - int shift_x; - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - cairo_translate (cr, -0.5, -0.5); - - ge_shade_color (&colors->bg[params->state_type], 1.0, &fill); - if (params->prelight) - ge_shade_color (&fill, 1.04, &fill); - - ge_shade_color (&fill, SHADE_TOP, &shade1); - ge_shade_color (&fill, SHADE_CENTER_TOP, &shade2); - ge_shade_color (&fill, SHADE_BOTTOM, &shade3); - - pattern = cairo_pattern_create_linear (1, 1, 1, height-2); - cairo_pattern_add_color_stop_rgb(pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, shade3.r, shade3.g, shade3.b); - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - clearlooks_set_mixed_color (cr, border, &fill, 0.2); - if (params->prelight) - ge_cairo_set_color (cr, &colors->spot[2]); - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, 2.5, params->corners); - cairo_stroke (cr); - - /* Handle */ - shift_x = (width%2 == 0 ? 1 : 0); - bar_x = width/2-3+shift_x; - cairo_translate (cr, 0.5, 0.5); - ge_cairo_set_color (cr, border); - for (i=0; i<3-shift_x; i++) - { - cairo_move_to (cr, bar_x, 4); - cairo_line_to (cr, bar_x, height-5); - bar_x += 3; - } - cairo_stroke (cr); - - clearlooks_gummy_draw_top_left_highlight (cr, &fill, params, width, height, 2.0); -} - -static void -clearlooks_gummy_draw_slider_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - double radius = MIN (params->radius, MIN ((width - 1.0) / 2.0, (height - 1.0) / 2.0)); - - cairo_set_line_width (cr, 1.0); - - if (!slider->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x+0.5, y+0.5); - - params->style_functions->draw_shadow (cr, colors, radius, width-1, height-1); - params->style_functions->draw_slider (cr, colors, params, 1, 1, width-2, height-2); -} - -static void -clearlooks_gummy_draw_scrollbar_stepper (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - const ScrollBarStepperParameters *stepper, - int x, int y, int width, int height) -{ - CairoCorners corners = CR_CORNER_NONE; - const CairoColor *border = &colors->shade[scrollbar->has_color ? 7 : 6]; - CairoColor fill; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - ShadowParameters shadow; - double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - if (scrollbar->horizontal) - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - } - else - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners); - - if (scrollbar->horizontal) - pattern = cairo_pattern_create_linear (0, 0, 0, height); - else - pattern = cairo_pattern_create_linear (0, 0, width, 0); - - fill = colors->bg[widget->state_type]; - ge_shade_color(&fill, SHADE_TOP, &shade1); - ge_shade_color(&fill, SHADE_CENTER_TOP, &shade2); - ge_shade_color(&fill, SHADE_BOTTOM, &shade3); - - cairo_pattern_add_color_stop_rgb(pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb(pattern, 0.5, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, shade3.r, shade3.g, shade3.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_translate (cr, 0.5, 0.5); - clearlooks_gummy_draw_top_left_highlight (cr, &fill, widget, width, height, (stepper->stepper == CL_STEPPER_A) ? radius : 0); - cairo_translate (cr, -0.5, -0.5); - - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners); - clearlooks_set_mixed_color (cr, border, &fill, 0.2); - cairo_stroke (cr); - - cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; -} - -static void -clearlooks_gummy_draw_scrollbar_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height) -{ - CairoColor fill = scrollbar->color; - CairoColor border, handles; - CairoColor hilight; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - int bar_x, i; - - gdouble hue_scroll, brightness_scroll, saturation_scroll; - gdouble hue_bg, brightness_bg, saturation_bg; - - ge_hsb_from_color (&fill, &hue_scroll, &saturation_scroll, &brightness_scroll); - ge_hsb_from_color (&colors->bg[0], &hue_bg, &saturation_bg, &brightness_bg); - - /* Set the right color for border and handles */ - if ((fabs(saturation_scroll - saturation_bg) < 0.30) && - (fabs(brightness_scroll - brightness_bg) < 0.20)) - ge_shade_color (&fill, 0.475, &border); - else - ge_shade_color (&fill, 0.575, &border); - /* The following lines increase contrast when the HUE is between 25 and 195, */ - /* fixing a LOT of colorschemes! */ - if (scrollbar->has_color && (hue_scroll < 195) && (hue_scroll > 25)) - ge_shade_color (&border, 0.85, &border); - - handles = border; - ge_mix_color (&border, &fill, scrollbar->has_color? 0.3 : 0.2, &border); - - if (scrollbar->junction & CL_JUNCTION_BEGIN) - { - if (scrollbar->horizontal) - { - x -= 1; - width += 1; - } - else - { - y -= 1; - height += 1; - } - } - if (scrollbar->junction & CL_JUNCTION_END) - { - if (scrollbar->horizontal) - width += 1; - else - height += 1; - } - - if (!scrollbar->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x, y); - - if (widget->prelight) - ge_shade_color (&fill, 1.04, &fill); - - cairo_set_line_width (cr, 1); - - ge_shade_color (&fill, TOPLEFT_HIGHLIGHT_SHADE, &hilight); - ge_shade_color (&fill, SHADE_TOP, &shade1); - ge_shade_color (&fill, SHADE_CENTER_TOP, &shade2); - ge_shade_color (&fill, SHADE_BOTTOM, &shade3); - - pattern = cairo_pattern_create_linear (1, 1, 1, height-2); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb (pattern, 1, shade3.r, shade3.g, shade3.b); - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - if (scrollbar->has_color) - { - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.2); - ge_cairo_stroke_rectangle (cr, 1.5, 1.5, width-3, height-3); - } - else - { - cairo_move_to (cr, 1.5, height-1.5); - cairo_line_to (cr, 1.5, 1.5); - cairo_line_to (cr, width-1.5, 1.5); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, TOPLEFT_HIGHLIGHT_ALPHA); - cairo_stroke(cr); - } - - ge_cairo_set_color (cr, &border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); - - /* Handle */ - bar_x = width/2 - 4; - cairo_translate(cr, 0.5, 0.5); - ge_cairo_set_color (cr, &handles); - for (i=0; i<3; i++) - { - cairo_move_to (cr, bar_x, 5); - cairo_line_to (cr, bar_x, height-6); - bar_x += 3; - } - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_list_view_header (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ListViewHeaderParameters *header, - int x, int y, int width, int height) -{ -/* - CairoColor *border = !params->prelight? (CairoColor*)&colors->shade[4] : (CairoColor*)&colors->spot[1]; -*/ - const CairoColor *border = &colors->shade[4]; - const CairoColor *fill = &colors->bg[params->state_type]; - CairoColor hilight; - CairoColor shade1, shade2, shade3; - - cairo_pattern_t *pattern; - - ge_shade_color (fill, 1.11, &hilight); - ge_shade_color (fill, LISTVIEW_SHADE_TOP, &shade1); - ge_shade_color (fill, LISTVIEW_SHADE_CENTER_TOP, &shade2); - ge_shade_color (fill, LISTVIEW_SHADE_BOTTOM, &shade3); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - /* Draw the fill */ - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0-1.0/height, shade3.r, shade3.g, shade3.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0-1.0/height, border->r, border->g, border->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, border->r, border->g, border->b); - - cairo_set_source (cr, pattern); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - cairo_pattern_destroy (pattern); - - /* Draw highlight */ - if (header->order == CL_ORDER_FIRST) - { - cairo_move_to (cr, 0.5, height-1.5); - cairo_line_to (cr, 0.5, 0.5); - } - else - cairo_move_to (cr, 0.0, 0.5); - - cairo_line_to (cr, width, 0.5); - - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - - /* Draw resize grip */ - if ((params->ltr && header->order != CL_ORDER_LAST) || - (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable) - { - SeparatorParameters separator; - separator.horizontal = FALSE; - - if (params->ltr) - params->style_functions->draw_separator (cr, colors, params, &separator, - width-1.5, 4.0, 2, height-8.0); - else - params->style_functions->draw_separator (cr, colors, params, &separator, - 1.5, 4.0, 2, height-8.0); - } -} - -static void -clearlooks_gummy_draw_toolbar (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ToolbarParameters *toolbar, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL]; - const CairoColor *dark = &colors->shade[3]; - CairoColor light; - ge_shade_color (fill, toolbar->style == 1 ? 1.1 : 1.05, &light); - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - if (toolbar->style == 1) /* Enable Extra features */ - { - cairo_pattern_t *pattern; - CairoColor shade1, shade2, shade3; - - ge_shade_color (fill, TOOLBAR_SHADE_TOP, &shade1); - ge_shade_color (fill, TOOLBAR_SHADE_CENTER_TOP, &shade2); - ge_shade_color (fill, TOOLBAR_SHADE_BOTTOM, &shade3); - - /* Draw the fill */ - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pattern); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - cairo_pattern_destroy (pattern); - } - else /* Flat */ - { - ge_cairo_set_color (cr, fill); - cairo_paint (cr); - } - - if (!toolbar->topmost) - { - /* Draw highlight */ - cairo_move_to (cr, 0, 0.5); - cairo_line_to (cr, width-1, 0.5); - ge_cairo_set_color (cr, &light); - cairo_stroke (cr); - } - - /* Draw shadow */ - cairo_move_to (cr, 0, height-0.5); - cairo_line_to (cr, width-1, height-0.5); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_menuitem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - const CairoColor *border = &colors->spot[2]; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - ge_shade_color (fill, SHADE_TOP, &shade1); - ge_shade_color (fill, SHADE_CENTER_TOP, &shade2); - ge_shade_color (fill, SHADE_BOTTOM, &shade3); - cairo_set_line_width (cr, 1.0); - - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width - 1, height - 1, params->radius, params->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_menubaritem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - const CairoColor *border = &colors->spot[2]; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - ge_shade_color (fill, SHADE_TOP, &shade1); - ge_shade_color (fill, SHADE_CENTER_TOP, &shade2); - ge_shade_color (fill, SHADE_BOTTOM, &shade3); - cairo_set_line_width (cr, 1.0); - - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width - 1, height - 1, params->radius, params->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, shade1.r, shade1.g, shade1.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, fill->r, fill->g, fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1, shade3.r, shade3.g, shade3.b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_selected_cell (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - CairoColor color; - - if (params->focus) - color = colors->base[params->state_type]; - else - color = colors->base[GTK_STATE_ACTIVE]; - - clearlooks_draw_gummy_gradient (cr, x, y, width, height, &color, params->disabled, 0.0, CR_CORNER_NONE); -} - -static void -clearlooks_gummy_draw_statusbar (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - const CairoColor *dark = &colors->shade[3]; - CairoColor hilight; - - ge_shade_color (dark, 1.3, &hilight); - - cairo_set_line_width (cr, 1); - cairo_translate (cr, x, y+0.5); - cairo_move_to (cr, 0, 0); - cairo_line_to (cr, width, 0); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); - - cairo_translate (cr, 0, 1); - cairo_move_to (cr, 0, 0); - cairo_line_to (cr, width, 0); - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); -} - -static void -clearlooks_gummy_draw_radiobutton (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height) -{ - const CairoColor *border; - const CairoColor *dot; - CairoColor shadow; - CairoColor highlight; - cairo_pattern_t *pt; - gboolean inconsistent; - gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN); - - inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN); - draw_bullet |= inconsistent; - - if (widget->disabled) - { - border = &colors->shade[5]; - dot = &colors->shade[6]; - } - else - { - if (widget->prelight) - border = &colors->spot[2]; - else - border = &colors->shade[6]; - dot = &colors->text[0]; - } - - ge_shade_color (&widget->parentbg, 0.9, &shadow); - ge_shade_color (&widget->parentbg, 1.1, &highlight); - - pt = cairo_pattern_create_linear (0, 0, 13, 13); - cairo_pattern_add_color_stop_rgb (pt, 0.0, shadow.r, shadow.b, shadow.g); - cairo_pattern_add_color_stop_rgba (pt, 0.5, shadow.r, shadow.b, shadow.g, 0.5); - cairo_pattern_add_color_stop_rgba (pt, 0.5, highlight.r, highlight.g, highlight.b, 0.5); - cairo_pattern_add_color_stop_rgb (pt, 1.0, highlight.r, highlight.g, highlight.b); - - cairo_translate (cr, x, y); - - cairo_set_line_width (cr, 2); - cairo_arc (cr, 7, 7, 6, 0, G_PI*2); - cairo_set_source (cr, pt); - cairo_stroke (cr); - cairo_pattern_destroy (pt); - - cairo_set_line_width (cr, 1); - - cairo_arc (cr, 7, 7, 5.5, 0, G_PI*2); - - if (!widget->disabled) - { - if (widget->prelight) - clearlooks_set_mixed_color (cr, &colors->base[0], &colors->spot[1], 0.5); - else - ge_cairo_set_color (cr, &colors->base[0]); - cairo_fill_preserve (cr); - } - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - if (draw_bullet) - { - if (inconsistent) - { - cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); - cairo_set_line_width (cr, 4); - - cairo_move_to(cr, 5, 7); - cairo_line_to(cr, 9, 7); - - ge_cairo_set_color (cr, dot); - cairo_stroke (cr); - } - else - { - cairo_arc (cr, 7, 7, 3, 0, G_PI*2); - ge_cairo_set_color (cr, dot); - cairo_fill (cr); - - cairo_arc (cr, 6, 6, 1, 0, G_PI*2); - cairo_set_source_rgba (cr, highlight.r, highlight.g, highlight.b, 0.5); - cairo_fill (cr); - } - } -} - -static void -clearlooks_gummy_draw_checkbox (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height) -{ - const CairoColor *border; - const CairoColor *dot; - gboolean inconsistent = FALSE; - gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN); - - inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN); - draw_bullet |= inconsistent; - - if (widget->disabled) - { - border = &colors->shade[5]; - dot = &colors->shade[6]; - } - else - { - if (widget->prelight) - border = &colors->spot[2]; - else - border = &colors->shade[6]; - dot = &colors->text[GTK_STATE_NORMAL]; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - if (widget->xthickness > 2 && widget->ythickness > 2) - { - widget->style_functions->draw_inset (cr, &widget->parentbg, 0.5, 0.5, - width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - - /* Draw the rectangle for the checkbox itself */ - ge_cairo_rounded_rectangle (cr, 1.5, 1.5, - width-3, height-3, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - } - else - { - /* Draw the rectangle for the checkbox itself */ - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, - width-1, height-1, (widget->radius > 0)? 1 : 0, CR_CORNER_ALL); - } - - if (!widget->disabled) - { - if (widget->prelight) - clearlooks_set_mixed_color (cr, &colors->base[0], &colors->spot[1], 0.5); - else - ge_cairo_set_color (cr, &colors->base[0]); - cairo_fill_preserve (cr); - } - - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - if (draw_bullet) - { - if (inconsistent) /* Inconsistent */ - { - cairo_set_line_width (cr, 2.0); - cairo_move_to (cr, 3, height*0.5); - cairo_line_to (cr, width-3, height*0.5); - } - else - { - cairo_set_line_width (cr, 1.7); - cairo_move_to (cr, 0.5 + (width*0.2), (height*0.5)); - cairo_line_to (cr, 0.5 + (width*0.4), (height*0.7)); - - cairo_curve_to (cr, 0.5 + (width*0.4), (height*0.7), - 0.5 + (width*0.5), (height*0.4), - 0.5 + (width*0.70), (height*0.25)); - - } - - ge_cairo_set_color (cr, dot); - cairo_stroke (cr); - } -} - -void -clearlooks_register_style_gummy (ClearlooksStyleFunctions *functions) -{ - functions->draw_button = clearlooks_gummy_draw_button; - functions->draw_entry = clearlooks_gummy_draw_entry; - functions->draw_progressbar_trough = clearlooks_gummy_draw_progressbar_trough; - functions->draw_progressbar_fill = clearlooks_gummy_draw_progressbar_fill; - functions->draw_scale_trough = clearlooks_gummy_draw_scale_trough; - functions->draw_tab = clearlooks_gummy_draw_tab; - functions->draw_separator = clearlooks_gummy_draw_separator; - functions->draw_slider = clearlooks_gummy_draw_slider; - functions->draw_slider_button = clearlooks_gummy_draw_slider_button; - functions->draw_scrollbar_stepper = clearlooks_gummy_draw_scrollbar_stepper; - functions->draw_scrollbar_slider = clearlooks_gummy_draw_scrollbar_slider; - functions->draw_list_view_header = clearlooks_gummy_draw_list_view_header; - functions->draw_toolbar = clearlooks_gummy_draw_toolbar; - functions->draw_menuitem = clearlooks_gummy_draw_menuitem; - functions->draw_menubaritem = clearlooks_gummy_draw_menubaritem; - functions->draw_selected_cell = clearlooks_gummy_draw_selected_cell; - functions->draw_statusbar = clearlooks_gummy_draw_statusbar; - functions->draw_checkbox = clearlooks_gummy_draw_checkbox; - functions->draw_radiobutton = clearlooks_gummy_draw_radiobutton; -} diff --git a/libs/clearlooks/clearlooks_draw_inverted.c b/libs/clearlooks/clearlooks_draw_inverted.c deleted file mode 100644 index 2e8ee3bcd7..0000000000 --- a/libs/clearlooks/clearlooks_draw_inverted.c +++ /dev/null @@ -1,1002 +0,0 @@ -/* Clearlooks Inverted style - * Copyright (C) 2007 Andrea Cimitan - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Written by Andrea Cimitan - */ - -#include "clearlooks_draw.h" -#include "clearlooks_style.h" -#include "clearlooks_types.h" - -#include "support.h" -#include - -#include - - -static void -clearlooks_draw_top_left_highlight (cairo_t *cr, - const CairoColor *color, - const WidgetParameters *params, - int width, int height, gdouble radius) -{ - CairoColor hilight; - - double light_top = params->ythickness-1, - light_bottom = height - params->ythickness - 1, - light_left = params->xthickness-1, - light_right = width - params->xthickness - 1; - - ge_shade_color (color, 1.3, &hilight); - cairo_move_to (cr, light_left, light_bottom - (int)radius/2); - - ge_cairo_rounded_corner (cr, light_left, light_top, radius, params->corners & CR_CORNER_TOPLEFT); - - cairo_line_to (cr, light_right - (int)radius/2, light_top); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.7); - cairo_stroke (cr); -} - -static void -clearlooks_set_border_gradient (cairo_t *cr, const CairoColor *color, double hilight, int width, int height) -{ - cairo_pattern_t *pattern; - - CairoColor bottom_shade; - ge_shade_color (color, hilight, &bottom_shade); - - pattern = cairo_pattern_create_linear (0, 0, width, height); - cairo_pattern_add_color_stop_rgb (pattern, 0, color->r, color->g, color->b); - cairo_pattern_add_color_stop_rgb (pattern, 1, bottom_shade.r, bottom_shade.g, bottom_shade.b); - - cairo_set_source (cr, pattern); - cairo_pattern_destroy (pattern); -} - -static void -clearlooks_inverted_draw_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - double xoffset = 0, yoffset = 0; - double radius = params->radius; - const CairoColor *fill = &colors->bg[params->state_type]; - const CairoColor *border_disabled = &colors->shade[4]; - CairoColor border_normal; - CairoColor shadow; - - ge_shade_color(&colors->shade[6], 1.05, &border_normal); - ge_shade_color (&border_normal, 0.925, &shadow); - - cairo_save (cr); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - if (params->xthickness == 3 || params->ythickness == 3) - { - if (params->xthickness == 3) - xoffset = 1; - if (params->ythickness == 3) - yoffset = 1; - } - - radius = MIN (radius, MIN ((width - 2.0 - xoffset * 2.0) / 2.0, (height - 2.0 - yoffset * 2) / 2.0)); - - if (params->xthickness == 3 || params->ythickness == 3) - { - cairo_translate (cr, 0.5, 0.5); - params->style_functions->draw_inset (cr, ¶ms->parentbg, 0, 0, width-1, height-1, radius+1, params->corners); - cairo_translate (cr, -0.5, -0.5); - } - - ge_cairo_rounded_rectangle (cr, xoffset+1, yoffset+1, - width-(xoffset*2)-2, - height-(yoffset*2)-2, - radius, params->corners); - - if (!params->active) - { - cairo_pattern_t *pattern; - - CairoColor top_shade, bottom_shade; - ge_shade_color (fill, 0.95, &top_shade); - ge_shade_color (fill, 1.05, &bottom_shade); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, top_shade.r, top_shade.g, top_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, bottom_shade.r, bottom_shade.g, bottom_shade.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - cairo_pattern_t *pattern; - - ge_cairo_set_color (cr, fill); - cairo_fill_preserve (cr); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_pattern_add_color_stop_rgba (pattern, 0.4, shadow.r, shadow.g, shadow.b, 0.0); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.2); - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - pattern = cairo_pattern_create_linear (0, yoffset+1, 0, 3+yoffset); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, params->disabled ? 0.125 : 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - pattern = cairo_pattern_create_linear (xoffset+1, 0, 3+xoffset, 0); - cairo_pattern_add_color_stop_rgba (pattern, 0.0, shadow.r, shadow.g, shadow.b, params->disabled ? 0.125 : 0.3); - cairo_pattern_add_color_stop_rgba (pattern, 1.0, shadow.r, shadow.g, shadow.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - - /* Drawing the border */ - - if (!params->active && params->is_default) - { - const CairoColor *l = &colors->shade[4]; - const CairoColor *d = &colors->shade[4]; - ge_cairo_set_color (cr, l); - ge_cairo_stroke_rectangle (cr, 2.5, 2.5, width-5, height-5); - - ge_cairo_set_color (cr, d); - ge_cairo_stroke_rectangle (cr, 3.5, 3.5, width-7, height-7); - } - - if (params->disabled) - ge_cairo_set_color (cr, border_disabled); - else - if (!params->active) - clearlooks_set_border_gradient (cr, &border_normal, 1.32, 0, height); - else - ge_cairo_set_color (cr, &border_normal); - - ge_cairo_rounded_rectangle (cr, xoffset + 0.5, yoffset + 0.5, - width-(xoffset*2)-1, height-(yoffset*2)-1, - radius, params->corners); - cairo_stroke (cr); - - /* Draw the "shadow" */ - if (!params->active) - { - cairo_translate (cr, 0.5, 0.5); - /* Draw right shadow */ - cairo_move_to (cr, width-params->xthickness, params->ythickness - 1); - cairo_line_to (cr, width-params->xthickness, height - params->ythickness - 1); - cairo_set_source_rgba (cr, shadow.r, shadow.g, shadow.b, 0.1); - cairo_stroke (cr); - - /* Draw topleft shadow */ - clearlooks_draw_top_left_highlight (cr, fill, params, width, height, radius); - } - cairo_restore (cr); -} - -static void -clearlooks_inverted_draw_progressbar_fill (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ProgressBarParameters *progressbar, - int x, int y, int width, int height, - gint offset) -{ - boolean is_horizontal = progressbar->orientation < 2; - double tile_pos = 0; - double stroke_width; - double radius; - int x_step; - - cairo_pattern_t *pattern; - CairoColor bg_shade; - CairoColor border; - CairoColor shadow; - CairoColor top_shade; - - radius = MAX (0, params->radius - params->xthickness); - - cairo_save (cr); - - if (!is_horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - if ((progressbar->orientation == CL_ORIENTATION_RIGHT_TO_LEFT) || (progressbar->orientation == CL_ORIENTATION_BOTTOM_TO_TOP)) - ge_cairo_mirror (cr, CR_MIRROR_HORIZONTAL, &x, &y, &width, &height); - - /* Clamp the radius so that the _height_ fits ... */ - radius = MIN (radius, height / 2.0); - - stroke_width = height*2; - x_step = (((float)stroke_width/10)*offset); /* This looks weird ... */ - - cairo_translate (cr, x, y); - - cairo_save (cr); - /* This is kind of nasty ... Clip twice from each side in case the length - * of the fill is smaller than twice the radius. */ - ge_cairo_rounded_rectangle (cr, 0, 0, width + radius, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius, 0, width + radius, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - - ge_shade_color (&colors->spot[1], 1.05, &top_shade); - - /* Draw the background gradient */ - ge_shade_color (&colors->spot[1], 0.925, &bg_shade); - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, bg_shade.r, bg_shade.g, bg_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, top_shade.r, top_shade.g, top_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, bg_shade.r, bg_shade.g, bg_shade.b); - cairo_set_source (cr, pattern); - cairo_paint (cr); - cairo_pattern_destroy (pattern); - - /* Draw the Strokes */ - while (tile_pos <= width+x_step) - { - cairo_move_to (cr, stroke_width/2-x_step, 0); - cairo_line_to (cr, stroke_width-x_step, 0); - cairo_line_to (cr, stroke_width/2-x_step, height); - cairo_line_to (cr, -x_step, height); - - cairo_translate (cr, stroke_width, 0); - tile_pos += stroke_width; - } - - cairo_set_source_rgba (cr, colors->spot[2].r, - colors->spot[2].g, - colors->spot[2].b, - 0.15); - - cairo_fill (cr); - cairo_restore (cr); /* rounded clip region */ - - /* inner highlight border - * This is again kinda ugly. Draw once from each side, clipping away the other. */ - cairo_set_source_rgba (cr, colors->spot[0].r, colors->spot[0].g, colors->spot[0].b, 0.5); - - /* left side */ - cairo_save (cr); - cairo_rectangle (cr, 0, 0, width / 2, height); - cairo_clip (cr); - - if (progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, 1.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - else - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - /* right side */ - cairo_save (cr); - cairo_rectangle (cr, width / 2, 0, (width+1) / 2, height); - cairo_clip (cr); - - if (progressbar->value < 1.0 || progressbar->pulsing) - ge_cairo_rounded_rectangle (cr, -1.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - else - ge_cairo_rounded_rectangle (cr, -0.5 - radius, 0.5, width + radius, height - 1, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - - cairo_stroke (cr); - cairo_restore (cr); /* clip */ - - - /* Draw the dark lines and the shadow */ - cairo_save (cr); - /* Again, this weird clip area. */ - ge_cairo_rounded_rectangle (cr, -1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT); - cairo_clip (cr); - ge_cairo_rounded_rectangle (cr, -radius - 1.0, 0, width + radius + 2.0, height, radius, CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT); - cairo_clip (cr); - - border = colors->spot[2]; - border.a = 0.5; - shadow.r = 0.0; - shadow.g = 0.0; - shadow.b = 0.0; - shadow.a = 0.1; - - if (progressbar->pulsing) - { - /* At the beginning of the bar. */ - cairo_move_to (cr, 0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, 0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, -0.5 + radius, height + 0.5); - ge_cairo_rounded_corner (cr, -0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMLEFT); - ge_cairo_rounded_corner (cr, -0.5, -0.5, radius + 1, CR_CORNER_TOPLEFT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - if (progressbar->value < 1.0 || progressbar->pulsing) - { - /* At the end of the bar. */ - cairo_move_to (cr, width - 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width - 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width - 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_move_to (cr, width + 0.5 - radius, -0.5); - ge_cairo_rounded_corner (cr, width + 0.5, -0.5, radius + 1, CR_CORNER_TOPRIGHT); - ge_cairo_rounded_corner (cr, width + 0.5, height + 0.5, radius + 1, CR_CORNER_BOTTOMRIGHT); - ge_cairo_set_color (cr, &shadow); - cairo_stroke (cr); - } - - cairo_restore (cr); - - cairo_restore (cr); /* rotation, mirroring */ -} - -static void -clearlooks_inverted_draw_menuitem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->spot[1]; - CairoColor fill_shade; - CairoColor border = colors->spot[2]; - cairo_pattern_t *pattern; - - ge_shade_color (&border, 1.05, &border); - ge_shade_color (fill, 0.85, &fill_shade); - cairo_set_line_width (cr, 1.0); - - ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width - 1, height - 1, widget->radius, widget->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, fill_shade.r, fill_shade.g, fill_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, fill->r, fill->g, fill->b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); -} - -static void -clearlooks_inverted_draw_menubaritem (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height) -{ - CairoColor *fill = (CairoColor*)&colors->spot[1]; - CairoColor fill_shade; - CairoColor border = colors->spot[2]; - cairo_pattern_t *pattern; - - ge_shade_color (&border, 1.05, &border); - ge_shade_color (fill, 0.85, &fill_shade); - - cairo_set_line_width (cr, 1.0); - ge_cairo_rounded_rectangle (cr, x + 0.5, y + 0.5, width - 1, height, widget->radius, widget->corners); - - pattern = cairo_pattern_create_linear (x, y, x, y + height); - cairo_pattern_add_color_stop_rgb (pattern, 0, fill_shade.r, fill_shade.g, fill_shade.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, fill->r, fill->g, fill->b); - - cairo_set_source (cr, pattern); - cairo_fill_preserve (cr); - cairo_pattern_destroy (pattern); - - ge_cairo_set_color (cr, &border); - cairo_stroke_preserve (cr); -} - -static void -clearlooks_inverted_draw_tab (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const TabParameters *tab, - int x, int y, int width, int height) -{ - const CairoColor *border1 = &colors->shade[6]; - const CairoColor *border2 = &colors->shade[5]; - const CairoColor *stripe_fill = &colors->spot[1]; - const CairoColor *stripe_border = &colors->spot[2]; - const CairoColor *fill; - CairoColor hilight; - CairoColor shadow; - - cairo_pattern_t *pattern; - - double radius; - double strip_size; - - radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - /* Set clip */ - cairo_rectangle (cr, x, y, width, height); - cairo_clip (cr); - cairo_new_path (cr); - - /* Translate and set line width */ - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x+0.5, y+0.5); - - - /* Make the tabs slightly bigger than they should be, to create a gap */ - /* And calculate the strip size too, while you're at it */ - if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) - { - height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ - - if (tab->gap_side == CL_GAP_TOP) - cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ - } - else - { - width += 3.0; - strip_size = 2.0/width; - - if (tab->gap_side == CL_GAP_LEFT) - cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ - } - - /* Set the fill color */ - fill = &colors->bg[params->state_type]; - - /* Set tab shape */ - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, - radius, params->corners); - - /* Draw fill */ - ge_cairo_set_color (cr, fill); - cairo_fill (cr); - - ge_shade_color (fill, 1.3, &hilight); - - /* Draw highlight */ - if (!params->active) - { - ShadowParameters shadow; - - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = params->corners; - /* - clearlooks_draw_highlight_and_shade (cr, colors, &shadow, - width, - height, radius);*/ - } - - if (params->active) - { - pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-1 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 1, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0 ); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - ge_shade_color (fill, 0.92, &shadow); - - cairo_pattern_add_color_stop_rgba (pattern, 0.0, hilight.r, hilight.g, hilight.b, 0.4); - cairo_pattern_add_color_stop_rgba (pattern, 1.0/height, hilight.r, hilight.g, hilight.b, 0.4); - cairo_pattern_add_color_stop_rgb (pattern, 1.0/height, fill->r,fill->g,fill->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shadow.r,shadow.g,shadow.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - /* Draw shade */ - pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-2 : 0, - tab->gap_side == CL_GAP_TOP ? height-2 : 0, - tab->gap_side == CL_GAP_RIGHT ? width : 0, - tab->gap_side == CL_GAP_BOTTOM ? height : 0 ); - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_fill->r, stripe_fill->g, stripe_fill->b); - cairo_pattern_add_color_stop_rgb (pattern, strip_size, stripe_fill->r, stripe_fill->g, stripe_fill->b); - cairo_pattern_add_color_stop_rgba (pattern, strip_size, hilight.r, hilight.g, hilight.b, 0.0); - cairo_pattern_add_color_stop_rgba (pattern, 0.8, hilight.r, hilight.g, hilight.b, 0.0); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - - if (params->active) - { - ge_cairo_set_color (cr, border2); - cairo_stroke (cr); - } - else - { - pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-2 : 2, - tab->gap_side == CL_GAP_TOP ? height-2 : 2, - tab->gap_side == CL_GAP_RIGHT ? width : 2, - tab->gap_side == CL_GAP_BOTTOM ? height : 2 ); - - cairo_pattern_add_color_stop_rgb (pattern, 0.0, stripe_border->r, stripe_border->g, stripe_border->b); - cairo_pattern_add_color_stop_rgb (pattern, strip_size, stripe_border->r, stripe_border->g, stripe_border->b); - cairo_pattern_add_color_stop_rgb (pattern, strip_size, border1->r, border1->g, border1->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, border2->r, border2->g, border2->b); - cairo_set_source (cr, pattern); - cairo_stroke (cr); - cairo_pattern_destroy (pattern); - } -} - -static void -clearlooks_inverted_draw_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - const CairoColor *border = &colors->shade[params->disabled ? 4 : 6]; - const CairoColor *spot = &colors->spot[1]; - const CairoColor *fill = &colors->shade[2]; - double radius = MIN (params->radius, MIN ((width - 1.0) / 2.0, (height - 1.0) / 2.0)); - - cairo_pattern_t *pattern; - - cairo_set_line_width (cr, 1.0); - cairo_translate (cr, x, y); - - if (params->disabled) - border = &colors->shade[4]; - else if (params->prelight) - border = &colors->spot[2]; - else - border = &colors->shade[6]; - - /* fill the widget */ - cairo_rectangle (cr, 0.5, 0.5, width-2, height-2); - - /* Fake light */ - if (!params->disabled) - { - const CairoColor *top = &colors->shade[2]; - const CairoColor *bot = &colors->shade[0]; - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, top->r, top->g, top->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, bot->r, bot->g, bot->b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - } - else - { - ge_cairo_set_color (cr, fill); - cairo_rectangle (cr, 0.5, 0.5, width-2, height-2); - cairo_fill (cr); - } - - /* Set the clip */ - cairo_save (cr); - cairo_rectangle (cr, 0.5, 0.5, 6, height-2); - cairo_rectangle (cr, width-7.5, 0.5, 6 , height-2); - cairo_clip_preserve (cr); - - cairo_new_path (cr); - - /* Draw the handles */ - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, params->corners); - pattern = cairo_pattern_create_linear (0.5, 0.5, 0.5, 0.5+height); - - if (params->prelight) - { - CairoColor highlight; - ge_shade_color (spot, 1.5, &highlight); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, spot->r, spot->g, spot->b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, highlight.r, highlight.g, highlight.b); - cairo_set_source (cr, pattern); - } - else { - CairoColor hilight; - ge_shade_color (fill, 1.5, &hilight); - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - } - - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_restore (cr); - - /* Draw the border */ - ge_cairo_rounded_rectangle (cr, 0, 0, width-1, height-1, radius, params->corners); - if (params->prelight || params->disabled) - ge_cairo_set_color (cr, border); - else - clearlooks_set_border_gradient (cr, border, 1.2, 0, height); - cairo_stroke (cr); - - /* Draw handle lines */ - if (width > 14) - { - cairo_move_to (cr, 6, 0.5); - cairo_line_to (cr, 6, height-1); - - cairo_move_to (cr, width-7, 0.5); - cairo_line_to (cr, width-7, height-1); - - cairo_set_line_width (cr, 1.0); - cairo_set_source_rgba (cr, border->r, - border->g, - border->b, - 0.3); - cairo_stroke (cr); - } -} - -static void -clearlooks_inverted_draw_slider_button (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const SliderParameters *slider, - int x, int y, int width, int height) -{ - double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - cairo_set_line_width (cr, 1.0); - - if (!slider->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - cairo_translate (cr, x+0.5, y+0.5); - - params->style_functions->draw_shadow (cr, colors, radius, width-1, height-1); - params->style_functions->draw_slider (cr, colors, params, 1, 1, width-2, height-2); - - if (width > 24) - params->style_functions->draw_gripdots (cr, colors, 0, 0, width-2, height-2, 3, 3, 0); -} - -static void -clearlooks_inverted_draw_list_view_header (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - const ListViewHeaderParameters *header, - int x, int y, int width, int height) -{ - const CairoColor *fill = &colors->bg[params->state_type]; - const CairoColor *border = &colors->shade[4]; - cairo_pattern_t *pattern; - CairoColor hilight_header; - CairoColor hilight; - CairoColor shadow; - - ge_shade_color (border, 1.5, &hilight); - ge_shade_color (fill, 1.05, &hilight_header); - ge_shade_color (fill, 0.95, &shadow); - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1.0); - - /* Draw highlight */ - if (header->order == CL_ORDER_FIRST) - { - cairo_move_to (cr, 0.5, height-1); - cairo_line_to (cr, 0.5, 0.5); - } - else - cairo_move_to (cr, 0.0, 0.5); - - cairo_line_to (cr, width, 0.5); - - ge_cairo_set_color (cr, &hilight); - cairo_stroke (cr); - - /* Draw bottom border */ - cairo_move_to (cr, 0.0, height-0.5); - cairo_line_to (cr, width, height-0.5); - ge_cairo_set_color (cr, border); - cairo_stroke (cr); - - /* Draw bottom shade */ - pattern = cairo_pattern_create_linear (0.0, 0, 0.0, height-1.0); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, shadow.r, shadow.g, shadow.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, hilight_header.r, hilight_header.g, hilight_header.b); - - cairo_rectangle (cr, 0, 1, width, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - /* Draw resize grip */ - if ((params->ltr && header->order != CL_ORDER_LAST) || - (!params->ltr && header->order != CL_ORDER_FIRST) || header->resizable) - { - SeparatorParameters separator; - separator.horizontal = FALSE; - - if (params->ltr) - params->style_functions->draw_separator (cr, colors, params, &separator, - width-1.5, 4.0, 2, height-8.0); - else - params->style_functions->draw_separator (cr, colors, params, &separator, - 1.5, 4.0, 2, height-8.0); - } -} - - -static void -clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - const ScrollBarStepperParameters *stepper, - int x, int y, int width, int height) -{ - CairoCorners corners = CR_CORNER_NONE; - CairoColor border; - CairoColor s1, s2, s3; - cairo_pattern_t *pattern; - ShadowParameters shadow; - double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); - - ge_shade_color(&colors->shade[6], 1.05, &border); - - if (scrollbar->horizontal) - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - } - else - { - if (stepper->stepper == CL_STEPPER_A) - corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT; - else if (stepper->stepper == CL_STEPPER_D) - corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT; - } - - cairo_translate (cr, x, y); - cairo_set_line_width (cr, 1); - - ge_cairo_rounded_rectangle (cr, 1, 1, width-2, height-2, radius, corners); - - if (scrollbar->horizontal) - pattern = cairo_pattern_create_linear (0, 0, 0, height); - else - pattern = cairo_pattern_create_linear (0, 0, width, 0); - - s1 = colors->bg[widget->state_type]; - ge_shade_color(&s1, 0.95, &s2); - ge_shade_color(&s1, 1.05, &s3); - - cairo_pattern_add_color_stop_rgb(pattern, 0, s2.r, s2.g, s2.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, s3.r, s3.g, s3.b); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - clearlooks_draw_top_left_highlight (cr, &s1, widget, width, height, radius); - - ge_cairo_rounded_rectangle (cr, 0.5, 0.5, width-1, height-1, radius, corners); - clearlooks_set_border_gradient (cr, &border, 1.2, (scrollbar->horizontal ? 0 : width), (scrollbar->horizontal ? height: 0)); - cairo_stroke (cr); - - cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; - /* - clearlooks_draw_highlight_and_shade (cr, &shadow, - width, - height, params->radius);*/ -} - -static void -clearlooks_inverted_draw_scrollbar_slider (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height) -{ - if (scrollbar->junction & CL_JUNCTION_BEGIN) - { - if (scrollbar->horizontal) - { - x -= 1; - width += 1; - } - else - { - y -= 1; - height += 1; - } - } - if (scrollbar->junction & CL_JUNCTION_END) - { - if (scrollbar->horizontal) - width += 1; - else - height += 1; - } - - if (!scrollbar->horizontal) - ge_cairo_exchange_axis (cr, &x, &y, &width, &height); - - cairo_translate (cr, x, y); - - if (scrollbar->has_color) - { - const CairoColor *border = &colors->shade[8]; - CairoColor fill = scrollbar->color; - CairoColor hilight; - CairoColor shade1, shade2, shade3; - cairo_pattern_t *pattern; - - if (widget->prelight) - ge_shade_color (&fill, 1.1, &fill); - - cairo_set_line_width (cr, 1); - - ge_shade_color (&fill, 1.3, &hilight); - ge_shade_color (&fill, 1.1, &shade1); - ge_shade_color (&fill, 1.05, &shade2); - ge_shade_color (&fill, 0.98, &shade3); - - pattern = cairo_pattern_create_linear (1, 1, 1, height-2); - cairo_pattern_add_color_stop_rgb (pattern, 0, fill.r, fill.g, fill.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade3.r, shade3.g, shade3.b); - cairo_pattern_add_color_stop_rgb (pattern, 0.5, shade2.r, shade2.g, shade2.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, shade1.r, shade1.g, shade1.b); - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source (cr, pattern); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - cairo_set_source_rgba (cr, hilight.r, hilight.g, hilight.b, 0.5); - ge_cairo_stroke_rectangle (cr, 1.5, 1.5, width-3, height-3); - - ge_cairo_set_color (cr, border); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); - } - else - { - CairoColor border; - CairoColor s1, s2, s3; - cairo_pattern_t *pattern; - int bar_x, i; - - const CairoColor *dark = &colors->shade[4]; - const CairoColor *light = &colors->shade[0]; - - ge_shade_color(&colors->shade[6], 1.05, &border); - - pattern = cairo_pattern_create_linear(1, 1, 1, height-1); - - s1 = colors->bg[widget->state_type]; - ge_shade_color(&s1, 0.95, &s2); - ge_shade_color(&s1, 1.05, &s3); - - cairo_pattern_add_color_stop_rgb(pattern, 0, s2.r, s2.g, s2.b); - cairo_pattern_add_color_stop_rgb(pattern, 1.0, s3.r, s3.g, s3.b); - - cairo_rectangle (cr, 1, 1, width-2, height-2); - cairo_set_source(cr, pattern); - cairo_fill(cr); - cairo_pattern_destroy(pattern); - - clearlooks_draw_top_left_highlight (cr, &s2, widget, width, height, 0); - - clearlooks_set_border_gradient (cr, &border, 1.2, 0, height); - ge_cairo_stroke_rectangle (cr, 0.5, 0.5, width-1, height-1); - - /* draw handles */ - cairo_set_line_width (cr, 1); - - bar_x = width/2 - 4; - cairo_translate(cr, 0.5, 0.5); - for (i=0; i<3; i++) - { - cairo_move_to (cr, bar_x, 4); - cairo_line_to (cr, bar_x, height-5); - ge_cairo_set_color (cr, dark); - cairo_stroke (cr); - - cairo_move_to (cr, bar_x+1, 4); - cairo_line_to (cr, bar_x+1, height-5); - ge_cairo_set_color (cr, light); - cairo_stroke (cr); - - bar_x += 3; - } - } -} - -static void -clearlooks_inverted_draw_selected_cell (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *params, - int x, int y, int width, int height) -{ - CairoColor upper_color; - CairoColor lower_color; - CairoColor border; - cairo_pattern_t *pattern; - cairo_save (cr); - - cairo_translate (cr, x, y); - - if (params->focus) - upper_color = colors->base[params->state_type]; - else - upper_color = colors->base[GTK_STATE_ACTIVE]; - - ge_shade_color(&upper_color, 0.9, &lower_color); - - pattern = cairo_pattern_create_linear (0, 0, 0, height); - cairo_pattern_add_color_stop_rgb (pattern, 0.0, lower_color.r, - lower_color.g, - lower_color.b); - cairo_pattern_add_color_stop_rgb (pattern, 1.0, upper_color.r, - upper_color.g, - upper_color.b); - - - cairo_set_source (cr, pattern); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - cairo_pattern_destroy (pattern); - - ge_shade_color(&upper_color, 0.8, &border); - - cairo_move_to (cr, 0, 0.5); - cairo_rel_line_to (cr, width, 0); - cairo_move_to (cr, 0, height-0.5); - cairo_rel_line_to (cr, width, 0); - - ge_cairo_set_color (cr, &border); - cairo_stroke (cr); - - cairo_restore (cr); -} - -void -clearlooks_register_style_inverted (ClearlooksStyleFunctions *functions) -{ - functions->draw_button = clearlooks_inverted_draw_button; - functions->draw_slider = clearlooks_inverted_draw_slider; - functions->draw_slider_button = clearlooks_inverted_draw_slider_button; - functions->draw_progressbar_fill = clearlooks_inverted_draw_progressbar_fill; - functions->draw_menuitem = clearlooks_inverted_draw_menuitem; - functions->draw_menubaritem = clearlooks_inverted_draw_menubaritem; - functions->draw_tab = clearlooks_inverted_draw_tab; - functions->draw_list_view_header = clearlooks_inverted_draw_list_view_header; - functions->draw_scrollbar_stepper = clearlooks_inverted_draw_scrollbar_stepper; - functions->draw_scrollbar_slider = clearlooks_inverted_draw_scrollbar_slider; - functions->draw_selected_cell = clearlooks_inverted_draw_selected_cell; -} - diff --git a/libs/clearlooks/clearlooks_rc_style.c b/libs/clearlooks/clearlooks_rc_style.c deleted file mode 100644 index f486453339..0000000000 --- a/libs/clearlooks/clearlooks_rc_style.c +++ /dev/null @@ -1,473 +0,0 @@ -/* Clearlooks theme engine - * Copyright (C) 2005 Richard Stellingwerff. - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Written by Owen Taylor - * and by Alexander Larsson - * Modified by Richard Stellingwerff - * Modified by Kulyk Nazar - */ - -#include "clearlooks_style.h" -#include "clearlooks_rc_style.h" - -#include "animation.h" - -static void clearlooks_rc_style_init (ClearlooksRcStyle *style); -#ifdef HAVE_ANIMATION -static void clearlooks_rc_style_finalize (GObject *object); -#endif -static void clearlooks_rc_style_class_init (ClearlooksRcStyleClass *klass); -static GtkStyle *clearlooks_rc_style_create_style (GtkRcStyle *rc_style); -static guint clearlooks_rc_style_parse (GtkRcStyle *rc_style, - GtkSettings *settings, - GScanner *scanner); -static void clearlooks_rc_style_merge (GtkRcStyle *dest, - GtkRcStyle *src); - - -static GtkRcStyleClass *clearlooks_parent_rc_class; - -GType clearlooks_type_rc_style = 0; - -enum -{ - TOKEN_SCROLLBARCOLOR = G_TOKEN_LAST + 1, - TOKEN_COLORIZESCROLLBAR, - TOKEN_CONTRAST, - TOKEN_SUNKENMENU, - TOKEN_PROGRESSBARSTYLE, - TOKEN_MENUBARSTYLE, - TOKEN_TOOLBARSTYLE, - TOKEN_MENUITEMSTYLE, - TOKEN_LISTVIEWITEMSTYLE, - TOKEN_ANIMATION, - TOKEN_STYLE, - TOKEN_RADIUS, - - TOKEN_CLASSIC, - TOKEN_GLOSSY, - TOKEN_INVERTED, - TOKEN_GUMMY, - - TOKEN_TRUE, - TOKEN_FALSE -}; - -static struct -{ - const gchar *name; - guint token; -} -clearlooks_gtk2_rc_symbols[] = -{ - { "scrollbar_color", TOKEN_SCROLLBARCOLOR }, - { "colorize_scrollbar", TOKEN_COLORIZESCROLLBAR }, - { "contrast", TOKEN_CONTRAST }, - { "sunkenmenubar", TOKEN_SUNKENMENU }, - { "progressbarstyle", TOKEN_PROGRESSBARSTYLE }, - { "menubarstyle", TOKEN_MENUBARSTYLE }, - { "toolbarstyle", TOKEN_TOOLBARSTYLE }, - { "menuitemstyle", TOKEN_MENUITEMSTYLE }, - { "listviewitemstyle", TOKEN_LISTVIEWITEMSTYLE }, - { "animation", TOKEN_ANIMATION }, - { "style", TOKEN_STYLE }, - { "radius", TOKEN_RADIUS }, - - { "CLASSIC", TOKEN_CLASSIC }, - { "GLOSSY", TOKEN_GLOSSY }, - { "INVERTED", TOKEN_INVERTED }, - { "GUMMY", TOKEN_GUMMY }, - - { "TRUE", TOKEN_TRUE }, - { "FALSE", TOKEN_FALSE } -}; - - -void -clearlooks_rc_style_register_type (GTypeModule *module) -{ - static const GTypeInfo object_info = - { - sizeof (ClearlooksRcStyleClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) clearlooks_rc_style_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (ClearlooksRcStyle), - 0, /* n_preallocs */ - (GInstanceInitFunc) clearlooks_rc_style_init, - NULL - }; - - clearlooks_type_rc_style = g_type_module_register_type (module, - GTK_TYPE_RC_STYLE, - "ClearlooksRcStyle", - &object_info, 0); -} - -static void -clearlooks_rc_style_init (ClearlooksRcStyle *clearlooks_rc) -{ - clearlooks_rc->style = CL_STYLE_CLASSIC; - - clearlooks_rc->flags = 0; - - clearlooks_rc->contrast = 1.0; - clearlooks_rc->menubarstyle = 0; - clearlooks_rc->toolbarstyle = 0; - clearlooks_rc->animation = FALSE; - clearlooks_rc->colorize_scrollbar = FALSE; - clearlooks_rc->radius = 3.0; -} - -#ifdef HAVE_ANIMATION -static void -clearlooks_rc_style_finalize (GObject *object) -{ - /* cleanup all the animation stuff */ - clearlooks_animation_cleanup (); - - if (G_OBJECT_CLASS (clearlooks_parent_rc_class)->finalize != NULL) - G_OBJECT_CLASS (clearlooks_parent_rc_class)->finalize(object); -} -#endif - - -static void -clearlooks_rc_style_class_init (ClearlooksRcStyleClass *klass) -{ - GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass); -#ifdef HAVE_ANIMATION - GObjectClass *g_object_class = G_OBJECT_CLASS (klass); -#endif - - clearlooks_parent_rc_class = g_type_class_peek_parent (klass); - - rc_style_class->parse = clearlooks_rc_style_parse; - rc_style_class->create_style = clearlooks_rc_style_create_style; - rc_style_class->merge = clearlooks_rc_style_merge; - -#ifdef HAVE_ANIMATION - g_object_class->finalize = clearlooks_rc_style_finalize; -#endif -} - -static guint -clearlooks_gtk2_rc_parse_boolean (GtkSettings *settings, - GScanner *scanner, - gboolean *retval) -{ - guint token; - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token == TOKEN_TRUE) - *retval = TRUE; - else if (token == TOKEN_FALSE) - *retval = FALSE; - else - return TOKEN_TRUE; - - return G_TOKEN_NONE; -} - -static guint -clearlooks_gtk2_rc_parse_color(GtkSettings *settings, - GScanner *scanner, - GdkColor *color) -{ - guint token; - - /* Skip 'blah_color' */ - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - return gtk_rc_parse_color (scanner, color); -} - -static guint -clearlooks_gtk2_rc_parse_double (GtkSettings *settings, - GScanner *scanner, - gdouble *val) -{ - guint token; - - /* Skip 'blah' */ - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_FLOAT) - return G_TOKEN_FLOAT; - - *val = scanner->value.v_float; - - return G_TOKEN_NONE; -} - -static guint -clearlooks_gtk2_rc_parse_int (GtkSettings *settings, - GScanner *scanner, - guint8 *progressbarstyle) -{ - guint token; - - /* Skip 'sunkenmenubar' */ - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_INT) - return G_TOKEN_INT; - - *progressbarstyle = scanner->value.v_int; - - return G_TOKEN_NONE; -} - -static guint -clearlooks_gtk2_rc_parse_style (GtkSettings *settings, - GScanner *scanner, - ClearlooksStyles *style) -{ - guint token; - - g_assert (CL_NUM_STYLES == CL_STYLE_GUMMY + 1); /* so that people don't forget ;-) */ - - /* Skip 'style' */ - token = g_scanner_get_next_token (scanner); - - token = g_scanner_get_next_token (scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token (scanner); - - switch (token) - { - case TOKEN_CLASSIC: - *style = CL_STYLE_CLASSIC; - break; - case TOKEN_GLOSSY: - *style = CL_STYLE_GLOSSY; - break; - case TOKEN_INVERTED: - *style = CL_STYLE_INVERTED; - break; - case TOKEN_GUMMY: - *style = CL_STYLE_GUMMY; - break; - default: - return TOKEN_CLASSIC; - } - - return G_TOKEN_NONE; -} - -static guint -clearlooks_gtk2_rc_parse_dummy (GtkSettings *settings, - GScanner *scanner, - gchar *name) -{ - guint token; - - /* Skip option */ - token = g_scanner_get_next_token (scanner); - - /* print a warning. Isn't there a way to get the string from the scanner? */ - g_scanner_warn (scanner, "Clearlooks configuration option \"%s\" is not supported and will be ignored.", name); - - /* equal sign */ - token = g_scanner_get_next_token (scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - /* eat whatever comes next */ - token = g_scanner_get_next_token (scanner); - - return G_TOKEN_NONE; -} - -static guint -clearlooks_rc_style_parse (GtkRcStyle *rc_style, - GtkSettings *settings, - GScanner *scanner) - -{ - static GQuark scope_id = 0; - ClearlooksRcStyle *clearlooks_style = CLEARLOOKS_RC_STYLE (rc_style); - - guint old_scope; - guint token; - guint i; - - /* Set up a new scope in this scanner. */ - - if (!scope_id) - scope_id = g_quark_from_string("clearlooks_theme_engine"); - - /* If we bail out due to errors, we *don't* reset the scope, so the - * error messaging code can make sense of our tokens. - */ - old_scope = g_scanner_set_scope(scanner, scope_id); - - /* Now check if we already added our symbols to this scope - * (in some previous call to clearlooks_rc_style_parse for the - * same scanner. - */ - - if (!g_scanner_lookup_symbol(scanner, clearlooks_gtk2_rc_symbols[0].name)) - { - for (i = 0; i < G_N_ELEMENTS (clearlooks_gtk2_rc_symbols); i++) - g_scanner_scope_add_symbol(scanner, scope_id, - clearlooks_gtk2_rc_symbols[i].name, - GINT_TO_POINTER(clearlooks_gtk2_rc_symbols[i].token)); - } - - /* We're ready to go, now parse the top level */ - - token = g_scanner_peek_next_token(scanner); - while (token != G_TOKEN_RIGHT_CURLY) - { - switch (token) - { - case TOKEN_SCROLLBARCOLOR: - token = clearlooks_gtk2_rc_parse_color (settings, scanner, &clearlooks_style->scrollbar_color); - clearlooks_style->flags |= CL_FLAG_SCROLLBAR_COLOR; - break; - case TOKEN_COLORIZESCROLLBAR: - token = clearlooks_gtk2_rc_parse_boolean (settings, scanner, &clearlooks_style->colorize_scrollbar); - clearlooks_style->flags |= CL_FLAG_COLORIZE_SCROLLBAR; - break; - case TOKEN_CONTRAST: - token = clearlooks_gtk2_rc_parse_double (settings, scanner, &clearlooks_style->contrast); - clearlooks_style->flags |= CL_FLAG_CONTRAST; - break; - case TOKEN_MENUBARSTYLE: - token = clearlooks_gtk2_rc_parse_int (settings, scanner, &clearlooks_style->menubarstyle); - clearlooks_style->flags |= CL_FLAG_MENUBARSTYLE; - break; - case TOKEN_TOOLBARSTYLE: - token = clearlooks_gtk2_rc_parse_int (settings, scanner, &clearlooks_style->toolbarstyle); - clearlooks_style->flags |= CL_FLAG_TOOLBARSTYLE; - break; - case TOKEN_ANIMATION: - token = clearlooks_gtk2_rc_parse_boolean (settings, scanner, &clearlooks_style->animation); - clearlooks_style->flags |= CL_FLAG_ANIMATION; - break; - case TOKEN_STYLE: - token = clearlooks_gtk2_rc_parse_style (settings, scanner, &clearlooks_style->style); - clearlooks_style->flags |= CL_FLAG_STYLE; - break; - case TOKEN_RADIUS: - token = clearlooks_gtk2_rc_parse_double (settings, scanner, &clearlooks_style->radius); - clearlooks_style->flags |= CL_FLAG_RADIUS; - break; - - /* stuff to ignore */ - case TOKEN_SUNKENMENU: - token = clearlooks_gtk2_rc_parse_dummy (settings, scanner, "sunkenmenu"); - break; - case TOKEN_PROGRESSBARSTYLE: - token = clearlooks_gtk2_rc_parse_dummy (settings, scanner, "progressbarstyle"); - break; - case TOKEN_MENUITEMSTYLE: - token = clearlooks_gtk2_rc_parse_dummy (settings, scanner, "menuitemstyle"); - break; - case TOKEN_LISTVIEWITEMSTYLE: - token = clearlooks_gtk2_rc_parse_dummy (settings, scanner, "listviewitemstyle"); - break; - - default: - g_scanner_get_next_token(scanner); - token = G_TOKEN_RIGHT_CURLY; - break; - } - - if (token != G_TOKEN_NONE) - return token; - - token = g_scanner_peek_next_token(scanner); - } - - g_scanner_get_next_token(scanner); - - g_scanner_set_scope(scanner, old_scope); - - return G_TOKEN_NONE; -} - -static void -clearlooks_rc_style_merge (GtkRcStyle *dest, - GtkRcStyle *src) -{ - ClearlooksRcStyle *dest_w, *src_w; - ClearlooksRcFlags flags; - - clearlooks_parent_rc_class->merge (dest, src); - - if (!CLEARLOOKS_IS_RC_STYLE (src)) - return; - - src_w = CLEARLOOKS_RC_STYLE (src); - dest_w = CLEARLOOKS_RC_STYLE (dest); - - flags = (~dest_w->flags) & src_w->flags; - - if (flags & CL_FLAG_STYLE) - dest_w->style = src_w->style; - if (flags & CL_FLAG_CONTRAST) - dest_w->contrast = src_w->contrast; - if (flags & CL_FLAG_MENUBARSTYLE) - dest_w->menubarstyle = src_w->menubarstyle; - if (flags & CL_FLAG_TOOLBARSTYLE) - dest_w->toolbarstyle = src_w->toolbarstyle; - if (flags & CL_FLAG_SCROLLBAR_COLOR) - dest_w->scrollbar_color = src_w->scrollbar_color; - if (flags & CL_FLAG_COLORIZE_SCROLLBAR) - dest_w->colorize_scrollbar = src_w->colorize_scrollbar; - if (flags & CL_FLAG_ANIMATION) - dest_w->animation = src_w->animation; - if (flags & CL_FLAG_RADIUS) - dest_w->radius = src_w->radius; - - dest_w->flags |= src_w->flags; -} - - -/* Create an empty style suitable to this RC style - */ -static GtkStyle * -clearlooks_rc_style_create_style (GtkRcStyle *rc_style) -{ - return GTK_STYLE (g_object_new (CLEARLOOKS_TYPE_STYLE, NULL)); -} diff --git a/libs/clearlooks/clearlooks_rc_style.h b/libs/clearlooks/clearlooks_rc_style.h deleted file mode 100644 index a80a846000..0000000000 --- a/libs/clearlooks/clearlooks_rc_style.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Clearlooks Theme Engine - * Copyright (C) 2005 Richard Stellingwerff. - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Written by Owen Taylor - * and by Alexander Larsson - * Modified by Richard Stellingwerff - * Modified by Kulyk Nazar - */ - -#include -#include "clearlooks_types.h" - -typedef struct _ClearlooksRcStyle ClearlooksRcStyle; -typedef struct _ClearlooksRcStyleClass ClearlooksRcStyleClass; - -GE_INTERNAL extern GType clearlooks_type_rc_style; - -#define CLEARLOOKS_TYPE_RC_STYLE clearlooks_type_rc_style -#define CLEARLOOKS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), CLEARLOOKS_TYPE_RC_STYLE, ClearlooksRcStyle)) -#define CLEARLOOKS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLEARLOOKS_TYPE_RC_STYLE, ClearlooksRcStyleClass)) -#define CLEARLOOKS_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), CLEARLOOKS_TYPE_RC_STYLE)) -#define CLEARLOOKS_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLEARLOOKS_TYPE_RC_STYLE)) -#define CLEARLOOKS_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLEARLOOKS_TYPE_RC_STYLE, ClearlooksRcStyleClass)) - -/* XXX: needs fixing! */ -typedef enum { - CL_FLAG_STYLE = 1 << 0, - CL_FLAG_SCROLLBAR_COLOR = 1 << 1, - CL_FLAG_COLORIZE_SCROLLBAR = 1 << 2, - CL_FLAG_CONTRAST = 1 << 3, - CL_FLAG_MENUBARSTYLE = 1 << 4, - CL_FLAG_TOOLBARSTYLE = 1 << 5, - CL_FLAG_ANIMATION = 1 << 6, - CL_FLAG_RADIUS = 1 << 7 -} ClearlooksRcFlags; - -struct _ClearlooksRcStyle -{ - GtkRcStyle parent_instance; - - ClearlooksRcFlags flags; - - ClearlooksStyles style; - - GdkColor scrollbar_color; - gboolean colorize_scrollbar; - double contrast; - guint8 menubarstyle; - guint8 toolbarstyle; - gboolean animation; - double radius; -}; - -struct _ClearlooksRcStyleClass -{ - GtkRcStyleClass parent_class; -}; - -GE_INTERNAL void clearlooks_rc_style_register_type (GTypeModule *module); diff --git a/libs/clearlooks/clearlooks_style.c b/libs/clearlooks/clearlooks_style.c deleted file mode 100644 index 48b6647df3..0000000000 --- a/libs/clearlooks/clearlooks_style.c +++ /dev/null @@ -1,1647 +0,0 @@ -/* Clearlooks theme engine - * Copyright (C) 2005 Richard Stellingwerff. - * Copyright (C) 2007 Benjamin Berg . - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#include -#include -#include -#include - -#include -#include "clearlooks_style.h" -#include "clearlooks_rc_style.h" -#include "clearlooks_draw.h" -#include "support.h" - -/* #define DEBUG 1 */ - -#define DETAIL(xx) ((detail) && (!strcmp(xx, detail))) - -#define DRAW_ARGS GtkStyle *style, \ - GdkWindow *window, \ - GtkStateType state_type, \ - GtkShadowType shadow_type, \ - GdkRectangle *area, \ - GtkWidget *widget, \ - const gchar *detail, \ - gint x, \ - gint y, \ - gint width, \ - gint height - -#ifdef HAVE_ANIMATION -#include "animation.h" -#endif - -#define STYLE_FUNCTION(function) (clearlooks_style_class->style_functions[CLEARLOOKS_STYLE (style)->style].function) - -static ClearlooksStyleClass *clearlooks_style_class; -static GtkStyleClass *clearlooks_parent_class; - -static void -clearlooks_set_widget_parameters (const GtkWidget *widget, - const GtkStyle *style, - GtkStateType state_type, - WidgetParameters *params) -{ - params->style_functions = &(clearlooks_style_class->style_functions[CLEARLOOKS_STYLE (style)->style]); - - params->active = (state_type == GTK_STATE_ACTIVE); - params->prelight = (state_type == GTK_STATE_PRELIGHT); - params->disabled = (state_type == GTK_STATE_INSENSITIVE); - params->state_type = (ClearlooksStateType)state_type; - params->corners = CR_CORNER_ALL; - params->ltr = ge_widget_is_ltr ((GtkWidget*)widget); - params->focus = widget && GTK_WIDGET_HAS_FOCUS (widget); - params->is_default = widget && GE_WIDGET_HAS_DEFAULT (widget); - params->enable_glow = FALSE; - params->radius = CLEARLOOKS_STYLE (style)->radius; - - if (!params->active && widget && GE_IS_TOGGLE_BUTTON (widget)) - params->active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); - - params->xthickness = style->xthickness; - params->ythickness = style->ythickness; - - /* This is used in GtkEntry to fake transparency. The reason to do this - * is that the entry has it's entire background filled with base[STATE]. - * This is not a very good solution as it will eg. fail if one changes - * the background color of a notebook. */ - params->parentbg = CLEARLOOKS_STYLE (style)->colors.bg[state_type]; - clearlooks_get_parent_bg (widget, ¶ms->parentbg); -} - -static void -clearlooks_style_draw_flat_box (DRAW_ARGS) -{ - if (detail && - state_type == GTK_STATE_SELECTED && ( - !strncmp ("cell_even", detail, 9) || - !strncmp ("cell_odd", detail, 8))) - { - WidgetParameters params; - ClearlooksStyle *clearlooks_style; - ClearlooksColors *colors; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - clearlooks_style = CLEARLOOKS_STYLE (style); - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - colors = &clearlooks_style->colors; - cr = ge_gdk_drawable_to_cairo (window, area); - - /* XXX: We could expose the side details by setting params->corners accordingly - * or adding another option. */ - STYLE_FUNCTION (draw_selected_cell) (cr, colors, ¶ms, x, y, width, height); - - cairo_destroy (cr); - } - else if (DETAIL ("tooltip")) - { - WidgetParameters params; - ClearlooksStyle *clearlooks_style; - ClearlooksColors *colors; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - clearlooks_style = CLEARLOOKS_STYLE (style); - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - colors = &clearlooks_style->colors; - cr = ge_gdk_drawable_to_cairo (window, area); - - STYLE_FUNCTION (draw_tooltip) (cr, colors, ¶ms, x, y, width, height); - - cairo_destroy (cr); - } - else if ((CLEARLOOKS_STYLE (style)->style == CL_STYLE_GLOSSY || CLEARLOOKS_STYLE (style)->style == CL_STYLE_GUMMY) && - ((DETAIL("checkbutton") || DETAIL("radiobutton")) && state_type == GTK_STATE_PRELIGHT)) - { - /* XXX: Don't draw any check/radiobutton bg in GLOSSY or GUMMY mode. */ - } - else - { - clearlooks_parent_class->draw_flat_box (style, window, state_type, - shadow_type, - area, widget, detail, - x, y, width, height); - } -} - -static void -clearlooks_style_draw_shadow (DRAW_ARGS) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - cairo_t *cr = ge_gdk_drawable_to_cairo (window, area); - - CHECK_ARGS - SANITIZE_SIZE - - if ((DETAIL ("entry") && !(widget && widget->parent && GE_IS_TREE_VIEW (widget->parent))) || - (DETAIL ("frame") && ge_is_in_combo_box (widget))) - { - WidgetParameters params; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - /* Override the entries state type, because we are too lame to handle this via - * the focus ring, and GtkEntry doesn't even set the INSENSITIVE state ... */ - if (state_type == GTK_STATE_NORMAL && widget && GE_IS_ENTRY (widget)) - params.state_type = GTK_WIDGET_STATE (widget); - - if (widget && (ge_is_in_combo_box (widget) || GE_IS_SPIN_BUTTON (widget))) - { - width += style->xthickness; - if (!params.ltr) - x -= style->xthickness; - - if (params.ltr) - params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - else - params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - } - - STYLE_FUNCTION (draw_entry) (cr, &clearlooks_style->colors, ¶ms, - x, y, width, height); - } - else if (DETAIL ("frame") && widget && GE_IS_STATUSBAR (widget->parent)) - { - WidgetParameters params; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - gtk_style_apply_default_background (style, window, TRUE, state_type, - area, x, y, width, height); - - STYLE_FUNCTION (draw_statusbar) (cr, colors, ¶ms, - x, y, width, height); - } - else if (DETAIL ("frame")) - { - WidgetParameters params; - FrameParameters frame; - frame.shadow = shadow_type; - frame.gap_x = -1; /* No gap will be drawn */ - frame.border = &colors->shade[4]; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - params.corners = CR_CORNER_NONE; - - if (widget && !g_str_equal ("XfcePanelWindow", gtk_widget_get_name (gtk_widget_get_toplevel (widget)))) - STYLE_FUNCTION(draw_frame) (cr, colors, ¶ms, &frame, - x, y, width, height); - } - else if (DETAIL ("scrolled_window") || DETAIL ("viewport") || detail == NULL) - { - CairoColor *border = (CairoColor*)&colors->shade[5]; - cairo_rectangle (cr, x+0.5, y+0.5, width-1, height-1); - ge_cairo_set_color (cr, border); - cairo_set_line_width (cr, 1); - cairo_stroke (cr); - } - else - { - WidgetParameters params; - FrameParameters frame; - - frame.shadow = shadow_type; - frame.gap_x = -1; - frame.border = &colors->shade[5]; - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - params.corners = CR_CORNER_ALL; - - STYLE_FUNCTION(draw_frame) (cr, colors, ¶ms, &frame, x, y, width, height); - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_box_gap (DRAW_ARGS, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - - if (DETAIL ("notebook")) - { - WidgetParameters params; - FrameParameters frame; - gboolean start, end; - - frame.shadow = shadow_type; - frame.gap_side = gap_side; - frame.gap_x = gap_x; - frame.gap_width = gap_width; - frame.border = &colors->shade[5]; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - clearlooks_get_notebook_tab_position (widget, &start, &end); - - params.corners = CR_CORNER_ALL; - switch (gap_side) { - case GTK_POS_LEFT: - if (start) - params.corners ^= CR_CORNER_TOPLEFT; - if (end) - params.corners ^= CR_CORNER_BOTTOMLEFT; - break; - case GTK_POS_RIGHT: - if (start) - params.corners ^= CR_CORNER_TOPRIGHT; - if (end) - params.corners ^= CR_CORNER_BOTTOMRIGHT; - break; - case GTK_POS_TOP: - if (ge_widget_is_ltr (widget)) { - if (start) - params.corners ^= CR_CORNER_TOPLEFT; - if (end) - params.corners ^= CR_CORNER_TOPRIGHT; - } else { - if (start) - params.corners ^= CR_CORNER_TOPRIGHT; - if (end) - params.corners ^= CR_CORNER_TOPLEFT; - } - break; - case GTK_POS_BOTTOM: - if (ge_widget_is_ltr (widget)) { - if (start) - params.corners ^= CR_CORNER_BOTTOMLEFT; - if (end) - params.corners ^= CR_CORNER_BOTTOMRIGHT; - } else { - if (start) - params.corners ^= CR_CORNER_BOTTOMRIGHT; - if (end) - params.corners ^= CR_CORNER_BOTTOMLEFT; - } - break; - } - - /* Fill the background with bg[NORMAL] */ - ge_cairo_rounded_rectangle (cr, x, y, width, height, params.radius, params.corners); - ge_cairo_set_color (cr, &colors->bg[GTK_STATE_NORMAL]); - cairo_fill (cr); - - STYLE_FUNCTION(draw_frame) (cr, colors, ¶ms, &frame, - x, y, width, height); - } - else - { - clearlooks_parent_class->draw_box_gap (style, window, state_type, shadow_type, - area, widget, detail, - x, y, width, height, - gap_side, gap_x, gap_width); - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_extension (DRAW_ARGS, GtkPositionType gap_side) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - - if (DETAIL ("tab")) - { - WidgetParameters params; - TabParameters tab; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - tab.gap_side = (ClearlooksGapSide)gap_side; - - switch (gap_side) - { - case CL_GAP_BOTTOM: - params.corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT; - break; - case CL_GAP_TOP: - params.corners = CR_CORNER_BOTTOMLEFT | CR_CORNER_BOTTOMRIGHT; - break; - case CL_GAP_RIGHT: - params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - break; - case CL_GAP_LEFT: - params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - } - - STYLE_FUNCTION(draw_tab) (cr, colors, ¶ms, &tab, - x, y, width, height); - } - else - { - clearlooks_parent_class->draw_extension (style, window, state_type, shadow_type, area, - widget, detail, x, y, width, height, - gap_side); - - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_handle (DRAW_ARGS, GtkOrientation orientation) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - cairo_t *cr; - gboolean is_horizontal; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - - /* Evil hack to work around broken orientation for toolbars */ - is_horizontal = (width > height); - - if (DETAIL ("handlebox")) - { - WidgetParameters params; - HandleParameters handle; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - handle.type = CL_HANDLE_TOOLBAR; - handle.horizontal = is_horizontal; - - /* Is this ever true? -Daniel */ - if (GE_IS_TOOLBAR (widget) && shadow_type != GTK_SHADOW_NONE) - { - ToolbarParameters toolbar; - - clearlooks_set_toolbar_parameters (&toolbar, widget, window, x, y); - - toolbar.style = clearlooks_style->toolbarstyle; - - cairo_save (cr); - STYLE_FUNCTION(draw_toolbar) (cr, colors, ¶ms, &toolbar, x, y, width, height); - cairo_restore (cr); - } - - STYLE_FUNCTION(draw_handle) (cr, colors, ¶ms, &handle, - x, y, width, height); - } - else if (DETAIL ("paned")) - { - WidgetParameters params; - HandleParameters handle; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - handle.type = CL_HANDLE_SPLITTER; - handle.horizontal = orientation == GTK_ORIENTATION_HORIZONTAL; - - STYLE_FUNCTION(draw_handle) (cr, colors, ¶ms, &handle, - x, y, width, height); - } - else - { - WidgetParameters params; - HandleParameters handle; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - handle.type = CL_HANDLE_TOOLBAR; - handle.horizontal = is_horizontal; - - /* Is this ever true? -Daniel */ - if (GE_IS_TOOLBAR (widget) && shadow_type != GTK_SHADOW_NONE) - { - ToolbarParameters toolbar; - - clearlooks_set_toolbar_parameters (&toolbar, widget, window, x, y); - - toolbar.style = clearlooks_style->toolbarstyle; - - cairo_save (cr); - STYLE_FUNCTION(draw_toolbar) (cr, colors, ¶ms, &toolbar, x, y, width, height); - cairo_restore (cr); - } - - STYLE_FUNCTION(draw_handle) (cr, colors, ¶ms, &handle, - x, y, width, height); - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_box (DRAW_ARGS) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - cairo_t *cr; - - cr = ge_gdk_drawable_to_cairo (window, area); - colors = &clearlooks_style->colors; - - CHECK_ARGS - SANITIZE_SIZE - - if (DETAIL ("menubar") && !ge_is_panel_widget_item(widget)) - { - WidgetParameters params; - MenuBarParameters menubar; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - menubar.style = clearlooks_style->menubarstyle; - - STYLE_FUNCTION(draw_menubar) (cr, colors, ¶ms, &menubar, - x, y, width, height); - } - else if (DETAIL ("button") && widget && widget->parent && - (GE_IS_TREE_VIEW(widget->parent) || - GE_IS_CLIST (widget->parent) || - ge_object_is_a (G_OBJECT(widget->parent), "ETree"))) /* ECanvas inside ETree */ - { - WidgetParameters params; - ListViewHeaderParameters header; - - gint columns, column_index; - gboolean resizable = TRUE; - - /* XXX: This makes unknown treeview header CL_ORDER_MIDDLE, in need for something nicer */ - columns = 3; - column_index = 1; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - params.corners = CR_CORNER_NONE; - - if (GE_IS_TREE_VIEW (widget->parent)) - { - clearlooks_treeview_get_header_index (GTK_TREE_VIEW(widget->parent), - widget, &column_index, &columns, - &resizable); - } - else if (GE_IS_CLIST (widget->parent)) - { - clearlooks_clist_get_header_index (GTK_CLIST(widget->parent), - widget, &column_index, &columns); - } - - header.resizable = resizable; - - if (column_index == 0) - header.order = params.ltr ? CL_ORDER_FIRST : CL_ORDER_LAST; - else if (column_index == columns-1) - header.order = params.ltr ? CL_ORDER_LAST : CL_ORDER_FIRST; - else - header.order = CL_ORDER_MIDDLE; - - gtk_style_apply_default_background (style, window, FALSE, state_type, area, x, y, width, height); - - STYLE_FUNCTION(draw_list_view_header) (cr, colors, ¶ms, &header, - x, y, width, height); - } - else if (DETAIL ("button") || DETAIL ("buttondefault")) - { - WidgetParameters params; - ShadowParameters shadow = { CR_CORNER_ALL, CL_SHADOW_NONE } ; - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - if (ge_is_in_combo_box(widget)) - { - if (params.ltr) - params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - else - params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - - shadow.shadow = CL_SHADOW_IN; - - if (params.xthickness > 2) - { - if (params.ltr) - x--; - width++; - } - } - else - { - params.corners = CR_CORNER_ALL; - /* if (!(ge_is_combo_box (widget, FALSE))) */ - params.enable_glow = TRUE; - } - - if (GE_IS_TOGGLE_BUTTON (widget) && - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) - params.active = TRUE; - - STYLE_FUNCTION(draw_button) (cr, &clearlooks_style->colors, ¶ms, - x, y, width, height); - } - else if (DETAIL ("spinbutton_up") || DETAIL ("spinbutton_down")) - { - if (state_type == GTK_STATE_ACTIVE) - { - WidgetParameters params; - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - if (style->xthickness == 3) - { - width++; - if (params.ltr) - x--; - } - - if (DETAIL ("spinbutton_up")) - { - height+=2; - if (params.ltr) - params.corners = CR_CORNER_TOPRIGHT; - else - params.corners = CR_CORNER_TOPLEFT; - } - else - { - if (params.ltr) - params.corners = CR_CORNER_BOTTOMRIGHT; - else - params.corners = CR_CORNER_BOTTOMLEFT; - } - - STYLE_FUNCTION(draw_spinbutton_down) (cr, &clearlooks_style->colors, ¶ms, x, y, width, height); - } - } - else if (DETAIL ("spinbutton")) - { - WidgetParameters params; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - if (params.ltr) - params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; - else - params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - - if (style->xthickness == 3) - { - if (params.ltr) - x--; - width++; - } - - STYLE_FUNCTION(draw_spinbutton) (cr, &clearlooks_style->colors, ¶ms, - x, y, width, height); - } - else if (detail && g_str_has_prefix (detail, "trough") && GE_IS_SCALE (widget)) - { - WidgetParameters params; - SliderParameters slider; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - params.corners = CR_CORNER_NONE; - - slider.lower = DETAIL ("trough-lower"); - slider.fill_level = DETAIL ("trough-fill-level") || DETAIL ("trough-fill-level-full"); - - slider.horizontal = (GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL); - - STYLE_FUNCTION(draw_scale_trough) (cr, &clearlooks_style->colors, - ¶ms, &slider, - x, y, width, height); - } - else if (DETAIL ("trough") && widget && GE_IS_PROGRESS_BAR (widget)) - { - WidgetParameters params; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - STYLE_FUNCTION(draw_progressbar_trough) (cr, colors, ¶ms, - x, y, width, height); - } - else if (DETAIL ("trough") && widget && (GE_IS_VSCROLLBAR (widget) || GE_IS_HSCROLLBAR (widget))) - { - WidgetParameters params; - ScrollBarParameters scrollbar; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - params.corners = CR_CORNER_NONE; - - scrollbar.horizontal = TRUE; - scrollbar.junction = clearlooks_scrollbar_get_junction (widget); - - if (GE_IS_RANGE (widget)) - scrollbar.horizontal = GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL; - - if (scrollbar.horizontal) - { - x += 2; - width -= 4; - } - else - { - y += 2; - height -= 4; - } - - STYLE_FUNCTION(draw_scrollbar_trough) (cr, colors, ¶ms, &scrollbar, - x, y, width, height); - } - else if (DETAIL ("bar")) - { - WidgetParameters params; - ProgressBarParameters progressbar; - gdouble elapsed = 0.0; - -#ifdef HAVE_ANIMATION - if(clearlooks_style->animation && CL_IS_PROGRESS_BAR (widget)) - { - gboolean activity_mode = GTK_PROGRESS (widget)->activity_mode; - - if (!activity_mode) - clearlooks_animation_progressbar_add ((gpointer)widget); - } - - elapsed = clearlooks_animation_elapsed (widget); -#endif - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - if (widget && GE_IS_PROGRESS_BAR (widget)) - { - progressbar.orientation = gtk_progress_bar_get_orientation (GTK_PROGRESS_BAR (widget)); - progressbar.value = gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widget)); - progressbar.pulsing = GTK_PROGRESS (widget)->activity_mode; - } - else - { - progressbar.orientation = CL_ORIENTATION_LEFT_TO_RIGHT; - progressbar.value = 0; - progressbar.pulsing = FALSE; - } - - if (!params.ltr) - { - if (progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT) - progressbar.orientation = GTK_PROGRESS_RIGHT_TO_LEFT; - else if (progressbar.orientation == GTK_PROGRESS_RIGHT_TO_LEFT) - progressbar.orientation = GTK_PROGRESS_LEFT_TO_RIGHT; - } - - /* Following is a hack to have a larger clip area, the one passed in - * does not allow for the shadow. */ - if (area) - { - GdkRectangle tmp = *area; - if (!progressbar.pulsing) - { - switch (progressbar.orientation) - { - case GTK_PROGRESS_RIGHT_TO_LEFT: - tmp.x -= 1; - case GTK_PROGRESS_LEFT_TO_RIGHT: - tmp.width += 1; - break; - case GTK_PROGRESS_BOTTOM_TO_TOP: - tmp.y -= 1; - case GTK_PROGRESS_TOP_TO_BOTTOM: - tmp.height += 1; - break; - } - } - else - { - if (progressbar.orientation == GTK_PROGRESS_RIGHT_TO_LEFT || - progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT) - { - tmp.x -= 1; - tmp.width += 2; - } - else - { - tmp.y -= 1; - tmp.height += 2; - } - } - - cairo_reset_clip (cr); - gdk_cairo_rectangle (cr, &tmp); - cairo_clip (cr); - } - - STYLE_FUNCTION(draw_progressbar_fill) (cr, colors, ¶ms, &progressbar, - x, y, width, height, - 10 - (int)(elapsed * 10.0) % 10); - } - else if (DETAIL ("optionmenu")) - { - WidgetParameters params; - OptionMenuParameters optionmenu; - - GtkRequisition indicator_size; - GtkBorder indicator_spacing; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - params.enable_glow = TRUE; - - ge_option_menu_get_props (widget, &indicator_size, &indicator_spacing); - - if (ge_widget_is_ltr (widget)) - optionmenu.linepos = width - (indicator_size.width + indicator_spacing.left + indicator_spacing.right) - 1; - else - optionmenu.linepos = (indicator_size.width + indicator_spacing.left + indicator_spacing.right) + 1; - - STYLE_FUNCTION(draw_optionmenu) (cr, colors, ¶ms, &optionmenu, - x, y, width, height); - } - else if (DETAIL ("menuitem")) - { - WidgetParameters params; - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - if (widget && GE_IS_MENU_BAR (widget->parent)) - { - params.corners = CR_CORNER_TOPLEFT | CR_CORNER_TOPRIGHT; - height += 1; - STYLE_FUNCTION(draw_menubaritem) (cr, colors, ¶ms, x, y, width, height); - } - else - { - params.corners = CR_CORNER_ALL; - STYLE_FUNCTION(draw_menuitem) (cr, colors, ¶ms, x, y, width, height); - } - } - else if (DETAIL ("hscrollbar") || DETAIL ("vscrollbar")) /* This can't be "stepper" for scrollbars ... */ - { - WidgetParameters params; - ScrollBarParameters scrollbar; - ScrollBarStepperParameters stepper; - GdkRectangle this_rectangle; - - this_rectangle.x = x; - this_rectangle.y = y; - this_rectangle.width = width; - this_rectangle.height = height; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - params.corners = CR_CORNER_NONE; - - scrollbar.has_color = FALSE; - scrollbar.horizontal = TRUE; - scrollbar.junction = clearlooks_scrollbar_get_junction (widget); - - if (clearlooks_style->colorize_scrollbar || clearlooks_style->has_scrollbar_color) { - scrollbar.has_color = TRUE; - } - - scrollbar.horizontal = DETAIL ("hscrollbar"); - - stepper.stepper = clearlooks_scrollbar_get_stepper (widget, &this_rectangle); - - STYLE_FUNCTION(draw_scrollbar_stepper) (cr, colors, ¶ms, &scrollbar, &stepper, - x, y, width, height); - } - else if (DETAIL ("toolbar") || DETAIL ("handlebox_bin") || DETAIL ("dockitem_bin")) - { - WidgetParameters params; - ToolbarParameters toolbar; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - clearlooks_set_toolbar_parameters (&toolbar, widget, window, x, y); - - toolbar.style = clearlooks_style->toolbarstyle; - - /* Only draw the shadows on horizontal toolbars */ - if (shadow_type != GTK_SHADOW_NONE && height < 2*width ) - STYLE_FUNCTION(draw_toolbar) (cr, colors, ¶ms, &toolbar, x, y, width, height); - } - else if (DETAIL ("trough")) - { - - } - else if (DETAIL ("menu")) - { - WidgetParameters params; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - STYLE_FUNCTION(draw_menu_frame) (cr, colors, ¶ms, x, y, width, height); - } - else if (DETAIL ("hseparator") || DETAIL ("vseparator")) - { - const gchar *new_detail = detail; - /* Draw a normal separator, we just use this because it gives more control - * over sizing (currently). */ - - /* This isn't nice ... but it seems like the best cleanest way to me right now. - * It will get slightly nicer in the future hopefully. */ - if (GE_IS_MENU_ITEM (widget)) - new_detail = "menuitem"; - - if (DETAIL ("hseparator")) { - gtk_paint_hline (style, window, state_type, area, widget, new_detail, - x, x + width - 1, y + height/2); - } else - gtk_paint_vline (style, window, state_type, area, widget, new_detail, - y, y + height - 1, x + width/2); - } - else - { - clearlooks_parent_class->draw_box (style, window, state_type, shadow_type, area, - widget, detail, x, y, width, height); - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_slider (DRAW_ARGS, GtkOrientation orientation) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - cairo_t *cr; - - cr = ge_gdk_drawable_to_cairo (window, area); - colors = &clearlooks_style->colors; - - CHECK_ARGS - SANITIZE_SIZE - - if (DETAIL ("hscale") || DETAIL ("vscale")) - { - WidgetParameters params; - SliderParameters slider; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - slider.horizontal = (orientation == GTK_ORIENTATION_HORIZONTAL); - slider.lower = FALSE; - slider.fill_level = FALSE; - - if (clearlooks_style->style == CL_STYLE_GLOSSY) /* XXX! */ - params.corners = CR_CORNER_ALL; - - STYLE_FUNCTION(draw_slider_button) (cr, &clearlooks_style->colors, - ¶ms, &slider, - x, y, width, height); - } - else if (DETAIL ("slider")) - { - WidgetParameters params; - ScrollBarParameters scrollbar; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - params.corners = CR_CORNER_NONE; - - scrollbar.has_color = FALSE; - scrollbar.horizontal = (orientation == GTK_ORIENTATION_HORIZONTAL); - scrollbar.junction = clearlooks_scrollbar_get_junction (widget); - - if (clearlooks_style->colorize_scrollbar) { - scrollbar.color = colors->spot[1]; - scrollbar.has_color = TRUE; - } - - /* Set scrollbar color */ - if (clearlooks_style->has_scrollbar_color) - { - ge_gdk_color_to_cairo (&clearlooks_style->scrollbar_color, &scrollbar.color); - scrollbar.has_color = TRUE; - } - - if ((clearlooks_style->style == CL_STYLE_GLOSSY || clearlooks_style->style == CL_STYLE_GUMMY) - && !scrollbar.has_color) - scrollbar.color = colors->bg[0]; - - STYLE_FUNCTION(draw_scrollbar_slider) (cr, colors, ¶ms, &scrollbar, - x, y, width, height); - } - else - { - clearlooks_parent_class->draw_slider (style, window, state_type, shadow_type, area, - widget, detail, x, y, width, height, orientation); - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_option (DRAW_ARGS) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - WidgetParameters params; - CheckboxParameters checkbox; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - colors = &clearlooks_style->colors; - - checkbox.shadow_type = shadow_type; - checkbox.in_menu = (widget && GTK_IS_MENU(widget->parent)); - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - STYLE_FUNCTION(draw_radiobutton) (cr, colors, ¶ms, &checkbox, x, y, width, height); - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_check (DRAW_ARGS) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - WidgetParameters params; - CheckboxParameters checkbox; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - params.corners = CR_CORNER_ALL; - - checkbox.shadow_type = shadow_type; - checkbox.in_cell = DETAIL("cellcheck"); - - checkbox.in_menu = (widget && widget->parent && GTK_IS_MENU(widget->parent)); - - STYLE_FUNCTION(draw_checkbox) (cr, &clearlooks_style->colors, ¶ms, &checkbox, - x, y, width, height); - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_vline (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint y1, - gint y2, - gint x) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - SeparatorParameters separator = { FALSE }; - cairo_t *cr; - - CHECK_ARGS - - colors = &clearlooks_style->colors; - - cr = ge_gdk_drawable_to_cairo (window, area); - - /* There is no such thing as a vertical menu separator - * (and even if, a normal one should be better on menu bars) */ - STYLE_FUNCTION(draw_separator) (cr, colors, NULL, &separator, - x, y1, 2, y2-y1+1); - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_hline (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x1, - gint x2, - gint y) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - cairo_t *cr; - SeparatorParameters separator; - - CHECK_ARGS - - colors = &clearlooks_style->colors; - - cr = ge_gdk_drawable_to_cairo (window, area); - - separator.horizontal = TRUE; - - if (!DETAIL ("menuitem")) - STYLE_FUNCTION(draw_separator) (cr, colors, NULL, &separator, - x1, y, x2-x1+1, 2); - else - STYLE_FUNCTION(draw_menu_item_separator) (cr, colors, NULL, &separator, - x1, y, x2-x1+1, 2); - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_shadow_gap (DRAW_ARGS, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - colors = &clearlooks_style->colors; - - if (DETAIL ("frame")) - { - WidgetParameters params; - FrameParameters frame; - - frame.shadow = shadow_type; - frame.gap_side = gap_side; - frame.gap_x = gap_x; - frame.gap_width = gap_width; - frame.border = &colors->shade[5]; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - params.corners = CR_CORNER_ALL; - - STYLE_FUNCTION(draw_frame) (cr, colors, ¶ms, &frame, - x, y, width, height); - } - else - { - clearlooks_parent_class->draw_shadow_gap (style, window, state_type, shadow_type, area, - widget, detail, x, y, width, height, - gap_side, gap_x, gap_width); - } - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_resize_grip (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - GdkWindowEdge edge, - gint x, - gint y, - gint width, - gint height) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - cairo_t *cr; - WidgetParameters params; - ResizeGripParameters grip; - - CHECK_ARGS - SANITIZE_SIZE - - grip.edge = (ClearlooksWindowEdge)edge; - - g_return_if_fail (window != NULL); - - cr = ge_gdk_drawable_to_cairo (window, area); - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - STYLE_FUNCTION(draw_resize_grip) (cr, colors, ¶ms, &grip, - x, y, width, height); - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_tab (DRAW_ARGS) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - WidgetParameters params; - ArrowParameters arrow; - cairo_t *cr; - - CHECK_ARGS - SANITIZE_SIZE - - cr = ge_gdk_drawable_to_cairo (window, area); - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - arrow.type = CL_ARROW_COMBO; - arrow.direction = CL_DIRECTION_DOWN; - - STYLE_FUNCTION(draw_arrow) (cr, colors, ¶ms, &arrow, x, y, width, height); - - cairo_destroy (cr); -} - -static void -clearlooks_style_draw_arrow (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - GtkArrowType arrow_type, - gboolean fill, - gint x, - gint y, - gint width, - gint height) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - WidgetParameters params; - ArrowParameters arrow; - cairo_t *cr = ge_gdk_drawable_to_cairo (window, area); - - CHECK_ARGS - SANITIZE_SIZE - - if (arrow_type == GTK_ARROW_NONE) { - cairo_destroy (cr); - return; - } - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - arrow.type = CL_ARROW_NORMAL; - arrow.direction = (ClearlooksDirection)arrow_type; - - if (ge_is_combo_box (widget, FALSE) && !ge_is_combo_box_entry (widget)) - { - arrow.type = CL_ARROW_COMBO; - } - - /* I have no idea why, but the arrow of GtkCombo is larger than in other places. - * Subtracting 3 seems to fix this. */ - if (widget && widget->parent && GE_IS_COMBO (widget->parent->parent)) - { - if (params.ltr) - x += 1; - else - x += 2; - width -= 3; - } - - STYLE_FUNCTION(draw_arrow) (cr, colors, ¶ms, &arrow, x, y, width, height); - - cairo_destroy (cr); -} - -static void -clearlooks_style_init_from_rc (GtkStyle * style, - GtkRcStyle * rc_style) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - - clearlooks_parent_class->init_from_rc (style, rc_style); - - g_assert ((CLEARLOOKS_RC_STYLE (rc_style)->style >= 0) && (CLEARLOOKS_RC_STYLE (rc_style)->style < CL_NUM_STYLES)); - clearlooks_style->style = CLEARLOOKS_RC_STYLE (rc_style)->style; - - clearlooks_style->menubarstyle = CLEARLOOKS_RC_STYLE (rc_style)->menubarstyle; - clearlooks_style->toolbarstyle = CLEARLOOKS_RC_STYLE (rc_style)->toolbarstyle; - clearlooks_style->has_scrollbar_color = CLEARLOOKS_RC_STYLE (rc_style)->flags & CL_FLAG_SCROLLBAR_COLOR; - clearlooks_style->colorize_scrollbar = CLEARLOOKS_RC_STYLE (rc_style)->colorize_scrollbar; - clearlooks_style->animation = CLEARLOOKS_RC_STYLE (rc_style)->animation; - clearlooks_style->radius = CLAMP (CLEARLOOKS_RC_STYLE (rc_style)->radius, 0.0, 10.0); - - if (clearlooks_style->has_scrollbar_color) - clearlooks_style->scrollbar_color = CLEARLOOKS_RC_STYLE (rc_style)->scrollbar_color; -} - -static void -clearlooks_style_realize (GtkStyle * style) -{ - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - double shades[] = {1.15, 0.95, 0.896, 0.82, 0.7, 0.665, 0.475, 0.45, 0.4}; - CairoColor spot_color; - CairoColor bg_normal; - double contrast; - int i; - - clearlooks_parent_class->realize (style); - - contrast = CLEARLOOKS_RC_STYLE (style->rc_style)->contrast; - - /* Lighter to darker */ - ge_gdk_color_to_cairo (&style->bg[GTK_STATE_NORMAL], &bg_normal); - - for (i = 0; i < 9; i++) - { - ge_shade_color(&bg_normal, (shades[i]-0.7) * contrast + 0.7, &clearlooks_style->colors.shade[i]); - } - - ge_gdk_color_to_cairo (&style->bg[GTK_STATE_SELECTED], &spot_color); - - ge_shade_color(&spot_color, 1.42, &clearlooks_style->colors.spot[0]); - ge_shade_color(&spot_color, 1.05, &clearlooks_style->colors.spot[1]); - ge_shade_color(&spot_color, 0.65, &clearlooks_style->colors.spot[2]); - - for (i=0; i<5; i++) - { - ge_gdk_color_to_cairo (&style->fg[i], &clearlooks_style->colors.fg[i]); - ge_gdk_color_to_cairo (&style->bg[i], &clearlooks_style->colors.bg[i]); - ge_gdk_color_to_cairo (&style->base[i], &clearlooks_style->colors.base[i]); - ge_gdk_color_to_cairo (&style->text[i], &clearlooks_style->colors.text[i]); - } -} - -static void -clearlooks_style_draw_focus (GtkStyle *style, GdkWindow *window, GtkStateType state_type, - GdkRectangle *area, GtkWidget *widget, const gchar *detail, - gint x, gint y, gint width, gint height) -{ - cairo_t *cr; - gboolean free_dash_list = FALSE; - gint line_width = 1; - gint8 *dash_list = (gint8 *)"\1\1"; - - if (widget) - { - gtk_widget_style_get (widget, - "focus-line-width", &line_width, - "focus-line-pattern", - (gchar *) & dash_list, NULL); - - free_dash_list = TRUE; - } - - if (detail && !strcmp (detail, "add-mode")) - { - if (free_dash_list) - g_free (dash_list); - - dash_list = (gint8 *)"\4\4"; - free_dash_list = FALSE; - } - - CHECK_ARGS - SANITIZE_SIZE - - cr = gdk_cairo_create (window); - - if (detail && !strcmp (detail, "colorwheel_light")) - cairo_set_source_rgb (cr, 0., 0., 0.); - else if (detail && !strcmp (detail, "colorwheel_dark")) - cairo_set_source_rgb (cr, 1., 1., 1.); - else - ge_cairo_set_gdk_color_with_alpha (cr, &style->fg[state_type], - 0.7); - - cairo_set_line_width (cr, line_width); - - if (dash_list[0]) - { - gint n_dashes = strlen ((gchar *)dash_list); - gdouble *dashes = g_new (gdouble, n_dashes); - gdouble total_length = 0; - gdouble dash_offset; - gint i; - - for (i = 0; i < n_dashes; i++) - { - dashes[i] = dash_list[i]; - total_length += dash_list[i]; - } - - /* The dash offset here aligns the pattern to integer pixels - * by starting the dash at the right side of the left border - * Negative dash offsets in cairo don't work - * (https://bugs.freedesktop.org/show_bug.cgi?id=2729) - */ - dash_offset = -line_width / 2.; - while (dash_offset < 0) - dash_offset += total_length; - - cairo_set_dash (cr, dashes, n_dashes, dash_offset); - g_free (dashes); - } - - if (area) - { - gdk_cairo_rectangle (cr, area); - cairo_clip (cr); - } - - cairo_rectangle (cr, - x + line_width / 2., - y + line_width / 2., - width - line_width, height - line_width); - cairo_stroke (cr); - cairo_destroy (cr); - - if (free_dash_list) - g_free (dash_list); -} - -static void -clearlooks_style_copy (GtkStyle * style, GtkStyle * src) -{ - ClearlooksStyle * cl_style = CLEARLOOKS_STYLE (style); - ClearlooksStyle * cl_src = CLEARLOOKS_STYLE (src); - - cl_style->colors = cl_src->colors; - cl_style->menubarstyle = cl_src->menubarstyle; - cl_style->toolbarstyle = cl_src->toolbarstyle; - cl_style->scrollbar_color = cl_src->scrollbar_color; - cl_style->has_scrollbar_color = cl_src->has_scrollbar_color; - cl_style->colorize_scrollbar = cl_src->colorize_scrollbar; - cl_style->animation = cl_src->animation; - cl_style->radius = cl_src->radius; - cl_style->style = cl_src->style; - - clearlooks_parent_class->copy (style, src); -} - -static void -clearlooks_style_unrealize (GtkStyle * style) -{ - clearlooks_parent_class->unrealize (style); -} - -static GdkPixbuf * -set_transparency (const GdkPixbuf *pixbuf, gdouble alpha_percent) -{ - GdkPixbuf *target; - guchar *data, *current; - guint x, y, rowstride, height, width; - - g_return_val_if_fail (pixbuf != NULL, NULL); - g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL); - - /* Returns a copy of pixbuf with it's non-completely-transparent pixels to - have an alpha level "alpha_percent" of their original value. */ - - target = gdk_pixbuf_add_alpha (pixbuf, FALSE, 0, 0, 0); - - if (alpha_percent == 1.0) - return target; - width = gdk_pixbuf_get_width (target); - height = gdk_pixbuf_get_height (target); - rowstride = gdk_pixbuf_get_rowstride (target); - data = gdk_pixbuf_get_pixels (target); - - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { - /* The "4" is the number of chars per pixel, in this case, RGBA, - the 3 means "skip to the alpha" */ - current = data + (y * rowstride) + (x * 4) + 3; - *(current) = (guchar) (*(current) * alpha_percent); - } - } - - return target; -} - -static GdkPixbuf* -scale_or_ref (GdkPixbuf *src, - int width, - int height) -{ - if (width == gdk_pixbuf_get_width (src) && - height == gdk_pixbuf_get_height (src)) { - return g_object_ref (src); - } else { - return gdk_pixbuf_scale_simple (src, - width, height, - GDK_INTERP_BILINEAR); - } -} - -static void -clearlooks_style_draw_layout (GtkStyle * style, - GdkWindow * window, - GtkStateType state_type, - gboolean use_text, - GdkRectangle * area, - GtkWidget * widget, - const gchar * detail, gint x, gint y, PangoLayout * layout) -{ - GdkGC *gc; - - g_return_if_fail (GTK_IS_STYLE (style)); - g_return_if_fail (window != NULL); - - gc = use_text ? style->text_gc[state_type] : style->fg_gc[state_type]; - - if (area) - gdk_gc_set_clip_rectangle (gc, area); - - if (state_type == GTK_STATE_INSENSITIVE) { - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - - WidgetParameters params; - GdkColor etched; - CairoColor temp; - - clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); - - if (GTK_WIDGET_NO_WINDOW (widget)) - ge_shade_color (¶ms.parentbg, 1.2, &temp); - else - ge_shade_color (&colors->bg[widget->state], 1.2, &temp); - - etched.red = (int) (temp.r * 65535); - etched.green = (int) (temp.g * 65535); - etched.blue = (int) (temp.b * 65535); - - gdk_draw_layout_with_colors (window, gc, x + 1, y + 1, layout, &etched, NULL); - gdk_draw_layout (window, gc, x, y, layout); - } - else - gdk_draw_layout (window, gc, x, y, layout); - - if (area) - gdk_gc_set_clip_rectangle (gc, NULL); -} - -static GdkPixbuf * -clearlooks_style_draw_render_icon (GtkStyle *style, - const GtkIconSource *source, - GtkTextDirection direction, - GtkStateType state, - GtkIconSize size, - GtkWidget *widget, - const char *detail) -{ - int width = 1; - int height = 1; - GdkPixbuf *scaled; - GdkPixbuf *stated; - GdkPixbuf *base_pixbuf; - GdkScreen *screen; - GtkSettings *settings; - - /* Oddly, style can be NULL in this function, because - * GtkIconSet can be used without a style and if so - * it uses this function. - */ - - base_pixbuf = gtk_icon_source_get_pixbuf (source); - - g_return_val_if_fail (base_pixbuf != NULL, NULL); - - if (widget && gtk_widget_has_screen (widget)) { - screen = gtk_widget_get_screen (widget); - settings = gtk_settings_get_for_screen (screen); - } else if (style->colormap) { - screen = gdk_colormap_get_screen (style->colormap); - settings = gtk_settings_get_for_screen (screen); - } else { - settings = gtk_settings_get_default (); - GTK_NOTE (MULTIHEAD, - g_warning ("Using the default screen for gtk_default_render_icon()")); - } - - - if (size != (GtkIconSize) -1 && !gtk_icon_size_lookup_for_settings (settings, size, &width, &height)) { - g_warning (G_STRLOC ": invalid icon size '%d'", size); - return NULL; - } - - /* If the size was wildcarded, and we're allowed to scale, then scale; otherwise, - * leave it alone. - */ - if (size != (GtkIconSize)-1 && gtk_icon_source_get_size_wildcarded (source)) - scaled = scale_or_ref (base_pixbuf, width, height); - else - scaled = g_object_ref (base_pixbuf); - - /* If the state was wildcarded, then generate a state. */ - if (gtk_icon_source_get_state_wildcarded (source)) { - if (state == GTK_STATE_INSENSITIVE) { - stated = set_transparency (scaled, 0.3); - gdk_pixbuf_saturate_and_pixelate (stated, stated, - 0.1, FALSE); - - g_object_unref (scaled); - } else if (state == GTK_STATE_PRELIGHT) { - stated = gdk_pixbuf_copy (scaled); - - gdk_pixbuf_saturate_and_pixelate (scaled, stated, - 1.2, FALSE); - - g_object_unref (scaled); - } else { - stated = scaled; - } - } - else - stated = scaled; - - return stated; -} - -static void -clearlooks_style_init (ClearlooksStyle * style) -{ -} - -static void -clearlooks_style_class_init (ClearlooksStyleClass * klass) -{ - GtkStyleClass *style_class = GTK_STYLE_CLASS (klass); - - clearlooks_style_class = CLEARLOOKS_STYLE_CLASS (klass); - clearlooks_parent_class = g_type_class_peek_parent (klass); - - style_class->copy = clearlooks_style_copy; - style_class->realize = clearlooks_style_realize; - style_class->unrealize = clearlooks_style_unrealize; - style_class->init_from_rc = clearlooks_style_init_from_rc; - style_class->draw_handle = clearlooks_style_draw_handle; - style_class->draw_slider = clearlooks_style_draw_slider; - style_class->draw_shadow_gap = clearlooks_style_draw_shadow_gap; - style_class->draw_focus = clearlooks_style_draw_focus; - style_class->draw_box = clearlooks_style_draw_box; - style_class->draw_shadow = clearlooks_style_draw_shadow; - style_class->draw_box_gap = clearlooks_style_draw_box_gap; - style_class->draw_extension = clearlooks_style_draw_extension; - style_class->draw_option = clearlooks_style_draw_option; - style_class->draw_check = clearlooks_style_draw_check; - style_class->draw_flat_box = clearlooks_style_draw_flat_box; - style_class->draw_vline = clearlooks_style_draw_vline; - style_class->draw_hline = clearlooks_style_draw_hline; - style_class->draw_resize_grip = clearlooks_style_draw_resize_grip; - style_class->draw_tab = clearlooks_style_draw_tab; - style_class->draw_arrow = clearlooks_style_draw_arrow; - style_class->draw_layout = clearlooks_style_draw_layout; - style_class->render_icon = clearlooks_style_draw_render_icon; - - clearlooks_register_style_classic (&clearlooks_style_class->style_functions[CL_STYLE_CLASSIC]); - clearlooks_style_class->style_functions[CL_STYLE_GLOSSY] = clearlooks_style_class->style_functions[CL_STYLE_CLASSIC]; - clearlooks_register_style_glossy (&clearlooks_style_class->style_functions[CL_STYLE_GLOSSY]); - clearlooks_style_class->style_functions[CL_STYLE_INVERTED] = clearlooks_style_class->style_functions[CL_STYLE_CLASSIC]; - clearlooks_register_style_inverted (&clearlooks_style_class->style_functions[CL_STYLE_INVERTED]); - clearlooks_style_class->style_functions[CL_STYLE_GUMMY] = clearlooks_style_class->style_functions[CL_STYLE_CLASSIC]; - clearlooks_register_style_gummy (&clearlooks_style_class->style_functions[CL_STYLE_GUMMY]); -} - -GType clearlooks_type_style = 0; - -void -clearlooks_style_register_type (GTypeModule * module) -{ - static const GTypeInfo object_info = - { - sizeof (ClearlooksStyleClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) clearlooks_style_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (ClearlooksStyle), - 0, /* n_preallocs */ - (GInstanceInitFunc) clearlooks_style_init, - NULL - }; - - clearlooks_type_style = g_type_module_register_type (module, - GTK_TYPE_STYLE, - "ClearlooksStyle", - &object_info, 0); -} diff --git a/libs/clearlooks/clearlooks_style.h b/libs/clearlooks/clearlooks_style.h deleted file mode 100644 index 78f3ca1675..0000000000 --- a/libs/clearlooks/clearlooks_style.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Clearlooks Engine - * Copyright (C) 2005 Richard Stellingwerff. - * Copyright (C) 2006 Benjamin Berg - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Written by Owen Taylor - * and by Alexander Larsson - * Modified by Richard Stellingwerff - */ -#include - -#ifndef CLEARLOOKS_STYLE_H -#define CLEARLOOKS_STYLE_H - -#include "animation.h" -#include "clearlooks_types.h" - -typedef struct _ClearlooksStyle ClearlooksStyle; -typedef struct _ClearlooksStyleClass ClearlooksStyleClass; - -GE_INTERNAL extern GType clearlooks_type_style; - -#define CLEARLOOKS_TYPE_STYLE clearlooks_type_style -#define CLEARLOOKS_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), CLEARLOOKS_TYPE_STYLE, ClearlooksStyle)) -#define CLEARLOOKS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLEARLOOKS_TYPE_STYLE, ClearlooksStyleClass)) -#define CLEARLOOKS_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), CLEARLOOKS_TYPE_STYLE)) -#define CLEARLOOKS_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLEARLOOKS_TYPE_STYLE)) -#define CLEARLOOKS_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLEARLOOKS_TYPE_STYLE, ClearlooksStyleClass)) - -struct _ClearlooksStyle -{ - GtkStyle parent_instance; - - ClearlooksColors colors; - - ClearlooksStyles style; - - guint8 menubarstyle; - guint8 toolbarstyle; - GdkColor scrollbar_color; - gboolean colorize_scrollbar; - gboolean has_scrollbar_color; - gboolean animation; - gfloat radius; -}; - -struct _ClearlooksStyleClass -{ - GtkStyleClass parent_class; - - ClearlooksStyleFunctions style_functions[CL_NUM_STYLES]; -}; - -GE_INTERNAL void clearlooks_style_register_type (GTypeModule *module); - -#endif /* CLEARLOOKS_STYLE_H */ diff --git a/libs/clearlooks/clearlooks_theme_main.c b/libs/clearlooks/clearlooks_theme_main.c deleted file mode 100644 index c042fdbac0..0000000000 --- a/libs/clearlooks/clearlooks_theme_main.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -#include "clearlooks_style.h" -#include "clearlooks_rc_style.h" - -GE_EXPORT void -theme_init (GTypeModule *module) -{ - clearlooks_rc_style_register_type (module); - clearlooks_style_register_type (module); -} - -GE_EXPORT void -theme_exit (void) -{ -} - -GE_EXPORT GtkRcStyle * -theme_create_rc_style (void) -{ - return GTK_RC_STYLE (g_object_new (CLEARLOOKS_TYPE_RC_STYLE, NULL)); -} diff --git a/libs/clearlooks/clearlooks_types.h b/libs/clearlooks/clearlooks_types.h deleted file mode 100644 index 7caf8a3208..0000000000 --- a/libs/clearlooks/clearlooks_types.h +++ /dev/null @@ -1,455 +0,0 @@ -#ifndef CLEARLOOKS_TYPES_H -#define CLEARLOOKS_TYPES_H - -#include - -typedef unsigned char boolean; -typedef unsigned char uint8; -typedef struct _ClearlooksStyleFunctions ClearlooksStyleFunctions; - -typedef enum -{ - CL_STYLE_CLASSIC = 0, - CL_STYLE_GLOSSY = 1, - CL_STYLE_INVERTED = 2, - CL_STYLE_GUMMY = 3, - CL_NUM_STYLES = 4 -} ClearlooksStyles; - - -typedef enum -{ - CL_STATE_NORMAL, - CL_STATE_ACTIVE, - CL_STATE_SELECTED, - CL_STATE_INSENSITIVE -} ClearlooksStateType; - -typedef enum -{ - CL_JUNCTION_NONE = 0, - CL_JUNCTION_BEGIN = 1, - CL_JUNCTION_END = 2 -} ClearlooksJunction; - -typedef enum -{ - CL_STEPPER_UNKNOWN = 0, - CL_STEPPER_A = 1, - CL_STEPPER_B = 2, - CL_STEPPER_C = 4, - CL_STEPPER_D = 8 -} ClearlooksStepper; - -typedef enum -{ - CL_ORDER_FIRST, - CL_ORDER_MIDDLE, - CL_ORDER_LAST -} ClearlooksOrder; - -typedef enum -{ - CL_ORIENTATION_LEFT_TO_RIGHT, - CL_ORIENTATION_RIGHT_TO_LEFT, - CL_ORIENTATION_BOTTOM_TO_TOP, - CL_ORIENTATION_TOP_TO_BOTTOM -} ClearlooksOrientation; - -typedef enum -{ - CL_GAP_LEFT, - CL_GAP_RIGHT, - CL_GAP_TOP, - CL_GAP_BOTTOM -} ClearlooksGapSide; - -typedef enum -{ - CL_SHADOW_NONE, - CL_SHADOW_IN, - CL_SHADOW_OUT, - CL_SHADOW_ETCHED_IN, - CL_SHADOW_ETCHED_OUT -} ClearlooksShadowType; - -typedef enum -{ - CL_HANDLE_TOOLBAR, - CL_HANDLE_SPLITTER -} ClearlooksHandleType; - -typedef enum -{ - CL_ARROW_NORMAL, - CL_ARROW_COMBO -} ClearlooksArrowType; - -typedef enum -{ - CL_DIRECTION_UP, - CL_DIRECTION_DOWN, - CL_DIRECTION_LEFT, - CL_DIRECTION_RIGHT -} ClearlooksDirection; - -typedef enum -{ - CL_PROGRESSBAR_CONTINUOUS, - CL_PROGRESSBAR_DISCRETE -} ClearlooksProgressBarStyle; - -typedef enum -{ - CL_WINDOW_EDGE_NORTH_WEST, - CL_WINDOW_EDGE_NORTH, - CL_WINDOW_EDGE_NORTH_EAST, - CL_WINDOW_EDGE_WEST, - CL_WINDOW_EDGE_EAST, - CL_WINDOW_EDGE_SOUTH_WEST, - CL_WINDOW_EDGE_SOUTH, - CL_WINDOW_EDGE_SOUTH_EAST -} ClearlooksWindowEdge; - -typedef struct -{ - double x; - double y; - double width; - double height; -} ClearlooksRectangle; - -typedef struct -{ - CairoColor fg[5]; - CairoColor bg[5]; - CairoColor base[5]; - CairoColor text[5]; - - CairoColor shade[9]; - CairoColor spot[3]; -} ClearlooksColors; - -typedef struct -{ - boolean active; - boolean prelight; - boolean disabled; - boolean focus; - boolean is_default; - boolean ltr; - boolean enable_glow; - - gfloat radius; - - ClearlooksStateType state_type; - - uint8 corners; - uint8 xthickness; - uint8 ythickness; - - CairoColor parentbg; - - ClearlooksStyleFunctions *style_functions; -} WidgetParameters; - -typedef struct -{ - boolean lower; - boolean horizontal; - boolean fill_level; -} SliderParameters; - -typedef struct -{ - ClearlooksOrientation orientation; - boolean pulsing; - float value; -} ProgressBarParameters; - -typedef struct -{ - int linepos; -} OptionMenuParameters; - -typedef struct -{ - ClearlooksShadowType shadow; - ClearlooksGapSide gap_side; - int gap_x; - int gap_width; - const CairoColor *border; /* maybe changes this to some other hint ... */ -} FrameParameters; - -typedef struct -{ - ClearlooksGapSide gap_side; -} TabParameters; - -typedef struct -{ - CairoCorners corners; - ClearlooksShadowType shadow; -} ShadowParameters; - -typedef struct -{ - boolean horizontal; -} SeparatorParameters; - -typedef struct -{ - ClearlooksOrder order; /* XXX: rename to position */ - boolean resizable; -} ListViewHeaderParameters; - -typedef struct -{ - CairoColor color; - ClearlooksJunction junction; /* On which sides the slider junctions */ - boolean horizontal; - boolean has_color; -} ScrollBarParameters; - -typedef struct -{ - ClearlooksHandleType type; - boolean horizontal; -} HandleParameters; - -typedef struct -{ - ClearlooksStepper stepper; /* Which stepper to draw */ -} ScrollBarStepperParameters; - -typedef struct -{ - ClearlooksWindowEdge edge; -} ResizeGripParameters; - -typedef struct -{ - int style; -} MenuBarParameters; - -typedef struct -{ - ClearlooksShadowType shadow_type; - boolean in_cell; - boolean in_menu; -} CheckboxParameters; - -typedef struct -{ - ClearlooksArrowType type; - ClearlooksDirection direction; -} ArrowParameters; - -typedef struct -{ - int style; - boolean topmost; -} ToolbarParameters; - -struct _ClearlooksStyleFunctions -{ - void (*draw_button) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_scale_trough) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SliderParameters *slider, - int x, int y, int width, int height); - - void (*draw_progressbar_trough) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_progressbar_fill) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ProgressBarParameters *progressbar, - int x, int y, int width, int height, gint offset); - - void (*draw_slider_button) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SliderParameters *slider, - int x, int y, int width, int height); - - void (*draw_entry) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_spinbutton) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_spinbutton_down) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_optionmenu) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const OptionMenuParameters *optionmenu, - int x, int y, int width, int height); - - void (*draw_inset) (cairo_t *cr, - const CairoColor *bg_color, - double x, double y, double w, double h, - double radius, uint8 corners); - - void (*draw_menubar) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const MenuBarParameters *menubar, - int x, int y, int width, int height); - - void (*draw_tab) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const TabParameters *tab, - int x, int y, int width, int height); - - void (*draw_frame) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const FrameParameters *frame, - int x, int y, int width, int height); - - void (*draw_separator) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SeparatorParameters *separator, - int x, int y, int width, int height); - - void (*draw_menu_item_separator) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const SeparatorParameters *separator, - int x, int y, int width, int height); - - void (*draw_list_view_header) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ListViewHeaderParameters *header, - int x, int y, int width, int height); - - void (*draw_toolbar) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ToolbarParameters *toolbar, - int x, int y, int width, int height); - - void (*draw_menuitem) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_menubaritem) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_selected_cell) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_scrollbar_stepper) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - const ScrollBarStepperParameters *stepper, - int x, int y, int width, int height); - - void (*draw_scrollbar_slider) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height); - - void (*draw_scrollbar_trough) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ScrollBarParameters *scrollbar, - int x, int y, int width, int height); - - void (*draw_statusbar) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_menu_frame) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_tooltip) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_handle) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const HandleParameters *handle, - int x, int y, int width, int height); - - void (*draw_resize_grip) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ResizeGripParameters *grip, - int x, int y, int width, int height); - - void (*draw_arrow) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const ArrowParameters *arrow, - int x, int y, int width, int height); - - void (*draw_checkbox) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height); - - void (*draw_radiobutton) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - const CheckboxParameters *checkbox, - int x, int y, int width, int height); - - /* Style internal functions */ - /* XXX: Only used by slider_button, inline it? */ - void (*draw_shadow) (cairo_t *cr, - const ClearlooksColors *colors, - gfloat radius, - int width, int height); - - void (*draw_slider) (cairo_t *cr, - const ClearlooksColors *colors, - const WidgetParameters *widget, - int x, int y, int width, int height); - - void (*draw_gripdots) (cairo_t *cr, - const ClearlooksColors *colors, int x, int y, - int width, int height, int xr, int yr, - float contrast); -}; - - -#define CLEARLOOKS_RECTANGLE_SET(rect, _x, _y, _w, _h) rect.x = _x; \ - rect.y = _y; \ - rect.width = _w; \ - rect.height = _h; - -#endif /* CLEARLOOKS_TYPES_H */ diff --git a/libs/clearlooks/config.h b/libs/clearlooks/config.h deleted file mode 100644 index 4326e37ec1..0000000000 --- a/libs/clearlooks/config.h +++ /dev/null @@ -1,80 +0,0 @@ -/* engines/clearlooks/src/config.h. Generated from config.h.in by configure. */ -/* engines/clearlooks/src/config.h.in. Generated from configure.ac by autoheader. */ - -/* always defined to indicate that i18n is enabled */ -#define ENABLE_NLS 1 - -/* Gettext package */ -#define GETTEXT_PACKAGE "gtk-engines" - -/* Defines whether to compile with animation support */ -#define HAVE_ANIMATION 1 - -/* Define to 1 if you have the `bind_textdomain_codeset' function. */ -#define HAVE_BIND_TEXTDOMAIN_CODESET 1 - -/* Define to 1 if you have the `dcgettext' function. */ -#define HAVE_DCGETTEXT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#define HAVE_GETTEXT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if your file defines LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Name of package */ -#define PACKAGE "gtk-engines" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gtk-engines" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gtk-engines 2.12.2" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gtk-engines" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.12.2" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "2.12.2" diff --git a/libs/clearlooks/cpdll.sh b/libs/clearlooks/cpdll.sh deleted file mode 100755 index fb101d52a0..0000000000 --- a/libs/clearlooks/cpdll.sh +++ /dev/null @@ -1,2 +0,0 @@ -mkdir engines -cp libclearlooks.so engines diff --git a/libs/clearlooks/ge-support.h b/libs/clearlooks/ge-support.h deleted file mode 100644 index e0a42b6c3d..0000000000 --- a/libs/clearlooks/ge-support.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef GE_SUPPORT_H -#define GE_SUPPORT_H - -#include "general-support.h" -#include "cairo-support.h" -#include "widget-information.h" - - -#endif /* GE_SUPPORT_H */ diff --git a/libs/clearlooks/general-support.h b/libs/clearlooks/general-support.h deleted file mode 100644 index 25999e2d31..0000000000 --- a/libs/clearlooks/general-support.h +++ /dev/null @@ -1,39 +0,0 @@ - -#include -#include - -/* macros to make sure that things are sane ... */ - -#define CHECK_DETAIL(detail, value) ((detail) && (!strcmp(value, detail))) - -#define CHECK_ARGS \ - g_return_if_fail (window != NULL); \ - g_return_if_fail (style != NULL); - -#define SANITIZE_SIZE \ - g_return_if_fail (width >= -1); \ - g_return_if_fail (height >= -1); \ - \ - if ((width == -1) && (height == -1)) \ - gdk_drawable_get_size (window, &width, &height); \ - else if (width == -1) \ - gdk_drawable_get_size (window, &width, NULL); \ - else if (height == -1) \ - gdk_drawable_get_size (window, NULL, &height); - -#define GE_EXPORT G_MODULE_EXPORT -#define GE_INTERNAL G_GNUC_INTERNAL - -/* explicitly export with ggc, G_MODULE_EXPORT does not do this, this should - * make it possible to compile with -fvisibility=hidden */ -#ifdef G_HAVE_GNUC_VISIBILITY -# undef GE_EXPORT -# define GE_EXPORT __attribute__((__visibility__("default"))) -#endif - -#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) -# undef GE_EXPORT -# undef GE_INTERNAL -# define GE_EXPORT __global -# define GE_INTERNAL __hidden -#endif diff --git a/libs/clearlooks/support.c b/libs/clearlooks/support.c deleted file mode 100644 index 6d4d8a286d..0000000000 --- a/libs/clearlooks/support.c +++ /dev/null @@ -1,287 +0,0 @@ -/* Clearlooks theme engine - * Copyright (C) 2005 Richard Stellingwerff. - * Copyright (C) 2007 Benjamin Berg . - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#include "support.h" - -void clearlooks_treeview_get_header_index (GtkTreeView *tv, GtkWidget *header, - gint *column_index, gint *columns, - gboolean *resizable) -{ - GList *list, *list_start; - *column_index = *columns = 0; - list_start = list = gtk_tree_view_get_columns (tv); - - do - { - GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(list->data); - if ( column->button == header ) - { - *column_index = *columns; - *resizable = column->resizable; - } - if ( column->visible ) - (*columns)++; - } while ((list = g_list_next(list))); - - g_list_free (list_start); -} - -void clearlooks_clist_get_header_index (GtkCList *clist, GtkWidget *button, - gint *column_index, gint *columns) -{ - int i; - *columns = clist->columns; - - for (i=0; i<*columns; i++) - { - if (clist->column[i].button == button) - { - *column_index = i; - break; - } - } -} - -void -clearlooks_get_parent_bg (const GtkWidget *widget, CairoColor *color) -{ - GtkStateType state_type; - const GtkWidget *parent; - GdkColor *gcolor; - - if (widget == NULL) - return; - - parent = widget->parent; - - while (parent && GTK_WIDGET_NO_WINDOW (parent) && !((GTK_IS_NOTEBOOK (parent)) || (GTK_IS_TOOLBAR (parent)))) - parent = parent->parent; - - if (parent == NULL) - return; - - state_type = GTK_WIDGET_STATE (parent); - - gcolor = &parent->style->bg[state_type]; - - ge_gdk_color_to_cairo (gcolor, color); -} - -ClearlooksStepper -clearlooks_scrollbar_get_stepper (GtkWidget *widget, - GdkRectangle *stepper) -{ - ClearlooksStepper value = CL_STEPPER_UNKNOWN; - GdkRectangle tmp; - GdkRectangle check_rectangle; - GtkOrientation orientation; - - if (!GE_IS_RANGE (widget)) - return CL_STEPPER_UNKNOWN; - - check_rectangle.x = widget->allocation.x; - check_rectangle.y = widget->allocation.y; - check_rectangle.width = stepper->width; - check_rectangle.height = stepper->height; - - orientation = GTK_RANGE (widget)->orientation; - - if (widget->allocation.x == -1 && widget->allocation.y == -1) - return CL_STEPPER_UNKNOWN; - - if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp)) - value = CL_STEPPER_A; - - if (value == CL_STEPPER_UNKNOWN) /* Haven't found a match */ - { - if (orientation == GTK_ORIENTATION_HORIZONTAL) - check_rectangle.x = widget->allocation.x + stepper->width; - else - check_rectangle.y = widget->allocation.y + stepper->height; - - if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp)) - value = CL_STEPPER_B; - } - - if (value == CL_STEPPER_UNKNOWN) /* Still haven't found a match */ - { - if (orientation == GTK_ORIENTATION_HORIZONTAL) - check_rectangle.x = widget->allocation.x + widget->allocation.width - (stepper->width * 2); - else - check_rectangle.y = widget->allocation.y + widget->allocation.height - (stepper->height * 2); - - if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp)) - value = CL_STEPPER_C; - } - - if (value == CL_STEPPER_UNKNOWN) /* STILL haven't found a match */ - { - if (orientation == GTK_ORIENTATION_HORIZONTAL) - check_rectangle.x = widget->allocation.x + widget->allocation.width - stepper->width; - else - check_rectangle.y = widget->allocation.y + widget->allocation.height - stepper->height; - - if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp)) - value = CL_STEPPER_D; - } - - return value; -} - -ClearlooksStepper -clearlooks_scrollbar_visible_steppers (GtkWidget *widget) -{ - ClearlooksStepper steppers = 0; - - if (!GE_IS_RANGE (widget)) - return 0; - - if (GTK_RANGE (widget)->has_stepper_a) - steppers |= CL_STEPPER_A; - - if (GTK_RANGE (widget)->has_stepper_b) - steppers |= CL_STEPPER_B; - - if (GTK_RANGE (widget)->has_stepper_c) - steppers |= CL_STEPPER_C; - - if (GTK_RANGE (widget)->has_stepper_d) - steppers |= CL_STEPPER_D; - - return steppers; -} - -ClearlooksJunction -clearlooks_scrollbar_get_junction (GtkWidget *widget) -{ - GtkAdjustment *adj; - ClearlooksJunction junction = CL_JUNCTION_NONE; - - if (!GE_IS_RANGE (widget)) - return CL_JUNCTION_NONE; - - adj = GTK_RANGE (widget)->adjustment; - - if (adj->value <= adj->lower && - (GTK_RANGE (widget)->has_stepper_a || GTK_RANGE (widget)->has_stepper_b)) - { - junction |= CL_JUNCTION_BEGIN; - } - - if (adj->value >= adj->upper - adj->page_size && - (GTK_RANGE (widget)->has_stepper_c || GTK_RANGE (widget)->has_stepper_d)) - { - junction |= CL_JUNCTION_END; - } - - return junction; -} - -void -clearlooks_set_toolbar_parameters (ToolbarParameters *toolbar, GtkWidget *widget, GdkWindow *window, gint x, gint y) -{ - toolbar->topmost = FALSE; - - if (x == 0 && y == 0) { - if (widget && widget->allocation.x == 0 && widget->allocation.y == 0) - { - if (widget->window == window && GE_IS_TOOLBAR (widget)) - { - toolbar->topmost = TRUE; - } - } - } -} - -void -clearlooks_get_notebook_tab_position (GtkWidget *widget, - gboolean *start, - gboolean *end) -{ - /* default value */ - *start = TRUE; - *end = FALSE; - - if (GE_IS_NOTEBOOK (widget)) { - gboolean found_tabs = FALSE; - gint i, n_pages; - GtkNotebook *notebook = GTK_NOTEBOOK (widget); - - /* got a notebook, so walk over all the tabs and decide based - * on that ... - * It works like this: - * - If there is any visible tab that is expanded, set both. - * - Set start/end if there is any visible tab that is at - * the start/end. - * - If one has the child_visibility set to false, arrows - * are present; so none - * The heuristic falls over if there is a notebook that just - * happens to fill up all the available space. ie. All tabs - * are left aligned, but it does not require scrolling. - * (a more complex heuristic could calculate the tabs width - * and add them all up) */ - - n_pages = gtk_notebook_get_n_pages (notebook); - for (i = 0; i < n_pages; i++) { - GtkWidget *tab_child; - GtkWidget *tab_label; - gboolean expand; - GtkPackType pack_type; - - tab_child = gtk_notebook_get_nth_page (notebook, i); - - /* Skip invisible tabs */ - tab_label = gtk_notebook_get_tab_label (notebook, tab_child); - if (!tab_label || !GTK_WIDGET_VISIBLE (tab_label)) - continue; - /* This is the same what the notebook does internally. */ - if (tab_label && !gtk_widget_get_child_visible (tab_label)) { - /* One child is hidden because scroll arrows are present. - * So both corners are rounded. */ - *start = FALSE; - *end = FALSE; - return; - } - - gtk_notebook_query_tab_label_packing (notebook, tab_child, - &expand, - NULL, /* don't need fill */ - &pack_type); - - if (!found_tabs) { - found_tabs = TRUE; - *start = FALSE; - *end = FALSE; - } - - if (expand) { - *start = TRUE; - *end = TRUE; - } else if (pack_type == GTK_PACK_START) { - *start = TRUE; - } else { - *end = TRUE; - } - } - } -} - - diff --git a/libs/clearlooks/support.h b/libs/clearlooks/support.h deleted file mode 100644 index 23e33c58e7..0000000000 --- a/libs/clearlooks/support.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef SUPPORT_H -#define SUPPORT_H - -#include -#include -#include - -#include "clearlooks_types.h" - -#define RADIO_SIZE 13 -#define CHECK_SIZE 13 - -GE_INTERNAL void clearlooks_treeview_get_header_index (GtkTreeView *tv, - GtkWidget *header, - gint *column_index, - gint *columns, - gboolean *resizable); - -GE_INTERNAL void clearlooks_clist_get_header_index (GtkCList *clist, - GtkWidget *button, - gint *column_index, - gint *columns); -#ifdef DEVELOPMENT -#warning clearlooks_get_parent_bg is a bad hack - find out why its needed, and figure out a better way. -#endif - -GE_INTERNAL void clearlooks_get_parent_bg (const GtkWidget *widget, - CairoColor *color); - -GE_INTERNAL ClearlooksStepper clearlooks_scrollbar_get_stepper (GtkWidget *widget, - GdkRectangle *stepper); -GE_INTERNAL ClearlooksStepper clearlooks_scrollbar_visible_steppers (GtkWidget *widget); -GE_INTERNAL ClearlooksJunction clearlooks_scrollbar_get_junction (GtkWidget *widget); - -GE_INTERNAL void clearlooks_set_toolbar_parameters (ToolbarParameters *toolbar, GtkWidget *widget, GdkWindow *window, gint x, gint y); -GE_INTERNAL void clearlooks_get_notebook_tab_position (GtkWidget *widget, gboolean *start, gboolean *end); - -#endif /* SUPPORT_H */ diff --git a/libs/clearlooks/widget-information.c b/libs/clearlooks/widget-information.c deleted file mode 100644 index cbeb00e291..0000000000 --- a/libs/clearlooks/widget-information.c +++ /dev/null @@ -1,312 +0,0 @@ -#include - -#include "general-support.h" -#include "widget-information.h" -#include -#include - -/* Widget Type Lookups/Macros - - Based on/modified from functions in - Smooth-Engine. -*/ -gboolean -ge_object_is_a (const GObject * object, const gchar * type_name) -{ - gboolean result = FALSE; - - if ((object)) - { - GType tmp = g_type_from_name (type_name); - - if (tmp) - result = g_type_check_instance_is_a ((GTypeInstance *) object, tmp); - } - - return result; -} - -gboolean -ge_is_combo_box_entry (GtkWidget * widget) -{ - gboolean result = FALSE; - - if ((widget) && (widget->parent)) - { - if (GE_IS_COMBO_BOX_ENTRY (widget->parent)) - result = TRUE; - else - result = ge_is_combo_box_entry (widget->parent); - } - return result; -} - -static gboolean -ge_combo_box_is_using_list (GtkWidget * widget) -{ - gboolean result = FALSE; - - if (GE_IS_COMBO_BOX (widget)) - { - gboolean *tmp = NULL; - - gtk_widget_style_get (widget, "appears-as-list", &result, NULL); - - if (tmp) - result = *tmp; - } - - return result; -} - -gboolean -ge_is_combo_box (GtkWidget * widget, gboolean as_list) -{ - gboolean result = FALSE; - - if ((widget) && (widget->parent)) - { - if (GE_IS_COMBO_BOX (widget->parent)) - { - if (as_list) - result = (ge_combo_box_is_using_list(widget->parent)); - else - result = (!ge_combo_box_is_using_list(widget->parent)); - } - else - result = ge_is_combo_box (widget->parent, as_list); - } - return result; -} - -gboolean -ge_is_combo (GtkWidget * widget) -{ - gboolean result = FALSE; - - if ((widget) && (widget->parent)) - { - if (GE_IS_COMBO (widget->parent)) - result = TRUE; - else - result = ge_is_combo (widget->parent); - } - return result; -} - -gboolean -ge_is_in_combo_box (GtkWidget * widget) -{ - return ((ge_is_combo (widget) || ge_is_combo_box (widget, TRUE) || ge_is_combo_box_entry (widget))); -} - -gboolean -ge_is_toolbar_item (GtkWidget * widget) -{ - gboolean result = FALSE; - - if ((widget) && (widget->parent)) { - if ((GE_IS_BONOBO_TOOLBAR (widget->parent)) - || (GE_IS_BONOBO_DOCK_ITEM (widget->parent)) - || (GE_IS_EGG_TOOLBAR (widget->parent)) - || (GE_IS_TOOLBAR (widget->parent)) - || (GE_IS_HANDLE_BOX (widget->parent))) - result = TRUE; - else - result = ge_is_toolbar_item (widget->parent); - } - return result; -} - -gboolean -ge_is_panel_widget_item (GtkWidget * widget) -{ - gboolean result = FALSE; - - if ((widget) && (widget->parent)) - { - if (GE_IS_PANEL_WIDGET (widget->parent)) - result = TRUE; - else - result = ge_is_panel_widget_item (widget->parent); - } - return result; -} - -gboolean -ge_is_bonobo_dock_item (GtkWidget * widget) -{ - gboolean result = FALSE; - - if ((widget)) - { - if (GE_IS_BONOBO_DOCK_ITEM(widget) || GE_IS_BONOBO_DOCK_ITEM (widget->parent)) - result = TRUE; - else if (GE_IS_BOX(widget) || GE_IS_BOX(widget->parent)) - { - GtkContainer *box = GE_IS_BOX(widget)?GTK_CONTAINER(widget):GTK_CONTAINER(widget->parent); - GList *children = NULL, *child = NULL; - - children = gtk_container_get_children(box); - - for (child = g_list_first(children); child; child = g_list_next(child)) - { - if (GE_IS_BONOBO_DOCK_ITEM_GRIP(child->data)) - { - result = TRUE; - child = NULL; - } - } - - if (children) - g_list_free(children); - } - } - return result; -} - -static GtkWidget * -ge_find_combo_box_entry_widget (GtkWidget * widget) -{ - GtkWidget *result = NULL; - - if (widget) - { - if (GE_IS_COMBO_BOX_ENTRY (widget)) - result = widget; - else - result = ge_find_combo_box_entry_widget (widget->parent); - } - - return result; -} - -static GtkWidget * -ge_find_combo_box_widget (GtkWidget * widget, gboolean as_list) -{ - GtkWidget *result = NULL; - - if (widget) - { - if (GE_IS_COMBO_BOX (widget)) - { - if (as_list) - result = (ge_combo_box_is_using_list(widget))?widget:NULL; - else - result = (!ge_combo_box_is_using_list(widget))?widget:NULL; - } - else - result = ge_find_combo_box_widget (widget->parent, as_list); - } - return result; -} - -static GtkWidget * -ge_find_combo_widget (GtkWidget * widget) -{ - GtkWidget *result = NULL; - - if (widget) - { - if (GE_IS_COMBO (widget)) - result = widget; - else - result = ge_find_combo_widget(widget->parent); - } - return result; -} - -GtkWidget* -ge_find_combo_box_widget_parent (GtkWidget * widget) -{ - GtkWidget *result = NULL; - - if (!result) - result = ge_find_combo_widget(widget); - - if (!result) - result = ge_find_combo_box_widget(widget, TRUE); - - if (!result) - result = ge_find_combo_box_entry_widget(widget); - - return result; -} - -/*********************************************** - * option_menu_get_props - - * - * Find Option Menu Size and Spacing - * - * Taken from Smooth - ***********************************************/ -void -ge_option_menu_get_props (GtkWidget * widget, - GtkRequisition * indicator_size, - GtkBorder * indicator_spacing) -{ - GtkRequisition default_size = { 9, 5 }; - GtkBorder default_spacing = { 7, 5, 2, 2 }; - GtkRequisition *tmp_size = NULL; - GtkBorder *tmp_spacing = NULL; - - if ((widget) && GE_IS_OPTION_MENU(widget)) - gtk_widget_style_get (widget, - "indicator_size", &tmp_size, - "indicator_spacing", &tmp_spacing, NULL); - - if (tmp_size) - { - *indicator_size = *tmp_size; - gtk_requisition_free (tmp_size); - } - else - *indicator_size = default_size; - - if (tmp_spacing) - { - *indicator_spacing = *tmp_spacing; - gtk_border_free (tmp_spacing); - } - else - *indicator_spacing = default_spacing; -} - -void -ge_button_get_default_border (GtkWidget *widget, - GtkBorder *border) -{ - GtkBorder default_border = {1, 1, 1, 1}; - GtkBorder *tmp_border = NULL; - - if (widget && GE_IS_BUTTON (widget)) - gtk_widget_style_get (widget, "default-border", &tmp_border, NULL); - - if (tmp_border) - { - *border = *tmp_border; - gtk_border_free (tmp_border); - } - else - { - *border = default_border; - } -} - - -gboolean -ge_widget_is_ltr (GtkWidget *widget) -{ - GtkTextDirection dir = GTK_TEXT_DIR_NONE; - - if (GE_IS_WIDGET (widget)) - dir = gtk_widget_get_direction (widget); - - if (dir == GTK_TEXT_DIR_NONE) - dir = gtk_widget_get_default_direction (); - - if (dir == GTK_TEXT_DIR_RTL) - return FALSE; - else - return TRUE; -} diff --git a/libs/clearlooks/widget-information.h b/libs/clearlooks/widget-information.h deleted file mode 100644 index 55da859d78..0000000000 --- a/libs/clearlooks/widget-information.h +++ /dev/null @@ -1,99 +0,0 @@ - -/* Object Type Lookups/Macros - - Based on/modified from functions in - Smooth-Engine. -*/ -#define GE_IS_WIDGET(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkWidget")) -#define GE_IS_CONTAINER(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkContainer")) -#define GE_IS_BIN(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkBin")) - -#define GE_IS_ARROW(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkArrow")) - -#define GE_IS_SEPARATOR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkSeparator")) -#define GE_IS_VSEPARATOR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkVSeparator")) -#define GE_IS_HSEPARATOR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkHSeparator")) - -#define GE_IS_HANDLE_BOX(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkHandleBox")) -#define GE_IS_HANDLE_BOX_ITEM(object) ((object) && GE_IS_HANDLE_BOX(object->parent)) -#define GE_IS_BONOBO_DOCK_ITEM(object) ((object) && ge_object_is_a ((GObject*)(object), "BonoboDockItem")) -#define GE_IS_BONOBO_DOCK_ITEM_GRIP(object) ((object) && ge_object_is_a ((GObject*)(object), "BonoboDockItemGrip")) -#define GE_IS_BONOBO_TOOLBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "BonoboUIToolbar")) -#define GE_IS_EGG_TOOLBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "Toolbar")) -#define GE_IS_TOOLBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkToolbar")) -#define GE_IS_PANEL_WIDGET(object) ((object) && (ge_object_is_a ((GObject*)(object), "PanelWidget") || ge_object_is_a ((GObject*)(object), "PanelApplet"))) - -#define GE_IS_COMBO_BOX_ENTRY(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkComboBoxEntry")) -#define GE_IS_COMBO_BOX(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkComboBox")) -#define GE_IS_COMBO(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkCombo")) -#define GE_IS_OPTION_MENU(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkOptionMenu")) - -#define GE_IS_TOGGLE_BUTTON(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkToggleButton")) -#define GE_IS_CHECK_BUTTON(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkCheckButton")) -#define GE_IS_SPIN_BUTTON(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkSpinButton")) - -#define GE_IS_STATUSBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkStatusbar")) -#define GE_IS_PROGRESS_BAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkProgressBar")) - -#define GE_IS_MENU_SHELL(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkMenuShell")) -#define GE_IS_MENU(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkMenu")) -#define GE_IS_MENU_BAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkMenuBar")) -#define GE_IS_MENU_ITEM(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkMenuItem")) - -#define GE_IS_CHECK_MENU_ITEM(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkCheckMenuItem")) - -#define GE_IS_RANGE(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkRange")) - -#define GE_IS_SCROLLBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkScrollbar")) -#define GE_IS_VSCROLLBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkVScrollbar")) -#define GE_IS_HSCROLLBAR(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkHScrollbar")) - -#define GE_IS_SCALE(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkScale")) -#define GE_IS_VSCALE(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkVScale")) -#define GE_IS_HSCALE(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkHScale")) - -#define GE_IS_PANED(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkPaned")) -#define GE_IS_VPANED(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkVPaned")) -#define GE_IS_HPANED(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkHPaned")) - -#define GE_IS_BOX(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkBox")) -#define GE_IS_VBOX(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkVBox")) -#define GE_IS_HBOX(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkHBox")) - -#define GE_IS_CLIST(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkCList")) -#define GE_IS_TREE_VIEW(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkTreeView")) -#define GE_IS_ENTRY(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkEntry")) -#define GE_IS_BUTTON(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkButton")) -#define GE_IS_FIXED(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkFixed")) - -#define TOGGLE_BUTTON(object) (GE_IS_TOGGLE_BUTTON(object)?(GtkToggleButton *)object:NULL) - -#define GE_IS_NOTEBOOK(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkNotebook")) -#define GE_IS_CELL_RENDERER_TOGGLE(object) ((object) && ge_object_is_a ((GObject*)(object), "GtkCellRendererToggle")) - -#define GE_WIDGET_HAS_DEFAULT(object) ((object) && GE_IS_WIDGET(object) && GTK_WIDGET_HAS_DEFAULT(object)) - -GE_INTERNAL gboolean ge_object_is_a (const GObject * object, const gchar * type_name); - -GE_INTERNAL gboolean ge_is_combo_box_entry (GtkWidget * widget); -GE_INTERNAL gboolean ge_is_combo_box (GtkWidget * widget, gboolean as_list); -GE_INTERNAL gboolean ge_is_combo (GtkWidget * widget); -GE_INTERNAL gboolean ge_is_in_combo_box (GtkWidget * widget); - -GE_INTERNAL gboolean ge_is_toolbar_item (GtkWidget * widget); - -GE_INTERNAL gboolean ge_is_panel_widget_item (GtkWidget * widget); - -GE_INTERNAL gboolean ge_is_bonobo_dock_item (GtkWidget * widget); - -GE_INTERNAL GtkWidget *ge_find_combo_box_widget_parent (GtkWidget * widget); - -GE_INTERNAL void ge_option_menu_get_props (GtkWidget * widget, - GtkRequisition * indicator_size, - GtkBorder * indicator_spacing); - -GE_INTERNAL void ge_button_get_default_border (GtkWidget *widget, - GtkBorder *border); - -GE_INTERNAL gboolean ge_widget_is_ltr (GtkWidget *widget); - diff --git a/libs/fst/SConscript b/libs/fst/SConscript deleted file mode 100644 index bdffd959b5..0000000000 --- a/libs/fst/SConscript +++ /dev/null @@ -1,56 +0,0 @@ -# -*- python -*- - -import os -import os.path -import sys -import glob - -fst_src = glob.glob('*.c') - -Import('env install_prefix') -fst = env.Copy(CC="winegcc") -fst.Append (CPPPATH=".") - -if fst['VST']: - vst_dir = Dir ('libs/vst') - vst_sdk_dir = Dir ('vstsdk2.3') - # - # if it exists, try to use the Steinberg zip package - # - vst_sdk_zip = File ('vstsdk2.3.zip') - - if os.access (vst_sdk_zip.abspath, os.F_OK): - print 'VST package discovered.' - elif os.access ('vst_sdk2_3.zip', os.F_OK): - # - # add a build target that unpacks the zip package the Steinberg "meta" zip package - # - vst_meta_zip = fst.Command (vst_sdk_zip, 'vst_sdk2_3.zip', "unzip -o -d ${TARGET.dir} $SOURCES vstsdk2.3.zip" ) - print 'VST meta-package discovered.' - else: - if os.access ('vstsdk2.3.zip', os.F_OK) != 1: - print 'Did not find vst_sdk2_3.zip or vstsdk2.3.zip in libs/fst.' - print 'Make sure the correct file is in the correct location and correctly named.' - print 'Please see http://ardour.org/building_vst_support for more information.' - sys.exit (1) - - vst_headers = fst.Command ([ 'vst/aeffectx.h', 'vst/AEffect.h' ], vst_sdk_zip, [ - "unzip -qq -d ${SOURCE.dir} -o $SOURCE", - Delete ('$TARGET.dir'), - Copy ('${TARGET.dir}', 'libs/fst/vstsdk2.3/source/common'), - "sed -i '/struct VstFileType\|struct VstFileSelect/,/};/d' $TARGET" - ]) - - a = fst.Object ('fst', 'fst.c') - b = fst.Object ('fstinfofile', 'fstinfofile.c') - c = fst.Object ('vstwin', 'vstwin.c') - d = fst.Object ('vsti', 'vsti.c') - - Default([vst_headers,a,b,c,d]) - -env.Alias('tarball', env.Distribute (env['DISTTREE'], - fst_src + ['SConscript', - 'fst.h', - 'jackvst.h' - ] )) - diff --git a/libs/fst/fst.c b/libs/fst/fst.c deleted file mode 100644 index 85473578d2..0000000000 --- a/libs/fst/fst.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include - -#include "fst.h" - - -void -default_fst_error_callback (const char *desc) -{ - fprintf(stderr, "%s\n", desc); -} - -void (*fst_error_callback)(const char *desc) = &default_fst_error_callback; - -void -fst_error (const char *fmt, ...) -{ - va_list ap; - char buffer[512]; - - va_start (ap, fmt); - vsnprintf (buffer, sizeof(buffer), fmt, ap); - fst_error_callback (buffer); - va_end (ap); -} - - diff --git a/libs/fst/fst.h b/libs/fst/fst.h deleted file mode 100644 index 493cb2e572..0000000000 --- a/libs/fst/fst.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef __fst_fst_h__ -#define __fst_fst_h__ - -#include -#include -#include - -/** - * Display FST error message. - * - * @param fmt printf-style formatting specification - */ -extern void fst_error (const char *fmt, ...); - -/** - * Set the @ref fst_error_callback for error message display. - * - * The FST library provides two built-in callbacks for this purpose: - * default_fst_error_callback(). - * - * The default will print the message (plus a newline) to stderr. - * - */ -void fst_set_error_function (void (*func)(const char *)); - -#include - -typedef struct _FST FST; -typedef struct _FSTHandle FSTHandle; -typedef struct _FSTInfo FSTInfo; - -struct _FSTInfo -{ - char *name; - int UniqueID; - char *Category; - - int numInputs; - int numOutputs; - int numParams; - - int wantMidi; - int wantEvents; - int hasEditor; - int canProcessReplacing; // what do we need this for ? - - // i think we should save the parameter Info Stuff soon. - // struct VstParameterInfo *infos; - char **ParamNames; - char **ParamLabels; -}; - -struct _FSTHandle -{ - void* dll; - char* name; - char* nameptr; /* ptr returned from strdup() etc. */ - AEffect* (*main_entry)(audioMasterCallback); - - int plugincnt; -}; - -struct _FST -{ - AEffect* plugin; - void* window; /* win32 HWND */ - int xid; /* X11 XWindow */ - FSTHandle* handle; - int width; - int height; - int destroy; - - struct _FST* next; - - pthread_mutex_t lock; - pthread_cond_t window_status_change; - int been_activated; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -extern int fst_init (); -extern void fst_finish (); - -extern FSTHandle* fst_load (const char*); -extern int fst_unload (FSTHandle*); - -extern FST* fst_instantiate (FSTHandle*, audioMasterCallback amc, void* userptr); -extern void fst_close (FST*); - -extern void fst_event_loop_remove_plugin (FST* fst); -extern void fst_event_loop_add_plugin (FST* fst); - -extern int fst_run_editor (FST*); -extern void fst_destroy_editor (FST*); -extern int fst_get_XID (FST*); - -extern void fst_signal_handler (int sig, siginfo_t* info, void* context); - -extern FSTInfo *fst_get_info( char *dllpathname ); -extern void fst_free_info( FSTInfo *info ); - -#ifdef __cplusplus -} -#endif - -#endif /* __fst_fst_h__ */ diff --git a/libs/fst/fstinfofile.c b/libs/fst/fstinfofile.c deleted file mode 100644 index 7b0c69d015..0000000000 --- a/libs/fst/fstinfofile.c +++ /dev/null @@ -1,268 +0,0 @@ - -#include "fst.h" -#include "vst/aeffectx.h" - -#include -#include -#include - -#include -#include -#include -#include - -#define MAX_STRING_LEN 256 - -#define FALSE 0 -#define TRUE !FALSE - -static char *read_string( FILE *fp ) { - char buf[MAX_STRING_LEN]; - - fgets( buf, MAX_STRING_LEN, fp ); - if( strlen( buf ) < MAX_STRING_LEN ) { - - if( strlen(buf) ) - buf[strlen(buf)-1] = 0; - - return strdup( buf ); - } else { - return NULL; - } -} - -static FSTInfo *load_fst_info_file( char *filename ) { - - FSTInfo *info = (FSTInfo *) malloc( sizeof( FSTInfo ) ); - FILE *fp; - int i; - - - if( info == NULL ) - return NULL; - - fp = fopen( filename, "r" ); - - if( fp == NULL ) { - free( info ); - return NULL; - } - - if( (info->name = read_string( fp )) == NULL ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->UniqueID ) ) goto error; - if( (info->Category = read_string( fp )) == NULL ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->numInputs ) ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->numOutputs ) ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->numParams ) ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->wantMidi ) ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->hasEditor ) ) goto error; - if( 1 != fscanf( fp, "%d\n", &info->canProcessReplacing ) ) goto error; - - if( (info->ParamNames = (char **) malloc( sizeof( char * ) * info->numParams )) == NULL ) goto error; - for( i=0; inumParams; i++ ) { - if( (info->ParamNames[i] = read_string( fp )) == NULL ) goto error; - } - if( (info->ParamLabels = (char **) malloc( sizeof( char * ) * info->numParams )) == NULL ) goto error; - for( i=0; inumParams; i++ ) { - if( (info->ParamLabels[i] = read_string( fp )) == NULL ) goto error; - } - - - fclose( fp ); - return info; - -error: - fclose( fp ); - free( info ); - return NULL; -} - -static int save_fst_info_file( FSTInfo *info, char *filename ) { - - FILE *fp; - int i; - - - if( info == NULL ) { - fst_error( "info is NULL\n" ); - return TRUE; - } - - fp = fopen( filename, "w" ); - - if( fp == NULL ) { - fst_error( "Cant write info file %s\n", filename ); - return TRUE; - } - - fprintf( fp, "%s\n", info->name ); - fprintf( fp, "%d\n", info->UniqueID ); - fprintf( fp, "%s\n", info->Category ); - fprintf( fp, "%d\n", info->numInputs ); - fprintf( fp, "%d\n", info->numOutputs ); - fprintf( fp, "%d\n", info->numParams ); - fprintf( fp, "%d\n", info->wantMidi ); - fprintf( fp, "%d\n", info->hasEditor ); - fprintf( fp, "%d\n", info->canProcessReplacing ); - - for( i=0; inumParams; i++ ) { - fprintf( fp, "%s\n", info->ParamNames[i] ); - } - for( i=0; inumParams; i++ ) { - fprintf( fp, "%s\n", info->ParamLabels[i] ); - } - - - fclose( fp ); - - return FALSE; -} - -static char *fst_dllpath_to_infopath( char *dllpath ) { - char *retval; - if( strstr( dllpath, ".dll" ) == NULL ) return NULL; - - retval = strdup( dllpath ); - sprintf( retval + strlen(retval) - 4, ".fst" ); - return retval; -} - -static int fst_info_file_is_valid( char *dllpath ) { - struct stat dllstat, fststat; - char *fstpath = fst_dllpath_to_infopath( dllpath ); - - if( !fstpath ) return FALSE; - - if( stat( dllpath, &dllstat ) ){ fst_error( "dll path %s invalid\n", dllpath ); return TRUE; } - if( stat( fstpath, &fststat ) ) return FALSE; - - free( fstpath ); - if( dllstat.st_mtime > fststat.st_mtime ) - return FALSE; - else - return TRUE; -} - -static int fst_can_midi( FST *fst ) { - AEffect *plugin = fst->plugin; - int vst_version = plugin->dispatcher (plugin, effGetVstVersion, 0, 0, NULL, 0.0f); - - if (vst_version >= 2) { - - /* should we send it VST events (i.e. MIDI) */ - - if ((plugin->flags & effFlagsIsSynth) || - (plugin->dispatcher (plugin, effCanDo, 0, 0,(void*) "receiveVstEvents", 0.0f) > 0)) - return TRUE; - } - return FALSE; - -} -static FSTInfo *fst_info_from_plugin( FST *fst ) { - FSTInfo *info = (FSTInfo *) malloc( sizeof( FSTInfo ) ); - AEffect *plugin; - int i; - - if( ! fst ) { - fst_error( "fst is NULL\n" ); - return NULL; - } - - if( ! info ) return NULL; - - plugin = fst->plugin; - - - info->name = strdup(fst->handle->name ); - info->UniqueID = plugin->uniqueID; - info->Category = strdup( "None" ); // FIXME: - info->numInputs = plugin->numInputs; - info->numOutputs = plugin->numOutputs; - info->numParams = plugin->numParams; - info->wantMidi = fst_can_midi( fst ); - info->hasEditor = plugin->flags & effFlagsHasEditor ? TRUE : FALSE; - info->canProcessReplacing = plugin->flags & effFlagsCanReplacing ? TRUE : FALSE; - - info->ParamNames = (char **) malloc( sizeof( char * ) * info->numParams ); - info->ParamLabels = (char **) malloc( sizeof( char * ) * info->numParams ); - for( i=0; inumParams; i++ ) { - char name[20]; - char label[9]; - plugin->dispatcher (plugin, - effGetParamName, - i, 0, name, 0); - - plugin->dispatcher (plugin, - effGetParamLabel, - i, 0, label, 0); - - info->ParamNames[i] = strdup( name ); - info->ParamLabels[i] = strdup( label ); - } - return info; -} - -// most simple one :) could be sufficient.... -static long simple_master_callback( AEffect *fx, long opcode, long index, long value, void *ptr, float opt ) { - if( opcode == audioMasterVersion ) - return 2; - else - return 0; -} - -FSTInfo *fst_get_info( char *dllpath ) { - - if( fst_info_file_is_valid( dllpath ) ) { - FSTInfo *info; - char *fstpath = fst_dllpath_to_infopath( dllpath ); - - info = load_fst_info_file( fstpath ); - free( fstpath ); - return info; - - } else { - - FSTHandle *h; - FST *fst; - FSTInfo *info; - char *fstpath; - - if( !(h = fst_load( dllpath )) ) { - return NULL; - } - if( !(fst = fst_instantiate( h, simple_master_callback, NULL )) ) { - fst_unload( h ); - fst_error( "instantiate failed\n" ); - return NULL; - } - fstpath = fst_dllpath_to_infopath( dllpath ); - if( !fstpath ) { - fst_close( fst ); - fst_unload( h ); - fst_error( "get fst filename failed\n" ); - return NULL; - } - info = fst_info_from_plugin( fst ); - save_fst_info_file( info, fstpath ); - - free( fstpath ); - fst_close( fst ); - fst_unload( h ); - return info; - } -} - -void fst_free_info( FSTInfo *info ) { - - int i; - - for( i=0; inumParams; i++ ) { - free( info->ParamNames[i] ); - free( info->ParamLabels[i] ); - } - free( info->name ); - free( info->Category ); - free( info ); -} - - diff --git a/libs/fst/jackvst.h b/libs/fst/jackvst.h deleted file mode 100644 index abb9e22e12..0000000000 --- a/libs/fst/jackvst.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __jack_vst_h__ -#define __jack_vst_h__ - -#include -#include -#include -#include -#include -#include - -typedef struct _JackVST JackVST; - -struct _JackVST { - jack_client_t *client; - FSTHandle* handle; - FST* fst; - float **ins; - float **outs; - jack_port_t **inports; - jack_port_t **outports; - void* userdata; - int bypassed; - int muted; - - int resume_called; - /* For VST/i support */ - - pthread_t midi_thread; - snd_seq_t* seq; - int midiquit; - jack_ringbuffer_t* event_queue; - struct VstEvents* events; -}; - -#endif /* __jack_vst_h__ */ diff --git a/libs/fst/vsti.c b/libs/fst/vsti.c deleted file mode 100644 index f6d8725ddf..0000000000 --- a/libs/fst/vsti.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * VST instrument support - * - * Derived from code that was marked: - * Copyright (C) Kjetil S. Matheussen 2004 (k.s.matheussen@notam02.no) - * Alsa-seq midi-code made by looking at the jack-rack source made by Bob Ham. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * $Id: vsti.c,v 1.2 2004/04/07 01:56:23 pauld Exp $ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -snd_seq_t * -create_sequencer (const char* client_name, bool isinput) -{ - snd_seq_t * seq; - int err; - - if ((err = snd_seq_open (&seq, "default", SND_SEQ_OPEN_DUPLEX, 0)) != 0) { - fst_error ("Could not open ALSA sequencer, aborting\n\n%s\n\n" - "Make sure you have configure ALSA properly and that\n" - "/proc/asound/seq/clients exists and contains relevant\n" - "devices (%s).", - snd_strerror (err)); - return NULL; - } - - snd_seq_set_client_name (seq, client_name); - - if ((err = snd_seq_create_simple_port (seq, isinput? "Input" : "Output", - (isinput? SND_SEQ_PORT_CAP_WRITE: SND_SEQ_PORT_CAP_READ)| SND_SEQ_PORT_CAP_DUPLEX | - SND_SEQ_PORT_CAP_SUBS_READ|SND_SEQ_PORT_CAP_SUBS_WRITE, - SND_SEQ_PORT_TYPE_APPLICATION|SND_SEQ_PORT_TYPE_SPECIFIC)) != 0) { - fst_error ("Could not create ALSA port: %s", snd_strerror (err)); - snd_seq_close(seq); - return NULL; - } - - return seq; -} - -static void -queue_midi (JackVST *jvst, int val1, int val2, int val3) -{ - struct VstMidiEvent *pevent; - jack_ringbuffer_data_t vec[2]; - - jack_ringbuffer_get_write_vector (jvst->event_queue, vec); - - if (vec[0].len < sizeof (struct VstMidiEvent)) { - fst_error ("event queue has no write space"); - return; - } - - pevent = (struct VstMidiEevent *) vec[0].buf; - - // printf("note: %d\n",note); - - pevent->type = kVstMidiType; - pevent->byteSize = 24; - pevent->deltaFrames = 0; - pevent->flags = 0; - pevent->detune = 0; - pevent->noteLength = 0; - pevent->noteOffset = 0; - pevent->reserved1 = 0; - pevent->reserved2 = 0; - pevent->noteOffVelocity = 0; - pevent->midiData[0] = val1; - pevent->midiData[1] = val2; - pevent->midiData[2] = val3; - pevent->midiData[3] = 0; - - //printf("Sending: %x %x %x\n",val1,val2,val3); - - jack_ringbuffer_write_advance (jvst->event_queue, sizeof (struct VstMidiEvent)); -} - -void *midireceiver(void *arg) -{ - snd_seq_event_t *event; - JackVST *jvst = (JackVST* )arg; - int val; - - while (1) { - - snd_seq_event_input (jvst->seq, &event); - - if (jvst->midiquit) { - break; - } - - switch(event->type){ - case SND_SEQ_EVENT_NOTEON: - queue_midi(jvst,0x90+event->data.note.channel,event->data.note.note,event->data.note.velocity); - //printf("Noteon, channel: %d note: %d vol: %d\n",event->data.note.channel,event->data.note.note,event->data.note.velocity); - break; - case SND_SEQ_EVENT_NOTEOFF: - queue_midi(jvst,0x80+event->data.note.channel,event->data.note.note,0); - //printf("Noteoff, channel: %d note: %d vol: %d\n",event->data.note.channel,event->data.note.note,event->data.note.velocity); - break; - case SND_SEQ_EVENT_KEYPRESS: - //printf("Keypress, channel: %d note: %d vol: %d\n",event->data.note.channel,event->data.note.note,event->data.note.velocity); - queue_midi(jvst,0xa0+event->data.note.channel,event->data.note.note,event->data.note.velocity); - break; - case SND_SEQ_EVENT_CONTROLLER: - queue_midi(jvst,0xb0+event->data.control.channel,event->data.control.param,event->data.control.value); - //printf("Control: %d %d %d\n",event->data.control.channel,event->data.control.param,event->data.control.value); - break; - case SND_SEQ_EVENT_PITCHBEND: - val=event->data.control.value + 0x2000; - queue_midi(jvst,0xe0+event->data.control.channel,val&127,val>>7); - //printf("Pitch: %d %d %d\n",event->data.control.channel,event->data.control.param,event->data.control.value); - break; - case SND_SEQ_EVENT_CHANPRESS: - //printf("chanpress: %d %d %d\n",event->data.control.channel,event->data.control.param,event->data.control.value); - queue_midi(jvst,0xd0+event->data.control.channel,event->data.control.value,0); - break; - case SND_SEQ_EVENT_PGMCHANGE: - //printf("pgmchange: %d %d %d\n",event->data.control.channel,event->data.control.param,event->data.control.value); - queue_midi(jvst,0xc0+event->data.control.channel,event->data.control.value,0); - break; - default: - //printf("Unknown type: %d\n",event->type); - break; - } - } - - return NULL; -} - -void stop_midireceiver (JackVST *jvst) -{ - int err; - snd_seq_event_t event; - snd_seq_t *seq2 = create_sequencer ("jfstquit", true); - - jvst->midiquit = 1; - - snd_seq_connect_to (seq2, 0, snd_seq_client_id (jvst->seq),0); - snd_seq_ev_clear (&event); - snd_seq_ev_set_direct (&event); - snd_seq_ev_set_subs (&event); - snd_seq_ev_set_source (&event, 0); - snd_seq_ev_set_controller (&event,1,0x80,50); - - if ((err = snd_seq_event_output (seq2, &event)) < 0) { - fst_error ("cannot send stop event to midi thread: %s\n", - snd_strerror (err)); - } - - snd_seq_drain_output (seq2); - snd_seq_close (seq2); - pthread_join (jvst->midi_thread,NULL); - snd_seq_close (jvst->seq); -} - - - diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c deleted file mode 100644 index 55061c2b72..0000000000 --- a/libs/fst/vstwin.c +++ /dev/null @@ -1,598 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -//#include -//#include -//#include -//#include - -#include "fst.h" - - -struct ERect{ - short top; - short left; - short bottom; - short right; -}; - -static pthread_mutex_t plugin_mutex = PTHREAD_MUTEX_INITIALIZER; -static FST* fst_first = NULL; - -DWORD gui_thread_id = 0; - -static char* message_name (int message) -{ - switch (message) { - case 0x0000: - return "WM_NULL"; - - case 0x0001: - return "WM_CREATE"; - - case 0x0002: - return "WM_DESTROY"; - - case 0x0003: - return "WM_MOVE"; - - case 0x0004: - return "WM_SIZEWAIT"; - - case 0x0005: - return "WM_SIZE"; - - case 0x0006: - return "WM_ACTIVATE"; - - case 0x0007: - return "WM_SETFOCUS"; - - case 0x0008: - return "WM_KILLFOCUS"; - - case 0x0009: - return "WM_SETVISIBLE"; - - case 0x000a: - return "WM_ENABLE"; - - case 0x000b: - return "WM_SETREDRAW"; - - case 0x000c: - return "WM_SETTEXT"; - - case 0x000d: - return "WM_GETTEXT"; - - case 0x000e: - return "WM_GETTEXTLENGTH"; - - case 0x000f: - return "WM_PAINT"; - - case 0x0010: - return "WM_CLOSE"; - - case 0x0011: - return "WM_QUERYENDSESSION"; - - case 0x0012: - return "WM_QUIT"; - - case 0x0013: - return "WM_QUERYOPEN"; - - case 0x0014: - return "WM_ERASEBKGND"; - - case 0x0015: - return "WM_SYSCOLORCHANGE"; - - case 0x0016: - return "WM_ENDSESSION"; - - case 0x0017: - return "WM_SYSTEMERROR"; - - case 0x0018: - return "WM_SHOWWINDOW"; - - case 0x0019: - return "WM_CTLCOLOR"; - - case 0x001a: - return "WM_WININICHANGE"; - - case 0x001b: - return "WM_DEVMODECHANGE"; - - case 0x001c: - return "WM_ACTIVATEAPP"; - - case 0x001d: - return "WM_FONTCHANGE"; - - case 0x001e: - return "WM_TIMECHANGE"; - - case 0x001f: - return "WM_CANCELMODE"; - - case 0x0020: - return "WM_SETCURSOR"; - - case 0x0021: - return "WM_MOUSEACTIVATE"; - - case 0x0022: - return "WM_CHILDACTIVATE"; - - case 0x0023: - return "WM_QUEUESYNC"; - - case 0x0024: - return "WM_GETMINMAXINFO"; - - default: - break; - } - return "--- OTHER ---"; -} - -static LRESULT WINAPI -my_window_proc (HWND w, UINT msg, WPARAM wp, LPARAM lp) -{ - FST* fst; - -// if (msg != WM_TIMER) { -// fst_error ("window callback handler, msg = 0x%x (%s) win=%p\n", msg, message_name (msg), w); -// } - - switch (msg) { - case WM_KEYUP: - case WM_KEYDOWN: - break; - - case WM_CLOSE: - PostQuitMessage (0); - - case WM_DESTROY: - case WM_NCDESTROY: - /* we should never get these */ - //return 0; - break; - - case WM_PAINT: - if ((fst = GetPropA (w, "fst_ptr")) != NULL) { - if (fst->window && !fst->been_activated) { - fst->been_activated = TRUE; - pthread_cond_signal (&fst->window_status_change); - pthread_mutex_unlock (&fst->lock); - } - } - break; - - default: - break; - } - - return DefWindowProcA (w, msg, wp, lp ); -} - -static FST* -fst_new () -{ - FST* fst = (FST*) calloc (1, sizeof (FST)); - - pthread_mutex_init (&fst->lock, NULL); - pthread_cond_init (&fst->window_status_change, NULL); - - return fst; -} - -static FSTHandle* -fst_handle_new () -{ - FSTHandle* fst = (FSTHandle*) calloc (1, sizeof (FSTHandle)); - return fst; -} - -int -fst_create_editor (FST* fst) -{ - HMODULE hInst; - HWND window; - - /* "guard point" to trap errors that occur during plugin loading */ - - /* Note: fst->lock is held while this function is called */ - - if (!(fst->plugin->flags & effFlagsHasEditor)) { - fst_error ("Plugin \"%s\" has no editor", fst->handle->name); - return -1; - } - - if ((hInst = GetModuleHandleA (NULL)) == NULL) { - fst_error ("can't get module handle"); - return 1; - } - -// if ((window = CreateWindowExA (WS_EX_TOOLWINDOW | WS_EX_TRAYWINDOW, "FST", fst->handle->name, - if ((window = CreateWindowExA (0, "FST", fst->handle->name, - (WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX), - 0, 0, 1, 1, - NULL, NULL, - hInst, - NULL)) == NULL) { - fst_error ("cannot create editor window"); - return 1; - } - - if (!SetPropA (window, "fst_ptr", fst)) { - fst_error ("cannot set fst_ptr on window"); - } - - fst->window = window; - fst->xid = (int) GetPropA (window, "__wine_x11_whole_window"); - - { - struct ERect* er; - - ShowWindow (fst->window, SW_SHOW); - - fst->plugin->dispatcher (fst->plugin, effEditOpen, 0, 0, fst->window, 0 ); - fst->plugin->dispatcher (fst->plugin, effEditGetRect, 0, 0, &er, 0 ); - - fst->width = er->right-er->left; - fst->height = er->bottom-er->top; - - SetWindowPos (fst->window, 0, 0, 0, er->right-er->left+8, er->bottom-er->top+26, SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOZORDER); - } - - return 0; -} - -void -fst_destroy_editor (FST* fst) -{ - pthread_mutex_lock (&fst->lock); - if (fst->window) { - fst->destroy = TRUE; - if (!PostThreadMessageA (gui_thread_id, WM_USER, 0, 0)) { - fst_error ("could not post message to gui thread"); - } - pthread_cond_wait (&fst->window_status_change, &fst->lock); - - } - pthread_mutex_unlock (&fst->lock); -} - -void -fst_event_loop_remove_plugin (FST* fst) -{ - FST* p; - FST* prev; - - for (p = fst_first, prev = NULL; p->next; prev = p, p = p->next) { - if (p == fst) { - if (prev) { - prev->next = p->next; - } - } - } - - if (fst_first == fst) { - fst_first = fst_first->next; - } - -} - -void debreak( void ) { printf( "debreak\n" ); } - -DWORD WINAPI gui_event_loop (LPVOID param) -{ - MSG msg; - FST* fst; - HMODULE hInst; - HWND window; - - gui_thread_id = GetCurrentThreadId (); - - /* create a dummy window for timer events */ - - if ((hInst = GetModuleHandleA (NULL)) == NULL) { - fst_error ("can't get module handle"); - return 1; - } - - if ((window = CreateWindowExA (0, "FST", "dummy", - WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, - hInst, - NULL )) == NULL) { - fst_error ("cannot create dummy timer window"); - } - - if (!SetTimer (window, 1000, 100, NULL)) { - fst_error ("cannot set timer on dummy window"); - } - - while (1) { - - GetMessageA (&msg, NULL, 0,0); - - if (msg.message == WM_SYSTEMERROR) { - /* sent when this thread is supposed to exist */ - break; - } - - if (msg.message == WM_KEYDOWN) debreak(); - - TranslateMessage( &msg ); - DispatchMessageA (&msg); - - /* handle window creation requests, destroy requests, - and run idle callbacks - */ - - if( msg.message == WM_TIMER ) { - pthread_mutex_lock (&plugin_mutex); -again: - for (fst = fst_first; fst; fst = fst->next) { - - if (fst->destroy) { - if (fst->window) { - fst->plugin->dispatcher( fst->plugin, effEditClose, 0, 0, NULL, 0.0 ); - CloseWindow (fst->window); - fst->window = NULL; - fst->destroy = FALSE; - } - fst_event_loop_remove_plugin (fst); - fst->been_activated = FALSE; - pthread_mutex_lock (&fst->lock); - pthread_cond_signal (&fst->window_status_change); - pthread_mutex_unlock (&fst->lock); - goto again; - } - - if (fst->window == NULL) { - pthread_mutex_lock (&fst->lock); - if (fst_create_editor (fst)) { - fst_error ("cannot create editor for plugin %s", fst->handle->name); - fst_event_loop_remove_plugin (fst); - pthread_cond_signal (&fst->window_status_change); - pthread_mutex_unlock (&fst->lock); - goto again; - } - /* condition/unlock handled when we receive WM_ACTIVATE */ - } - - fst->plugin->dispatcher (fst->plugin, effEditIdle, 0, 0, NULL, 0); - } - pthread_mutex_unlock (&plugin_mutex); - } - } - fst_error ("FST GUI event loop has quit!"); - return 0; -} - -int -fst_init () -{ - WNDCLASSA wc; - HMODULE hInst; - - if ((hInst = GetModuleHandleA (NULL)) == NULL) { - fst_error ("can't get module handle"); - return -1; - } - wc.style = 0; - wc.lpfnWndProc = my_window_proc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = hInst; - wc.hIcon = LoadIconA( hInst, "FST"); - wc.hCursor = LoadCursorA( NULL, IDI_APPLICATION ); - wc.hbrBackground = GetStockObject( BLACK_BRUSH ); - wc.lpszMenuName = "MENU_FST"; - wc.lpszClassName = "FST"; - - if (!RegisterClassA(&wc)){ - return 1; - } - - if (CreateThread (NULL, 0, gui_event_loop, NULL, 0, NULL) == NULL) { - fst_error ("could not create new thread proxy"); - return -1; - } - - return 0; -} - -void -fst_finish () -{ - PostThreadMessageA (gui_thread_id, WM_SYSTEMERROR, 0, 0); -} - -int -fst_run_editor (FST* fst) -{ - /* Add the FST to the list of all that should be handled by the GUI thread */ - - pthread_mutex_lock (&plugin_mutex); - - if (fst_first == NULL) { - fst_first = fst; - } else { - FST* p = fst_first; - while (p->next) { - p = p->next; - } - p->next = fst; - } - - if (!PostThreadMessageA (gui_thread_id, WM_USER, 0, 0)) { - fst_error ("could not post message to gui thread"); - return -1; - } - - pthread_mutex_unlock (&plugin_mutex); - - /* wait for the plugin editor window to be created (or not) */ - - pthread_mutex_lock (&fst->lock); - if (!fst->window) { - pthread_cond_wait (&fst->window_status_change, &fst->lock); - } - pthread_mutex_unlock (&fst->lock); - - if (!fst->window) { - fst_error ("no window created for VST plugin editor"); - return -1; - } - - return 0; -} - -FSTHandle* -fst_load (const char *path) -{ - char* buf; - FSTHandle* fhandle; - char* period; - - fhandle = fst_handle_new (); - - // XXX: Would be nice to find the correct call for this. - // if the user does not configure Z: to be / we are doomed :( - - if (strstr (path, ".dll") == NULL) { - - buf = (char *) malloc (strlen (path) + 7); - - if( path[0] == '/' ) { - sprintf (buf, "Z:%s.dll", path); - } else { - sprintf (buf, "%s.dll", path); - } - - fhandle->nameptr = strdup (path); - - } else { - - buf = (char *) malloc (strlen (path) + 3); - - if( path[0] == '/' ) { - sprintf (buf, "Z:%s", path); - } else { - sprintf (buf, "%s", path); - } - - fhandle->nameptr = strdup (path); - } - - fhandle->name = basename (fhandle->nameptr); - - /* strip off .dll */ - - if ((period = strrchr (fhandle->name, '.')) != NULL) { - *period = '\0'; - } - - if ((fhandle->dll = LoadLibraryA (buf)) == NULL) { - fst_unload (fhandle); - return NULL; - } - - typedef AEffect* (*entryFunctionType)(audioMasterCallback); - - if ((fhandle->main_entry = (entryFunctionType) GetProcAddress (fhandle->dll, "main")) == NULL) { - fst_unload (fhandle); - return NULL; - } - - return fhandle; -} - -int -fst_unload (FSTHandle* fhandle) -{ - if (fhandle->plugincnt) { - return -1; - } - - if (fhandle->dll) { - FreeLibrary (fhandle->dll); - fhandle->dll = NULL; - } - - if (fhandle->nameptr) { - free (fhandle->nameptr); - fhandle->name = NULL; - } - - free (fhandle); - return 0; -} - -FST* -fst_instantiate (FSTHandle* fhandle, audioMasterCallback amc, void* userptr) -{ - FST* fst = fst_new (); - - if( fhandle == NULL ) { - fst_error( "the handle was NULL\n" ); - return NULL; - } - - if ((fst->plugin = fhandle->main_entry (amc)) == NULL) { - fst_error ("%s could not be instantiated\n", fhandle->name); - free (fst); - return NULL; - } - - fst->handle = fhandle; - fst->plugin->user = userptr; - - if (fst->plugin->magic != kEffectMagic) { - fst_error ("%s is not a VST plugin\n", fhandle->name); - free (fst); - return NULL; - } - - fst->plugin->dispatcher (fst->plugin, effOpen, 0, 0, 0, 0); - //fst->plugin->dispatcher (fst->plugin, effMainsChanged, 0, 0, NULL, 0); - - fst->handle->plugincnt++; - - return fst; -} - -void -fst_close (FST* fst) -{ - fst_destroy_editor (fst); - - fst->plugin->dispatcher (fst->plugin, effMainsChanged, 0, 0, NULL, 0); - fst->plugin->dispatcher (fst->plugin, effClose, 0, 0, 0, 0); - - if (fst->handle->plugincnt) { - --fst->handle->plugincnt; - } -} - -int -fst_get_XID (FST* fst) -{ - return fst->xid; -} diff --git a/libs/glibmm2/AUTHORS b/libs/glibmm2/AUTHORS deleted file mode 100644 index 35ef03fe26..0000000000 --- a/libs/glibmm2/AUTHORS +++ /dev/null @@ -1,20 +0,0 @@ -Please use the mailing list (gtkmm-list@gnome.org) instead of emailing developers directly. -See the ChangeLog for up-to-date information. - -Murray Cumming -Daniel Elstner - -Some former contributors: - -Karl Nelson -Tero Pulkkinen -Elliot Lee -Phil Dawes -Erik Andersen -Bibek Sahu -Mirko Streckenbach -Havoc Pennington -Guillaume Laurent -Todd Dukes -Peter Lerner -Herbert Valerio Riedel diff --git a/libs/glibmm2/CHANGES b/libs/glibmm2/CHANGES deleted file mode 100644 index 36571a78e0..0000000000 --- a/libs/glibmm2/CHANGES +++ /dev/null @@ -1,33 +0,0 @@ -Changes between glibmm 2.2 (previously part of gtkmm) and glibmm 2.4: - -* glibmm is now a separate module, for use with non-GUI software. - (Note that glibmm 2.4 and gtkmm 2.4 install in parallel with - gtkmm 2.2 - so you can install and use both simultaneously and - port to 2.4 whenever you are ready.) -* glibmm now uses libsigc++ 2 rather than libsigc++ 1.2. - There is a libsigc++ compatibility header. The new, undeprecated, API - is slightly improved. - - Connecting signal handlers: - signal_something().connect( SigC::slot(*this, &Something::on_something) ); - should become - signal_something().connect( sigc::mem_fun(*this, &Something::on_something) ); - or, for non-member methods: - signal_something().connect( sigc::ptr_fun(&Something::on_something) ); - - Binding extra parameters: - SigC::bind(...) - should become - sigc::bind(...) - - Declaring signals: - SigC::Signal1 - should become - sigc::signal - - Declaring slots: - SigC::Slot1 - should become - sigc::slot - - Inheriting from the libsigc++ base class: - class Something : public SigC::Object - should become - class Something : public sigc::trackable - - diff --git a/libs/glibmm2/COPYING b/libs/glibmm2/COPYING deleted file mode 100644 index c4792dd27a..0000000000 --- a/libs/glibmm2/COPYING +++ /dev/null @@ -1,515 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. -^L - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -^L - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS -^L - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper -mail. - -You should also get your employer (if you work as a programmer) or -your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James -Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/libs/glibmm2/ChangeLog b/libs/glibmm2/ChangeLog deleted file mode 100644 index af229af44e..0000000000 --- a/libs/glibmm2/ChangeLog +++ /dev/null @@ -1,2015 +0,0 @@ -2.14.2: - -2007-10-22 Murray Cumming - - * Merged this change from 2007-03-03 from the glibmm-2-12 branch, which was - missing from this branch: - * configure.in: - * glib/glibmmconfig.h.in: - * glib/src/date.ccg: - * glib/src/date.hg: - * scripts/Makefile.am: - * scripts/c_std.m4: Added a test for the case that time_t is equivalent to - guint32, as seems to be the case on NetBSD-4.99.6/amd64, so we can ifdef-out - the (deprecated, anyway) Glib::Date::set_time(GTime) method when necessary, because - GTime is also equivalent to guint32. - Bug #386990. - -2007-10-12 Armin Burgmeier - - * tools/m4/base.m4: Added a new section called SECTION_HEADER_FIRST - that within the header file that is before any generated code (apart - from the include guards) and a _CONFIGINCLUDE macro that includes a - file within this section. This is intended to be used with - g*mmconfig.h so the *_DISABLE_DEPRECATED define is set for deprecated - classes also when included from other code. - -2.14.1: - -2007-09-29 Rémi Cardona - - * configure.in: - increase the minimum glib requirements. - Bug #481566. - -2007-10-02 Murray Cumming - - * glib/glibmm/wrap.cc: - * glib/glibmm/wrap.h: Replaced wrap_create_new_wrapper() - (introduced by the last commit) with wrap_create_new_wrapper(), - allowing us to check that the parent GType actually implements - the interface. This allows us to return a parent known type - if it implements the wanted interface. - -2007-09-25 Murray Cumming - - * glib/glibmm/wrap.cc: - * glib/glibmm/wrap.h: Added wrap_auto_interface<>(), which should - be used by wrap() specializations for interfaces, so we create - instances of the interface even if the derived C type is unknown to - us. - * glib/glibmm/signalproxy_connectionnode.h: Do not wrap.h from here - unnecessarily, to allow us to include objectbase.h in wrap.h, - needed by the new templated method. - * tools/m4/class_interface.m4: Use wrap_auto_interface<>() - instead of wrap_auto() for interfaces. - -2.14.0: - -2007-09-06 Daniel Elstner - - * glib/src/regex.{ccg,hg} (Regex): Some cosmetic cleanup. Also - replace C-style casts in default argument values with static_cast<>. - (escape_string): Wrap missing function. - (match_full): Rename to and add as overloads of match(). - (match_all_full): Rename to and add as overloads of match_all(). - (split_full): Rename to and add as overloads of split(). - - This has freeze-break approval from the release team. - -2007-08-16 Jonathon Jongsma - - * docs/reference/glibmm_footer.html_fragment, - docs/reference/glibmm_header.html_fragment: added
to doxygen header - and footer to make it easier to integrate with library.gnome.org, per a - request by Frederic Peters - -2.13.9: - -2007-07-28 Murray Cumming - - * glib/src/keyfile.hg: - * glib/src/keyfile.ccg: Added a set_double() without the group_name - parameter, because the C function can take NULL. - * glib/src/glib_docs_override.xml: Corrected the documnentation for - g_keyfile_set/get_double() to mention 2.14, instead of 2.12, - because we only added these to glibmm in 2.14. - * glib/src/regex.hg: Correct the since documentation to be 2.14 - not 2.12. - * glib/src/iochannel.hg: read(): Corrected a parameter name to - match the generated documentation. - * glib/glibmm/miscutils.h: Fixed typos in the use of newin2p14. - -2007-07-28 Murray Cumming - - * docs/Makefile_web.am_fragment: Corrected the rsync options, to - match those used by gtkmm, to fix the examples upload. - * glib/src/glib_docs.xml: Regenerated from the C documentation. - -2007-07-14 Murray Cumming - - * glib/src/keyfile.ccg: - * glib/src/keyfile.hg: Added get_double(), set_double(), get_double_list() - and set_double_list(). - -2.13.8: - -2007-07-07 Jonathon Jongsma - - * glib/src/optioncontext.ccg: - * glib/src/optioncontext.hg: add some new API that was added in glib 2.12, - including get/set_summary(), get/set_description(), set_translation_domain(), - and set_translate_func(). - * glib/src/glib_docs.xml: Regenerated with docextract_to_xml.py - * glib/src/glib_docs_override.xml: override docs for the new functions so - that they say that they were introduced in glibmm 2.14 instead of 2.12 - -2007-07-02 Johannes Schmid - - * glib/src/regex.hg: - Added class documentation - -2007-07-02 Murray Cumming - - * tools/pm/DocsParser.pm: convert_tags_to_doxygen(): - Handle newin markers for 2.12 and a few after that. - * docs/reference/Doxyfile.in: Added ALIASES for newin2p12 and - a few more. - -2.13.7: - -2007-06-22 Murray Cumming - - * glib/glibmm/main.cc: - * glib/glibmm/main.h: Added SignalTimeout::connect_seconds() - as an equivalent for g_timeout_add_seconds() and took the improved - documentation from glib. - - * glib/glibmm/miscutils.cc: - * glib/glibmm/miscutils.h: Added get_user_special_dir(), though we - should maybe wrap the enum. - Reimplemented many of the functions with the - convert_return_gchar_ptr_to_stdstring() and - convert_const_gchar_ptr_to_stdstring() functions to simplify them - and make them handle NULLs properly. - -2007-06-22 Murray Cumming - - * glib/src/regex.ccg: - * glib/src/regex.hg: Added a create() method, and added some - more default parameter values to the methods. - - * configure.in: - * examples/Makefile.am: - * examples/regex/main.cc: Added a very simple example. - - * glib/glibmm/value_custom.h: Put header guards around this, though - this should never be included directly anyway. - -2.13.6: - -2007-06-17 Murray Cumming - - * glib/src/regex.hg: - * glib/src/matchinfo.hg: Removed API that uses GMatchInfo, until we - wrap this properly, probably as a C++ iterator. This will avoid this - API accidentally being released as stable sometime. - -2007-06-12 Murray Cumming - - * glib/src/glib_enums.defs: Regenerated with enums.pl - * glib/src/glib_functions.defs: Regenerated with h2defs.py - - * glib/src/Makefile_list_of_hg.am_fragment: - * tools/m4/convert_glib.m4: - * glib/src/matchinfo.ccg: - * glib/src/matchinfo.hg: - * glib/src/regex.ccg: - * glib/src/regex.hg: Added the RegEx and MatchInfo classes. - These need some examples to test them. The MatchInfo class is - probably particularly broken at the moment. See the TODO comments. - - * glib/glibmm.h: Added regex.h - -2007-05-14 Murray Cumming - - * tools/m4/class_boxedtype.m4: - * tools/m4/class_gobject.m4: - * tools/m4/class_gtkobject.m4: - * tools/m4/class_interface.m4: - * tools/m4/class_opaque_copyable.m4: - * tools/m4/class_opaque_refcounted.m4: Explicitly mention Glib::wrap() - in the documentation for generated Glib::wrap() functions, because doxygen - does not show their namespace. - -2007-05-04 Murray Cumming - - * tools/pm/Function.pm: When generating example prototypes for - signal handlers, prefix them with on_my_, to avoid confusion with - similarly named functions and with on_*() default signal handlers. - -2.13.5: - -2007-04-30 Johannes Schmid - - * tools/generate_wrap_init.pl.in: - * tools/m4/class_gtkobject.m4: - Use _IS_DEPRECATED instead of _CLASS_DEPRECATED because - the latter confuses gmmproc. - We cannot just use _DEPRECATED because it will result - in incorrect handling of for example - #ifndef GTKMM_DISABLE_DEPRECATED - -2007-04-24 Yselkowitz - - * scripts/macros.m4: Check for both m4 and M4 in the GNU m4 output, - to fix the build on some platforms. - Bug #423990 - -2.13.4: - -2007-04-11 Armin Burgmeier - - * tools/pm/WrapParser.pm: Added peek_token() function which only - returns the next token without removing it from the tokens array. - Parse '/**' as a separate token and handle it in a special way so that - when the final '*/' is encountered and _WRAP_SIGNAL follows, the - comment is not terminated but continued by that automatically - generated doxygen comment. - - * tools/pm/Output.pm: Added a merge_doxygen_comment_with_previous - parameter in output_wrap_sig_decl(). If it is nonzero, the function - assumes that there is already a comment open and continues to use it - instead of opening a new comment by removing the leading '/**' from - what get_refdoc_comment() returns. Bug #378810. - -2007-04-06 Johannes Schmid - - * tools/generate_wrap_init.pl.in: - Use _CLASS_DEPRECATE instead of just _DEPRECATE to - known whether a whole class should be avoided in wrap_init. - Otherwise every .hg file containing deprecated methods - might get ignored. (Fixes Gtk::TextBuffer bug in maemo) - -2007-03-19 Bradley Bell - - * glib/glibmm/helperlist.h: Change variable name to avoid - warnings about a shadowed member. - Bug #420316. - -2007-03-19 Bradley Bell - - * glib/glibmm/utility.h: remove g_free prototype, include gmem.h - instead, to avoid a warning about a redundant declaration. - Bug #420339. - -2007-03-17 Armin Burgmeier - - * tools/m4/signal.m4: - * tools/m4/vfunc.m4: - Use static_cast in vfuncs and signal handlers to cast the - wrapper object to ObjectBase*. This is enough to check whether the object is - from a derived type or not. A slow dynamic_cast has only to be performed if it - is derived, and the C++ vfunc needs to be called. - * glib/glibmm/objectbase.h: This requires ObjectBase::is_derived_ to be public, - because it is called on a ObjectBase* rather than the actual type. - This causes a slight speed up of vfuncs and default signal handler invokation. - - Also added commented-out inline versions of ObjectBase::_get_current_wrapper() and - ObjectBase::is_derived(), which could be used in the generated code if we find - that this has significant performance benefits. Note that these methods must be - additional to the non-inline methods, because inline methods are not usually exported in the - shared library. - -2007-02-10 Murray Cumming - - * examples/options/main.cc: Use a default value, to show that it - can be done. - (This change, from 2006-03-30 was restored after being accidentally lost on Apr 12 2006) - -2007-02-10 Armin Burgmeier - - * glib/src/optiongroup.ccg: default_c_arg(): Set the initial - value of the C argument to the value the C++ argument has, to avoid - that glibmm resets arguments to zero that were not given on the - command line. - (This change, from 2006-03-30 was restored after being accidentally lost on Apr 12 2006) - -2007-01-28 Daniel Elstner - - * tools/m4/ctor.m4: If the argument list is empty, call the non- - varargs overload of the Glib::ConstructParams constructor instead - of using an empty varargs list. This mistake was exposed thanks - to the recent addition of G_GNUC_NULL_TERMINATED to the varargs - constructor declaration. Fortunately it was harmless in this case. - Also use the opportunity to clean up the M4 code and prefix builtin - M4 macros with m4_, so that we may get rid of the unprefixed macros - altogether some day. - -Thu, 25 Jan 2007 23:13:05 +0100 Dodji Seketeli - - * tools/m4/base.m4: - prefix the builting mkstemp with 'm4' because otherwise, - m4 1.4.8 recognizes it as a builtin macro and expands it, leading - to compilation errors on some distros. - This should fix #397167. Thanks to Daniel Elstner for spotting this. - -2007-01-20 Daniel Elstner - - * glib/glibmm/dispatcher.{cc,h}: Early spring cleaning. Also add - a paragraph about Dispatcher on win32 to the documentation. - (DispatchNotifyData): Remove the 'tag' member from the struct that - was always set to 0xdeadbeef in order to detect memory corruption. - This is pointless, as we already check the DispatchNotifier pointer - sent across the pipe, which is a far better indicator of corruption - anyway. - (warn_failed_pipe_io): Remove the err_no parameter and retrieve - errno respectively GetLastError() within the function instead. - (DispatchNotifier::conn_io_handler_): Remove, as we now inherit - from sigc::trackable. I verified that this doesn't cause problems - with threading in this particular case. - (DispatchNotifier::DispatchNotifier): If creating the pipe failed - and exceptions are disabled, call at least warn_failed_pipe_io() - instead of doing nothing at all. - (DispatchNotifier::*): Rework the win32 implementation so that it - matches more closely the Dispatcher semantics on Unix. This still - needs testing by someone on win32, though. So far I only verified - that it compiles with dummy definitions of the win32 API. Also, - I accidentally located the real cause of the race condition Cedric - experienced in bug #109966. It was a bug in my patch, rather than - in the example code. - - * examples/thread/dispatcher.cc: Cleanup. In particular, get rid - of the Glib::RefPtr<> abuse with non-Glib::Object types. I don't - believe we endorse such usage officially, so it shouldn't be in - the examples. - -2007-01-20 Daniel Elstner - - * glib/glibmm/miscutils.cc: Clean up the code a bit. - (get_application_name): Remove the code that checked the string for - valid UTF-8, and attempted conversion if not valid. I must have - been on crack when I wrote this, as the combination of conditions - that would cause the string to be invalid UTF-8 is quite unlikely. - If this is a valid concern at all, it should be filed as a GLib bug - and not worked around in glibmm. - (build_filename(const std::string&, const std::string&)): Just call - the plain g_build_filename() instead of building a temporary array - and passing that via ArrayHandle to the build_filename() overload - for containers. - (build_path): Remove the already deactivated custom implementation - from the time before g_build_pathv() was added to GLib. - - * glib/glibmm/object.{cc,h}: Improve/fix a couple of comments. - (ConstructParams::ConstructParams): Add G_GNUC_NULL_TERMINATED - function attribute to make the compiler complain if the variadic - argument list is not terminated by a NULL pointer. - - * glib/glibmm/ustring.{cc,h} (utf8_find_last_of): Avoid applying - bitwise logical operators directly to (possibly signed) operands - of char type. In order to avoid relying on implementation-defined - behavior, make sure that the operands are of unsigned integer type. - (ustring::is_ascii): Likewise, - (ustring_Iterator::operator--): Likewise. - (get_unichar_from_std_iterator): De-obfuscate this highly optimized - piece of code, as the current stable release of GCC (4.1.2-pre on - my system) generates better assembler output without the voodoo. - -2.13.3: - -2006-11-28 Daniel Elstner - - * tools/pm/GtkDefs.pm (read_defs): Allow an empty pair of - parentheses in the innermost match. This fixes the problem of - gmmproc choking on "()" in the documentation strings. This would - still break on unmatched parentheses, though. Of course the - parser should just skip over quoted strings, but I wasn't able - to get that to work. - * glib/src/glib_enums.defs (GNormalizeMode): Manually fix the - improperly parsed value of G_NORMALIZE_NFD. Fortunately this - doesn't change anything since the "#error" token was interpreted - as zero, which happens to be the right value. - * glib/src/glib_functions.defs (g_iconv): Manually convert to - a function definition, as it was improperly parsed as a method - with a zero-length name (!) of object GIConv. This fixes the - annoying gmmproc warning about an allegedly unwrapped method. - -2006-11-28 Murray Cumming - - * glib/glibmm/propertyproxy_base.cc: Don't ifdef out - PropertyProxy_Base when properties are disabled. It is needed - for connect_property_changed(). - -2006-11-27 Daniel Elstner - - * tools/enum.pl (parse): Ignore whitespace in front of an enum - typedef. This fixes parsing of HildonTelephoneEditorFormat in - hildon-libs. - * tools/pm/Enum.pm (parse_values): Check whether the enumeration - constants actually have a common module prefix before attempting - to remove it. This fixes the incorrect parsing of inconsistently - named enums in hildon-libs. - -2006-11-27 Daniel Elstner - - * tools/enum.pl (form_names): Break the loop if the length of the - common prefix reaches zero. This fixes the infinite loop when - processing the inconsistently named enumeration constants of the - Hildon libraries. - -2006-11-20 Murray Cumming - - * docs/reference/libstdc++.tag.xml: Updated from the libstdc++ site. - Note that the original does not have an .xml extension. This is is - lots bigger, but that should mean there is more documentation now. - -2006-11-22 Oliver Nittka - - * glib/src/value_basictypes.cc.m4: When registering float parameters, - use -G_MAXFLOAT instead of G_MINFLOAT. Since we first implemented this, - the glib documentation has been updated to make it cleare that this is - the real minimum and G_MINFLOAT is the minimum positive value. - Do the same for doubles too. - -2006-11-10 Murray Cumming - - * tools/Makefile.am: Add enum.pl to the dist, so that it is in - tarballs. Someone saw it mentioned in the appendix, but could not - find it in the tarball. - -2006-11-10 Murray Cumming - - * docs/reference/Doxyfile.in: Add PREDEFINES for the optional API, - so that the documentation shows the regular API. - -2006-11-10 Murray Cumming - - * glib/glibmm/objectbase.cc: - * glib/glibmm/objectbase.h: Added connect_property_changed(), - as an alternative to use when the property proxies are not - available because GLIBMM_PROPERTIES_ENABLED is not defined. - SignalProxyProperty::connect(): Use notify::propertyname instead of - just notify, so do not have to check the property name later. This - should be more efficient (when this is used, rarely). - * glib/glibmm/propertyproxy_base.cc: - * glib/glibmm/propertyproxy_base.h: Move PropertyProxyConnectionNode - into the header, so we can reuse it for connect_property_changed(). - -2006-10-04 Murray Cumming - - * glib/glibmm/class.cc: - * glib/src/iochannel.ccg: - * glib/src/markup.ccg: Add a silly line to avoid unused parameters - when GLIBMM_EXCEPTIONS_ENABLED is not set. - * glib/glibmm/error.h: Do not use G_GNU_NO_RETURN on the version - of throw_exception() that returns, to avoid a warning. - -2006-10-01 Murray Cumming - - * Makefile.am: - * docs/Makefile.am: - * docs/Makefile_web.am_fragment: - * docs/images/Makefile.am: - * docs/reference/Makefile.am: - * docs/reference/README: - * examples/Makefile.am: Upload to the new hoster instead of to sourceforge. - Abstracted the host and path names into docs/Makefile_web.am_fragment to - avoid duplication. - -2.13.2: - -2006-09-28 Cedric Gustin - - * MSVC_Net2003/glibmm/glibmm.vcproj: Remove sarray from list of - source and header files. - -2006-09-26 Murray Cumming - - * glib/glibmmconfig.h.in: For win32, define - GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS to 1, - instead of just defining it to nothing. - * scripts/reduced.m4: In the AC_ARG_ENABLE() to - define (or not) GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS, - use api-default-signal-handlers as the first parameter - instead of api-exceptions (a copy/paste error), though it does - not seem to make any difference. - Bug #357830. - -2006-09-23 Jonathon Jongsma - - * glib/src/keyfile.ccg, glib/src/keyfile.hg: added new files that were - missed from an earlier commit - -2.13.1: - -2006-09-19 Ralf Stephan - - * glib/glibmm/ustring.h: - ustring(const ustring& src, size_type i, size_type n=npos) - and - ustring(const char* src, size_type n) constructors: - In the reference documentation, mention explicitly that - n is the number of _UTF-8_ characters, rather than - ASCII characters (bytes). - -2006-02-20 Rob Page - - Wraps GKeyFile (Bug #330535) - * glib/glibmm.h: Added include of keyfile.h - * glib/glibmm/Makefile.am: Added keyfile.h - * glib/glibmm/containerhandle_shared.h: Added a TypeTraits - specialization for converting between bool and gboolean*. - * glib/src/Makefile_list_of_hg.am_fragment: Added keyfile.hg - to files_general_hg. - * glib/src/keyfile.hg: KeyFile header - * glib/src/keyfile.ccg: KeyFile implementation - * tools/m4/convert_glib.m4: Added a conversion for KeyFileFlags - -2006-09-14 Johannes Schmid - - * tools/m4/class_shared.m4: Change _IMPLEMENTS_INTERFACE to - _IMPLEMENTS_INTERFACE_CC so we can have more control over it, - by generating the _IMPLEMENTS_INTERFACE_CC from the WrapParser.pm. - * tools/m4/method.m4: - * tools/m4/signal.m4: - * tools/m4/vfunc.m4: Added optional parameters that result in - #ifdefs around methods, signals, vfuncs, etc. - * tools/pm/Output.pm: Addef ifdef() and endif(). - output_wrap_vfunc_h(), output_wrap_vfunc_cc(), - output_wrap_default_signal_handler_h(), - output_wrap_default_signal_handler_cc(), - output_wrap_meth(), - output_wrap_create(), - output_wrap_sig_decl(): Support optional ifdefs around - declarations and implementations, by calling ifdef() and endif(), - or by passing the extra argument to the m4 macros. - * tools/pm/WrapParser.pm: parse_and_build_output(): - Parse _IMPLEMENTS_INTERFACE, and call the new on_implements_interface() - method, which uses the new output_implements_interface() method, - so it can have an optional ifdef parameter. - on_wrap_method(), on_wrap_create(), on_wrap_vfunc(), output_wrap_signal(), - output_wrap_vfunc(): Handle the optional ifdef (with a parameter) option - for the _WRAP*() macros. - - This adds support for disabling certain features by using the new - "ifdef" argument for methods, vfuncs, signals and interfaces. - -2006-09-05 Jonathon Jongsma - - * docs/reference/Makefile.am: rebuild docs when a .h files changes in - glib/glibmm - * glib/glibmm/miscutils.cc: - * glib/glibmm/miscutils.h: wrap g_get_user_data_dir(), - g_get_user_config_dir(), and g_get_user_cache_dir() - -This is the HEAD branch, for new API. There is also a glib-2-12 branch for -maintenance of the stable API. - -2006-08-18 Cedric Gustin - - * MSVC_Net2003/*.vcproj: Updated for glibmm-2.12. - -2.12.0: - -2.11.3: - -2006-04-25 Murray Cumming - - * configure.in: - * glib/glibmmconfig.h.in: - * scripts/reduced.m4: Added a --enable-api-default-signal-handlers option. This defines - GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED, which is used to #ifdef default signal handlers. - This saves on library code size (less code and API symbols) and application code size and - loading time (less virtual methods, which must be imported and resolved at load time) and - per-object memory size (smaller object sizes because of less virtual methods.) - * tools/m4/class_interface.m4: - * tools/m4/class_shared.m4: Put default signal handler code in #ifdefs. - -2.11.2: - -2006-07-17 Murray Cumming - - * configure.in: Reverted the previous patch slightly to unbreak glibmmconfig.h. - -2.11.1: - -2006-07-16 Murray Cumming - - * configure.in: Quote GLIBMM_*_VERSION to avoid m4 warnings. Patch from - Bug #347076 from Kevin McBride. - * scripts/sun.m4: Quote GLIBMM_PROG_CXX_SUN to avoid an m4 warning. - Patch from Bug #347077 from Kevin McBride. - -2006-07-16 Jonathon Jongsma - - * glib/src/date.ccg: fix implementation of Glib::Date::set_time_current() so - that it doesn't set the date to Dec 31, 1969. - -2006-06-19 Murray Cumming - - * glib/glibmm/object.h: Check whether DestroyNotify is defined, so we can warn about - including X11/Xlib.h before this header, which will break things. - Bug #316726 from Mert Tugcu and Javeed Shaikh. - -2006-06-09 Cedric Gustin - - * glib/glibmm/objectbase.h : Inline the set_property and - get_property methods. This is required by mingw32-gcc as - ObjectBase is explicitly dllexported. - -2006-06-05 Murray Cumming - - * glib/src/convert.ccg: When using --enable-api-exception=no, only try to get the Glib::Error - when the GError is not null. - -2006-05-18 Murray Cumming - - * tools/m4/method.m4: _METHOD(): When using errthrow, actually print the function call even if - the return type is 0. - -2006-05-16 Murray Cumming - - * tools/m4/method.m4: _METHOD(), _STATIC_METHOD(): Remove spaces before dnl statements, - to avoid unwanted indentation in .cc files. - -2006-05-16 Murray Cumming - - * tools/m4/convert_base.m4: _CONVERT(): If the return type is void, use the unconverted - statement, not no statement. This prevents some void methods from being totally empty. - This was a (very bad) regression introduced by the optional API changed. - Bug #341895 from Philip Langdale. - * tools/m4/method.m4: _METHOD(), _STATIC_METHOD(): Attempt to remove unnecessary newlines, - though some indenting spaces slipped in instead. Must fix that. - -2006-05-14 Murray Cumming - - * glib/glibmm/value.cc: - * glib/glibmm/value.h: Restored the init(GValue*) method that was lost when - merging changes from the glibmm-2-10 branch. - -2006-05-09 Murray Cumming - - * glib/glibmm/ustring.cc: - * glib/src/date.ccg: - * glib/src/convert.ccg: - * glib/src/convert.hg: Added #ifdefed versions for the case that - exceptions are disabled. - -2006-05-10 Murray Cumming - - * configure.in: - * scripts/reduced.m4: Moved --enable-deprecated-api macro into scripts/reduced.m4. - Added the --enable-api-exceptions macro that was missing from my last commit. - -2006-04-05 Murray Cumming - - * configure.in: - * scripts/reduced.m4: Added --enable-api-exceptions option. When this - is used, methods that would normally throw an exception will now take - an extra std::auto_ptr argument that should be checked with - auto_ptr::get(). - * glib/glibmmconfig.h.in: Undef the GLIBMM_EXCEPTIONS_ENABLED, - so it will be defined. - * tools/m4/gerror.m4: throw_func() returns an auto_ptr of a - Glib::Error when exceptions are disabled. - * tools/m4/method.m4: - * tools/pm/Output.pm: on_wrap_method(): Added alternative API with - #ifdefs - * tools/m4/signal.m4: - * tools/m4/signalproxy_custom.m4: - * tools/m4/vfunc.m4: Put #ifdefs around the exception re-throwing - try/catch blocks. - * glib/glibmm/dispatcher.cc: - * glib/glibmm/dispatcher.h: - * glib/glibmm/error.cc: - * glib/glibmm/error.h: - * glib/glibmm/exceptionhandler.cc: - * glib/glibmm/exceptionhandler.h: - * glib/glibmm/main.cc: - * glib/glibmm/signalproxy.cc: - * glib/glibmm/streamiochannel.cc: - * glib/glibmm/stringutils.cc: - * glib/glibmm/threadpool.cc: - * glib/src/iochannel.ccg: - * glib/src/iochannel.hg: - * glib/src/markup.ccg: - * glib/src/spawn.ccg: - * glib/src/thread.ccg: Put #ifdefs around try/catch blocks, and - use alternative API when appropriate. - * examples/iochannel_stream/fdstream.cc: - * examples/markup/parser.cc: - * examples/options/main.cc: Adapted examples to - the alternative API, with #ifdefs - * tools/m4/convert_base.m4: Avoid any conversion if the result is - void, to allow _WRAP_METHOD() to ignore bool results, so we can - generate some methods that are currently hand-coded. - -2006-05-09 Murray Cumming - - * glib/glibmm/value.cc: - * glib/glibmm/value.h: Added init(const GValue*), so that we can copy GValue instances - of any type at runtime. Needed by libgdamm, which returns const GValue* instances. - -This is the HEAD branch, for API additions. See also the glibmm-2-10 branch. - -2.10.1: - -2006-04-12 Murray Cumming - - * tools/m4/signalproxy_custom.m4: Remove this file because it is not installed and - does not seem to be used. - -2006-04-12 Murray Cumming - - * tools/m4/signal.m4: Mark the (private) signal info callback functions as - static, to save on code size. - -2006-04-12 Murray Cumming - - * tools/pm/WrapParser.pm: Parse a new optional constversion parameter for - _WRAP_METHOD(), to save on code size by just calling the non-const overload - instead of generating almost identical code. - * tools/m4/method.m4: _METHOD(): Take extra parameters for use when constversion is used. - * tools/pm/Output.pm: Send the extra parameters to _METHOD(). - * docs/internal/using_gmmproc.txt: Documented the new constversion option. - -2006-04-12 Murray Cumming - - * glib/glibmm/main.cc: - * glib/glibmm/objectbase.cc: - * glib/glibmm/property.cc: - * glib/glibmm/ustring.cc: - * glib/glibmm/value_custom.cc: - * glib/src/spawn.ccg: Mark private functions as - static, to stop them being exported in the API, to reduce the - library code size slightly. - * tools/m4/signal.m4: Make generated callback functions static, for - the same reasons. - -2006-04-07 Cedric Gustin - - * README.win32: Updated for Mingw-4.1. - -2006-04-06 Cedric Gustin - - * MSVC_Net2003/*.vcproj: Embed the manifest file into executables - in the case of the Debug target. - * README.win32: Fixed a few typos. - * build_shared/Makefile_build.am_fragment: Add -DGLIBMM_BUILD to - the extra_defines compiler flags (switch between - dllexport/dllimport on win32). - * glib/glibmmconfig.h.in: Define GLIBMM_DLL when building with - mingw32/cygwin. This makes the GLIBMM_API tag (and GTKMM_API for - gtkmm) active with these two platforms, as required by bug - #309030. - * glib/glibmm/object.h, glib/glibmm/objectbase.h : Tag the Object - and ObjectBase classes with GLIBMM_API to make Visual Studio happy. - -2.10.0: - -2006-02-25 Murray Cumming - - * tools/pm/DocsParser.pm: looklookup_documentation(): Put the - @deprecated text immediately after the main description, before - the parameters, so that Doxygen actually uses it. - -2006-02-25 Murray Cumming - - * tools/pm/DocsParser.pm: looklookup_documentation(): Accept an - extra deprecated_documentation parameter, to be appended to the - Doxygen documentation. - * tools/pm/Output.pm: output_wrap_meth(): Put the documentation - inside the deprecation #ifdef, for neatness. - * tools/pm/WrapParser.pm: on_wrap_method(): Read an optional string - after the optional deprecated parameter, used to say why the - method is deprecated, in case it was not deprecated by the C API, - in which case it would already have documentation for this. - -2006-02-27 Cedric Gustin - - * README.win32: Updated for glibmm-2.8 (MS Visual Studio 2005). - * glib/glibmm/ustring.h: Tag npos with GLIBMM_API, in order to - dllexport it on win32. Bug #332438. - * MSVC_Net2003/*.vcproj: Updated for Visual Studio 2005. Added the - /vd2 compiler flag (Bug #158040). - * MSVC_Net2003/glibmm.sln: Updated for Visual Studio 2005. - * MSVC_Net2003/gendef/gendef.cc: Redirect output of dumpbin to a - file. - * glib/glibmmconfig.h.in: Undefined - GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS for MSVC. - -2006-02-03 Murray Cumming - - * docs/internal/using_gmmproc.txt: Section about regenerating .defs: - Repeat the hint about extra_defs_gen here. - -2006-02-27 Cedric Gustin - - * glib/glibmm/ustring.h: Tag npos with GLIBMM_API, in order to - dllexport it on win32. Bug #332438. - -2006-02-07 Rob Page - - * glib/glibmm/ustring.h: fix a typo in the documentation for uppercase() - -2.9.1: - -2006-01-28 Murray Cumming - - * glib/src/optiongroup.ccg: add_entry_with_wrapper(): Copy the - CppOptionEntry into the map _after_ setting entry_ so that we - really delete it in release_c_arg(), to avoid a memory leak. - -2006-01-28 Rob Page - - * docs/reference/glibmm_header.html_fragment: Fix the link - to the Main page. Bug #328299. - -2006-01-27 Murray Cumming - - * glib/src/optionentry.ccg: Constructor: Avoid memory - leak caused by double instantiation of gobject_. - -2005-12-16 Murray Cumming - - * glib/glibmm/object.h: - * glib/glibmm/objectbase.h: Hide some internal stuff - from Doxygen. Add/Improve the Doxygen documentation. - * glib/src/convert.hg: Correct the declaration of - filename_display_name() to match the implementation. - Previously this would have been unusable due to a linker - error. - -2005-11-30 Murray Cumming - - * docs/reference/Doxyfile.in: Define the @newin aliases, - as in gtkmm. - * tools/pm/DocsParser.pm: Convert Since: in gtk-doc - text to @newin for our doxygen docs. - -2005-11-29 Murray Cumming - - * build_shared/Makefile_build.am_fragment: - * configure.in: Added --enable-use-deprecations, - defaulting to no (do not check for them), so that - the tarball will still build when newer versions - of glib deprecate some API. - * examples/Makefile.am_fragment: Use the - deprecation, if wanted. - -2005-11-29 Murray Cumming - - * build_shared/Makefile_build.am_fragment: - * configure.in: Added --enable-deprecated-api - option. When set to disabled, it does not build - deprecated API. This reduces the size of the library, - and might be useful for embedded devices. - * glib/src/date.ccg: - * glib/src/date.hg: Use _DEPRECATE_IFDEF_START/END - around the deprecated set_time() method. - -2005-11-29 Murray Cumming - - * tools/m4/base.m4: Add - _DEPRECATE_IFDEF_START and _DEPRECATE_IFDEF_END - macros, to #ifdef-out generated methods. - Added _DEPRECATE_IFDEF_CLASS_START and - _DEPRECATE_IFDEF_CLASS_END for whole classes. - Put _DEPRECATE_IFDEF_CLASS* around all generated - code. It does nothing if the class is not deprecated. - * tools/m4/class_gtkobject.m4: Add _DEPRECATED macro, - used to mark a class as deprecated. - * tools/m4/method.m4: Take an extra parameter, to - optionally mark the method as deprecated, to add - #ifdefs around the code, with - _DEPRECATE_IFDEF_START/END - * tools/pm/Output.pm: _DEPRECATE_IFDEF_START/END - around the declarations of deprecated methods. - * tools/pm/WrapParser.pm: Check for an optional - deprecated parameter to _WRAP_METHOD(). - * tools/m4/member.m4: Allow optional deprecated - method for _MEMBER_GET/SET*() to ifdef the code - out. - * tools/generate_wrap_init.pl.in: Put an #ifdef - around use of deprecated classes. - -2005-11-23 Murray Cumming - - * configure.in: Depend on glib 2.9, which - has new API. - * glib/src/date.ccg: - * glib/src/date.hg: Wrap glib_date_set_time_t() - and glib_date_set_time_val(). Deprecate - set_time(GTime) in favour of the new method - overloads. Added set_time_current(), wrapping the - case that the time_t is 0. - -This is the HEAD branch, for new API, targetting glib 2.9. See also the -glibmm-2-8 branch. - -2.8.2: - -2005-11-23 Murray Cumming - - * glib/glibmm/containers.h: Do not use g_assert() in - a header, because g++ sometimes warns that it has - no effect. - -2005-10-29 Murray Cumming - - * scripts/macros.m4: AL_PROG_GNU_MAKE(): - Use $MAKE-make instead of $ac_make, which - apparently fixes a build problem on some - Solaris systems. Thanks to Mark Rouchal in - bug #307480. - -2.8.1: - -2005-10-19 Murray Cumming - - * configure.in: Check for glib 2.8. Bug #317913. - -2.8.0: - -Updated NEWS and increased version to 2.8.0. - -2.7.3: - -2005-08-17 Murray Cumming - - * glib/src/glib_docs.xml: Regenerated with docextract_to_xml.py - * glib/src/glib_enums.defs: Regenerated with enums.pl - * glib/src/glib_functions.defs: Regenerated with h2defs.py - -2.7.2: - -2005-07-16 Murray Cumming ::get_value(), - PropertyProxy_WriteOnly<>::set_value(): Add implementations - instead of casting to unrelated PropertyProxy() and calling it - there. The AIX compiler did not like this hack. Bug #301610 - -2005-06-07 Cedric Gustin - - * glib/glibmm/miscutils.cc: In get_home_dir, return an empty - string when HOME is not defined (Win9x). Bug #306310 from Michael - Hofmann. - * glib/glibmm/miscutils.h: Updated docstring for the get_home_dir - method. - -2005-04-27 Murray Cumming - - * examples/child_watch/main.cc: - * examples/thread/dispatcher.cc: - * examples/thread/thread.cc: - * glib/glibmm/dispatcher.cc: Inherit signal handler objects from - sigc::trackable. This is necessary with some libsigc++ patches, - though not currently necessary with regular libsigc++. - -2005-04-22 Murray Cumming - - * glib/src/gmodule_enums.defs: Regenerate with enums.pl - * glib/src/gmodule_functions.defs: Regenerate with h2defs.py - This adds the BIND_LOCAL enum value. Bug #172748 from - Phillip Neiswanger. - -2005-04-05 Murray Cumming - - * tool/pm/Output.pm: output_wrap_property(): Do not add the - const read-only method override if the property can not be read. Be - careful because this removes a little API from generated code. You - should hand-code the wrongly-generated methods and mark them as - deprecated. - * glib/glibmm/refptr.h: Added cast_const<>, like the existing - cast_dynamic<> and cast_static. - -2005-03-31 Murray Cumming - - * glib/src/glib_functions.defs: Updated with - h2defs.py. - -2005-03-13 Yair Hershkovitz - - * glib/glibmm/main.h, - glib/glibmm/main.cc: Added MainContext::signal_child_watch() - * examples/: Added child_watch/ example - -2005-03-11 Yair Hershkovitz - - * glib/glibmm/main.h, glib/glibmm/main.cc: - Add Glib::SignalChildWatch class, Glib::signal_child_watch() - -This is the HEAD branch, for new API. Bug fixes that do not change or add -API should also be applied to the glibmm-2-6 branch. - -2005-03-09 Cedric Gustin - - * MSVC_Net2003/Makefile.am: Add blank.cpp to EXTRA_DIST. - * MSVC_Net2003/glibmm/glibmm.vcproj: Remove sarray.cc from the - list of source files. - * MSVC_Net2003/examples/*/*.vcproj, - MSVC_Net2003/tests/glibmm_value/glibmmvalue.vcproj: Change name of - PDB file to $(OutDir)/$(TargetName).pdb. - -2.6.1: - -2005-03-07 Murray Cumming - - * glib/glibmm/interface.cc: Disable the new check for pre-existing - interface implementations, because it checks all base gtypes and - not just the current gtype. Bug #169442 by Bryan Forbes. - -2.6.0: - -2.5.6: - -2005-02-18 Murray Cumming - - * glib/glibmm/interface.cc: Interface_Class:add_interface(), used by - add_interface() methods of Interfaces: Do not add interfaces that - have been added before, to avoid the warning from glib. This - allows application code to be simpler. - -2005-02-18 Murray Cumming - - * tools/pm/Output.pm: Add the documentation to the const property() - accessor as well as the non-const one. - -2005-02-13 Murray Cumming - - * tools/extra_defs_gen/generate_extra_defs.cc: Use - g_param_spec_get_blurb() to output the documentation for the - properties in the .defs file. - * tools/m4/property.m4: Take an extra docs argument, and put it in the - doxygen docs. - * tools/pm/Output.pm: Add the extra docs argument when calling the - property m4 macro. - * tools/pm/Property.pm: Read in the new docs part of the .defs, and - add a period at the end if neccessary. - -2005-02-01 Murray Cumming - - * examples/threadpool.cc, dispatcher.cc, dispatcher2.cc: Removed the - #ifdef for AIX, because sigc::bind now works on AIX. - -2005-01-27 Cedric Gustin - - * MSVC_Net2003/glibmm/glibmm.rc.in: Reverted to 2.4 for the - library version number. - -2.5.5: - -2005-01-26 Cedric Gustin - - * MSVC_Net2003/glibmm/glibmm.vcproj: Reverted to 2.4 for the - library version number. - -2005-01-24 Cedric Gustin - - * Makefile.am, configure.in: Added MSVC_Net2003 directory. - * config.h.in: Added mkfifo #define (for mingw32). - * glib/glibmmconfig.h.in: Added new #define's to MSVC section. - * examples/iochannel_stream/Makefile.am: Do not build on win32 - with mingw32 (mkfifo not available). - * scripts/cxx_std.m4: Fixed typo in AC_DEFINE macros. - * build_shared/Makefile_build.am_fragment: Removed - $(sublib_name)_COMPILATION variable (is useless now on - cygwin/mingw as all symbols are dll exported). - * MSVC_Net2003/*: Initial commit imported from glibmm-2-4 branch. - * MSVC_Net2003/glibmm/Makefile.am: Rewrote rule for local copy of - glibmmconfig.h (required for 'make distcheck'). - -2005-01-21 Murray Cumming - - * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added new - compiler tests to see whether extern "C" functions are put in the - global namespace, even when we use extern "C" inside a namespace - declaration. The AIX xlC compiler does this, but allows us to - redeclare the namespace inside the extern "C" block. - * glib/glibmm/property.h: Use the new - #ifdef GLIBMM_MUST_REDECLARE_NAMESPACES_INSIDE_EXTERNC and redeclare - the namespace when necessary. - * examples/thread/dispatcher.cc, dispatcher2.cc: Use sigc::bind<1> - instead of just sigc::bind<> because the AIX xlC compiler needs the - extra hint. However, the linker then fails, so the use of sigc::bind - is ifdefed out for _AIX. See the comments in the code. - -2005-01-21 Murray Cumming - - * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added new - compiler tests. - 1. To see whether it allows use of non extern C functions - as extern C callbacks, because the Tru64 compiler does not - allow this, when using strict_ansi. We do not actually use this yet. - 2. To see whether it allows us to define a template that uses an - undefined type, even if we do not use it before defining the type. - Tru64 does not allow this. That's probably correct. - * glib/glibmm/container.h: #ifdef out a dynamic_cast that Tru64 - does not allow, and which I can not think of a better place to put. - See the comment in the code. - * glib/glibmm/containerhandler_helpers.h: When the compiler does not - alllow the GObject and GtkObject (dynamic_cast of) specializations - here, then put them in glib/glibmm/object.h and - gtkmm/gtk/src/object.hg instead.- needed by Tru64 compiler. - * glib/glibmm/value.h, value_custom.[h|cc]: Conditionally moved - the RefPtr Value specialization into object.h, as above. - * glib/src/ optiongroup.ccg, spawn.ccg, thread.ccg: Make C callacks - separate extern "C". - * glib/src/optiongroup.ccg: Do not use the StringArrayHandle, - because the Tru64 compiler has problems with it - see comments - in code. - * glib/src/optionentry.hg: Remove the include of value.h, because - it is not used and it causes a Tru64 compile error in - optioncontext.cc because its templates are included before the - types that the template uses. - -2005-01-19 Murray Cumming - - * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added a - compiler test, because the IRIX MipsPro compiler does not allow the - inline initialization of ustring::npos. - * glib/glibmm/ustring.[h|cc]: When the compiler does not support the - inline initialization of npos, initialize it in the .cc file. - Declare partial specializations of the SequenceString inner class - inside the class - needed by IRIX MipsPro compiler. - -2005-01-18 Murray Cumming - - * glibmm/src/optiongroup.[hg|ccg]: CppOptionEntry::convert_c_to_cpp(): - Copy the strings to the vector in a loop, instead of using the - ArrayHandle constructor, because that does not seem to work with the - SUN Forte compiler. - -2.5.4: - -2005-01-10 Murray Cumming - - * glibmm/src/optiongroup.[hg|ccg]: Added a castitem constructor - that always takes ownership, needed by Gtk::Main. Added the new - FLAG_REVERSE flag value. Added reference documentation. - -2.5.3: - -2005-01-09 Murray Cumming - - * glib/glibmm/misc_utils.[h|cc]: Added setenv() and unsetenv(), - wrapping new functions added in glib 2.4. - * glib/src/convert.[hg|ccg]: Added filename_display_name() and - filename_display_basename(). - -2005-01-09 Murray Cumming - - * glib/src/optionentry.ccg: Copy constructor: Copy the short name - form the src, not from itself. Bug #16331 from Daniel Holbach. - -2005-01-09 Murray Cumming - - * glib/src/optionentry.[hg|cc]: Add add_entry(entry, bool&), to wrap - use of G_OPTION_ARG_NONE. Bug #163325 from Daniel Holbach. - * examples/options/main.cc: Use the new add_entry() overload. - -2005-01-06 Benoît Dejean - - * glib/glibmm/dispatcher.cc: - * glib/glibmm/error.cc: - * glib/glibmm/exceptionhandler.cc: - * glib/glibmm/main.cc: - * glib/glibmm/threadpool.cc: - * glib/glibmm/ustring.cc: - * glib/glibmm/wrap.cc: Don't export private API. - Closes #163031. - -2005-01-04 Chris Vine - - * examples/iochannel_stream/: Provide a means of obtaining - Glib::IOChannel error information from the streambuffer. Remove - the code conversion option from the fdstream/fdstreambuf - constructors and add comments in fdstream.h about code conversion - and other matters. Add a detach() function and a destructor to - fdstreambuf. Correct an error in fdstreambuf::xsgetn(). Include - missing header file in main.cc. - -2.5.2: - -2004-12-19 Murray Cumming - - * examples/: Adapted and added iochannel_stream example from - Chris Vine in bug #138259. - -2004-12-19 Murray Cumming - - * glib/src/: Added glib_docs.xml, generated with docsextract_to_xml.py - and glib_docs_override.xml, to generate some API reference from - the C docs. - * glib/src/Makefile.am: Mention the new files. - -2004-12-19 Murray Cumming - - * docs/reference/: Added a copy of the libstdc++ doxygen tags file, - but it still does not seem to work, for example with std::vector<> - and std::string. - -2004-12-19 Murray Cumming - - * docs/reference/Doxyfile.in: Use the libstdc++ TAG files, so that - references to std:: classes take people to their docs. - * glib/src/: Added glib_docs.xml and glib_docs_override.xml, and - mentioned them in Makefile.am. - -2004-12-19 Murray Cumming - - * glib/src/date.hg, glib/glibmm/main.h, - glib/glibmm/signalproxy_connectionnode.h: Deal with some doxygen - warnings about undocumented parameters. - * glib/glibmm/ustring.h: Added documentation for the size() and - bytes() methods. - -2004-11-21 Murray Cumming - - * glib/src/optionentry.[hg|ccg]: Removed OptionEntry enum and - set_arg_data(), because they are not needed any more. - -2.5.1: - -2004-11-01 Murray Cumming - - * glib/src/optiongroup.[hg|ccg]: Added add_entry() for vector - and add_entry_filename() for std::string and vector. - * examples/options/main.cc: Test these new methods. - -2004-10-30 Murray Cumming - - * glib/src/optiongroup.[hg|ccg]: Added gobj_give_ownership(). - * glib/src/optioncontext.[hg|ccg]: add_group(), set_main_group(): Use - gobj_give_ownership() because GOptionContext deletes the GOptionGroups - that we give it. - -2004-10-26 Murray Cumming - - * glib/src/optionentry.hg: Remove accessors for arg and arg_data. - * glib/src/optiongroup.[hg|ccg]: add_entry(): Remove arg_type parameter - and instead add overrides which take specific C++ value types. - Add CppOptionEntry inner class to hold information about each entry - and its dynamically allocated C value. - Add map_entries_ map to store them, so we can iterate over them during - post_parse. - -2004-10-21 Murray Cumming - - * build_shared/Makefile_build.am_fragment: Patch from Roger Leigh in - bug # 15589 to use PLATFORM_WIN32 rather than OS_WIN32 to enable - -no-undefined. This allows glibmm to build in a cgwin environment, - apparently. - -2.5.0: - -2004-10-17 Murray Cumming - - * glib/src/optioncontext.[hg|ccg]: add_entry(): Fixed crash by - creating a temporary array, with a nulled last item, which is what the - C function wants. In callbacks, ignore the group parameter because our - option group in the data parameter is the same, and does not require - construction of a second C++ wrapper instance for the same C instance. - * glib/src/optiongroup.[hg|ccg]: Removed the cast constructor, because - it is not needed anymore, and there is no clear way to implement it. - -2004-10-14 Murray Cumming - - * tools/pm/WrapParser.pm: on_wrap_property(): Convert property name to - canonical form, so that we can recognise notifications of property - value changes. Bug #152764. - -2004-10-07 Philip Langdale - - * glib/glibmm/signalproxy_connectionnode.cc: Remove unnecessary warning - when notify() is called after destroy_notify_handler(). (bug #154498) - -2004-10-01 Murray Cumming - - * glib/src/option*.[hg|ccg], examples/options/main.cc: Rethought the - structure now that I see how the parts work together. Rearranged the - example to show how the parsing can fill values in member variables - of a derived OptionGroup class. However, 1. it crashes now, 2. we need - extra code to map the GOption C types to suitable C++ types, probably - by doing pre and post parsing to create temporary C types for the C++ - types. - -2004-09-27 Murray Cumming - - * glib/src/option*.[hg|ccg]: Wrapped more methods, but I have still not - finished. - * examples/options/: Started an example. - -2004-09-26 Murray Cumming - - * glib/src/glib_functions.defs: Regenerated with h2defs.py - * glib/src/: Added optionentry.[hg|ccg], optiongroup.[hg|ccg], - optioncontext.[hg|ccg]. - -2004-09-19 Murray Cumming - - * This is the HEAD branch. - -2004-09-13 Cedric Gustin - - * examples/thread/dispatcher.cc: Fixed a race condition on win32 - that involved the combined use of auto_ptr and multithreading (bug - #109966). - -2.4.4: - -2004-07-23 Martin Schulze - - * glib/glibmm/main.cc: Move deletion of SourceConnectionNode object - into destroy_notify_callback() exclusively; do not delete from - notify(). - (bug #144420) - -2004-07-10 Murray Cumming - - * glib/glibmm/signalproxy_connectionnode.cc: notify(): Do not delete - the connection after disconnecting it, because disconnecting it - always causes disconnect_notify to be called, so just delete it there. - This prevents double deletes and reading of deleting memory, found in - bug #145571. - -2004-07-09 Murray Cumming - - * glib/glibmm/signalproxy.h.m4: Added some documentation. - -2004-06-20 Daniel Elstner - - * glib/glibmm/objectbase.cc: Spring cleaning. - * glib/glibmm/object.cc: ditto. - -2.4.3: - -2004-06-18 Daniel Elstner - - * scripts/macros.m4 (GTKMM_ARG_ENABLE_WARNINGS): Add - -Wno-long-long to the list of tried warning flags. - -2004-06-16 Daniel Elstner - - * glib/glibmm/dispatcher.cc (DispatchNotifier::create_pipe): There - is no point in calling g_file_error_from_errno() on win32 since we - have no real errno. Also fix the error text to say "event" rather - than "pipe". - -2004-06-14 Daniel Elstner - - * scripts/cxx.m4: Add a couple of casts to void in order to suppress - warnings about unused variables. I still have no idea as to why the - hardcore warning flags are remembered when running make distcheck... - -2004-06-14 Daniel Elstner - - * examples/thread/dispatcher.cc: Explicitely join all threads. - Hopefully that'll fix the crash on win32 (see bug #109966). - -2004-06-13 Daniel Elstner - - * examples/thread/dispatcher*.cc (main): Remove unused parameter - names to fix building with -Werror. - -2004-06-13 Daniel Elstner - - * configure.in (GTKMM_ENABLE_DEBUG_REFCOUNTING): s/^GTK/GLIB/ - -2004-06-08 Daniel Elstner - - * build_shared/Makefile_build.am_fragment (all_includes): Remove - left-over include paths for pango, atk, gdk and gtk. - -2004-06-07 Daniel Elstner - - * glib/glibmm/stringutils.h: Replace a couple of double quotes with - " to prevent doxygen from escaping the enclosed HTML entities. - -2004-06-04 Daniel Elstner - - * glib/glibmm/ustring.h: Use /*! instead of /** to introduce - doxygen comments in order to avoid cluttering the long method list - of class Glib::ustring. Replace a few double quotes with " - to prevent doxygen from escaping the enclosed HTML entities. - -2.4.2: - -2004-06-03 Daniel Elstner - - * scripts/Makefile.am (EXTRA_DIST): Remove mkinstalldirs, because - automake-1.8 doesn't use it anymore and prior versions should pick - it up automatically anyway. - -2004-06-03 Daniel Elstner - - * glib/glibmm/dispatcher.cc: Complete overhaul of the Win32 - implementation of Glib::Dispatcher. That is, mutex locking is - done correctly now and dynamic memory allocation is no longer - used, plus a few other cleanups. See reopened bug #109966. - -2004-06-03 Daniel Elstner - - * glib/glibmm/signalproxy_connectionnode.cc - (SignalProxyConnectionNode::SignalProxyConnectionNode): - Reorder the initializer list to match the declaration order. - - (SignalProxyConnectionNode::notify): Add missing return 0. - -2004-05-26 Daniel Elstner - - * glib/glibmm/ustring.{cc,h}: Globally apply some minor code - cleanup and optimization tweaks. - - (get_unichar_from_std_iterator): Replace implementation with a - hand-optimized and profiled variant that has been lurking in my - local tree for quite some time, thus should be well tested. - Also add the G_GNUC_PURE() attribute. - - (operator+): Explicitely instantiate and return a temporary string, - instead of accessing the reference ustring::operator+=() returns. - This quite often allows the compiler to eliminate the additional - copy constructor invocation. - -2004-05-25 Murray Cumming - - * configure.in, Makefile.am: Removed the glibmm.spec files, because - it is broken and nobody has volunteered to fix it. - -2004-05-20 Daniel Elstner - - * examples/thread/dispatcher.cc: Revert last commit because it's - silly. To make the code truly exception-safe it would be necessary - to either join all threads or to notify them, which is way beyond - the scope of this example. - -2004-05-20 Daniel Elstner - - * examples/thread/dispatcher.cc: Set a good example and - be paranoid about possible memory leaks due to exeptions. - -2004-05-20 Daniel Elstner - - * examples/thread/dispatcher.cc: Code cleanup. Most importantly, - get rid of the locking around std::cout since it obfuscates the - purpose of using Glib::Dispatcher. - -2004-05-13 Daniel Elstner - - * glib/glibmm/object.{cc,h} (ConstructParams::ConstructParams): - Implement the copy constructor in a way that actually works if used. - Relying on the compiler to optimize it away is a bad idea. (#132300) - -2004-05-04 Murray Cumming - - * glib/glibmm/ustring.h: Documented the constructors, based on - the libstdc++ documentation, to make it clear that sizes are in - characters rather than bytes. - -2004-05-01 Murray Cumming - - * configure.in: Increase glib dependency to 2.4.0. - -2004-04-30 Murray Cumming - - * tools/m4/gobject.m4: Allow use of _CUSTOM_DTOR(), needed by - Gnome::Gda::Connection. - -2.4.1: - -2004-04-17 Murray Cumming - - * docs/reference/Makefile.am: Make the generated html depend on the - beautify_docs.pl.in source instead of the generated beautify_docs.pl, - so that the html is not rebuilt from tarballs. - -2004-04-17 Murray Cumming - - * glib/glibmm/container_handle.h: Reimplemented more of the - to_cpp_type() methods without using dependent methods, so that they - work with g++ 3.4 (cvs versions). - -2.4.0: - -2004-04-11 Murray Cumming - - * tools/pm/WrapParser.pm, Output.pm, m4/signal.m4: Allow _WRAP_SIGNAL() - to take an refreturn argument, so that Gtk::Widget::on_get_accessible() - can do an extra ref before returning the Atk::Object. - -2004-04-09 Murray Cumming - - * tools/pm/Output.pm: output_wrap_property(): Provide the actual - property name as well as one with - replace with _, so we can - test for the correct value in notification signal handler. - * tools/m4/property.m4: Use the actual property name when calling - C functions. - -2.3.8: - -2004-03-24 Murray Cumming - - * scripts/cxx.m4: Corrected parentheses, which cause the docs to be - written into config.h. Thanks to Alexander Nedotsukov. - -2004-03-23 Murray Cumming - - * scripts/cxx.m4: Corrected the ambiguous const template test, which - failed on all platforms because it generated bad code. - -2004-03-20 Martin Schulze - - * glibmm/main.cc: Bug fix in SourceConnectionNode::notify() (#137030). - -2004-03-18 Murray Cumming - - * tools/generate_wrap_init.pl: Change a regex so that files are - included without full path. Apparently this helps when building outside - of the source directory, though I'm sceptical. By Victor Zverovich in - bug #137530. - -2.3.7: - -2004-03-14 Murray Cumming - - * scripts/sun.m4: Set the correct variable, so it is actually set in - glibmmconfig. - -2004-03-14 Murray Cumming - * glib/glibmm/containerhandle_shared.h value.h: Used ifdef - GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS to avoid - problems with the SUN Forte compiler. - -2004-03-14 Murray Cumming - - * scripts/cxx.m4: Added CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS - m4 macro to use in configure.in, to check for the SUN Forte problem - - see the comments in cxx.m4. - * scripts/sun.m4: Moved some brackets around to make the define - actually work. - -2004-03-13 Murray Cumming - - * glib/glibmm/containerhandle_shared.h: TypeTraits to_cpp_type() - specializations: Use wrap_auto() directly instead of a specific - wrap() overload that would be dependent. Needed for g++ 3.4. - * glib/glibmm/containers.h: Same again. - -2004-03-13 Murray Cumming - - * tools/m4/class_shared.m4: Remove the parent get_type() call from - the Class::init() function, because it is optimised away, and g++ 3.4 - actually complains that it does nothing. - * glib/glibmm/object.[h|cc]: Add a public ConstructParams copy - constructor, needed by g++ 3.4. See comments in the code. - * tests/glibmm_value/glibmm_value.cc: Instantiate instances of - value types, to fix the g++ 3.4 build. I don't know what the code - was meant to do before anyway. - -2004-03-11 Murray Cumming - - * scripts/: Added sun.m4, copied from libsigc++-1.2/scripts and - modified, so we can detect the SUN Forte compiler. - * configure.in: Used the m4 macro. - * glibmm/glibmm-config.h: Undef the GLIBMM_COMPILER_SUN_FORTE macro - so that it will be defined if configure sets it. - -2004-03-09 Murray Cumming - - * Some, but not all, SUN Forte build fixes: - * tools/m4/convert_gdk.m4, convert_glib.m4: Use existing - sun-specific conversion when converting from any - RefPtr to *Something. - -2004-04-08 Hagen Moebius - - * tools/pm/DocsParser.pm: Another change to give better warnings and - errors at gmmproc-runtime. Further improvment of parsing parameter names - to strip traling underscres. This not only for reference text, but for - the parameter list also. - -2004-04-07 Hagen Moebius - - * tools/pm/DocsParser.pm: Allow overrides to only override - part of the docs. Add a tag to associate non-prefixed - functions with classes. Improve parsing of parameter names so they - can now have numbers in the names. - -2.3.6: - -2004-03-03 Murray Cumming - - * Added glib/glibmm/i18n.h and i18n-lib.h which defines _() and friends - for internationalization. See the comments in the header - you must - include things in the right order. - * glib/src/spawn.[hg|ccg]: Added spawn_close_id() as wrapper for - g_spawn_close_id(). - * glib/glibmm/main.[h|cc]: Added MainLoop::depth() as wrapper for - g_main_depth(). - - 2004-03-02 Murray Cumming - - * tools/pm/Function.pm: parse_param(): Only parse const as an - individual part of the type name if it is followed by a space, so - that we can have const const_iterator& types. - -2004-02-27 Martin Schulze - - * CHANGES: Fix typo reported by Chris Vine. - -2004-02-13 Martin Schulze - - * documentation fixes and corrections in the comments reflecting - the shift to libsigc++ 2. - * make all source files in example thread use libsigc++ 2 instead - of libsigc++ 1.2. - -2.3.5: - -2004-02-10 Murray Cumming - - * glibmm now uses libsigc++ 2 instead of libsigc++ 1.2. See bug - #125061 for more details. We must update CHANGES later. - -2.3.4: - -2004-02-02 Murray Cumming - - * glib/glibmm/containerhandle_shared.h: Traits: Added - const_cast, needed by TreeView::get_columns() const: bug #126721. - -2004-01-29 Murray Cumming - - * tools/pm/Parser.pm, Output.pm, tools/m4/signal.m4: Add an optional - custom_c_callback parameter to _WRAP_SIGNAL to allow special code - for the SelectionData& output parameter in Gtk::Widget signals. - Hopefully we won't need too many more of these hacks - the m4 is - becoming very hard to read, with all these nested ifelse() statements. - -2004-01-27 Cedric Gustin - - * build_shared/Makefile_build.am_fragment: Added win32-specific - --export-all-symbols to linker flags. This is backported from - gtkmm-2.2. - * README.win32: Updated text for glibmm-2.4. - * tools/generate_wrap_init.pl.in: Replaced GTKMM_WIN32 by the - standard G_OS_WIN32. - -2.3.3: - -2004-01-22 Murray Cumming - - * glib/date.[hg|ccg]: Added clamp_min() and clamp_max() to wrap the - case where g_date_clamp() takes null values. - -2004-01-18 Alberto Paro - - * glib/src/date.hg: documentated Glib::Date functions. - * glib/glibmm/main.h: documentated Glib::MainLoop,Glib::MainContext - and Glib::Source functions. - -2004-01-18 Murray Cumming - - * tools/pm/Output.pm, tools/m4/property.m4: When the property is not - read-only, add a second read-only propertyproxy for the same property, - with a const accessor. This allows setting of properties in const - methods. Make all read-only propertyproxies have const accessors. - * glib/glibmm/propertyproxy.h: Added class documentation. - * tools/pm/Output.pm: Declare _vfuncs as virtual methods - fixing - an error in my last change. - -2004-01-16 Murray Cumming - - * tools/pm/Output.pm, tools/m4/vfunc.m4: - - Generate const vfuncs when requested with _WRAP_VFUNC(). - - Put the *_vfunc() decleraration directly into the header, where - the _WRAP_VFUNC() macro appears, instead of in a separate section. - This allows us to add doxygen documentation before the _WRAP_VFUNC() - in the .hg file. However, we must check that all of our _WRAP_VFUNC() - macros are in protected: sections. - -2004-01-12 Murray Cumming - - * glib/glibmm/object.cc: Object::Object() default constructor. - Remove the warning because we really need this to implement a custom - TreeModel. Derive a new GType, as in the - Object::Object(ConstructParams) constructor. Like that constructor, - the default one also assumes that you have called a suitable - ObjectBase constructor, such as ObejctBase(typeid(MyCustomClass)). - -2004-01-09 Murray Cumming - - * tools/pm/Output.pm: output_wrap_property(): Allow construct-only - properties to be wrapped, as read-only properties. - -2004-01-03 Murray Cumming - - * tools/gmmproc.in, pm/WrapParser.pm, DocsParser.pm: Removed the - mergecdocs option - because we always want to merge C docs, to avoid - accidental upload of half-complete docs. - -2003-12-29 Murray Cumming - - * Makefile.am: Add scripts and tests directories to SUBDIRS instead of - DIST_SUBDIRS, so that their Makefile.am files are actually used. - * scripts/macros.m4: renamed GTKMM_CHECK_PERL() to GLIBMM_CHECK_PERL() - and install it as glibmm_check_perl.m4, so that other *mm projects - can use it. They need the PERL_PATH for Doxygen. - -2003-12-22 Murray Cumming - - * docs/reference: generate beautify_docs.pl from beautify_docs.pl.in, - so it can have the perl path in it. Install it, so other *mm - modules can use it. - -2003-12-13 Murray Cumming - - * tools/m4/*.m4: Added fuller Doxygen documentation to all gobj() and - wrap() methods. Doxygen should not emit warnings about these now. - -2.3.2: - -2003-11-29 Murray Cumming - - * tools/m4/signal.m4: Add spaces inside signal_proxy template types, - to avoid << and >> when using templated types. - -2003-11-27 Murray Cumming - - * tools/pm/WrapParser.pm, Output.pm: Added WRAP_METHOD_DOCS_ONLY() - macro. - * docs/internal/using_gmmproc.txt: Explained the new macro. - -2003-11-02 Murray Cumming - - * glib/glibmm/: Added init.[h|cc] with Glib::init() so that the - gnomemm init() methods do not need to initialize gtkmm. - * tools/m4/class_gobject.m4, class_gtkobject.m4: Added - _GMMPROC_PROTECTED_GCLASS macro, needed by libgnomecanvasmm. This - was not previously properly merged from gtkmm2. - * tools/m4/property.m4: Re-added PropertyProxy reference documentation - that did not survive a previous merge from gtkmm2. - -2003-11-01 Murray Cumming - - * glib/glibmm/propertyproxy.h, propertyproxy_base.[h|cc]: Now uses - ObjectBase instead of Object, because glib can now have properties - on interfaces. This is needed, for instance, by the GtkFileChooser - interface wrapper in gtkmm. - * glib/glibmm/object.h: Moved get/set_property() methods into - ObjectBase, for the same reason. - * tools/pm/WrapParser.pm, Output.pm: Added optional no_default_handler - parameter to gmmproc _WRAP_SIGNAL() macro, for signals whose - default signal handler is not in the klass struct and therefore - can not be overridden. - -2003-10-31 Murray Cumming - - * docs/Makefile_web.am_fragment: Corrected install location, - so that links from the gtkmm docs work when they are installed. - -2003-10-30 Murray Cumming - - * docs: Added images directory, copied from gtkmm, for the reference - html docs. - * configure.in: Mention docs/images/Makefile. - * docs/reference/Doxyfile.in: Genereate glibmm_doxygen_tags instead - of gtkmm_doxygen_tags. - * docs/reference/Makefile.am: dist glibmm_doxygen_tags. - * docs/reference: gtkmm*.html_fragment are now glibmm*.html_fragment. - -2.3.1: - -2003-10-23 Murray Cumming - - * tools/pm/Output.pm: output_wrap_create(): Used - args_types_and_names_with_default_values() intead of - args_types_and_names(), so that create() functions .in .h files have - the default values as specified in _WRAP_CREATE() in .hg files. - * tools/pm/WrapParser.pm: on_ignore_signals(): Strip the quotes, to - make _IGNORE_SIGNAL() really work in .hg files. - -2003-10-02 J. Abelardo Gutierrez - - * examples/threads/dispatcher.cc - examples/threads/dispatcher2.cc: fixed to cast out all gktmm code, - now they only need glimm. - * configure.in: Added examples/threads because they don't use gtkmm - anymore. Now all examples/threads compiles and run just fine. - -2.3.0: - -2003-09-30 Murray Cumming - - * configure.in: Removed examples/threads because we don't build or - distribute it, because it doesn't build, because it uses gtkmm. - -2003-09-30 Murray Cumming - - * glib/glibmm/object_base.h: ObjectBase inherits virtually from - Sigc::Object. See bug #116280. - -2003-09-27 Cedric Gustin - - * glib/glibmm/threadpool.cc: Removed - _GTKMMPROC_SIGNAL_H_AND_CC(#ifndef G_OS_WIN32) restrictions. These - functions are now implemented in the latest (2.2.4) GTK+ on win32. - * README.win32 : Updated list of unsupported functions. - -2003-08-20 Frank Naumann - - * glib/src/thread.hg, - glib/src/unicode.hg: Warning bugfix for VisualStudio .NET 2003; - made wrapper functions returning bool from glib functions - returning int (C lacks builtin type bool) explicit by adding - an != 0 check. Otherwise VisualStudio .NET warn about implicit - int -> bool cast. - -2003-07-26 Murray Cumming - - * glib/glibmm/dispatcher.cc: Added #include , needed - by MSVC++, as suggested by Frank Naumann in bug #118215. - -2003-05-31 Murray Cumming - - * tools/gmmproc.in: Corrected location of installed .pm files. They - are now in a glibmm-2.3 folder instead of a glibmm-2.4 folder. - -2003-05-14 Murray Cumming - - * Applied some of MSVC++ .NET 2003 changes from jburris. For instance, - use of Gtk:: prefix with manage, because MSVC++ can not guess it. Also - corrected the out-of-sync protected/private modifiers in the private - gtype classes and their prototypes. - -2003-05-09 Cedric Gustin - - * glib/glibmm/dispatcher.cc: small typo in G_OS_WIN32 condition. - -2003-05-07 Murray Cumming - - * scripts/macros.m4: Made the --enable-debug-refcounting configure - option set GLIBMM_* instead of GTKMM_*. - -2003-05-02 Murray Cumming - - * tools/m4/*.m4: Added doxygen comments to gobj() methods. - * examples/markup/parser.cc: Commented-out a std::right that gcc 2.93 - does not like. - -2003-04-23 Andrew Makeev - - * glib/glibmm/dispatcher.cc: Added some #ifdefed code to implement - Glib::Dispatcher on WIN32. See comments with the code. - -2003-04-22 Murray Cumming - - * Install headers in a glibmm-2.3 directory instead of glibmm-2.4, - to be consistent with gtkmm 2.4. - -2003-04-21 Murray Cumming - - * arrayhandle.h, listhandle, slisthandle.h: - Glib::ListHandle, Glib::ListHandle, Glib::SListHandle: Added - reference docs explaining that people can use STL containers. - -2003-04-21 Murray Cumming - - * Removed examples/idle: It's now updated and in gtkmm/examples/book. - -2003-04-19 Murray Cumming - - * tools/pm/GtkDefs.pm: get_unwrapped(): Changed some & to && to - avoid warnings and because that is probably what they should be. - - * tools/m4/extra_defs_gen/generate_defs_glib.cc: Removed parameter - names from main(), because they are not used. Avoid warning. - -2003-03-26 Ross Burton - - * glib/src/module.hg: Added API documentation. - -2003-03-18 Enrico Scholz - - * scripts/*.m4, configure.in: - Added description to several AC_DEFINE statements to make 'autoheader' - happy - * Makefile.am: - Added ACLOCAL_AMFLAGS to make 'autoreconf' work - -2003-03-18 Cedric Gustin - - * Makefile.am : removed examples from DIST_SUBDIRS - -2003-03-18 Enrico Scholz - - * examples/Makefile.am_fragment: Added DESTDIR-support. - -2003-03-14 Cedric Gustin - - * Install examples. The are built by default too. Patch adapted for - glibmm 2.4 by Murray Cumming. - -2003-03-04 Cedric Gustin - - * configure.in : Removed libstdc++ in LDFLAGS on win32. Latest - libtool is taking care of it. - * build_shared/Makefile_build.am_fragment, - tools/extra_defs_gen/Makefile.am : Added - --export-all-symbols linker flag on win32 (required by latest - libtool to build DLLs). - * build_shared/Makefile_gensrc.am_fragment : Modifiy rule that - builds wrap_init.cc. wrap_init.cc now contains reference to all - objects, event on win32. #ifdefs are included when needed. - * README.win32 : updated for version 2.2. Added list of missing - methods and signals on win32 - * tools/m4/base.m4 : Added _GTKMMPROC_SIGNAL_H_AND_CC macro. - - -2003-03-14 Martin Schulze - - * docs/internal/using_gtkmmproc.txt: Correct name of - [...]signals.defs generation utiliy. - -2003-01-30 Rick L Vinyard Jr - - * glib/src/thread.hg Cond: Add documentation - -2003-01-27 Murray Cumming - - * glib/glibmm/refptr.h: Removed RefPtr<>::is_null() to encourage use - of more pointer-like operator bool() instead. Wanted to remove clear() - too, but there is no =0 equivalent yet. - * tools/gmmproc.in: Change harcoded gtkmm-2.0/m4 path to glibmm-2.4/m4. - -2003-01-22 Murray Cumming - - * GTKMM_ m4 tests and #defines are now prefixed with GLIBMM_ - -2003-01-21 Murray Cumming - - * tests/Makefile.am_fragment, examples/Makefile.am_fragment: - Corrected LIBS and CFLAGS. Not all of these build because they - use gtkmm stuff too. They need to be reduced to glibmm-only code. - -2003-01-21 Murray Cumming - - * glib/Makefile.am, glib/glibmm/Makefile.am: Install headers in - glibmm-2.4 directory rather than gtkmm-2.4 - -2003-01-21 Murray Cumming - - * configure.in: Use GLIBMM_* instead of GTKMM_* to avoid config.h - clashes with gtkmm 2.4. - * glib/glibmm-2.4.pc.in: Correct cflags - report 2.4 instead of 2.0. - -2003-01-21 Murray Cumming - - * tools/extra_defs_gen/Makefile.am: Changed extra_defs library name - from 2.4 to 2.3, so it can be unstable. - -2003-01-09 Daniel Elstner - - * glib/glibmm/utility.h (GLIBMM_INITIALIZE_STRUCT): Replace - __builtin_bzero() with __builtin_memset() because the former is - deprecated. Also, it looks like GCC is able to optimize the 0 case - so we don't lose anything here. - -2003-01-09 Daniel Elstner - - * glib/glibmm/miscutils.cc (Glib::build_path): Reserve 256 bytes - in advance to improve performance. - -2003-01-09 Daniel Elstner - - * glib/glibmm/miscutils.{cc,h} (Glib::build_path): Fix to make it - behave exactly like g_build_path(). (#102885, Jarek Dukat) - - (Glib::build_filename(const std::string&, const std::string&)): - Implement in terms of Glib::build_path(). - -2003-01-21 Murray Cumming - - * Renamed gtkmmproc to gmmproc. - -2003-01-08 Murray Cumming - - * glib/glibmm/refptr.h: Removed the operator=(CppObject*), as - suggested in the TODO comment. - -2003-01-08 Murray Cumming - - * make distcheck works. - -2003-01-08 Murray Cumming - - * It now builds, though I haven' tried installing it. The - library names and header directories should now all have 2.4 - instead of 2.0 in their name. - -glibmm was previously part of gtkmm2. - diff --git a/libs/glibmm2/INSTALL b/libs/glibmm2/INSTALL deleted file mode 100644 index 5458714e1e..0000000000 --- a/libs/glibmm2/INSTALL +++ /dev/null @@ -1,234 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/libs/glibmm2/Makefile.am b/libs/glibmm2/Makefile.am deleted file mode 100644 index 633050b5bf..0000000000 --- a/libs/glibmm2/Makefile.am +++ /dev/null @@ -1,64 +0,0 @@ -ACLOCAL_AMFLAGS = -I scripts - -SUBDIRS = tools glib scripts -DIST_SUBDIRS = $(SUBDIRS) - -EXTRA_DIST = build_shared/Makefile_build.am_fragment \ - build_shared/Makefile_build_gensrc.am_fragment \ - build_shared/Makefile_gensrc.am_fragment \ - build_shared/Makefile_gensrc_platform.am_fragment \ - build_shared/Makefile_build_extra.am_fragment \ - CHANGES README.win32 - - -all-local: - @echo "*** Everything completed ***" - -dist-hook: - @echo; echo; \ - echo "**********************************************************"; \ - echo "* IMPORTANT NOTICE: *"; \ - echo "* *"; \ - echo "* Be sure you have done a complete build before running *"; \ - echo "* 'make dist' or 'make distcheck', because otherwise *"; \ - echo "* the tarball will _not_ contain the dependency rules *"; \ - echo "* generated by the compiler. *"; \ - echo "**********************************************************"; \ - echo; echo - - -# include $(top_srcdir)/docs/Makefile_web.am_fragment - -doc_tarball_files = \ - docs/images/*.gif \ - docs/internal/*.txt docs/internal/*.dia docs/reference/html - -# This doesn't work very well in a $(srcdir) != $(builddir) setup, -# but this target is for maintainer use only anyway. - -glibmm-docs.tar.gz: - find examples -name '*.cc' -o -name '*.h' -o -name '*.xpm' -o -name '*.xml' | \ - tar cf - --files-from - $(doc_tarball_files) | gzip -c --best >$@ - -# Upload documentation and examples: - -post-html-recursive: - list='docs examples'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) post-html); \ - done - -post-html-local: glibmm-docs.tar.gz - rsync $(rsync_args) glibmm-docs.tar.gz $$USER@$(web_host):$(web_path_gtkmm) - -post-html: post-html-recursive post-html-local - -doc-clean-recursive: - (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-clean) - -doc-clean: doc-clean-recursive - -doc-rebuild: - (cd docs && $(MAKE) $(AM_MAKEFLAGS) doc-rebuild) - -.PHONY: post-html post-html-local post-html-recursive doc-clean doc-clean-recursive doc-rebuild - diff --git a/libs/glibmm2/NEWS b/libs/glibmm2/NEWS deleted file mode 100644 index c65cc36191..0000000000 --- a/libs/glibmm2/NEWS +++ /dev/null @@ -1,514 +0,0 @@ -2.14.2: - -* Build: Hopefully fix the build on NetBSD-4.99.6/amd64. - Bug #386990. (was already in 2.12.7) (Murray Cumming) -* gmmproc: Added support for the new _CONFIGINCLUDE() macro. - (Armin Burgmeier) - -2.14.1: - -* Glib::wrap(): Don't fail when wrapping an interface that - is implemented by an unrecognized type. - gmmproc-generated code now uses the new wrap_auto_interface(), - so newly-generated source code will require this latest glibmm - version. -* Increase version number check for glib. - (Rémi Cardona) - -2.14: - -Changes sinze 2.12: - -* New Regex class, allowing string searching with regular expressions. - (Murray Cumming, Daniel Elstner) -* New KeyFile class. - (Rob Page, Jonathan Jongsma, Murray Cumming) -* Main: Added SignalTimeout::connect_seconds(). - (Murray Cumming) -* OptionContext: Added get/set_summary(), get/set_description(), - set_translation_domain() and set_translate_func(). - (Jonathan Jongsma) -* Added Glib::get_user_special_dir(), get_user_data_dir(), - get_user_config_dir(), and get_user_cache_dir(). - (Jonathan Jongsma, Murray Cumming) -* Improved documentation. - (Johannes Schmid, Jonathan Jongsma, Ralf Stephan) - -2.14.0: - -* Regex: - - Add escape_string(). - - match_full(): Rename to match(). - - match_all_full(): Rename to match_all(). - - split_full(): Rename to split(). - -2.13.9: - -* KeyFile: Added Added get_double(), set_double(), get_double_list() - and set_double_list(). - (Murray Cumming) - -2.13.8: - -* OptionContext: Added get/set_summary(), get/set_description(), set_translation_domain(), - and set_translate_func(). - (Jonathon Jongsma) -* Documenation: - Added RegEx class documentation. (Johannes Schmid) - Show new API in 2.14. - -2.13.7: - -* Regex: Added a create() method and added default parameter values. - Added a simple example. -* Added SignalTimeout::connect_seconds(), in addition to the existing - SignalTimeout::connect(), as a wrapper of g_timeout_add_seconds(). - Improveed the documentation. -* Added get_user_special_dir(). - (Murray Cumming) - -2.13.6: - -* Added Glib::Regex, an API for doing regular expression search/matching. - This is not fully wrapped yet, but the simple versions of the API are there. - We need to write an example for this. - (Murray Cumming) - -2.13.5: - -* Correctly ifdef-out initialization of deprecated classes. - (Johannes Schmid, Openismus) -* Build: Cope with newer m4 versions. (Yselkowitz) - -2.13.4: - -* Correct initialization when using --disable-deprecated for reduced code-size - on embedded devices. (Johannes Schmid, Openismus) -* Glib::ObjectBase::is_derived_() is now public, though it is still only for - internal use. This allows us to do some optimization of default signal handlers and - vfuncs. - (Armin Burgmeier, Openismus) -* Options: Don't overwrite default arguments. This change was lost in - March 2006, but now it is back. - (Armin Burgmeier) -* Dispatcher: Several minor implementation improvements. (Daniel Elstner) -* ustring: Minor improvements. (Daniel Elstner) -* Documentation: Actually use the signals documentation again. - (Armin Burgmeier, Openismus) -* Build: - - Fix code generation when using the latest m4, and functions named - mkstemp, as experienced on Ubuntu Feisty. - Bug #397167 (Dodji Seketeli, Daniel Elstner) - - helperlist.h: Avoid warnings about a shadowed member. - Bug #420316 from Bradley Bell. - - utility.h: Avoid a warning about a redundant declaration. - Bug #420339 from Bradley Bell. - -2.13.3: - - -* Glib::ObjectBase::is_derived_() is now public, though it is still only for - internal use. This allows us to do some optimization of default signal handlers and - vfuncs. - (Armin Burgmeier, Openismus) -* Build: - - helperlist.h: Avoid warnings about a shadowed member. - Bug #420316 from Bradley Bell. - - utility.h: Avoid a warning about a redundant declaration. - Bug #420339 from Bradley Bell. -* gmmproc improvements: - - gmmproc: Allow () in property and signal docuemntation. - - gmmproc: Do not try to remove a common prefix from the - C enam values, if there is no common prefix. - - enum.pl: Allow whitespace in front of an enum typedef. - (Daniel Elstner) - - enum.pl: Fix an infinite loop. -* ObjectBase: Added connect_property_changed(), - as an alternative to use when the property proxies are not - available because GLIBMM_PROPERTIES_ENABLED is not defined. - (Murray Cumming) -* Value: When registering float parameters, use - G_MAXFLOAT as the minimum, instead of G_MINFLOAT. - Likewise for doubles. - (Oliver Nittka) - -2.13.2: - -*Build: - - Fix for api-default-signal-handlers option. - Bug #357830 (Matt Hoosier) - - win32: Remove unused source file from Visual Studio project. - (Cedric Gustin) - -2.13.1: - -* KeyFile class added, wrapping GKeyFile, - for parsing of .ini-style files. - (Rob Page) -* Added get_user_data_dir(), get_user_config_dir(), and - get_user_cache_dir(). - (Jonathon Jongsma) -* Support optional ifdef parameters in the .hg macros, - to allow, for instance the --enable-atk=no option, - to disable the build and use of the atkmm API, - for use in embedded environments. - (Johannes Schimd, Murray Cuming, Openismus) -* Documentation: - - Small ustring reference documentation improvement. - (Ralf Stephan) - -2.12.0: - -Changes sinze 2.10: -* Added the --enable-api-default-signal-handlers option, for use in - embedded environments that have reduced resources. See configure --help - for the other subsets. -* Value: Added init(const GValue*), so we can copy GValue instances - of any type at runtime. Needed by the new branch of libgdamm. - -2.11.3: - -* Build: Added the --enable-api-default-signal-handlers option, for use in - embedded environments that have reduced resources. See configure --help - for the other subsets. - -2.11.2: - -* Date: Fix implementation of Glib::Date::set_time_current() so - that it doesn't set the date to Dec 31, 1969. - (Jonathon Jongsma) -* Value: Added init(const GValue*), so we can copy GValue instances - of any type at runtime. Needed by the new branch of libgdamm. - (Murray Cumming) -* Added a #warning to warn about including X11/Xlib.h before a glibmm header, - which would break things. Bug #316726 from Mert Tugcu and Javeed Shaikh. - (Murray Cumming) -* Build: - - Quote some m4 macros to avoid warnings. Bugs (with patches) #347076 - and #347077 - (Kevin McBride). - - Fix exporting of get/set_property() on mingw32-gcc. - (Cedric Gustin) - - - - -2.10.1 - -* Windows Build: - - Define GLIBMM_DLL when building with mingw32 or cygwin, - because it is needed by gtkmm. Bug #309030 - (Cedric Gustin) -* OptionGroup: Allow default values, by not initializing them all. - (Armin Burgmeier) -* Slight code size reduction by marking private functions as static. - (Murray Cumming) - -2.10.0: - -* Windows Build: - - ustring.h: Tag npos with GLIBMM_API, in order to - dllexport it on win32. Bug #332438. - - Updated MSVC++ build files and README, for MS Visual Studio 2005. - (Cedric Gustin) -* gmmproc code generator: - - WRAP_METHOD() Take an extra optional argument: deprecated deprecationtext - - so that we can insert the appropriate doxygen tag in the documentation, where - the C documentation does not do it for us. - -2.9.1: - -* Date: - - Added set_time(time_t), set_time(GTimeVal), and deprecated - set_time(GTime) - - Added set_time_current(). - (Murray Cumming) -* Build: Added --enable-deprecated-api option. When set to disabled, - it does not build deprecated API. This reduces the size of the - library, and might be useful for embedded devices. - (Murray Cumming) - -2.8.2: - -* Solaris build fix: Correct the detection - of make. (Mark Rouchal) - -2.8.1: - -* Build: Check for glib 2.8. - -2.8.0: - -API additions since glibmm 2.6: - -* GModule: Add BIND_LOCAL enum value. - (Bug #172748 from Phillip Neiswanger). -* MainContext Added signal_child_watch() - and examples/child_watch. - (Yair Hershkovitz) -* OptionEntry: Added FLAG_NO_ARG, FLAG_FILENAME, - FLAG_OPTIONAL_ARG, and FLAG_NOALIAS enum values. - (Murray Cumming) - -2.7.3: - -* Updated reference documentation from glib documentation. - -2.7.2: - -* OptionEntry: Added FLAG_NO_ARG, FLAG_FILENAME, - FLAG_OPTIONAL_ARG, and FLAG_NOALIAS enum values. -* build_filename() and build_path(): Now use the implementation - from glib. - -2.7.1: - -* GModule: Add BIND_LOCAL enum value. - (Bug #172748 from Phillip Neiswanger). -* MainContext Added signal_child_watch() - and examples/child_watch. - (Yair Hershkovitz) -* Fixes from 2.6.2. - -2.6.1: - -* Interface::add_interface(): Disabled the check for a second call, - introduced in 2.6.0, for now, because it stops some valid uses. - (Bryan Forbes) - -2.6.0: - -New stable version. Changes compare to glibmm 2.4.x: - -* Added Option, OptionContext, OptionGroup for parsing of command-line arguments. -* Added filename_display_basename() and filename_display_name(). -* Added setenv() and unsetenv(). -* add_interface() methods will no longer give warnings if you - call them twice. -* gmmproc: - - Now reuses C properties documentation. - -2.5.6: - -* add_interface() methods will no longer give warnings if you -call them twice. -* gmmproc: Output properties documentation taken from the .defs. -* examples now build on AIX. - (Murray Cumming) -* MSVC++ .Net 2003 build fix. (Cedric Gustin) - -2.5.5: - -* Now builds with the following compilers, in addition to -the existing GNU g++, and Intel compilers: -- SUN Forte CC 5.5 -- IBM AIX xlC v7 -- Tru64 C++ V6.5-042 -- IRIX MIPSpro 7.4.2m - (Older versions of all these compilers might also work.) - (Murray Cumming, www.thewrittenword.com) -* Now builds with MSVC++ .Net 2003 (gtkmm 2.4 already did). - (Cedric Gustin) - -2.5.4: - -Options: -* Added Option(GOptionGroup* cast_item) constructor, - needed by Gtk::Main. -* Added reference documentation. -(Murray Cumming) - -2.5.3: - -* Options: - - Allow parsing of boolean arguments (arguments with no value). - - Really use the short names. - (Daniel Holbach, Murray Cumming) -* Added filename_display_basename() and filename_display_name(). - (Murray Cumming) -* Added setenv() and unsetenv(). (Murray Cumming) -* Use static keyword to prevent exporting private API. - (Benoît Dejean) -* input example: Improvements and simplification. (Chris Vine) - -2.5.2: - -* OptionEntry: Remove useless enum. (Murray Cumming) -* Documentation: - - examples: Added iochannel_stream example. (Chris Vine) - - reference: Generate more reference API from the C documentation, and - try to use the libstdc++ doxygen tags file to link to their - documentation. (Murray Cumming) - -2.5.1: - -* OptionContext, OptionGroup, OptionEntry: Made the add_entry() methods - type-safe and fixed several problems memory-management problems. This - API is now worth looking at. - -2.5.0: - -* Added OptionContext, OptionGroup, and OptionEntry classes, for - parsing of command-line options. See examples/options/ - -2.4.4: - -* Signals: Avoid crashes when disconnecting a signal when handling that signal. - (Murray Cumming, Martin Schulze) -* -2.4.3: - -* Minor improvements to reference documentation. (Daniel Elstner) -* Minor Glib::Dispatcher improvements (Daniel Elstner) - -2.4.2: - -* Glib::Dispatcher: win32 implementation rewritten, and hopefully, improved. - (Daniel Elstner) -* Glib::ustring: - - Optimization and code-cleanup. (Daniel Elstner) - - Added reference documentation for constuctors. (Murray Cumming) -* Fixed some compiler warnings. - (Daniel Elstner) -* gmmproc: Some improvements for libgdamm. (Murray Cumming) - - -2.4.1: - -* Build fixes for gcc 3.4.0. -* Doxygen not required when building from tarballs. - (Murray Cumming) - - -2.4.0: - -Changes since 2.2.0: - -* Now separate from gtkmm, so you can use things like Glib::ustring without depending on gtkmm. This glibmm 2.4 API installs in parallel with gtkmm 2.0/2.2, so you can install applications which use either. -* When using pkg-config, you should check for "glibmm-2.4". -* Glib::ObjectBase inherits virtually from SigC::Object, allowing multiple inheritance with other classes that inherit from SigC::Object. -* RefPtr: - - is_null() was removed, to encourage you to use "== 0" instead. - - operator=(CppObject*) was removed. -* The gtkmmproc code-generator is now gmmproc, and has several improvements to support gtkmm 2.4. -* Now uses improved libsigc++ 2.0 API. -* Added i18n.h and i18n-lib.h, which include the relevant - glib headers, which declare internationalization - macros such as _(). -* New methods: - Glib::spawn_close_id(), Glib::MainLoop::depth(), - Glib::Date::clamp_min(), Glib::Date::clamp_max(). -* Improved documentation. - - -2.3.8: - -* Fix crash when using Glib::Main signals. - (Martin Schulze) -* Corrected the configure-time SUN compiler check. - (Murray Cumming, Alexander Nedotsukov) - -2.3.7: - -* Added configure macros to detect SUN compiler oddities. -* Various SUN Forte C+ and g++ 3.4 (cvs) build fixes. - (Murray Cumming) -* gmmproc: Improved parsing of C docs. - (Hagen Moebius) - -2.3.6: - -* Added i18n.h and i18n-lib.h, which include the relevant - glib headers, which declare internationalization - macros such as _(). (Murray Cumming) -* Added Glib::spawn_close_id(). (Murray Cumming) -* Added Glib::MainLoop::depth(). (Murray Cumming) -* Documentation: corrections to CHANGES (Martin Schulze). -* gmmproc: Can now handle "const const_iterator& iter" - parameter names without getting confused by 2 consts. - (Murray Cumming) - -2.3.5: - -* glibmm now uses libsigc++ 2 rather than libsigc++ 1.2. - -2.3.4: - -* ListHandle/SListHandle (intermediate container types): - - Added a const_cast<> to allow lists of const elements. -* gmmproc: _WRAP_SIGNAL(): Added optional custom_c_callback - parameter. - (Murray Cumming) -* WIN32: Build fixes, mostly merged from the 2.2 branch. - (Cedric Gustin) - -2.3.3: - -* gmmproc (code generator) - - properties: Make read-only properties have const accessors, - and add a second read-only const accessor for normal - properties. Wrap construct-only properties as read-only, - instead of ignoring them. - - vfuncs: Really generate const vfuncs when requested. Put - the method declaration directly into the .h file, so that - the doxygen documentation can be next to it. - - documentation: - - Remove mergecdocs configure option - always - merge the C docs, to avoid any risk of uploading or - releasing empty documentation. Just delete the *_docs.xml - files to make building from cvs faster. - - Install a GLIBMM_CHECK_PERL() macro, for use by gtkmm - and other *mm projects, to get the perl path needed by - doxygen. - - Install beautify_docs.pl so it can be reused in gtkmm - and other *mm projects, instead of having lots of copies. -* Glib::ObjectBase: The default constructor, never before used, - now generates a custom GType, for use when creating new - implementations of Glib::Interfaces - for instance, see the - new custom tree model example in gtkmm. -* Glib::Date: Added clamp_min() and clamp_max(). - (Murray Cumming) - -* Documentation: - - Added reference documentation for MainLoop, MainContext, - Source, and Date. (Alberto Paro) - -2.3.2: - -* gmmproc (code generator): - - signal proxies have extra space to avoid << with templates. - - Added WRAP_METHOD_DOCS_ONLY() for reusing documentation even - when the method is hand-coded. - - _WRAP_SIGNAL(): Added optional no_default_handler parameter, - because some of the new GTK+ signals have no public default - handler vfunc. -* Added Glib::init(), for use by non-GUI apps which need to - use Glib::wrap(). -* PropertyProxy: Can now be used with Interfaces. -* Documentation improvements, so that gtkmm docs link to glibmm - docs. - (Murray Cumming) - -2.3.1: - -* gmmproc changes needed by gtkmm 2.3.0 - (Murray Cumming) -* examples updated and buildable and working, - without gtkmm code. - (J. Abelardo Gutierrez) - -Changes in glibmm 2.3.0: - -* Now separate from gtkmm, so you can use things like Glib::ustring without depending on gtkmm. - This glibmm 2.4 API installs in parallel with gtkmm 2.0/2.2, so you can install this unstable library - without the risk of breaking existing application. -* This does not yet require glib 2.3 because there has been no tarball release of that yet. For now, you - can use glibmm 2.3.0 with glib 2.2.x. -* When using pkg-config, you should check for "glibmm-2.4". -* Glib::ObjectBase inherits virtually from SigC::Object, allowing multiple inheritance with other - classes that inherit from SigC::Object. -* RefPtr: - - is_null() was removed, to encourage you to use "== 0" instead. - - operator=(CppObject*) was removed. -* gtkmmproc is now gmmproc. -* All the glibmm bugfixes in gtkmm 2.2.x. diff --git a/libs/glibmm2/README b/libs/glibmm2/README deleted file mode 100644 index 8b13789179..0000000000 --- a/libs/glibmm2/README +++ /dev/null @@ -1 +0,0 @@ - diff --git a/libs/glibmm2/README.win32 b/libs/glibmm2/README.win32 deleted file mode 100644 index 9fb2921bed..0000000000 --- a/libs/glibmm2/README.win32 +++ /dev/null @@ -1,65 +0,0 @@ -Building glibmm on Win32 -=========================== - -Currently, both the mingw (native win32) gcc compiler and MS Visual -Studio 2005 are supported. glibmm can be built with mingw32-gcc using -the gnu autotools (automake, autoconf, libtool). As explicitly stated -in the gtk+ for win32 distribution (http://www.gimp.org/win32/), the -gcc compiler provided by the cygwin distribution should not be used to -build glib/glibmm libraries and/or applications (see the README.win32 -that comes with the gtk+ DLLs). This MIGHT cause conflicts between the -cygwin and msvcrt runtime environments. - -1. Mingw - -The mingw distribution which has been tested with this release is the -following : - -* MinGW-4.1 as the base distribution. - -The bare mingw distribution does not provide the necessary tools (sh, perl, m4 -, autoconf, automake, ..) to run the provided configure script "as is". One -(currently non supported) solution is to use mingw in conjunction with msys, -which is readily available on the mingw website (http://www.mingw.org/). - -The preferred method is to combine the cygwin distribution (for the unix tools -that were mentioned above) with mingw by making sure that the mingw -tools (gcc, ld, dlltool, ..) are called first. - -First, make sure that you have working distribution of the native port -of both libsigc++-2.0.x and glib-2.0 on win32 (see -http://www.gimp.org/win32). If you can't compile a simple glib example -using gcc and `pkg-config --cflags --libs`, you should not even think -about trying to compile glibmm, let alone using precompiled libglibmm -DLLs to port your glibmm application ! - -The configure script can then be called using (as an example) the -following options - -./configure --prefix=/target --build=i386-pc-mingw32 --disable-static - -then - -make -make check -make install - -2. MS Visual Studio 2005 - -Open the glibmm.sln solution file in the MSVC_Net2003 directory. In -the Tools/Options panel, add the appropriate GTK+ include and lib -directories to the Projects and Solutions/VC++ directories. Build the -solution. - -Important NOTE : to circumvent the C++ compiler bug described in this -bugzilla entry (http://bugzilla.gnome.org/show_bug.cgi?id=158040), it -is necessary to add '/vd2' to the list of compiler options when -building and/or using glibmm with Visual Studio 2005. - -glibmm-2.8 will probably not work correctly with Visual Studio 7.1 or -below because of the aforementioned bug. - -3. Glibmm methods and signals not available on win32 - -All glibmm methods and signals are available on win32. - diff --git a/libs/glibmm2/SConscript b/libs/glibmm2/SConscript deleted file mode 100644 index 66434396a3..0000000000 --- a/libs/glibmm2/SConscript +++ /dev/null @@ -1,50 +0,0 @@ -# -*- python -*- - -import os -import os.path -import glob - - -glibmm2_files = glob.glob('glib/glibmm/*.cc') - -Import('env libraries install_prefix') - -glibmm2 = env.Copy() -glibmm2.Merge([libraries['sigc2'], libraries['glib2']]) -glibmm2.Append(LIBPATH='#libs/glibmm2', - CPPPATH='#libs/glibmm2/glib') - -glibmm2.Append(CXXFLAGS=['-DHAVE_CONFIG_H', '-DGLIBMM_EXCEPTIONS_ENABLED', '-DGLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED', '-DGLIBMM_PROPERTIES_ENABLED']) -#glibmm2.Append(CXXFLAGS='-DG_DISABLE_DEPRECATED') -glibmm2.Append(CXXFLAGS='-DG_LOG_DOMAIN=\\\"glibmm\\\"') - -libglibmm2 = glibmm2.SharedLibrary('glibmm2', glibmm2_files) - -if os.access ('autogen.sh', os.F_OK) : - glibmm2_configure_script = glibmm2.Command ('configure', 'configure.in', 'cd libs/glibmm2; ./autogen.sh; cd -', ENV=os.environ) - glibmm2_config_h = glibmm2.Command('glib/glibmmconfig.h', [glibmm2_configure_script, 'glib/glibmmconfig.h.in'], - 'cd libs/glibmm2; ./configure || exit 1; cd -', ENV=os.environ) -else : - glibmm2_config_h = glibmm2.Command('glib/glibmmconfig.h', ['configure', 'glib/glibmmconfig.h.in'], - 'cd libs/glibmm2; ./configure || exit 1; cd -', ENV=os.environ) - -Default([glibmm2_config_h, libglibmm2]) - -env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour3'), libglibmm2)) - -env.Alias('tarball', env.Distribute (env['DISTTREE'], - [ 'SConscript', - 'configure', - 'Makefile.in', - 'glib/glibmm.h', - 'glib/glibmmconfig.h', - 'glib/glibmmconfig.h.in', - 'glib/glibmm-2.4.pc.in', - 'glib/glibmm/Makefile.in', - 'scripts' - ] + - glibmm2_files + - glob.glob('glib/glibmm/*.h') + - glob.glob('glib/glibmm/private/*.h') - )) - diff --git a/libs/glibmm2/aclocal.m4 b/libs/glibmm2/aclocal.m4 deleted file mode 100644 index a1d7330922..0000000000 --- a/libs/glibmm2/aclocal.m4 +++ /dev/null @@ -1,7727 +0,0 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.61],, -[m4_warning([this file was generated for autoconf 2.61. -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-*- - -# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_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. -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'] - -# 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 avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# 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_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -_LT_REQUIRED_DARWIN_CHECKS - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_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=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_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_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_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. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_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 -# -------------------------- -# Check for some things on darwin -AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - - 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. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - 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.[[0123]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) - # 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_AC_SYS_LIBPATH_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. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_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_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_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. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${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 </dev/null 2>&1 && unset CDPATH - -if test -z "$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 && - echo_test_string=`eval $cmd` && - (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. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_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*|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*) - 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_TRY_LINK([],[],[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* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$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 - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_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 - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# 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*) - # 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 - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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 -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_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 < -#endif - -#include - -#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 - -#ifdef __cplusplus -extern "C" void exit (int); -#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 ()); - - exit (status); -}] -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_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_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*) - 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_AC_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_AC_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 -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_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_AC_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 .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_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 -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_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 -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[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 -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -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" -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]) -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.so - # instead of lib.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*) - 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' - ;; - -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*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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' - 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*) - # 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}${versuffix}$shared_ext ${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 - # 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' - ;; - -netbsdelf*-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 - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_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=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 - ;; - -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 - export_dynamic_flag_spec='${wl}-Blargedynsym' - 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 - 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' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - 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' - ;; - -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 - -AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], -[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], -[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -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 -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_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="ifelse([$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 <&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 - -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 -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_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 - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_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]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])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 &1 /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 - ;; - -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* | netbsdelf*-gnu) - 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=unknown - ;; - -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 - ;; - -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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - 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 -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible 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 - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[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_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([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 -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[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_AC_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_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# 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]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= -_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_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(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_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 - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - if test "$GXX" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_AC_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_AC_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}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_AC_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_AC_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 - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_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 $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - 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_AC_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_AC_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 $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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' - - # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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 $templist | $SED "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 $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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. - # 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. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -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 -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([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. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -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... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_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_AC_TAGVAR(objext, $1)=$objext - -# 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_AC_SYS_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" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -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_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_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_AC_SYS_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" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_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_AC_SYS_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" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then 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 -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # 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 - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# 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//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# 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 - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# 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 - -# 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 - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# 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 - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# 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 - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# 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 - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# 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 - -# 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=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\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 -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# 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]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - 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 - -# 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 - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, 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. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $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 < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -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_AC_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 -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # 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*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_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_AC_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_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_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' - ;; - linux* | k*bsd*-gnu) - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_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_AC_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= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` 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_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - fi - ;; - - amigaos*) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_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_AC_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' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_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 - _LT_AC_TAGVAR(link_all_deplibs, $1)=no - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - cat <&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. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_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_AC_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 - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_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_AC_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_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - 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_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_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 - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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*) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_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_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_AC_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_AC_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}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_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' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - -# 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. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_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]) -]) - -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - -# Copyright (C) 2002, 2003, 2005, 2006, 2007 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.10' -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.10.1], [], - [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 AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(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 -# 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_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 -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 -# 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 - -# 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 - 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 - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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 -# 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 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; 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 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 13 - -# 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.60])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) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -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 -]) -]) - - -# 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 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 -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -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 -# 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 - -AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) - 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 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 3 - -# 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 done -.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 -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -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 -# 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_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 -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# 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 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 3 - -# _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], -[AC_FOREACH([_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 -# 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_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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 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_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_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 /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 - -m4_include([scripts/c_std.m4]) -m4_include([scripts/cxx.m4]) -m4_include([scripts/cxx_std.m4]) -m4_include([scripts/docgen.m4]) -m4_include([scripts/glibmm_check_perl.m4]) -m4_include([scripts/macros.m4]) -m4_include([scripts/reduced.m4]) -m4_include([scripts/sun.m4]) diff --git a/libs/glibmm2/autogen.sh b/libs/glibmm2/autogen.sh deleted file mode 100755 index a9e02cb78a..0000000000 --- a/libs/glibmm2/autogen.sh +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh - -PKG_NAME=glibmm - -srcdir=`dirname $0` -test "x$srcdir" = x && srcdir=. - -origdir=`pwd` - -if test -f "$srcdir/configure.in" && \ - test -d "$srcdir/glib/src" && \ - test -d "$srcdir/glib/glibmm" -then :; else - echo "** Error **: Directory \`${srcdir}\' does not look like" - echo "the top-level ${PKG_NAME} directory." - exit 1 -fi - -MAKE=`which gnumake` -test -x "$MAKE" || MAKE=`which gmake` -test -x "$MAKE" || MAKE=`which make` - -if "$MAKE" --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>&1 -then :; else - echo "** Error **: You need GNU make to build gtkmm from CVS." - echo "${MAKE} is not GNU make." - exit 1 -fi - -echo "Found GNU make at ${MAKE}... good." - -cd "$srcdir" - -echo "Adding libtools." -libtoolize --automake || exit 1 - -echo "Building macros." -aclocal -I "$srcdir/scripts" $ACLOCAL_FLAGS || exit 1 - -#echo "Building config header." -#autoheader - -echo "Building makefiles." -automake --add-missing || exit 1 - -echo "Building configure." - -autoconf || exit 1 - - -enable_warnings= - -case "$*" in - *--enable-warnings*|*--disable-warnings*) - ;; - *) # enable -Werror by default when building with gcc3 - ${CXX:-"g++"} --version 2>/dev/null | grep '(GCC) 3\.[0-9]\+\.[0-9]' >/dev/null 2>&1 \ - && enable_warnings='--enable-warnings=hardcore' - ;; -esac - -cd "$origdir" -rm -f config.cache - -if test -z "$AUTOGEN_SUBDIR_MODE" -then - echo "Running $srcdir/configure --enable-maintainer-mode" $enable_warnings "$@" - "$srcdir/configure" --enable-maintainer-mode $enable_warnings "$@" || exit 1 - echo - echo 'run "make"' - echo -else - echo - echo 'run "./configure ; make"' - echo -fi - -exit 0 - diff --git a/libs/glibmm2/build_shared/Makefile_build.am_fragment b/libs/glibmm2/build_shared/Makefile_build.am_fragment deleted file mode 100644 index 95a39412e9..0000000000 --- a/libs/glibmm2/build_shared/Makefile_build.am_fragment +++ /dev/null @@ -1,71 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## sublib_name = glibmm -## sublib_cflags = $(GLIBMM_CFLAGS) -## files_built_*_cc = -## files_built_*_h = proxy.h -## files_extra_cc = array.cc class.cc closure.cc -## files_extra_h = array.h boxedtype.h class.h -## files_extra_all_cc = array.cc class.cc closure.cc -## files_extra_all_h = array.h boxedtype.h class.h -## -## Returned variable: Usage example: -## -## files_all_*_cc libglibmm_la_SOURCES = $(files_all_*_cc) -## common_ldflags libglibmm_la_LDFLAGS = $(common_ldflags) - -files_all_general_cc = $(files_built_general_cc) $(files_extra_cc) -files_all_posix_cc = $(files_built_posix_cc) -files_all_win32_cc = $(files_built_win32_cc) - -# Support for DLL on mingw using libtool > 1.4 -# When creating DLLs on win32, we need to explicitly add a few extra -# libraries at link time to resolve symbols (remember a dll is like an -# executable). -if PLATFORM_WIN32 -extra_win32_defines = \ - -D$(shell echo $(sublib_name) | tr [:lower:] [:upper:])_BUILD -no_undefined = -no-undefined -Wl,--export-all-symbols -win32_dlls_extra_libs = $(sublib_win32_dlls_libs) -else -extra_win32_defines = -no_undefined = -win32_dlls_extra_libs = -endif - -common_ldflags = -version-info $(LIBGLIBMM_SO_VERSION) $(no_undefined) - -all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \ - $(sublib_cflags) $(GTHREAD_CFLAGS) - -extra_defines = -DG_LOG_DOMAIN=\"$(sublib_name)\" $(extra_win32_defines) \ - $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS) - -dist_sources = $(files_built_all_cc) $(files_extra_all_cc) \ - $(files_built_all_h) $(files_extra_all_h) -DISTFILES = $(DIST_COMMON) $(dist_sources) $(TEXINFOS) $(EXTRA_DIST) - -DEFS = @DEFS@ $(strip $(extra_defines)) -DEFAULT_INCLUDES = -INCLUDES = $(strip $(all_includes)) - -sublib_includedir = $(includedir)/$(sublib_libname)/$(sublib_name) -if OS_WIN32 -sublib_include_HEADERS = $(files_built_general_h) \ - $(files_built_win32_h) \ - $(files_extra_h) -else -sublib_include_HEADERS = $(files_built_general_h) \ - $(files_built_posix_h) \ - $(files_extra_h) -endif - -maintainer-clean-local: - (cd $(srcdir) && rm -f $(files_built_all_cc) $(files_built_all_h)) - diff --git a/libs/glibmm2/build_shared/Makefile_build_extra.am_fragment b/libs/glibmm2/build_shared/Makefile_build_extra.am_fragment deleted file mode 100644 index b2a2c2e98f..0000000000 --- a/libs/glibmm2/build_shared/Makefile_build_extra.am_fragment +++ /dev/null @@ -1,40 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## sublib_name = gtkmm -## sublib_cflags = $(GTKMM_CFLAGS) -## sublib_files_extra_*_cc = stock_id.cc -## sublib_files_extra_*_h = stock_id.h -## -## Returned variable: Usage example: -## -## files_extra_cc libgtkmm_la_SOURCES = $(files_all_cc) -## files_extra_h libgtkmm_la_SOURCES = $(files_all_general_cc) -## files_extra_all_cc libgtkmm_la_SOURCES = $(files_all_posix_cc) -## files_extra_all_h libgtkmm_la_SOURCES = $(files_all_win32_cc) - -## The temporary sublib_ variables are needed to workaround -## a nasty automake problem with escaped newlines and +=. - -if OS_WIN32 -files_extra_cc_tmp = $(sublib_files_extra_general_cc) $(sublib_files_extra_win32_cc) -files_extra_h_tmp = $(sublib_files_extra_general_h) $(sublib_files_extra_win32_h) -else -files_extra_cc_tmp = $(sublib_files_extra_general_cc) $(sublib_files_extra_posix_cc) -files_extra_h_tmp = $(sublib_files_extra_general_h) $(sublib_files_extra_posix_h) -endif - -files_extra_cc = $(files_extra_cc_tmp) -files_extra_h = $(files_extra_h_tmp) - -files_extra_all_cc = $(sublib_files_extra_general_cc) $(sublib_files_extra_posix_cc) $(sublib_files_extra_win32_cc) -files_extra_all_h = $(sublib_files_extra_general_h) $(sublib_files_extra_posix_h) $(sublib_files_extra_win32_h) - -files_extra_h += wrap_init.h -files_extra_all_h += wrap_init.h - diff --git a/libs/glibmm2/build_shared/Makefile_build_gensrc.am_fragment b/libs/glibmm2/build_shared/Makefile_build_gensrc.am_fragment deleted file mode 100644 index 67bed45d78..0000000000 --- a/libs/glibmm2/build_shared/Makefile_build_gensrc.am_fragment +++ /dev/null @@ -1,66 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## sublib_name = gtkmm -## sublib_cflags = $(GTKMM_CFLAGS) -## files_extra_cc = stock_id.cc -## files_extra_h = base.h stock_id.h -## -## Returned variable: Usage example: -## -## files_all_general_cc libgtkmm_la_SOURCES = $(files_all_general_cc) -## files_all_posix_cc libgtkmm_la_SOURCES = $(files_all_posix_cc) -## files_all_win32_cc libgtkmm_la_SOURCES = $(files_all_win32_cc) -## common_ldflags libgtkmm_la_LDFLAGS = $(common_ldflags) - -include $(srcdir)/../src/Makefile_list_of_hg.am_fragment -include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment - -files_built_general_cc = $(files_general_hg:.hg=.cc) wrap_init.cc -files_built_general_h = $(files_general_hg:.hg=.h) -files_built_posix_cc = $(files_posix_hg:.hg=.cc) -files_built_posix_h = $(files_posix_hg:.hg=.h) -files_built_win32_cc = $(files_win32_hg:.hg=.cc) -files_built_win32_h = $(files_win32_hg:.hg=.h) - -files_built_all_cc = $(files_built_general_cc) \ - $(files_built_posix_cc) \ - $(files_built_win32_cc) -files_built_all_h = $(files_built_general_h) \ - $(files_built_posix_h) \ - $(files_built_win32_h) - -include $(top_srcdir)/build_shared/Makefile_build_extra.am_fragment -include $(top_srcdir)/build_shared/Makefile_build.am_fragment - -cvsignore: - ( \ - echo ".deps"; \ - echo ".libs"; \ - echo "*.la"; \ - echo "*.lo"; \ - echo "Makefile"; \ - echo "Makefile.in"; \ - echo; \ - list='$(strip $(files_built_all_cc) $(files_built_all_h))'; \ - for file in $$list; do \ - echo "$$file"; \ - done \ - ) >$(srcdir)/.cvsignore - ( \ - echo "Makefile"; \ - echo "Makefile.in"; \ - echo; \ - list='$(strip $(files_all_hg:.hg=_p.h))'; \ - for file in $$list; do \ - echo "$$file"; \ - done \ - ) >$(srcdir)/private/.cvsignore - -.PHONY: cvsignore - diff --git a/libs/glibmm2/build_shared/Makefile_gensrc.am_fragment b/libs/glibmm2/build_shared/Makefile_gensrc.am_fragment deleted file mode 100644 index 4f561da40f..0000000000 --- a/libs/glibmm2/build_shared/Makefile_gensrc.am_fragment +++ /dev/null @@ -1,62 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## sublib_name = gdkmm -## sublib_namespace = Gdk -## files_defs = gdk.defs gdk_pixbuf.defs - - -tools_dir_m4 = $(top_srcdir)/tools/m4 -tools_dir_pm = $(top_srcdir)/tools/pm - -gensrc_destdir = $(srcdir)/../$(sublib_name) -stamp_dir = $(srcdir)/.stamps - -include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment -tools_m4 = $(files_tools_m4:%.m4=$(tools_dir_m4)/%.m4) -tools_pm = $(files_tools_pm:%.pm=$(tools_dir_pm)/%.pm) - -include $(srcdir)/Makefile_list_of_hg.am_fragment -include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment -files_all_ccg = $(files_all_hg:%.hg=%.ccg) -files_h = $(files_all_hg:%.hg=$(gensrc_destdir)/%.h) -files_cc = $(files_all_hg:%.hg=$(gensrc_destdir)/%.cc) -files_stamp = $(files_all_hg:%.hg=$(stamp_dir)/stamp-%) - -gmmproc_in = $(top_srcdir)/tools/gmmproc.in -gmmproc_path = $(top_builddir)/tools/gmmproc -gmmproc_args = -I $(tools_dir_m4) --defs $(srcdir) -run_gmmproc = $(PERL_PATH) -I$(tools_dir_pm) $(gmmproc_path) $(gmmproc_args) - -gen_wrap_init_in = $(top_srcdir)/tools/generate_wrap_init.pl.in -gen_wrap_init_path = $(top_builddir)/tools/generate_wrap_init.pl -gen_wrap_init_args = --namespace=$(sublib_namespace) -run_gen_wrap_init = $(PERL_PATH) $(gen_wrap_init_path) $(gen_wrap_init_args) - -EXTRA_DIST = Makefile_list_of_hg.am_fragment $(files_defs) $(files_all_hg) $(files_all_ccg) - - -$(stamp_dir)/stamp-%: %.hg %.ccg $(gmmproc_in) $(tools_m4) $(tools_pm) $(files_defs) - $(run_gmmproc) $(notdir $*) $(srcdir) $(gensrc_destdir) - @echo 'timestamp' >$@ - -$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_in) $(files_all_hg) - $(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) >$@ - -create-stamp-dir: - @(test -d $(stamp_dir) || mkdir $(stamp_dir)) - -if MAINTAINER_MODE -all-local: create-stamp-dir $(files_stamp) $(gensrc_destdir)/wrap_init.cc -endif - -maintainer-clean-local: - rm -rf $(stamp_dir) - -.PHONY: create-stamp-dir - diff --git a/libs/glibmm2/build_shared/Makefile_gensrc_platform.am_fragment b/libs/glibmm2/build_shared/Makefile_gensrc_platform.am_fragment deleted file mode 100644 index 71c9cc4bcc..0000000000 --- a/libs/glibmm2/build_shared/Makefile_gensrc_platform.am_fragment +++ /dev/null @@ -1,25 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## files_general_hg = button.hg -## files_posix_hg = socket.hg -## -## Returned variable: Usage example: -## -## files_all_hg EXTRA_DIST = $(files_all_hg) -## files_hg files_built_h = $(files_hg:.hg=_p.h) - - -files_all_hg = $(files_general_hg) $(files_posix_hg) $(files_win32_hg) - -if OS_WIN32 -files_hg = $(files_general_hg) $(files_win32_hg) -else -files_hg = $(files_general_hg) $(files_posix_hg) -endif - diff --git a/libs/glibmm2/config.h.in b/libs/glibmm2/config.h.in deleted file mode 100644 index d04186be0a..0000000000 --- a/libs/glibmm2/config.h.in +++ /dev/null @@ -1,5 +0,0 @@ - -#undef HAVE_FLOCKFILE -#undef HAVE_FUNLOCKFILE -#undef GETC_UNLOCKED -#undef HAVE_MKFIFO diff --git a/libs/glibmm2/configure.in b/libs/glibmm2/configure.in deleted file mode 100644 index 782ca3a24d..0000000000 --- a/libs/glibmm2/configure.in +++ /dev/null @@ -1,267 +0,0 @@ -# Configure.in -# -# This file tests for various compiler features needed to configure -# the gtkmm package. Original skeleton was provided by Stephan Kulow. -# All tests were written by Tero Pulkkinen, Mirko Streckenbach, and -# Karl Nelson. -# -# NOTE! IF YOU DO CHANGES HERE, CHECK IF YOU NEED TO MODIFY .m4 TOO!!! -# -# Copyright 2001 Free Software Foundation -# Copyright 1999 gtkmm Development Team -# Copyright 1998 Stephan Kulow -# -AC_INIT(glib/glibmmconfig.h.in) -AC_PREREQ(2.50) - -######################################################################### -# Version and initialization -######################################################################### -GLIBMM_MAJOR_VERSION=2 -GLIBMM_MINOR_VERSION=14 -GLIBMM_MICRO_VERSION=2 -GLIBMM_VERSION=$GLIBMM_MAJOR_VERSION.$GLIBMM_MINOR_VERSION.$GLIBMM_MICRO_VERSION -GLIBMM_RELEASE=$GLIBMM_MAJOR_VERSION.$GLIBMM_MINOR_VERSION -AC_DEFINE_UNQUOTED([GLIBMM_MAJOR_VERSION], $GLIBMM_MAJOR_VERSION, [Major Version]) -AC_DEFINE_UNQUOTED([GLIBMM_MINOR_VERSION], $GLIBMM_MINOR_VERSION, [Minor Version]) -AC_DEFINE_UNQUOTED([GLIBMM_MICRO_VERSION], $GLIBMM_MICRO_VERSION, [Micro Version]) -AC_SUBST(GLIBMM_MAJOR_VERSION) -AC_SUBST(GLIBMM_MINOR_VERSION) -AC_SUBST(GLIBMM_MICRO_VERSION) -AC_SUBST(GLIBMM_VERSION) -AC_SUBST(GLIBMM_RELEASE) - -# -# +1 : ? : +1 == new interface that does not break old one -# +1 : ? : 0 == new interface that breaks old one -# ? : ? : 0 == no new interfaces, but breaks apps -# ? :+1 : ? == just some internal changes, nothing breaks but might work -# better -# CURRENT : REVISION : AGE -LIBGLIBMM_SO_VERSION=1:24:0 -AC_SUBST(LIBGLIBMM_SO_VERSION) - -AC_CONFIG_AUX_DIR(scripts) - -dnl For automake. -VERSION=$GLIBMM_VERSION -PACKAGE=glibmm - -dnl Initialize automake stuff -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) - -dnl Specify a configuration file (no autoheader) -AM_CONFIG_HEADER(config.h glib/glibmmconfig.h) -AM_MAINTAINER_MODE -AL_ACLOCAL_INCLUDE(scripts) - - -######################################################################### -# Configure arguments -######################################################################### - -######################################################################### -# Environment Checks -######################################################################### -AC_PROG_CC -AC_PROG_CPP -AC_PROG_MAKE_SET -AC_CANONICAL_BUILD -AC_CANONICAL_HOST - -dnl Used for enabling the "-no-undefined" flag while generating DLLs -dnl Copied from the official gtk+-2 configure.in -AC_MSG_CHECKING([for some Win32 platform]) -case "$host" in - *-*-mingw*|*-*-cygwin*) - platform_win32=yes - ;; - *) - platform_win32=no - ;; -esac -AC_MSG_RESULT([$platform_win32]) -AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") - -AC_MSG_CHECKING([for native Win32]) -case "$host" in - *-*-mingw*) - os_win32=yes - ;; - *) - os_win32=no - ;; -esac -AC_MSG_RESULT([$os_win32]) -AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") - -AC_DISABLE_STATIC -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL - -AL_PROG_GNU_M4(AC_MSG_ERROR([dnl -SUN m4 does not work for building gtkmm. -Please install GNU m4.])) - -AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl -SUN make does not work for building gtkmm. -Please install GNU make.])) - -GLIBMM_CHECK_PERL([5.6.0]) - -######################################################################### -# Function checks -######################################################################### - -# functions used in demos/gtk-demo. Undefined in config.h ! -AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked mkfifo]) - -######################################################################### -# Dependancy checks -######################################################################### -gtkmm_min_sigc_version=2.0.0 -gtkmm_min_glib_version=2.14.0 - -# -# -# !!! Ardour note: we don't need to look for sigc++ -# because it is inside our tree and handled by SCons. -# We do, however, need to check on glib -# -# -#PKG_CHECK_MODULES(GLIBMM, sigc++-2.0 >= ${gtkmm_min_sigc_version} glib-2.0 >= ${gtkmm_min_glib_version} gobject-2.0 >= ${gtkmm_min_glib_version} gmodule-2.0 >= ${gtkmm_min_glib_version}) -#AC_SUBST(GLIBMM_CFLAGS) -#AC_SUBST(GLIBMM_LIBS) - -PKG_CHECK_MODULES(GLIBMM, glib-2.0 >= ${gtkmm_min_glib_version} gobject-2.0 >= ${gtkmm_min_glib_version} gmodule-2.0 >= ${gtkmm_min_glib_version}) -AC_SUBST(GLIBMM_CFLAGS) -AC_SUBST(GLIBMM_LIBS) - -# gthread isn't a requirement, but we should use its CFLAGS if available. -PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= ${gtkmm_min_glib_version},[],[GTHREAD_CFLAGS=''; GTHREAD_LIBS='']) -AC_SUBST(GTHREAD_CFLAGS) -AC_SUBST(GTHREAD_LIBS) - - -######################################################################### -# C++ checks -######################################################################### -AC_PROG_CXX - -# Check for the SUN Forte compiler, and define GLIBMM_COMPILER_SUN_FORTE in the header. -GLIBMM_PROG_CXX_SUN - -# Ensure MSVC-compatible struct packing convention is used when -# compiling for Win32 with gcc. -# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while -# gcc2 uses "-fnative-struct". -if test x"$os_win32" = xyes; then - if test x"$GCC" = xyes -a x"$GXX" = xyes; then - msnative_struct='' - AC_MSG_CHECKING([how to get MSVC-compatible struct packing]) - if test -z "$ac_cv_prog_CC"; then - our_gcc="$CC" - else - our_gcc="$ac_cv_prog_CC" - fi - case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in - 2.) - if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then - msnative_struct='-fnative-struct' - fi - ;; - *) - if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then - msnative_struct='-mms-bitfields' - fi - ;; - esac - if test x"$msnative_struct" = x ; then - AC_MSG_RESULT([no way]) - AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code]) - else - CXXFLAGS="$CXXFLAGS $msnative_struct" - AC_MSG_RESULT([${msnative_struct}]) - fi - fi -fi - -AC_LANG_CPLUSPLUS - -AC_CXX_BOOL(,config_error=yes) -AC_CXX_NAMESPACES(,config_error=yes) -AC_CXX_MUTABLE(,config_error=yes) - -AC_MSG_CHECKING(if C++ environment provides all required features) -if test "x$config_error" = xyes ; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([Your compiler is not powerful enough to compile gtkmm. If it should be, see config.log for more information of why it failed.]) -fi -AC_MSG_RESULT([yes]) - -GLIBMM_CXX_HAS_NAMESPACE_STD() -GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS() -GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR() -GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS() -GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES() -GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS() -GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION() -GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS() -GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC() -GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS() -GLIBMM_C_STD_TIME_T_IS_NOT_INT32() - - -# Create a list of input directories for Doxygen. -GTKMM_DOXYGEN_INPUT_SUBDIRS([glib]) - -# Check whether to build the full docs into the generated source. -# This will be much slower. -GTKMM_ARG_ENABLE_FULLDOCS() - -# Check whether --enable-debug-refcounting was given. -GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING() - -# Evaluate the --enable-warnings=level option. -GTKMM_ARG_ENABLE_WARNINGS() - -# Add an --enable-use-deprecations configure option: -AC_ARG_ENABLE(deprecations, - [AC_HELP_STRING([--enable-use-deprecations], - [warn about deprecated usages [default=no]])],, - [enable_deprecations=no]) - -if test "x$enable_use_deprecations" = "xyes"; then - DISABLE_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED" - AC_SUBST(DISABLE_DEPRECATED_CFLAGS) -fi - -#Offer the ability to omit some API from the library, -#to reduce the code size: -GLIBMM_ARG_ENABLE_API_DEPRECATED() -GLIBMM_ARG_ENABLE_API_EXCEPTIONS() -GLIBMM_ARG_ENABLE_API_PROPERTIES() -GLIBMM_ARG_ENABLE_API_VFUNCS() - -# Offer the ability to omit some API from the library, -# to reduce the code size: -GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS() - -# Dummy conditional just to make automake-1.4 happy. -# We need an always-false condition in docs/Makefile.am. -AM_CONDITIONAL(GTKMM_FALSE,[false]) - -# HACK: Assign a dummy in order to prevent execution of autoheader by the -# maintainer-mode rules. That would fail since we aren't using autoheader. -AUTOHEADER=':' - - -AC_CONFIG_FILES([ - Makefile - - glib/Makefile - glib/glibmm-2.4.pc -]) - -AC_OUTPUT() - diff --git a/libs/glibmm2/glib/Makefile.am b/libs/glibmm2/glib/Makefile.am deleted file mode 100644 index 3477451135..0000000000 --- a/libs/glibmm2/glib/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -SUBDIRS = src glibmm - -EXTRA_DIST = README glibmmconfig.h.in glibmm-2.4.pc.in - -glibmm_includedir = $(includedir)/glibmm-2.4 -glibmm_include_HEADERS = glibmm.h - -glibmm_configdir = $(libdir)/glibmm-2.4/include -glibmm_config_DATA = glibmmconfig.h - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = glibmm-2.4.pc - - \ No newline at end of file diff --git a/libs/glibmm2/glib/Makefile.in b/libs/glibmm2/glib/Makefile.in deleted file mode 100644 index 05b0d49506..0000000000 --- a/libs/glibmm2/glib/Makefile.in +++ /dev/null @@ -1,611 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = glib -DIST_COMMON = README $(glibmm_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/glibmm-2.4.pc.in \ - $(srcdir)/glibmmconfig.h.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \ - $(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \ - $(top_srcdir)/scripts/docgen.m4 \ - $(top_srcdir)/scripts/glibmm_check_perl.m4 \ - $(top_srcdir)/scripts/macros.m4 \ - $(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h glibmmconfig.h -CONFIG_CLEAN_FILES = glibmm-2.4.pc -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(glibmm_configdir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(glibmm_includedir)" -glibmm_configDATA_INSTALL = $(INSTALL_DATA) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(glibmm_config_DATA) $(pkgconfig_DATA) -glibmm_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(glibmm_include_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@ -GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL_PATH = @PERL_PATH@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = src glibmm -EXTRA_DIST = README glibmmconfig.h.in glibmm-2.4.pc.in -glibmm_includedir = $(includedir)/glibmm-2.4 -glibmm_include_HEADERS = glibmm.h -glibmm_configdir = $(libdir)/glibmm-2.4/include -glibmm_config_DATA = glibmmconfig.h -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = glibmm-2.4.pc -all: glibmmconfig.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -glibmmconfig.h: stamp-h2 - @if test ! -f $@; then \ - rm -f stamp-h2; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h2; \ - else :; fi - -stamp-h2: $(srcdir)/glibmmconfig.h.in $(top_builddir)/config.status - @rm -f stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status glib/glibmmconfig.h -$(srcdir)/glibmmconfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h2 - touch $@ - -distclean-hdr: - -rm -f glibmmconfig.h stamp-h2 -glibmm-2.4.pc: $(top_builddir)/config.status $(srcdir)/glibmm-2.4.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-glibmm_configDATA: $(glibmm_config_DATA) - @$(NORMAL_INSTALL) - test -z "$(glibmm_configdir)" || $(MKDIR_P) "$(DESTDIR)$(glibmm_configdir)" - @list='$(glibmm_config_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(glibmm_configDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(glibmm_configdir)/$$f'"; \ - $(glibmm_configDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(glibmm_configdir)/$$f"; \ - done - -uninstall-glibmm_configDATA: - @$(NORMAL_UNINSTALL) - @list='$(glibmm_config_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(glibmm_configdir)/$$f'"; \ - rm -f "$(DESTDIR)$(glibmm_configdir)/$$f"; \ - done -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-glibmm_includeHEADERS: $(glibmm_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(glibmm_includedir)" || $(MKDIR_P) "$(DESTDIR)$(glibmm_includedir)" - @list='$(glibmm_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(glibmm_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(glibmm_includedir)/$$f'"; \ - $(glibmm_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(glibmm_includedir)/$$f"; \ - done - -uninstall-glibmm_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(glibmm_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(glibmm_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(glibmm_includedir)/$$f"; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) glibmmconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) glibmmconfig.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) glibmmconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) glibmmconfig.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(DATA) $(HEADERS) glibmmconfig.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(glibmm_configdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(glibmm_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-glibmm_configDATA \ - install-glibmm_includeHEADERS install-pkgconfigDATA - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-glibmm_configDATA \ - uninstall-glibmm_includeHEADERS uninstall-pkgconfigDATA - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-glibmm_configDATA \ - install-glibmm_includeHEADERS install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-glibmm_configDATA uninstall-glibmm_includeHEADERS \ - uninstall-pkgconfigDATA - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/glib/README b/libs/glibmm2/glib/README deleted file mode 100644 index 289d17a7da..0000000000 --- a/libs/glibmm2/glib/README +++ /dev/null @@ -1 +0,0 @@ -glib base dir. diff --git a/libs/glibmm2/glib/glibmm-2.4.pc b/libs/glibmm2/glib/glibmm-2.4.pc deleted file mode 100644 index c50ae1e78b..0000000000 --- a/libs/glibmm2/glib/glibmm-2.4.pc +++ /dev/null @@ -1,11 +0,0 @@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: GLibmm -Description: C++ wrapper for GLib -Requires: gobject-2.0 sigc++-2.0 -Version: 2.14.2 -Libs: -L${libdir} -lglibmm-2.4 -Cflags: -I${includedir}/glibmm-2.4 -I${libdir}/glibmm-2.4/include diff --git a/libs/glibmm2/glib/glibmm-2.4.pc.in b/libs/glibmm2/glib/glibmm-2.4.pc.in deleted file mode 100644 index db098824be..0000000000 --- a/libs/glibmm2/glib/glibmm-2.4.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: GLibmm -Description: C++ wrapper for GLib -Requires: gobject-2.0 sigc++-2.0 -Version: @VERSION@ -Libs: -L${libdir} -lglibmm-2.4 -Cflags: -I${includedir}/glibmm-2.4 -I${libdir}/glibmm-2.4/include diff --git a/libs/glibmm2/glib/glibmm.h b/libs/glibmm2/glib/glibmm.h deleted file mode 100644 index af82e057d4..0000000000 --- a/libs/glibmm2/glib/glibmm.h +++ /dev/null @@ -1,74 +0,0 @@ -/* $Id: glibmm.h 417 2007-06-12 13:38:39Z murrayc $ */ - -/* glibmm - a C++ wrapper for the GLib toolkit - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _GLIBMM_H -#define _GLIBMM_H - -#include -//#include //This must be included by the application, after system headers such as . -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* _GLIBMM_H */ - diff --git a/libs/glibmm2/glib/glibmm/Makefile.am b/libs/glibmm2/glib/glibmm/Makefile.am deleted file mode 100644 index e9ccf63703..0000000000 --- a/libs/glibmm2/glib/glibmm/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. - -SUBDIRS = private - -sublib_name = glibmm -sublib_libname = glibmm-2.4 -sublib_namespace = Glib -sublib_cflags = $(GLIBMM_CFLAGS) - -sublib_files_extra_posix_cc = -sublib_files_extra_win32_cc = - -sublib_files_extra_general_cc = \ - class.cc \ - containers.cc \ - debug.cc \ - dispatcher.cc \ - error.cc \ - exception.cc \ - exceptionhandler.cc \ - init.cc \ - interface.cc \ - main.cc \ - miscutils.cc \ - object.cc \ - objectbase.cc \ - pattern.cc \ - property.cc \ - propertyproxy.cc \ - propertyproxy_base.cc \ - quark.cc \ - random.cc \ - signalproxy.cc \ - signalproxy_connectionnode.cc \ - streamiochannel.cc \ - stringutils.cc \ - threadpool.cc \ - timer.cc \ - timeval.cc \ - ustring.cc \ - utility.cc \ - value.cc \ - value_custom.cc \ - wrap.cc - -sublib_files_extra_posix_h = -sublib_files_extra_win32_h = - -sublib_files_extra_general_h = \ - arrayhandle.h \ - class.h \ - containerhandle_shared.h \ - containers.h \ - debug.h \ - dispatcher.h \ - error.h \ - exception.h \ - exceptionhandler.h \ - helperlist.h \ - init.h \ - i18n.h \ - interface.h \ - iochannel.h \ - keyfile.h \ - listhandle.h \ - main.h \ - miscutils.h \ - object.h \ - objectbase.h \ - pattern.h \ - property.h \ - propertyproxy.h \ - propertyproxy_base.h \ - quark.h \ - random.h \ - refptr.h \ - sarray.h \ - signalproxy_connectionnode.h \ - slisthandle.h \ - streamiochannel.h \ - stringutils.h \ - threadpool.h \ - timer.h \ - timeval.h \ - ustring.h \ - utility.h \ - value.h \ - value_custom.h \ - wrap.h - -include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment - -files_built_general_cc += value_basictypes.cc -files_built_general_h += signalproxy.h value_basictypes.h - -lib_LTLIBRARIES = libglibmm-2.4.la -if OS_WIN32 -libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_win32_cc) -else -libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_posix_cc) -endif -libglibmm_2_4_la_LDFLAGS = $(common_ldflags) -libglibmm_2_4_la_LIBADD = $(GLIBMM_LIBS) - diff --git a/libs/glibmm2/glib/glibmm/Makefile.in b/libs/glibmm2/glib/glibmm/Makefile.in deleted file mode 100644 index b2323730c9..0000000000 --- a/libs/glibmm2/glib/glibmm/Makefile.in +++ /dev/null @@ -1,906 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(am__sublib_include_HEADERS_DIST) \ - $(srcdir)/../src/Makefile_list_of_hg.am_fragment \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/build_shared/Makefile_build.am_fragment \ - $(top_srcdir)/build_shared/Makefile_build_extra.am_fragment \ - $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment \ - $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment -subdir = glib/glibmm -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/glib/glibmmconfig.h \ - $(top_builddir)/gio/giommconfig.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(sublib_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libglibmm_2_4_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__libglibmm_2_4_la_SOURCES_DIST = convert.cc date.cc fileutils.cc \ - iochannel.cc keyfile.cc markup.cc module.cc optioncontext.cc \ - optionentry.cc optiongroup.cc regex.cc shell.cc spawn.cc \ - thread.cc unicode.cc wrap_init.cc value_basictypes.cc class.cc \ - containers.cc debug.cc dispatcher.cc error.cc exception.cc \ - exceptionhandler.cc init.cc interface.cc main.cc miscutils.cc \ - object.cc objectbase.cc pattern.cc property.cc \ - propertyproxy.cc propertyproxy_base.cc quark.cc random.cc \ - signalproxy.cc signalproxy_connectionnode.cc \ - streamiochannel.cc stringutils.cc threadpool.cc timer.cc \ - timeval.cc ustring.cc utility.cc value.cc value_custom.cc \ - wrap.cc -am__objects_1 = convert.lo date.lo fileutils.lo iochannel.lo \ - keyfile.lo markup.lo module.lo optioncontext.lo optionentry.lo \ - optiongroup.lo regex.lo shell.lo spawn.lo thread.lo unicode.lo -am__objects_2 = $(am__objects_1) wrap_init.lo value_basictypes.lo -am__objects_3 = class.lo containers.lo debug.lo dispatcher.lo error.lo \ - exception.lo exceptionhandler.lo init.lo interface.lo main.lo \ - miscutils.lo object.lo objectbase.lo pattern.lo property.lo \ - propertyproxy.lo propertyproxy_base.lo quark.lo random.lo \ - signalproxy.lo signalproxy_connectionnode.lo \ - streamiochannel.lo stringutils.lo threadpool.lo timer.lo \ - timeval.lo ustring.lo utility.lo value.lo value_custom.lo \ - wrap.lo -am__objects_4 = -@OS_WIN32_FALSE@am__objects_5 = $(am__objects_3) $(am__objects_4) -@OS_WIN32_TRUE@am__objects_5 = $(am__objects_3) $(am__objects_4) -am__objects_6 = $(am__objects_5) -am__objects_7 = $(am__objects_2) $(am__objects_6) -am__objects_8 = $(am__objects_4) -am__objects_9 = $(am__objects_8) -@OS_WIN32_FALSE@am_libglibmm_2_4_la_OBJECTS = $(am__objects_7) \ -@OS_WIN32_FALSE@ $(am__objects_9) -@OS_WIN32_TRUE@am_libglibmm_2_4_la_OBJECTS = $(am__objects_7) \ -@OS_WIN32_TRUE@ $(am__objects_9) -libglibmm_2_4_la_OBJECTS = $(am_libglibmm_2_4_la_OBJECTS) -libglibmm_2_4_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libglibmm_2_4_la_LDFLAGS) $(LDFLAGS) -o $@ -depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libglibmm_2_4_la_SOURCES) -DIST_SOURCES = $(am__libglibmm_2_4_la_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__sublib_include_HEADERS_DIST = convert.h date.h fileutils.h \ - iochannel.h keyfile.h markup.h module.h optioncontext.h \ - optionentry.h optiongroup.h regex.h shell.h spawn.h thread.h \ - unicode.h signalproxy.h value_basictypes.h arrayhandle.h \ - class.h containerhandle_shared.h containers.h debug.h \ - dispatcher.h error.h exception.h exceptionhandler.h \ - helperlist.h init.h i18n.h interface.h listhandle.h main.h \ - miscutils.h object.h objectbase.h pattern.h property.h \ - propertyproxy.h propertyproxy_base.h quark.h random.h refptr.h \ - sarray.h signalproxy_connectionnode.h slisthandle.h \ - streamiochannel.h stringutils.h threadpool.h timer.h timeval.h \ - ustring.h utility.h value.h value_custom.h wrap.h wrap_init.h -sublib_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(sublib_include_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ $(strip $(extra_defines)) -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GIOMM_CFLAGS = @GIOMM_CFLAGS@ -GIOMM_LIBS = @GIOMM_LIBS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GMMPROC_DIR = @GMMPROC_DIR@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = private -sublib_name = glibmm -sublib_libname = glibmm-2.4 -sublib_namespace = Glib -sublib_cflags = $(GLIBMM_CFLAGS) -sublib_files_extra_posix_cc = -sublib_files_extra_win32_cc = -sublib_files_extra_general_cc = \ - class.cc \ - containers.cc \ - debug.cc \ - dispatcher.cc \ - error.cc \ - exception.cc \ - exceptionhandler.cc \ - init.cc \ - interface.cc \ - main.cc \ - miscutils.cc \ - object.cc \ - objectbase.cc \ - pattern.cc \ - property.cc \ - propertyproxy.cc \ - propertyproxy_base.cc \ - quark.cc \ - random.cc \ - signalproxy.cc \ - signalproxy_connectionnode.cc \ - streamiochannel.cc \ - stringutils.cc \ - threadpool.cc \ - timer.cc \ - timeval.cc \ - ustring.cc \ - utility.cc \ - value.cc \ - value_custom.cc \ - wrap.cc - -sublib_files_extra_posix_h = -sublib_files_extra_win32_h = -sublib_files_extra_general_h = \ - arrayhandle.h \ - class.h \ - containerhandle_shared.h \ - containers.h \ - debug.h \ - dispatcher.h \ - error.h \ - exception.h \ - exceptionhandler.h \ - helperlist.h \ - init.h \ - i18n.h \ - interface.h \ - iochannel.h \ - keyfile.h \ - listhandle.h \ - main.h \ - miscutils.h \ - object.h \ - objectbase.h \ - pattern.h \ - property.h \ - propertyproxy.h \ - propertyproxy_base.h \ - quark.h \ - random.h \ - refptr.h \ - sarray.h \ - signalproxy_connectionnode.h \ - slisthandle.h \ - streamiochannel.h \ - stringutils.h \ - threadpool.h \ - timer.h \ - timeval.h \ - ustring.h \ - utility.h \ - value.h \ - value_custom.h \ - wrap.h - -files_posix_hg = -files_win32_hg = -files_general_hg = convert.hg date.hg fileutils.hg iochannel.hg keyfile.hg markup.hg module.hg optioncontext.hg optionentry.hg optiongroup.hg regex.hg shell.hg spawn.hg thread.hg unicode.hg -files_all_hg = $(files_general_hg) $(files_posix_hg) $(files_win32_hg) -@OS_WIN32_FALSE@files_hg = $(files_general_hg) $(files_posix_hg) -@OS_WIN32_TRUE@files_hg = $(files_general_hg) $(files_win32_hg) -files_built_general_cc = $(files_general_hg:.hg=.cc) wrap_init.cc \ - value_basictypes.cc -files_built_general_h = $(files_general_hg:.hg=.h) signalproxy.h \ - value_basictypes.h -files_built_posix_cc = $(files_posix_hg:.hg=.cc) -files_built_posix_h = $(files_posix_hg:.hg=.h) -files_built_win32_cc = $(files_win32_hg:.hg=.cc) -files_built_win32_h = $(files_win32_hg:.hg=.h) -files_built_all_cc = $(files_built_general_cc) \ - $(files_built_posix_cc) \ - $(files_built_win32_cc) - -files_built_all_h = $(files_built_general_h) \ - $(files_built_posix_h) \ - $(files_built_win32_h) - -@OS_WIN32_FALSE@files_extra_cc_tmp = $(sublib_files_extra_general_cc) $(sublib_files_extra_posix_cc) -@OS_WIN32_TRUE@files_extra_cc_tmp = $(sublib_files_extra_general_cc) $(sublib_files_extra_win32_cc) -@OS_WIN32_FALSE@files_extra_h_tmp = $(sublib_files_extra_general_h) $(sublib_files_extra_posix_h) -@OS_WIN32_TRUE@files_extra_h_tmp = $(sublib_files_extra_general_h) $(sublib_files_extra_win32_h) -files_extra_cc = $(files_extra_cc_tmp) -files_extra_h = $(files_extra_h_tmp) wrap_init.h -files_extra_all_cc = $(sublib_files_extra_general_cc) $(sublib_files_extra_posix_cc) $(sublib_files_extra_win32_cc) -files_extra_all_h = $(sublib_files_extra_general_h) \ - $(sublib_files_extra_posix_h) $(sublib_files_extra_win32_h) \ - wrap_init.h -files_all_general_cc = $(files_built_general_cc) $(files_extra_cc) -files_all_posix_cc = $(files_built_posix_cc) -files_all_win32_cc = $(files_built_win32_cc) -@PLATFORM_WIN32_FALSE@extra_win32_defines = - -# Support for DLL on mingw using libtool > 1.4 -# When creating DLLs on win32, we need to explicitly add a few extra -# libraries at link time to resolve symbols (remember a dll is like an -# executable). -@PLATFORM_WIN32_TRUE@extra_win32_defines = \ -@PLATFORM_WIN32_TRUE@ -D$(shell echo $(sublib_name) | tr [:lower:] [:upper:])_BUILD - -@PLATFORM_WIN32_FALSE@no_undefined = -@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined -Wl,--export-all-symbols -@PLATFORM_WIN32_FALSE@win32_dlls_extra_libs = -@PLATFORM_WIN32_TRUE@win32_dlls_extra_libs = $(sublib_win32_dlls_libs) -common_ldflags = -version-info $(LIBGLIBMM_SO_VERSION) $(no_undefined) -all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \ - $(sublib_cflags) $(GTHREAD_CFLAGS) - -extra_defines = -DG_LOG_DOMAIN=\"$(sublib_name)\" $(extra_win32_defines) \ - $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS) - -dist_sources = $(files_built_all_cc) $(files_extra_all_cc) \ - $(files_built_all_h) $(files_extra_all_h) - -DISTFILES = $(DIST_COMMON) $(dist_sources) $(TEXINFOS) $(EXTRA_DIST) -DEFAULT_INCLUDES = -INCLUDES = $(strip $(all_includes)) -sublib_includedir = $(includedir)/$(sublib_libname)/$(sublib_name) -@OS_WIN32_FALSE@sublib_include_HEADERS = $(files_built_general_h) \ -@OS_WIN32_FALSE@ $(files_built_posix_h) \ -@OS_WIN32_FALSE@ $(files_extra_h) - -@OS_WIN32_TRUE@sublib_include_HEADERS = $(files_built_general_h) \ -@OS_WIN32_TRUE@ $(files_built_win32_h) \ -@OS_WIN32_TRUE@ $(files_extra_h) - -lib_LTLIBRARIES = libglibmm-2.4.la -@OS_WIN32_FALSE@libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_posix_cc) -@OS_WIN32_TRUE@libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_win32_cc) -libglibmm_2_4_la_LDFLAGS = $(common_ldflags) -libglibmm_2_4_la_LIBADD = $(GLIBMM_LIBS) -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .cc .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment $(srcdir)/../src/Makefile_list_of_hg.am_fragment $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment $(top_srcdir)/build_shared/Makefile_build_extra.am_fragment $(top_srcdir)/build_shared/Makefile_build.am_fragment $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glib/glibmm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glib/glibmm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libglibmm-2.4.la: $(libglibmm_2_4_la_OBJECTS) $(libglibmm_2_4_la_DEPENDENCIES) - $(libglibmm_2_4_la_LINK) -rpath $(libdir) $(libglibmm_2_4_la_OBJECTS) $(libglibmm_2_4_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/class.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/containers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/date.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatcher.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exceptionhandler.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileutils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iochannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyfile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/markup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscutils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objectbase.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optioncontext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optionentry.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optiongroup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/property.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propertyproxy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propertyproxy_base.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quark.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalproxy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalproxy_connectionnode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/streamiochannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringutils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threadpool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeval.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ustring.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value_basictypes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value_custom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap_init.Plo@am__quote@ - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-sublib_includeHEADERS: $(sublib_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(sublib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(sublib_includedir)" - @list='$(sublib_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(sublib_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sublib_includedir)/$$f'"; \ - $(sublib_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sublib_includedir)/$$f"; \ - done - -uninstall-sublib_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(sublib_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(sublib_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(sublib_includedir)/$$f"; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sublib_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-sublib_includeHEADERS - -install-dvi: install-dvi-recursive - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES uninstall-sublib_includeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - install-sublib_includeHEADERS installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-local mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-libLTLIBRARIES uninstall-sublib_includeHEADERS - - -maintainer-clean-local: - (cd $(srcdir) && rm -f $(files_built_all_cc) $(files_built_all_h)) - -cvsignore: - ( \ - echo ".deps"; \ - echo ".libs"; \ - echo "*.la"; \ - echo "*.lo"; \ - echo "Makefile"; \ - echo "Makefile.in"; \ - echo; \ - list='$(strip $(files_built_all_cc) $(files_built_all_h))'; \ - for file in $$list; do \ - echo "$$file"; \ - done \ - ) >$(srcdir)/.cvsignore - ( \ - echo "Makefile"; \ - echo "Makefile.in"; \ - echo; \ - list='$(strip $(files_all_hg:.hg=_p.h))'; \ - for file in $$list; do \ - echo "$$file"; \ - done \ - ) >$(srcdir)/private/.cvsignore - -.PHONY: cvsignore -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/glib/glibmm/arrayhandle.h b/libs/glibmm2/glib/glibmm/arrayhandle.h deleted file mode 100644 index ab6bda9259..0000000000 --- a/libs/glibmm2/glib/glibmm/arrayhandle.h +++ /dev/null @@ -1,522 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_ARRAYHANDLE_H -#define _GLIBMM_ARRAYHANDLE_H - -/* $Id: arrayhandle.h 32 2003-04-21 17:39:41Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -namespace Container_Helpers -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/* Count the number of elements in a 0-terminated sequence. - */ -template inline -size_t compute_array_size(const T* array) -{ - const T* pend = array; - - while(*pend) - ++pend; - - return (pend - array); -} - -/* Allocate and fill a 0-terminated array. The size argument - * specifies the number of elements in the input sequence. - */ -template -typename Tr::CType* create_array(For pbegin, size_t size, Tr) -{ - typedef typename Tr::CType CType; - - CType *const array = static_cast(g_malloc((size + 1) * sizeof(CType))); - CType *const array_end = array + size; - - for(CType* pdest = array; pdest != array_end; ++pdest) - { - // Use & to force a warning if the iterator returns a temporary object. - *pdest = Tr::to_c_type(*&*pbegin); - ++pbegin; - } - - *array_end = CType(); - return array; -} - - -/* Convert from any container that supports forward - * iterators and has a size() method. - */ -template -struct ArraySourceTraits -{ - typedef typename Tr::CType CType; - - static size_t get_size(const Cont& cont) - { return cont.size(); } - - static const CType* get_data(const Cont& cont, size_t size) - { return Glib::Container_Helpers::create_array(cont.begin(), size, Tr()); } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -/* Convert from a 0-terminated array. The Cont argument must be a pointer - * to the first element. Note that only arrays of the C type are supported. - */ -template -struct ArraySourceTraits -{ - typedef typename Tr::CType CType; - - static size_t get_size(const CType* array) - { return (array) ? Glib::Container_Helpers::compute_array_size(array) : 0; } - - static const CType* get_data(const CType* array, size_t) - { return array; } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_NONE; -}; - -template -struct ArraySourceTraits : ArraySourceTraits -{}; - -/* Convert from a 0-terminated array. The Cont argument must be a pointer - * to the first element. Note that only arrays of the C type are supported. - * For consistency, the array must be 0-terminated, even though the array - * size is known at compile time. - */ -template -struct ArraySourceTraits -{ - typedef typename Tr::CType CType; - - static size_t get_size(const CType*) - { return (N - 1); } - - static const CType* get_data(const CType* array, size_t) - { return array; } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_NONE; -}; - -template -struct ArraySourceTraits : ArraySourceTraits -{}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** - * @ingroup ContHelpers - */ -template -class ArrayHandleIterator -{ -public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; - - typedef std::random_access_iterator_tag iterator_category; - typedef CppType value_type; - typedef ptrdiff_t difference_type; - typedef value_type reference; - typedef void pointer; - - explicit inline ArrayHandleIterator(const CType* pos); - - inline value_type operator*() const; - inline value_type operator[](difference_type offset) const; - - inline ArrayHandleIterator & operator++(); - inline const ArrayHandleIterator operator++(int); - - // All this random access stuff is only there because STL algorithms - // usually have optimized specializations for random access iterators, - // and we don't want to give away efficiency for nothing. - // - inline ArrayHandleIterator & operator+=(difference_type rhs); - inline ArrayHandleIterator & operator-=(difference_type rhs); - inline const ArrayHandleIterator operator+ (difference_type rhs) const; - inline const ArrayHandleIterator operator- (difference_type rhs) const; - inline difference_type operator-(const ArrayHandleIterator& rhs) const; - - inline bool operator==(const ArrayHandleIterator& rhs) const; - inline bool operator!=(const ArrayHandleIterator& rhs) const; - inline bool operator< (const ArrayHandleIterator& rhs) const; - inline bool operator> (const ArrayHandleIterator& rhs) const; - inline bool operator<=(const ArrayHandleIterator& rhs) const; - inline bool operator>=(const ArrayHandleIterator& rhs) const; - -private: - const CType* pos_; -}; - -} // namespace Container_Helpers - - -/** If a method takes this as an argument, or has this as a return type, then you can use a standard - * container such as std::list or std::vector. - * @ingroup ContHandles - */ -template < class T, class Tr = Glib::Container_Helpers::TypeTraits > -class ArrayHandle -{ -public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; - - typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef Glib::Container_Helpers::ArrayHandleIterator const_iterator; - typedef Glib::Container_Helpers::ArrayHandleIterator iterator; - - template inline - ArrayHandle(const Cont& container); - - // Take over ownership of an array created by GTK+ functions. - inline ArrayHandle(const CType* array, size_t array_size, Glib::OwnershipType ownership); - inline ArrayHandle(const CType* array, Glib::OwnershipType ownership); - - // Copying clears the ownership flag of the source handle. - inline ArrayHandle(const ArrayHandle& other); - - ~ArrayHandle(); - - inline const_iterator begin() const; - inline const_iterator end() const; - - template inline operator std::vector() const; - template inline operator std::deque() const; - template inline operator std::list() const; - - template inline - void assign_to(Cont& container) const; - - template inline - void copy(Out pdest) const; - - inline const CType* data() const; - inline size_t size() const; - inline bool empty() const; - -private: - size_t size_; - const CType* parray_; - mutable Glib::OwnershipType ownership_; - - // No copy assignment. - ArrayHandle& operator=(const ArrayHandle&); -}; - -/** If a method takes this as an argument, or has this as a return type, then you can use a standard - * container such as std::list or std::vector. - * @ingroup ContHandles - */ -typedef ArrayHandle StringArrayHandle; - - -/***************************************************************************/ -/* Inline implementation */ -/***************************************************************************/ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -namespace Container_Helpers -{ - -/**** Glib::Container_Helpers::ArrayHandleIterator<> ***********************/ - -template inline -ArrayHandleIterator::ArrayHandleIterator(const CType* pos) -: - pos_ (pos) -{} - -template inline -typename ArrayHandleIterator::value_type ArrayHandleIterator::operator*() const -{ - return Tr::to_cpp_type(*pos_); -} - -template inline -typename ArrayHandleIterator::value_type -ArrayHandleIterator::operator[](difference_type offset) const -{ - return Tr::to_cpp_type(pos_[offset]); -} - -template inline -ArrayHandleIterator& ArrayHandleIterator::operator++() -{ - ++pos_; - return *this; -} - -template inline -const ArrayHandleIterator ArrayHandleIterator::operator++(int) -{ - return ArrayHandleIterator(pos_++); -} - -template inline -ArrayHandleIterator& -ArrayHandleIterator::operator+=(typename ArrayHandleIterator::difference_type rhs) -{ - pos_ += rhs; - return *this; -} - -template inline -ArrayHandleIterator& -ArrayHandleIterator::operator-=(typename ArrayHandleIterator::difference_type rhs) -{ - pos_ -= rhs; - return *this; -} - -template inline -const ArrayHandleIterator -ArrayHandleIterator::operator+(typename ArrayHandleIterator::difference_type rhs) const -{ - return ArrayHandleIterator(pos_ + rhs); -} - -template inline -const ArrayHandleIterator -ArrayHandleIterator::operator-(typename ArrayHandleIterator::difference_type rhs) const -{ - return ArrayHandleIterator(pos_ - rhs); -} - -template inline -typename ArrayHandleIterator::difference_type -ArrayHandleIterator::operator-(const ArrayHandleIterator& rhs) const -{ - return (pos_ - rhs.pos_); -} - -template inline -bool ArrayHandleIterator::operator==(const ArrayHandleIterator& rhs) const -{ - return (pos_ == rhs.pos_); -} - -template inline -bool ArrayHandleIterator::operator!=(const ArrayHandleIterator& rhs) const -{ - return (pos_ != rhs.pos_); -} - -template inline -bool ArrayHandleIterator::operator<(const ArrayHandleIterator& rhs) const -{ - return (pos_ < rhs.pos_); -} - -template inline -bool ArrayHandleIterator::operator>(const ArrayHandleIterator& rhs) const -{ - return (pos_ > rhs.pos_); -} - -template inline -bool ArrayHandleIterator::operator<=(const ArrayHandleIterator& rhs) const -{ - return (pos_ <= rhs.pos_); -} - -template inline -bool ArrayHandleIterator::operator>=(const ArrayHandleIterator& rhs) const -{ - return (pos_ >= rhs.pos_); -} - -} // namespace Container_Helpers - - -/**** Glib::ArrayHandle<> **************************************************/ - -template - template -inline -ArrayHandle::ArrayHandle(const Cont& container) -: - size_ (Glib::Container_Helpers::ArraySourceTraits::get_size(container)), - parray_ (Glib::Container_Helpers::ArraySourceTraits::get_data(container, size_)), - ownership_ (Glib::Container_Helpers::ArraySourceTraits::initial_ownership) -{} - -template inline -ArrayHandle::ArrayHandle(const typename ArrayHandle::CType* array, size_t array_size, - Glib::OwnershipType ownership) -: - size_ (array_size), - parray_ (array), - ownership_ (ownership) -{} - -template inline -ArrayHandle::ArrayHandle(const typename ArrayHandle::CType* array, - Glib::OwnershipType ownership) -: - size_ ((array) ? Glib::Container_Helpers::compute_array_size(array) : 0), - parray_ (array), - ownership_ (ownership) -{} - -template inline -ArrayHandle::ArrayHandle(const ArrayHandle& other) -: - size_ (other.size_), - parray_ (other.parray_), - ownership_ (other.ownership_) -{ - other.ownership_ = Glib::OWNERSHIP_NONE; -} - -template -ArrayHandle::~ArrayHandle() -{ - if(ownership_ != Glib::OWNERSHIP_NONE) - { - if(ownership_ != Glib::OWNERSHIP_SHALLOW) - { - // Deep ownership: release each container element. - const CType *const pend = parray_ + size_; - for(const CType* p = parray_; p != pend; ++p) - Tr::release_c_type(*p); - } - g_free(const_cast(parray_)); - } -} - -template inline -typename ArrayHandle::const_iterator ArrayHandle::begin() const -{ - return Glib::Container_Helpers::ArrayHandleIterator(parray_); -} - -template inline -typename ArrayHandle::const_iterator ArrayHandle::end() const -{ - return Glib::Container_Helpers::ArrayHandleIterator(parray_ + size_); -} - -template - template -inline -ArrayHandle::operator std::vector() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::vector(this->begin(), this->end()); -#else - std::vector temp; - temp.reserve(this->size()); - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -ArrayHandle::operator std::deque() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::deque(this->begin(), this->end()); -#else - std::deque temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -ArrayHandle::operator std::list() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::list(this->begin(), this->end()); -#else - std::list temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -void ArrayHandle::assign_to(Cont& container) const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - container.assign(this->begin(), this->end()); -#else - Cont temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - container.swap(temp); -#endif -} - -template - template -inline -void ArrayHandle::copy(Out pdest) const -{ - std::copy(this->begin(), this->end(), pdest); -} - -template inline -const typename ArrayHandle::CType* ArrayHandle::data() const -{ - return parray_; -} - -template inline -size_t ArrayHandle::size() const -{ - return size_; -} - -template inline -bool ArrayHandle::empty() const -{ - return (size_ == 0); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - - -#endif /* _GLIBMM_ARRAYHANDLE_H */ - diff --git a/libs/glibmm2/glib/glibmm/class.cc b/libs/glibmm2/glib/glibmm/class.cc deleted file mode 100644 index 0606f431bb..0000000000 --- a/libs/glibmm2/glib/glibmm/class.cc +++ /dev/null @@ -1,117 +0,0 @@ -// -*- c++ -*- -/* $Id: class.cc 336 2006-10-04 12:06:14Z murrayc $ */ - -/* Copyright (C) 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -void Class::register_derived_type(GType base_type) -{ - if(gtype_) - return; // already initialized - - GTypeQuery base_query = { 0, 0, 0, 0, }; - g_type_query(base_type, &base_query); - - const GTypeInfo derived_info = - { - base_query.class_size, - 0, // base_init - 0, // base_finalize - class_init_func_, - 0, // class_finalize - 0, // class_data - base_query.instance_size, - 0, // n_preallocs - 0, // instance_init - 0, // value_table - }; - - Glib::ustring derived_name = "gtkmm__"; - derived_name += base_query.type_name; - - gtype_ = g_type_register_static(base_type, derived_name.c_str(), &derived_info, GTypeFlags(0)); -} - -GType Class::clone_custom_type(const char* custom_type_name) const -{ - std::string full_name ("gtkmm__CustomObject_"); - Glib::append_canonical_typename(full_name, custom_type_name); - - GType custom_type = g_type_from_name(full_name.c_str()); - - if(!custom_type) - { - g_return_val_if_fail(gtype_ != 0, 0); - - // Cloned custom types derive from the wrapper's parent type, - // so that g_type_class_peek_parent() works correctly. - const GType base_type = g_type_parent(gtype_); - - GTypeQuery base_query = { 0, 0, 0, 0, }; - g_type_query(base_type, &base_query); - - const GTypeInfo derived_info = - { - base_query.class_size, - 0, // base_init - 0, // base_finalize - &Class::custom_class_init_function, - 0, // class_finalize - this, // class_data - base_query.instance_size, - 0, // n_preallocs - 0, // instance_init - 0, // value_table - }; - - custom_type = g_type_register_static( - base_type, full_name.c_str(), &derived_info, GTypeFlags(0)); - } - - return custom_type; -} - -// static -void Class::custom_class_init_function(void* g_class, void* class_data) -{ - // The class_data pointer is set to 'this' by clone_custom_type(). - const Class *const self = static_cast(class_data); - - g_return_if_fail(self->class_init_func_ != 0); - - // Call the wrapper's class_init_function() to redirect - // the vfunc and default signal handler callbacks. - (*self->class_init_func_)(g_class, 0); - -#ifdef GLIBMM_PROPERTIES_ENABLED - GObjectClass *const gobject_class = static_cast(g_class); - gobject_class->get_property = &Glib::custom_get_property_callback; - gobject_class->set_property = &Glib::custom_set_property_callback; -#endif //GLIBMM_PROPERTIES_ENABLED -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/class.h b/libs/glibmm2/glib/glibmm/class.h deleted file mode 100644 index 96b58b5653..0000000000 --- a/libs/glibmm2/glib/glibmm/class.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_CLASS_H -#define _GLIBMM_CLASS_H - -/* $Id: class.h 291 2006-05-12 08:08:45Z murrayc $ */ - -/* Copyright 2001 Free Software Foundation - * Copyright (C) 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include //Include this here so that the /private/*.h classes have access to GLIBMM_VFUNCS_ENABLED - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -namespace Glib -{ - -class Class -{ -public: - /* No constructor/destructor: - * Glib::Class objects are used only as static data, which would cause - * lots of ugly global constructor invocations. These are avoidable, - * because the C/C++ standard explicitly specifies that all _static_ data - * is zero-initialized at program start. - */ - //Class(); - //~Class(); - - //static void class_init_function(BaseClassType *p); - //static void object_init_function(BaseObjectType *o); - //GType get_type() = 0; //Creates the GType when this is first called. - - // Hook for translating API - //static Glib::Object* wrap_new(GObject*); - - inline GType get_type() const; - GType clone_custom_type(const char* custom_type_name) const; - -protected: - GType gtype_; - GClassInitFunc class_init_func_; - - void register_derived_type(GType base_type); - -private: - static void custom_class_init_function(void* g_class, void* class_data); -}; - -inline -GType Class::get_type() const -{ - return gtype_; -} - -} // namespace Glib - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -#endif /* _GLIBMM_CLASS_H */ - diff --git a/libs/glibmm2/glib/glibmm/containerhandle_shared.h b/libs/glibmm2/glib/glibmm/containerhandle_shared.h deleted file mode 100644 index 9f31a30dc3..0000000000 --- a/libs/glibmm2/glib/glibmm/containerhandle_shared.h +++ /dev/null @@ -1,373 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_CONTAINERHANDLE_SHARED_H -#define _GLIBMM_CONTAINERHANDLE_SHARED_H - -/* $Id: containerhandle_shared.h 322 2006-09-19 20:36:43Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -GLIBMM_USING_STD(forward_iterator_tag) -GLIBMM_USING_STD(random_access_iterator_tag) -GLIBMM_USING_STD(distance) -GLIBMM_USING_STD(copy) -GLIBMM_USING_STD(vector) -GLIBMM_USING_STD(deque) -GLIBMM_USING_STD(list) - - -namespace Glib -{ - -/** @defgroup ContHandles Generic container converters - */ - -/** - * @ingroup ContHandles - */ -enum OwnershipType -{ - OWNERSHIP_NONE = 0, - OWNERSHIP_SHALLOW, //Release the list, but not its elements, when the container is deleted - OWNERSHIP_DEEP //Release the list, and its elements, when the container is deleted. -}; - - -/** Utility class holding an iterator sequence. - * @ingroup ContHandles - * This can be used to initialize a Glib container handle (such as - * Glib::ArrayHandle) with an iterator sequence. Use the helper - * function Glib::sequence() to create a Sequence<> object. - */ -template -class Sequence -{ -private: - Iterator pbegin_; - Iterator pend_; - -public: - Sequence(Iterator pbegin, Iterator pend) - : pbegin_(pbegin), pend_(pend) {} - - Iterator begin() const { return pbegin_; } - Iterator end() const { return pend_; } - size_t size() const { return std::distance(pbegin_, pend_); } -}; - -/** Helper function to create a Glib::Sequence<> object, which - * in turn can be used to initialize a container handle. - * @ingroup ContHandles - * - * @par Usage example: - * @code - * combo.set_popdown_strings(Glib::sequence(foo_begin, foo_end)); - * @endcode - */ -template inline -Sequence sequence(Iterator pbegin, Iterator pend) -{ - return Sequence(pbegin, pend); -} - - -namespace Container_Helpers -{ - -/** @defgroup ContHelpers Helper classes - * @ingroup ContHandles - */ - -/** Generic TypeTraits implementation. - * @ingroup ContHelpers - * This can be used if the C++ type is the same as the C type, or if implicit - * conversions between the types are available. Also, the types are required - * to implement copy-by-value semantics. (Ownership is just ignored.) - */ -template -struct TypeTraits -{ - typedef T CppType; - typedef T CType; - typedef T CTypeNonConst; - - static CType to_c_type (const CppType& item) { return item; } - static CppType to_cpp_type (const CType& item) { return item; } - static void release_c_type (const CType&) {} -}; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS /* hide the specializations */ - -//For some (proably, more spec-compliant) compilers, these specializations must -//be next to the objects that they use. -#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION - -/** Partial specialization for pointers to GtkObject instances. - * @ingroup ContHelpers - */ -template -struct TypeTraits -{ - typedef T * CppType; - typedef typename T::BaseObjectType * CType; - typedef typename T::BaseObjectType * CTypeNonConst; - - static CType to_c_type (CppType ptr) { return Glib::unwrap(ptr); } - static CType to_c_type (CType ptr) { return ptr; } - static CppType to_cpp_type (CType ptr) - { - //We copy/paste the widget wrap() implementation here, - //because we can not use a specific Glib::wrap(T_Impl) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = (GObject*)ptr; - return dynamic_cast(Glib::wrap_auto(cobj, false /* take_copy */)); - } - - static void release_c_type (CType ptr) - { - GLIBMM_DEBUG_UNREFERENCE(0, ptr); - g_object_unref(ptr); - } -}; - -//This confuse the SUN Forte compiler, so we ifdef it out: -#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -/** Partial specialization for pointers to const GtkObject instances. - * @ingroup ContHelpers - */ -template -struct TypeTraits -{ - typedef const T * CppType; - typedef const typename T::BaseObjectType * CType; - typedef typename T::BaseObjectType * CTypeNonConst; - - static CType to_c_type (CppType ptr) { return Glib::unwrap(ptr); } - static CType to_c_type (CType ptr) { return ptr; } - static CppType to_cpp_type (CType ptr) - { - //We copy/paste the widget wrap() implementation here, - //because we can not use a specific Glib::wrap(T_Impl) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = (GObject*)const_cast(ptr); - return dynamic_cast(Glib::wrap_auto(cobj, false /* take_copy */)); - } - - static void release_c_type (CType ptr) - { - GLIBMM_DEBUG_UNREFERENCE(0, ptr); - g_object_unref(const_cast(ptr)); - } -}; -#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -/** Partial specialization for pointers to GObject instances. - * @ingroup ContHelpers - * The C++ type is always a Glib::RefPtr<>. - */ -template -struct TypeTraits< Glib::RefPtr > -{ - typedef Glib::RefPtr CppType; - typedef typename T::BaseObjectType * CType; - typedef typename T::BaseObjectType * CTypeNonConst; - - static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); } - static CType to_c_type (CType ptr) { return ptr; } - static CppType to_cpp_type (CType ptr) - { - //return Glib::wrap(ptr, true); - - //We copy/paste the wrap() implementation here, - //because we can not use a specific Glib::wrap(CType) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = (GObject*)const_cast(ptr); - return Glib::RefPtr( dynamic_cast(Glib::wrap_auto(cobj, true /* take_copy */)) ); - //We use dynamic_cast<> in case of multiple inheritance. - } - - static void release_c_type (CType ptr) - { - GLIBMM_DEBUG_UNREFERENCE(0, ptr); - g_object_unref(ptr); - } -}; - -//This confuse the SUN Forte compiler, so we ifdef it out: -#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -/** Partial specialization for pointers to const GObject instances. - * @ingroup ContHelpers - * The C++ type is always a Glib::RefPtr<>. - */ -template -struct TypeTraits< Glib::RefPtr > -{ - typedef Glib::RefPtr CppType; - typedef const typename T::BaseObjectType * CType; - typedef typename T::BaseObjectType * CTypeNonConst; - - static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); } - static CType to_c_type (CType ptr) { return ptr; } - static CppType to_cpp_type (CType ptr) - { - //return Glib::wrap(ptr, true); - - //We copy/paste the wrap() implementation here, - //because we can not use a specific Glib::wrap(CType) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = (GObject*)(ptr); - return Glib::RefPtr( dynamic_cast(Glib::wrap_auto(cobj, true /* take_copy */)) ); - //We use dynamic_cast<> in case of multiple inheritance. - } - - static void release_c_type (CType ptr) - { - GLIBMM_DEBUG_UNREFERENCE(0, ptr); - g_object_unref(const_cast(ptr)); - } -}; - -#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION - -/** Specialization for UTF-8 strings. - * @ingroup ContHelpers - * When converting from C++ to C, Glib::ustring will be accepted as well as - * std::string and 'const char*'. However, when converting to the C++ side, - * the output type cannot be 'const char*'. - */ -template <> -struct TypeTraits -{ - typedef Glib::ustring CppType; - typedef const char * CType; - typedef char * CTypeNonConst; - - static CType to_c_type (const Glib::ustring& str) { return str.c_str(); } - static CType to_c_type (const std::string& str) { return str.c_str(); } - static CType to_c_type (CType str) { return str; } - - static CppType to_cpp_type(CType str) - { return (str) ? Glib::ustring(str) : Glib::ustring(); } - - static void release_c_type(CType str) - { g_free(const_cast(str)); } -}; - -/** Specialization for std::string. - * @ingroup ContHelpers - * When converting from C++ to C, std::string will be accepted as well as - * 'const char*'. However, when converting to the C++ side, the output type - * cannot be 'const char*'. - */ -template <> -struct TypeTraits -{ - typedef std::string CppType; - typedef const char * CType; - typedef char * CTypeNonConst; - - static CType to_c_type (const std::string& str) { return str.c_str(); } - static CType to_c_type (const Glib::ustring& str) { return str.c_str(); } - static CType to_c_type (CType str) { return str; } - - static CppType to_cpp_type(CType str) - { return (str) ? std::string(str) : std::string(); } - - static void release_c_type(CType str) - { g_free(const_cast(str)); } -}; - -/** Specialization for bool - * @ingroup ContHelpers - */ -template <> -struct TypeTraits -{ - typedef bool CppType; - typedef gboolean* CType; - typedef gboolean* CTypeNonConst; - - static CType to_c_type (CppType val) { return (int*)GINT_TO_POINTER(val); } - static CType to_c_type (CType ptr) { return ptr; } - - static CppType to_cpp_type(CType ptr) - { - if(ptr) - { - //We use this for gboolean too, because it is actually an int. - return GPOINTER_TO_INT(ptr); - } - else - return CppType(); - } - - static void release_c_type(CType /* ptr */) - { - - } -}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -#ifndef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - -/* The STL containers in Sun's libCstd don't support templated sequence - * constructors, for "backward compatibility" reasons. This helper function - * is used in the ContainerHandle -> STL-container conversion workarounds. - */ -template -void fill_container(Cont& container, In pbegin, In pend) -{ - for(; pbegin != pend; ++pbegin) - container.push_back(*pbegin); -} - -#endif /* GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS */ -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Container_Helpers - -} // namespace Glib - - -#endif /* _GLIBMM_CONTAINERHANDLE_SHARED_H */ - diff --git a/libs/glibmm2/glib/glibmm/containers.cc b/libs/glibmm2/glib/glibmm/containers.cc deleted file mode 100644 index 29f5b9aa0b..0000000000 --- a/libs/glibmm2/glib/glibmm/containers.cc +++ /dev/null @@ -1,33 +0,0 @@ -// -*- c++ -*- - -/* $Id: containers.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* containers.h - * - * Copyright (C) 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -namespace Glib -{ - -gpointer glibmm_null_pointer=0; - - -} //namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/containers.h b/libs/glibmm2/glib/glibmm/containers.h deleted file mode 100644 index 6736e0ecc7..0000000000 --- a/libs/glibmm2/glib/glibmm/containers.h +++ /dev/null @@ -1,372 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_CONTAINERS_H -#define _GLIBMM_CONTAINERS_H - -/* $Id: containers.h 229 2005-11-23 07:22:43Z murrayc $ */ - -/* containers.h - * - * Copyright (C) 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include /* for backward compatibility */ - -#include -#include - -GLIBMM_USING_STD(bidirectional_iterator_tag) -GLIBMM_USING_STD(forward_iterator_tag) - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -namespace Glib -{ - -template class List_Iterator; -template class List_ConstIterator; -template class List_ReverseIterator; - -// Most of these methods in the non-template classes needs to be moved -// to implementation. - -//Daniel Elstner has ideas about generating these per-widget with m4. murrayc. - - -extern GLIBMM_API gpointer glibmm_null_pointer; - -template -class List_Iterator_Base -{ -public: - typedef T value_type; - typedef T* pointer; - typedef T& reference; -} ; - -///For instance, List_Iterator< Gtk::Widget > -template -class List_Iterator : public List_Iterator_Base -{ -public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef typename List_Iterator_Base::pointer pointer; - typedef typename List_Iterator_Base::reference reference; - - GList* const* head_; - GList* node_; - - typedef List_Iterator Self; - - List_Iterator(GList* const& head, GList* node) - : head_(&head), node_(node) - {} - - List_Iterator() - : head_(0), node_(0) - {} - - List_Iterator(const Self& src) - : head_(src.head_), node_(src.node_) - {} - - bool operator==(const Self& src) const { return node_ == src.node_; } - bool operator!=(const Self& src) const { return node_ != src.node_; } - - Self& operator++() - { - if (!node_) - node_ = g_list_first(*head_); - else - node_ = (GList*)g_list_next(node_); - return *this; - } - - Self operator++(int) - { - Self tmp = *this; - ++*this; - return tmp; - } - - Self& operator--() - { - if (!node_) - node_ = g_list_last(*head_); - else - node_ = (GList*)g_list_previous(node_); - - return *this; - } - - Self operator--(int) - { - Self tmp = *this; - --*this; - return tmp; - } - - reference operator*() const - { - return *(pointer)( node_ ? node_->data : glibmm_null_pointer ); - } - - pointer operator -> () const { return &operator*(); } -}; - -///For instance, SList_Iterator< Gtk::Widget > -template -class SList_Iterator : public List_Iterator_Base -{ -public: - typedef std::forward_iterator_tag iterator_category; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef typename List_Iterator_Base::pointer pointer; - typedef typename List_Iterator_Base::reference reference; - - GSList* node_; - typedef SList_Iterator Self; - - SList_Iterator(GSList* node) - : node_(node) - {} - - SList_Iterator() - : node_(0) - {} - - SList_Iterator(const Self& src) - : node_(src.node_) - {} - - bool operator==(const Self& src) const { return node_ == src.node_; } - bool operator!=(const Self& src) const { return node_ != src.node_; } - - Self& operator++() - { - node_ = g_slist_next(node_); - return *this; - } - - Self operator++(int) - { - Self tmp = *this; - ++*this; - return tmp; - } - - reference operator*() const - { - //g++ complains that this statement has no effect: g_assert(node_); - return reinterpret_cast( node_ ? node_->data : glibmm_null_pointer ); - } - - pointer operator -> () const { return &operator*(); } -}; - - -// This iterator variation returns T_IFace (wrapped from T_Impl) -// For instance, List_Cpp_Iterator is a little like std::list::iterator -template -class List_Cpp_Iterator : public List_Iterator_Base -{ -public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef typename List_Iterator_Base::pointer pointer; - typedef typename List_Iterator_Base::reference reference; - - typedef List_Cpp_Iterator Self; - - GList** head_; - GList* node_; - - bool operator==(const Self& src) const { return node_ == src.node_; } - bool operator!=(const Self& src) const { return node_ != src.node_; } - - List_Cpp_Iterator(GList*& head, GList* node ) - : head_(&head), node_(node ) - {} - - List_Cpp_Iterator() - : head_(0), node_(0) - {} - - List_Cpp_Iterator(const Self& src) - : head_(src.head_), node_(src.node_) - {} - - reference operator*() const - { - if (node_ && node_->data) - { - //We copy/paste the widget wrap() implementation here, - //because we can not use a specific Glib::wrap(T_Impl) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = static_cast( (*node_).data ); - - #ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION - return *(dynamic_cast(Glib::wrap_auto(cobj, false /* take_copy */))); - #else - //We really do need to use dynamic_cast<>, so I expect problems if this code is used. murrayc. - return *(static_cast(Glib::wrap_auto(cobj, false /* take_copy */))); - #endif - - } - - return *(pointer)glibmm_null_pointer; - } - - pointer operator->() const { return &operator*(); } - - Self& operator++() - { - if (!node_) - node_ = g_list_first(*head_); - else - node_ = (GList *)g_list_next(node_); - - return *this; - } - - Self operator++(int) - { - Self tmp = *this; - ++*this; - return tmp; - } - - Self& operator--() - { - if (!node_) - node_ = g_list_last(*head_); - else - node_ = (GList *)g_list_previous(node_); - - return *this; - } - - Self operator--(int) - { - Self tmp = *this; - --*this; - return tmp; - } - -}; - -template -class List_ReverseIterator: private T_Base -{ -public: - typedef typename T_Base::iterator_category iterator_category; - typedef typename T_Base::size_type size_type; - typedef typename T_Base::difference_type difference_type; - - typedef typename T_Base::value_type value_type; - typedef typename T_Base::pointer pointer; - typedef typename T_Base::reference reference; - - typedef List_ReverseIterator Self; - - bool operator==(const Self& src) const { return T_Base::operator==(src); } - bool operator!=(const Self& src) const { return T_Base::operator!=(src); } - - List_ReverseIterator(GList* const& head, GList* node) - : T_Base(head, node) - {} - - List_ReverseIterator() - : T_Base() - {} - - List_ReverseIterator(const Self& src) - : T_Base(src) - {} - - List_ReverseIterator(const T_Base& src) - : T_Base(src) - { ++(*this); } - - - Self& operator++() {T_Base::operator--(); return *this;} - Self& operator--() {T_Base::operator++(); return *this;} - Self operator++(int) {Self src = *this; T_Base::operator--(); return src;} - Self operator--(int) {Self src = *this; T_Base::operator++(); return src;} - - reference operator*() const { return T_Base::operator*(); } - pointer operator->() const { return T_Base::operator->(); } -}; - -template -class List_ConstIterator: public T_Base -{ -public: - typedef typename T_Base::iterator_category iterator_category; - typedef typename T_Base::size_type size_type; - typedef typename T_Base::difference_type difference_type; - - typedef const typename T_Base::value_type value_type; - typedef const typename T_Base::pointer pointer; - typedef const typename T_Base::reference reference; - - typedef List_ConstIterator Self; - - bool operator==(const Self& src) const { return T_Base::operator==(src); } - bool operator!=(const Self& src) const { return T_Base::operator!=(src); } - - List_ConstIterator(GList* const& head, GList* node) - : T_Base(head, node) - {} - - List_ConstIterator() - : T_Base() - {} - - List_ConstIterator(const Self& src) - : T_Base(src) - {} - - List_ConstIterator(const T_Base& src) - : T_Base(src) - {} - - Self& operator++() {T_Base::operator++(); return *this;} - Self& operator--() {T_Base::operator--(); return *this;} - Self operator++(int) {Self src = *this; T_Base::operator++(); return src;} - Self operator--(int) {Self src = *this; T_Base::operator--(); return src;} - - reference operator*() const { return T_Base::operator*(); } - pointer operator->() const { return T_Base::operator->(); } -}; - -} // namespace Glib - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -#endif /* _GLIBMM_CONTAINERS_H */ - diff --git a/libs/glibmm2/glib/glibmm/convert.cc b/libs/glibmm2/glib/glibmm/convert.cc deleted file mode 100644 index 0d13461950..0000000000 --- a/libs/glibmm2/glib/glibmm/convert.cc +++ /dev/null @@ -1,436 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: convert.ccg,v 1.4 2006/06/05 17:32:14 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -/**** Glib::IConv **********************************************************/ - -IConv::IConv(const std::string& to_codeset, const std::string& from_codeset) -: - gobject_ (g_iconv_open(to_codeset.c_str(), from_codeset.c_str())) -{ - if(gobject_ == reinterpret_cast(-1)) - { - GError* gerror = 0; - - // Abuse g_convert() to create a GError object. This may seem a weird - // thing to do, but it gives us consistently translated error messages - // at no further cost. - g_convert("", 0, to_codeset.c_str(), from_codeset.c_str(), 0, 0, &gerror); - - // If this should ever fail we're fucked. - g_assert(gerror != 0); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } -} - -IConv::IConv(GIConv gobject) -: - gobject_ (gobject) -{} - -IConv::~IConv() -{ - g_iconv_close(gobject_); -} - -size_t IConv::iconv(char** inbuf, gsize* inbytes_left, char** outbuf, gsize* outbytes_left) -{ - return g_iconv(gobject_, inbuf, inbytes_left, outbuf, outbytes_left); -} - -void IConv::reset() -{ - // Apparently iconv() on Solaris <= 7 segfaults if you pass in - // NULL for anything but inbuf; work around that. (NULL outbuf - // or NULL *outbuf is allowed by Unix98.) - - char* outbuf = 0; - gsize inbytes_left = 0; - gsize outbytes_left = 0; - - g_iconv(gobject_, 0, &inbytes_left, &outbuf, &outbytes_left); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string IConv::convert(const std::string& str) -#else -std::string IConv::convert(const std::string& str, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert_with_iconv( - str.data(), str.size(), gobject_, 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -/**** charset conversion functions *****************************************/ - -bool get_charset() -{ - return g_get_charset(0); -} - -bool get_charset(std::string& charset) -{ - const char* charset_cstr = 0; - const bool is_utf8 = g_get_charset(&charset_cstr); - - charset = charset_cstr; - return is_utf8; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset) -#else -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert( - str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), - 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset) -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert_with_fallback( - str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), 0, - 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback) -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert_with_fallback( - str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), - const_cast(fallback.c_str()), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring locale_to_utf8(const std::string& opsys_string) -#else -Glib::ustring locale_to_utf8(const std::string& opsys_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_locale_to_utf8( - opsys_string.data(), opsys_string.size(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - const ScopedPtr scoped_buf (buf); - return Glib::ustring(scoped_buf.get(), scoped_buf.get() + bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string locale_from_utf8(const Glib::ustring& utf8_string) -#else -std::string locale_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_locale_from_utf8( - utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_utf8(const std::string& opsys_string) -#else -Glib::ustring filename_to_utf8(const std::string& opsys_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_filename_to_utf8( - opsys_string.data(), opsys_string.size(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - const ScopedPtr scoped_buf (buf); - return Glib::ustring(scoped_buf.get(), scoped_buf.get() + bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_utf8(const Glib::ustring& utf8_string) -#else -std::string filename_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_filename_from_utf8( - utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname) -#else -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - char* hostname_buf = 0; - GError* gerror = 0; - - char *const buf = g_filename_from_uri(uri.c_str(), &hostname_buf, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - // Let's take ownership at this point. - const ScopedPtr scoped_buf (buf); - - if(hostname_buf) - hostname = ScopedPtr(hostname_buf).get(); - else - hostname.erase(); - - return std::string(scoped_buf.get()); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri) -#else -std::string filename_from_uri(const Glib::ustring& uri, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - char *const buf = g_filename_from_uri(uri.c_str(), 0, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get()); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname) -#else -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - char *const buf = g_filename_to_uri(filename.c_str(), hostname.c_str(), &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return Glib::ustring(ScopedPtr(buf).get()); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename) -#else -Glib::ustring filename_to_uri(const std::string& filename, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - char *const buf = g_filename_to_uri(filename.c_str(), 0, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return Glib::ustring(ScopedPtr(buf).get()); -} - -Glib::ustring filename_display_basename(const std::string& filename) -{ - char *const buf = g_filename_display_basename(filename.c_str()); - - return Glib::ustring(ScopedPtr(buf).get()); -} - - -Glib::ustring filename_display_name(const std::string& filename) -{ - char *const buf = g_filename_display_name(filename.c_str()); - - return Glib::ustring(ScopedPtr(buf).get()); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::ConvertError::ConvertError(Glib::ConvertError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_CONVERT_ERROR, error_code, error_message) -{} - -Glib::ConvertError::ConvertError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::ConvertError::Code Glib::ConvertError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::ConvertError::throw_func(GError* gobject) -{ - throw Glib::ConvertError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::ConvertError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::ConvertError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/convert.h b/libs/glibmm2/glib/glibmm/convert.h deleted file mode 100644 index 81d24f96a1..0000000000 --- a/libs/glibmm2/glib/glibmm/convert.h +++ /dev/null @@ -1,361 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_CONVERT_H -#define _GLIBMM_CONVERT_H - - -/* $Id: convert.hg,v 1.5 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include /* for gsize */ - -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GIConv* GIConv; } -#endif - - -namespace Glib -{ - -/** @defgroup CharsetConv Character Set Conversion - * Utility functions for converting strings between different character sets. - * @{ - */ - -/** Exception class for charset conversion errors. - * Glib::convert() and friends throw a ConvertError exception if the charset - * conversion failed for some reason. When writing non-trivial applications - * you should always catch those errors, and then try to recover, or tell the - * user the input was invalid. - */ -class ConvertError : public Glib::Error -{ -public: - enum Code - { - NO_CONVERSION, - ILLEGAL_SEQUENCE, - FAILED, - PARTIAL_INPUT, - BAD_URI, - NOT_ABSOLUTE_PATH - }; - - ConvertError(Code error_code, const Glib::ustring& error_message); - explicit ConvertError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** Thin %iconv() wrapper. - * glibmm provides Glib::convert() and Glib::locale_to_utf8() which - * are likely more convenient than the raw iconv wrappers. However, - * creating an IConv object once and using the convert() method could - * be useful when converting multiple times between the same charsets. - */ -class IConv -{ -public: - /** Open new conversion descriptor. - * @param to_codeset Destination codeset. - * @param from_codeset %Source codeset. - * @throw Glib::ConvertError - */ - IConv(const std::string& to_codeset, const std::string& from_codeset); - - explicit IConv(GIConv gobject); - - /** Close conversion descriptor. - */ - ~IConv(); - - /** Same as the standard UNIX routine %iconv(), but may be implemented - * via libiconv on UNIX flavors that lack a native implementation. glibmm - * provides Glib::convert() and Glib::locale_to_utf8() which are likely - * more convenient than the raw iconv wrappers. - * @param inbuf Bytes to convert. - * @param inbytes_left In/out parameter, bytes remaining to convert in @a inbuf. - * @param outbuf Converted output bytes. - * @param outbytes_left In/out parameter, bytes available to fill in @a outbuf. - * @return Count of non-reversible conversions, or static_cast(-1) on error. - */ - size_t iconv(char** inbuf, gsize* inbytes_left, char** outbuf, gsize* outbytes_left); - - /** Reset conversion descriptor to initial state. - * Same as iconv(0, 0, 0, 0), but implemented slightly differently - * in order to work on Sun Solaris <= 7. It's also more obvious so you're - * encouraged to use it. - */ - void reset(); - - /** Convert from one encoding to another. - * @param str The string to convert. - * @return The converted string. - * @throw Glib::ConvertError - */ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - std::string convert(const std::string& str); - #else - std::string convert(const std::string& str, std::auto_ptr& error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - GIConv gobj() { return gobject_; } - -private: - GIConv gobject_; - - // noncopyable - IConv(const IConv&); - IConv& operator=(const IConv&); -}; - - -/** Get the charset used by the current locale. - * @return Whether the current locale uses the UTF-8 charset. - */ -bool get_charset(); - -/** Get the charset used by the current locale. - * @param charset Will be filled with the charset's name. - * @return Whether the current locale uses the UTF-8 charset. - */ -bool get_charset(std::string& charset); - -/** Convert from one encoding to another. - * @param str The string to convert. - * @param to_codeset Name of the target charset. - * @param from_codeset Name of the source charset. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset); -#else -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string from one character set to another, possibly including - * fallback sequences for characters not representable in the output. - * Characters not in the target encoding will be represented as Unicode - * escapes \\x{XXXX} or \\x{XXXXXX}. - * @param str The string to convert. - * @param to_codeset Name of the target charset. - * @param from_codeset Name of the source charset. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset); -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string from one character set to another, possibly including - * fallback sequences for characters not representable in the output. - * @note It is not guaranteed that the specification for the fallback sequences - * in @a fallback will be honored. Some systems may do a approximate conversion - * from @a from_codeset to @a to_codeset in their iconv() functions, in which - * case Glib will simply return that approximate conversion. - * - * @param str The string to convert. - * @param to_codeset Name of the target charset. - * @param from_codeset Name of the source charset. - * @param fallback UTF-8 string to be used in place of characters which aren't - * available in the target encoding. All characters in the fallback string - * @em must be available in the target encoding. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback); -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Convert from the current locale's encoding to UTF-8. - * Convenience wrapper around Glib::convert(). - * @param opsys_string The string to convert. Must be encoded in the charset - * used by the operating system's current locale. - * @return The input string converted to UTF-8 encoding. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring locale_to_utf8(const std::string& opsys_string); -#else -Glib::ustring locale_to_utf8(const std::string& opsys_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Convert from UTF-8 to the current locale's encoding. - * Convenience wrapper around Glib::convert(). - * @param utf8_string The UTF-8 string to convert. - * @return The input string converted to the charset used by the operating - * system's current locale. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string locale_from_utf8(const Glib::ustring& utf8_string); -#else -std::string locale_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string which is in the encoding used for filenames into - * a UTF-8 string. - * @param opsys_string A string in the encoding for filenames. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_utf8(const std::string& opsys_string); -#else -Glib::ustring filename_to_utf8(const std::string& opsys_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string from UTF-8 to the encoding used for filenames. - * @param utf8_string A UTF-8 encoded string. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_utf8(const Glib::ustring& utf8_string); -#else -std::string filename_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an escaped UTF-8 encoded URI to a local filename - * in the encoding used for filenames. - * @param uri A string in the encoding for filenames. - * @param hostname Location to store hostname for the URI. If there is no - * hostname in the URI, "" will be stored in this location. - * @return The resulting filename. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname); -#else -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an escaped UTF-8 encoded URI to a local filename in the encoding - * used for filenames. - * @param uri A string in the encoding for filenames. - * @return The resulting filename. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri); -#else -std::string filename_from_uri(const Glib::ustring& uri, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an absolute filename to an escaped UTF-8 encoded URI. - * @param filename An absolute filename specified in the encoding used - * for filenames by the operating system. - * @param hostname A UTF-8 encoded hostname. - * @return The resulting URI. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname); -#else -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an absolute filename to an escaped UTF-8 encoded URI. - * @param filename An absolute filename specified in the encoding used - * for filenames by the operating system. - * @return The resulting URI. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename); -#else -Glib::ustring filename_to_uri(const std::string& filename, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Returns the display basename for the particular filename, guaranteed - * to be valid UTF-8. The display name might not be identical to the filename, - * for instance there might be problems converting it to UTF-8, and some files - * can be translated in the display - * - * You must pass the whole absolute pathname to this function so that - * translation of well known locations can be done. - * - * This function is preferred over filename_display_name() if you know the - * whole path, as it allows translation. - * - * @param filename An absolute pathname in the GLib file name encoding. - * @result A string containing a rendition of the basename of the filename in valid UTF-8 - */ -Glib::ustring filename_display_basename(const std::string& filename); - -/** Converts a filename into a valid UTF-8 string. The - * conversion is not necessarily reversible, so you - * should keep the original around and use the return - * value of this function only for display purposes. - * Unlike g_filename_to_utf8(), the result is guaranteed - * to be non-empty even if the filename actually isn't in the GLib - * file name encoding. - * - * If you know the whole pathname of the file you should use - * g_filename_display_basename(), since that allows location-based - * translation of filenames. - * - * @param filename: a pathname hopefully in the GLib file name encoding - * @result A string containing a rendition of the filename in valid UTF-8. - */ -Glib::ustring filename_display_name(const std::string& filename); - -/** @} group CharsetConv */ - -} // namespace Glib - - -#endif /* _GLIBMM_CONVERT_H */ - diff --git a/libs/glibmm2/glib/glibmm/date.cc b/libs/glibmm2/glib/glibmm/date.cc deleted file mode 100644 index eb71cf314a..0000000000 --- a/libs/glibmm2/glib/glibmm/date.cc +++ /dev/null @@ -1,388 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: date.ccg,v 1.7 2006/07/16 13:54:02 jjongsma Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#include -#include - -#include -#include - -#include -GLIBMM_USING_STD(max) - -namespace Glib -{ - -Date::Date() -{ - g_date_clear(&gobject_, 1); -} - -Date::Date(Date::Day day, Date::Month month, Date::Year year) -{ - g_date_clear(&gobject_, 1); - g_date_set_dmy(&gobject_, day, (GDateMonth) month, year); -} - -Date::Date(guint32 julian_day) -{ - g_date_clear(&gobject_, 1); - g_date_set_julian(&gobject_, julian_day); -} - -Date::Date(const GDate& castitem) -: - gobject_ (castitem) -{} - -void Date::clear() -{ - g_date_clear(&gobject_, 1); -} - -void Date::set_parse(const Glib::ustring& str) -{ - g_date_set_parse(&gobject_, str.c_str()); -} - - -#ifndef GLIBMM_DISABLE_DEPRECATED - - -//Avoid a build problem in the case that time_t is equivalent to guint32 (GTime is also guint32) -//That would make the set_time() method overload impossible. -#ifdef GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 -void Date::set_time(GTime time) -{ - //This method, and the C function that it wraps, are deprecated. - g_date_set_time(&gobject_, time); -} -#endif //GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 - -#endif // GLIBMM_DISABLE_DEPRECATED - - -void Date::set_time(time_t timet) -{ - g_date_set_time_t(&gobject_, timet); -} - -void Date::set_time_current() -{ - //As suggested in the C documentation: - g_date_set_time_t(&gobject_, time(NULL)); -} - -void Date::set_time(const GTimeVal& timeval) -{ - g_date_set_time_val(&gobject_, const_cast(&timeval)); -} - -void Date::set_month(Date::Month month) -{ - g_date_set_month(&gobject_, (GDateMonth) month); -} - -void Date::set_day(Date::Day day) -{ - g_date_set_day(&gobject_, day); -} - -void Date::set_year(Date::Year year) -{ - g_date_set_year(&gobject_, year); -} - -void Date::set_dmy(Date::Day day, Date::Month month, Date::Year year) -{ - g_date_set_dmy(&gobject_, day, (GDateMonth) month, year); -} - -void Date::set_julian(guint32 julian_day) -{ - g_date_set_julian(&gobject_, julian_day); -} - -Date& Date::add_days(int n_days) -{ - if(n_days >= 0) - g_date_add_days(&gobject_, n_days); - else - g_date_subtract_days(&gobject_, -n_days); - return *this; -} - -Date& Date::subtract_days(int n_days) -{ - if(n_days >= 0) - g_date_subtract_days(&gobject_, n_days); - else - g_date_add_days(&gobject_, -n_days); - return *this; -} - -Date& Date::add_months(int n_months) -{ - if(n_months >= 0) - g_date_add_months(&gobject_, n_months); - else - g_date_subtract_months(&gobject_, -n_months); - return *this; -} - -Date& Date::subtract_months(int n_months) -{ - if(n_months >= 0) - g_date_subtract_months(&gobject_, n_months); - else - g_date_add_months(&gobject_, -n_months); - return *this; -} - -Date& Date::add_years(int n_years) -{ - if(n_years >= 0) - g_date_add_years(&gobject_, n_years); - else - g_date_subtract_years(&gobject_, -n_years); - return *this; -} - -Date& Date::subtract_years(int n_years) -{ - if(n_years >= 0) - g_date_subtract_years(&gobject_, n_years); - else - g_date_add_years(&gobject_, -n_years); - return *this; -} - -int Date::days_between(const Date& rhs) const -{ - return g_date_days_between(&gobject_, &rhs.gobject_); -} - -int Date::compare(const Date& rhs) const -{ - return g_date_compare(&gobject_, &rhs.gobject_); -} - -Date& Date::clamp(const Date& min_date, const Date& max_date) -{ - g_date_clamp(&gobject_, &min_date.gobject_, &max_date.gobject_); - return *this; -} - -Date& Date::clamp_min(const Date& min_date) -{ - g_date_clamp(&gobject_, &min_date.gobject_, 0 /* see the C docs */); - return *this; -} - -Date& Date::clamp_max(const Date& max_date) -{ - g_date_clamp(&gobject_, 0 /* see the C docs */, &max_date.gobject_); - return *this; -} - -void Date::order(Date& other) -{ - g_date_order(&gobject_, &other.gobject_); -} - -Date::Weekday Date::get_weekday() const -{ - return (Date::Weekday) g_date_get_weekday(&gobject_); -} - -Date::Month Date::get_month() const -{ - return (Date::Month) g_date_get_month(&gobject_); -} - -Date::Year Date::get_year() const -{ - return g_date_get_year(&gobject_); -} - -Date::Day Date::get_day() const -{ - return g_date_get_day(&gobject_); -} - -guint32 Date::get_julian() const -{ - return g_date_get_julian(&gobject_); -} - -unsigned int Date::get_day_of_year() const -{ - return g_date_get_day_of_year(&gobject_); -} - -unsigned int Date::get_monday_week_of_year() const -{ - return g_date_get_monday_week_of_year(&gobject_); -} - -unsigned int Date::get_sunday_week_of_year() const -{ - return g_date_get_sunday_week_of_year(&gobject_); -} - -bool Date::is_first_of_month() const -{ - return g_date_is_first_of_month(&gobject_); -} - -bool Date::is_last_of_month() const -{ - return g_date_is_last_of_month(&gobject_); -} - -//static -guint8 Date::get_days_in_month(Date::Month month, Date::Year year) -{ - return g_date_get_days_in_month((GDateMonth) month, year); -} - -//static -guint8 Date::get_monday_weeks_in_year(Date::Year year) -{ - return g_date_get_monday_weeks_in_year(year); -} - -//static -guint8 Date::get_sunday_weeks_in_year(Date::Year year) -{ - return g_date_get_sunday_weeks_in_year(year); -} - -//static -bool Date::is_leap_year(Date::Year year) -{ - return g_date_is_leap_year(year); -} - -Glib::ustring Date::format_string(const Glib::ustring& format) const -{ - struct tm tm_data; - g_date_to_struct_tm(&gobject_, &tm_data); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - const std::string locale_format = locale_from_utf8(format); - #else - std::auto_ptr error; //TODO: Check it? - const std::string locale_format = locale_from_utf8(format, error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - gsize bufsize = std::max(2 * locale_format.size(), 128); - - do - { - const ScopedPtr buf (static_cast(g_malloc(bufsize))); - - // Set the first byte to something other than '\0', to be able to - // recognize whether strftime actually failed or just returned "". - buf.get()[0] = '\1'; - const gsize len = strftime(buf.get(), bufsize, locale_format.c_str(), &tm_data); - - if(len != 0 || buf.get()[0] == '\0') - { - g_assert(len < bufsize); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - return locale_to_utf8(std::string(buf.get(), len)); - #else - std::auto_ptr error; //TODO: Check it? - return locale_to_utf8(std::string(buf.get(), len), error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - } - while((bufsize *= 2) <= 65536); - - // This error is quite unlikely (unless strftime is buggy). - g_warning("Glib::Date::format_string(): maximum size of strftime buffer exceeded, giving up"); - - return Glib::ustring(); -} - -void Date::to_struct_tm(struct tm& dest) const -{ - g_date_to_struct_tm(&gobject_, &dest); -} - -bool Date::valid() const -{ - return g_date_valid(&gobject_); -} - -//static -bool Date::valid_day(Date::Day day) -{ - return g_date_valid_day(day); -} - -//static -bool Date::valid_month(Date::Month month) -{ - return g_date_valid_month((GDateMonth) month); -} - -//static -bool Date::valid_year(Date::Year year) -{ - return g_date_valid_year(year); -} - -//static -bool Date::valid_weekday(Date::Weekday weekday) -{ - return g_date_valid_weekday((GDateWeekday) weekday); -} - -//static -bool Date::valid_julian(guint32 julian_day) -{ - return g_date_valid_julian(julian_day); -} - -//static -bool Date::valid_dmy(Date::Day day, Date::Month month, Date::Year year) -{ - return g_date_valid_dmy(day, (GDateMonth) month, year); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - diff --git a/libs/glibmm2/glib/glibmm/date.h b/libs/glibmm2/glib/glibmm/date.h deleted file mode 100644 index 1efdcd6b62..0000000000 --- a/libs/glibmm2/glib/glibmm/date.h +++ /dev/null @@ -1,461 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_DATE_H -#define _GLIBMM_DATE_H - - -/* $Id: date.hg,v 1.6 2005/11/29 15:53:27 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - - #undef G_DISABLE_DEPRECATED //So we can use deprecated functions in our deprecated methods. - -#include - -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { struct tm; } -#endif - -namespace Glib -{ - -/** Julian calendar date. - */ -class Date -{ -public: - typedef guint8 Day; - typedef guint16 Year; - - /** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - */ -enum Month -{ - BAD_MONTH, - JANUARY, - FEBRUARY, - MARCH, - APRIL, - MAY, - JUNE, - JULY, - AUGUST, - SEPTEMBER, - OCTOBER, - NOVEMBER, - DECEMBER -}; - - - /** - * @ingroup glibmmEnums - */ -enum Weekday -{ - BAD_WEEKDAY, - MONDAY, - TUESDAY, - WEDNESDAY, - THURSDAY, - FRIDAY, - SATURDAY, - SUNDAY -}; - - - /** - * @ingroup glibmmEnums - */ -enum DMY -{ - DAY, - MONTH, - YEAR -}; - - - static const Day BAD_DAY = 0; - static const Year BAD_YEAR = 0; - static const guint32 BAD_JULIAN = 0; - - Date(); - Date(Day day, Month month, Year year); - explicit Date(guint32 julian_day); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit Date(const GDate& castitem); -#endif - - void clear(); - /** Clear the date. The cleared dates will not represent an existing date, but will not contain garbage. - * @param month Month to set. - */ - - /** Parses a user-inputted string str, and try to figure out what date it represents, taking the current locale into account. If the string is successfully parsed, the date will be valid after the call. Otherwise, it will be invalid. - * This function is not appropriate for file formats and the like; it isn't very precise, and its exact behavior varies with the locale. It's intended to be a heuristic routine that guesses what the user means by a given string (and it does work pretty well in that capacity). - * @param str String to parse. - */ - void set_parse (const Glib::ustring& str); - - - #ifndef GLIBMM_DISABLE_DEPRECATED - - - //Avoid a build problem in the case that time_t is equivalent to guint32 (GTime is also guint32) - //That would make the set_time() method overload impossible. - #ifdef GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 - /** Sets the value of a date from a GTime (time_t) value. - * - * @param time GTime value to set. - * - * @deprecated Please use set_time(time_t) or set_time(const GTimeVal&). - */ - void set_time(GTime time); - #endif //GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 - - #endif // GLIBMM_DISABLE_DEPRECATED - - - /** Sets the value of a date from a time_t value. - * - * @param timet time_t value to set - * - * @see set_time_current() - * - * Since: 2.10 - */ - void set_time(time_t timet); - - /** Sets the value of a date from a GTimeVal value. Note that the - * tv_usec member is ignored, because Glib::Date can't make use of the - * additional precision. - * - * @see set_time_current() - * - * @param timeval GTimeVal value to set - * - * Since: 2.10 - */ - void set_time(const GTimeVal& timeval); - - void set_time_current(); - - /** Sets the month of the year. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param month Month to set. - */ - void set_month(Month month); - - /** Sets the day of the month. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param day Day to set. - */ - void set_day(Day day); - - /** Sets the year. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param year Year to set. - */ - void set_year(Year year); - - /** Sets the value of a day, month, and year.. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param day Day to set. - * @param month Month to set. - * @param year Year to set. - */ - void set_dmy(Day day, Month month, Year year); - - /** Sets the value of a GDate from a Julian day number. - * @param julian_day Julian day to set. - */ - void set_julian(guint32 julian_day); - - //TODO: Why return Date& (which is always *this) from these methods? - //Isn't it enough to also change the current instance? - //Maybe we need a copy constructor too. - //murrayc - - /** Add a number of days to a Date. - * @param n_days Days to add. - * @return Resulting Date - */ - Date& add_days(int n_days); - - /** Subtract n_days to a Date. - * @param n_days Days to subtract. - * @return Resulting Date - */ - Date& subtract_days(int n_days); - - /** Add n_months to a Date. - * @param n_months Months to add. - * @return Resulting Date - */ - Date& add_months(int n_months); - - /** Subtract n_months to a Date. - * @param n_months Months to subtract. - * @return Resulting Date - */ - Date& subtract_months(int n_months); - - /** Add n_days to a Date. - * @param n_years Years to add. - * @return Resulting Date - */ - Date& add_years(int n_years); - - /** Subtract n_years to a Date. - * @param n_years Years to subtract. - * @return Resulting Date - */ - Date& subtract_years(int n_years); - - /** Calculate days between two dates. - * @param rhs Date. - * @return Numbers of days. - */ - int days_between(const Date& rhs) const; - - /** Compare two dates. - * @param rhs Date to compare. - * @return Result of comparition. - */ - int compare(const Date& rhs) const; - - /** If date is prior to min_date, sets date equal to min_date. - * If date falls after max_date, sets date equal to max_date. All dates must be valid. - * See also clamp_min() and clamp_max(). - * @param min_date Date minimum value. - * @param max_date Date maximum value. - * @return Date in interval. - */ - Date& clamp(const Date& min_date, const Date& max_date); - - /** If date is prior to min_date, sets date equal to min_date. - * See also clamp(), and clamp_max(). - * @param min_date Date minimum value. - * @return Date in interval. - */ - Date& clamp_min(const Date& min_date); - - /** If date falls after max_date, sets date equal to max_date. - * See also clamp(), and clamp_min(). - * @param max_date Date maximum value. - * @return Date in interval. - */ - Date& clamp_max(const Date& max_date); - - /** Checks if date is less than or equal to other date, and swap the values if this is not the case. - * @param other Date ro compare. - * @return Date. - */ - void order(Date& other); - - /** Returns the day of the week for a Date. The date must be valid. - * @return Day of the week as a Date::Weekday. - */ - Weekday get_weekday() const; - - /** Returns the month of the year. The date must be valid. - * @return Month of the year as a Date::Month. - */ - Month get_month() const; - - /** Returns the year of a Date. The date must be valid. - * @return Year in which the date falls. - */ - Year get_year() const; - - /** Returns the day of the month. The date must be valid. - * @return Day of the month.. - */ - Day get_day() const; - - /** Returns the Julian day or "serial number" of the Date. - * The Julian day is simply the number of days since January 1, Year 1; - * i.e., January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, etc. - * The date must be valid. - * @return Julian day. - */ - guint32 get_julian() const; - - /** Returns the day of the year, where Jan 1 is the first day of the year. - * The date must be valid. - * @return Julian day. - */ - unsigned int get_day_of_year() const; - - /** Returns the week of the year, where weeks are understood to start on Monday. - * If the date is before the first Monday of the year, return 0. - * The date must be valid. - * @return Week of the year. - */ - unsigned int get_monday_week_of_year() const; - - /** Returns the week of the year during which this date falls, if weeks are understood to being on Sunday. - * Can return 0 if the day is before the first Sunday of the year. - * The date must be valid. - * @return Week of the year. - */ - unsigned int get_sunday_week_of_year() const; - - /** Returns true if the date is on the first of a month. - * The date must be valid. - * @return true if the date is the first of the month. - */ - bool is_first_of_month() const; - - /** Returns true if the date is the last day of the month. - * The date must be valid. - * @return true if the date is the last day of the month. - */ - bool is_last_of_month() const; - - /** Returns the number of days in a month, taking leap years into account. - * @param month Month. - * @param year Year. - * @return Number of days in month during the year. - */ - static guint8 get_days_in_month(Month month, Year year); - - /** Returns the number of weeks in the year, where weeks are taken to start on Monday. Will be 52 or 53. - * (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Mondays are in the year, i.e. there are 53 Mondays if one of the extra days happens to be a Monday.) - * @param year Year to count weeks in. - * @return Number of weeks. - */ - static guint8 get_monday_weeks_in_year(Year year); - - /** Returns the number of weeks in the year, where weeks are taken to start on Sunday. Will be 52 or 53. - * (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Sundays are in the year, i.e. there are 53 Sundays if one of the extra days happens to be a Sunday.) - * @param year Year to count weeks in. - * @return Number of weeks. - */ - static guint8 get_sunday_weeks_in_year(Year year); - - /** Returns true if the year is a leap year. - * @param year Year to check. - * @return true if the year is a leap year. - */ - static bool is_leap_year(Year year); - - /** Convert date to string. - * @param format A format string as used by @c strftime(), in UTF-8 - * encoding. Only date formats are allowed, the result of time formats - * is undefined. - * @return The formatted date string. - * @throw Glib::ConvertError - */ - Glib::ustring format_string(const Glib::ustring& format) const; - - /** Fills in the date-related bits of a struct tm using the date value. Initializes the non-date parts with something sane but meaningless. - * @param dest Struct tm to fill. - */ - void to_struct_tm(struct tm& dest) const; - - /** Returns true if the Date represents an existing day. - * @return true if the date is valid. - */ - bool valid() const; - - /** Returns true if the day of the month is valid (a day is valid if it's between 1 and 31 inclusive). - * @param day Day to check. - * @return true if the day is valid. - */ - static bool valid_day(Day day); - - /** Returns true if the month value is valid. The 12 Date::Month enumeration values are the only valid months. - * @param month Month to check. - * @return true if the month is valid. - */ - static bool valid_month(Month month); - - - /** Returns true if the year is valid. - * Any year greater than 0 is valid, though there is a 16-bit limit to what Date will understand. - * @param year Year to check. - * @return true if the year is valid. - */ - static bool valid_year(Year year); - - /** Returns true if the weekday is valid. - * The 7 Date::Weekday enumeration values are the only valid. - * @param weekday Weekday to check. - * @return true if the weekday is valid. - */ - static bool valid_weekday(Weekday weekday); - - /** Returns true if the Julian day is valid. - * Anything greater than zero is basically a valid Julian, though there is a 32-bit limit. - * @param julian_day Julian day to check. - * @return true if the Julian day is valid. - */ - static bool valid_julian(guint32 julian_day); - - - /** Returns true if the day-month-year triplet forms a valid, existing day in the range of days Date understands (Year 1 or later, no more than a few thousand years in the future). - * @param day Day to check. - * @param month Month to check. - * @param year Year to check. - * @return true if the date is a valid one. - */ - static bool valid_dmy(Day day, Month month, Year year); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GDate* gobj() { return &gobject_; } - const GDate* gobj() const { return &gobject_; } -#endif - -private: - GDate gobject_; -}; - - -/** @relates Glib::Date */ -inline bool operator==(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) == 0); } - -/** @relates Glib::Date */ -inline bool operator!=(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) != 0); } - -/** @relates Glib::Date */ -inline bool operator<(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) < 0); } - -/** @relates Glib::Date */ -inline bool operator>(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) > 0); } - -/** @relates Glib::Date */ -inline bool operator<=(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) <= 0); } - -/** @relates Glib::Date */ -inline bool operator>=(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) >= 0); } - -} // namespace Glib - - -#endif /* _GLIBMM_DATE_H */ - diff --git a/libs/glibmm2/glib/glibmm/debug.cc b/libs/glibmm2/glib/glibmm/debug.cc deleted file mode 100644 index 65f3c18719..0000000000 --- a/libs/glibmm2/glib/glibmm/debug.cc +++ /dev/null @@ -1,21 +0,0 @@ -/* $Id: debug.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - diff --git a/libs/glibmm2/glib/glibmm/debug.h b/libs/glibmm2/glib/glibmm/debug.h deleted file mode 100644 index 3d7368a0c5..0000000000 --- a/libs/glibmm2/glib/glibmm/debug.h +++ /dev/null @@ -1,85 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_DEBUG_H -#define _GLIBMM_DEBUG_H - -/* $Id: debug.h 17 2003-01-22 12:09:02Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -// Some stuff that's useful when debugging gtkmm internals: - -#ifdef GLIBMM_DEBUG_REFCOUNTING - -#include - -/* We can't use G_GNUC_PRETTY_FUNCTION because it's always disabled in C++, - * even though __PRETTY_FUNCTION__ works fine in C++ as well if you use it - * right (i.e. concatenation with string literals isn't allowed). - */ -#ifdef __GNUC__ -#define GLIBMM_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ -#else -#define GLIBMM_GNUC_PRETTY_FUNCTION "" -#endif - -#define GLIBMM_DEBUG_REFERENCE(cppInstance, cInstance) \ - G_STMT_START{ \ - void *const cppInstance__ = (void*) (cppInstance); \ - void *const cInstance__ = (void*) (cInstance); \ - g_log(G_LOG_DOMAIN, \ - G_LOG_LEVEL_DEBUG, \ - "file %s: line %d (%s):\n" \ - "ref: C++ instance: %p; C instance: %p, ref_count = %u, type = %s\n", \ - __FILE__, \ - __LINE__, \ - GLIBMM_GNUC_PRETTY_FUNCTION, \ - cppInstance__, \ - cInstance__, \ - G_OBJECT(cInstance__)->ref_count, \ - G_OBJECT_TYPE_NAME(cInstance__)); \ - }G_STMT_END - -#define GLIBMM_DEBUG_UNREFERENCE(cppInstance, cInstance) \ - G_STMT_START{ \ - void *const cppInstance__ = (void*) (cppInstance); \ - void *const cInstance__ = (void*) (cInstance); \ - g_log(G_LOG_DOMAIN, \ - G_LOG_LEVEL_DEBUG, \ - "file %s: line %d (%s):\n" \ - "unref: C++ instance: %p; C instance: %p, ref_count = %u, type = %s\n", \ - __FILE__, \ - __LINE__, \ - GLIBMM_GNUC_PRETTY_FUNCTION, \ - cppInstance__, \ - cInstance__, \ - G_OBJECT(cInstance__)->ref_count, \ - G_OBJECT_TYPE_NAME(cInstance__)); \ - }G_STMT_END - -#else - -#define GLIBMM_DEBUG_REFERENCE(cppInstance,cInstance) G_STMT_START{ (void)0; }G_STMT_END -#define GLIBMM_DEBUG_UNREFERENCE(cppInstance,cInstance) G_STMT_START{ (void)0; }G_STMT_END - -#endif /* GLIBMM_DEBUG_REFCOUNTING */ - -#endif /* _GLIBMM_DEBUG_H */ - diff --git a/libs/glibmm2/glib/glibmm/dispatcher.cc b/libs/glibmm2/glib/glibmm/dispatcher.cc deleted file mode 100644 index 4cf57b6384..0000000000 --- a/libs/glibmm2/glib/glibmm/dispatcher.cc +++ /dev/null @@ -1,464 +0,0 @@ -// -*- c++ -*- -/* $Id: dispatcher.cc 370 2007-01-20 10:53:28Z daniel $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef G_OS_WIN32 -# include -# include -# include -# include -#else -# include -#endif - -// EINTR is not defined on Tru64. I have tried including these: -// #include -// #include -// #include -// danielk: I think someone should just do a grep on a Tru64 box. Googling -// for "tru64 EINTR" returns lots of hits telling me that handling EINTR is -// actually a requirement on Tru64. So it must exist. -#if defined(_tru64) && !defined(EINTR) -# define EINTR 0 /* TODO: should use the real define */ -#endif - -namespace -{ - -struct DispatchNotifyData -{ - Glib::Dispatcher* dispatcher; - Glib::DispatchNotifier* notifier; - - DispatchNotifyData() - : dispatcher (0), notifier (0) {} - - DispatchNotifyData(Glib::Dispatcher* d, Glib::DispatchNotifier* n) - : dispatcher (d), notifier (n) {} -}; - -static void warn_failed_pipe_io(const char* what) -{ -#ifdef G_OS_WIN32 - const char *const message = g_win32_error_message(GetLastError()); -#else - const char *const message = g_strerror(errno); -#endif - g_critical("Error in inter-thread communication: %s() failed: %s", what, message); -} - -#ifdef G_OS_WIN32 - -static void fd_close_and_invalidate(HANDLE& fd) -{ - if(fd != 0) - { - if(!CloseHandle(fd)) - warn_failed_pipe_io("CloseHandle"); - - fd = 0; - } -} -#else /* !G_OS_WIN32 */ -/* - * Set the close-on-exec flag on the file descriptor, - * so that it won't be leaked if a new process is spawned. - */ -static void fd_set_close_on_exec(int fd) -{ - const int flags = fcntl(fd, F_GETFD, 0); - - if(flags < 0 || fcntl(fd, F_SETFD, unsigned(flags) | FD_CLOEXEC) < 0) - warn_failed_pipe_io("fcntl"); -} - -static void fd_close_and_invalidate(int& fd) -{ - if(fd >= 0) - { - int result; - - do - result = close(fd); - while(G_UNLIKELY(result < 0) && errno == EINTR); - - if(G_UNLIKELY(result < 0)) - warn_failed_pipe_io("close"); - - fd = -1; - } -} -#endif /* !G_OS_WIN32 */ - -} // anonymous namespace - -namespace Glib -{ - -class DispatchNotifier : public sigc::trackable -{ -public: - ~DispatchNotifier(); - - static DispatchNotifier* reference_instance(const Glib::RefPtr& context); - static void unreference_instance(DispatchNotifier* notifier); - - void send_notification(Dispatcher* dispatcher); - -protected: - // Only used by reference_instance(). Should be private, but that triggers - // a silly gcc warning even though DispatchNotifier has static methods. - explicit DispatchNotifier(const Glib::RefPtr& context); - -private: - static Glib::StaticPrivate thread_specific_instance_; - - long ref_count_; - Glib::RefPtr context_; -#ifdef G_OS_WIN32 - Glib::Mutex mutex_; - std::list notify_queue_; - HANDLE fd_receiver_; -#else - int fd_receiver_; - int fd_sender_; -#endif - - void create_pipe(); - bool pipe_io_handler(Glib::IOCondition condition); - - // noncopyable - DispatchNotifier(const DispatchNotifier&); - DispatchNotifier& operator=(const DispatchNotifier&); -}; - -/**** Glib::DispatchNotifier ***********************************************/ - -// static -Glib::StaticPrivate -DispatchNotifier::thread_specific_instance_ = GLIBMM_STATIC_PRIVATE_INIT; - -DispatchNotifier::DispatchNotifier(const Glib::RefPtr& context) -: - ref_count_ (0), - context_ (context), -#ifdef G_OS_WIN32 - mutex_ (), - notify_queue_ (), - fd_receiver_ (0) -#else - fd_receiver_ (-1), - fd_sender_ (-1) -#endif -{ - create_pipe(); - -#if defined(GLIBMM_EXCEPTIONS_ENABLED) - try -#elif defined(G_OS_WIN32) - if(fd_receiver_) -#else - if(fd_receiver_ >= 0) -#endif - { -#ifdef G_OS_WIN32 - const int fd = GPOINTER_TO_INT(fd_receiver_); -#else - const int fd = fd_receiver_; -#endif - context_->signal_io().connect(sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler), - fd, Glib::IO_IN); - } -#ifdef GLIBMM_EXCEPTIONS_ENABLED - catch(...) - { -# ifndef G_OS_WIN32 - fd_close_and_invalidate(fd_sender_); -# endif - fd_close_and_invalidate(fd_receiver_); - - throw; - } -#endif /* GLIBMM_EXCEPTIONS_ENABLED */ -} - -DispatchNotifier::~DispatchNotifier() -{ -#ifndef G_OS_WIN32 - fd_close_and_invalidate(fd_sender_); -#endif - fd_close_and_invalidate(fd_receiver_); -} - -void DispatchNotifier::create_pipe() -{ -#ifdef G_OS_WIN32 - - // On Win32, create a synchronization object instead of a pipe and store - // its handle as fd_receiver_. Use a manual-reset event object, so that - // we can closely match the behavior on Unix in pipe_io_handler(). - const HANDLE event = CreateEvent(0, TRUE, FALSE, 0); - - if(!event) - { -# ifdef GLIBMM_EXCEPTIONS_ENABLED - GError* const error = g_error_new(G_FILE_ERROR, G_FILE_ERROR_FAILED, - "Failed to create event for inter-thread communication: %s", - g_win32_error_message(GetLastError())); - throw Glib::FileError(error); -# else - warn_failed_pipe_io("CreateEvent"); // TODO: see below - return; -# endif - } - - fd_receiver_ = event; - -#else /* !G_OS_WIN32 */ - - int filedes[2] = { -1, -1 }; - - if(pipe(filedes) < 0) - { -# ifdef GLIBMM_EXCEPTIONS_ENABLED - GError* const error = g_error_new(G_FILE_ERROR, g_file_error_from_errno(errno), - "Failed to create pipe for inter-thread communication: %s", - g_strerror(errno)); - throw Glib::FileError(error); -# else - // TODO: Provide an alternative to the exception. This is not trivial - // from within a constructor, though. One possibility would be to add - // a Glib::Dispatcher::valid() method which returns whether construction - // was successful. - warn_failed_pipe_io("pipe"); - return; -# endif - } - - fd_set_close_on_exec(filedes[0]); - fd_set_close_on_exec(filedes[1]); - - fd_receiver_ = filedes[0]; - fd_sender_ = filedes[1]; - -#endif /* !G_OS_WIN32 */ -} - -// static -DispatchNotifier* DispatchNotifier::reference_instance(const Glib::RefPtr& context) -{ - DispatchNotifier* instance = thread_specific_instance_.get(); - - if(!instance) - { - instance = new DispatchNotifier(context); - thread_specific_instance_.set(instance); - } - else - { - // Prevent massive mess-up. - g_return_val_if_fail(instance->context_ == context, 0); - } - - ++instance->ref_count_; // initially 0 - - return instance; -} - -// static -void DispatchNotifier::unreference_instance(DispatchNotifier* notifier) -{ - DispatchNotifier *const instance = thread_specific_instance_.get(); - - // Yes, the notifier argument is only used to check for sanity. - g_return_if_fail(instance == notifier); - - if(--instance->ref_count_ <= 0) - { - g_return_if_fail(instance->ref_count_ == 0); // could be < 0 if messed up - - // This causes deletion of the notifier object. - thread_specific_instance_.set(0); - } -} - -void DispatchNotifier::send_notification(Dispatcher* dispatcher) -{ -#ifdef G_OS_WIN32 - { - const Mutex::Lock lock (mutex_); - - const bool was_empty = notify_queue_.empty(); - notify_queue_.push_back(DispatchNotifyData(dispatcher, this)); - - if(was_empty) - { - // The event will stay in signaled state until it is reset - // in pipe_io_handler() after processing the last queued event. - if(!SetEvent(fd_receiver_)) - warn_failed_pipe_io("SetEvent"); - } - } -#else /* !G_OS_WIN32 */ - - DispatchNotifyData data (dispatcher, this); - gssize n_written; - - do - n_written = write(fd_sender_, &data, sizeof(data)); - while(G_UNLIKELY(n_written < 0) && errno == EINTR); - - // All data must be written in a single call to write(), otherwise we cannot - // guarantee reentrancy since another thread might be scheduled between two - // write() calls. From the glibc manual: - // - // "Reading or writing pipe data is atomic if the size of data written is not - // greater than PIPE_BUF. This means that the data transfer seems to be an - // instantaneous unit, in that nothing else in the system can observe a state - // in which it is partially complete. Atomic I/O may not begin right away (it - // may need to wait for buffer space or for data), but once it does begin it - // finishes immediately." - // - // The minimum value allowed by POSIX for PIPE_BUF is 512, so we are on safe - // grounds here. - - if(G_UNLIKELY(n_written != sizeof(data))) - warn_failed_pipe_io("write"); - -#endif /* !G_OS_WIN32 */ -} - -bool DispatchNotifier::pipe_io_handler(Glib::IOCondition) -{ - DispatchNotifyData data; - -#ifdef G_OS_WIN32 - { - const Mutex::Lock lock (mutex_); - - // Should never be empty at this point, but let's allow for bogus - // notifications with no data available anyway; just to be safe. - if(notify_queue_.empty()) - { - if(!ResetEvent(fd_receiver_)) - warn_failed_pipe_io("ResetEvent"); - - return true; - } - - data = notify_queue_.front(); - notify_queue_.pop_front(); - - // Handle only a single event with each invocation of the I/O handler, - // and reset to nonsignaled state only after the last event in the queue - // has been processed. This matches the behavior on Unix. - if(notify_queue_.empty()) - { - if(!ResetEvent(fd_receiver_)) - warn_failed_pipe_io("ResetEvent"); - } - } -#else /* !G_OS_WIN32 */ - - gssize n_read; - - do - n_read = read(fd_receiver_, &data, sizeof(data)); - while(G_UNLIKELY(n_read < 0) && errno == EINTR); - - // Pipe I/O of a block size not greater than PIPE_BUF should be atomic. - // See the comment on atomicity in send_notification() for details. - if(G_UNLIKELY(n_read != sizeof(data))) - { - // Should probably never be zero, but for safety let's allow for bogus - // notifications when no data is actually available. Although in fact - // the read() should block in that case. - if(n_read != 0) - warn_failed_pipe_io("read"); - - return true; - } -#endif /* !G_OS_WIN32 */ - - g_return_val_if_fail(data.notifier == this, true); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - // Actually, we wouldn't need the try/catch block because the Glib::Source - // C callback already does it for us. However, we do it anyway because the - // default return value is 'false', which is not what we want. - try -#endif - { - data.dispatcher->signal_(); // emit - } -#ifdef GLIBMM_EXCEPTIONS_ENABLED - catch(...) - { - Glib::exception_handlers_invoke(); - } -#endif - - return true; -} - -/**** Glib::Dispatcher *****************************************************/ - -Dispatcher::Dispatcher() -: - signal_ (), - notifier_ (DispatchNotifier::reference_instance(MainContext::get_default())) -{} - -Dispatcher::Dispatcher(const Glib::RefPtr& context) -: - signal_ (), - notifier_ (DispatchNotifier::reference_instance(context)) -{} - -Dispatcher::~Dispatcher() -{ - DispatchNotifier::unreference_instance(notifier_); -} - -void Dispatcher::emit() -{ - notifier_->send_notification(this); -} - -void Dispatcher::operator()() -{ - notifier_->send_notification(this); -} - -sigc::connection Dispatcher::connect(const sigc::slot& slot) -{ - return signal_.connect(slot); -} - -} // namespace Glib diff --git a/libs/glibmm2/glib/glibmm/dispatcher.h b/libs/glibmm2/glib/glibmm/dispatcher.h deleted file mode 100644 index 4f638d7992..0000000000 --- a/libs/glibmm2/glib/glibmm/dispatcher.h +++ /dev/null @@ -1,108 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_DISPATCHER_H -#define _GLIBMM_DISPATCHER_H - -/* $Id: dispatcher.h 370 2007-01-20 10:53:28Z daniel $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class DispatchNotifier; -#endif - -/** Signal class for inter-thread communication. - * @ingroup Threads - * Glib::Dispatcher works similar to sigc::signal. But unlike normal - * signals, the notification happens asynchronously through a pipe. This is - * a simple and efficient way of communicating between threads, and especially - * useful in a thread model with a single GUI thread. - * - * No mutex locking is involved, apart from the operating system's internal - * I/O locking. That implies some usage rules: - * - * @li Only one thread may connect to the signal and receive notification, but - * multiple senders are allowed even without locking. - * @li The GLib main loop must run in the receiving thread (this will be the - * GUI thread usually). - * @li The Dispatcher object must be instantiated by the receiver thread. - * @li The Dispatcher object should be instantiated before creating any of the - * sender threads, if you want to avoid extra locking. - * - * Notes about performance: - * - * @li After instantiation, Glib::Dispatcher will never lock any mutexes on its - * own. The interaction with the GLib main loop might involve locking on the - * @em receiver side. The @em sender side, however, is guaranteed not to lock, - * except for internal locking in the %write() system call. - * @li All Dispatcher instances of a receiver thread share the same pipe. That - * is, if you use Glib::Dispatcher only to notify the GUI thread, only one pipe - * is created no matter how many Dispatcher objects you have. - * - * Using Glib::Dispatcher on Windows: - * - * Glib::Dispatcher also works on win32-based systems. Unfortunately though, - * the implementation cannot use a pipe on win32 and therefore does have to - * lock a mutex on emission, too. However, the impact on performance is - * likely minor and the notification still happens asynchronously. Apart - * from the additional lock the behavior matches the Unix implementation. - */ -class Dispatcher -{ -public: - /** Create new Dispatcher instance using the default main context. - * @throw Glib::FileError - */ - Dispatcher(); - - /** Create new Dispatcher instance using an arbitrary main context. - * @throw Glib::FileError - */ - explicit Dispatcher(const Glib::RefPtr& context); - ~Dispatcher(); - - void emit(); - void operator()(); - - sigc::connection connect(const sigc::slot& slot); - -private: - sigc::signal signal_; - DispatchNotifier* notifier_; - - // noncopyable - Dispatcher(const Dispatcher&); - Dispatcher& operator=(const Dispatcher&); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - friend class Glib::DispatchNotifier; -#endif -}; - -/*! A Glib::Dispatcher example. - * @example thread/dispatcher.cc - */ - -} // namespace Glib - -#endif /* _GLIBMM_DISPATCHER_H */ diff --git a/libs/glibmm2/glib/glibmm/error.cc b/libs/glibmm2/glib/glibmm/error.cc deleted file mode 100644 index 5fdf00acdb..0000000000 --- a/libs/glibmm2/glib/glibmm/error.cc +++ /dev/null @@ -1,198 +0,0 @@ -// -*- c++ -*- -/* $Id: error.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* error.cc - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#include -#include -#include -#include - -GLIBMM_USING_STD(map) - -namespace -{ - -typedef std::map ThrowFuncTable; - -static ThrowFuncTable* throw_func_table = 0; - -} // anonymous namespace - - -namespace Glib -{ - -Error::Error() -: - gobject_ (0) -{} - -Error::Error(GQuark domain, int code, const Glib::ustring& message) -: - gobject_ (g_error_new_literal(domain, code, message.c_str())) -{} - -Error::Error(GError* gobject, bool take_copy) -: - gobject_ ((take_copy && gobject) ? g_error_copy(gobject) : gobject) -{} - -Error::Error(const Error& other) -: - Exception(other), - gobject_ ((other.gobject_) ? g_error_copy(other.gobject_) : 0) -{} - -Error& Error::operator=(const Error& other) -{ - if(gobject_ != other.gobject_) - { - if(gobject_) - { - g_error_free(gobject_); - gobject_ = 0; - } - if(other.gobject_) - { - gobject_ = g_error_copy(other.gobject_); - } - } - return *this; -} - -Error::~Error() throw() -{ - if(gobject_) - g_error_free(gobject_); -} - -GQuark Error::domain() const -{ - g_return_val_if_fail(gobject_ != 0, 0); - - return gobject_->domain; -} - -int Error::code() const -{ - g_return_val_if_fail(gobject_ != 0, -1); - - return gobject_->code; -} - -Glib::ustring Error::what() const -{ - g_return_val_if_fail(gobject_ != 0, ""); - g_return_val_if_fail(gobject_->message != 0, ""); - - return gobject_->message; -} - -bool Error::matches(GQuark domain, int code) const -{ - return g_error_matches(gobject_, domain, code); -} - -GError* Error::gobj() -{ - return gobject_; -} - -const GError* Error::gobj() const -{ - return gobject_; -} - -void Error::propagate(GError** dest) -{ - g_propagate_error(dest, gobject_); - gobject_ = 0; -} - -// static -void Error::register_init() -{ - if(!throw_func_table) - { - throw_func_table = new ThrowFuncTable(); - Glib::wrap_init(); // make sure that at least the Glib exceptions are registered - } -} - -// static -void Error::register_cleanup() -{ - if(throw_func_table) - { - delete throw_func_table; - throw_func_table = 0; - } -} - -// static -void Error::register_domain(GQuark domain, Error::ThrowFunc throw_func) -{ - g_assert(throw_func_table != 0); - - (*throw_func_table)[domain] = throw_func; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -// static, noreturn -void Error::throw_exception(GError* gobject) -#else -std::auto_ptr Error::throw_exception(GError* gobject) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - g_assert(gobject != 0); - - // Just in case Gtk::Main hasn't been instantiated yet. - if(!throw_func_table) - register_init(); - - if(const ThrowFunc throw_func = (*throw_func_table)[gobject->domain]) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - (*throw_func)(gobject); - #else - return (*throw_func)(gobject); - #endif //GLIBMM_EXCEPTIONS_ENABLED - g_assert_not_reached(); - } - - g_warning("Glib::Error::throw_exception():\n " - "unknown error domain '%s': throwing generic Glib::Error exception\n", - (gobject->domain) ? g_quark_to_string(gobject->domain) : "(null)"); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - // Doesn't copy, because error-returning functions return a newly allocated GError for us. - throw Glib::Error(gobject); -#else - return std::auto_ptr(new Glib::Error(gobject)); -#endif //GLIBMM_EXCEPTIONS_ENABLED -} - - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/error.h b/libs/glibmm2/glib/glibmm/error.h deleted file mode 100644 index 48472996d4..0000000000 --- a/libs/glibmm2/glib/glibmm/error.h +++ /dev/null @@ -1,92 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_ERROR_H -#define _GLIBMM_ERROR_H -/* $Id: error.h 336 2006-10-04 12:06:14Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GError GError; } -#endif - -#include -#include -#include //For GLIBMM_EXCEPTIONS_ENABLED - -#ifndef GLIBMM_EXCEPTIONS_ENABLED -//When not usinge exceptions, we pass auto_ptrs of the exceptions objects around instead. -#include //For std::auto_ptr -#endif - - -namespace Glib -{ - -class Error : public Glib::Exception -{ -public: - Error(); - Error(GQuark domain, int code, const Glib::ustring& message); - explicit Error(GError* gobject, bool take_copy = false); - - Error(const Error& other); - Error& operator=(const Error& other); - - virtual ~Error() throw(); - - GQuark domain() const; - int code() const; - virtual Glib::ustring what() const; - - bool matches(GQuark domain, int code) const; - - GError* gobj(); - const GError* gobj() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - void propagate(GError** dest); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - typedef void (* ThrowFunc) (GError*); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - typedef std::auto_ptr (* ThrowFunc) (GError*); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - static void register_init(); - static void register_cleanup(); - static void register_domain(GQuark domain, ThrowFunc throw_func); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_exception(GError* gobject) G_GNUC_NORETURN; -#else - static std::auto_ptr throw_exception(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -protected: - GError* gobject_; -}; - -} // namespace Glib - - -#endif /* _GLIBMM_ERROR_H */ - diff --git a/libs/glibmm2/glib/glibmm/exception.cc b/libs/glibmm2/glib/glibmm/exception.cc deleted file mode 100644 index 6e094a2427..0000000000 --- a/libs/glibmm2/glib/glibmm/exception.cc +++ /dev/null @@ -1,40 +0,0 @@ -// -*- c++ -*- -/* $Id: exception.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* exception.cc - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -Exception::~Exception() throw() -{} - -Glib::ustring Exception::what() const -{ - g_assert_not_reached(); - return Glib::ustring(); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/exception.h b/libs/glibmm2/glib/glibmm/exception.h deleted file mode 100644 index 757ebe80ca..0000000000 --- a/libs/glibmm2/glib/glibmm/exception.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_EXCEPTION_H -#define _GLIBMM_EXCEPTION_H -/* $Id: exception.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* exception.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -class Exception -{ -public: - virtual ~Exception() throw() = 0; - virtual Glib::ustring what() const = 0; -}; - -} // namespace Glib - - -#endif /* _GLIBMM_EXCEPTION_H */ - diff --git a/libs/glibmm2/glib/glibmm/exceptionhandler.cc b/libs/glibmm2/glib/glibmm/exceptionhandler.cc deleted file mode 100644 index 6f4184b9ed..0000000000 --- a/libs/glibmm2/glib/glibmm/exceptionhandler.cc +++ /dev/null @@ -1,163 +0,0 @@ -// -*- c++ -*- -/* $Id: exceptionhandler.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* exceptionhandler.cc - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -#include -#include -#include -#include - -GLIBMM_USING_STD(exception) -GLIBMM_USING_STD(list) - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - -namespace -{ - -typedef sigc::signal HandlerList; - -// Each thread has its own list of exception handlers -// to avoid thread synchronization problems. -static Glib::StaticPrivate thread_specific_handler_list = GLIBMM_STATIC_PRIVATE_INIT; - - -static void glibmm_exception_warning(const GError* error) -{ - g_assert(error != 0); - - g_critical("\n" - "unhandled exception (type Glib::Error) in signal handler:\n" - "domain: %s\n" - "code : %d\n" - "what : %s\n", - g_quark_to_string(error->domain), error->code, - (error->message) ? error->message : "(null)"); -} - -static void glibmm_unexpected_exception() -{ - try - { - throw; // re-throw current exception - } - catch(const Glib::Error& error) - { - // Access the GError directly, to avoid possible exceptions from C++ code. - glibmm_exception_warning(error.gobj()); - - // For most failures that cause a Glib::Error exception, aborting the - // program seems too harsh. Instead, give control back to the main loop. - return; - } - catch(const std::exception& except) - { - g_error("\n" - "unhandled exception (type std::exception) in signal handler:\n" - "what: %s\n", except.what()); - } - catch(...) - { - g_error("\nunhandled exception (type unknown) in signal handler\n"); - } -} - -} // anonymous namespace - - -namespace Glib -{ - -sigc::connection add_exception_handler(const sigc::slot& slot) -{ - HandlerList* handler_list = thread_specific_handler_list.get(); - - if(!handler_list) - { - handler_list = new HandlerList(); - thread_specific_handler_list.set(handler_list); - } - - handler_list->slots().push_front(slot); - return handler_list->slots().begin(); -} - -// internal -void exception_handlers_invoke() throw() -{ - // This function will be called from our GLib signal handler proxies - // if an exception has been caught. It's not possible to throw C++ - // exceptions through C signal handlers. To handle this situation, the - // programmer can install slots to global Reusable Exception Handlers. - // - // A handler has to re-throw the current exception in a try block, and then - // catch the exceptions it knows about. Any unknown exceptions should just - // fall through, i.e. the handler must not do catch(...). - // - // We now invoke each of the installed slots until the exception has been - // handled. If there are no more handlers in the list and the exception - // is still unhandled, call glibmm_unexpected_exception(). - - if(HandlerList *const handler_list = thread_specific_handler_list.get()) - { - HandlerList::iterator pslot = handler_list->slots().begin(); - - while(pslot != handler_list->slots().end()) - { - // Calling an empty slot would mean ignoring the exception, - // thus we have to check for dead slots explicitly. - if(pslot->empty()) - { - pslot = handler_list->slots().erase(pslot); - continue; - } - - // Call the Reusable Exception Handler, which should re-throw - // the exception that's currently on the stack. - try - { - (*pslot)(); - } - catch(...) // unhandled, try next slot - { - ++pslot; - continue; - } - - // The exception has either been handled or ignored. - // Give control back to the GLib main loop. - return; - } - } - - // Critical: The exception is still unhandled. - glibmm_unexpected_exception(); -} - -} // namespace Glib - -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/exceptionhandler.h b/libs/glibmm2/glib/glibmm/exceptionhandler.h deleted file mode 100644 index dcf5dc1f95..0000000000 --- a/libs/glibmm2/glib/glibmm/exceptionhandler.h +++ /dev/null @@ -1,48 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_EXCEPTIONHANDLER_H -#define _GLIBMM_EXCEPTIONHANDLER_H - -/* $Id: exceptionhandler.h 291 2006-05-12 08:08:45Z murrayc $ */ - -/* exceptionhandler.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - -namespace Glib -{ - -/** Specify a slot to be called when an exception is thrown by a signal handler. - */ -sigc::connection add_exception_handler(const sigc::slot& slot); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -// internal -void exception_handlers_invoke() throw(); -#endif - -} // namespace Glib - -#endif //GLIBMM_EXCEPTIONS_ENABLED - -#endif /* _GLIBMM_EXCEPTIONHANDLER_H */ - diff --git a/libs/glibmm2/glib/glibmm/fileutils.cc b/libs/glibmm2/glib/glibmm/fileutils.cc deleted file mode 100644 index 38850871a0..0000000000 --- a/libs/glibmm2/glib/glibmm/fileutils.cc +++ /dev/null @@ -1,226 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: fileutils.ccg,v 1.1 2003/01/07 16:58:25 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -/**** Glib::Dir ************************************************************/ - -Dir::Dir(const std::string& path) -{ - GError* error = 0; - gobject_ = g_dir_open(path.c_str(), 0, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -Dir::Dir(GDir* gobject) -: - gobject_ (gobject) -{} - -Dir::~Dir() -{ - if(gobject_) - g_dir_close(gobject_); -} - -std::string Dir::read_name() -{ - const char *const name = g_dir_read_name(gobject_); - return (name) ? std::string(name) : std::string(); -} - -void Dir::rewind() -{ - g_dir_rewind(gobject_); -} - -void Dir::close() -{ - if(gobject_) - { - g_dir_close(gobject_); - gobject_ = 0; - } -} - -DirIterator Dir::begin() -{ - g_dir_rewind(gobject_); - return DirIterator(gobject_, g_dir_read_name(gobject_)); -} - -DirIterator Dir::end() -{ - return DirIterator(gobject_, 0); -} - - -/**** Glib::DirIterator ****************************************************/ - -DirIterator::DirIterator() -: - gobject_ (0), - current_ (0) -{} - -DirIterator::DirIterator(GDir* gobject, const char* current) -: - gobject_ (gobject), - current_ (current) -{} - -std::string DirIterator::operator*() const -{ - return (current_) ? std::string(current_) : std::string(); -} - -DirIterator& DirIterator::operator++() -{ - current_ = g_dir_read_name(gobject_); - return *this; -} - -void DirIterator::operator++(int) -{ - current_ = g_dir_read_name(gobject_); -} - -bool DirIterator::operator==(const DirIterator& rhs) const -{ - return (current_ == rhs.current_); -} - -bool DirIterator::operator!=(const DirIterator& rhs) const -{ - return (current_ != rhs.current_); -} - - -bool file_test(const std::string& filename, FileTest test) -{ - return g_file_test(filename.c_str(), static_cast(unsigned(test))); -} - -int mkstemp(std::string& filename_template) -{ - const ScopedPtr buf (g_strndup(filename_template.data(), filename_template.size())); - const int fileno = g_mkstemp(buf.get()); - - filename_template = buf.get(); - return fileno; -} - -int file_open_tmp(std::string& name_used, const std::string& prefix) -{ - std::string basename_template (prefix); - basename_template += "XXXXXX"; // this sillyness shouldn't be in the interface - - GError* error = 0; - ScopedPtr buf_name_used; - - const int fileno = g_file_open_tmp(basename_template.c_str(), buf_name_used.addr(), &error); - - if(error) - Glib::Error::throw_exception(error); - - name_used = buf_name_used.get(); - return fileno; -} - -int file_open_tmp(std::string& name_used) -{ - GError* error = 0; - ScopedPtr buf_name_used; - - const int fileno = g_file_open_tmp(0, buf_name_used.addr(), &error); - - if(error) - Glib::Error::throw_exception(error); - - name_used = buf_name_used.get(); - return fileno; -} - -std::string file_get_contents(const std::string& filename) -{ - ScopedPtr contents; - gsize length = 0; - GError* error = 0; - - g_file_get_contents(filename.c_str(), contents.addr(), &length, &error); - - if(error) - Glib::Error::throw_exception(error); - - return std::string(contents.get(), length); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::FileError::FileError(Glib::FileError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_FILE_ERROR, error_code, error_message) -{} - -Glib::FileError::FileError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::FileError::Code Glib::FileError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::FileError::throw_func(GError* gobject) -{ - throw Glib::FileError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::FileError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::FileError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/fileutils.h b/libs/glibmm2/glib/glibmm/fileutils.h deleted file mode 100644 index c749ffbb11..0000000000 --- a/libs/glibmm2/glib/glibmm/fileutils.h +++ /dev/null @@ -1,482 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_FILEUTILS_H -#define _GLIBMM_FILEUTILS_H - - -/* $Id: fileutils.hg,v 1.3 2004/01/22 18:38:12 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GDir GDir; } -#endif - -#include -#include - -#include -#include - -GLIBMM_USING_STD(input_iterator_tag) -GLIBMM_USING_STD(string) - - -namespace Glib -{ - -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %FileTest operator|(FileTest, FileTest)
- * %FileTest operator&(FileTest, FileTest)
- * %FileTest operator^(FileTest, FileTest)
- * %FileTest operator~(FileTest)
- * %FileTest& operator|=(FileTest&, FileTest)
- * %FileTest& operator&=(FileTest&, FileTest)
- * %FileTest& operator^=(FileTest&, FileTest)
- */ -enum FileTest -{ - FILE_TEST_IS_REGULAR = 1 << 0, - FILE_TEST_IS_SYMLINK = 1 << 1, - FILE_TEST_IS_DIR = 1 << 2, - FILE_TEST_IS_EXECUTABLE = 1 << 3, - FILE_TEST_EXISTS = 1 << 4 -}; - -/** @ingroup glibmmEnums */ -inline FileTest operator|(FileTest lhs, FileTest rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline FileTest operator&(FileTest lhs, FileTest rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline FileTest operator^(FileTest lhs, FileTest rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline FileTest operator~(FileTest flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline FileTest& operator|=(FileTest& lhs, FileTest rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline FileTest& operator&=(FileTest& lhs, FileTest rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline FileTest& operator^=(FileTest& lhs, FileTest rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** @defgroup FileUtils File Utilities - * Various file-related classes and functions. - */ - -/** Exception class for file-related errors. - * @ingroup FileUtils - */ -class FileError : public Glib::Error -{ -public: - enum Code - { - EXISTS, - IS_DIRECTORY, - ACCESS_DENIED, - NAME_TOO_LONG, - NO_SUCH_ENTITY, - NOT_DIRECTORY, - NO_SUCH_DEVICE, - NOT_DEVICE, - READONLY_FILESYSTEM, - TEXT_FILE_BUSY, - FAULTY_ADDRESS, - SYMLINK_LOOP, - NO_SPACE_LEFT, - NOT_ENOUGH_MEMORY, - TOO_MANY_OPEN_FILES, - FILE_TABLE_OVERFLOW, - BAD_FILE_DESCRIPTOR, - INVALID_ARGUMENT, - BROKEN_PIPE, - TRYAGAIN, - INTERRUPTED, - IO_ERROR, - NOT_OWNER, - NOSYS, - FAILED - }; - - FileError(Code error_code, const Glib::ustring& error_message); - explicit FileError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** @enum FileError::Code - * Values corresponding to errno codes returned from file operations - * on UNIX. - * Unlike errno codes, FileError::Code values are available on all - * systems, even Windows. The exact meaning of each code depends on what sort - * of file operation you were performing; the UNIX documentation gives more - * details. The following error code descriptions come from the GNU C Library - * manual, and are under the copyright of that manual. - * - * It's not very portable to make detailed assumptions about exactly which - * errors will be returned from a given operation. Some errors don't occur on - * some systems, etc., sometimes there are subtle differences in when a system - * will report a given error, etc. - */ - -/** @var FileError::Code FileError::EXISTS - * (EEXIST) Operation not permitted; only the owner of the file (or - * other resource) or processes with special privileges can perform the operation. - *

- */ -/** @var FileError::Code FileError::IS_DIRECTORY - * (EISDIR) File is a directory; you cannot open a directory for writing, - * or create or remove hard links to it. - *

- */ -/** @var FileError::Code FileError::ACCESS_DENIED - * (EACCES) Permission denied; the file permissions do not allow the - * attempted operation. - *

- */ -/** @var FileError::Code FileError::NAME_TOO_LONG - * (ENAMETOOLONG) Filename too long. - *

- */ -/** @var FileError::Code FileError::NO_SUCH_ENTITY - * (ENOENT) No such file or directory. This is a "file doesn't exist" - * error for ordinary files that are referenced in contexts where they are expected - * to already exist. - *

- */ -/** @var FileError::Code FileError::NOT_DIRECTORY - * (ENOTDIR) A file that isn't a directory was specified when a directory - * is required. - *

- */ -/** @var FileError::Code FileError::NO_SUCH_DEVICE - * (ENXIO) No such device or address. The system tried to use the device - * represented by a file you specified, and it couldn't find the device. This can - * mean that the device file was installed incorrectly, or that the physical device - * is missing or not correctly attached to the computer. - *

- */ -/** @var FileError::Code FileError::NOT_DEVICE - * (ENODEV) This file is of a type that doesn't support mapping. - *

- */ -/** @var FileError::Code FileError::READONLY_FILESYSTEM - * (EROFS) The directory containing the new link can't be modified - * because it's on a read-only file system. - *

- */ -/** @var FileError::Code FileError::TEXT_FILE_BUSY - * (ETXTBSY) Text file busy. - *

- */ -/** @var FileError::Code FileError::FAULTY_ADDRESS - * (EFAULT) You passed in a pointer to bad memory. (Glib won't - * reliably return this, don't pass in pointers to bad memory.) - *

- */ -/** @var FileError::Code FileError::SYMLINK_LOOP - * (ELOOP) Too many levels of symbolic links were encountered in - * looking up a file name. This often indicates a cycle of symbolic links. - *

- */ -/** @var FileError::Code FileError::NO_SPACE_LEFT - * (ENOSPC) No space left on device; write operation on a file failed - * because the disk is full. - *

- */ -/** @var FileError::Code FileError::NOT_ENOUGH_MEMORY - * (ENOMEM) No memory available. The system cannot allocate more - * virtual memory because its capacity is full. - *

- */ -/** @var FileError::Code FileError::TOO_MANY_OPEN_FILES - * (EMFILE) The current process has too many files open and can't - * open any more. Duplicate descriptors do count toward this limit. - *

- */ -/** @var FileError::Code FileError::FILE_TABLE_OVERFLOW - * (ENFILE) There are too many distinct file openings in the - * entire system. - *

- */ -/** @var FileError::Code FileError::BAD_FILE_DESCRIPTOR - * (EBADF) Bad file descriptor; for example, I/O on a descriptor - * that has been closed or reading from a descriptor open only for writing - * (or vice versa). - *

- */ -/** @var FileError::Code FileError::INVALID_ARGUMENT - * (EINVAL) Invalid argument. This is used to indicate various kinds - * of problems with passing the wrong argument to a library function. - *

- */ -/** @var FileError::Code FileError::BROKEN_PIPE - * (EPIPE) Broken pipe; there is no process reading from the other - * end of a pipe. Every library function that returns this error code also - * generates a SIGPIPE signal; this signal terminates the program - * if not handled or blocked. Thus, your program will never actually see - * this code unless it has handled or blocked SIGPIPE. - *

- */ -/** @var FileError::Code FileError::TRYAGAIN - * (EAGAIN) Resource temporarily unavailable; the call might work - * if you try again later. - * We used TRYAGAIN instead of TRY_AGAIN, because that is a defined as a macro by a Unix header. - *

- */ -/** @var FileError::Code FileError::INTERRUPTED - * (EINTR) Interrupted function call; an asynchronous signal occurred - * and prevented completion of the call. When this happens, you should try - * the call again. - *

- */ -/** @var FileError::Code FileError::IO_ERROR - * (EIO) Input/output error; usually used for physical read or write - * errors. I.e. the disk or other physical device hardware is returning errors. - *

- */ -/** @var FileError::Code FileError::NOT_OWNER - * (EPERM) Operation not permitted; only the owner of the file (or other - * resource) or processes with special privileges can perform the operation. - *

- */ -/** @var FileError::Code FileError::FAILED - * Does not correspond to a UNIX error code; this is the standard "failed for - * unspecified reason" error code present in all Glib::Error error code - * enumerations. Returned if no specific code applies. - */ - -class Dir; - -/** The iterator type of Glib::Dir. - * @ingroup FileUtils - */ -class DirIterator -{ -public: - typedef std::input_iterator_tag iterator_category; - typedef std::string value_type; - typedef int difference_type; - typedef value_type reference; - typedef void pointer; - - DirIterator(); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - DirIterator(GDir* gobject, const char* current); -#endif - - std::string operator*() const; - DirIterator& operator++(); - - /** @note DirIterator has input iterator semantics, which means real - * postfix increment is impossible. The return type is @c void to - * prevent surprising behaviour. - */ - void operator++(int); - - bool operator==(const DirIterator& rhs) const; - bool operator!=(const DirIterator& rhs) const; - -private: - GDir* gobject_; - const char* current_; -}; - - -/** Utility class representing an open directory. - * @ingroup FileUtils - * It's highly recommended to use the iterator interface. With iterators, - * reading an entire directory into a STL container is really easy: - * @code - * Glib::Dir dir (directory_path); - * std::list entries (dir.begin(), dir.end()); - * @endcode - * @note The encoding of the directory entries isn't necessarily UTF-8. - * Use Glib::filename_to_utf8() if you need to display them. - */ -class Dir -{ -public: - typedef DirIterator iterator; - typedef DirIterator const_iterator; - - /** Opens a directory for reading. The names of the files in the - * directory can then be retrieved using read_name(). - * @param path The path to the directory you are interested in. - * @throw Glib::FileError - */ - explicit Dir(const std::string& path); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit Dir(GDir* gobject); -#endif - - /** Closes the directory and deallocates all related resources. - */ - ~Dir(); - - /** Retrieves the name of the next entry in the directory. - * The '.' and '..' entries are omitted. - * @return The entry's name or "" if there are no more entries. - * @see begin(), end() - */ - std::string read_name(); - - /** Resets the directory. The next call to - * read_name() will return the first entry again. - */ - void rewind(); - - /** Closes the directory and deallocates all related resources. - * Note that close() is implicitely called by ~Dir(). Thus you don't - * need to call close() yourself unless you want to close the directory - * before the destructor runs. - */ - void close(); - - /** Get the begin of an input iterator sequence. - * @return An input iterator pointing to the first directory entry. - */ - DirIterator begin(); - - /** Get the end of an input iterator sequence. - * @return An input iterator pointing behind the last directory entry. - */ - DirIterator end(); - -private: - GDir* gobject_; - - // noncopyable - Dir(const Dir&); - Dir& operator=(const Dir&); -}; - - -/** Returns @c true if any of the tests in the bitfield @a test are true. - * @ingroup FileUtils - * For example, (Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_DIR) will - * return @c true if the file exists; the check whether it's a directory - * doesn't matter since the existence test is true. With the current set of - * available tests, there's no point passing in more than one test at a time. - * - * Apart from Glib::FILE_TEST_IS_SYMLINK all tests follow symbolic - * links, so for a symbolic link to a regular file file_test() will return - * @c true for both Glib::FILE_TEST_IS_SYMLINK and - * Glib::FILE_TEST_IS_REGULAR. - * - * @note For a dangling symbolic link file_test() will return @c true for - * Glib::FILE_TEST_IS_SYMLINK and @c false for all other flags. - * - * @param filename A filename to test. - * @param test Bitfield of Glib::FileTest flags. - * @return Whether a test was true. - */ -bool file_test(const std::string& filename, FileTest test); - -/** Opens a temporary file. - * @ingroup FileUtils - * See the %mkstemp() documentation on most UNIX-like systems. This is a - * portability wrapper, which simply calls %mkstemp() on systems that have - * it, and implements it in GLib otherwise. - * @param filename_template A string that should match the rules for - * %mkstemp(), i.e. end in "XXXXXX". The X string - * will be modified to form the name of a file that didn't exist. - * @return A file handle (as from open()) to the file opened for reading - * and writing. The file is opened in binary mode on platforms where there - * is a difference. The file handle should be closed with close(). In - * case of errors, -1 is returned. - */ -int mkstemp(std::string& filename_template); - -/** Opens a file for writing in the preferred directory for temporary files - * (as returned by Glib::get_tmp_dir()). - * @ingroup FileUtils - * @a prefix should a basename template; it'll be suffixed by 6 characters - * in order to form a unique filename. No directory components are allowed. - * - * The actual name used is returned in @a name_used. - * - * @param prefix Template for file name, basename only. - * @retval name_used The actual name used. - * @return A file handle (as from open()) to the file opened for reading - * and writing. The file is opened in binary mode on platforms where there is a - * difference. The file handle should be closed with close(). - * @throw Glib::FileError - */ -int file_open_tmp(std::string& name_used, const std::string& prefix); - -/** Opens a file for writing in the preferred directory for temporary files - * (as returned by Glib::get_tmp_dir()). - * @ingroup FileUtils - * This function works like file_open_tmp(std::string&, const std::string&) - * but uses a default basename prefix. - * - * @retval name_used The actual name used. - * @return A file handle (as from open()) to the file opened for reading - * and writing. The file is opened in binary mode on platforms where there is a - * difference. The file handle should be closed with close(). - * @throw Glib::FileError - */ -int file_open_tmp(std::string& name_used); - -/** Reads an entire file into a string, with good error checking. - * @ingroup FileUtils - * @param filename A file to read contents from. - * @return The file contents. - * @throw Glib::FileError - */ -std::string file_get_contents(const std::string& filename); - -} // namespace Glib - - -#endif /* _GLIBMM_FILEUTILS_H */ - diff --git a/libs/glibmm2/glib/glibmm/helperlist.h b/libs/glibmm2/glib/glibmm/helperlist.h deleted file mode 100644 index b5b91ab9f2..0000000000 --- a/libs/glibmm2/glib/glibmm/helperlist.h +++ /dev/null @@ -1,165 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_HELPERLIST_H -#define _GLIBMM_HELPERLIST_H -/* $Id: helperlist.h 386 2007-03-23 17:31:16Z murrayc $ */ - -/* helperlist.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -namespace Glib -{ - -// This class has some pure virtual methods which need to be implemented by derived classes. -template< typename T_Child, typename T_CppElement, typename T_Iterator > -class HelperList -{ -public: - HelperList() - : gparent_(0) - {} - - HelperList(GObject* gp) //We use gp instead of gparent because that can cause warnings about a shadowed member. - : gparent_(gp) - {} - - virtual ~HelperList() - {} - - typedef T_Child value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - - typedef T_Iterator iterator; - typedef List_ConstIterator const_iterator; - typedef List_ReverseIterator reverse_iterator; - typedef List_ConstIterator const_reverse_iterator; - - typedef T_CppElement element_type; - - typedef size_t difference_type; - typedef size_t size_type; - - //These are implemented differently for each Helper List. - virtual iterator erase(iterator) = 0; - - virtual void erase(iterator start, iterator stop) - { - while(start != stop) - start = erase(start); //Implemented in derived class. - } - - virtual void remove(const_reference) = 0; - - size_type size() const - { - return g_list_length(glist()); - } - - inline size_type max_size() { return size_type(-1); } - inline bool empty() { return glist() == 0; } - - inline iterator begin() - {return begin_();} - inline iterator end() - {return end_();} - - inline const_iterator begin() const - { return const_iterator(begin_()); } - inline const_iterator end() const - { return const_iterator(end_()); } - - inline reverse_iterator rbegin() - { return reverse_iterator(end_()); } - inline reverse_iterator rend() - { return reverse_iterator(begin_()); } - - inline const_reverse_iterator rbegin() const - { return const_reverse_iterator(reverse_iterator(end_())); } - inline const_reverse_iterator rend() const - { return const_reverse_iterator(reverse_iterator(begin_())); } - - reference front() const - { - return *begin(); - } - - reference back() const - { - return *(--end()); - } - - reference operator[](size_type l) const - { - size_type j = 0; - iterator i; - for(i = begin(), j = 0; i != end(), j < l; ++i, ++j); - return (*i); - } - -// iterator find(const_reference w) -// { -// iterator i = begin(); -// for(i = begin(); i != end() && (*i != w); i++); -// return i; -// } -// -// iterator find(Widget& w) -// { -// iterator i; -// for (i = begin(); i != end() && ((*i)->$1() != &w); i++); -// return i; -// } - - //Derived classes might choose to reimplement these as public: - inline void pop_front() - { erase(begin()); } - inline void pop_back() - { erase(--end()); } - - void clear() - { erase(begin(), end()); } - - GObject* gparent() - { return gparent_; }; - const GObject* gparent() const - { return gparent_; }; - -protected: - virtual GList*& glist() const = 0; // front of list - - iterator begin_() const - { - return iterator(glist(), glist()); - } - - iterator end_() const - { - return iterator(glist(), (GList*)0); - } - - GObject* gparent_; -}; - - -} /* namespace Glib */ - -#endif /* _GLIBMM_HELPERLIST_H */ - diff --git a/libs/glibmm2/glib/glibmm/i18n.h b/libs/glibmm2/glib/glibmm/i18n.h deleted file mode 100644 index 04ce3cbbaa..0000000000 --- a/libs/glibmm2/glib/glibmm/i18n.h +++ /dev/null @@ -1,30 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_I18N_H -#define _GLIBMM_I18N_H - -/* $Id: i18n.h 77 2004-03-02 23:29:57Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -// Include this file to define internationalization macros such as _(). -// This file must be included by the application, after system headers such as . - -#include - -#endif /* _GLIBMM_I18N_H */ - diff --git a/libs/glibmm2/glib/glibmm/init.cc b/libs/glibmm2/glib/glibmm/init.cc deleted file mode 100644 index 6956663ffc..0000000000 --- a/libs/glibmm2/glib/glibmm/init.cc +++ /dev/null @@ -1,34 +0,0 @@ -// -*- c++ -*- -/* $Id: init.cc 54 2003-11-03 09:27:33Z murrayc $ */ - -/* Copyright (C) 2003 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -namespace Glib -{ - -void init() -{ - Glib::wrap_register_init(); - Glib::Error::register_init(); //also calls Glib::wrap_init(); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/init.h b/libs/glibmm2/glib/glibmm/init.h deleted file mode 100644 index 21405e7801..0000000000 --- a/libs/glibmm2/glib/glibmm/init.h +++ /dev/null @@ -1,39 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_INIT_H -#define _GLIBMM_INIT_H - -/* $Id: init.h 54 2003-11-03 09:27:33Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -namespace Glib -{ - -/** Initialize glibmm. - * You may call this more than once. - * You do nott need to call this if you are using Glib::MainLoop or Gtk::Main, - * because they call it for you. - */ -void init(); - -} // namespace Glib - - - -#endif /* _GLIBMM_INIT_H */ - diff --git a/libs/glibmm2/glib/glibmm/interface.cc b/libs/glibmm2/glib/glibmm/interface.cc deleted file mode 100644 index ecb925a103..0000000000 --- a/libs/glibmm2/glib/glibmm/interface.cc +++ /dev/null @@ -1,95 +0,0 @@ -// -*- c++ -*- -/* $Id: interface.cc 209 2005-03-07 15:42:20Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -/**** Glib::Interface_Class ************************************************/ - -void Interface_Class::add_interface(GType instance_type) const -{ - //This check is distabled, because it checks whether any of the types's bases implement the interface, not just the specific type. - //if( !g_type_is_a(instance_type, gtype_) ) //For convenience, don't complain about calling this twice. - //{ - const GInterfaceInfo interface_info = - { - class_init_func_, - 0, // interface_finalize - 0, // interface_data - }; - - g_type_add_interface_static(instance_type, gtype_, &interface_info); - //} -} - - -/**** Interface Glib::Interface ********************************************/ - -Interface::Interface(const Interface_Class& interface_class) -{ - //gobject_ will be set in the Object constructor. - //Any instantiable class that derives from Interface should also inherit from Object. - - // If I understand it correctly, gobject_ shouldn't be 0 now. daniel. - // TODO: Make this a g_assert() if the assumption above is correct. - - g_return_if_fail(gobject_ != 0); - - if(custom_type_name_ && !is_anonymous_custom_()) - { - void *const instance_class = G_OBJECT_GET_CLASS(gobject_); - - if(!g_type_interface_peek(instance_class, interface_class.get_type())) - { - interface_class.add_interface(G_OBJECT_CLASS_TYPE(instance_class)); - } - } -} - -Interface::Interface(GObject* castitem) -{ - // Connect GObject and wrapper instances. - ObjectBase::initialize(castitem); -} - -Interface::~Interface() -{} - -GType Interface::get_type() -{ - return G_TYPE_INTERFACE; -} - -GType Interface::get_base_type() -{ - return G_TYPE_INTERFACE; -} - -RefPtr wrap_interface(GObject* object, bool take_copy) -{ - return Glib::RefPtr( wrap_auto(object, take_copy) ); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/interface.h b/libs/glibmm2/glib/glibmm/interface.h deleted file mode 100644 index 103c940983..0000000000 --- a/libs/glibmm2/glib/glibmm/interface.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_INTERFACE_H -#define _GLIBMM_INTERFACE_H - -/* $Id: interface.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class Interface_Class; -#endif - -// There is no base GInterface struct in Glib, though there is G_TYPE_INTERFACE enum value. -class Interface : virtual public Glib::ObjectBase -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef Interface CppObjectType; - typedef Interface_Class CppClassType; - typedef GTypeInterface BaseClassType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - explicit Interface(const Glib::Interface_Class& interface_class); - explicit Interface(GObject* castitem); - virtual ~Interface(); - - //void add_interface(GType gtype_implementer); - - // Hook for translating API - //static Glib::Interface* wrap_new(GTypeInterface*); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static GType get_type() G_GNUC_CONST; - static GType get_base_type() G_GNUC_CONST; -#endif - - inline GObject* gobj() { return gobject_; } - inline const GObject* gobj() const { return gobject_; } - -private: - // noncopyable - Interface(const Interface&); - Interface& operator=(const Interface&); -}; - -RefPtr wrap_interface(GObject* object, bool take_copy = false); - -} // namespace Glib - -#endif /* _GLIBMM_INTERFACE_H */ - diff --git a/libs/glibmm2/glib/glibmm/iochannel.cc b/libs/glibmm2/glib/glibmm/iochannel.cc deleted file mode 100644 index a1b3fda339..0000000000 --- a/libs/glibmm2/glib/glibmm/iochannel.cc +++ /dev/null @@ -1,889 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: iochannel.ccg,v 1.6 2006/10/04 12:04:09 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - - -namespace -{ - -// Glib::IOChannel reference counting issues: -// -// Normally, you'd expect that the C++ object stays around as long as the -// C instance does. Also Glib::wrap() usually returns always the same C++ -// wrapper object for a single C instance. -// -// Unfortunately it isn't possible to implement these features if we didn't -// create the underlying GIOChannel. That is, when wrapping existing -// GIOChannel instances such as returned by e.g. g_io_channel_unix_new() or -// g_io_channel_new_file(). Neither is there a way to hook up a wrapper -// object in an existing GIOChannel, nor exists any destroy notification. -// -// So that means: If the IOChannel is implemented in C++ -- that is, our -// GlibmmIOChannel backend is used -- we use the GIOChannel reference -// counting mechanism. If the IOChannel backend is unknown, then the -// wrapper instance holds always exactly one reference to the GIOChannel. -// The wrapper object itself is then managed via our own refcounting -// mechanism. To do that a utility class ForeignIOChannel is introduced to -// override reference() and unreference(). - -class ForeignIOChannel : public Glib::IOChannel -{ -public: - ForeignIOChannel(GIOChannel* gobject, bool take_copy) - : Glib::IOChannel(gobject, take_copy), ref_count_(0) {} - - virtual void reference() const; - virtual void unreference() const; - -private: - mutable int ref_count_; -}; - -void ForeignIOChannel::reference() const -{ - ++ref_count_; -} - -void ForeignIOChannel::unreference() const -{ - if (!(--ref_count_)) delete this; -} - -} // anonymous namespace - - -namespace Glib -{ - -class GlibmmIOChannel -{ -public: - GIOChannel base; - Glib::IOChannel* wrapper; - - static const GIOFuncs vfunc_table; - - static GIOStatus io_read(GIOChannel* channel, char* buf, gsize count, - gsize* bytes_read, GError** err); - - static GIOStatus io_write(GIOChannel* channel, const char* buf, gsize count, - gsize* bytes_written, GError** err); - - static GIOStatus io_seek (GIOChannel* channel, gint64 offset, GSeekType type, GError** err); - static GIOStatus io_close(GIOChannel* channel, GError** err); - - static GSource* io_create_watch(GIOChannel* channel, GIOCondition condition); - static void io_free(GIOChannel* channel); - - static GIOStatus io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err); - static GIOFlags io_get_flags(GIOChannel* channel); -}; - -// static -const GIOFuncs GlibmmIOChannel::vfunc_table = -{ - &GlibmmIOChannel::io_read, - &GlibmmIOChannel::io_write, - &GlibmmIOChannel::io_seek, - &GlibmmIOChannel::io_close, - &GlibmmIOChannel::io_create_watch, - &GlibmmIOChannel::io_free, - &GlibmmIOChannel::io_set_flags, - &GlibmmIOChannel::io_get_flags, -}; - - -/**** GLib::IOChannel ******************************************************/ - -/* Construct a custom C++-implemented IOChannel. GlibmmIOChannel is an - * extended GIOChannel struct which allows us to hook up a pointer to this - * persistent wrapper instance. - */ -IOChannel::IOChannel() -: - gobject_ (static_cast(g_malloc(sizeof(GlibmmIOChannel)))) -{ - g_io_channel_init(gobject_); - gobject_->funcs = const_cast(&GlibmmIOChannel::vfunc_table); - - reinterpret_cast(gobject_)->wrapper = this; -} - -/* Construct an IOChannel wrapper for an already created GIOChannel. - * See the comment at the top of this file for an explanation of the - * problems with this approach. - */ -IOChannel::IOChannel(GIOChannel* gobject, bool take_copy) -: - gobject_ (gobject) -{ - // This ctor should never be called for GlibmmIOChannel instances. - g_assert(gobject != 0); - g_assert(gobject->funcs != &GlibmmIOChannel::vfunc_table); - - if(take_copy) - g_io_channel_ref(gobject_); -} - -IOChannel::~IOChannel() -{ - if(gobject_) - { - // Check whether this IOChannel is implemented in C++, i.e. whether it - // uses our GlibmmIOChannel forwarding backend. Normally, this will never - // be true because the wrapper should only be deleted in the io_free() - // callback, which clears gobject_ before deleting. But in case the ctor - // of a derived class threw an exception the GIOChannel must be destroyed - // prematurely. - // - if(gobject_->funcs == &GlibmmIOChannel::vfunc_table) - { - // Disconnect the wrapper object so that it won't be deleted twice. - reinterpret_cast(gobject_)->wrapper = 0; - } - - GIOChannel *const tmp_gobject = gobject_; - gobject_ = 0; - - g_io_channel_unref(tmp_gobject); - } -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::RefPtr IOChannel::create_from_file(const std::string& filename, const std::string& mode) -#else -Glib::RefPtr IOChannel::create_from_file(const std::string& filename, const std::string& mode, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - GIOChannel *const channel = g_io_channel_new_file(filename.c_str(), mode.c_str(), &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return Glib::wrap(channel, false); -} - -Glib::RefPtr IOChannel::create_from_fd(int fd) -{ - return Glib::wrap(g_io_channel_unix_new(fd), false); -} - -#ifdef G_OS_WIN32 - -Glib::RefPtr IOChannel::create_from_win32_fd(int fd) -{ - return Glib::wrap(g_io_channel_win32_new_fd(fd), false); -} - -Glib::RefPtr IOChannel::create_from_win32_socket(int socket) -{ - return Glib::wrap(g_io_channel_win32_new_socket(socket), false); -} - -#endif /* G_OS_WIN32 */ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::write(const Glib::ustring& str) -#else -IOStatus IOChannel::write(const Glib::ustring& str, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; -#ifdef GLIBMM_EXCEPTIONS_ENABLED - return write(str.data(), str.bytes(), bytes_written); -#else - return write(str.data(), str.bytes(), bytes_written, error); -#endif //GLIBMM_EXCEPTIONS_ENABLED -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read_line(Glib::ustring& line) -#else -IOStatus IOChannel::read_line(Glib::ustring& line, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - Glib::ScopedPtr buf; - GError* gerror = 0; - gsize bytes = 0; - - const GIOStatus status = g_io_channel_read_line(gobj(), buf.addr(), &bytes, 0, &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(buf.get()) - line.assign(buf.get(), buf.get() + bytes); - else - line.erase(); - - return (IOStatus) status; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read_to_end(Glib::ustring& str) -#else -IOStatus IOChannel::read_to_end(Glib::ustring& str, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - Glib::ScopedPtr buf; - GError* gerror = 0; - gsize bytes = 0; - - const GIOStatus status = g_io_channel_read_to_end(gobj(), buf.addr(), &bytes, &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(buf.get()) - str.assign(buf.get(), buf.get() + bytes); - else - str.erase(); - - return (IOStatus) status; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read(Glib::ustring& str, gsize count) -#else -IOStatus IOChannel::read(Glib::ustring& str, gsize count, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - Glib::ScopedPtr buf (g_new(char, count)); - GError* gerror = 0; - gsize bytes = 0; - - const GIOStatus status = g_io_channel_read_chars(gobj(), buf.get(), count, &bytes, &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(buf.get()) - str.assign(buf.get(), buf.get() + bytes); - else - str.erase(); - - return (IOStatus) status; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::set_encoding(const std::string& encoding) -#else -IOStatus IOChannel::set_encoding(const std::string& encoding, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - - const GIOStatus status = g_io_channel_set_encoding( - gobj(), (encoding.empty()) ? 0 : encoding.c_str(), &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return (IOStatus) status; -} - -std::string IOChannel::get_encoding() const -{ - const char *const encoding = g_io_channel_get_encoding(gobject_); - return (encoding) ? std::string(encoding) : std::string(); -} - -void IOChannel::set_line_term(const std::string& term) -{ - if(term.empty()) - g_io_channel_set_line_term(gobj(), 0, 0); - else - g_io_channel_set_line_term(gobj(), term.data(), term.size()); -} - -std::string IOChannel::get_line_term() const -{ - int len = 0; - const char *const term = g_io_channel_get_line_term(gobject_, &len); - - return (term) ? std::string(term, len) : std::string(); -} - -Glib::RefPtr IOChannel::create_watch(IOCondition condition) -{ - // The corresponding unreference() takes place in the dtor - // of the Glib::RefPtr object below. - reference(); - return IOSource::create(Glib::RefPtr(this), condition); -} - -IOStatus IOChannel::read_vfunc(char*, gsize, gsize&) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOStatus IOChannel::write_vfunc(const char*, gsize, gsize&) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOStatus IOChannel::seek_vfunc(gint64, SeekType) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOStatus IOChannel::close_vfunc() -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -Glib::RefPtr IOChannel::create_watch_vfunc(IOCondition) -{ - g_assert_not_reached(); - return Glib::RefPtr(); -} - -IOStatus IOChannel::set_flags_vfunc(IOFlags) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOFlags IOChannel::get_flags_vfunc() -{ - g_assert_not_reached(); - return IOFlags(0); -} - -void IOChannel::reference() const -{ - g_io_channel_ref(gobject_); -} - -void IOChannel::unreference() const -{ - g_io_channel_unref(gobject_); -} - -Glib::RefPtr wrap(GIOChannel* gobject, bool take_copy) -{ - IOChannel* cpp_object = 0; - - if(gobject) - { - if(gobject->funcs == &GlibmmIOChannel::vfunc_table) - { - cpp_object = reinterpret_cast(gobject)->wrapper; - - if(take_copy && cpp_object) - cpp_object->reference(); - } - else - { - cpp_object = new ForeignIOChannel(gobject, take_copy); - cpp_object->reference(); // the refcount is initially 0 - } - } - - return Glib::RefPtr(cpp_object); -} - - -/**** Glib::GlibmmIOChannel ************************************************/ - -// static -GIOStatus GlibmmIOChannel::io_read(GIOChannel* channel, char* buf, gsize count, - gsize* bytes_read, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->read_vfunc(buf, count, *bytes_read); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOStatus GlibmmIOChannel::io_write(GIOChannel* channel, const char* buf, gsize count, - gsize* bytes_written, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->write_vfunc(buf, count, *bytes_written); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOStatus GlibmmIOChannel::io_seek(GIOChannel* channel, gint64 offset, GSeekType type, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->seek_vfunc(offset, (SeekType) type); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOStatus GlibmmIOChannel::io_close(GIOChannel* channel, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->close_vfunc(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - - return G_IO_STATUS_ERROR; -} - -// static -GSource* GlibmmIOChannel::io_create_watch(GIOChannel* channel, GIOCondition condition) -{ - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - const Glib::RefPtr source = wrapper->create_watch_vfunc((IOCondition) condition); - return (source) ? source->gobj_copy() : 0; - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return 0; -} - -// static -void GlibmmIOChannel::io_free(GIOChannel* channel) -{ - if(IOChannel *const wrapper = reinterpret_cast(channel)->wrapper) - { - wrapper->gobject_ = 0; - delete wrapper; - } - - g_free(channel); -} - -// static -GIOStatus GlibmmIOChannel::io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->set_flags_vfunc((IOFlags) flags); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOFlags GlibmmIOChannel::io_get_flags(GIOChannel* channel) -{ - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOFlags) wrapper->get_flags_vfunc(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return GIOFlags(0); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::IOChannelError::IOChannelError(Glib::IOChannelError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_IO_CHANNEL_ERROR, error_code, error_message) -{} - -Glib::IOChannelError::IOChannelError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::IOChannelError::Code Glib::IOChannelError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::IOChannelError::throw_func(GError* gobject) -{ - throw Glib::IOChannelError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::IOChannelError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::IOChannelError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -namespace Glib -{ - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read(gunichar& thechar) -#else -IOStatus IOChannel::read(gunichar& thechar, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_read_unichar(gobj(), &(thechar), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read(char* buf, gsize count, gsize& bytes_read) -#else -IOStatus IOChannel::read(char* buf, gsize count, gsize& bytes_read, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_read_chars(gobj(), buf, count, &(bytes_read), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::write(const char* buf, gssize count, gsize& bytes_written) -#else -IOStatus IOChannel::write(const char* buf, gssize count, gsize& bytes_written, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_write_chars(gobj(), buf, count, &(bytes_written), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::write(gunichar unichar) -#else -IOStatus IOChannel::write(gunichar unichar, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_write_unichar(gobj(), unichar, &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::seek(gint64 offset, SeekType type) -#else -IOStatus IOChannel::seek(gint64 offset, SeekType type, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_seek_position(gobj(), offset, ((GSeekType)(type)), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::flush() -#else -IOStatus IOChannel::flush(std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_flush(gobj(), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::close(bool flush) -#else -IOStatus IOChannel::close(bool flush, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_shutdown(gobj(), static_cast(flush), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -gsize IOChannel::get_buffer_size() const -{ - return g_io_channel_get_buffer_size(const_cast(gobj())); -} - -void IOChannel::set_buffer_size(gsize size) -{ -g_io_channel_set_buffer_size(gobj(), size); -} - -IOFlags IOChannel::get_flags() const -{ - return ((IOFlags)(g_io_channel_get_flags(const_cast(gobj())))); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::set_flags(IOFlags flags) -#else -IOStatus IOChannel::set_flags(IOFlags flags, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - IOStatus retvalue = ((IOStatus)(g_io_channel_set_flags(gobj(), ((GIOFlags)(flags)), &(gerror)))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -void IOChannel::set_buffered(bool buffered) -{ -g_io_channel_set_buffered(gobj(), static_cast(buffered)); -} - -bool IOChannel::get_buffered() const -{ - return g_io_channel_get_buffered(const_cast(gobj())); -} - -IOCondition IOChannel::get_buffer_condition() const -{ - return ((IOCondition)(g_io_channel_get_buffer_condition(const_cast(gobj())))); -} - -bool IOChannel::get_close_on_unref() const -{ - return g_io_channel_get_close_on_unref(const_cast(gobj())); -} - -void IOChannel::set_close_on_unref(bool do_close) -{ -g_io_channel_set_close_on_unref(gobj(), static_cast(do_close)); -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/iochannel.h b/libs/glibmm2/glib/glibmm/iochannel.h deleted file mode 100644 index 0891a78977..0000000000 --- a/libs/glibmm2/glib/glibmm/iochannel.h +++ /dev/null @@ -1,763 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_IOCHANNEL_H -#define _GLIBMM_IOCHANNEL_H - - -// -*- c++ -*- -/* $Id: iochannel.hg,v 1.8 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include -#include -#include - -#include -#include - -GLIBMM_USING_STD(string) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GIOChannel GIOChannel; } -#endif - - -namespace Glib -{ - -class Source; -class IOSource; - -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - */ -enum SeekType -{ - SEEK_TYPE_CUR, - SEEK_TYPE_SET, - SEEK_TYPE_END -}; - - -/** - * @ingroup glibmmEnums - */ -enum IOStatus -{ - IO_STATUS_ERROR, - IO_STATUS_NORMAL, - IO_STATUS_EOF, - IO_STATUS_AGAIN -}; - - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %IOFlags operator|(IOFlags, IOFlags)
- * %IOFlags operator&(IOFlags, IOFlags)
- * %IOFlags operator^(IOFlags, IOFlags)
- * %IOFlags operator~(IOFlags)
- * %IOFlags& operator|=(IOFlags&, IOFlags)
- * %IOFlags& operator&=(IOFlags&, IOFlags)
- * %IOFlags& operator^=(IOFlags&, IOFlags)
- */ -enum IOFlags -{ - IO_FLAG_APPEND = 1 << 0, - IO_FLAG_NONBLOCK = 1 << 1, - IO_FLAG_IS_READABLE = 1 << 2, - IO_FLAG_IS_WRITEABLE = 1 << 3, - IO_FLAG_IS_SEEKABLE = 1 << 4, - IO_FLAG_GET_MASK = 0x0, - IO_FLAG_SET_MASK = 0x1 -}; - -/** @ingroup glibmmEnums */ -inline IOFlags operator|(IOFlags lhs, IOFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline IOFlags operator&(IOFlags lhs, IOFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline IOFlags operator^(IOFlags lhs, IOFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline IOFlags operator~(IOFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline IOFlags& operator|=(IOFlags& lhs, IOFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline IOFlags& operator&=(IOFlags& lhs, IOFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline IOFlags& operator^=(IOFlags& lhs, IOFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** Exception class for IOChannel errors. - */ -class IOChannelError : public Glib::Error -{ -public: - enum Code - { - FILE_TOO_BIG, - INVALID_ARGUMENT, - IO_ERROR, - IS_DIRECTORY, - NO_SPACE_LEFT, - NO_SUCH_DEVICE, - OVERFLOWN, - BROKEN_PIPE, - FAILED - }; - - IOChannelError(Code error_code, const Glib::ustring& error_message); - explicit IOChannelError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class GlibmmIOChannel; -#endif - -/** IOChannel aims to provide portable I/O support for files, pipes - * and sockets, and to integrate them with the GLib main event loop. - * - * Note that IOChannels implement an automatic implicit character set - * conversion to the data stream, and usually will not pass by default - * binary data unchanged. To set the encoding of the channel, use e.g. - * set_encoding("ISO-8859-15"). To set the channel to no encoding, use - * set_encoding() without any arguments. - * - * You can create an IOChannel with one of the static create methods, or - * implement one yourself, in which case you have to 1) override all - * _vfunc() members. 2) set the GIOChannel flags in your constructor. - * - * @note This feature of being able to implement a custom Glib::IOChannel is - * deprecated in glibmm 2.2. The vfunc interface has not yet stabilized - * enough to allow that -- the C++ wrapper went in by pure accident. Besides, - * it isn't terribly useful either. Thus please refrain from overriding any - * IOChannel vfuncs. - */ -class IOChannel : public sigc::trackable -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef IOChannel CppObjectType; - typedef GIOChannel BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: - - -public: - virtual ~IOChannel(); - - /** Open a file @a filename as an I/O channel using mode @a mode. - * This channel will be closed when the last reference to it is dropped, - * so there is no need to call close() (though doing so will not cause - * problems, as long as no attempt is made to access the channel after - * it is closed). - * @param filename The name of the file to open. - * @param mode One of "r", "w", "a", - * "r+", "w+", "a+". These have the - * same meaning as in fopen(). - * @return An IOChannel for the opened file. - * @throw Glib::FileError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static Glib::RefPtr create_from_file(const std::string& filename, const std::string& mode); -#else - static Glib::RefPtr create_from_file(const std::string& filename, const std::string& mode, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Creates an I/O channel from a file descriptor. - * On Unix, IOChannels created with this function work for any file - * descriptor or socket. - * - * On Win32, this can be used either for files opened with the MSVCRT (the - * Microsoft run-time C library) _open() or _pipe(), - * including file descriptors 0, 1 and 2 (corresponding to stdin, - * stdout and stderr), or for Winsock SOCKETs. If - * the parameter is a legal file descriptor, it is assumed to be such, - * otherwise it should be a SOCKET. This relies on SOCKETs - * and file descriptors not overlapping. If you want to be certain, call - * either create_from_win32_fd() or create_from_win32_socket() instead as - * appropriate. - * - * The term file descriptor as used in the context of Win32 refers to the - * emulated Unix-like file descriptors MSVCRT provides. The native - * corresponding concept is file HANDLE. There isn't as of yet - * a way to get IOChannels for Win32 file HANDLEs. - */ - static Glib::RefPtr create_from_fd(int fd); - - -/* defined(DOXYGEN_SHOULD_SKIP_THIS) actually does the opposite of what it looks like... */ -#if defined(G_OS_WIN32) || defined(DOXYGEN_SHOULD_SKIP_THIS) - - /** Create an I/O channel for C runtime (emulated Unix-like) file descriptors. - * After calling add_watch() on a I/O channel returned by this function, you - * shouldn't call read() on the file descriptor. This is because adding - * polling for a file descriptor is implemented on Win32 by starting a thread - * that sits blocked in a %read() from the file descriptor most of - * the time. All reads from the file descriptor should be done by this - * internal GLib thread. Your code should call only IOChannel::read(). - */ - static Glib::RefPtr create_from_win32_fd(int fd); - - - /** Create an I/O channel for a winsock socket. The parameter should be a - * SOCKET. Contrary to I/O channels for file descriptors (on Win32), - * you can use normal recv() or recvfrom() on sockets even - * if GLib is polling them. - */ - static Glib::RefPtr create_from_win32_socket(int socket); - - -#endif /* defined(G_OS_WIN32) || defined(DOXYGEN_SHOULD_SKIP_THIS) */ - - /** Read a single UCS-4 character. - * @retval thechar The Unicode character. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - - /** This function cannot be called on a channel with 0 encoding. - * @param thechar A location to return a character. - * @param error A location to return an error of type G::ConvertError - * or G::IOChannelError. - * @return A G::IOStatus. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read(gunichar& thechar); -#else - IOStatus read(gunichar& thechar, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Read a character sequence into memory. - * @param buf A buffer to read data into. - * @param count The size of the buffer in bytes. Note that the buffer may - * not be complelely filled even if there is data in the buffer if the - * remaining data is not a complete character. - * @retval bytes_read The number of bytes read. This may be zero even on - * success if @a count < 6 and the channel's encoding is not "". - * This indicates that the next UTF-8 character is too wide for the buffer. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - - /** Replacement for g_io_channel_read() with the new API. - * @param buf A buffer to read data into. - * @param count The size of the buffer. Note that the buffer may - * not be complelely filled even if there is data - * in the buffer if the remaining data is not a - * complete character. - * @param bytes_read The number of bytes read. This may be zero even on - * success if count < 6 and the channel's encoding is non-0. - * This indicates that the next UTF-8 character is too wide for - * the buffer. - * @param error A location to return an error of type G::ConvertError - * or G::IOChannelError. - * @return The status of the operation. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read(char* buf, gsize count, gsize& bytes_read); -#else - IOStatus read(char* buf, gsize count, gsize& bytes_read, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Read a maximum of @a count bytes into @a str. - * @param count The maximum number of bytes to read. - * @retval str The characters that have been read. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read(Glib::ustring& str, gsize count); -#else - IOStatus read(Glib::ustring& str, gsize count, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - /** Read a whole line. - * Reads until the line separator is found, which is included - * in the result string. - * @retval line The line that was read. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read_line(Glib::ustring& line); -#else - IOStatus read_line(Glib::ustring& line, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Reads all the remaining data from the file. - * @retval str The resulting string. - * @return Glib::IO_STATUS_NORMAL on success. This function never - * returns Glib::IO_STATUS_EOF. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read_to_end(Glib::ustring& str); -#else - IOStatus read_to_end(Glib::ustring& str, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Write a string to the I/O channel. - * Note that this method does not return the number of characters written. - * If the channel is blocking and the returned value is - * Glib::IO_STATUS_NORMAL, the whole string was written. - * @param str the string to write. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus write(const Glib::ustring& str); -#else - IOStatus write(const Glib::ustring& str, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - /** Write a memory area of @a count bytes to the I/O channel. - * @param buf The start of the memory area. - * @param count The number of bytes to write. - * @retval bytes_written The number of bytes written to the channel. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - - /** Replacement for g_io_channel_write() with the new API. - * - * On seekable channels with encodings other than 0 or UTF-8, generic - * mixing of reading and writing is not allowed. A call to g_io_channel_write_chars() - * may only be made on a channel from which data has been read in the - * cases described in the documentation for g_io_channel_set_encoding(). - * @param buf A buffer to write data from. - * @param count The size of the buffer. If -1, the buffer - * is taken to be a nul-terminated string. - * @param bytes_written The number of bytes written. This can be nonzero - * even if the return value is not G::IO_STATUS_NORMAL. - * If the return value is G::IO_STATUS_NORMAL and the - * channel is blocking, this will always be equal - * to @a count if @a count >= 0. - * @param error A location to return an error of type G::ConvertError - * or G::IOChannelError. - * @return The status of the operation. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus write(const char* buf, gssize count, gsize& bytes_written); -#else - IOStatus write(const char* buf, gssize count, gsize& bytes_written, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Write a single UCS-4 character to the I/O channel. - * @param unichar The character to write. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - - /** This function cannot be called on a channel with 0 encoding. - * @param thechar A character. - * @param error A location to return an error of type G::ConvertError - * or G::IOChannelError. - * @return A G::IOStatus. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus write(gunichar unichar); -#else - IOStatus write(gunichar unichar, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Seek the I/O channel to a specific position. - * @param offset The offset in bytes from the position specified by @a type. - * @param type A SeekType. The type Glib::SEEK_TYPE_CUR is only allowed in - * those cases where a call to set_encoding() is allowed. See the - * documentation for set_encoding() for details. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - - /** Replacement for g_io_channel_seek() with the new API. - * @param offset The offset in bytes from the position specified by @a type . - * @param type A G::SeekType. The type G::SEEK_CUR is only allowed in those - * cases where a call to g_io_channel_set_encoding() - * is allowed. See the documentation for - * g_io_channel_set_encoding() for details. - * @param error A location to return an error of type G::IOChannelError. - * @return The status of the operation. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus seek(gint64 offset, SeekType type = SEEK_TYPE_SET); -#else - IOStatus seek(gint64 offset, SeekType type, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Flush the buffers of the I/O channel. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - - /** Flushes the write buffer for the GIOChannel. - * @param error Location to store an error of type G::IOChannelError. - * @return The status of the operation: One of - * G::IO_CHANNEL_NORMAL, G::IO_CHANNEL_AGAIN, or - * G::IO_CHANNEL_ERROR. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus flush(); -#else - IOStatus flush(std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Close the I/O channel. - * Any pending data to be written will be flushed if @a flush is true. - * The channel will not be freed until the last reference is dropped. - * Accessing the channel after closing it is considered an error. - * @param flush Whether to flush() pending data before closing the channel. - * @return The status of the operation. - * @throw Glib::IOChannelError - */ - - /** Close an IO channel. Any pending data to be written will be - * flushed if @a flush is true. The channel will not be freed until the - * last reference is dropped using g_io_channel_unref(). - * @param flush If true, flush pending. - * @param err Location to store a G::IOChannelError. - * @return The status of the operation. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus close(bool flush = true); -#else - IOStatus close(bool flush, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Get the IOChannel internal buffer size. - * @return The buffer size. - */ - - /** Gets the buffer size. - * @return The size of the buffer. - */ - gsize get_buffer_size() const; - - /** Set the internal IOChannel buffer size. - * @param size The buffer size the IOChannel should use. - */ - - /** Sets the buffer size. - * @param size The size of the buffer. 0 == pick a good size. - */ - void set_buffer_size(gsize size); - - /** Get the current flags for a IOChannel, including read-only - * flags such as Glib::IO_FLAG_IS_READABLE. - * - * The values of the flags Glib::IO_FLAG_IS_READABLE and - * Glib::IO_FLAG_IS_WRITEABLE are cached for internal use by the channel when - * it is created. If they should change at some later point (e.g. partial - * shutdown of a socket with the UNIX shutdown() function), the user - * should immediately call get_flags() to update the internal values of these - * flags. - * @return Bitwise combination of the flags set on the channel. - */ - - /** Gets the current flags for a G::IOChannel, including read-only - * flags such as G::IO_FLAG_IS_READABLE. - * - * The values of the flags G::IO_FLAG_IS_READABLE and G::IO_FLAG_IS_WRITEABLE - * are cached for internal use by the channel when it is created. - * If they should change at some later point (e.g. partial shutdown - * of a socket with the UNIX shutdown() function), the user - * should immediately call g_io_channel_get_flags() to update - * the internal values of these flags. - * @return The flags which are set on the channel. - */ - IOFlags get_flags() const; - - /** Set flags on the IOChannel. - * @param flags Bitwise combination of the flags to set. - * @return The operation result code. - * @throw Glib::IOChannelError - */ - - /** Sets the (writeable) flags in @a channel to ( @a flags & G::IO_CHANNEL_SET_MASK). - * @param flags The flags to set on the IO channel. - * @param error A location to return an error of type G::IOChannelError. - * @return The status of the operation. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus set_flags(IOFlags flags); -#else - IOStatus set_flags(IOFlags flags, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Set the buffering status of the I/O channel. - * The buffering state can only be set if the channel's encoding is - * "". For any other encoding, the channel must be buffered. - * - * A buffered channel can only be set unbuffered if the channel's internal - * buffers have been flushed. Newly created channels or channels which have - * returned Glib::IO_STATUS_EOF not require such a flush. For write-only - * channels, a call to flush() is sufficient. For all other channels, the - * buffers may be flushed by a call to seek(). This includes the possibility - * of seeking with seek type Glib::SEEK_TYPE_CUR and an offset of zero. Note - * that this means that socket-based channels cannot be set unbuffered once - * they have had data read from them. - * - * The default state of the channel is buffered. - * - * @param buffered Whether to set the channel buffered or unbuffered. - */ - - /** The buffering state can only be set if the channel's encoding - * is 0. For any other encoding, the channel must be buffered. - * - * A buffered channel can only be set unbuffered if the channel's - * internal buffers have been flushed. Newly created channels or - * channels which have returned G::IO_STATUS_EOF - * not require such a flush. For write-only channels, a call to - * g_io_channel_flush() is sufficient. For all other channels, - * the buffers may be flushed by a call to g_io_channel_seek_position(). - * This includes the possibility of seeking with seek type G::SEEK_CUR - * and an offset of zero. Note that this means that socket-based - * channels cannot be set unbuffered once they have had data - * read from them. - * - * On unbuffered channels, it is safe to mix read and write - * calls from the new and old APIs, if this is necessary for - * maintaining old code. - * - * The default state of the channel is buffered. - * @param buffered Whether to set the channel buffered or unbuffered. - */ - void set_buffered(bool buffered); - - /** Get the buffering status of the I/O channel. - * @return The buffering status of the channel. - */ - - /** Return Value: true if the @a channel is buffered. - * @return true if the @a channel is buffered. - */ - bool get_buffered() const; - - /** Returns an IOCondition depending on whether there is data to be - * read/space to write data in the internal buffers in the I/O channel. - * Only the flags Glib::IO_IN and Glib::IO_OUT may be set. - * @return Bitwise combination of Glib::IOCondition flags. - */ - - /** This function returns a G::IOCondition depending on whether there - * is data to be read/space to write data in the - * internal buffers in the G::IOChannel. Only the flags G::IO_IN and - * G::IO_OUT may be set. - * @return A G::IOCondition. - */ - IOCondition get_buffer_condition() const; - - /** Returns whether the file/socket/whatever associated with the I/O channel - * will be closed when the channel receives its final unref and is destroyed. - * The default value of this is true for channels created by - * create_from_file(), and false for all other channels. - * @return Whether the channel will be closed on the final unref of the - * IOChannel object. - */ - - /** Return value: Whether the channel will be closed on the final unref of - * @return Whether the channel will be closed on the final unref of - * the GIOChannel data structure. - */ - bool get_close_on_unref() const; - - /** Setting this flag to true for a channel you have already closed - * can cause problems. - * @param do_close Whether to close the channel on the final unref of the - * IOChannel object. The default value of this is true for channels - * created by create_from_file(), and false for all other channels. - */ - - /** Setting this flag to true for a channel you have already closed - * can cause problems. - * @param do_close Whether to close the channel on the final unref of - * the GIOChannel data structure. The default value of - * this is true for channels created by g_io_channel_new_file(), - * and false for all other channels. - */ - void set_close_on_unref(bool do_close); - - /** Sets the encoding for the input/output of the channel. - * The internal encoding is always UTF-8. The default encoding for the - * external file is UTF-8. The encoding "" is safe to use with - * binary data. - * - * The encoding can only be set if one of the following conditions - * is true: - * - * -# The channel was just created, and has not been written to or read from - * yet. - * -# The channel is write-only. - * -# The channel is a file, and the file pointer was just repositioned by a - * call to seek_position(). (This flushes all the internal buffers.) - * -# The current encoding is "" or UTF-8. - * -# One of the read methods has just returned Glib::IO_STATUS_EOF (or, in - * the case of read_to_end(), Glib::IO_STATUS_NORMAL). - * -# The read() method has returned Glib::IO_STATUS_AGAIN or thrown - * a Glib::Error exception. This may be useful in the case of - * ConvertError::ILLEGAL_SEQUENCE. Returning one of these statuses - * from read_line() or read_to_end() does not guarantee that - * the encoding can be changed. - * - * Channels which do not meet one of the above conditions cannot call - * seek_position() with a seek type of Glib::SEEK_TYPE_CUR and, if they - * are "seekable", cannot call write() after calling one of the API - * "read" methods. - * - * @param encoding The encoding name, or "" for binary. - * @return Glib::IO_STATUS_NORMAL if the encoding was successfully set. - * @throw Glib::IOChannelError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus set_encoding(const std::string& encoding = std::string()); -#else - IOStatus set_encoding(const std::string& encoding, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Get the encoding of the I/O channel. - * @return The current encoding of the channel. - */ - std::string get_encoding() const; - - - void set_line_term(const std::string& term = std::string()); - - - std::string get_line_term() const; - - - /** Creates an IOSource object. - * Create a slot from a function to be called when condition is met - * for the channel with sigc::ptr_fun() or sigc::mem_fun() and pass - * it into the connect() function of the returned IOSource object. - * Polling of the channel will start when you attach a MainContext - * object to the returned IOSource object using its attach() function. - * - * Glib::signal_io().connect() is a simpler interface to the same - * functionality, for the case where you want to add the source to the - * default main context. - * @param condition The condition to watch for. - * @return An IOSource object that can be polled from a MainContext's event loop. - */ - Glib::RefPtr create_watch(IOCondition condition); - - - virtual void reference() const; - virtual void unreference() const; - - - GIOChannel* gobj() { return gobject_; } - const GIOChannel* gobj() const { return gobject_; } - -protected: - GIOChannel* gobject_; - - /** Constructor that should be used by derived classes. - * Use this constructor if you want to inherit from IOChannel. - * It will set up a GIOChannel that will call the vfuncs of your - * class even if it is being used from C code, and it will keep - * a reference to the C++ code while the GIOChannel exists. - */ - IOChannel(); - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - IOChannel(GIOChannel* gobject, bool take_copy); -#endif - - virtual IOStatus read_vfunc(char* buf, gsize count, gsize& bytes_read); - virtual IOStatus write_vfunc(const char* buf, gsize count, gsize& bytes_written); - virtual IOStatus seek_vfunc(gint64 offset, SeekType type); - virtual IOStatus close_vfunc(); - virtual IOStatus set_flags_vfunc(IOFlags flags); - virtual IOFlags get_flags_vfunc(); - virtual Glib::RefPtr create_watch_vfunc(IOCondition cond); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - friend class Glib::GlibmmIOChannel; -#endif - - -}; - -Glib::RefPtr wrap(GIOChannel* gobject, bool take_copy = false); - -} // namespace Glib - - -#endif /* _GLIBMM_IOCHANNEL_H */ - diff --git a/libs/glibmm2/glib/glibmm/keyfile.cc b/libs/glibmm2/glib/glibmm/keyfile.cc deleted file mode 100644 index 8fad136602..0000000000 --- a/libs/glibmm2/glib/glibmm/keyfile.cc +++ /dev/null @@ -1,605 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -/* Copyright 2006 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -namespace Glib -{ - -/**** Glib::KeyFile ********************************************************/ - -KeyFile::KeyFile() -{ - gobject_ = g_key_file_new(); - owns_gobject_ = true; -} - -KeyFile::KeyFile(GKeyFile* castitem, bool takes_ownership) -{ - gobject_ = castitem; - owns_gobject_ = takes_ownership; -} - -KeyFile::~KeyFile() -{ - if (owns_gobject_) - g_key_file_free(gobject_); -} - -bool KeyFile::load_from_data(const Glib::ustring& data, KeyFileFlags flags) -{ - GError *error = 0; - bool retvalue = g_key_file_load_from_data(gobj(), data.c_str(), data.bytes(), ((GKeyFileFlags)(flags)), &(error)); - if(error) :: Glib::Error::throw_exception(error); - return retvalue; -} - -bool KeyFile::load_from_data_dirs(const std::string& file, std::string& full_path, KeyFileFlags flags) -{ - GError *error = 0; - char *full_path_c; - bool retvalue = g_key_file_load_from_data_dirs(gobj(), file.c_str(), &full_path_c, ((GKeyFileFlags)(flags)), &(error)); - full_path = Glib::convert_return_gchar_ptr_to_ustring(full_path_c); - if(error) :: Glib::Error::throw_exception(error); - return retvalue; -} - -Glib::ustring KeyFile::to_data() -{ - GError *error = 0; - gsize size; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_to_data(gobj(), &size, &error)); - if(error) :: Glib::Error::throw_exception(error); - return retvalue; -} - -Glib::ArrayHandle KeyFile::get_groups() const -{ - gchar** group_names = 0; - gsize number_of_groups = 0; - group_names = g_key_file_get_groups(const_cast(gobj()), &number_of_groups); - return Glib::ArrayHandle(group_names, number_of_groups, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_keys(const Glib::ustring& group_name) const -{ - gchar** key_names = 0; - gsize number_of_keys = 0; - GError* error = 0; - key_names = g_key_file_get_keys(const_cast(gobj()), group_name.c_str(), &number_of_keys, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(key_names, number_of_keys, Glib::OWNERSHIP_DEEP); -} - -Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - GError *error = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_locale_string(const_cast(gobj()), group_name.c_str(), key.c_str(), 0, &(error))); - if(error) ::Glib::Error::throw_exception(error); - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -int KeyFile::get_integer(const Glib::ustring& key) const -#else -int KeyFile::get_integer(const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - int retvalue = g_key_file_get_integer(const_cast(gobj()), NULL, key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -double KeyFile::get_double(const Glib::ustring& key) const -#else -double KeyFile::get_double(const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - double retvalue = g_key_file_get_double(const_cast(gobj()), NULL, key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -void KeyFile::set_double(const Glib::ustring& key, double value) -{ - g_key_file_set_double(gobj(), 0, key.c_str(), value); -} - - -Glib::ArrayHandle KeyFile::get_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gchar** string_list = 0; - gsize length_of_list = 0; - GError* error = 0; - string_list = g_key_file_get_string_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(string_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const -{ - gchar** string_list = 0; - gsize length_of_list = 0; - GError* error = 0; - string_list = g_key_file_get_locale_string_list(const_cast(gobj()), group_name.c_str(), key.c_str(), locale.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(string_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gboolean* bool_list = 0; - gsize length_of_list = 0; - GError* error = 0; - bool_list = g_key_file_get_boolean_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(&bool_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_integer_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gint* integer_list = 0; - gsize length_of_list = 0; - GError* error = 0; - integer_list = g_key_file_get_integer_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(integer_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_double_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gdouble* integer_list = 0; - gsize length_of_list = 0; - GError* error = 0; - integer_list = g_key_file_get_double_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(integer_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -void KeyFile::set_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_string_list(gobj(), group_name.c_str(), key.c_str(), list.data(), length_of_list); -} - -void KeyFile::set_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_locale_string_list(gobj(), group_name.c_str(), key.c_str(), locale.c_str(), list.data(), length_of_list); -} - -void KeyFile::set_integer_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_integer_list(gobj(), group_name.c_str(), key.c_str(), const_cast(list.data()), length_of_list); -} - -void KeyFile::set_double_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_double_list(gobj(), group_name.c_str(), key.c_str(), const_cast(list.data()), length_of_list); -} - -void KeyFile::set_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_boolean_list(gobj(), group_name.c_str(), key.c_str(), *(list.data()), length_of_list); -} - -Glib::ustring KeyFile::get_comment() const -{ - GError *error = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_comment(const_cast(gobj()), 0, 0, &(error))); - if(error) ::Glib::Error::throw_exception(error); - return retvalue; -} - -Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name) const -{ - GError *error = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_comment(const_cast(gobj()), group_name.c_str(), 0, &(error))); - if(error) ::Glib::Error::throw_exception(error); - return retvalue; -} - -void KeyFile::set_comment(const Glib::ustring& comment) -{ - GError *error = 0; - g_key_file_set_comment(gobj(), 0, 0, comment.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); -} - -void KeyFile::set_comment(const Glib::ustring& group_name, const Glib::ustring& comment) -{ - GError *error = 0; - g_key_file_set_comment(gobj(), group_name.c_str(), 0, comment.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); -} - -} - -namespace -{ -} // anonymous namespace - - -Glib::KeyFileError::KeyFileError(Glib::KeyFileError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_KEY_FILE_ERROR, error_code, error_message) -{} - -Glib::KeyFileError::KeyFileError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::KeyFileError::Code Glib::KeyFileError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::KeyFileError::throw_func(GError* gobject) -{ - throw Glib::KeyFileError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::KeyFileError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::KeyFileError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -namespace Glib -{ - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool KeyFile::load_from_file(const std::string& filename, KeyFileFlags flags) -#else -bool KeyFile::load_from_file(const std::string& filename, KeyFileFlags flags, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_key_file_load_from_file(gobj(), filename.c_str(), ((GKeyFileFlags)(flags)), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -Glib::ustring KeyFile::get_start_group() const -{ - return Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_start_group(const_cast(gobj()))); -} - -bool KeyFile::has_group(const Glib::ustring& group_name) const -{ - return g_key_file_has_group(const_cast(gobj()), group_name.c_str()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool KeyFile::has_key(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -bool KeyFile::has_key(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_key_file_has_key(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring KeyFile::get_value(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -Glib::ustring KeyFile::get_value(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_value(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring KeyFile::get_string(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -Glib::ustring KeyFile::get_string(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_string(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const -#else -Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_locale_string(const_cast(gobj()), group_name.c_str(), key.c_str(), locale.c_str(), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool KeyFile::get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -bool KeyFile::get_boolean(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_key_file_get_boolean(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -int KeyFile::get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -int KeyFile::get_integer(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - int retvalue = g_key_file_get_integer(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -double KeyFile::get_double(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -double KeyFile::get_double(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - double retvalue = g_key_file_get_double(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -void KeyFile::set_double(const Glib::ustring& group_name, const Glib::ustring& key, double value) -{ -g_key_file_set_double(gobj(), group_name.c_str(), key.c_str(), value); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const -#else -Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_comment(const_cast(gobj()), group_name.c_str(), key.c_str(), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -void KeyFile::set_list_separator(gchar separator) -{ -g_key_file_set_list_separator(gobj(), separator); -} - -void KeyFile::set_value(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value) -{ -g_key_file_set_value(gobj(), group_name.c_str(), key.c_str(), value.c_str()); -} - -void KeyFile::set_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& string) -{ -g_key_file_set_string(gobj(), group_name.c_str(), key.c_str(), string.c_str()); -} - -void KeyFile::set_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ustring& string) -{ -g_key_file_set_locale_string(gobj(), group_name.c_str(), key.c_str(), locale.c_str(), string.c_str()); -} - -void KeyFile::set_boolean(const Glib::ustring& group_name, const Glib::ustring& key, bool value) -{ -g_key_file_set_boolean(gobj(), group_name.c_str(), key.c_str(), static_cast(value)); -} - -void KeyFile::set_integer(const Glib::ustring& group_name, const Glib::ustring& key, int value) -{ -g_key_file_set_integer(gobj(), group_name.c_str(), key.c_str(), value); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void KeyFile::set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment) -#else -void KeyFile::set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - g_key_file_set_comment(gobj(), group_name.c_str(), key.c_str(), comment.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void KeyFile::remove_comment(const Glib::ustring& group_name, const Glib::ustring& key) -#else -void KeyFile::remove_comment(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - g_key_file_remove_comment(gobj(), group_name.c_str(), key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void KeyFile::remove_key(const Glib::ustring& group_name, const Glib::ustring& key) -#else -void KeyFile::remove_key(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - g_key_file_remove_key(gobj(), group_name.c_str(), key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void KeyFile::remove_group(const Glib::ustring& group_name) -#else -void KeyFile::remove_group(const Glib::ustring& group_name, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - g_key_file_remove_group(gobj(), group_name.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/keyfile.h b/libs/glibmm2/glib/glibmm/keyfile.h deleted file mode 100644 index 1c94b466fb..0000000000 --- a/libs/glibmm2/glib/glibmm/keyfile.h +++ /dev/null @@ -1,754 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_KEYFILE_H -#define _GLIBMM_KEYFILE_H - - -/* Copyright(C) 2006 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GKeyFile GKeyFile; } -#endif - -namespace Glib -{ - - /** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %KeyFileFlags operator|(KeyFileFlags, KeyFileFlags)
- * %KeyFileFlags operator&(KeyFileFlags, KeyFileFlags)
- * %KeyFileFlags operator^(KeyFileFlags, KeyFileFlags)
- * %KeyFileFlags operator~(KeyFileFlags)
- * %KeyFileFlags& operator|=(KeyFileFlags&, KeyFileFlags)
- * %KeyFileFlags& operator&=(KeyFileFlags&, KeyFileFlags)
- * %KeyFileFlags& operator^=(KeyFileFlags&, KeyFileFlags)
- */ -enum KeyFileFlags -{ - KEY_FILE_NONE = 0, - KEY_FILE_KEEP_COMMENTS = 1 << 0, - KEY_FILE_KEEP_TRANSLATIONS = 1 << 1 -}; - -/** @ingroup glibmmEnums */ -inline KeyFileFlags operator|(KeyFileFlags lhs, KeyFileFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline KeyFileFlags operator&(KeyFileFlags lhs, KeyFileFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline KeyFileFlags operator^(KeyFileFlags lhs, KeyFileFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline KeyFileFlags operator~(KeyFileFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline KeyFileFlags& operator|=(KeyFileFlags& lhs, KeyFileFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline KeyFileFlags& operator&=(KeyFileFlags& lhs, KeyFileFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline KeyFileFlags& operator^=(KeyFileFlags& lhs, KeyFileFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** Exception class for KeyFile errors. - */ -class KeyFileError : public Glib::Error -{ -public: - enum Code - { - UNKNOWN_ENCODING, - PARSE, - NOT_FOUND, - KEY_NOT_FOUND, - GROUP_NOT_FOUND, - INVALID_VALUE - }; - - KeyFileError(Code error_code, const Glib::ustring& error_message); - explicit KeyFileError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** This class lets you parse, edit or create files containing groups of key-value pairs, which we call key files - * for lack of a better name. Several freedesktop.org specifications use key files now, e.g the Desktop Entry - * Specification and the Icon Theme Specification. - * - * The syntax of key files is described in detail in the Desktop Entry Specification, here is a quick summary: Key - * files consists of groups of key-value pairs, interspersed with comments. - * - * @code - * # this is just an example - * # there can be comments before the first group - * - * [First Group] - * - * Name=Key File Example\tthis value shows\nescaping - * - * # localized strings are stored in multiple key-value pairs - * Welcome=Hello - * Welcome[de]=Hallo - * Welcome[fr]=Bonjour - * Welcome[it]=Ciao - * - * [Another Group] - * - * Numbers=2;20;-200;0 - * - * Booleans=true;false;true;true - * @endcode - * - * Lines beginning with a '#' and blank lines are considered comments. - * - * Groups are started by a header line containing the group name enclosed in '[' and ']', and ended implicitly by - * the start of the next group or the end of the file. Each key-value pair must be contained in a group. - * - * Key-value pairs generally have the form key=value, with the exception of localized strings, which have the form - * key[locale]=value. Space before and after the '=' character are ignored. Newline, tab, carriage return and - * backslash characters in value are escaped as \n, \t, \r, and \\, respectively. To preserve leading spaces in - * values, these can also be escaped as \s. - * - * Key files can store strings (possibly with localized variants), integers, booleans and lists of these. Lists are - * separated by a separator character, typically ';' or ','. To use the list separator character in a value in a - * list, it has to be escaped by prefixing it with a backslash. - * - * This syntax is obviously inspired by the .ini files commonly met on Windows, but there are some important - * differences: - * - .ini files use the ';' character to begin comments, key files use the '#' character. - * - Key files allow only comments before the first group. - * - Key files are always encoded in UTF-8. - * - Key and Group names are case-sensitive, for example a group called [GROUP] is a different group from [group]. - * - * Note that in contrast to the Desktop Entry Specification, groups in key files may contain the same key multiple - * times; the last entry wins. Key files may also contain multiple groups with the same name; they are merged - * together. Another difference is that keys and group names in key files are not restricted to ASCII characters. - * - * @newin2p14 - */ -class KeyFile -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef KeyFile CppObjectType; - typedef GKeyFile BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: - -public: - - /** Creates a new, empty KeyFile object. - */ - KeyFile(); - - /** Destructor - */ - ~KeyFile(); - - - /** Creates a glibmm KeyFile wrapper for a GKeyFile object. - * Note, when using this that when the wrapper is deleted, - * it will not automatically deleted the GKeyFile unless you - * set the delete_c_instance boolean to true. - * @param castitem The C instance to wrap - * @param delete_c_instance If the C instance should be deleted when - * the wrapper is deleted. - */ - KeyFile(GKeyFile* castitem, bool takes_ownership = false); - -public: - - - /** Loads a key file into an empty G::KeyFile structure. - * If the file could not be loaded then %error is set to - * either a G::FileError or G::KeyFileError. - * @param file The path of a filename to load, in the GLib file name encoding. - * @param flags Flags from G::KeyFileFlags. - * @param error Return location for a G::Error, or 0. - * @return true if a key file could be loaded, false othewise - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool load_from_file(const std::string& filename, KeyFileFlags flags = Glib::KEY_FILE_NONE); -#else - bool load_from_file(const std::string& filename, KeyFileFlags flags, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Loads a KeyFile from memory - * @param data The data to use as a KeyFile - * @param flags Bitwise combination of the flags to use for the KeyFile - * @return true if the KeyFile was successfully loaded, false otherwise - * @throw Glib::KeyFileError - */ - - bool load_from_data(const Glib::ustring& data, KeyFileFlags flags = Glib::KEY_FILE_NONE); - - - //TODO: - /* - gboolean g_key_file_load_from_dirs (GKeyFile *key_file, - const gchar *file, - const gchar **search_dirs, - gchar **full_path, - GKeyFileFlags flags, - GError **error); - */ - - /** Looks for a KeyFile named @a file in the paths returned from - * g_get_user_data_dir() and g_get_system_data_dirs() and loads them - * into the keyfile object, placing the full path to the file in - * @a full_path. - * @param file The file to search for - * @param full_path Return location for a string containing the full path of the file - * @param flags Bitwise combination of the flags to use for the KeyFile - * @return true if the KeyFile was successfully loaded, false otherwise - * @throw Glib::KeyFileError - * @throw Glib::FileError - */ - bool load_from_data_dirs(const std::string& file, std::string& full_path, KeyFileFlags flags = Glib::KEY_FILE_NONE); - - - /** Outputs the KeyFile as a string - * @return A string object holding the contents of KeyFile - */ - Glib::ustring to_data(); - - - /** Return value: The start group of the key file. - * @return The start group of the key file. - * - * @newin2p6. - */ - Glib::ustring get_start_group() const; - - /** Gets a list of all groups in the KeyFile - * @returns A list containing the names of the groups - */ - Glib::ArrayHandle get_groups() const; - - - /** Gets a list of all keys from the group @a group_name. - * @param group_name The name of a group - * @returns A list containing the names of the keys in @a group_name - */ - Glib::ArrayHandle get_keys(const Glib::ustring& group_name) const; - - - /** Looks whether the key file has the group @a group_name . - * @param group_name A group name. - * @return true if @a group_name is a part of @a key_file , false - * otherwise. - * @newin2p6. - */ - bool has_group(const Glib::ustring& group_name) const; - - /** Looks whether the key file has the key @a key in the group - * @a group_name . - * @param group_name A group name. - * @param key A key name. - * @param error Return location for a G::Error. - * @return true if @a key is a part of @a group_name , false - * otherwise. - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool has_key(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - bool has_key(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Return value: a newly allocated string or 0 if the specified - * @param group_name A group name. - * @param key A key. - * @param error Return location for a G::Error, or 0. - * @return A newly allocated string or 0 if the specified - * key cannot be found. - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Return value: a newly allocated string or 0 if the specified - * @param group_name A group name. - * @param key A key. - * @param error Return location for a G::Error, or 0. - * @return A newly allocated string or 0 if the specified - * key cannot be found. - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Gets the value associated with @a key under @a group_name translated - * into the current locale. - */ - Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key) const; - - - /** Return value: a newly allocated string or 0 if the specified - * @param group_name A group name. - * @param key A key. - * @param locale A locale or 0. - * @param error Return location for a G::Error, or 0. - * @return A newly allocated string or 0 if the specified - * key cannot be found. - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const; -#else - Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Return value: the value associated with the key as a boolean, or - * @param group_name A group name. - * @param key A key. - * @param error Return location for a G::Error. - * @return The value associated with the key as a boolean, or - * false if the key was not found or could not be parsed. - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Gets the value in the first group, under @a key, interpreting it as - * an integer. - * @param key The name of the key - * @return The value of @a key as an integer - * @throws Glib::KeyFileError - */ - int get_integer(const Glib::ustring& key) const; - - - /** Return value: the value associated with the key as an integer, or - * @param group_name A group name. - * @param key A key. - * @param error Return location for a G::Error. - * @return The value associated with the key as an integer, or - * 0 if the key was not found or could not be parsed. - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - int get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - int get_integer(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Gets the value in the first group, under @a key, interpreting it as - * a double. - * @param key The name of the key - * @return The value of @a key as an double - * @throws Glib::KeyFileError - * - * @newin2p14 - */ - double get_double(const Glib::ustring& key) const; - - - /** Return value: the value associated with the key as a double, or - * @param group_name A group name. - * @param key A key. - * @param error Return location for a G::Error. - * @return The value associated with the key as a double, or - * 0.0 if the key was not found or could not be parsed. - * - * @newin2p14. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - double get_double(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Associates a new double value with @a key under @a group_name . - * If @a key cannot be found then it is created. - * - * @newin2p14 - * @param group_name A group name. - * @param key A key. - * @param value An double value. - */ - void set_double(const Glib::ustring& group_name, const Glib::ustring& key, double value); - - /** Associates a new double value with @a key under the start group. - * If @a key cannot be found then it is created. - * - * @newin2p12 - * @param key A key. - * @param value An double value. - */ - void set_double(const Glib::ustring& key, double value); - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list containing the values requested - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - - - /** Returns the values associated with @a key under @a group_name - * translated into the current locale, if available. - * @param group_name The name of a group - * @param key The name of a key - * @return A list containing the values requested - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - - /** Returns the values associated with @a key under @a group_name - * translated into @a locale, if available. - * @param group_name The name of a group - * @param key The name of a key - * @param locale The name of a locale - * @return A list containing the values requested - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const; - - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list of booleans - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list of integers - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_integer_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list of doubles - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_double_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - - - /** Get comment from top of file - * @return The comment - */ - Glib::ustring get_comment() const; - - /** Get comment from above a group - * @param group_name The group - * @return The comment - */ - Glib::ustring get_comment(const Glib::ustring& group_name) const; - - - /** Retrieves a comment above @a key from @a group_name . - * @a group_name . If @a key is 0 then @a comment will - * be read from above @a group_name . If both @a key - * and @a group_name are 0, then @a comment will - * be read from above the first group in the file. - * @param group_name A group name, or 0. - * @param key A key. - * @param error Return location for a G::Error. - * @return A comment that should be freed with g_free() - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const; -#else - Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Sets the character which is used to separate - * values in lists. Typically ';' or ',' are used - * as separators. The default list separator is ';'. - * - * @newin2p6 - * @param separator The separator. - */ - void set_list_separator(gchar separator); - - /** Associates a new value with @a key under @a group_name . If @a key - * cannot be found then it is created. If @a group_name cannot be - * found then it is created. - * - * @newin2p6 - * @param group_name A group name. - * @param key A key. - * @param value A string. - */ - void set_value(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value); - - /** Associates a new string value with @a key under @a group_name . If - * @a key cannot be found then it is created. If @a group_name - * cannot be found then it is created. - * - * @newin2p6 - * @param group_name A group name. - * @param key A key. - * @param string A string. - */ - void set_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& string); - - /** Associates a string value for @a key and @a locale under - * @a group_name . If the translation for @a key cannot be found - * then it is created. - * - * @newin2p6 - * @param group_name A group name. - * @param key A key. - * @param locale A locale. - * @param string A string. - */ - void set_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ustring& string); - - /** Associates a new boolean value with @a key under @a group_name . - * If @a key cannot be found then it is created. - * - * @newin2p6 - * @param group_name A group name. - * @param key A key. - * @param value true or false. - */ - void set_boolean(const Glib::ustring& group_name, const Glib::ustring& key, bool value); - - /** Associates a new integer value with @a key under @a group_name . - * If @a key cannot be found then it is created. - * - * @newin2p6 - * @param group_name A group name. - * @param key A key. - * @param value An integer value. - */ - void set_integer(const Glib::ustring& group_name, const Glib::ustring& key, int value); - - /** Sets a list of string values for @a key under @a group_name. If - * key cannot be found it is created. If @a group_name cannot be found - * it is created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding objects of type Glib::ustring - */ - void set_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle& list); - - - /** Sets a list of string values for the @a key under @a group_name and marks - * them as being for @a locale. If the @a key or @a group_name cannot be - * found, they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param locale A locale - * @param list A list holding objects of type Glib::ustring - */ - void set_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ArrayHandle& list); - - - /** Sets a list of booleans for the @a key under @a group_name. - * If either the @a key or @a group_name cannot be found they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding object of type bool - */ - void set_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list); - - - /** Sets a list of integers for the @a key under @a group_name. - * If either the @a key or @a group_name cannot be found they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding object of type int - */ - void set_integer_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list); - - - /** Sets a list of doubles for the @a key under @a group_name. - * If either the @a key or @a group_name cannot be found they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding object of type int - * - * @newin2p14 - */ - void set_double_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list); - - - /** Places @a comment at the start of the file, before the first group. - * @param comment The Comment - */ - void set_comment(const Glib::ustring& comment); - - /** Places @a comment above @a group_name. - * @param group_name The Group the comment should be above - * @param comment The comment - */ - void set_comment(const Glib::ustring& group_name, const Glib::ustring& comment); - - /** Places a comment above @a key from @a group_name. - * @param key Key comment should be above - * @param group_name Group comment is in - * @param comment The comment - */ - - /** Places a comment above @a key from @a group_name . - * @a group_name . If @a key is 0 then @a comment will - * be written above @a group_name . If both @a key - * and @a group_name are 0, then @a comment will - * be written above the first group in the file. - * - * @newin2p6 - * @param group_name A group name, or 0. - * @param key A key. - * @param comment A comment. - * @param error Return location for a G::Error. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment); -#else - void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Removes a comment above @a key from @a group_name . - * @a group_name . If @a key is 0 then @a comment will - * be written above @a group_name . If both @a key - * and @a group_name are 0, then @a comment will - * be written above the first group in the file. - * - * @newin2p6 - * @param group_name A group name, or 0. - * @param key A key. - * @param error Return location for a G::Error. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key); -#else - void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Removes @a key in @a group_name from the key file. - * - * @newin2p6 - * @param group_name A group name. - * @param key A key name to remove. - * @param error Return location for a G::Error or 0. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - void remove_key(const Glib::ustring& group_name, const Glib::ustring& key); -#else - void remove_key(const Glib::ustring& group_name, const Glib::ustring& key, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Removes the specified group, @a group_name , - * from the key file. - * - * @newin2p6 - * @param group_name A group name. - * @param error Return location for a G::Error or 0. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - void remove_group(const Glib::ustring& group_name); -#else - void remove_group(const Glib::ustring& group_name, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - GKeyFile* gobj() { return gobject_; } - const GKeyFile* gobj() const { return gobject_; } - -protected: - GKeyFile* gobject_; - bool owns_gobject_; - -private: - // noncopyable - KeyFile(const KeyFile&); - KeyFile& operator=(const KeyFile&); - - -}; - -} // namespace Glib - - -#endif /* _GLIBMM_KEYFILE_H */ - diff --git a/libs/glibmm2/glib/glibmm/listhandle.h b/libs/glibmm2/glib/glibmm/listhandle.h deleted file mode 100644 index 650944e7e1..0000000000 --- a/libs/glibmm2/glib/glibmm/listhandle.h +++ /dev/null @@ -1,406 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_LISTHANDLE_H -#define _GLIBMM_LISTHANDLE_H - -/* $Id: listhandle.h 32 2003-04-21 17:39:41Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -namespace Container_Helpers -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/* Create and fill a GList as efficient as possible. - * This requires bidirectional iterators. - */ -template -GList* create_list(Bi pbegin, Bi pend, Tr) -{ - GList* head = 0; - - while(pend != pbegin) - { - // Use & to force a warning if the iterator returns a temporary object. - const void *const item = Tr::to_c_type(*&*--pend); - head = g_list_prepend(head, const_cast(item)); - } - - return head; -} - -/* Create a GList from a 0-terminated input sequence. - * Build it in reverse order and reverse the whole list afterwards, - * because appending to the list would be horribly inefficient. - */ -template -GList* create_list(For pbegin, Tr) -{ - GList* head = 0; - - while(*pbegin) - { - // Use & to force a warning if the iterator returns a temporary object. - const void *const item = Tr::to_c_type(*&*pbegin); - head = g_list_prepend(head, const_cast(item)); - ++pbegin; - } - - return g_list_reverse(head); -} - - -/* Convert from any container that supports bidirectional iterators. - */ -template -struct ListSourceTraits -{ - static GList* get_data(const Cont& cont) - { return Glib::Container_Helpers::create_list(cont.begin(), cont.end(), Tr()); } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -/* Convert from a 0-terminated array. The Cont - * argument must be a pointer to the first element. - */ -template -struct ListSourceTraits -{ - static GList* get_data(const Cont* array) - { return (array) ? Glib::Container_Helpers::create_list(array, Tr()) : 0; } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -template -struct ListSourceTraits : ListSourceTraits -{}; - -/* Convert from a 0-terminated array. The Cont argument must be a pointer - * to the first element. For consistency, the array must be 0-terminated, - * even though the array size is known at compile time. - */ -template -struct ListSourceTraits -{ - static GList* get_data(const Cont* array) - { return Glib::Container_Helpers::create_list(array, array + (N - 1), Tr()); } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -template -struct ListSourceTraits : ListSourceTraits -{}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** - * @ingroup ContHelpers - * If a method takes this as an argument, or has this as a return type, then you can use a standard - * container such as std::list or std::vector. - */ -template -class ListHandleIterator -{ -public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; - - typedef std::forward_iterator_tag iterator_category; - typedef CppType value_type; - typedef ptrdiff_t difference_type; - typedef value_type reference; - typedef void pointer; - - explicit inline ListHandleIterator(const GList* node); - - inline value_type operator*() const; - inline ListHandleIterator & operator++(); - inline const ListHandleIterator operator++(int); - - inline bool operator==(const ListHandleIterator& rhs) const; - inline bool operator!=(const ListHandleIterator& rhs) const; - -private: - const GList* node_; -}; - -} // namespace Container_Helpers - - -/** - * @ingroup ContHandles - */ -template < class T, class Tr = Glib::Container_Helpers::TypeTraits > -class ListHandle -{ -public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; - - typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef Glib::Container_Helpers::ListHandleIterator const_iterator; - typedef Glib::Container_Helpers::ListHandleIterator iterator; - - template inline - ListHandle(const Cont& container); - - // Take over ownership of an array created by GTK+ functions. - inline ListHandle(GList* glist, Glib::OwnershipType ownership); - - // Copying clears the ownership flag of the source handle. - inline ListHandle(const ListHandle& other); - - ~ListHandle(); - - inline const_iterator begin() const; - inline const_iterator end() const; - - template inline operator std::vector() const; - template inline operator std::deque() const; - template inline operator std::list() const; - - template inline - void assign_to(Cont& container) const; - - template inline - void copy(Out pdest) const; - - inline GList* data() const; - inline size_t size() const; - inline bool empty() const; - -private: - GList * plist_; - mutable Glib::OwnershipType ownership_; - - // No copy assignment. - ListHandle& operator=(const ListHandle&); -}; - - -/***************************************************************************/ -/* Inline implementation */ -/***************************************************************************/ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -namespace Container_Helpers -{ - -/**** Glib::Container_Helpers::ListHandleIterator<> ************************/ - -template inline -ListHandleIterator::ListHandleIterator(const GList* node) -: - node_ (node) -{} - -template inline -typename ListHandleIterator::value_type ListHandleIterator::operator*() const -{ - return Tr::to_cpp_type(static_cast(node_->data)); -} - -template inline -ListHandleIterator& ListHandleIterator::operator++() -{ - node_ = node_->next; - return *this; -} - -template inline -const ListHandleIterator ListHandleIterator::operator++(int) -{ - const ListHandleIterator tmp (*this); - node_ = node_->next; - return tmp; -} - -template inline -bool ListHandleIterator::operator==(const ListHandleIterator& rhs) const -{ - return (node_ == rhs.node_); -} - -template inline -bool ListHandleIterator::operator!=(const ListHandleIterator& rhs) const -{ - return (node_ != rhs.node_); -} - -} // namespace Container_Helpers - - -/**** Glib::ListHandle<> ***************************************************/ - -template - template -inline -ListHandle::ListHandle(const Cont& container) -: - plist_ (Glib::Container_Helpers::ListSourceTraits::get_data(container)), - ownership_ (Glib::Container_Helpers::ListSourceTraits::initial_ownership) -{} - -template inline -ListHandle::ListHandle(GList* glist, Glib::OwnershipType ownership) -: - plist_ (glist), - ownership_ (ownership) -{} - -template inline -ListHandle::ListHandle(const ListHandle& other) -: - plist_ (other.plist_), - ownership_ (other.ownership_) -{ - other.ownership_ = Glib::OWNERSHIP_NONE; -} - -template -ListHandle::~ListHandle() -{ - if(ownership_ != Glib::OWNERSHIP_NONE) - { - if(ownership_ != Glib::OWNERSHIP_SHALLOW) - { - // Deep ownership: release each container element. - for(GList* node = plist_; node != 0; node = node->next) - Tr::release_c_type(static_cast(node->data)); - } - g_list_free(plist_); - } -} - -template inline -typename ListHandle::const_iterator ListHandle::begin() const -{ - return Glib::Container_Helpers::ListHandleIterator(plist_); -} - -template inline -typename ListHandle::const_iterator ListHandle::end() const -{ - return Glib::Container_Helpers::ListHandleIterator(0); -} - -template - template -inline -ListHandle::operator std::vector() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::vector(this->begin(), this->end()); -#else - std::vector temp; - temp.reserve(this->size()); - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -ListHandle::operator std::deque() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::deque(this->begin(), this->end()); -#else - std::deque temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -ListHandle::operator std::list() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::list(this->begin(), this->end()); -#else - std::list temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -void ListHandle::assign_to(Cont& container) const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - container.assign(this->begin(), this->end()); -#else - Cont temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - container.swap(temp); -#endif -} - -template - template -inline -void ListHandle::copy(Out pdest) const -{ - std::copy(this->begin(), this->end(), pdest); -} - -template inline -GList* ListHandle::data() const -{ - return plist_; -} - -template inline -size_t ListHandle::size() const -{ - return g_list_length(plist_); -} - -template inline -bool ListHandle::empty() const -{ - return (plist_ == 0); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - - -#endif /* _GLIBMM_LISTHANDLE_H */ - diff --git a/libs/glibmm2/glib/glibmm/main.cc b/libs/glibmm2/glib/glibmm/main.cc deleted file mode 100644 index 4b95192cf4..0000000000 --- a/libs/glibmm2/glib/glibmm/main.cc +++ /dev/null @@ -1,1094 +0,0 @@ -// -*- c++ -*- -/* $Id: main.cc 420 2007-06-22 15:29:58Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - -#include -#include - -GLIBMM_USING_STD(min) - - -namespace -{ - -class SourceConnectionNode -{ -public: - explicit inline SourceConnectionNode(const sigc::slot_base& slot); - - static void* notify(void* data); - static void destroy_notify_callback(void* data); - - inline void install(GSource* source); - inline sigc::slot_base* get_slot(); - -private: - sigc::slot_base slot_; - GSource* source_; -}; - -inline -SourceConnectionNode::SourceConnectionNode(const sigc::slot_base& slot) -: - slot_ (slot), - source_ (0) -{ - slot_.set_parent(this, &SourceConnectionNode::notify); -} - -void* SourceConnectionNode::notify(void* data) -{ - SourceConnectionNode *const self = static_cast(data); - - // if there is no object, this call was triggered from destroy_notify_handler(), - // because we set self->source_ to 0 there: - if (self->source_) - { - GSource* s = self->source_; - self->source_ = 0; - g_source_destroy(s); - - // Destroying the object triggers execution of destroy_notify_handler(), - // eiter immediately or later, so we leave that to do the deletion. - } - - return 0; -} - -// static -void SourceConnectionNode::destroy_notify_callback(void* data) -{ - SourceConnectionNode *const self = static_cast(data); - - if (self) - { - // The GLib side is disconnected now, thus the GSource* is no longer valid. - self->source_ = 0; - - delete self; - } -} - -inline -void SourceConnectionNode::install(GSource* source) -{ - source_ = source; -} - -inline -sigc::slot_base* SourceConnectionNode::get_slot() -{ - return &slot_; -} - - -/* We use the callback data member of GSource to store both a pointer to our - * wrapper and a pointer to the connection node that is currently being used. - * The one and only SourceCallbackData object of a Glib::Source is constructed - * in the ctor of Glib::Source and destroyed after the GSource object when the - * reference counter of the GSource object reaches zero! - */ -struct SourceCallbackData -{ - explicit inline SourceCallbackData(Glib::Source* wrapper_); - - void set_node(SourceConnectionNode* node_); - - static void destroy_notify_callback(void* data); - - Glib::Source* wrapper; - SourceConnectionNode* node; -}; - -inline -SourceCallbackData::SourceCallbackData(Glib::Source* wrapper_) -: - wrapper (wrapper_), - node (0) -{} - -void SourceCallbackData::set_node(SourceConnectionNode* node_) -{ - if(node) - SourceConnectionNode::destroy_notify_callback(node); - - node = node_; -} - -// static -void SourceCallbackData::destroy_notify_callback(void* data) -{ - SourceCallbackData *const self = static_cast(data); - - if(self->node) - SourceConnectionNode::destroy_notify_callback(self->node); - - if(self->wrapper) - Glib::Source::destroy_notify_callback(self->wrapper); - - delete self; -} - - -/* Retrieve the callback data from a wrapped GSource object. - */ -static SourceCallbackData* glibmm_source_get_callback_data(GSource* source) -{ - g_return_val_if_fail(source->callback_funcs->get != 0, 0); - - GSourceFunc func; - void* user_data = 0; - - // Retrieve the callback function and data. - (*source->callback_funcs->get)(source->callback_data, source, &func, &user_data); - - return static_cast(user_data); -} - -/* Glib::Source doesn't use the callback function installed with - * g_source_set_callback(). Instead, it invokes the sigc++ slot - * directly from dispatch_vfunc(), which is both simpler and more - * efficient. - * For correctness, provide a pointer to this dummy callback rather - * than some random pointer. That also allows for sanity checks - * here as well as in Source::dispatch_vfunc(). - */ -static gboolean glibmm_dummy_source_callback(void*) -{ - g_assert_not_reached(); - return 0; -} - -/* Only used by SignalTimeout::connect() and SignalIdle::connect(). - * These don't use Glib::Source, to avoid the unnecessary overhead - * of a completely unused wrapper object. - */ -static gboolean glibmm_source_callback(void* data) -{ - SourceConnectionNode *const conn_data = static_cast(data); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - // Recreate the specific slot from the generic slot node. - return (*static_cast*>(conn_data->get_slot()))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - return 0; -} - -static gboolean glibmm_iosource_callback(GIOChannel*, GIOCondition condition, void* data) -{ - SourceCallbackData *const callback_data = static_cast(data); - g_return_val_if_fail(callback_data->node != 0, 0); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - // Recreate the specific slot from the generic slot node. - return (*static_cast*>(callback_data->node->get_slot())) - ((Glib::IOCondition) condition); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - return 0; -} - -/* Only used by SignalChildWatch::connect(). - * These don't use Glib::Source, to avoid the unnecessary overhead - * of a completely unused wrapper object. - */ -static gboolean glibmm_child_watch_callback(GPid pid, gint child_status, void* data) -{ - SourceConnectionNode *const conn_data = static_cast(data); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try { - #endif //GLIBMM_EXCEPTIONS_ENABLED - //Recreate the specific slot from the generic slot node. - (*static_cast*>(conn_data->get_slot()))(pid, child_status); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - return 0; -} - -} // anonymous namespace - - -namespace Glib -{ - -/**** Glib::PollFD *********************************************************/ - -PollFD::PollFD() -{ - gobject_.fd = 0; - gobject_.events = 0; - gobject_.revents = 0; -} - -PollFD::PollFD(int fd) -{ - gobject_.fd = fd; - gobject_.events = 0; - gobject_.revents = 0; -} - -PollFD::PollFD(int fd, IOCondition events) -{ - gobject_.fd = fd; - gobject_.events = events; - gobject_.revents = 0; -} - - -/**** Glib::SignalTimeout **************************************************/ - -inline -SignalTimeout::SignalTimeout(GMainContext* context) -: - context_ (context) -{} - -/* Note that this is our equivalent of g_timeout_add(). */ -sigc::connection SignalTimeout::connect(const sigc::slot& slot, - unsigned int interval, int priority) -{ - SourceConnectionNode *const conn_node = new SourceConnectionNode(slot); - const sigc::connection connection (*conn_node->get_slot()); - - GSource *const source = g_timeout_source_new(interval); - - if(priority != G_PRIORITY_DEFAULT) - g_source_set_priority(source, priority); - - g_source_set_callback( - source, &glibmm_source_callback, conn_node, - &SourceConnectionNode::destroy_notify_callback); - - g_source_attach(source, context_); - g_source_unref(source); // GMainContext holds a reference - - conn_node->install(source); - return connection; -} - -/* Note that this is our equivalent of g_timeout_add_seconds(). */ -sigc::connection SignalTimeout::connect_seconds(const sigc::slot& slot, - unsigned int interval, int priority) -{ - SourceConnectionNode *const conn_node = new SourceConnectionNode(slot); - const sigc::connection connection (*conn_node->get_slot()); - - GSource *const source = g_timeout_source_new_seconds(interval); - - if(priority != G_PRIORITY_DEFAULT) - g_source_set_priority(source, priority); - - g_source_set_callback( - source, &glibmm_source_callback, conn_node, - &SourceConnectionNode::destroy_notify_callback); - - g_source_attach(source, context_); - g_source_unref(source); // GMainContext holds a reference - - conn_node->install(source); - return connection; -} - -SignalTimeout signal_timeout() -{ - return SignalTimeout(0); // 0 means default context -} - - -/**** Glib::SignalIdle *****************************************************/ - -inline -SignalIdle::SignalIdle(GMainContext* context) -: - context_ (context) -{} - -sigc::connection SignalIdle::connect(const sigc::slot& slot, int priority) -{ - SourceConnectionNode *const conn_node = new SourceConnectionNode(slot); - const sigc::connection connection (*conn_node->get_slot()); - - GSource *const source = g_idle_source_new(); - - if(priority != G_PRIORITY_DEFAULT) - g_source_set_priority(source, priority); - - g_source_set_callback( - source, &glibmm_source_callback, conn_node, - &SourceConnectionNode::destroy_notify_callback); - - g_source_attach(source, context_); - g_source_unref(source); // GMainContext holds a reference - - conn_node->install(source); - return connection; -} - -SignalIdle signal_idle() -{ - return SignalIdle(0); // 0 means default context -} - - -/**** Glib::SignalIO *******************************************************/ - -inline -SignalIO::SignalIO(GMainContext* context) -: - context_ (context) -{} - -sigc::connection SignalIO::connect(const sigc::slot& slot, - int fd, IOCondition condition, int priority) -{ - const Glib::RefPtr source = IOSource::create(fd, condition); - - if(priority != G_PRIORITY_DEFAULT) - source->set_priority(priority); - - const sigc::connection connection = source->connect(slot); - - g_source_attach(source->gobj(), context_); - - return connection; -} - -sigc::connection SignalIO::connect(const sigc::slot& slot, - const Glib::RefPtr& channel, - IOCondition condition, int priority) -{ - const Glib::RefPtr source = IOSource::create(channel, condition); - - if(priority != G_PRIORITY_DEFAULT) - source->set_priority(priority); - - const sigc::connection connection = source->connect(slot); - - g_source_attach(source->gobj(), context_); - - return connection; -} - -SignalIO signal_io() -{ - return SignalIO(0); // 0 means default context -} - -/**** Glib::SignalChildWatch **************************************************/ - -inline -SignalChildWatch::SignalChildWatch(GMainContext* context) -: - context_ (context) -{} - -sigc::connection SignalChildWatch::connect(const sigc::slot& slot, - GPid pid, int priority) -{ - SourceConnectionNode *const conn_node = new SourceConnectionNode(slot); - const sigc::connection connection(*conn_node->get_slot()); - - GSource *const source = g_child_watch_source_new(pid); - - if(priority != G_PRIORITY_DEFAULT) - g_source_set_priority(source, priority); - - g_source_set_callback( - source, (GSourceFunc)&glibmm_child_watch_callback, conn_node, - &SourceConnectionNode::destroy_notify_callback); - - g_source_attach(source, context_); - g_source_unref(source); // GMainContext holds a reference - - conn_node->install(source); - return connection; -} - -SignalChildWatch signal_child_watch() -{ - return SignalChildWatch(0); // 0 means default context -} - -/**** Glib::MainContext ****************************************************/ - -// static -Glib::RefPtr MainContext::create() -{ - return Glib::RefPtr(reinterpret_cast(g_main_context_new())); -} - -// static -Glib::RefPtr MainContext::get_default() -{ - return Glib::wrap(g_main_context_default(), true); -} - -bool MainContext::iteration(bool may_block) -{ - return g_main_context_iteration(gobj(), may_block); -} - -bool MainContext::pending() -{ - return g_main_context_pending(gobj()); -} - -void MainContext::wakeup() -{ - g_main_context_wakeup(gobj()); -} - -bool MainContext::acquire() -{ - return g_main_context_acquire(gobj()); -} - -bool MainContext::wait(Glib::Cond& cond, Glib::Mutex& mutex) -{ - return g_main_context_wait(gobj(), cond.gobj(), mutex.gobj()); -} - -void MainContext::release() -{ - g_main_context_release(gobj()); -} - -bool MainContext::prepare(int& priority) -{ - return g_main_context_prepare(gobj(), &priority); -} - -bool MainContext::prepare() -{ - return g_main_context_prepare(gobj(), 0); -} - -void MainContext::query(int max_priority, int& timeout, std::vector& fds) -{ - if(fds.empty()) - fds.resize(8); // rather bogus number, but better than 0 - - for(;;) - { - const int size_before = fds.size(); - const int size_needed = g_main_context_query( - gobj(), max_priority, &timeout, reinterpret_cast(&fds.front()), size_before); - - fds.resize(size_needed); - - if(size_needed <= size_before) - break; - } -} - -bool MainContext::check(int max_priority, std::vector& fds) -{ - if(!fds.empty()) - return g_main_context_check(gobj(), max_priority, reinterpret_cast(&fds.front()), fds.size()); - else - return false; -} - -void MainContext::dispatch() -{ - g_main_context_dispatch(gobj()); -} - -void MainContext::set_poll_func(GPollFunc poll_func) -{ - g_main_context_set_poll_func(gobj(), poll_func); -} - -GPollFunc MainContext::get_poll_func() -{ - return g_main_context_get_poll_func(gobj()); -} - -void MainContext::add_poll(PollFD& fd, int priority) -{ - g_main_context_add_poll(gobj(), fd.gobj(), priority); -} - -void MainContext::remove_poll(PollFD& fd) -{ - g_main_context_remove_poll(gobj(), fd.gobj()); -} - -SignalTimeout MainContext::signal_timeout() -{ - return SignalTimeout(gobj()); -} - -SignalIdle MainContext::signal_idle() -{ - return SignalIdle(gobj()); -} - -SignalIO MainContext::signal_io() -{ - return SignalIO(gobj()); -} - -SignalChildWatch MainContext::signal_child_watch() -{ - return SignalChildWatch(gobj()); -} - -void MainContext::reference() const -{ - g_main_context_ref(reinterpret_cast(const_cast(this))); -} - -void MainContext::unreference() const -{ - g_main_context_unref(reinterpret_cast(const_cast(this))); -} - -GMainContext* MainContext::gobj() -{ - return reinterpret_cast(this); -} - -const GMainContext* MainContext::gobj() const -{ - return reinterpret_cast(this); -} - -GMainContext* MainContext::gobj_copy() const -{ - reference(); - return const_cast(gobj()); -} - -Glib::RefPtr wrap(GMainContext* gobject, bool take_copy) -{ - if(take_copy && gobject) - g_main_context_ref(gobject); - - return Glib::RefPtr(reinterpret_cast(gobject)); -} - - -/**** Glib::MainLoop *******************************************************/ - -Glib::RefPtr MainLoop::create(bool is_running) -{ - return Glib::RefPtr( - reinterpret_cast(g_main_loop_new(0, is_running))); -} - -Glib::RefPtr MainLoop::create(const Glib::RefPtr& context, bool is_running) -{ - return Glib::RefPtr( - reinterpret_cast(g_main_loop_new(Glib::unwrap(context), is_running))); -} - -void MainLoop::run() -{ - g_main_loop_run(gobj()); -} - -void MainLoop::quit() -{ - g_main_loop_quit(gobj()); -} - -bool MainLoop::is_running() -{ - return g_main_loop_is_running(gobj()); -} - -Glib::RefPtr MainLoop::get_context() -{ - return Glib::wrap(g_main_loop_get_context(gobj()), true); -} - -//static: -int MainLoop::depth() -{ - return g_main_depth(); -} - -void MainLoop::reference() const -{ - g_main_loop_ref(reinterpret_cast(const_cast(this))); -} - -void MainLoop::unreference() const -{ - g_main_loop_unref(reinterpret_cast(const_cast(this))); -} - -GMainLoop* MainLoop::gobj() -{ - return reinterpret_cast(this); -} - -const GMainLoop* MainLoop::gobj() const -{ - return reinterpret_cast(this); -} - -GMainLoop* MainLoop::gobj_copy() const -{ - reference(); - return const_cast(gobj()); -} - -Glib::RefPtr wrap(GMainLoop* gobject, bool take_copy) -{ - if(take_copy && gobject) - g_main_loop_ref(gobject); - - return Glib::RefPtr(reinterpret_cast(gobject)); -} - - -/**** Glib::Source *********************************************************/ - -// static -const GSourceFuncs Source::vfunc_table_ = -{ - &Source::prepare_vfunc, - &Source::check_vfunc, - &Source::dispatch_vfunc, - 0, // finalize_vfunc // We can't use finalize_vfunc because there is no way - // to store a pointer to our wrapper anywhere in GSource so - // that it persists until finalize_vfunc would be called from here. - 0, // closure_callback - 0, // closure_marshal -}; - -unsigned int Source::attach(const Glib::RefPtr& context) -{ - return g_source_attach(gobject_, Glib::unwrap(context)); -} - -unsigned int Source::attach() -{ - return g_source_attach(gobject_, 0); -} - -void Source::destroy() -{ - g_source_destroy(gobject_); -} - -void Source::set_priority(int priority) -{ - g_source_set_priority(gobject_, priority); -} - -int Source::get_priority() const -{ - return g_source_get_priority(gobject_); -} - -void Source::set_can_recurse(bool can_recurse) -{ - g_source_set_can_recurse(gobject_, can_recurse); -} - -bool Source::get_can_recurse() const -{ - return g_source_get_can_recurse(gobject_); -} - -unsigned int Source::get_id() const -{ - return g_source_get_id(gobject_); -} - -Glib::RefPtr Source::get_context() -{ - return Glib::wrap(g_source_get_context(gobject_), true); -} - -GSource* Source::gobj_copy() const -{ - return g_source_ref(gobject_); -} - -void Source::reference() const -{ - g_source_ref(gobject_); -} - -void Source::unreference() const -{ - g_source_unref(gobject_); -} - -Source::Source() -: - gobject_ (g_source_new(const_cast(&vfunc_table_), sizeof(GSource))) -{ - g_source_set_callback( - gobject_, &glibmm_dummy_source_callback, - new SourceCallbackData(this), // our persistant callback data object - &SourceCallbackData::destroy_notify_callback); -} - -Source::Source(GSource* cast_item, GSourceFunc callback_func) -: - gobject_ (cast_item) -{ - g_source_set_callback( - gobject_, callback_func, - new SourceCallbackData(this), // our persistant callback data object - &SourceCallbackData::destroy_notify_callback); -} - -Source::~Source() -{ - // The dtor should be invoked by destroy_notify_callback() only, which clears - // gobject_ before deleting. However, we might also get to this point if - // a derived ctor threw an exception, and then we need to unref manually. - - if(gobject_) - { - SourceCallbackData *const data = glibmm_source_get_callback_data(gobject_); - data->wrapper = 0; - - GSource *const tmp_gobject = gobject_; - gobject_ = 0; - - g_source_unref(tmp_gobject); - } -} - -sigc::connection Source::connect_generic(const sigc::slot_base& slot) -{ - SourceConnectionNode *const conn_node = new SourceConnectionNode(slot); - const sigc::connection connection (*conn_node->get_slot()); - - // Don't override the callback data. Reuse the existing one - // calling SourceCallbackData::set_node() to register conn_node. - SourceCallbackData *const data = glibmm_source_get_callback_data(gobject_); - data->set_node(conn_node); - - conn_node->install(gobject_); - return connection; -} - -void Source::add_poll(Glib::PollFD& poll_fd) -{ - g_source_add_poll(gobject_, poll_fd.gobj()); -} - -void Source::remove_poll(Glib::PollFD& poll_fd) -{ - g_source_remove_poll(gobject_, poll_fd.gobj()); -} - -void Source::get_current_time(Glib::TimeVal& current_time) -{ - g_source_get_current_time(gobject_, ¤t_time); -} - -inline // static -Source* Source::get_wrapper(GSource* source) -{ - SourceCallbackData *const data = glibmm_source_get_callback_data(source); - return data->wrapper; -} - -// static -gboolean Source::prepare_vfunc(GSource* source, int* timeout) -{ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - Source *const self = get_wrapper(source); - return self->prepare(*timeout); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return 0; -} - -// static -gboolean Source::check_vfunc(GSource* source) -{ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - Source *const self = get_wrapper(source); - return self->check(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return 0; -} - -// static -gboolean Source::dispatch_vfunc(GSource*, GSourceFunc callback, void* user_data) -{ - SourceCallbackData *const callback_data = static_cast(user_data); - - g_return_val_if_fail(callback == &glibmm_dummy_source_callback, 0); - g_return_val_if_fail(callback_data != 0 && callback_data->node != 0, 0); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - Source *const self = callback_data->wrapper; - return self->dispatch(callback_data->node->get_slot()); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - return 0; -} - -// static -void Source::destroy_notify_callback(void* data) -{ - if(data) - { - Source *const self = static_cast(data); - - // gobject_ is already invalid at this point. - self->gobject_ = 0; - - // No exception checking: if the dtor throws, you're out of luck anyway. - delete self; - } -} - - -/**** Glib::TimeoutSource **************************************************/ - -// static -Glib::RefPtr TimeoutSource::create(unsigned int interval) -{ - return Glib::RefPtr(new TimeoutSource(interval)); -} - -sigc::connection TimeoutSource::connect(const sigc::slot& slot) -{ - return connect_generic(slot); -} - -TimeoutSource::TimeoutSource(unsigned int interval) -: - interval_ (interval) -{ - expiration_.assign_current_time(); - expiration_.add_milliseconds(std::min(G_MAXLONG, interval_)); -} - -TimeoutSource::~TimeoutSource() -{} - -bool TimeoutSource::prepare(int& timeout) -{ - Glib::TimeVal current_time; - get_current_time(current_time); - - Glib::TimeVal remaining = expiration_; - remaining.subtract(current_time); - - if(remaining.negative()) - { - // Already expired. - timeout = 0; - } - else - { - const unsigned long milliseconds = - static_cast(remaining.tv_sec) * 1000U + - static_cast(remaining.tv_usec) / 1000U; - - // Set remaining milliseconds. - timeout = std::min(G_MAXINT, milliseconds); - - // Check if the system time has been set backwards. (remaining > interval) - remaining.add_milliseconds(- std::min(G_MAXLONG, interval_) - 1); - if(!remaining.negative()) - { - // Oh well. Reset the expiration time to now + interval; - // this at least avoids hanging for long periods of time. - expiration_ = current_time; - expiration_.add_milliseconds(interval_); - timeout = std::min(G_MAXINT, interval_); - } - } - - return (timeout == 0); -} - -bool TimeoutSource::check() -{ - Glib::TimeVal current_time; - get_current_time(current_time); - - return (expiration_ <= current_time); -} - -bool TimeoutSource::dispatch(sigc::slot_base* slot) -{ - const bool again = (*static_cast*>(slot))(); - - if(again) - { - get_current_time(expiration_); - expiration_.add_milliseconds(std::min(G_MAXLONG, interval_)); - } - - return again; -} - - -/**** Glib::IdleSource *****************************************************/ - -// static -Glib::RefPtr IdleSource::create() -{ - return Glib::RefPtr(new IdleSource()); -} - -sigc::connection IdleSource::connect(const sigc::slot& slot) -{ - return connect_generic(slot); -} - -IdleSource::IdleSource() -{ - set_priority(PRIORITY_DEFAULT_IDLE); -} - -IdleSource::~IdleSource() -{} - -bool IdleSource::prepare(int& timeout) -{ - timeout = 0; - return true; -} - -bool IdleSource::check() -{ - return true; -} - -bool IdleSource::dispatch(sigc::slot_base* slot) -{ - return (*static_cast*>(slot))(); -} - - -/**** Glib::IOSource *******************************************************/ - -// static -Glib::RefPtr IOSource::create(int fd, IOCondition condition) -{ - return Glib::RefPtr(new IOSource(fd, condition)); -} - -Glib::RefPtr IOSource::create(const Glib::RefPtr& channel, IOCondition condition) -{ - return Glib::RefPtr(new IOSource(channel, condition)); -} - -sigc::connection IOSource::connect(const sigc::slot& slot) -{ - return connect_generic(slot); -} - -IOSource::IOSource(int fd, IOCondition condition) -: - poll_fd_ (fd, condition) -{ - add_poll(poll_fd_); -} - -IOSource::IOSource(const Glib::RefPtr& channel, IOCondition condition) -: - Source(g_io_create_watch(channel->gobj(), (GIOCondition) condition), - (GSourceFunc) &glibmm_iosource_callback) -{} - -IOSource::~IOSource() -{} - -bool IOSource::prepare(int& timeout) -{ - timeout = -1; - return false; -} - -bool IOSource::check() -{ - return ((poll_fd_.get_revents() & poll_fd_.get_events()) != 0); -} - -bool IOSource::dispatch(sigc::slot_base* slot) -{ - return (*static_cast*>(slot)) - (poll_fd_.get_revents()); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/main.h b/libs/glibmm2/glib/glibmm/main.h deleted file mode 100644 index c4fe1ad19a..0000000000 --- a/libs/glibmm2/glib/glibmm/main.h +++ /dev/null @@ -1,782 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_MAIN_H -#define _GLIBMM_MAIN_H - -/* $Id: main.h 420 2007-06-22 15:29:58Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#include -#include - -#include -#include -#include - -GLIBMM_USING_STD(vector) - - -namespace Glib -{ - -class Cond; -class Mutex; -class IOChannel; - - -/** @defgroup MainLoop The Main Event Loop - * Manages all available sources of events. - * @{ - */ - -enum -{ - /*! Use this for high priority event sources. It is not used within - * GLib or GTK+.

- */ - PRIORITY_HIGH = -100, - - /*! Use this for default priority event sources. In glibmm this - * priority is used by default when installing timeout handlers with - * SignalTimeout::connect(). In GDK this priority is used for events - * from the X server.

- */ - PRIORITY_DEFAULT = 0, - - /*! Use this for high priority idle functions. GTK+ uses - * PRIORITY_HIGH_IDLE + 10 for resizing operations, and - * PRIORITY_HIGH_IDLE + 20 for redrawing operations. - * (This is done to ensure that any pending resizes are processed before - * any pending redraws, so that widgets are not redrawn twice unnecessarily.) - *

- */ - PRIORITY_HIGH_IDLE = 100, - - /*! Use this for default priority idle functions. In glibmm this priority is - * used by default when installing idle handlers with SignalIdle::connect(). - *

- */ - PRIORITY_DEFAULT_IDLE = 200, - - /*! Use this for very low priority background tasks. It is not used within - * GLib or GTK+. - */ - PRIORITY_LOW = 300 -}; - - -/** A bitwise combination representing an I/O condition to watch for on an - * event source. - * The flags correspond to those used by the %poll() system call - * on UNIX (see man 2 poll). To test for individual flags, do - * something like this: - * @code - * if((condition & Glib::IO_OUT) != 0) - * do_some_output(); - * @endcode - * @par Bitwise operators: - * IOCondition operator|(IOCondition, IOCondition)
- * IOCondition operator&(IOCondition, IOCondition)
- * IOCondition operator^(IOCondition, IOCondition)
- * IOCondition operator~(IOCondition)
- * IOCondition& operator|=(IOCondition&, IOCondition)
- * IOCondition& operator&=(IOCondition&, IOCondition)
- * IOCondition& operator^=(IOCondition&, IOCondition)
- */ -enum IOCondition -{ - IO_IN = G_IO_IN, /*!< @hideinitializer There is data to read. */ - IO_OUT = G_IO_OUT, /*!< @hideinitializer Data can be written (without blocking). */ - IO_PRI = G_IO_PRI, /*!< @hideinitializer There is urgent data to read. */ - IO_ERR = G_IO_ERR, /*!< @hideinitializer %Error condition. */ - IO_HUP = G_IO_HUP, /*!< @hideinitializer Hung up (the connection has been broken, - usually for pipes and sockets). */ - IO_NVAL = G_IO_NVAL /*!< @hideinitializer Invalid request. The file descriptor is not open. */ -}; - -inline IOCondition operator|(IOCondition lhs, IOCondition rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -inline IOCondition operator&(IOCondition lhs, IOCondition rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -inline IOCondition operator^(IOCondition lhs, IOCondition rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -inline IOCondition operator~(IOCondition flags) - { return static_cast(~static_cast(flags)); } - -inline IOCondition& operator|=(IOCondition& lhs, IOCondition rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -inline IOCondition& operator&=(IOCondition& lhs, IOCondition rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -inline IOCondition& operator^=(IOCondition& lhs, IOCondition rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -class PollFD -{ -public: - PollFD(); - explicit PollFD(int fd); - PollFD(int fd, IOCondition events); - - void set_fd(int fd) { gobject_.fd = fd; } - int get_fd() const { return gobject_.fd; } - - void set_events(IOCondition events) { gobject_.events = events; } - IOCondition get_events() const { return static_cast(gobject_.events); } - - void set_revents(IOCondition revents) { gobject_.revents = revents; } - IOCondition get_revents() const { return static_cast(gobject_.revents); } - - GPollFD* gobj() { return &gobject_; } - const GPollFD* gobj() const { return &gobject_; } - -private: - GPollFD gobject_; -}; - - -class SignalTimeout -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit inline SignalTimeout(GMainContext* context); -#endif - - /** Connects a timeout handler. - * - * Note that timeout functions may be delayed, due to the processing of other - * event sources. Thus they should not be relied on for precise timing. - * After each call to the timeout function, the time of the next - * timeout is recalculated based on the current time and the given interval - * (it does not try to 'catch up' time lost in delays). - * - * If you want to have a timer in the "seconds" range and do not care - * about the exact time of the first call of the timer, use the - * connect_seconds() function; this function allows for more - * optimizations and more efficient system power usage. - * - * @code - * Glib::signal_timeout().connect(sigc::ptr_fun(&timeout_handler), 1000); - * @endcode - * is equivalent to: - * @code - * const Glib::RefPtr timeout_source = Glib::TimeoutSource::create(1000); - * timeout_source->connect(sigc::ptr_fun(&timeout_handler)); - * timeout_source->attach(Glib::MainContext::get_default()); - * @endcode - * @param slot A slot to call when @a interval has elapsed. - * @param interval The timeout in milliseconds. - * @param priority The priority of the new event source. - * @return A connection handle, which can be used to disconnect the handler. - */ - sigc::connection connect(const sigc::slot& slot, unsigned int interval, - int priority = PRIORITY_DEFAULT); - - - /** Connects a timeout handler with whole second granularity. - * - * Unlike connect(), this operates at whole second granularity. - * The initial starting point of the timer is determined by the implementation - * and the implementation is expected to group multiple timers together so that - * they fire all at the same time. - * - * To allow this grouping, the @a interval to the first timer is rounded - * and can deviate up to one second from the specified interval. - * Subsequent timer iterations will generally run at the specified interval. - * - * @code - * Glib::signal_timeout().connect(sigc::ptr_fun(&timeout_handler), 1000); - * @endcode - * is equivalent to: - * @code - * const Glib::RefPtr timeout_source = Glib::TimeoutSource::create(1000); - * timeout_source->connectseconds(sigc::ptr_fun(&timeout_handler)); - * timeout_source->attach(Glib::MainContext::get_default()); - * @endcode - * @param slot A slot to call when @a interval has elapsed. - * @param interval The timeout in seconds. - * @param priority The priority of the new event source. - * @return A connection handle, which can be used to disconnect the handler. - * - * @newin2p14 - */ - sigc::connection connect_seconds(const sigc::slot& slot, unsigned int interval, - int priority = PRIORITY_DEFAULT); - -private: - GMainContext* context_; - - // no copy assignment - SignalTimeout& operator=(const SignalTimeout&); -}; - - -class SignalIdle -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit inline SignalIdle(GMainContext* context); -#endif - - /** Connects an idle handler. - * @code - * Glib::signal_idle().connect(sigc::ptr_fun(&idle_handler)); - * @endcode - * is equivalent to: - * @code - * const Glib::RefPtr idle_source = Glib::IdleSource::create(); - * idle_source->connect(sigc::ptr_fun(&idle_handler)); - * idle_source->attach(Glib::MainContext::get_default()); - * @endcode - * @param slot A slot to call when the main loop is idle. - * @param priority The priority of the new event source. - * @return A connection handle, which can be used to disconnect the handler. - */ - sigc::connection connect(const sigc::slot& slot, int priority = PRIORITY_DEFAULT_IDLE); - -private: - GMainContext* context_; - - // no copy assignment - SignalIdle& operator=(const SignalIdle&); -}; - - -class SignalIO -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit inline SignalIO(GMainContext* context); -#endif - - /** Connects an I/O handler. - * @code - * Glib::signal_io().connect(sigc::ptr_fun(&io_handler), fd, Glib::IO_IN | Glib::IO_HUP); - * @endcode - * is equivalent to: - * @code - * const Glib::RefPtr io_source = Glib::IOSource::create(fd, Glib::IO_IN | Glib::IO_HUP); - * io_source->connect(sigc::ptr_fun(&io_handler)); - * io_source->attach(Glib::MainContext::get_default()); - * @endcode - * @param slot A slot to call when polling @a fd results in an event that matches @a condition. - * The event will be passed as a parameter to @a slot. - * If @a io_handler returns false the signal is disconnected. - * @param fd The file descriptor (or a @c HANDLE on Win32 systems) to watch. - * @param condition The conditions to watch for. - * @param priority The priority of the new event source. - * @return A connection handle, which can be used to disconnect the handler. - */ - sigc::connection connect(const sigc::slot& slot, int fd, - IOCondition condition, int priority = PRIORITY_DEFAULT); - - /** Connects an I/O channel. - * @code - * Glib::signal_io().connect(sigc::ptr_fun(&io_handler), channel, Glib::IO_IN | Glib::IO_HUP); - * @endcode - * is equivalent to: - * @code - * const Glib::RefPtr io_source = Glib::IOSource::create(channel, Glib::IO_IN | Glib::IO_HUP); - * io_source->connect(sigc::ptr_fun(&io_handler)); - * io_source->attach(Glib::MainContext::get_default()); - * @endcode - * @param slot A slot to call when polling @a channel results in an event that matches @a condition. - * The event will be passed as a parameter to @a slot. - * If @a io_handler returns false the signal is disconnected. - * @param channel The IOChannel object to watch. - * @param condition The conditions to watch for. - * @param priority The priority of the new event source. - * @return A connection handle, which can be used to disconnect the handler. - */ - sigc::connection connect(const sigc::slot& slot, const Glib::RefPtr& channel, - IOCondition condition, int priority = PRIORITY_DEFAULT); - -private: - GMainContext* context_; - - // no copy assignment - SignalIO& operator=(const SignalIO&); -}; - -class SignalChildWatch -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit inline SignalChildWatch(GMainContext* context); -#endif - /** Connects a child watch handler. - * @code - * Glib::signal_child_watch().connect(sigc::ptr_fun(&child_watch_handler), pid); - * @endcode - * @param slot A slot to call when child @a pid exited. - * @param pid The child to watch for. - * @param priority The priority of the new event source. - * @return A connection handle, which can be used to disconnect the handler. - */ - sigc::connection connect(const sigc::slot& slot, GPid pid, -int priority = PRIORITY_DEFAULT); -private: - GMainContext* context_; - - // no copy assignment - SignalChildWatch& operator=(const SignalChildWatch&); -}; - -/** Convenience timeout signal. - * @return A signal proxy; you want to use SignalTimeout::connect(). - */ -SignalTimeout signal_timeout(); - -/** Convenience idle signal. - * @return A signal proxy; you want to use SignalIdle::connect(). - */ -SignalIdle signal_idle(); - -/** Convenience I/O signal. - * @return A signal proxy; you want to use SignalIO::connect(). - */ -SignalIO signal_io(); - -/** Convenience child watch signal. - * @return A signal proxy; you want to use SignalChildWatch::connect(). - */ -SignalChildWatch signal_child_watch(); - - -/** Main context. - */ -class MainContext -{ -public: - typedef Glib::MainContext CppObjectType; - typedef GMainContext BaseObjectType; - - /** Creates a new MainContext. - * @return The new MainContext. - */ - static Glib::RefPtr create(); - /** Returns the default main context. - * This is the main context used for main loop functions when a main loop is not explicitly specified. - * @return The new MainContext. - */ - static Glib::RefPtr get_default(); - - /** Runs a single iteration for the given main loop. - * This involves checking to see if any event sources are ready to be processed, then if no events sources are - * ready and may_block is true, waiting for a source to become ready, then dispatching the highest priority events - * sources that are ready. Note that even when may_block is true, it is still possible for iteration() to return - * false, since the the wait may be interrupted for other reasons than an event source becoming ready. - * @param may_block Whether the call may block. - * @return true if events were dispatched. - */ - bool iteration(bool may_block); - - /** Checks if any sources have pending events for the given context. - * @return true if events are pending. - */ - bool pending(); - - /** If context is currently waiting in a poll(), interrupt the poll(), and continue the iteration process. - */ - void wakeup(); - - /** Tries to become the owner of the specified context. - * If some other context is the owner of the context, returns FALSE immediately. Ownership is properly recursive: - * the owner can require ownership again and will release ownership when release() is called as many times as - * acquire(). - * You must be the owner of a context before you can call prepare(), query(), check(), dispatch(). - * @return true if the operation succeeded, and this thread is now the owner of context. - */ - bool acquire(); - - - /** Tries to become the owner of the specified context, as with acquire(). But if another thread is the owner, - * atomically drop mutex and wait on cond until that owner releases ownership or until cond is signaled, then try - * again (once) to become the owner. - * @param cond A condition variable. - * @param mutex A mutex, currently held. - * @return true if the operation succeeded, and this thread is now the owner of context. - */ - bool wait(Glib::Cond& cond, Glib::Mutex& mutex); - - /** Releases ownership of a context previously acquired by this thread with acquire(). If the context was acquired - * multiple times, the only release ownership when release() is called as many times as it was acquired. - */ - void release(); - - - - /** Prepares to poll sources within a main loop. The resulting information for polling is determined by calling query(). - * @param priority Location to store priority of highest priority source already ready. - * @return true if some source is ready to be dispatched prior to polling. - */ - bool prepare(int& priority); - /** Prepares to poll sources within a main loop. The resulting information for polling is determined by calling query(). - * @return true if some source is ready to be dispatched prior to polling. - */ - bool prepare(); - - /** Determines information necessary to poll this main loop. - * @param max_priority Maximum priority source to check. - * @param timeout Location to store timeout to be used in polling. - * @param fds Location to store Glib::PollFD records that need to be polled. - * @return the number of records actually stored in fds, or, if more than n_fds records need to be stored, the number of records that need to be stored. - */ - void query(int max_priority, int& timeout, std::vector& fds); - - /** Passes the results of polling back to the main loop. - * @param max_priority Maximum numerical priority of sources to check. - * @param fds Vector of Glib::PollFD's that was passed to the last call to query() - * @return true if some sources are ready to be dispatched. - */ - bool check(int max_priority, std::vector& fds); - - /** Dispatches all pending sources. - */ - void dispatch(); - - //TODO: Use slot instead? - /** Sets the function to use to handle polling of file descriptors. It will be used instead of the poll() system call (or GLib's replacement function, which is used where poll() isn't available). - * This function could possibly be used to integrate the GLib event loop with an external event loop. - * @param poll_func The function to call to poll all file descriptors. - */ - void set_poll_func(GPollFunc poll_func); - - /** Gets the poll function set by g_main_context_set_poll_func(). - * @return The poll function - */ - GPollFunc get_poll_func(); - - /** Adds a file descriptor to the set of file descriptors polled for this context. This will very seldomly be used directly. Instead a typical event source will use Glib::Source::add_poll() instead. - * @param fd A PollFD structure holding information about a file descriptor to watch. - * @param priority The priority for this file descriptor which should be the same as the priority used for Glib::Source::attach() to ensure that the file descriptor is polled whenever the results may be needed. - */ - void add_poll(PollFD& fd, int priority); - - /** Removes file descriptor from the set of file descriptors to be polled for a particular context. - * @param fd A PollFD structure holding information about a file descriptor. - */ - void remove_poll(PollFD& fd); - - /** Timeout signal, attached to this MainContext. - * @return A signal proxy; you want to use SignalTimeout::connect(). - */ - SignalTimeout signal_timeout(); - - /** Idle signal, attached to this MainContext. - * @return A signal proxy; you want to use SignalIdle::connect(). - */ - SignalIdle signal_idle(); - - /** I/O signal, attached to this MainContext. - * @return A signal proxy; you want to use SignalIO::connect(). - */ - SignalIO signal_io(); - - /** child watch signal, attached to this MainContext. - * @return A signal proxy; you want to use SignalChildWatch::connect(). - */ - SignalChildWatch signal_child_watch(); - - void reference() const; - void unreference() const; - - GMainContext* gobj(); - const GMainContext* gobj() const; - GMainContext* gobj_copy() const; - -private: - // Glib::MainContext can neither be constructed nor deleted. - MainContext(); - void operator delete(void*, size_t); - - // noncopyable - MainContext(const MainContext& other); - MainContext& operator=(const MainContext& other); - -}; - -/** @relates Glib::MainContext */ -Glib::RefPtr wrap(GMainContext* gobject, bool take_copy = false); - - -class MainLoop -{ -public: - typedef Glib::MainLoop CppObjectType; - typedef GMainLoop BaseObjectType; - - static Glib::RefPtr create(bool is_running = false); - static Glib::RefPtr create(const Glib::RefPtr& context, - bool is_running = false); - - /** Runs a main loop until quit() is called on the loop. - * If this is called for the thread of the loop's MainContext, it will process events from the loop, otherwise it will simply wait. - */ - void run(); - - /** Stops a MainLoop from running. Any calls to run() for the loop will return. - */ - void quit(); - - /** Checks to see if the main loop is currently being run via run(). - * @return true if the mainloop is currently being run. - */ - bool is_running(); - - /** Returns the MainContext of loop. - * @return The MainContext of loop. - */ - Glib::RefPtr get_context(); - - //TODO: C++ize the (big) g_main_depth docs here. - static int depth(); - - /** Increases the reference count on a MainLoop object by one. - */ - void reference() const; - - /** Decreases the reference count on a MainLoop object by one. - * If the result is zero, free the loop and free all associated memory. - */ - void unreference() const; - - GMainLoop* gobj(); - const GMainLoop* gobj() const; - GMainLoop* gobj_copy() const; - -private: - // Glib::MainLoop can neither be constructed nor deleted. - MainLoop(); - void operator delete(void*, size_t); - - MainLoop(const MainLoop&); - MainLoop& operator=(const MainLoop&); -}; - -/** @relates Glib::MainLoop */ -Glib::RefPtr wrap(GMainLoop* gobject, bool take_copy = false); - - -class Source -{ -public: - typedef Glib::Source CppObjectType; - typedef GSource BaseObjectType; - - static Glib::RefPtr create() /* = 0 */; - - /** Adds a Source to a context so that it will be executed within that context. - * @param context A MainContext. - * @return The ID for the source within the MainContext. - */ - unsigned int attach(const Glib::RefPtr& context); - - /** Adds a Source to a context so that it will be executed within that context. - * The default context will be used. - * @return The ID for the source within the MainContext. - */ - unsigned int attach(); - - //TODO: Does this destroy step make sense in C++? Should it just be something that happens in a destructor? - - /** Removes a source from its MainContext, if any, and marks it as destroyed. - * The source cannot be subsequently added to another context. - */ - void destroy(); - - /** Sets the priority of a source. While the main loop is being run, a source will be dispatched if it is ready to be dispatched and no sources at a higher (numerically smaller) priority are ready to be dispatched. - * @param priority The new priority. - */ - void set_priority(int priority); - - /** Gets the priority of a source. - * @return The priority of the source. - */ - int get_priority() const; - - /** Sets whether a source can be called recursively. - * If @a can_recurse is true, then while the source is being dispatched then this source will be processed normally. Otherwise, all processing of this source is blocked until the dispatch function returns. - * @param can_recurse Whether recursion is allowed for this source. - */ - void set_can_recurse(bool can_recurse); - - /** Checks whether a source is allowed to be called recursively. see set_can_recurse(). - * @return Whether recursion is allowed. - */ - bool get_can_recurse() const; - - /** Returns the numeric ID for a particular source. - * The ID of a source is unique within a particular main loop context. The reverse mapping from ID to source is done by MainContext::find_source_by_id(). - * @return The ID for the source. - */ - unsigned int get_id() const; - - //TODO: Add a const version of this method? - /** Gets the MainContext with which the source is associated. - * Calling this function on a destroyed source is an error. - * @return The MainContext with which the source is associated, or a null RefPtr if the context has not yet been added to a source. - */ - Glib::RefPtr get_context(); - - GSource* gobj() { return gobject_; } - const GSource* gobj() const { return gobject_; } - GSource* gobj_copy() const; - - void reference() const; - void unreference() const; - -protected: - /** Construct an object that uses the virtual functions prepare(), check() and dispatch(). - */ - Source(); - - /** Wrap an existing GSource object and install the given callback function. - * The constructed object doesn't use the virtual functions prepare(), check() and dispatch(). - * This constructor is for use by derived types that need to wrap a GSource object. - * The callback function can be a static member function. But beware - - * depending on the actual implementation of the GSource's virtual functions - * the expected type of the callback function can differ from GSourceFunc. - */ - Source(GSource* cast_item, GSourceFunc callback_func); - - virtual ~Source(); - - sigc::connection connect_generic(const sigc::slot_base& slot); - - /** Adds a file descriptor to the set of file descriptors polled for this source. - * The event source's check function will typically test the revents field in the PollFD and return true if events need to be processed. - * @param poll_fd A PollFD object holding information about a file descriptor to watch. - */ - void add_poll(PollFD& poll_fd); - - /** Removes a file descriptor from the set of file descriptors polled for this source. - * @param poll_fd A PollFD object previously passed to add_poll(). - */ - void remove_poll(PollFD& poll_fd); - - /** Gets the "current time" to be used when checking this source. The advantage of calling this function over calling get_current_time() directly is that when checking multiple sources, GLib can cache a single value instead of having to repeatedly get the system time. - * @param current_time Glib::TimeVal in which to store current time - */ - void get_current_time(Glib::TimeVal& current_time); - - virtual bool prepare(int& timeout) = 0; - virtual bool check() = 0; - virtual bool dispatch(sigc::slot_base* slot) = 0; - -private: - GSource* gobject_; - -#ifndef DOXGEN_SHOULD_SKIP_THIS - - static inline Source* get_wrapper(GSource* source); - - static const GSourceFuncs vfunc_table_; - - static gboolean prepare_vfunc(GSource* source, int* timeout); - static gboolean check_vfunc(GSource* source); - static gboolean dispatch_vfunc(GSource* source, GSourceFunc callback, void* user_data); -public: - static void destroy_notify_callback(void* data); -private: - -#endif /* DOXGEN_SHOULD_SKIP_THIS */ - - // noncopyable - Source(const Source&); - Source& operator=(const Source&); -}; - - -class TimeoutSource : public Glib::Source -{ -public: - typedef Glib::TimeoutSource CppObjectType; - - static Glib::RefPtr create(unsigned int interval); - sigc::connection connect(const sigc::slot& slot); - -protected: - explicit TimeoutSource(unsigned int interval); - virtual ~TimeoutSource(); - - virtual bool prepare(int& timeout); - virtual bool check(); - virtual bool dispatch(sigc::slot_base* slot); - -private: - Glib::TimeVal expiration_; - unsigned int interval_; -}; - - -class IdleSource : public Glib::Source -{ -public: - typedef Glib::IdleSource CppObjectType; - - static Glib::RefPtr create(); - sigc::connection connect(const sigc::slot& slot); - -protected: - IdleSource(); - virtual ~IdleSource(); - - virtual bool prepare(int& timeout); - virtual bool check(); - virtual bool dispatch(sigc::slot_base* slot_data); -}; - - -class IOSource : public Glib::Source -{ -public: - typedef Glib::IOSource CppObjectType; - - static Glib::RefPtr create(int fd, IOCondition condition); - static Glib::RefPtr create(const Glib::RefPtr& channel, IOCondition condition); - sigc::connection connect(const sigc::slot& slot); - -protected: - IOSource(int fd, IOCondition condition); - IOSource(const Glib::RefPtr& channel, IOCondition condition); - virtual ~IOSource(); - - virtual bool prepare(int& timeout); - virtual bool check(); - virtual bool dispatch(sigc::slot_base* slot); - -private: - PollFD poll_fd_; -}; - -/** @} group MainLoop */ - -} // namespace Glib - - -#endif /* _GLIBMM_MAIN_H */ - diff --git a/libs/glibmm2/glib/glibmm/markup.cc b/libs/glibmm2/glib/glibmm/markup.cc deleted file mode 100644 index 4979583808..0000000000 --- a/libs/glibmm2/glib/glibmm/markup.cc +++ /dev/null @@ -1,387 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: markup.ccg,v 1.5 2006/10/04 12:04:09 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -namespace Markup -{ - -Glib::ustring escape_text(const Glib::ustring& text) -{ - const Glib::ScopedPtr buf (g_markup_escape_text(text.data(), text.bytes())); - return Glib::ustring(buf.get()); -} - - -/**** Glib::Markup::AttributeKeyLess ***************************************/ - -bool AttributeKeyLess::operator()(const Glib::ustring& lhs, const Glib::ustring& rhs) const -{ - return (lhs.raw() < rhs.raw()); -} - - -/**** Glib::Markup::ParserCallbacks ****************************************/ - -class ParserCallbacks -{ -public: - static const GMarkupParser vfunc_table; - - static void start_element(GMarkupParseContext* context, - const char* element_name, - const char** attribute_names, - const char** attribute_values, - void* user_data, - GError** error); - - static void end_element(GMarkupParseContext* context, - const char* element_name, - void* user_data, - GError** error); - - static void text(GMarkupParseContext* context, - const char* text, - gsize text_len, - void* user_data, - GError** error); - - static void passthrough(GMarkupParseContext* context, - const char* passthrough_text, - gsize text_len, - void* user_data, - GError** error); - - static void error(GMarkupParseContext* context, - GError* error, - void* user_data); -}; - - -const GMarkupParser ParserCallbacks::vfunc_table = -{ - &ParserCallbacks::start_element, - &ParserCallbacks::end_element, - &ParserCallbacks::text, - &ParserCallbacks::passthrough, - &ParserCallbacks::error, -}; - -void ParserCallbacks::start_element(GMarkupParseContext* context, - const char* element_name, - const char** attribute_names, - const char** attribute_values, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - Parser::AttributeMap attributes; - - if(attribute_names && attribute_values) - { - const char *const * pname = attribute_names; - const char *const * pvalue = attribute_values; - - for(; *pname && *pvalue; ++pname, ++pvalue) - attributes.insert(Parser::AttributeMap::value_type(*pname, *pvalue)); - - g_return_if_fail(*pname == 0 && *pvalue == 0); - } - - cpp_context.get_parser()->on_start_element(cpp_context, element_name, attributes); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::end_element(GMarkupParseContext* context, - const char* element_name, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_end_element(cpp_context, element_name); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::text(GMarkupParseContext* context, - const char* text, - gsize text_len, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_text(cpp_context, Glib::ustring(text, text + text_len)); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::passthrough(GMarkupParseContext* context, - const char* passthrough_text, - gsize text_len, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_passthrough( - cpp_context, Glib::ustring(passthrough_text, passthrough_text + text_len)); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::error(GMarkupParseContext* context, - GError* error, - void* user_data) -{ - ParseContext& cpp_context = *static_cast(user_data); - - g_return_if_fail(context == cpp_context.gobj()); - g_return_if_fail(error->domain == G_MARKUP_ERROR); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_error(cpp_context, MarkupError(g_error_copy(error))); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - - -/**** Glib::Markup::Parser *************************************************/ - -Parser::Parser() -{} - -Parser::~Parser() -{} - -void Parser::on_start_element(ParseContext&, const Glib::ustring&, const Parser::AttributeMap&) -{} - -void Parser::on_end_element(ParseContext&, const Glib::ustring&) -{} - -void Parser::on_text(ParseContext&, const Glib::ustring&) -{} - -void Parser::on_passthrough(ParseContext&, const Glib::ustring&) -{} - -void Parser::on_error(ParseContext&, const MarkupError&) -{} - - -/**** Glib::Markup::ParseContext *******************************************/ - -ParseContext::ParseContext(Parser& parser, ParseFlags flags) -: - parser_ (&parser), - gobject_ (g_markup_parse_context_new(&ParserCallbacks::vfunc_table, (GMarkupParseFlags) flags, - this, &ParseContext::destroy_notify_callback)) -{} - -ParseContext::~ParseContext() -{ - parser_ = 0; - g_markup_parse_context_free(gobject_); -} - -void ParseContext::parse(const Glib::ustring& text) -{ - GError* error = 0; - g_markup_parse_context_parse(gobject_, text.data(), text.bytes(), &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void ParseContext::parse(const char* text_begin, const char* text_end) -{ - GError* error = 0; - g_markup_parse_context_parse(gobject_, text_begin, text_end - text_begin, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void ParseContext::end_parse() -{ - GError* error = 0; - g_markup_parse_context_end_parse(gobject_, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -Glib::ustring ParseContext::get_element() const -{ - const char *const element_name = g_markup_parse_context_get_element(gobject_); - return (element_name) ? Glib::ustring(element_name) : Glib::ustring(); -} - -int ParseContext::get_line_number() const -{ - int line_number = 0; - g_markup_parse_context_get_position(gobject_, &line_number, 0); - return line_number; -} - -int ParseContext::get_char_number() const -{ - int char_number = 0; - g_markup_parse_context_get_position(gobject_, 0, &char_number); - return char_number; -} - -// static -void ParseContext::destroy_notify_callback(void* data) -{ - ParseContext *const self = static_cast(data); - - // Detect premature destruction. - g_return_if_fail(self->parser_ == 0); -} - -} // namespace Markup - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::MarkupError::MarkupError(Glib::MarkupError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_MARKUP_ERROR, error_code, error_message) -{} - -Glib::MarkupError::MarkupError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::MarkupError::Code Glib::MarkupError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::MarkupError::throw_func(GError* gobject) -{ - throw Glib::MarkupError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::MarkupError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::MarkupError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/markup.h b/libs/glibmm2/glib/glibmm/markup.h deleted file mode 100644 index b3885cdfcf..0000000000 --- a/libs/glibmm2/glib/glibmm/markup.h +++ /dev/null @@ -1,430 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_MARKUP_H -#define _GLIBMM_MARKUP_H - - -/* $Id: markup.hg,v 1.5 2005/01/21 12:48:05 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include - -#include -#include - -GLIBMM_USING_STD(map) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GMarkupParseContext GMarkupParseContext; } -#endif - - -namespace Glib -{ - -/** @defgroup Markup Simple XML Subset Parser - * - * The Glib::Markup parser is intended to parse a simple markup format that's a - * subset of XML. This is a small, efficient, easy-to-use parser. It should not - * be used if you expect to interoperate with other applications generating - * full-scale XML. However, it's very useful for application data files, config - * files, etc. where you know your application will be the only one writing the - * file. Full-scale XML parsers should be able to parse the subset used by - * Glib::Markup parser, so you can easily migrate to full-scale XML at a later - * time if the need arises. - * - * Glib::Markup is not guaranteed to signal an error on all invalid XML; - * the parser may accept documents that an XML parser would not. However, - * invalid XML documents are not considered valid Glib::Markup documents. - * - * @par Simplifications to XML include: - * - * - Only UTF-8 encoding is allowed. - * - No user-defined entities. - * - Processing instructions, comments and the doctype declaration are "passed - * through" but are not interpreted in any way. - * - No DTD or validation. - * - * @par The markup format does support: - * - * - Elements - * - Attributes - * - 5 standard entities: \& \< \> \" \' - * - Character references - * - Sections marked as CDATA - * - * @{ - */ - -/** %Exception class for markup parsing errors. - */ -class MarkupError : public Glib::Error -{ -public: - enum Code - { - BAD_UTF8, - EMPTY, - PARSE, - UNKNOWN_ELEMENT, - UNKNOWN_ATTRIBUTE, - INVALID_CONTENT - }; - - MarkupError(Code error_code, const Glib::ustring& error_message); - explicit MarkupError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/*! @var MarkupError::Code MarkupError::BAD_UTF8 - * Text being parsed was not valid UTF-8. - */ -/*! @var MarkupError::Code MarkupError::EMPTY - * Document contained nothing, or only whitespace. - */ -/*! @var MarkupError::Code MarkupError::PARSE - * Document was ill-formed. - */ -/*! @var MarkupError::Code MarkupError::UNKNOWN_ELEMENT - * This error should be set by Glib::Markup::Parser virtual methods; - * element wasn't known. - */ -/*! @var MarkupError::Code MarkupError::UNKNOWN_ATTRIBUTE - * This error should be set by Glib::Markup::Parser virtual methods; - * attribute wasn't known. - */ -/*! @var MarkupError::Code MarkupError::INVALID_CONTENT - * This error should be set by Glib::Markup::Parser virtual methods; - * something was wrong with contents of the document, e.g. invalid attribute value. - */ - -/** @} group Markup */ - - -namespace Markup -{ - -class ParseContext; - -/** @ingroup Markup */ -typedef Glib::MarkupError Error; - - -/** Escapes text so that the markup parser will parse it verbatim. - * Less than, greater than, ampersand, etc. are replaced with the corresponding - * entities. This function would typically be used when writing out a file to - * be parsed with the markup parser. - * @ingroup Markup - * @param text Some valid UTF-8 text. - * @return Escaped text. - */ -Glib::ustring escape_text(const Glib::ustring& text); - - -/** There are no flags right now. Pass Glib::Markup::ParseFlags(0) for - * the flags argument to all functions (this should be the default argument - * anyway). - */ -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %ParseFlags operator|(ParseFlags, ParseFlags)
- * %ParseFlags operator&(ParseFlags, ParseFlags)
- * %ParseFlags operator^(ParseFlags, ParseFlags)
- * %ParseFlags operator~(ParseFlags)
- * %ParseFlags& operator|=(ParseFlags&, ParseFlags)
- * %ParseFlags& operator&=(ParseFlags&, ParseFlags)
- * %ParseFlags& operator^=(ParseFlags&, ParseFlags)
- */ -enum ParseFlags -{ - DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, - TREAT_CDATA_AS_TEXT = 1 << 1 -}; - -/** @ingroup glibmmEnums */ -inline ParseFlags operator|(ParseFlags lhs, ParseFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline ParseFlags operator&(ParseFlags lhs, ParseFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline ParseFlags operator^(ParseFlags lhs, ParseFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline ParseFlags operator~(ParseFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline ParseFlags& operator|=(ParseFlags& lhs, ParseFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline ParseFlags& operator&=(ParseFlags& lhs, ParseFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline ParseFlags& operator^=(ParseFlags& lhs, ParseFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/*! @var Markup::ParseFlags DO_NOT_USE_THIS_UNSUPPORTED_FLAG - * Flag you should not use. - */ - - -/** Binary predicate used by Markup::Parser::AttributeMap. - * @ingroup Markup - * Unlike operator<(const ustring& lhs, const ustring& rhs) - * which would be used by the default std::less<> predicate, - * the AttributeKeyLess predicate is locale-independent. This is both - * more correct and much more efficient. - */ -class AttributeKeyLess -{ -public: - typedef Glib::ustring first_argument_type; - typedef Glib::ustring second_argument_type; - typedef bool result_type; - - bool operator()(const Glib::ustring& lhs, const Glib::ustring& rhs) const; -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class ParserCallbacks; -#endif - -/** The abstract markup parser base class. - * @ingroup Markup - * To implement a parser for your markup format, derive from - * Glib::Markup::Parser and implement the virtual methods. - * - * You don't have to override all of the virtual methods. If a particular - * method is not implement the data passed to it will be ignored. Except for - * the error method, any of these callbacks can throw an error exception; in - * particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT errors - * are intended to be thrown from these overridden methods. If you throw an - * error from a method, Glib::Markup::ParseContext::parse() will report that - * error back to its caller. - */ -class Parser : public sigc::trackable -{ -public: - typedef std::map AttributeMap; - - virtual ~Parser() = 0; - -protected: - /** Constructs a Parser object. - * Note that Markup::Parser is an abstract class which can't be instantiated - * directly. To implement the parser for your markup format, derive from - * Markup::Parser and implement the virtual methods. - */ - Parser(); - - /** Called for open tags \. - * This virtual method is invoked when the opening tag of an element is seen. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param element_name The name of the element. - * @param attributes A map of attribute name/value pairs. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_start_element(ParseContext& context, - const Glib::ustring& element_name, - const AttributeMap& attributes); - - /** Called for close tags \. - * This virtual method is invoked when the closing tag of an element is seen. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param element_name The name of the element. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_end_element(ParseContext& context, const Glib::ustring& element_name); - - /** Called for character data. - * This virtual method is invoked when some text is seen (text is always - * inside an element). - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param text The parsed text in UTF-8 encoding. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_text(ParseContext& context, const Glib::ustring& text); - - /** Called for strings that should be re-saved verbatim in this same - * position, but are not otherwise interpretable. - * This virtual method is invoked for comments, processing instructions and - * doctype declarations; if you're re-writing the parsed document, write the - * passthrough text back out in the same position. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param passthrough_text The text that should be passed through. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_passthrough(ParseContext& context, const Glib::ustring& passthrough_text); - - /** Called on error, including one thrown by an overridden virtual method. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param error A MarkupError object with detailed information about the error. - */ - virtual void on_error(ParseContext& context, const MarkupError& error); - -private: - // noncopyable - Parser(const Parser&); - Parser& operator=(const Parser&); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - friend class Glib::Markup::ParserCallbacks; -#endif -}; - - -/** A parse context is used to parse marked-up documents. - * @ingroup Markup - * You can feed any number of documents into a context, as long as no errors - * occur; once an error occurs, the parse context can't continue to parse text - * (you have to destroy it and create a new parse context). - */ -class ParseContext : public sigc::trackable -{ -public: - /** Creates a new parse context. - * @param parser A Markup::Parser instance. - * @param flags Bitwise combination of Markup::ParseFlags. - */ - explicit ParseContext(Parser& parser, ParseFlags flags = ParseFlags(0)); - virtual ~ParseContext(); - - /** Feed some data to the ParseContext. - * The data need not be valid UTF-8; an error will be signalled if it's - * invalid. The data need not be an entire document; you can feed a document - * into the parser incrementally, via multiple calls to this function. - * Typically, as you receive data from a network connection or file, you feed - * each received chunk of data into this function, aborting the process if an - * error occurs. Once an error is reported, no further data may be fed to the - * ParseContext; all errors are fatal. - * @param text Chunk of text to parse. - * @throw Glib::MarkupError - */ - void parse(const Glib::ustring& text); - - /** Feed some data to the ParseContext. - * The data need not be valid UTF-8; an error will be signalled if it's - * invalid. The data need not be an entire document; you can feed a document - * into the parser incrementally, via multiple calls to this function. - * Typically, as you receive data from a network connection or file, you feed - * each received chunk of data into this function, aborting the process if an - * error occurs. Once an error is reported, no further data may be fed to the - * ParseContext; all errors are fatal. - * @param text_begin Begin of chunk of text to parse. - * @param text_end End of chunk of text to parse. - * @throw Glib::MarkupError - */ - void parse(const char* text_begin, const char* text_end); - - /** Signals to the ParseContext that all data has been fed into the parse - * context with parse(). This method reports an error if the document isn't - * complete, for example if elements are still open. - * @throw Glib::MarkupError - */ - void end_parse(); - - /** Retrieves the name of the currently open element. - * @return The name of the currently open element, or "". - */ - Glib::ustring get_element() const; - - /** Retrieves the current line number. - * Intended for use in error messages; there are no strict semantics for what - * constitutes the "current" line number other than "the best number we could - * come up with for error messages." - */ - int get_line_number() const; - - /** Retrieves the number of the current character on the current line. - * Intended for use in error messages; there are no strict semantics for what - * constitutes the "current" character number other than "the best number we - * could come up with for error messages." - */ - int get_char_number() const; - - Parser* get_parser() { return parser_; } - const Parser* get_parser() const { return parser_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GMarkupParseContext* gobj() { return gobject_; } - const GMarkupParseContext* gobj() const { return gobject_; } -#endif - -private: - Markup::Parser* parser_; - GMarkupParseContext* gobject_; - - // noncopyable - ParseContext(const ParseContext&); - ParseContext& operator=(const ParseContext&); - - static void destroy_notify_callback(void* data); -}; - -} // namespace Markup - -} // namespace Glib - - -#endif /* _GLIBMM_MARKUP_H */ - diff --git a/libs/glibmm2/glib/glibmm/miscutils.cc b/libs/glibmm2/glib/glibmm/miscutils.cc deleted file mode 100644 index eb0ff01b09..0000000000 --- a/libs/glibmm2/glib/glibmm/miscutils.cc +++ /dev/null @@ -1,161 +0,0 @@ -// -*- c++ -*- -/* $Id: miscutils.cc 420 2007-06-22 15:29:58Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#include -#include -#include - - -namespace Glib -{ - -Glib::ustring get_application_name() -{ - return convert_const_gchar_ptr_to_ustring (g_get_application_name()); -} - -void set_application_name(const Glib::ustring& application_name) -{ - g_set_application_name(application_name.c_str()); -} - -std::string get_prgname() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_prgname()); -} - -void set_prgname(const std::string& prgname) -{ - g_set_prgname(prgname.c_str()); -} - -std::string getenv(const std::string& variable, bool& found) -{ - const char *const value = g_getenv(variable.c_str()); - found = (value != 0); - return convert_const_gchar_ptr_to_stdstring(value); -} - -std::string getenv(const std::string& variable) -{ - return convert_const_gchar_ptr_to_stdstring(g_getenv(variable.c_str())); -} - -bool setenv(const std::string& variable, const std::string& value, bool overwrite) -{ - return g_setenv(variable.c_str(), value.c_str(), overwrite); -} - -void unsetenv(const std::string& variable) -{ - g_unsetenv(variable.c_str()); -} - -std::string get_user_name() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_user_name()); -} - -std::string get_real_name() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_real_name()); -} - -std::string get_home_dir() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_home_dir()); -} - -std::string get_tmp_dir() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_tmp_dir()); -} - -std::string get_current_dir() -{ - return convert_return_gchar_ptr_to_stdstring(g_get_current_dir()); -} - -std::string get_user_special_dir(GUserDirectory directory) -{ - return convert_const_gchar_ptr_to_stdstring(g_get_user_special_dir(directory)); -} - -std::string get_user_data_dir() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_user_data_dir()); -} - -std::string get_user_config_dir() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_user_config_dir()); -} - -std::string get_user_cache_dir() -{ - return convert_const_gchar_ptr_to_stdstring(g_get_user_cache_dir()); -} - -bool path_is_absolute(const std::string& filename) -{ - return (g_path_is_absolute(filename.c_str()) != 0); -} - -std::string path_skip_root(const std::string& filename) -{ - // g_path_skip_root() returns a pointer _into_ the argument string, - // or NULL if there was no root component. - return convert_const_gchar_ptr_to_stdstring(g_path_skip_root(filename.c_str())); -} - -std::string path_get_basename(const std::string& filename) -{ - return convert_return_gchar_ptr_to_stdstring(g_path_get_basename(filename.c_str())); -} - -std::string path_get_dirname(const std::string& filename) -{ - return convert_return_gchar_ptr_to_stdstring(g_path_get_dirname(filename.c_str())); -} - -std::string build_filename(const Glib::ArrayHandle& elements) -{ - return convert_return_gchar_ptr_to_stdstring(g_build_filenamev(const_cast(elements.data()))); -} - -std::string build_filename(const std::string& elem1, const std::string& elem2) -{ - return convert_return_gchar_ptr_to_stdstring(g_build_filename(elem1.c_str(), elem2.c_str(), static_cast(0))); -} - -std::string build_path(const std::string& separator, const Glib::ArrayHandle& elements) -{ - return convert_return_gchar_ptr_to_stdstring(g_build_pathv(separator.c_str(), const_cast(elements.data()))); -} - -std::string find_program_in_path(const std::string& program) -{ - return convert_return_gchar_ptr_to_stdstring(g_find_program_in_path(program.c_str())); -} - -} // namespace Glib diff --git a/libs/glibmm2/glib/glibmm/miscutils.h b/libs/glibmm2/glib/glibmm/miscutils.h deleted file mode 100644 index 3861c3772f..0000000000 --- a/libs/glibmm2/glib/glibmm/miscutils.h +++ /dev/null @@ -1,320 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_MISCUTILS_H -#define _GLIBMM_MISCUTILS_H - -/* $Id: miscutils.h 428 2007-07-29 12:43:29Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -/** @defgroup MiscUtils Miscellaneous Utility Functions - * Miscellaneous Utility Functions -- a selection of portable utility functions. - * @{ - */ - -/** Gets a human-readable name for the application, - * as set by Glib::set_application_name(). - * This name should be localized if possible, and is intended for display to - * the user. Contrast with Glib::get_prgname(), which gets a non-localized - * name. If Glib::set_application_name() has not been called, returns the - * result of Glib::get_prgname() (which may be empty if Glib::set_prgname() - * has also not been called). - * - * @return Human-readable application name. May return "". - */ -Glib::ustring get_application_name(); - -/** Sets a human-readable name for the application. - * This name should be localized if possible, and is intended for display to - * the user. Contrast with Glib::set_prgname(), which sets a non-localized - * name. Glib::set_prgname() will be called automatically by - * gtk_init(), but Glib::set_application_name() will not. - * - * Note that for thread safety reasons, this function can only be called once. - * - * The application name will be used in contexts such as error messages, - * or when displaying an application's name in the task list. - * - * @param application_name Localized name of the application. - */ -void set_application_name(const Glib::ustring& application_name); - -/** Gets the name of the program. - * If you are using GDK or GTK+ the program name is set in gdk_init(), - * which is called by gtk_init(). The program name is found by taking - * the last component of argv[0]. - * @return The name of the program. - */ -std::string get_prgname(); - -/** Sets the name of the program. - * @param prgname The name of the program. - */ -void set_prgname(const std::string& prgname); - -/** Returns the value of an environment variable. The name and value - * are in the GLib file name encoding. On Unix, this means the actual - * bytes which might or might not be in some consistent character set - * and encoding. On Windows, it is in UTF-8. On Windows, in case the - * environment variable's value contains references to other - * environment variables, they are expanded. - * - * @param variable The environment variable to get. - * @retval found true Whether the environment variable has been found. - * @return The value of the environment variable, or "" if not found. - */ -std::string getenv(const std::string& variable, bool& found); - -/** Returns the value of an environment variable. The name and value - * are in the GLib file name encoding. On Unix, this means the actual - * bytes which might or might not be in some consistent character set - * and encoding. On Windows, it is in UTF-8. On Windows, in case the - * environment variable's value contains references to other - * environment variables, they are expanded. - * - * @param variable The environment variable to get. - * @return The value of the environment variable, or "" if not found. - */ -std::string getenv(const std::string& variable); - - -/** Sets an environment variable. Both the variable's name and value - * should be in the GLib file name encoding. On Unix, this means that - * they can be any sequence of bytes. On Windows, they should be in - * UTF-8. - * - * Note that on some systems, when variables are overwritten, the memory - * used for the previous variables and its value isn't reclaimed. - * - * @param variable The environment variable to set. It must not contain '='. - * @param value The value to which the variable should be set. - * @param overwrite Whether to change the variable if it already exists. - * @result false if the environment variable couldn't be set. - */ -bool setenv(const std::string& variable, const std::string& value, bool overwrite = true); - -/** Removes an environment variable from the environment. - * - * Note that on some systems, when variables are overwritten, the memory - * used for the previous variables and its value isn't reclaimed. - * Furthermore, this function can't be guaranteed to operate in a - * threadsafe way. - * - * @param variable: the environment variable to remove. It must not contain '='. - **/ -void unsetenv(const std::string& variable); - -/** Gets the user name of the current user. - * @return The name of the current user. - */ -std::string get_user_name(); - -/** Gets the real name of the user. - * This usually comes from the user's entry in the passwd file. - * @return The user's real name. - */ -std::string get_real_name(); - -/** Gets the current user's home directory. - * @return The current user's home directory or an empty string if not defined. - */ -std::string get_home_dir(); - -/** Gets the directory to use for temporary files. - * This is found from inspecting the environment variables TMPDIR, - * TMP, and TEMP in that order. If none of those are defined - * "/tmp" is returned on UNIX and "C:\\" on Windows. - * @return The directory to use for temporary files. - */ -std::string get_tmp_dir(); - -/** Gets the current directory. - * @return The current directory. - */ -std::string get_current_dir(); - -//TODO: We could create a C++ enum to wrap the C GUserDirectory enum, -//but we would have to either be very careful, or define the enum -//values in terms of the C enums anyway. -/** Returns the full path of a special directory using its logical id. - * - * On Unix this is done using the XDG special user directories. - * - * Depending on the platform, the user might be able to change the path - * of the special directory without requiring the session to restart; GLib - * will not reflect any change once the special directories are loaded. - * - * Return value: the path to the specified special directory. - * @param directory Te logical id of special directory - * - * @newin2p14 - */ -std::string get_user_special_dir(GUserDirectory directory); - -/** Returns a base directory in which to access application data such as icons - * that is customized for a particular user. - * - * On UNIX platforms this is determined using the mechanisms described in the - * XDG Base Directory Specification - * - * @newin2p14 - */ -std::string get_user_data_dir(); - -/** Returns a base directory in which to store user-specific application - * configuration information such as user preferences and settings. - * - * On UNIX platforms this is determined using the mechanisms described in the - * XDG Base Directory Specification - * - * @newin2p14 - */ -std::string get_user_config_dir(); - -/** Returns a base directory in which to store non-essential, cached data - * specific to particular user. - * - * On UNIX platforms this is determined using the mechanisms described in the - * XDG Base Directory Specification - * - * @newin2p14 - */ -std::string get_user_cache_dir(); - -/** Returns @c true if the given @a filename is an absolute file name, i.e.\ it - * contains a full path from the root directory such as "/usr/local" - * on UNIX or "C:\\windows" on Windows systems. - * @param filename A file name. - * @return Whether @a filename is an absolute path. - */ -bool path_is_absolute(const std::string& filename); - -/** Returns the remaining part of @a filename after the root component, - * i.e.\ after the "/" on UNIX or "C:\\" on Windows. - * If @a filename is not an absolute path, "" will be returned. - * @param filename A file name. - * @return The file name without the root component, or "". - */ -std::string path_skip_root(const std::string& filename); - -/** Gets the name of the file without any leading directory components. - * @param filename The name of the file. - * @return The name of the file without any leading directory components. - */ -std::string path_get_basename(const std::string& filename); - -/** Gets the directory components of a file name. - * If the file name has no directory components "." is returned. - * @param filename The name of the file. - * @return The directory components of the file. - */ -std::string path_get_dirname(const std::string& filename); - -/** Creates a filename from a series of elements using the correct - * separator for filenames. - * This function behaves identically to Glib::build_path(G_DIR_SEPARATOR_S, - * elements). No attempt is made to force the resulting filename to be an - * absolute path. If the first element is a relative path, the result will - * be a relative path. - * @param elements A container holding the elements of the path to build. - * Any STL compatible container type is accepted. - * @return The resulting path. - */ -std::string build_filename(const Glib::ArrayHandle& elements); - -/** Creates a filename from two elements using the correct separator for filenames. - * No attempt is made to force the resulting filename to be an absolute path. - * If the first element is a relative path, the result will be a relative path. - * @param elem1 First path element. - * @param elem2 Second path element. - * @return The resulting path. - */ -std::string build_filename(const std::string& elem1, const std::string& elem2); - -/** Creates a path from a series of elements using @a separator as the - * separator between elements. - * - * At the boundary between two elements, any trailing occurrences of - * @a separator in the first element, or leading occurrences of @a separator - * in the second element are removed and exactly one copy of the separator is - * inserted. - * - * Empty elements are ignored. - * - * The number of leading copies of the separator on the result is - * the same as the number of leading copies of the separator on - * the first non-empty element. - * - * The number of trailing copies of the separator on the result is the same - * as the number of trailing copies of the separator on the last non-empty - * element. (Determination of the number of trailing copies is done without - * stripping leading copies, so if the separator is "ABA", - * "ABABA" has 1 trailing copy.) - * - * However, if there is only a single non-empty element, and there - * are no characters in that element not part of the leading or - * trailing separators, then the result is exactly the original value - * of that element. - * - * Other than for determination of the number of leading and trailing - * copies of the separator, elements consisting only of copies - * of the separator are ignored. - * - * @param separator A string used to separate the elements of the path. - * @param elements A container holding the elements of the path to build. - * Any STL compatible container type is accepted. - * @return The resulting path. - */ -std::string build_path(const std::string& separator, - const Glib::ArrayHandle& elements); - -/** Locates the first executable named @a program in the user's path, in the - * same way that execvp() would locate it. - * Returns a string with the absolute path name, or "" if the program - * is not found in the path. If @a program is already an absolute path, - * returns a copy of @a program if @a program exists and is executable, and - * "" otherwise. - * - * On Windows, if @a program does not have a file type suffix, tries to append - * the suffixes in the PATHEXT environment variable (if that doesn't - * exist, the suffixes .com, .exe, and .bat) in turn, and then look for the - * resulting file name in the same way as CreateProcess() would. This means - * first in the directory where the program was loaded from, then in the - * current directory, then in the Windows 32-bit system directory, then in the - * Windows directory, and finally in the directories in the PATH - * environment variable. If the program is found, the return value contains - * the full name including the type suffix. - * - * @param program A program name. - * @return An absolute path, or "". - */ -std::string find_program_in_path(const std::string& program); - -/** @} group MiscUtils */ - -} // namespace Glib - - -#endif /* _GLIBMM_FILEUTILS_H */ - diff --git a/libs/glibmm2/glib/glibmm/module.cc b/libs/glibmm2/glib/glibmm/module.cc deleted file mode 100644 index 6fe92b897e..0000000000 --- a/libs/glibmm2/glib/glibmm/module.cc +++ /dev/null @@ -1,96 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: module.ccg,v 1.2 2004/04/09 14:49:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -namespace Glib -{ - -Module::Module(const std::string& file_name, ModuleFlags flags) -: - gobject_ (g_module_open(file_name.c_str(), (GModuleFlags) flags)) -{} - -Module::~Module() -{ - if(gobject_) - g_module_close(gobject_); -} - -Module::operator bool() const -{ - return (gobject_ != 0); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -namespace Glib -{ - - -bool Module::get_supported() -{ - return g_module_supported(); -} - - -void Module::make_resident() -{ -g_module_make_resident(gobj()); -} - -std::string Module::get_last_error() -{ - return Glib::convert_const_gchar_ptr_to_stdstring(g_module_error()); -} - - -bool Module::get_symbol(const std::string& symbol_name, void*& symbol) const -{ - return g_module_symbol(const_cast(gobj()), symbol_name.c_str(), &(symbol)); -} - -std::string Module::get_name() const -{ - return Glib::convert_const_gchar_ptr_to_stdstring(g_module_name(const_cast(gobj()))); -} - -std::string Module::build_path(const std::string& directory, const std::string& module_name) -{ - return Glib::convert_return_gchar_ptr_to_stdstring(g_module_build_path(directory.c_str(), module_name.c_str())); -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/module.h b/libs/glibmm2/glib/glibmm/module.h deleted file mode 100644 index b7386fb498..0000000000 --- a/libs/glibmm2/glib/glibmm/module.h +++ /dev/null @@ -1,222 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_MODULE_H -#define _GLIBMM_MODULE_H - - -/* $Id: module.hg,v 1.5 2004/04/09 14:49:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include - -GLIBMM_USING_STD(string) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GModule GModule; } -#endif - - -namespace Glib -{ - -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %ModuleFlags operator|(ModuleFlags, ModuleFlags)
- * %ModuleFlags operator&(ModuleFlags, ModuleFlags)
- * %ModuleFlags operator^(ModuleFlags, ModuleFlags)
- * %ModuleFlags operator~(ModuleFlags)
- * %ModuleFlags& operator|=(ModuleFlags&, ModuleFlags)
- * %ModuleFlags& operator&=(ModuleFlags&, ModuleFlags)
- * %ModuleFlags& operator^=(ModuleFlags&, ModuleFlags)
- */ -enum ModuleFlags -{ - MODULE_BIND_LAZY = 1 << 0, - MODULE_BIND_LOCAL = 1 << 1, - MODULE_BIND_MASK = 0x03 -}; - -/** @ingroup glibmmEnums */ -inline ModuleFlags operator|(ModuleFlags lhs, ModuleFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline ModuleFlags operator&(ModuleFlags lhs, ModuleFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline ModuleFlags operator^(ModuleFlags lhs, ModuleFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline ModuleFlags operator~(ModuleFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline ModuleFlags& operator|=(ModuleFlags& lhs, ModuleFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline ModuleFlags& operator&=(ModuleFlags& lhs, ModuleFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline ModuleFlags& operator^=(ModuleFlags& lhs, ModuleFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -//TODO: Replace get_last_error() with exceptions? -//Provide operator()? - -/** Dynamic Loading of Modules - * These functions provide a portable way to dynamically load object - * files (commonly known as 'plug-ins'). The current implementation - * supports all systems that provide an implementation of dlopen() - * (e.g. Linux/Sun), as well as HP-UX via its shl_load() mechanism, - * and Windows platforms via DLLs. - */ -class Module -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef Module CppObjectType; - typedef GModule BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: - - -public: - - /** Opens a module. - * - * First of all it tries to open file_name as a module. If that - * fails and file_name has the ".la"-suffix (and is a libtool - * archive) it tries to open the corresponding module. If that fails - * and it doesn't have the proper module suffix for the platform - * (G_MODULE_SUFFIX), this suffix will be appended and the - * corresponding module will be opended. If that fails and file_name - * doesn't have the ".la"-suffix, this suffix is appended and - * it tries to open the corresponding module. - * - * Use operator bool() to see whether the operation succeeded. For instance, - * @code - * Glib::Module module("plugins/helloworld"); - * if(module) - * { - * void* func = 0; - * bool found = get_symbol("some_function", func); - * } - * @endcode - * - * @param file_name The library filename to open - * @param flags Flags to configure the load process - */ - explicit Module(const std::string& file_name, ModuleFlags flags = ModuleFlags(0)); - - /** Close a module. The module will be removed from memory, unless - * make_resident has been called. - */ - virtual ~Module(); - - /** Check whether the module was found. - */ - operator bool() const; - - /** Checks if modules are supported on the current platform. - * @returns true if available, false otherwise - */ - - static bool get_supported(); - - /** Ensures that a module will never be unloaded. Any calls to the - * Glib::Module destructor will not unload the module. - */ - - void make_resident(); - - /** Gets a string describing the last module error. - * @returns The error string - */ - - static std::string get_last_error(); - - /** Gets a symbol pointer from the module. - * @param symbol_name The name of the symbol to lookup - * @param symbol A pointer to set to the symbol - * @returns True if the symbol was found, false otherwise. - */ - - bool get_symbol(const std::string& symbol_name, void*& symbol) const; - - /** Get the name of the module. - * @returns The name of the module - */ - - std::string get_name() const; - - /** A portable way to build the filename of a module. The - * platform-specific prefix and suffix are added to the filename, if - * needed, and the result is added to the directory, using the - * correct separator character. - * - * The directory should specify the directory where the module can - * be found. It can be an empty string to indicate that the - * module is in a standard platform-specific directory, though this - * is not recommended since the wrong module may be found. - * - * For example, calling g_module_build_path() on a Linux - * system with a directory of /lib and a module_name of - * "mylibrary" will return /lib/libmylibrary.so. On a - * Windows system, using \\Windows as the directory it will - * return \\Windows\\mylibrary.dll. - * - * @param directory The directory the module is in - * @param module_name The name of the module - * @returns The system-specific filename of the module - */ - // TODO: add an override which doesn't take a directory - // TODO: check what happens when directory is "" - - static std::string build_path(const std::string& directory, const std::string& module_name); - - GModule* gobj() { return gobject_; } - const GModule* gobj() const { return gobject_; } - -protected: - GModule* gobject_; - -private: - // noncopyable - Module(const Module&); - Module& operator=(const Module&); - - -}; - -} // namespace Glib - - -#endif /* _GLIBMM_MODULE_H */ - diff --git a/libs/glibmm2/glib/glibmm/object.cc b/libs/glibmm2/glib/glibmm/object.cc deleted file mode 100644 index 8f616200a7..0000000000 --- a/libs/glibmm2/glib/glibmm/object.cc +++ /dev/null @@ -1,312 +0,0 @@ -// -*- c++ -*- -/* $Id: object.cc 369 2007-01-20 10:19:33Z daniel $ */ - -/* Copyright 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -#include -#include -#include - -#include - -//Weak references: -//I'm not sure what the point of these are apart from being a hacky way out of circular references, -//but maybe we could make it easier to use them by making a Java Reference Object -style class like so: -// Glib::WeakRef weakrefSomeObject(object1); -// ... -// if(weakrefSomeObject->isStillAlive()) -// { -// weakrefSomeObject->some_method(); -// } -// else -// { -// //Deal with it, maybe recreating the object. -// } -// -// Without this, the coder has to define his own signal handler which sets his own isStillAlive boolean. -// weakrefSomeObject<> could still have its own signal_destroyed signal so that coders can choose to deal -// with the destruction as soon as it happens instead of just checking later before they try to use it. - - -namespace Glib -{ - -ConstructParams::ConstructParams(const Glib::Class& glibmm_class_) -: - glibmm_class (glibmm_class_), - n_parameters (0), - parameters (0) -{} - -/* - * The implementation is mostly copied from gobject.c, with some minor tweaks. - * Basically, it looks up each property name to get its GType, and then uses - * G_VALUE_COLLECT() to store the varargs argument in a GValue of the correct - * type. - * - * Note that the property name arguments are assumed to be static string - * literals. No attempt is made to copy the string content. This is no - * different from g_object_new(). - */ -ConstructParams::ConstructParams(const Glib::Class& glibmm_class_, - const char* first_property_name, ...) -: - glibmm_class (glibmm_class_), - n_parameters (0), - parameters (0) -{ - va_list var_args; - va_start(var_args, first_property_name); - - GObjectClass *const g_class = - static_cast(g_type_class_ref(glibmm_class.get_type())); - - unsigned int n_alloced_params = 0; - char* collect_error = 0; // output argument of G_VALUE_COLLECT() - - for(const char* name = first_property_name; - name != 0; - name = va_arg(var_args, char*)) - { - GParamSpec *const pspec = g_object_class_find_property(g_class, name); - - if(!pspec) - { - g_warning("Glib::ConstructParams::ConstructParams(): " - "object class \"%s\" has no property named \"%s\"", - g_type_name(glibmm_class.get_type()), name); - break; - } - - if(n_parameters >= n_alloced_params) - parameters = g_renew(GParameter, parameters, n_alloced_params += 8); - - GParameter& param = parameters[n_parameters]; - - param.name = name; - param.value.g_type = 0; - - // Fill the GValue with the current vararg, and move on to the next one. - g_value_init(¶m.value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - G_VALUE_COLLECT(¶m.value, var_args, 0, &collect_error); - - if(collect_error) - { - g_warning("Glib::ConstructParams::ConstructParams(): %s", collect_error); - g_free(collect_error); - g_value_unset(¶m.value); - break; - } - - ++n_parameters; - } - - g_type_class_unref(g_class); - - va_end(var_args); -} - -ConstructParams::~ConstructParams() -{ - while(n_parameters > 0) - g_value_unset(¶meters[--n_parameters].value); - - g_free(parameters); -} - -/* - * Some compilers require the existence of a copy constructor in certain - * usage contexts. This implementation is fully functional, but unlikely - * to be ever actually called due to optimization. - */ -ConstructParams::ConstructParams(const ConstructParams& other) -: - glibmm_class (other.glibmm_class), - n_parameters (other.n_parameters), - parameters (g_new(GParameter, n_parameters)) -{ - for(unsigned int i = 0; i < n_parameters; ++i) - { - parameters[i].name = other.parameters[i].name; - parameters[i].value.g_type = 0; - - g_value_init(¶meters[i].value, G_VALUE_TYPE(&other.parameters[i].value)); - g_value_copy(&other.parameters[i].value, ¶meters[i].value); - } -} - - -/**** Glib::Object_Class ***************************************************/ - -const Glib::Class& Object_Class::init() -{ - if(!gtype_) - { - class_init_func_ = &Object_Class::class_init_function; - register_derived_type(G_TYPE_OBJECT); - } - - return *this; -} - -void Object_Class::class_init_function(void*, void*) -{} - -Object* Object_Class::wrap_new(GObject* object) -{ - return new Object(object); -} - - -/**** Glib::Object *********************************************************/ - -// static data -Object::CppClassType Object::object_class_; - -Object::Object() -{ - // This constructor is ONLY for derived classes that are NOT wrappers of - // derived C objects. For instance, Gtk::Object should NOT use this - // constructor. - - //g_warning("Object::Object(): Did you really mean to call this?"); - - // If Glib::ObjectBase has been constructed with a custom typeid, we derive - // a new GType on the fly. This works because ObjectBase is a virtual base - // class, therefore its constructor is always executed first. - - GType object_type = G_TYPE_OBJECT; // the default -- not very useful - - if(custom_type_name_ && !is_anonymous_custom_()) - { - object_class_.init(); - // This creates a type that is derived (indirectly) from GObject. - object_type = object_class_.clone_custom_type(custom_type_name_); - } - - void *const new_object = g_object_newv(object_type, 0, 0); - - // Connect the GObject and Glib::Object instances. - ObjectBase::initialize(static_cast(new_object)); - -} - -Object::Object(const Glib::ConstructParams& construct_params) -{ - GType object_type = construct_params.glibmm_class.get_type(); - - // If Glib::ObjectBase has been constructed with a custom typeid, we derive - // a new GType on the fly. This works because ObjectBase is a virtual base - // class, therefore its constructor is always executed first. - - if(custom_type_name_ && !is_anonymous_custom_()) - object_type = construct_params.glibmm_class.clone_custom_type(custom_type_name_); - - // Create a new GObject with the specified array of construct properties. - // This works with custom types too, since those inherit the properties of - // their base class. - - void *const new_object = g_object_newv( - object_type, construct_params.n_parameters, construct_params.parameters); - - // Connect the GObject and Glib::Object instances. - ObjectBase::initialize(static_cast(new_object)); -} - -Object::Object(GObject* castitem) -{ - //I disabled this check because libglademm really does need to do this. - //(actually it tells libglade to instantiate "gtkmm_" types. - //The 2nd instance bug will be caught elsewhere anyway. -/* - static const char gtkmm_prefix[] = "gtkmm__"; - const char *const type_name = G_OBJECT_TYPE_NAME(castitem); - - if(strncmp(type_name, gtkmm_prefix, sizeof(gtkmm_prefix) - 1) == 0) - { - g_warning("Glib::Object::Object(GObject*): " - "An object of type '%s' was created directly via g_object_new(). " - "The Object::Object(const Glib::ConstructParams&) constructor " - "should be used instead.\n" - "This could happen if the C instance lived longer than the C++ instance, so that " - "a second C++ instance was created automatically to wrap it. That would be a gtkmm bug that you should report.", - type_name); - } -*/ - - // Connect the GObject and Glib::Object instances. - ObjectBase::initialize(castitem); -} - -Object::~Object() -{ - cpp_destruction_in_progress_ = true; -} - -/* -RefPtr Object::create() -{ - // Derived classes will actually return RefPtr<>s that contain useful instances. - return RefPtr(); -} -*/ - -GType Object::get_type() -{ - return object_class_.init().get_type(); -} - -GType Object::get_base_type() -{ - return G_TYPE_OBJECT; -} - -// Data services -void* Object::get_data(const QueryQuark& id) -{ - return g_object_get_qdata(gobj(),id); -} - -void Object::set_data(const Quark& id, void* data) -{ - g_object_set_qdata(gobj(),id,data); -} - -void Object::set_data(const Quark& id, void* data, DestroyNotify destroy) -{ - g_object_set_qdata_full(gobj(), id, data, destroy); -} - -void Object::remove_data(const QueryQuark& id) -{ - // missing in glib?? - g_return_if_fail(id.id() > 0); - g_datalist_id_remove_data(&gobj()->qdata, id); -} - -void* Object::steal_data(const QueryQuark& id) -{ - return g_object_steal_qdata(gobj(), id); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/object.h b/libs/glibmm2/glib/glibmm/object.h deleted file mode 100644 index a44300d464..0000000000 --- a/libs/glibmm2/glib/glibmm/object.h +++ /dev/null @@ -1,292 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_OBJECT_H -#define _GLIBMM_OBJECT_H -/* $Id: object.h 369 2007-01-20 10:19:33Z daniel $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -//X11 defines DestroyNotify and some other non-prefixed stuff, and it's too late to change that now, -//so let's give people a clue about the compilation errors that they will see: -#ifdef DestroyNotify -# error "X11/Xlib.h seems to have been included before this header. Due to some commonly-named macros in X11/Xlib.h, it may only be included after any glibmm, gdkmm, or gtkmm headers." -#endif - -#include /* for G_GNUC_NULL_TERMINATED */ -#include -#include -#include -#include -#include /* Could be private, but that would be tedious. */ -#include /* Because its specializations may be here. */ -#include - -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" -{ -typedef struct _GObject GObject; -typedef struct _GObjectClass GObjectClass; -} -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -class Class; -class Object_Class; -class GSigConnectionNode; - -/* ConstructParams::ConstructParams() takes a varargs list of properties - * and values, like g_object_new() does. This list will then be converted - * to a GParameter array, for use with g_object_newv(). No overhead is - * involved, since g_object_new() is just a wrapper around g_object_newv() - * as well. - * - * The advantage of an auxiliary ConstructParams object over g_object_new() - * is that the actual construction is always done in the Glib::Object ctor. - * This allows for neat tricks like easy creation of derived custom types, - * without adding special support to each ctor of every class. - * - * The comments in object.cc and objectbase.cc should explain in detail - * how this works. - */ -class ConstructParams -{ -public: - const Glib::Class& glibmm_class; - unsigned int n_parameters; - GParameter* parameters; - - explicit ConstructParams(const Glib::Class& glibmm_class_); - ConstructParams(const Glib::Class& glibmm_class_, const char* first_property_name, ...) - G_GNUC_NULL_TERMINATED; // warn if called without a trailing NULL pointer - ~ConstructParams(); - - // The copy constructor is semantically required by the C++ compiler - // (since g++ 3.4) to be able to create temporary instances, depending - // on the usage context. Apparently the compiler will actually optimize - // away the copy, though. See bug #132300. - ConstructParams(const ConstructParams& other); - -private: - // no copy assignment - ConstructParams& operator=(const ConstructParams&); -}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -class GLIBMM_API Object : virtual public ObjectBase -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef Object CppObjectType; - typedef Object_Class CppClassType; - typedef GObject BaseObjectType; - typedef GObjectClass BaseClassType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -protected: - Object(); //For use by C++-only sub-types. - explicit Object(const Glib::ConstructParams& construct_params); - explicit Object(GObject* castitem); - virtual ~Object(); //It should only be deleted by the callback. - -public: - //static RefPtr create(); //You must reimplement this in each derived class. - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static GType get_type() G_GNUC_CONST; - static GType get_base_type() G_GNUC_CONST; -#endif - - //GObject* gobj_copy(); //Give a ref-ed copy to someone. Use for direct struct access. - - // Glib::Objects contain a list > - // to store run time data added to the object at run time. - //TODO: Use slots instead: - void* get_data(const QueryQuark &key); - void set_data(const Quark &key, void* data); - typedef void (*DestroyNotify) (gpointer data); - void set_data(const Quark &key, void* data, DestroyNotify notify); - void remove_data(const QueryQuark& quark); - // same as remove without notifying - void* steal_data(const QueryQuark& quark); - - // convenience functions - //template - //void set_data_typed(const Quark& quark, const T& data) - // { set_data(quark, new T(data), delete_typed); } - - //template - //T& get_data_typed(const QueryQuark& quark) - // { return *static_cast(get_data(quark)); } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -private: - friend class Glib::Object_Class; - static CppClassType object_class_; - - // noncopyable - Object(const Object&); - Object& operator=(const Object&); - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - // Glib::Object can not be dynamic because it lacks a float state. - //virtual void set_manage(); -}; - - -//For some (proably, more spec-compliant) compilers, these specializations must -//be next to the objects that they use. -#ifndef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION -# ifndef DOXYGEN_SHOULD_SKIP_THIS /* hide the specializations */ - -namespace Container_Helpers -{ - -/** Partial specialization for pointers to GObject instances. - * @ingroup ContHelpers - * The C++ type is always a Glib::RefPtr<>. - */ -template -struct TypeTraits< Glib::RefPtr > -{ - typedef Glib::RefPtr CppType; - typedef typename T::BaseObjectType * CType; - typedef typename T::BaseObjectType * CTypeNonConst; - - static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); } - static CType to_c_type (CType ptr) { return ptr; } - static CppType to_cpp_type(CType ptr) - { - //return Glib::wrap(ptr, true); - - //We copy/paste the wrap() implementation here, - //because we can not use a specific Glib::wrap(CType) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = (GObject*)const_cast(ptr); - return Glib::RefPtr( dynamic_cast(Glib::wrap_auto(cobj, true /* take_copy */)) ); - //We use dynamic_cast<> in case of multiple inheritance. - } - - static void release_c_type(CType ptr) - { - GLIBMM_DEBUG_UNREFERENCE(0, ptr); - g_object_unref(ptr); - } -}; - -//This confuses the SUN Forte compiler, so we ifdef it out: -# ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -/** Partial specialization for pointers to const GObject instances. - * @ingroup ContHelpers - * The C++ type is always a Glib::RefPtr<>. - */ -template -struct TypeTraits< Glib::RefPtr > -{ - typedef Glib::RefPtr CppType; - typedef const typename T::BaseObjectType * CType; - typedef typename T::BaseObjectType * CTypeNonConst; - - static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); } - static CType to_c_type (CType ptr) { return ptr; } - static CppType to_cpp_type(CType ptr) - { - //return Glib::wrap(ptr, true); - - //We copy/paste the wrap() implementation here, - //because we can not use a specific Glib::wrap(CType) overload here, - //because that would be "dependent", and g++ 3.4 does not allow that. - //The specific Glib::wrap() overloads don't do anything special anyway. - GObject* cobj = (GObject*)(ptr); - return Glib::RefPtr( dynamic_cast(Glib::wrap_auto(cobj, true /* take_copy */)) ); - //We use dynamic_cast<> in case of multiple inheritance. - } - - static void release_c_type (CType ptr) - { - GLIBMM_DEBUG_UNREFERENCE(0, ptr); - g_object_unref(const_cast(ptr)); - } -}; - -# endif /* GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS */ - -} //namespace Container_Helpers - - -template inline -PtrT Value_Pointer::get_(Glib::Object*) const -{ - return dynamic_cast(get_object()); -} - - -/** Partial specialization for RefPtr<> to Glib::Object. - * @ingroup glibmmValue - */ -template -class Value< Glib::RefPtr > : public ValueBase_Object -{ -public: - typedef Glib::RefPtr CppType; - typedef typename T::BaseObjectType* CType; - - static GType value_type() { return T::get_base_type(); } - - void set(const CppType& data) { set_object(data.operator->()); } - CppType get() const { return Glib::RefPtr::cast_dynamic(get_object_copy()); } -}; - -//The SUN Forte Compiler has a problem with this: -# ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -/** Partial specialization for RefPtr<> to const Glib::Object. - * @ingroup glibmmValue - */ -template -class Value< Glib::RefPtr > : public ValueBase_Object -{ -public: - typedef Glib::RefPtr CppType; - typedef typename T::BaseObjectType* CType; - - static GType value_type() { return T::get_base_type(); } - - void set(const CppType& data) { set_object(const_cast(data.operator->())); } - CppType get() const { return Glib::RefPtr::cast_dynamic(get_object_copy()); } -}; -# endif /* GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS */ - -# endif /* DOXYGEN_SHOULD_SKIP_THIS */ -#endif /* GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION */ - -} // namespace Glib - -#endif /* _GLIBMM_OBJECT_H */ - diff --git a/libs/glibmm2/glib/glibmm/objectbase.cc b/libs/glibmm2/glib/glibmm/objectbase.cc deleted file mode 100644 index 237c41fed3..0000000000 --- a/libs/glibmm2/glib/glibmm/objectbase.cc +++ /dev/null @@ -1,289 +0,0 @@ -// -*- c++ -*- -/* $Id: objectbase.cc 337 2006-11-10 02:24:49Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#include -#include -#include //For PropertyProxyConnectionNode - - -namespace -{ - -// Used by the Glib::ObjectBase default ctor. Using an explicitly defined -// char array rather than a string literal allows for fast pointer comparison, -// which is otherwise not guaranteed to work. - -static const char anonymous_custom_type_name[] = "gtkmm__anonymous_custom_type"; - -} // anonymous namespace - - -namespace Glib -{ - -/**** Glib::ObjectBase *****************************************************/ - -ObjectBase::ObjectBase() -: - gobject_ (0), - custom_type_name_ (anonymous_custom_type_name), - cpp_destruction_in_progress_ (false) -{} - -ObjectBase::ObjectBase(const char* custom_type_name) -: - gobject_ (0), - custom_type_name_ (custom_type_name), - cpp_destruction_in_progress_ (false) -{} - -ObjectBase::ObjectBase(const std::type_info& custom_type_info) -: - gobject_ (0), - custom_type_name_ (custom_type_info.name()), - cpp_destruction_in_progress_ (false) -{} - -// initialize() actually initializes the wrapper. Glib::ObjectBase is used -// as virtual base class, which means the most-derived class' ctor invokes -// the Glib::ObjectBase ctor -- thus it's useless for Glib::Object. -// -void ObjectBase::initialize(GObject* castitem) -{ - if(gobject_) - { - // initialize() might be called twice when used with MI, e.g. by the ctors - // of Glib::Object and Glib::Interface. However, they must both refer to - // the same underlying GObject instance. - // - g_assert(gobject_ == castitem); - - // TODO: Think about it. Will this really be called twice? - g_printerr("ObjectBase::initialize() called twice for the same GObject\n"); - - return; // Don't initialize the wrapper twice. - } - - //g_print("%s : %s\n", G_GNUC_PRETTY_FUNCTION, G_OBJECT_TYPE_NAME(castitem)); - - gobject_ = castitem; - _set_current_wrapper(castitem); -} - -ObjectBase::~ObjectBase() -{ - // Normally, gobject_ should always be 0 at this point, because: - // - // a) Gtk::Object handles memory management on its own and always resets - // the gobject_ pointer in its destructor. - // - // b) Glib::Object instances that aren't Gtk::Objects will always be - // deleted by the destroy_notify_() virtual method. Calling delete - // on a Glib::Object is a programming error. - // - // The *only* situation where gobject_ is validly not 0 at this point - // happens if a derived class's ctor throws an exception. In that case - // we have to call g_object_unref() on our own. - // - if(GObject *const gobject = gobject_) - { -#ifdef GLIBMM_DEBUG_REFCOUNTING - g_warning("(Glib::ObjectBase::~ObjectBase): gobject_ = %p", (void*) gobject_); -#endif - - gobject_ = 0; - -#ifdef GLIBMM_DEBUG_REFCOUNTING - g_warning("(Glib::ObjectBase::~ObjectBase): before g_object_steal_qdata()"); -#endif - - // Remove the pointer to the wrapper from the underlying instance. - // This does _not_ cause invocation of the destroy_notify callback. - g_object_steal_qdata(gobject, quark_); - -#ifdef GLIBMM_DEBUG_REFCOUNTING - g_warning("(Glib::ObjectBase::~ObjectBase): calling g_object_unref()"); -#endif - - g_object_unref(gobject); - } -} - -void ObjectBase::reference() const -{ - GLIBMM_DEBUG_REFERENCE(this, gobject_); - g_object_ref(gobject_); -} - -void ObjectBase::unreference() const -{ - GLIBMM_DEBUG_UNREFERENCE(this, gobject_); - g_object_unref(gobject_); -} - -GObject* ObjectBase::gobj_copy() const -{ - reference(); - return gobject_; -} - -void ObjectBase::_set_current_wrapper(GObject* object) -{ - // Store a pointer to this wrapper in the underlying instance, so that we - // never create a second wrapper for the same underlying instance. Also, - // specify a callback that will tell us when it's time to delete this C++ - // wrapper instance: - - if(object) - { - if(!g_object_get_qdata(object, Glib::quark_)) - { - g_object_set_qdata_full(object, Glib::quark_, this, &destroy_notify_callback_); - } - else - { - g_warning("This object, of type %s, already has a wrapper.\n" - "You should use wrap() instead of a constructor.", - G_OBJECT_TYPE_NAME(object)); - } - } -} - -// static -ObjectBase* ObjectBase::_get_current_wrapper(GObject* object) -{ - if(object) - return static_cast(g_object_get_qdata(object, Glib::quark_)); - else - return 0; -} - -// static -void ObjectBase::destroy_notify_callback_(void* data) -{ - //GLIBMM_LIFECYCLE - - // This method is called (indirectly) from g_object_run_dispose(). - // Get the C++ instance associated with the C instance: - ObjectBase* cppObject = static_cast(data); //Previously set with g_object_set_qdata_full(). - -#ifdef GLIBMM_DEBUG_REFCOUNTING - g_warning("ObjectBase::destroy_notify_callback_: cppObject = %p, gobject_ = %p, gtypename = %s", - (void*) cppObject, (void*) cppObject->gobject_, cppObject->gobject_); -#endif - - if(cppObject) //This will be 0 if the C++ destructor has already run. - { - cppObject->destroy_notify_(); //Virtual - it does different things for GObject and GtkObject. - } -} - -void ObjectBase::destroy_notify_() -{ - // The C instance is about to be disposed, making it unusable. Now is a - // good time to delete the C++ wrapper of the C instance. There is no way - // to force the disposal of the GObject (though GtkObject has - // gtk_object_destroy()), So this is the *only* place where we delete the - // C++ wrapper. - // - // This will only happen after the last unreference(), which will be done by - // the RefPtr<> destructor. There should be no way to access the wrapper or - // the undobjecterlying instance after that, so it's OK to delete this. - -#ifdef GLIBMM_DEBUG_REFCOUNTING - g_warning("Glib::ObjectBase::destroy_notify_: gobject_ = %p", (void*) gobject_); -#endif - - gobject_ = 0; // Make sure we don't unref it again in the dtor. - - delete this; -} - -bool ObjectBase::is_anonymous_custom_() const -{ - // Doing high-speed pointer comparison is OK here. - return (custom_type_name_ == anonymous_custom_type_name); -} - -bool ObjectBase::is_derived_() const -{ - // gtkmmproc-generated classes initialize this to 0 by default. - return (custom_type_name_ != 0); -} - -void ObjectBase::set_manage() -{ - // This is a private method and Gtk::manage() is a template function. - // Thus this will probably never run, unless you do something like: - // - // manage(static_cast(refptr.operator->())); - - g_error("Glib::ObjectBase::set_manage(): " - "only Gtk::Object instances can be managed"); -} - -bool ObjectBase::_cpp_destruction_is_in_progress() const -{ - return cpp_destruction_in_progress_; -} - -void ObjectBase::set_property_value(const Glib::ustring& property_name, const Glib::ValueBase& value) -{ - g_object_set_property(gobj(), property_name.c_str(), value.gobj()); -} - -void ObjectBase::get_property_value(const Glib::ustring& property_name, Glib::ValueBase& value) const -{ - g_object_get_property(const_cast(gobj()), property_name.c_str(), value.gobj()); -} - -void ObjectBase::connect_property_changed(const Glib::ustring& property_name, const sigc::slot& slot) -{ - // Create a proxy to hold our connection info - // This will be deleted by destroy_notify_handler. - PropertyProxyConnectionNode* pConnectionNode = new PropertyProxyConnectionNode(slot, gobj()); - - // connect it to gtk+ - // pConnectionNode will be passed as the data argument to the callback. - // The callback will then call the virtual Object::property_change_notify() method, - // which will contain a switch/case statement which will examine the property name. - const Glib::ustring notify_signal_name = "notify::" + property_name; - pConnectionNode->connection_id_ = g_signal_connect_data(gobj(), - notify_signal_name.c_str(), (GCallback)(&PropertyProxyConnectionNode::callback), pConnectionNode, - &PropertyProxyConnectionNode::destroy_notify_handler, - G_CONNECT_AFTER); -} - - -bool _gobject_cppinstance_already_deleted(GObject* gobject) -{ - //This function is used to prevent calling wrap() on a GTK+ instance whose gtkmm instance has been deleted. - - if(gobject) - return (bool)g_object_get_qdata(gobject, Glib::quark_cpp_wrapper_deleted_); //true means that something is odd. - else - return false; //Nothing is particularly wrong. -} - - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/objectbase.h b/libs/glibmm2/glib/glibmm/objectbase.h deleted file mode 100644 index 623726bd7f..0000000000 --- a/libs/glibmm2/glib/glibmm/objectbase.h +++ /dev/null @@ -1,234 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_OBJECTBASE_H -#define _GLIBMM_OBJECTBASE_H - -/* $Id: objectbase.h 385 2007-03-23 17:23:42Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -GLIBMM_USING_STD(type_info) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GObject GObject; } -#endif - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class GSigConnectionNode; -#endif - -//This inherits virtually from sigc::trackable so that people can multiply inherit glibmm classes from other sigc::trackable-derived classes. -//See bugzilla.gnome.org bug # 116280 -/** Glib::ObjectBase is a common base class for Objects and Interfaces. - * - * This is used as virtual base class. This means the ObjectBase - * constructor runs before all others, either implicitly or explicitly. Each of - * the available constructors initializes custom_type_name_ in a different way. - */ -class GLIBMM_API ObjectBase : virtual public sigc::trackable -{ -protected: - /** This default constructor is called implicitly from the constructor of user-derived - * classes, even if, for instance, Gtk::Button calls a different ObjectBase constructor. - * This is normal behaviour for C++ virtual inheritance. - * - * The GType name will be gtkmm__anonymous_custom_type. - */ - ObjectBase(); - - /** A derived constructor always overrides this choice. - * The C++ language itself ensures that the constructor - * is only invoked once. - * - * All classes generated by gtkmmproc use this constructor, with custom_type_name = 0, - * which essentially means it's not a custom type. This is used to optimize - * vfunc and signal handler callbacks -- since the C++ virtual methods are - * not overridden, invocation can be skipped. - * - * The GType name will be @a custom_type_name. - */ - explicit ObjectBase(const char* custom_type_name); - - /** This constructor is a special feature to allow creation of derived types on the - * fly, without having to use g_object_new() manually. This feature is - * sometimes necessary, e.g. to implement a custom Gtk::CellRenderer. The - * neat trick with the virtual base class ctor makes it possible to reuse - * the same direct base class' constructor as with non-custom types. - * - * The GType name will be @a custom_type_info.name(). - */ - explicit ObjectBase(const std::type_info& custom_type_info); - - virtual ~ObjectBase() = 0; - - // Called by Glib::Object and Glib::Interface constructors. See comments there. - void initialize(GObject* castitem); - -public: - - /// You probably want to use a specific property_*() accessor method instead. - void set_property_value(const Glib::ustring& property_name, const Glib::ValueBase& value); - - /// You probably want to use a specific property_*() accessor method instead. - void get_property_value(const Glib::ustring& property_name, Glib::ValueBase& value) const; - - /// You probably want to use a specific property_*() accessor method instead. - template - void set_property(const Glib::ustring& property_name, const PropertyType& value); - - /// You probably want to use a specific property_*() accessor method instead. - template - void get_property(const Glib::ustring& property_name, PropertyType& value) const; - - /** You can use the signal_changed() signal of the property proxy instead, - * but this is necessary when using the reduced API. - */ - void connect_property_changed(const Glib::ustring& property_name, const sigc::slot& slot); - - /** Increment the reference count for this object. - * You should never need to do this manually - use the object via a RefPtr instead. - */ - virtual void reference() const; - - /** Decrement the reference count for this object. - * You should never need to do this manually - use the object via a RefPtr instead. - */ - virtual void unreference() const; - - ///Provides access to the underlying C GtkObject. - inline GObject* gobj() { return gobject_; } - - ///Provides access to the underlying C GtkObject. - inline const GObject* gobj() const { return gobject_; } - - /// Give a ref-ed copy to someone. Use for direct struct access. - GObject* gobj_copy() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - /// This is for use by gtkmm wrappers only, and not by applications. - static ObjectBase* _get_current_wrapper(GObject* object); //We keep this non-inline version, to preserve ABI. - - // This is commented-out because it's not clear yet whether it's a worthwhile optimization. - /// This is for use by gtkmm wrappers only, and not by applications. - // - //inline static ObjectBase* _get_current_wrapper_inline(GObject* object) - //{ - // // This is what g_object_get_qdata does internally. However, - // // g_object_get_qdata does an addition G_IS_OBJECT(object) check that - // // needs three times as much time as the actual lookup. - // if(object) - // return static_cast(g_datalist_id_get_data(&object->qdata, Glib::quark_)); - // else - // return 0; - //} - - bool _cpp_destruction_is_in_progress() const; -#endif //DOXYGEN_SHOULD_SKIP_THIS - -protected: - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GObject* gobject_; // the GLib/GDK/GTK+ object instance - const char* custom_type_name_; - bool cpp_destruction_in_progress_; - - bool is_anonymous_custom_() const; - -public: // is_derived_() must be public, so that overridden vfuncs and signal handlers can call it via ObjectBase. - - /// This is for use by gtkmm wrappers only, and not by applications. - bool is_derived_() const; //We keep this non-inline version, to preserve ABI. - - //This is commented-out because it's not clear yet whether it's a worthwhile optimization. - // - /// This is for use by gtkmm wrappers only, and not by applications. - //inline bool is_derived_inline_() const - //{ - // return (custom_type_name_ != 0); - //} - -protected: - static void destroy_notify_callback_(void* data); - virtual void destroy_notify_(); - - void _set_current_wrapper(GObject* object); -#endif //DOXYGEN_SHOULD_SKIP_THIS - -private: - // noncopyable - ObjectBase(const ObjectBase&); - ObjectBase& operator=(const ObjectBase&); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - virtual void set_manage(); // calls g_error() -#endif //DOXYGEN_SHOULD_SKIP_THIS - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - friend class Glib::GSigConnectionNode; // for GSigConnectionNode::notify() -#endif -}; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -template inline -void ObjectBase::set_property(const Glib::ustring& property_name, const PropertyType& value) -{ - Glib::Value property_value; - property_value.init(Glib::Value::value_type()); - - property_value.set(value); - this->set_property_value(property_name, property_value); -} - -template inline -void ObjectBase::get_property(const Glib::ustring& property_name, PropertyType& value) const -{ - Glib::Value property_value; - property_value.init(Glib::Value::value_type()); - - this->get_property_value(property_name, property_value); - - value = property_value.get(); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -bool _gobject_cppinstance_already_deleted(GObject* gobject); - -} // namespace Glib - - -#endif /* _GLIBMM_OBJECTBASE_H */ - diff --git a/libs/glibmm2/glib/glibmm/optioncontext.cc b/libs/glibmm2/glib/glibmm/optioncontext.cc deleted file mode 100644 index df6408fc40..0000000000 --- a/libs/glibmm2/glib/glibmm/optioncontext.cc +++ /dev/null @@ -1,226 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: optioncontext.ccg,v 1.4 2004/10/30 14:25:45 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -namespace Glib -{ - - namespace Private - { - static const gchar* SignalProxy_translate_gtk_callback (const gchar* str, gpointer data) - { - Glib::ustring translated_str; - Glib::OptionContext::SlotTranslate* the_slot = - static_cast(data); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { -#endif //GLIBMM_EXCEPTIONS_ENABLED - translated_str = (*the_slot)(str); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } -#endif //GLIBMM_EXCEPTIONS_ENABLED - return translated_str.c_str (); - } - - static void SignalProxy_translate_gtk_callback_destroy (gpointer data) - { - delete static_cast(data); - } - - } //namespace Private - -OptionContext::OptionContext(const Glib::ustring& parameter_string) -: gobject_( g_option_context_new(parameter_string.c_str()) ), - has_ownership_(true) -{ -} - -OptionContext::OptionContext(GOptionContext* castitem, bool take_ownership) -: gobject_(castitem), - has_ownership_(take_ownership) -{ -} - -OptionContext::~OptionContext() -{ - if(has_ownership_) - g_option_context_free(gobj()); - - gobject_ = 0; -} - -void OptionContext::add_group(OptionGroup& group) -{ - //Strangely, GObjectContext actually takes ownership of the GOptionGroup, deleting it later. - g_option_context_add_group(gobj(), (group).gobj_give_ownership()); -} - -void OptionContext::set_main_group(OptionGroup& group) -{ - //Strangely, GObjectContext actually takes ownership of the GOptionGroup, deleting it later. - g_option_context_set_main_group(gobj(), (group).gobj_give_ownership()); -} - - -/* -OptionGroup OptionContext::get_main_group() const -{ - const GOptionGroup* cobj = g_option_context_get_main_group(const_cast( gobj()) ); - OptionGroup cppObj(const_cast(cobj), true); // take_copy - return cppObj; -} - -*/ - -void OptionContext::set_translate_func (const SlotTranslate& slot) -{ - //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. - //It will be deleted when SignalProxy_translate_gtk_callback_destroy() is called. - SlotTranslate* slot_copy = new SlotTranslate(slot); - - g_option_context_set_translate_func( - gobj(), &Private::SignalProxy_translate_gtk_callback, slot_copy, - &Private::SignalProxy_translate_gtk_callback_destroy); -} - -} // namespace Glib - -namespace -{ -} // anonymous namespace - - -Glib::OptionError::OptionError(Glib::OptionError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_OPTION_ERROR, error_code, error_message) -{} - -Glib::OptionError::OptionError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::OptionError::Code Glib::OptionError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::OptionError::throw_func(GError* gobject) -{ - throw Glib::OptionError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::OptionError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::OptionError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -namespace Glib -{ - - -void OptionContext::set_help_enabled(bool help_enabled) -{ -g_option_context_set_help_enabled(gobj(), static_cast(help_enabled)); -} - -bool OptionContext::get_help_enabled() const -{ - return g_option_context_get_help_enabled(const_cast(gobj())); -} - -void OptionContext::set_ignore_unknown_options(bool ignore_unknown) -{ -g_option_context_set_ignore_unknown_options(gobj(), static_cast(ignore_unknown)); -} - -bool OptionContext::get_ignore_unknown_options() const -{ - return g_option_context_get_ignore_unknown_options(const_cast(gobj())); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool OptionContext::parse(int& argc, char**& argv) -#else -bool OptionContext::parse(int& argc, char**& argv, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_option_context_parse(gobj(), &argc, &(argv), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -void OptionContext::set_summary(const Glib::ustring& summary) -{ -g_option_context_set_summary(gobj(), summary.c_str()); -} - -Glib::ustring OptionContext::get_summary() const -{ - return Glib::convert_const_gchar_ptr_to_ustring(g_option_context_get_summary(const_cast(gobj()))); -} - -void OptionContext::set_description(const Glib::ustring& description) -{ -g_option_context_set_description(gobj(), description.c_str()); -} - -Glib::ustring OptionContext::get_description() const -{ - return Glib::convert_const_gchar_ptr_to_ustring(g_option_context_get_description(const_cast(gobj()))); -} - -void OptionContext::set_translation_domain(const Glib::ustring& domain) -{ -g_option_context_set_translation_domain(gobj(), domain.c_str()); -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/optioncontext.h b/libs/glibmm2/glib/glibmm/optioncontext.h deleted file mode 100644 index cf159bdc1f..0000000000 --- a/libs/glibmm2/glib/glibmm/optioncontext.h +++ /dev/null @@ -1,277 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_OPTIONCONTEXT_H -#define _GLIBMM_OPTIONCONTEXT_H - - -/* $Id: optioncontext.hg,v 1.6 2005/01/10 17:42:17 murrayc Exp $ */ - -/* Copyright (C) 2004 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GOptionContext GOptionContext; } -#endif - - -namespace Glib -{ - -/** Exception class for options. - */ -class OptionError : public Glib::Error -{ -public: - enum Code - { - UNKNOWN_OPTION, - BAD_VALUE, - FAILED - }; - - OptionError(Code error_code, const Glib::ustring& error_message); - explicit OptionError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** An OptionContext defines which options are accepted by the commandline option parser. - */ -class OptionContext -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef OptionContext CppObjectType; - typedef GOptionContext BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: - -public: - - /** Creates a new option context. - * @param parameter_string A string which is displayed in the first line of --help output, after programname [OPTION...] - */ - explicit OptionContext(const Glib::ustring& parameter_string = Glib::ustring()); - - //Note that, unlike Glib::Wrap(), this would create a second C++ instance for the same C instance, - //so it should be used carefully. For instance you could not access data in a derived class via this second instance. - explicit OptionContext(GOptionContext* castitem, bool take_ownership = false); - virtual ~OptionContext(); - - - /** Enables or disables automatic generation of <option>--help</option> - * output. By default, g_option_context_parse() recognizes - * <option>--help</option>, <option>-?</option>, <option>--help-all</option> - * and <option>--help-</option><replaceable>groupname</replaceable> and creates - * suitable output to stdout. - * - * @newin2p6 - * @param help_enabled true to enable <option>--help</option>, false to disable it. - */ - void set_help_enabled(bool help_enabled = true); - - /** Returns: true if automatic help generation is turned on. - * @return true if automatic help generation is turned on. - * - * @newin2p6. - */ - bool get_help_enabled() const; - - /** Sets whether to ignore unknown options or not. If an argument is - * ignored, it is left in the @a argv array after parsing. By default, - * g_option_context_parse() treats unknown options as error. - * - * This setting does not affect non-option arguments (i.e. arguments - * which don't start with a dash). But note that GOption cannot reliably - * determine whether a non-option belongs to a preceding unknown option. - * - * @newin2p6 - * @param ignore_unknown true to ignore unknown options, false to produce - * an error when unknown options are met. - */ - void set_ignore_unknown_options(bool ignore_unknown = true); - - /** Returns: true if unknown options are ignored. - * @return true if unknown options are ignored. - * - * @newin2p6. - */ - bool get_ignore_unknown_options() const; - - - /** Parses the command line arguments, recognizing options - * which have been added to @a context . A side-effect of - * calling this function is that g_set_prgname() will be - * called. - * - * If the parsing is successful, any parsed arguments are - * removed from the array and @a argc and @a argv are updated - * accordingly. A '--' option is stripped from @a argv - * unless there are unparsed options before and after it, - * or some of the options after it start with '-'. In case - * of an error, @a argc and @a argv are left unmodified. - * - * If automatic <option>--help</option> support is enabled - * (see g_option_context_set_help_enabled()), and the - * @a argv array contains one of the recognized help options, - * this function will produce help output to stdout and - * call exit (0). - * - * Note that function depends on the - * current locale for - * automatic character set conversion of string and filename - * arguments. - * @param argc A pointer to the number of command line arguments. - * @param argv A pointer to the array of command line arguments. - * @param error A return location for errors. - * @return true if the parsing was successful, - * false if an error occurred - * - * @newin2p6. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool parse(int& argc, char**& argv); -#else - bool parse(int& argc, char**& argv, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - //g_option_context_add_main_entries(), just creates a group internally, adds them to it, and does a set_main_group() - //- a group without callbacks seems to do some simple default parsing. - - - /** Adds an OptionGroup to the context, so that parsing with context will recognize the options in the group. - * Note that the group will not be copied, so it should exist for as long as the context exists. - * - * @param group The group to add. - */ - void add_group(OptionGroup& group); - - - /** Sets an OptionGroup as the main group of the context. This has the same effect as calling add_group(), the only - * difference is that the options in the main group are treated differently when generating --help output. - * Note that the group will not be copied, so it should exist for as long as the context exists. - * - * @param group The group to add. - */ - void set_main_group(OptionGroup& group); - - - //We don't need this (hopefully), and the memory management would be really awkward. - //OptionGroup& get_main_group(); - //const OptionGroup& get_main_group() const; - - - GOptionContext* gobj() { return gobject_; } - const GOptionContext* gobj() const { return gobject_; } - - - /** Adds a string to be displayed in --help output before the list of options. This - * is typically a summary of the program functionality. - * - * Note that the summary is translated (see set_translate_func(), - * set_translation_domain()). - * - * @newin2p14 - */ - void set_summary(const Glib::ustring& summary); - - /** Returns: the summary - * See set_summary() for more information - * @return The summary - * - * @newin2p14. - */ - Glib::ustring get_summary() const; - - /** Adds a string to be displayed in --help output after the list of - * options. This text often includes a bug reporting address. - * - * Note that the summary is translated (see set_translate_func()). - * - * @newin2p14 - */ - void set_description(const Glib::ustring& description); - - /** Returns: the description - * See set_description() for more information - * @return The description - * - * @newin2p14. - */ - Glib::ustring get_description() const; - - - /** A convenience function to use gettext() for translating - * user-visible strings. - * - * @newin2p14 - */ - void set_translation_domain(const Glib::ustring& domain); - - /** - * This function is used to translate user-visible strings, for --help output. - * The function takes an untranslated string and returns a translated string - */ - typedef sigc::slot SlotTranslate; - - /** - * Sets the function which is used to translate user-visible - * strings, for --help output. Different groups can use different functions. - * - * If you are using gettext(), you only need to set the translation domain, - * see set_translation_domain(). - * - * @newin2p14 - */ - void set_translate_func (const SlotTranslate& slot); - - -protected: - - GOptionContext* gobject_; - bool has_ownership_; - - -}; - - -} // namespace Glib - - -#endif /* _GLIBMM_OPTIONCONTEXT_H */ - diff --git a/libs/glibmm2/glib/glibmm/optionentry.cc b/libs/glibmm2/glib/glibmm/optionentry.cc deleted file mode 100644 index 20c54ee7df..0000000000 --- a/libs/glibmm2/glib/glibmm/optionentry.cc +++ /dev/null @@ -1,149 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: optionentry.ccg,v 1.8 2006/03/08 12:23:03 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -namespace Glib -{ - -OptionEntry::OptionEntry() -{ - gobject_ = g_new0(GOptionEntry, 1); -} - -OptionEntry::~OptionEntry() -{ - g_free(const_cast(gobject_->long_name)); - g_free(const_cast(gobject_->description)); - g_free(const_cast(gobject_->arg_description)); - g_free(gobject_); -} - -OptionEntry::OptionEntry(const OptionEntry& src) -{ - gobject_ = g_new0(GOptionEntry, 1); - - operator=(src); -} - -OptionEntry& OptionEntry::operator=(const OptionEntry& src) -{ - if(this != &src) - { - if(gobject_->long_name) - g_free(const_cast(gobject_->long_name)); - - gobject_->long_name = g_strdup(src.gobject_->long_name); - - gobject_->short_name = src.gobject_->short_name; //It's just one char. - - gobject_->flags = src.gobject_->flags; - gobject_->arg = src.gobject_->arg; - gobject_->arg_data = src.gobject_->arg_data; //Shared, because it's not owned by any instance of this class anyway. - - if(gobject_->description) - g_free(const_cast(gobject_->description)); - - gobject_->description = g_strdup(src.gobject_->description); - - if(gobject_->arg_description) - g_free(const_cast(gobject_->arg_description)); - - gobject_->arg_description = g_strdup(src.gobject_->arg_description); - } - - return *this; -} - - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -namespace Glib -{ - - - Glib::ustring OptionEntry::get_long_name() const -{ - return Glib::convert_const_gchar_ptr_to_ustring(gobj()->long_name); -} - - void OptionEntry::set_long_name(const Glib::ustring& value) -{ - gobj()->long_name = g_strdup((value).c_str()); -} - - gchar OptionEntry::get_short_name() const -{ - return gobj()->short_name; -} - - void OptionEntry::set_short_name(const gchar& value) -{ - gobj()->short_name = value; -} - - int OptionEntry::get_flags() const -{ - return gobj()->flags; -} - - void OptionEntry::set_flags(const int& value) -{ - gobj()->flags = value; -} - - Glib::ustring OptionEntry::get_description() const -{ - return Glib::convert_const_gchar_ptr_to_ustring(gobj()->description); -} - - void OptionEntry::set_description(const Glib::ustring& value) -{ - gobj()->description = g_strdup((value).c_str()); -} - - Glib::ustring OptionEntry::get_arg_description() const -{ - return Glib::convert_const_gchar_ptr_to_ustring(gobj()->arg_description); -} - - void OptionEntry::set_arg_description(const Glib::ustring& value) -{ - gobj()->arg_description = g_strdup((value).c_str()); -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/optionentry.h b/libs/glibmm2/glib/glibmm/optionentry.h deleted file mode 100644 index 7f2f220d0b..0000000000 --- a/libs/glibmm2/glib/glibmm/optionentry.h +++ /dev/null @@ -1,112 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_OPTIONENTRY_H -#define _GLIBMM_OPTIONENTRY_H - - -/* $Id: optionentry.hg,v 1.11 2005/07/31 13:11:05 murrayc Exp $ */ - -/* Copyright (C) 2004 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GOptionEntry GOptionEntry; } -#endif - - -namespace Glib -{ - -/** An OptionEntry defines a single option. To have an effect, it must be added to an OptionGroup with - * OptionGroup::add_entry(). - * - * The long name of an option can be used to specify it in a commandline as --long_name. - * Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also - * possible to specify the option as --groupname-long_name. - * - * If an option has a short name, it can be specified as -short_name in a commandline. - * - * The description for the option is shown in the --help output. - * - * The arg_descripton is the placeholder to use for the extra argument parsed by the option in --help output. - */ -class OptionEntry -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef OptionEntry CppObjectType; - typedef GOptionEntry BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: - -public: - - //Copied from goption.h, instead of generated, so that we can put it inside the class. - enum Flags - { - FLAG_HIDDEN = 1 << 0, - FLAG_IN_MAIN = 1 << 1, - FLAG_REVERSE = 1 << 2, - FLAG_NO_ARG = 1 << 3, - FLAG_FILENAME = 1 << 4, - FLAG_OPTIONAL_ARG = 1 << 5, - FLAG_NOALIAS = 1 << 6 - } GOptionFlags; - - OptionEntry(); - OptionEntry(const OptionEntry& src); - virtual ~OptionEntry(); - - OptionEntry& operator=(const OptionEntry& src); - - - Glib::ustring get_long_name() const; - void set_long_name(const Glib::ustring& value); - - gchar get_short_name() const; - void set_short_name(const gchar& value); - - int get_flags() const; - void set_flags(const int& value); - - //TODO: G_OPTION_ARG_CALLBACK, - - Glib::ustring get_description() const; - void set_description(const Glib::ustring& value); - - Glib::ustring get_arg_description() const; - void set_arg_description(const Glib::ustring& value); - - GOptionEntry* gobj() { return gobject_; } - const GOptionEntry* gobj() const { return gobject_; } - -protected: - - GOptionEntry* gobject_; - - -}; - -} // namespace Glib - - -#endif /* _GLIBMM_OPTIONENTRY_H */ - diff --git a/libs/glibmm2/glib/glibmm/optiongroup.cc b/libs/glibmm2/glib/glibmm/optiongroup.cc deleted file mode 100644 index 01ac81d0db..0000000000 --- a/libs/glibmm2/glib/glibmm/optiongroup.cc +++ /dev/null @@ -1,543 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: optiongroup.ccg,v 1.15.4.3 2006/03/30 12:19:58 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -//#include -#include // g_malloc -#include - -namespace Glib -{ - -namespace //anonymous -{ - -extern "C" -{ - -static gboolean g_callback_pre_parse(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error */) -{ - OptionContext cppContext(context, false /* take_ownership */); - //OptionGroup cppGroup(group, true /* take_copy */); //Maybe this should be option_group. - - OptionGroup* option_group = static_cast(data); - if(option_group) - return option_group->on_pre_parse(cppContext, *option_group); - else - return false; -} - -static gboolean g_callback_post_parse(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error */) -{ - OptionContext cppContext(context, false /* take_ownership */); - //OptionGroup cppGroup(group, true /* take_copy */); //Maybe this should be option_group. - - OptionGroup* option_group = static_cast(data); - if(option_group) - { - return option_group->on_post_parse(cppContext, *option_group); - } - else - return false; -} - -static void g_callback_error(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error*/) -{ - OptionContext cppContext(context, false /* take_ownership */); - //OptionGroup cppGroup(group); //Maybe this should be option_group. - - OptionGroup* option_group = static_cast(data); - if(option_group) - return option_group->on_error(cppContext, *option_group); -} - -} /* extern "C" */ - -} //anonymous namespace - - -OptionGroup::OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description) -: gobject_( g_option_group_new(name.c_str(), description.c_str(), help_description.c_str(), this, 0 /* destroy_func */) ), - has_ownership_(true) -{ - //Connect callbacks, so that derived classes can override the virtual methods: - g_option_group_set_parse_hooks(gobj(), &g_callback_pre_parse, &g_callback_post_parse); - g_option_group_set_error_hook(gobj(), &g_callback_error); -} - -OptionGroup::OptionGroup(GOptionGroup* castitem) -: gobject_(castitem), - has_ownership_(true) -{ - //Always takes ownership - never takes copy. -} - - -OptionGroup::~OptionGroup() -{ - //Free any C types that were allocated during add_entry(): - for(type_map_entries::iterator iter = map_entries_.begin(); iter != map_entries_.end(); ++iter) - { - CppOptionEntry& cpp_entry = iter->second; - cpp_entry.release_c_arg(); - } - - if(has_ownership_) - { - g_option_group_free(gobj()); - gobject_ = 0; - } -} - -void OptionGroup::add_entry(const OptionEntry& entry) -{ - //It does not copy the entry, so it needs to live as long as the group. - - //g_option_group_add_entries takes an array, with the last item in the array having a null long_name. - //Hopefully this will be properly documented eventually - see bug # - - //Create a temporary array, just so we can give the correct thing to g_option_group_add_entries: - GOptionEntry array[2]; - array[0] = *(entry.gobj()); //Copy contents. - GLIBMM_INITIALIZE_STRUCT(array[1], GOptionEntry); - - g_option_group_add_entries(gobj(), array); -} - -void OptionGroup::add_entry(const OptionEntry& entry, bool& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_NONE /* Actually a boolean on/off, depending on whether the argument name was given, without argument parameters. */, &arg); -} - -void OptionGroup::add_entry(const OptionEntry& entry, int& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_INT, &arg); -} - -void OptionGroup::add_entry(const OptionEntry& entry, Glib::ustring& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_STRING, &arg); -} - -void OptionGroup::add_entry(const OptionEntry& entry, vecustrings& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_STRING_ARRAY, &arg); -} - -void OptionGroup::add_entry_filename(const OptionEntry& entry, std::string& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_FILENAME, &arg); -} - -void OptionGroup::add_entry_filename(const OptionEntry& entry, vecstrings& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_FILENAME_ARRAY, &arg); -} - -void OptionGroup::add_entry_with_wrapper(const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg) -{ - const Glib::ustring name = entry.get_long_name(); - type_map_entries::iterator iterFind = map_entries_.find(name); - if( iterFind == map_entries_.end() ) //If we have not added this entry already - { - CppOptionEntry cppEntry; - cppEntry.carg_type_ = arg_type; - cppEntry.allocate_c_arg(); - cppEntry.set_c_arg_default(cpp_arg); - - cppEntry.cpparg_ = cpp_arg; - - //Give the information to the C API: - - cppEntry.entry_ = new OptionEntry(entry); //g_option_group_add_entry() does not take its own copy, so we must keep the instance alive. */ - //cppEntry.entry_ is deleted in release_c_arg(), via the destructor. - - cppEntry.entry_->gobj()->arg = arg_type; - cppEntry.entry_->gobj()->arg_data = cppEntry.carg_; - - //Remember the C++/C mapping so that we can use it later: - map_entries_[name] = cppEntry; - - add_entry(*(cppEntry.entry_)); - } -} - - -bool OptionGroup::on_pre_parse(OptionContext& /* context */, OptionGroup& /* group */) -{ - return true; -} - -bool OptionGroup::on_post_parse(OptionContext& /* context */, OptionGroup& /* group */) -{ - //Call this at the start of overrides. - - //TODO: Maybe put this in the C callback: - - //The C args have now been given values by GOption. - //Convert C values to C++ values: - - for(type_map_entries::iterator iter = map_entries_.begin(); iter != map_entries_.end(); ++iter) - { - CppOptionEntry& cpp_entry = iter->second; - cpp_entry.convert_c_to_cpp(); - } - - return true; -} - -void OptionGroup::on_error(OptionContext& /* context */, OptionGroup& /* group */) -{ -} - - -OptionGroup::CppOptionEntry::CppOptionEntry() -: carg_type_(G_OPTION_ARG_NONE), carg_(0), cpparg_(0), entry_(0) -{} - -void OptionGroup::CppOptionEntry::allocate_c_arg() -{ - //Create an instance of the appropriate C type. - //This will be destroyed in the OptionGroup destructor. - // - //We must also call set_c_arg_default() to give these C types the specified defaults based on the C++-typed arguments. - switch(carg_type_) - { - case G_OPTION_ARG_STRING: //The char* will be for UTF8 strins. - case G_OPTION_ARG_FILENAME: //The char* will be for strings in the current locale's encoding. - { - char** typed_arg = new char*; - //The C code will allocate a char* and put it here, for us to g_free() later. - //Alternatively, set_c_arg_default() might allocate a char*, and the C code might or might not free and replace that. - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - case G_OPTION_ARG_INT: - { - int* typed_arg = new int; - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - case G_OPTION_ARG_STRING_ARRAY: - case G_OPTION_ARG_FILENAME_ARRAY: - { - char*** typed_arg = new char**; - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - case G_OPTION_ARG_NONE: /* Actually a boolean. */ - { - gboolean* typed_arg = new gboolean; - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - default: - { - break; - } - } -} - -void OptionGroup::CppOptionEntry::set_c_arg_default(void* cpp_arg) -{ - switch(carg_type_) - { - case G_OPTION_ARG_INT: - { - *static_cast(carg_) = *static_cast(cpp_arg); - break; - } - case G_OPTION_ARG_NONE: - { - *static_cast(carg_) = *static_cast(cpp_arg); - break; - } - case G_OPTION_ARG_STRING: - { - Glib::ustring* typed_cpp_arg = static_cast(cpp_arg); - if(typed_cpp_arg && !typed_cpp_arg->empty()) - { - const char** typed_c_arg = static_cast(carg_); - *typed_c_arg = g_strdup(typed_cpp_arg->c_str()); //Freed in release_c_arg(). - } - break; - } - case G_OPTION_ARG_FILENAME: - { - std::string* typed_cpp_arg = static_cast(cpp_arg); - if(typed_cpp_arg && !typed_cpp_arg->empty()) - { - const char** typed_c_arg = static_cast(carg_); - *typed_c_arg = g_strdup(typed_cpp_arg->c_str()); //Freed in release_c_arg(). - } - break; - } - case G_OPTION_ARG_STRING_ARRAY: - { - std::vector* typed_cpp_arg = static_cast*>(cpp_arg); - if(typed_cpp_arg) - { - std::vector& vec = *typed_cpp_arg; - const char** array = static_cast( g_malloc(sizeof(gchar*) * (vec.size() + 1)) ); - - for(std::vector::size_type i = 0; i < vec.size(); ++i) - { - array[i] = g_strdup( vec[i].c_str() ); - } - - array[vec.size()] = 0; - - const char*** typed_c_arg = static_cast(carg_); - *typed_c_arg = array; - } - break; - } - case G_OPTION_ARG_FILENAME_ARRAY: - { - std::vector* typed_cpp_arg = static_cast*>(cpp_arg); - if(typed_cpp_arg) - { - std::vector& vec = *typed_cpp_arg; - const char** array = static_cast( g_malloc(sizeof(gchar*) * (vec.size() + 1)) ); - - for(std::vector::size_type i = 0; i < vec.size(); ++i) - { - array[i] = g_strdup( vec[i].c_str() ); - } - - array[vec.size()] = 0; - - const char*** typed_c_arg = static_cast(carg_); - *typed_c_arg = array; - } - break; - } - default: - { - break; - } - } -} - -void OptionGroup::CppOptionEntry::release_c_arg() -{ - //Delete the instances that we created in allocate_c_arg(). - //Notice that we delete the type that we created, but not the value to which it points. - if(carg_) - { - switch(carg_type_) - { - case G_OPTION_ARG_STRING: - case G_OPTION_ARG_FILENAME: - { - char** typed_arg = static_cast(carg_); - g_free(*typed_arg); //Free the char* string at type_arg, which was allocated by the C code. - delete typed_arg; //Delete the char** that we allocated in allocate_c_arg; - - break; - } - case G_OPTION_ARG_INT: - { - int* typed_arg = static_cast(carg_); - delete typed_arg; - - break; - } - case G_OPTION_ARG_STRING_ARRAY: - case G_OPTION_ARG_FILENAME_ARRAY: - { - delete (char**)carg_; - break; - } - case G_OPTION_ARG_NONE: /* Actually a boolean. */ - { - gboolean* typed_arg = static_cast(carg_); - delete typed_arg; - - break; - } - default: - { - /* TODO: - G_OPTION_ARG_CALLBACK, - */ - break; - } - } - - carg_ = 0; - } - - if(entry_) - delete entry_; -} - -void OptionGroup::CppOptionEntry::convert_c_to_cpp() -{ - switch(carg_type_) - { - case G_OPTION_ARG_STRING: - { - char** typed_arg = static_cast(carg_); - Glib::ustring* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - char* pch = *typed_arg; - (*typed_cpp_arg) = Glib::convert_const_gchar_ptr_to_ustring(pch); - - break; - } - } - case G_OPTION_ARG_FILENAME: - { - char** typed_arg = static_cast(carg_); - std::string* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - char* pch = *typed_arg; - (*typed_cpp_arg) = Glib::convert_const_gchar_ptr_to_stdstring(pch); - - break; - } - } - case G_OPTION_ARG_INT: - { - *((int*)cpparg_) = *(static_cast(carg_)); - break; - } - case G_OPTION_ARG_STRING_ARRAY: - { - char*** typed_arg = static_cast(carg_); - vecustrings* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - typed_cpp_arg->clear(); - - //The C array seems to be null-terminated. - //Glib::StringArrayHandle array_handle(*typed_arg, Glib::OWNERSHIP_NONE); - - //The SUN Forte compiler complains about this: - // "optiongroup.cc", line 354: Error: Cannot assign Glib::ArrayHandle> to std::vector without - // "std::vector::operator=(const std::vector&)";. - // - //(*typed_cpp_arg) = array_handle; - // - //And the Tru64 compiler does not even like us to instantiate the StringArrayHandle: - // - // cxx: Error: ../../glib/glibmm/containerhandle_shared.h, line 149: the operand - // of a pointer dynamic_cast must be a pointer to a complete class type - // return dynamic_cast(Glib::wrap_auto(cobj, false /* take_copy */)); - - //for(Glib::StringArrayHandle::iterator iter = array_handle.begin(); iter != array_handle.end(); ++iter) - //{ - // typed_cpp_arg->push_back(*iter); - //} - - //So we do this: - - char** char_array_next = *typed_arg; - while(char_array_next && *char_array_next) - { - typed_cpp_arg->push_back(*char_array_next); - ++char_array_next; - } - } - - break; - } - case G_OPTION_ARG_FILENAME_ARRAY: - { - char*** typed_arg = static_cast(carg_); - vecustrings* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - typed_cpp_arg->clear(); - - //See comments above about the SUN Forte and Tru64 compilers. - - char** char_array_next = *typed_arg; - while(char_array_next && *char_array_next) - { - typed_cpp_arg->push_back(*char_array_next); - ++char_array_next; - } - } - - break; - } - case G_OPTION_ARG_NONE: /* Actually a boolean. */ - { - *(static_cast(cpparg_)) = *(static_cast(carg_)); - break; - } - default: - { - /* TODO: - G_OPTION_ARG_CALLBACK, - */ - break; - } - } -} - -GOptionGroup* OptionGroup::gobj_give_ownership() -{ - has_ownership_ = false; - return gobj(); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -namespace Glib -{ - - -void OptionGroup::set_translation_domain(const Glib::ustring& domain) -{ -g_option_group_set_translation_domain(gobj(), domain.c_str()); -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/optiongroup.h b/libs/glibmm2/glib/glibmm/optiongroup.h deleted file mode 100644 index 57340fefdf..0000000000 --- a/libs/glibmm2/glib/glibmm/optiongroup.h +++ /dev/null @@ -1,146 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_OPTIONGROUP_H -#define _GLIBMM_OPTIONGROUP_H - - -/* $Id: optiongroup.hg,v 1.10.4.1 2006/03/30 12:19:58 murrayc Exp $ */ - -/* Copyright (C) 2004 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include -#include //TODO: Try to hide this. - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GOptionGroup GOptionGroup; } -#endif //DOXYGEN_SHOULD_SKIP_THIS - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class OptionEntry; -class OptionContext; -#endif //DOXYGEN_SHOULD_SKIP_THIS - -/** An OptionGroup defines the options in a single group. - * Libraries which need to parse commandline options are expected to provide a function that allows their OptionGroups to - * be added to the application's OptionContext. - */ -class OptionGroup -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef OptionGroup CppObjectType; - typedef GOptionGroup BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: - -public: - OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description = Glib::ustring()); - - /** This always takes ownership of the underlying GOptionGroup, - * so it is only useful with C functions that return newly-allocated GOptionGroups. - */ - explicit OptionGroup(GOptionGroup* castitem); - - virtual ~OptionGroup(); - - - virtual bool on_pre_parse(OptionContext& context, OptionGroup& group); - virtual bool on_post_parse(OptionContext& context, OptionGroup& group); - virtual void on_error(OptionContext& context, OptionGroup& group); - - - void add_entry(const OptionEntry& entry); - - - typedef std::vector vecustrings; - typedef std::vector vecstrings; - - void add_entry(const OptionEntry& entry, bool& arg); - void add_entry(const OptionEntry& entry, int& arg); - void add_entry(const OptionEntry& entry, Glib::ustring& arg); - void add_entry_filename(const OptionEntry& entry, std::string& arg); - void add_entry(const OptionEntry& entry, vecustrings& arg); - void add_entry_filename(const OptionEntry& entry, vecstrings& arg); - -/* TODO: -void g_option_group_set_translate_func (GOptionGroup *group, - GTranslateFunc func, - gpointer data, - GDestroyNotify destroy_notify); -*/ - - /** A convenience function to use gettext() for translating - * user-visible strings. - * - * @newin2p6 - * @param domain The domain to use. - */ - void set_translation_domain(const Glib::ustring& domain); - - GOptionGroup* gobj() { return gobject_; } - const GOptionGroup* gobj() const { return gobject_; } - GOptionGroup* gobj_give_ownership(); - -protected: - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - /** This is not public API. It is an implementation detail. - */ - class CppOptionEntry - { - public: - CppOptionEntry(); - - void allocate_c_arg(); - void set_c_arg_default(void* cpp_arg); - void convert_c_to_cpp(); - void release_c_arg(); - - GOptionArg carg_type_; - void* carg_; - void* cpparg_; - OptionEntry* entry_; - }; - - void add_entry_with_wrapper(const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg); - - //Map of entry names to CppOptionEntry: - typedef std::map type_map_entries; - type_map_entries map_entries_; - - GOptionGroup* gobject_; - bool has_ownership_; //Whether the gobject_ belongs to this C++ instance. -#endif //DOXYGEN_SHOULD_SKIP_THIS - - -}; - -} // namespace Glib - - -#endif /* _GLIBMM_OPTIONGROUP_H */ - diff --git a/libs/glibmm2/glib/glibmm/pattern.cc b/libs/glibmm2/glib/glibmm/pattern.cc deleted file mode 100644 index 28168620bb..0000000000 --- a/libs/glibmm2/glib/glibmm/pattern.cc +++ /dev/null @@ -1,66 +0,0 @@ -// -*- c++ -*- -/* $Id: pattern.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* pattern.cc - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -PatternSpec::PatternSpec(const Glib::ustring& pattern) -: - gobject_ (g_pattern_spec_new(pattern.c_str())) -{} - -PatternSpec::PatternSpec(GPatternSpec* gobject) -: - gobject_ (gobject) -{} - -PatternSpec::~PatternSpec() -{ - g_pattern_spec_free(gobject_); -} - -bool PatternSpec::match(const Glib::ustring& str) const -{ - return g_pattern_match(gobject_, str.bytes(), str.c_str(), 0); -} - -bool PatternSpec::match(const Glib::ustring& str, const Glib::ustring& str_reversed) const -{ - return g_pattern_match(gobject_, str.bytes(), str.c_str(), str_reversed.c_str()); -} - -bool PatternSpec::operator==(const PatternSpec& rhs) const -{ - return g_pattern_spec_equal(gobject_, rhs.gobject_); -} - -bool PatternSpec::operator!=(const PatternSpec& rhs) const -{ - return !g_pattern_spec_equal(gobject_, rhs.gobject_); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/pattern.h b/libs/glibmm2/glib/glibmm/pattern.h deleted file mode 100644 index 32d05feea0..0000000000 --- a/libs/glibmm2/glib/glibmm/pattern.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_PATTERN_H -#define _GLIBMM_PATTERN_H - -/* $Id: pattern.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* pattern.h - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -extern "C" { typedef struct _GPatternSpec GPatternSpec; } - -#include - - -namespace Glib -{ - -/** @defgroup PatternMatching Glob-style Pattern Matching - * Match strings against patterns containing '*' (wildcard) and '?' (joker). - * @{ - */ - -class PatternSpec -{ -public: - explicit PatternSpec(const Glib::ustring& pattern); - explicit PatternSpec(GPatternSpec* gobject); - ~PatternSpec(); - - bool match(const Glib::ustring& str) const; - bool match(const Glib::ustring& str, const Glib::ustring& str_reversed) const; - - bool operator==(const PatternSpec& rhs) const; - bool operator!=(const PatternSpec& rhs) const; - - GPatternSpec* gobj() { return gobject_; } - const GPatternSpec* gobj() const { return gobject_; } - -private: - GPatternSpec* gobject_; - - // noncopyable - PatternSpec(const PatternSpec&); - PatternSpec& operator=(const PatternSpec&); -}; - -/** @} group PatternMatching */ - -} // namespace Glib - - -#endif /* _GLIBMM_PATTERN_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/Makefile.am b/libs/glibmm2/glib/glibmm/private/Makefile.am deleted file mode 100644 index de70a5dfcf..0000000000 --- a/libs/glibmm2/glib/glibmm/private/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. - -include $(srcdir)/../../src/Makefile_list_of_hg.am_fragment -include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment - -files_built_h = $(files_hg:.hg=_p.h) -files_built_all_h = $(files_all_hg:.hg=_p.h) -files_extra_h = interface_p.h object_p.h -files_extra_all_h = interface_p.h object_p.h - -dist_sources = $(files_built_all_h) $(files_extra_all_h) -DISTFILES = $(DIST_COMMON) $(dist_sources) - -private_includedir = $(includedir)/glibmm-2.4/glibmm/private -private_include_HEADERS = $(files_built_h) $(files_extra_h) - -maintainer-clean-local: - (cd $(srcdir) && rm -f $(files_built_h)) - diff --git a/libs/glibmm2/glib/glibmm/private/Makefile.in b/libs/glibmm2/glib/glibmm/private/Makefile.in deleted file mode 100644 index 815acd7329..0000000000 --- a/libs/glibmm2/glib/glibmm/private/Makefile.in +++ /dev/null @@ -1,443 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(am__private_include_HEADERS_DIST) \ - $(srcdir)/../../src/Makefile_list_of_hg.am_fragment \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment -subdir = glib/glibmm/private -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/glib/glibmmconfig.h \ - $(top_builddir)/gio/giommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__private_include_HEADERS_DIST = convert_p.h date_p.h fileutils_p.h \ - iochannel_p.h keyfile_p.h markup_p.h module_p.h \ - optioncontext_p.h optionentry_p.h optiongroup_p.h regex_p.h \ - shell_p.h spawn_p.h thread_p.h unicode_p.h interface_p.h \ - object_p.h -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(private_includedir)" -private_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(private_include_HEADERS) -ETAGS = etags -CTAGS = ctags -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GIOMM_CFLAGS = @GIOMM_CFLAGS@ -GIOMM_LIBS = @GIOMM_LIBS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GMMPROC_DIR = @GMMPROC_DIR@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -files_posix_hg = -files_win32_hg = -files_general_hg = convert.hg date.hg fileutils.hg iochannel.hg keyfile.hg markup.hg module.hg optioncontext.hg optionentry.hg optiongroup.hg regex.hg shell.hg spawn.hg thread.hg unicode.hg -files_all_hg = $(files_general_hg) $(files_posix_hg) $(files_win32_hg) -@OS_WIN32_FALSE@files_hg = $(files_general_hg) $(files_posix_hg) -@OS_WIN32_TRUE@files_hg = $(files_general_hg) $(files_win32_hg) -files_built_h = $(files_hg:.hg=_p.h) -files_built_all_h = $(files_all_hg:.hg=_p.h) -files_extra_h = interface_p.h object_p.h -files_extra_all_h = interface_p.h object_p.h -dist_sources = $(files_built_all_h) $(files_extra_all_h) -DISTFILES = $(DIST_COMMON) $(dist_sources) -private_includedir = $(includedir)/glibmm-2.4/glibmm/private -private_include_HEADERS = $(files_built_h) $(files_extra_h) -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../src/Makefile_list_of_hg.am_fragment $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glib/glibmm/private/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glib/glibmm/private/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-private_includeHEADERS: $(private_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(private_includedir)" || $(MKDIR_P) "$(DESTDIR)$(private_includedir)" - @list='$(private_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(private_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(private_includedir)/$$f'"; \ - $(private_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(private_includedir)/$$f"; \ - done - -uninstall-private_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(private_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(private_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(private_includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(private_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-private_includeHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-private_includeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-private_includeHEADERS install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-private_includeHEADERS - - -maintainer-clean-local: - (cd $(srcdir) && rm -f $(files_built_h)) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/glib/glibmm/private/convert_p.h b/libs/glibmm2/glib/glibmm/private/convert_p.h deleted file mode 100644 index 743540ad3f..0000000000 --- a/libs/glibmm2/glib/glibmm/private/convert_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_CONVERT_P_H -#define _GLIBMM_CONVERT_P_H - - -#endif /* _GLIBMM_CONVERT_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/date_p.h b/libs/glibmm2/glib/glibmm/private/date_p.h deleted file mode 100644 index 71b1fdde1e..0000000000 --- a/libs/glibmm2/glib/glibmm/private/date_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_DATE_P_H -#define _GLIBMM_DATE_P_H - - -#endif /* _GLIBMM_DATE_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/fileutils_p.h b/libs/glibmm2/glib/glibmm/private/fileutils_p.h deleted file mode 100644 index 27639284fa..0000000000 --- a/libs/glibmm2/glib/glibmm/private/fileutils_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_FILEUTILS_P_H -#define _GLIBMM_FILEUTILS_P_H - - -#endif /* _GLIBMM_FILEUTILS_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/interface_p.h b/libs/glibmm2/glib/glibmm/private/interface_p.h deleted file mode 100644 index 805d8db3e5..0000000000 --- a/libs/glibmm2/glib/glibmm/private/interface_p.h +++ /dev/null @@ -1,24 +0,0 @@ -// -*- c++ -*- - -#ifndef _GLIBMM_INTERFACE_P_H -#define _GLIBMM_INTERFACE_P_H - -#include - - -namespace Glib -{ - -class Interface_Class : public Glib::Class -{ -public: - typedef Interface CppObjectType; - typedef GTypeInterface BaseClassType; - - void add_interface(GType instance_type) const; -}; - -} // namespace Glib - -#endif /* _GLIBMM_INTERFACE_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/iochannel_p.h b/libs/glibmm2/glib/glibmm/private/iochannel_p.h deleted file mode 100644 index c462983d3d..0000000000 --- a/libs/glibmm2/glib/glibmm/private/iochannel_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_IOCHANNEL_P_H -#define _GLIBMM_IOCHANNEL_P_H - - -#endif /* _GLIBMM_IOCHANNEL_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/keyfile_p.h b/libs/glibmm2/glib/glibmm/private/keyfile_p.h deleted file mode 100644 index b0de14162b..0000000000 --- a/libs/glibmm2/glib/glibmm/private/keyfile_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_KEYFILE_P_H -#define _GLIBMM_KEYFILE_P_H - - -#endif /* _GLIBMM_KEYFILE_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/markup_p.h b/libs/glibmm2/glib/glibmm/private/markup_p.h deleted file mode 100644 index 807833d0a2..0000000000 --- a/libs/glibmm2/glib/glibmm/private/markup_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_MARKUP_P_H -#define _GLIBMM_MARKUP_P_H - - -#endif /* _GLIBMM_MARKUP_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/module_p.h b/libs/glibmm2/glib/glibmm/private/module_p.h deleted file mode 100644 index b65105b354..0000000000 --- a/libs/glibmm2/glib/glibmm/private/module_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_MODULE_P_H -#define _GLIBMM_MODULE_P_H - - -#endif /* _GLIBMM_MODULE_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/object_p.h b/libs/glibmm2/glib/glibmm/private/object_p.h deleted file mode 100644 index 20a711898f..0000000000 --- a/libs/glibmm2/glib/glibmm/private/object_p.h +++ /dev/null @@ -1,28 +0,0 @@ -// -*- c++ -*- - -#ifndef _GLIBMM_OBJECT_P_H -#define _GLIBMM_OBJECT_P_H - -#include - -namespace Glib -{ - -class Object_Class : public Glib::Class -{ -public: - typedef Object CppObjectType; - typedef GObject BaseObjectType; - typedef GObjectClass BaseClassType; - - static void class_init_function(void* g_class, void* class_data); - - const Glib::Class& init(); - - static Glib::Object* wrap_new(GObject*); -}; - -} // namespace Glib - -#endif /* _GLIBMM_OBJECT_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/optioncontext_p.h b/libs/glibmm2/glib/glibmm/private/optioncontext_p.h deleted file mode 100644 index 549b34970e..0000000000 --- a/libs/glibmm2/glib/glibmm/private/optioncontext_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_OPTIONCONTEXT_P_H -#define _GLIBMM_OPTIONCONTEXT_P_H - - -#endif /* _GLIBMM_OPTIONCONTEXT_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/optionentry_p.h b/libs/glibmm2/glib/glibmm/private/optionentry_p.h deleted file mode 100644 index f6f518f17b..0000000000 --- a/libs/glibmm2/glib/glibmm/private/optionentry_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_OPTIONENTRY_P_H -#define _GLIBMM_OPTIONENTRY_P_H - - -#endif /* _GLIBMM_OPTIONENTRY_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/optiongroup_p.h b/libs/glibmm2/glib/glibmm/private/optiongroup_p.h deleted file mode 100644 index fdd0cd9611..0000000000 --- a/libs/glibmm2/glib/glibmm/private/optiongroup_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_OPTIONGROUP_P_H -#define _GLIBMM_OPTIONGROUP_P_H - - -#endif /* _GLIBMM_OPTIONGROUP_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/regex_p.h b/libs/glibmm2/glib/glibmm/private/regex_p.h deleted file mode 100644 index 7f85ec2d1b..0000000000 --- a/libs/glibmm2/glib/glibmm/private/regex_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_REGEX_P_H -#define _GLIBMM_REGEX_P_H - - -#endif /* _GLIBMM_REGEX_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/shell_p.h b/libs/glibmm2/glib/glibmm/private/shell_p.h deleted file mode 100644 index e0b5b55f9a..0000000000 --- a/libs/glibmm2/glib/glibmm/private/shell_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_SHELL_P_H -#define _GLIBMM_SHELL_P_H - - -#endif /* _GLIBMM_SHELL_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/spawn_p.h b/libs/glibmm2/glib/glibmm/private/spawn_p.h deleted file mode 100644 index 262bdc7ed4..0000000000 --- a/libs/glibmm2/glib/glibmm/private/spawn_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_SPAWN_P_H -#define _GLIBMM_SPAWN_P_H - - -#endif /* _GLIBMM_SPAWN_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/thread_p.h b/libs/glibmm2/glib/glibmm/private/thread_p.h deleted file mode 100644 index 0f4d3c63d6..0000000000 --- a/libs/glibmm2/glib/glibmm/private/thread_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_THREAD_P_H -#define _GLIBMM_THREAD_P_H - - -#endif /* _GLIBMM_THREAD_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/private/unicode_p.h b/libs/glibmm2/glib/glibmm/private/unicode_p.h deleted file mode 100644 index 7f1cad22dc..0000000000 --- a/libs/glibmm2/glib/glibmm/private/unicode_p.h +++ /dev/null @@ -1,8 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_UNICODE_P_H -#define _GLIBMM_UNICODE_P_H - - -#endif /* _GLIBMM_UNICODE_P_H */ - diff --git a/libs/glibmm2/glib/glibmm/property.cc b/libs/glibmm2/glib/glibmm/property.cc deleted file mode 100644 index 955b3ad6e2..0000000000 --- a/libs/glibmm2/glib/glibmm/property.cc +++ /dev/null @@ -1,203 +0,0 @@ -// -*- c++ -*- -/* $Id: property.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#ifdef GLIBMM_PROPERTIES_ENABLED - -#include -#include - -// Temporary hack till GLib gets fixed. -#undef G_STRLOC -#define G_STRLOC __FILE__ ":" G_STRINGIFY(__LINE__) - - -namespace -{ - -// OK guys, please don't kill me for that. Let me explain what happens here. -// -// The task: -// --------- -// a) Autogenerate a property ID number for each custom property. This is an -// unsigned integer, which doesn't have to be assigned continuously. I.e., -// it can be everything but 0. -// b) If more than one object of the same class is instantiated, then of course -// the already installed properties must be used. That means, a property ID -// must not be associated with a single Glib::Property<> instance. Rather, -// the ID has to be associated with the class somehow. -// c) With only a GObject pointer and a property ID (and perhaps GParamSpec* -// if necessary), it must be possible to acquire a reference to the property -// wrapper instance. -// -// The current solution: -// --------------------- -// a) Assign an ID to a Glib::PropertyBase by calculating its offset in bytes -// relative to the beginning of the object's memory. dynamic_cast -// is used to retrieve a pointer to the very beginning of an instance. -// b) Recalculate a specific PropertyBase pointer by adding the property ID -// (i.e. the byte offset) to the object start pointer. The result is then -// just casted to PropertyBase*. -// -// Drawbacks: -// ---------- -// a) It's a low-level hack. Should be portable, yes, but we can only do very -// limited error checking. -// b) All Glib::Property<> instances are absolutely required to be direct data -// members of the class that implements the property. That seems a natural -// thing to do, but it's questionable whether it should be a requirement. -// -// Advantages: -// ----------- -// a) Although low-level, it's extremely easy to implement. The nasty code is -// concentrated in only two non-exposed utility functions, and it works -// just fine. -// b) It's efficient, and the memory footprint is very small too. -// c) I actually tried other ways, too, but ran into dead-ends everywhere. -// It's probably possible to implement this without calculating offsets, -// but it'll be very complicated, and involve a lot of qdata pointers to -// property tables andwhatnot. -// -// We can reimplement this later if necessary. - -static unsigned int property_to_id(Glib::ObjectBase& object, Glib::PropertyBase& property) -{ - void *const base_ptr = dynamic_cast(&object); - void *const prop_ptr = &property; - - const ptrdiff_t offset = static_cast(prop_ptr) - static_cast(base_ptr); - - g_return_val_if_fail(offset > 0 && offset < G_MAXINT, 0); - - return static_cast(offset); -} - -Glib::PropertyBase& property_from_id(Glib::ObjectBase& object, unsigned int property_id) -{ - void *const base_ptr = dynamic_cast(&object); - void *const prop_ptr = static_cast(base_ptr) + property_id; - - return *static_cast(prop_ptr); -} - -} // anonymous namespace - - -namespace Glib -{ - -void custom_get_property_callback(GObject* object, unsigned int property_id, - GValue* value, GParamSpec* param_spec) -{ - if(Glib::ObjectBase *const wrapper = Glib::ObjectBase::_get_current_wrapper(object)) - { - PropertyBase& property = property_from_id(*wrapper, property_id); - - if((property.object_ == wrapper) && (property.param_spec_ == param_spec)) - g_value_copy(property.value_.gobj(), value); - else - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, param_spec); - } -} - -void custom_set_property_callback(GObject* object, unsigned int property_id, - const GValue* value, GParamSpec* param_spec) -{ - if(Glib::ObjectBase *const wrapper = Glib::ObjectBase::_get_current_wrapper(object)) - { - PropertyBase& property = property_from_id(*wrapper, property_id); - - if((property.object_ == wrapper) && (property.param_spec_ == param_spec)) - { - g_value_copy(value, property.value_.gobj()); - g_object_notify(object, g_param_spec_get_name(param_spec)); - } - else - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, param_spec); - } -} - - -/**** Glib::PropertyBase ***************************************************/ - -PropertyBase::PropertyBase(Glib::Object& object, GType value_type) -: - object_ (&object), - value_ (), - param_spec_ (0) -{ - value_.init(value_type); -} - -PropertyBase::~PropertyBase() -{ - if(param_spec_) - g_param_spec_unref(param_spec_); -} - -bool PropertyBase::lookup_property(const Glib::ustring& name) -{ - g_assert(param_spec_ == 0); - - param_spec_ = g_object_class_find_property(G_OBJECT_GET_CLASS(object_->gobj()), name.c_str()); - - if(param_spec_) - { - g_assert(G_PARAM_SPEC_VALUE_TYPE(param_spec_) == G_VALUE_TYPE(value_.gobj())); - g_param_spec_ref(param_spec_); - } - - return (param_spec_ != 0); -} - -void PropertyBase::install_property(GParamSpec* param_spec) -{ - g_return_if_fail(param_spec != 0); - - const unsigned int property_id = property_to_id(*object_, *this); - - g_object_class_install_property(G_OBJECT_GET_CLASS(object_->gobj()), property_id, param_spec); - - param_spec_ = param_spec; - g_param_spec_ref(param_spec_); -} - -const char* PropertyBase::get_name_internal() const -{ - const char *const name = g_param_spec_get_name(param_spec_); - g_return_val_if_fail(name != 0, ""); - return name; -} - -Glib::ustring PropertyBase::get_name() const -{ - return Glib::ustring(get_name_internal()); -} - -void PropertyBase::notify() -{ - g_object_notify(object_->gobj(), g_param_spec_get_name(param_spec_)); -} - -} // namespace Glib - -#endif //GLIBMM_PROPERTIES_ENABLED - diff --git a/libs/glibmm2/glib/glibmm/property.h b/libs/glibmm2/glib/glibmm/property.h deleted file mode 100644 index 16122cb9a1..0000000000 --- a/libs/glibmm2/glib/glibmm/property.h +++ /dev/null @@ -1,174 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_PROPERTY_H -#define _GLIBMM_PROPERTY_H -/* $Id: property.h 291 2006-05-12 08:08:45Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#ifdef GLIBMM_PROPERTIES_ENABLED - -#include - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -#ifdef GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC -//For the AIX xlC compiler, I can not find a way to do this without putting the functions in the global namespace. murrayc -extern "C" -{ -#endif //GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC - -void custom_get_property_callback(GObject* object, unsigned int property_id, - GValue* value, GParamSpec* param_spec); - -void custom_set_property_callback(GObject* object, unsigned int property_id, - const GValue* value, GParamSpec* param_spec); - -#ifdef GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC -} //extern "C" -#endif //GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -class PropertyBase -{ -public: - Glib::ustring get_name() const; - void notify(); - -protected: - Glib::Object* object_; - Glib::ValueBase value_; - GParamSpec* param_spec_; - - PropertyBase(Glib::Object& object, GType value_type); - ~PropertyBase(); - - bool lookup_property(const Glib::ustring& name); - void install_property(GParamSpec* param_spec); - - const char* get_name_internal() const; - -private: - // noncopyable - PropertyBase(const PropertyBase&); - PropertyBase& operator=(const PropertyBase&); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - - friend void Glib::custom_get_property_callback(GObject* object, unsigned int property_id, - GValue* value, GParamSpec* param_spec); - - friend void Glib::custom_set_property_callback(GObject* object, unsigned int property_id, - const GValue* value, GParamSpec* param_spec); - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ -}; - - -template -class Property : public PropertyBase -{ -public: - typedef T PropertyType; - typedef Glib::Value ValueType; - - Property(Glib::Object& object, const Glib::ustring& name); - Property(Glib::Object& object, const Glib::ustring& name, const PropertyType& default_value); - - inline void set_value(const PropertyType& data); - inline PropertyType get_value() const; - - inline Property& operator=(const PropertyType& data); - inline operator PropertyType() const; - - inline Glib::PropertyProxy get_proxy(); -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/**** Glib::Property ****************************************************/ - -template -Property::Property(Glib::Object& object, const Glib::ustring& name) -: - PropertyBase(object, ValueType::value_type()) -{ - if(!lookup_property(name)) - install_property(static_cast(value_).create_param_spec(name)); -} - -template -Property::Property(Glib::Object& object, const Glib::ustring& name, - const typename Property::PropertyType& default_value) -: - PropertyBase(object, ValueType::value_type()) -{ - static_cast(value_).set(default_value); - - if(!lookup_property(name)) - install_property(static_cast(value_).create_param_spec(name)); -} - -template inline -void Property::set_value(const typename Property::PropertyType& data) -{ - static_cast(value_).set(data); - this->notify(); -} - -template inline -typename Property::PropertyType Property::get_value() const -{ - return static_cast(value_).get(); -} - -template inline -Property& Property::operator=(const typename Property::PropertyType& data) -{ - static_cast(value_).set(data); - this->notify(); - return *this; -} - -template inline -Property::operator T() const -{ - return static_cast(value_).get(); -} - -template inline -Glib::PropertyProxy Property::get_proxy() -{ - return Glib::PropertyProxy(object_, get_name_internal()); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - -#endif //GLIBMM_PROPERTIES_ENABLED - -#endif /* _GLIBMM_PROPERTY_H */ - diff --git a/libs/glibmm2/glib/glibmm/propertyproxy.cc b/libs/glibmm2/glib/glibmm/propertyproxy.cc deleted file mode 100644 index e9dad3c630..0000000000 --- a/libs/glibmm2/glib/glibmm/propertyproxy.cc +++ /dev/null @@ -1,24 +0,0 @@ -// -*- c++ -*- -/* $Id: propertyproxy.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* propertyproxy.cc - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - diff --git a/libs/glibmm2/glib/glibmm/propertyproxy.h b/libs/glibmm2/glib/glibmm/propertyproxy.h deleted file mode 100644 index 5f1aa18f4a..0000000000 --- a/libs/glibmm2/glib/glibmm/propertyproxy.h +++ /dev/null @@ -1,181 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_PROPERTYPROXY_H -#define _GLIBMM_PROPERTYPROXY_H -/* $Id: propertyproxy.h 291 2006-05-12 08:08:45Z murrayc $ */ - -/* propertyproxy.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#ifdef GLIBMM_PROPERTIES_ENABLED - -namespace Glib -{ - -/** A PropertyProxy can be used to get and set the value of an object's property. - * There are usually also get and set methods on the class itself, which you might find more convenient. - * With the PropertyProxy, you may use either get_value() and set_value(), or operator=() and - * operator PropertyType(), like so: - * @code - * int height = cellrenderer.property_height(); - * cellrenderer.property_editable() = true; - * @endcode - * - * You may also receive notification when a property's value changes, by connecting to signal_changed(). - */ -template -class PropertyProxy : public PropertyProxy_Base -{ -public: - typedef T PropertyType; - - PropertyProxy(ObjectBase* obj, const char* name) - : PropertyProxy_Base(obj, name) {} - - /** Set the value of this property. - * @param data The new value for the property. - */ - void set_value(const PropertyType& data); - - /** Get the value of this property. - * @result The current value of the property. - */ - PropertyType get_value() const; - - /** Set the value of this property back to its default value - */ - void reset_value() - { reset_property_(); } - - PropertyProxy& operator=(const PropertyType& data) - { this->set_value(data); return *this; } - - operator PropertyType() const - { return this->get_value(); } -}; - - -/** See PropertyProxy(). - * This property can be written, but not read, so there is no get_value() method. - */ -template -class PropertyProxy_WriteOnly : public PropertyProxy_Base -{ -public: - typedef T PropertyType; - - PropertyProxy_WriteOnly(ObjectBase* obj, const char* name) - : PropertyProxy_Base(obj, name) {} - - /** Set the value of this property. - * @param data The new value for the property. - */ - void set_value(const PropertyType& data); - - /** Set the value of this property back to its default value - */ - void reset_value() - { reset_property_(); } - - PropertyProxy_WriteOnly& operator=(const PropertyType& data) - { this->set_value(data); return *this; } -}; - -/** See PropertyProxy(). - * This property can be read, but not written, so there is no set_value() method. - */ -template -class PropertyProxy_ReadOnly : public PropertyProxy_Base -{ -public: - typedef T PropertyType; - - //obj is const, because this should be returned by const accessors. - PropertyProxy_ReadOnly(const ObjectBase* obj, const char* name) - : PropertyProxy_Base(const_cast(obj), name) {} - - /** Get the value of this property. - * @result The current value of the property. - */ - PropertyType get_value() const; - - operator PropertyType() const - { return this->get_value(); } -}; - - -/**** Template Implementation **********************************************/ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -template -void PropertyProxy::set_value(const T& data) -{ - Glib::Value value; - value.init(Glib::Value::value_type()); - - value.set(data); - set_property_(value); -} - -template -T PropertyProxy::get_value() const -{ - Glib::Value value; - value.init(Glib::Value::value_type()); - - get_property_(value); - return value.get(); -} - -//We previously just static_cast<> PropertyProxy_WriteOnly<> to PropertyProxy<> to call its set_value(), -//to avoid code duplication. -//But the AIX compiler does not like that hack. -template -void PropertyProxy_WriteOnly::set_value(const T& data) -{ - Glib::Value value; - value.init(Glib::Value::value_type()); - - value.set(data); - set_property_(value); -} - -//We previously just static_cast<> PropertyProxy_WriteOnly<> to PropertyProxy<> to call its set_value(), -//to avoid code duplication. -//But the AIX compiler does not like that hack. -template -T PropertyProxy_ReadOnly::get_value() const -{ - Glib::Value value; - value.init(Glib::Value::value_type()); - - get_property_(value); - return value.get(); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - -#endif //GLIBMM_PROPERTIES_ENABLED - -#endif /* _GLIBMM_PROPERTYPROXY_H */ - diff --git a/libs/glibmm2/glib/glibmm/propertyproxy_base.cc b/libs/glibmm2/glib/glibmm/propertyproxy_base.cc deleted file mode 100644 index 960cc0210e..0000000000 --- a/libs/glibmm2/glib/glibmm/propertyproxy_base.cc +++ /dev/null @@ -1,131 +0,0 @@ -// -*- c++ -*- -/* $Id: propertyproxy_base.cc 354 2006-11-28 12:59:19Z murrayc $ */ - -/* propertyproxy_base.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -#include -#include -#include - -namespace Glib -{ - -PropertyProxyConnectionNode::PropertyProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject) -: SignalProxyConnectionNode(slot, gobject) -{ -} - -void PropertyProxyConnectionNode::callback(GObject*, GParamSpec* pspec, gpointer data) //static -{ - if(pspec && data) - { - if(sigc::slot_base *const slot = SignalProxyBase::data_to_slot(data)) - (*static_cast*>(slot))(); - } -} - -#ifdef GLIBMM_PROPERTIES_ENABLED - -//SignalProxyProperty implementation: - -SignalProxyProperty::SignalProxyProperty(Glib::ObjectBase* obj, const gchar* property_name) -: SignalProxyBase(obj), - property_name_(property_name) -{ -} - -SignalProxyProperty::~SignalProxyProperty() -{ -} - -sigc::connection SignalProxyProperty::connect(const SlotType& sl) -{ - // Create a proxy to hold our connection info - // This will be deleted by destroy_notify_handler. - PropertyProxyConnectionNode* pConnectionNode = new PropertyProxyConnectionNode(sl, obj_->gobj()); - - // connect it to gtk+ - // pConnectionNode will be passed as the data argument to the callback. - // The callback will then call the virtual Object::property_change_notify() method, - // which will contain a switch/case statement which will examine the property name. - const Glib::ustring notify_signal_name = "notify::" + Glib::ustring(property_name_); - pConnectionNode->connection_id_ = g_signal_connect_data(obj_->gobj(), - notify_signal_name.c_str(), (GCallback)(&PropertyProxyConnectionNode::callback), pConnectionNode, - &PropertyProxyConnectionNode::destroy_notify_handler, - G_CONNECT_AFTER); - - return sigc::connection(pConnectionNode->slot_); -} - - -//PropertyProxy_Base implementation: - -PropertyProxy_Base::PropertyProxy_Base(ObjectBase* obj, const char* property_name) -: - obj_ (obj), - property_name_ (property_name) -{} - -PropertyProxy_Base::PropertyProxy_Base(const PropertyProxy_Base& other) -: - obj_ (other.obj_), - property_name_ (other.property_name_) -{} - -SignalProxyProperty PropertyProxy_Base::signal_changed() -{ - return SignalProxyProperty(obj_, property_name_); -} - -void PropertyProxy_Base::set_property_(const Glib::ValueBase& value) -{ - g_object_set_property(obj_->gobj(), property_name_, value.gobj()); -} - -void PropertyProxy_Base::get_property_(Glib::ValueBase& value) const -{ - g_object_get_property(obj_->gobj(), property_name_, value.gobj()); -} - -void PropertyProxy_Base::reset_property_() -{ - // Get information about the parameter: - const GParamSpec *const pParamSpec = - g_object_class_find_property(G_OBJECT_GET_CLASS(obj_->gobj()), property_name_); - - g_return_if_fail(pParamSpec != 0); - - Glib::ValueBase value; - value.init(G_PARAM_SPEC_VALUE_TYPE(pParamSpec)); - - // An explicit reset is not needed, because ValueBase:init() - // has already initialized it to the default value for this type. - // value.reset(); - - g_object_set_property(obj_->gobj(), property_name_, value.gobj()); -} - -#endif //GLIBMM_PROPERTIES_ENABLED - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/propertyproxy_base.h b/libs/glibmm2/glib/glibmm/propertyproxy_base.h deleted file mode 100644 index 4706b2f167..0000000000 --- a/libs/glibmm2/glib/glibmm/propertyproxy_base.h +++ /dev/null @@ -1,111 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_PROPERTYPROXY_BASE_H -#define _GLIBMM_PROPERTYPROXY_BASE_H -/* $Id: propertyproxy_base.h 337 2006-11-10 02:24:49Z murrayc $ */ - -/* propertyproxy_base.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#include -#include - -namespace Glib -{ - -#ifdef GLIBMM_PROPERTIES_ENABLED - -class ObjectBase; - -/// Use the connect() method, with sigc::ptr_fun() or sig::mem_fun() to connect signals to signal handlers. -class SignalProxyProperty : public SignalProxyBase -{ -public: - friend class PropertyProxy_Base; - - SignalProxyProperty(Glib::ObjectBase* obj, const gchar* property_name); - ~SignalProxyProperty(); - - typedef sigc::slot SlotType; - sigc::connection connect(const SlotType& sl); - -protected: - - const char* property_name_; //Should be a static string literal. - -private: - SignalProxyProperty& operator=(const SignalProxyProperty&); // not implemented -}; - - -class PropertyProxy_Base -{ -public: - PropertyProxy_Base(ObjectBase* obj, const char* property_name); - PropertyProxy_Base(const PropertyProxy_Base& other); - - ///This signal will be emitted when the property changes. - SignalProxyProperty signal_changed(); - - ObjectBase* get_object() const { return obj_; } - const char* get_name() const { return property_name_; } - -protected: - void set_property_(const Glib::ValueBase& value); - void get_property_(Glib::ValueBase& value) const; - void reset_property_(); - - ObjectBase* obj_; //The C++ wrapper instance of which this PropertyProxy is a member. - - const char* property_name_; //Should be a static string literal. - -private: - //Declared as private, but not implemented to prevent any automatically generated implementation. - PropertyProxy_Base& operator=(const PropertyProxy_Base&); -}; - -#endif //GLIBMM_PROPERTIES_ENABLED - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -class SignalProxyProperty; - -/** PropertyProxyConnectionNode is a connection node for use with SignalProxyProperty. - * It's like ProxyConnectionNode, but it contains the property name too. - * This is not public API. - */ -class PropertyProxyConnectionNode : public SignalProxyConnectionNode -{ -public: - friend class SignalProxyProperty; - - PropertyProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject); - - static void callback(GObject* object, GParamSpec* pspec, gpointer data); -}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - - - -#endif /* _GLIBMM_PROPERTYPROXY_BASE_H */ - diff --git a/libs/glibmm2/glib/glibmm/quark.cc b/libs/glibmm2/glib/glibmm/quark.cc deleted file mode 100644 index d674942f67..0000000000 --- a/libs/glibmm2/glib/glibmm/quark.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* $Id: quark.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* quark.cc - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -namespace Glib -{ - -QueryQuark::QueryQuark(const GQuark& q) - : quark_(q) -{} - -QueryQuark::QueryQuark(const ustring& s) -: quark_(g_quark_try_string(s.c_str())) -{} - -QueryQuark::QueryQuark(const char* s) -: quark_(g_quark_try_string(s)) -{} - -QueryQuark& QueryQuark::operator=(const QueryQuark& q) -{ quark_=q.quark_; - return *this; -} - -QueryQuark::operator ustring() const -{ - return ustring(g_quark_to_string(quark_)); -} - - -Quark::Quark(const ustring& s) -: QueryQuark(g_quark_from_string(s.c_str())) -{} - -Quark::Quark(const char* s) -: QueryQuark(g_quark_from_string(s)) -{} - -Quark::~Quark() -{} - - -GQuark quark_ = 0; -GQuark quark_cpp_wrapper_deleted_ = 0; - -} /* namespace Glib */ diff --git a/libs/glibmm2/glib/glibmm/quark.h b/libs/glibmm2/glib/glibmm/quark.h deleted file mode 100644 index c128ac77a6..0000000000 --- a/libs/glibmm2/glib/glibmm/quark.h +++ /dev/null @@ -1,88 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_QUARK_H -#define _GLIBMM_QUARK_H -/* $Id: quark.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* quark.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -/** Quarks are unique IDs in Glib for strings for use in - * hash table lookups. Each Quark is unique but may change - * between runs. - * - * QueryQuark is a converter class for looking up but not - * allocating an ID. An id means the quark lookup failed. - * - * Quark is used for actions for which the id should live on - * While QueryQuark should be used for queries. - * ie. - * void set_data (const Quark&, void * data); - * void* get_data (const QueryQuark&); - */ -class QueryQuark -{ - public: - QueryQuark(const GQuark& q); - QueryQuark(const ustring& s); - QueryQuark(const char*s); - ~QueryQuark() {} - QueryQuark& operator=(const QueryQuark& q); - operator ustring() const; - - operator GQuark() const {return quark_;} - GQuark id() const {return quark_;} - - private: - GQuark quark_; -}; - -class Quark: public QueryQuark -{ - public: - Quark(const ustring& s); - Quark(const char* s); - ~Quark(); -}; - -/** @relates Glib::QueryQuark */ -inline bool operator==(const QueryQuark& a, const QueryQuark& b) - { return a.id() == b.id(); } - -/** @relates Glib::QueryQuark */ -inline bool operator!=(const QueryQuark& a, const QueryQuark& b) - { return a.id() != b.id(); } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -// TODO: Put this somewhere else. -// (internal) The quark for C++ wrappers. -extern GLIBMM_API GQuark quark_; -extern GLIBMM_API GQuark quark_cpp_wrapper_deleted_; -#endif - -} /* namespace Glib */ - -#endif /* _GLIBMM_QUARK_H */ - diff --git a/libs/glibmm2/glib/glibmm/random.cc b/libs/glibmm2/glib/glibmm/random.cc deleted file mode 100644 index c91981bc13..0000000000 --- a/libs/glibmm2/glib/glibmm/random.cc +++ /dev/null @@ -1,76 +0,0 @@ -// -*- c++ -*- -/* $Id: random.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* random.cc - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -Rand::Rand() -: - gobject_ (g_rand_new()) -{} - -Rand::Rand(guint32 seed) -: - gobject_ (g_rand_new_with_seed(seed)) -{} - -Rand::~Rand() -{ - g_rand_free(gobject_); -} - -void Rand::set_seed(guint32 seed) -{ - g_rand_set_seed(gobject_, seed); -} - -bool Rand::get_bool() -{ - return g_rand_boolean(gobject_); -} - -guint32 Rand::get_int() -{ - return g_rand_int(gobject_); -} - -gint32 Rand::get_int_range(gint32 begin, gint32 end) -{ - return g_rand_int_range(gobject_, begin, end); -} - -double Rand::get_double() -{ - return g_rand_double(gobject_); -} - -double Rand::get_double_range(double begin, double end) -{ - return g_rand_double_range(gobject_, begin, end); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/random.h b/libs/glibmm2/glib/glibmm/random.h deleted file mode 100644 index 711d23b28e..0000000000 --- a/libs/glibmm2/glib/glibmm/random.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_RANDOM_H -#define _GLIBMM_RANDOM_H - -/* $Id: random.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* random.h - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -extern "C" { typedef struct _GRand GRand; } - - -namespace Glib -{ - -/** @defgroup Random Random Numbers - * Pseudo random number generator. - * @{ - */ - -class Rand -{ -public: - Rand(); - explicit Rand(guint32 seed); - ~Rand(); - - void set_seed(guint32 seed); - - bool get_bool(); - - guint32 get_int(); - gint32 get_int_range(gint32 begin, gint32 end); - - double get_double(); - double get_double_range(double begin, double end); - - GRand* gobj() { return gobject_; } - const GRand* gobj() const { return gobject_; } - -private: - GRand* gobject_; - - // noncopyable - Rand(const Rand&); - Rand& operator=(const Rand&); -}; - -/** @} group Random */ - -} // namespace Glib - - -#endif /* _GLIBMM_RANDOM_H */ - diff --git a/libs/glibmm2/glib/glibmm/refptr.h b/libs/glibmm2/glib/glibmm/refptr.h deleted file mode 100644 index a9e74ace8a..0000000000 --- a/libs/glibmm2/glib/glibmm/refptr.h +++ /dev/null @@ -1,341 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_REFPTR_H -#define _GLIBMM_REFPTR_H - -/* $Id: refptr.h 216 2005-04-07 08:28:46Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -namespace Glib -{ - -/** RefPtr<> is a reference-counting shared smartpointer. - * - * Some objects in gtkmm are obtained from a shared - * store. Consequently you cannot instantiate them yourself. Instead they - * return a RefPtr which behaves much like an ordinary pointer in that members - * can be reached with the usual object_ptr->member notation. - * Unlike most other smart pointers, RefPtr doesn't support dereferencing - * through *object_ptr. - * - * Reference counting means that a shared reference count is incremented each - * time a RefPtr is copied, and decremented each time a RefPtr is destroyed, - * for instance when it leaves its scope. When the reference count reaches - * zero, the contained object is deleted, meaning you don't need to remember - * to delete the object. - * - * RefPtr<> can store any class that has reference() and unreference() methods. - * In gtkmm, that is anything derived from Glib::ObjectBase, such as - * Gdk::Pixmap. - * - * See the "Memory Management" section in the "Programming with gtkmm" - * book for further information. - */ -template -class RefPtr -{ -public: - /** Default constructor - * - * Afterwards it will be null and use of -> will cause a segmentation fault. - */ - inline RefPtr(); - - /// Destructor - decrements reference count. - inline ~RefPtr(); - - /// For use only by the ::create() methods. - explicit inline RefPtr(T_CppObject* pCppObject); - - /** Copy constructor - * - * This increments the shared reference count. - */ - inline RefPtr(const RefPtr& src); - - /** Copy constructor (from different, but castable type). - * - * Increments the reference count. - */ - template - inline RefPtr(const RefPtr& src); - - /** Swap the contents of two RefPtr<>. - * This method swaps the internal pointers to T_CppObject. This can be - * done safely without involving a reference/unreference cycle and is - * therefore highly efficient. - */ - inline void swap(RefPtr& other); - - /// Copy from another RefPtr: - inline RefPtr& operator=(const RefPtr& src); - - /** Copy from different, but castable type). - * - * Increments the reference count. - */ - template - inline RefPtr& operator=(const RefPtr& src); - - /// Tests whether the RefPtr<> point to the same underlying instance. - inline bool operator==(const RefPtr& src) const; - - /// See operator==(). - inline bool operator!=(const RefPtr& src) const; - - /** Dereferencing. - * - * Use the methods of the underlying instance like so: - * refptr->memberfun(). - */ - inline T_CppObject* operator->() const; - - /** Test whether the RefPtr<> points to any underlying instance. - * - * Mimics usage of ordinary pointers: - * @code - * if (ptr) - * do_something(); - * @endcode - */ - inline operator bool() const; - - /// Set underlying instance to 0, decrementing reference count of existing instance appropriately. - inline void clear(); - - - /** Dynamic cast to derived class. - * - * The RefPtr can't be cast with the usual notation so instead you can use - * @code - * ptr_derived = RefPtr::cast_dynamic(ptr_base); - * @endcode - */ - template - static inline RefPtr cast_dynamic(const RefPtr& src); - - /** Static cast to derived class. - * - * Like the dynamic cast; the notation is - * @code - * ptr_derived = RefPtr::cast_static(ptr_base); - * @endcode - */ - template - static inline RefPtr cast_static(const RefPtr& src); - - /** Cast to non-const. - * - * The RefPtr can't be cast with the usual notation so instead you can use - * @code - * ptr_unconst = RefPtr::cast_const(ptr_const); - * @endcode - */ - template - static inline RefPtr cast_const(const RefPtr& src); - -private: - T_CppObject* pCppObject_; -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -// RefPtr<>::operator->() comes first here since it's used by other methods. -// If it would come after them it wouldn't be inlined. - -template inline -T_CppObject* RefPtr::operator->() const -{ - return pCppObject_; -} - -template inline -RefPtr::RefPtr() -: - pCppObject_ (0) -{} - -template inline -RefPtr::~RefPtr() -{ - if(pCppObject_) - pCppObject_->unreference(); // This could cause pCppObject to be deleted. -} - -template inline -RefPtr::RefPtr(T_CppObject* pCppObject) -: - pCppObject_ (pCppObject) -{} - -template inline -RefPtr::RefPtr(const RefPtr& src) -: - pCppObject_ (src.pCppObject_) -{ - if(pCppObject_) - pCppObject_->reference(); -} - -// The templated ctor allows copy construction from any object that's -// castable. Thus, it does downcasts: -// base_ref = derived_ref -template - template -inline -RefPtr::RefPtr(const RefPtr& src) -: - // A different RefPtr<> will not allow us access to pCppObject_. We need - // to add a get_underlying() for this, but that would encourage incorrect - // use, so we use the less well-known operator->() accessor: - pCppObject_ (src.operator->()) -{ - if(pCppObject_) - pCppObject_->reference(); -} - -template inline -void RefPtr::swap(RefPtr& other) -{ - T_CppObject *const temp = pCppObject_; - pCppObject_ = other.pCppObject_; - other.pCppObject_ = temp; -} - -template inline -RefPtr& RefPtr::operator=(const RefPtr& src) -{ - // In case you haven't seen the swap() technique to implement copy - // assignment before, here's what it does: - // - // 1) Create a temporary RefPtr<> instance via the copy ctor, thereby - // increasing the reference count of the source object. - // - // 2) Swap the internal object pointers of *this and the temporary - // RefPtr<>. After this step, *this already contains the new pointer, - // and the old pointer is now managed by temp. - // - // 3) The destructor of temp is executed, thereby unreferencing the - // old object pointer. - // - // This technique is described in Herb Sutter's "Exceptional C++", and - // has a number of advantages over conventional approaches: - // - // - Code reuse by calling the copy ctor. - // - Strong exception safety for free. - // - Self assignment is handled implicitely. - // - Simplicity. - // - It just works and is hard to get wrong; i.e. you can use it without - // even thinking about it to implement copy assignment whereever the - // object data is managed indirectly via a pointer, which is very common. - - RefPtr temp (src); - this->swap(temp); - return *this; -} - -template - template -inline -RefPtr& RefPtr::operator=(const RefPtr& src) -{ - RefPtr temp (src); - this->swap(temp); - return *this; -} - -template inline -bool RefPtr::operator==(const RefPtr& src) const -{ - return (pCppObject_ == src.pCppObject_); -} - -template inline -bool RefPtr::operator!=(const RefPtr& src) const -{ - return (pCppObject_ != src.pCppObject_); -} - -template inline -RefPtr::operator bool() const -{ - return (pCppObject_ != 0); -} - -template inline -void RefPtr::clear() -{ - RefPtr temp; // swap with an empty RefPtr<> to clear *this - this->swap(temp); -} - -template - template -inline -RefPtr RefPtr::cast_dynamic(const RefPtr& src) -{ - T_CppObject *const pCppObject = dynamic_cast(src.operator->()); - - if(pCppObject) - pCppObject->reference(); - - return RefPtr(pCppObject); -} - -template - template -inline -RefPtr RefPtr::cast_static(const RefPtr& src) -{ - T_CppObject *const pCppObject = static_cast(src.operator->()); - - if(pCppObject) - pCppObject->reference(); - - return RefPtr(pCppObject); -} - -template - template -inline -RefPtr RefPtr::cast_const(const RefPtr& src) -{ - T_CppObject *const pCppObject = const_cast(src.operator->()); - - if(pCppObject) - pCppObject->reference(); - - return RefPtr(pCppObject); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -/** @relates Glib::RefPtr */ -template inline -void swap(RefPtr& lhs, RefPtr& rhs) -{ - lhs.swap(rhs); -} - -} // namespace Glib - - -#endif /* _GLIBMM_REFPTR_H */ - diff --git a/libs/glibmm2/glib/glibmm/regex.cc b/libs/glibmm2/glib/glibmm/regex.cc deleted file mode 100644 index 8cc257ec60..0000000000 --- a/libs/glibmm2/glib/glibmm/regex.cc +++ /dev/null @@ -1,451 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -/* Copyright (C) 2007 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -namespace Glib -{ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::RefPtr Regex::create(const Glib::ustring& pattern, - RegexCompileFlags compile_options, - RegexMatchFlags match_options) -#else -Glib::RefPtr Regex::create(const Glib::ustring& pattern, - RegexCompileFlags compile_options, - RegexMatchFlags match_options, - std::auto_ptr& error) -#endif /* GLIBMM_EXCEPTIONS_ENABLED */ -{ - GError* gerror = 0; - GRegex* regex = g_regex_new(pattern.c_str(), (GRegexCompileFlags)compile_options, - (GRegexMatchFlags)match_options, &gerror); - - if(gerror) -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); -#else - error = Glib::Error::throw_exception(gerror); -#endif - return Glib::wrap(regex); -} - -// static -Glib::ustring Regex::escape_string(const Glib::ustring& string) -{ - const Glib::ScopedPtr buf (g_regex_escape_string(string.raw().c_str(), - string.raw().size())); - return Glib::ustring(buf.get()); -} - -bool Regex::match(const Glib::ustring& string, RegexMatchFlags match_options) -{ - return g_regex_match(gobj(), string.c_str(), (GRegexMatchFlags)(match_options), 0); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_full(gobj(), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_full(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -bool Regex::match_all(const Glib::ustring& string, RegexMatchFlags match_options) -{ - return g_regex_match_all(gobj(), string.c_str(), ((GRegexMatchFlags)(match_options)), 0); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_all_full(gobj(), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_all_full(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options) -#else -Glib::ustring Regex::replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace(gobj(), string.c_str(), -1, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options) -#else -Glib::ustring Regex::replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace_literal(gobj(), string.c_str(), -1, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::StringArrayHandle Regex::split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens) const -#else -Glib::StringArrayHandle Regex::split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::StringArrayHandle retvalue = Glib::StringArrayHandle(g_regex_split_full(const_cast(gobj()), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), max_tokens, &(gerror)), Glib::OWNERSHIP_DEEP); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -} // namespace Glib - -namespace -{ -} // anonymous namespace - - -Glib::RegexError::RegexError(Glib::RegexError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_REGEX_ERROR, error_code, error_message) -{} - -Glib::RegexError::RegexError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::RegexError::Code Glib::RegexError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::RegexError::throw_func(GError* gobject) -{ - throw Glib::RegexError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::RegexError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::RegexError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -/* Why reinterpret_cast(gobject) is needed: - * - * A Regex instance is in fact always a GRegex instance. - * Unfortunately, GRegex cannot be a member of Regex, - * because it is an opaque struct. Also, the C interface does not provide - * any hooks to install a destroy notification handler, thus we cannot - * wrap it dynamically either. - * - * The cast works because Regex does not have any member data, and - * it is impossible to derive from it. This is ensured by not implementing - * the (protected) default constructor. The ctor is protected rather than - * private just to avoid a compile warning. - */ - -namespace Glib -{ - -Glib::RefPtr wrap(GRegex* object, bool take_copy) -{ - if(take_copy && object) - g_regex_ref(object); - - // See the comment at the top of this file, if you want to know why the cast works. - return Glib::RefPtr(reinterpret_cast(object)); -} - -} // namespace Glib - - -namespace Glib -{ - - -void Regex::reference() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - g_regex_ref(reinterpret_cast(const_cast(this))); -} - -void Regex::unreference() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - g_regex_unref(reinterpret_cast(const_cast(this))); -} - -GRegex* Regex::gobj() -{ - // See the comment at the top of this file, if you want to know why the cast works. - return reinterpret_cast(this); -} - -const GRegex* Regex::gobj() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - return reinterpret_cast(this); -} - -GRegex* Regex::gobj_copy() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - GRegex *const gobject = reinterpret_cast(const_cast(this)); - g_regex_ref(gobject); - return gobject; -} - - -Glib::ustring Regex::get_pattern() const -{ - return Glib::convert_const_gchar_ptr_to_ustring(g_regex_get_pattern(const_cast(gobj()))); -} - -int Regex::get_max_backref() const -{ - return g_regex_get_max_backref(const_cast(gobj())); -} - -int Regex::get_capture_count() const -{ - return g_regex_get_capture_count(const_cast(gobj())); -} - -int Regex::get_string_number(const Glib::ustring& name) const -{ - return g_regex_get_string_number(const_cast(gobj()), name.c_str()); -} - -bool Regex::match_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options, RegexMatchFlags match_options) -{ - return g_regex_match_simple(pattern.c_str(), string.c_str(), ((GRegexCompileFlags)(compile_options)), ((GRegexMatchFlags)(match_options))); -} - - -Glib::StringArrayHandle Regex::split_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options, RegexMatchFlags match_options) -{ - return Glib::StringArrayHandle(g_regex_split_simple(pattern.c_str(), string.c_str(), ((GRegexCompileFlags)(compile_options)), ((GRegexMatchFlags)(match_options))), Glib::OWNERSHIP_DEEP); -} - - -Glib::StringArrayHandle Regex::split(const Glib::ustring& string, RegexMatchFlags match_options) -{ - return Glib::StringArrayHandle(g_regex_split(gobj(), string.c_str(), ((GRegexMatchFlags)(match_options))), Glib::OWNERSHIP_DEEP); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::StringArrayHandle Regex::split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options, int max_tokens) const -#else -Glib::StringArrayHandle Regex::split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options, int max_tokens, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::StringArrayHandle retvalue = Glib::StringArrayHandle(g_regex_split_full(const_cast(gobj()), string, string_len, start_position, ((GRegexMatchFlags)(match_options)), max_tokens, &(gerror)), Glib::OWNERSHIP_DEEP); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options) -#else -Glib::ustring Regex::replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace(gobj(), string, string_len, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace_literal(const gchar * string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options) -#else -Glib::ustring Regex::replace_literal(const gchar * string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace_literal(gobj(), string, string_len, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval, gpointer user_data) -#else -Glib::ustring Regex::replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval, gpointer user_data, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace_eval(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), eval, user_data, &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; - -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::check_replacement(const Glib::ustring& replacement, gboolean* has_references) -#else -bool Regex::check_replacement(const Glib::ustring& replacement, gboolean* has_references, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_check_replacement(replacement.c_str(), has_references, &(gerror)); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -} // namespace Glib - - diff --git a/libs/glibmm2/glib/glibmm/regex.h b/libs/glibmm2/glib/glibmm/regex.h deleted file mode 100644 index a9f6276e81..0000000000 --- a/libs/glibmm2/glib/glibmm/regex.h +++ /dev/null @@ -1,676 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_REGEX_H -#define _GLIBMM_REGEX_H - - -/* Copyright (C) 2007 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -typedef struct _GRegex GRegex; -#endif - -namespace Glib -{ - -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %RegexCompileFlags operator|(RegexCompileFlags, RegexCompileFlags)
- * %RegexCompileFlags operator&(RegexCompileFlags, RegexCompileFlags)
- * %RegexCompileFlags operator^(RegexCompileFlags, RegexCompileFlags)
- * %RegexCompileFlags operator~(RegexCompileFlags)
- * %RegexCompileFlags& operator|=(RegexCompileFlags&, RegexCompileFlags)
- * %RegexCompileFlags& operator&=(RegexCompileFlags&, RegexCompileFlags)
- * %RegexCompileFlags& operator^=(RegexCompileFlags&, RegexCompileFlags)
- */ -enum RegexCompileFlags -{ - REGEX_CASELESS = 1 << 0, - REGEX_MULTILINE = 1 << 1, - REGEX_DOTALL = 1 << 2, - REGEX_EXTENDED = 1 << 3, - REGEX_ANCHORED = 1 << 4, - REGEX_DOLLAR_ENDONLY = 1 << 5, - REGEX_UNGREEDY = 1 << 9, - REGEX_RAW = 1 << 11, - REGEX_NO_AUTO_CAPTURE = 1 << 12, - REGEX_OPTIMIZE = 1 << 13, - REGEX_DUPNAMES = 1 << 19, - REGEX_NEWLINE_CR = 1 << 20, - REGEX_NEWLINE_LF = 1 << 21, - REGEX_NEWLINE_CRLF = 0x100000 -}; - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags operator|(RegexCompileFlags lhs, RegexCompileFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags operator&(RegexCompileFlags lhs, RegexCompileFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags operator^(RegexCompileFlags lhs, RegexCompileFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags operator~(RegexCompileFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags& operator|=(RegexCompileFlags& lhs, RegexCompileFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags& operator&=(RegexCompileFlags& lhs, RegexCompileFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline RegexCompileFlags& operator^=(RegexCompileFlags& lhs, RegexCompileFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %RegexMatchFlags operator|(RegexMatchFlags, RegexMatchFlags)
- * %RegexMatchFlags operator&(RegexMatchFlags, RegexMatchFlags)
- * %RegexMatchFlags operator^(RegexMatchFlags, RegexMatchFlags)
- * %RegexMatchFlags operator~(RegexMatchFlags)
- * %RegexMatchFlags& operator|=(RegexMatchFlags&, RegexMatchFlags)
- * %RegexMatchFlags& operator&=(RegexMatchFlags&, RegexMatchFlags)
- * %RegexMatchFlags& operator^=(RegexMatchFlags&, RegexMatchFlags)
- */ -enum RegexMatchFlags -{ - REGEX_MATCH_ANCHORED = 1 << 4, - REGEX_MATCH_NOTBOL = 1 << 7, - REGEX_MATCH_NOTEOL = 1 << 8, - REGEX_MATCH_NOTEMPTY = 1 << 10, - REGEX_MATCH_PARTIAL = 1 << 15, - REGEX_MATCH_NEWLINE_CR = 1 << 20, - REGEX_MATCH_NEWLINE_LF = 1 << 21, - REGEX_MATCH_NEWLINE_CRLF = 0x100000, - REGEX_MATCH_NEWLINE_ANY = 1 << 22 -}; - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags operator|(RegexMatchFlags lhs, RegexMatchFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags operator&(RegexMatchFlags lhs, RegexMatchFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags operator^(RegexMatchFlags lhs, RegexMatchFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags operator~(RegexMatchFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags& operator|=(RegexMatchFlags& lhs, RegexMatchFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags& operator&=(RegexMatchFlags& lhs, RegexMatchFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline RegexMatchFlags& operator^=(RegexMatchFlags& lhs, RegexMatchFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** Exception class for Regex - */ -class RegexError : public Glib::Error -{ -public: - enum Code - { - COMPILE, - OPTIMIZE, - REPLACE, - MATCH - }; - - RegexError(Code error_code, const Glib::ustring& error_message); - explicit RegexError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** Perl-compatible regular expressions - matches strings against regular expressions. - * - * The Glib::Regex functions implement regular expression pattern matching using - * syntax and semantics similar to Perl regular expression. - * - * Some functions accept a start_position argument, setting it differs from just - * passing over a shortened string and setting REGEX_MATCH_NOTBOL in the case - * of a pattern that begins with any kind of lookbehind assertion. For example, - * consider the pattern "\Biss\B" which finds occurrences of "iss" in the middle - * of words. ("\B" matches only if the current position in the subject is not a - * word boundary.) When applied to the string "Mississipi" from the fourth byte, - * namely "issipi", it does not match, because "\B" is always false at the - * start of the subject, which is deemed to be a word boundary. However, if - * the entire string is passed , but with start_position set to 4, it finds the - * second occurrence of "iss" because it is able to look behind the starting point - * to discover that it is preceded by a letter. - * - * Note that, unless you set the REGEX_RAW flag, all the strings passed to these - * functions must be encoded in UTF-8. The lengths and the positions inside the - * strings are in bytes and not in characters, so, for instance, - * "\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a single - * character. If you set REGEX_RAW the strings can be non-valid UTF-8 strings - * and a byte is treated as a character, so "\xc3\xa0" is two bytes and - * two characters long. - * - * When matching a pattern, "\n" matches only against a "\n" character in the - * string, and "\r" matches only a "\r" character. To match any newline sequence - * use "\R". This particular group matches either the two-character sequence - * CR + LF ("\r\n"), or one of the single characters LF (linefeed, U+000A, "\n"), - * VT (vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"), CR (carriage - * return, U+000D, "\r"), NEL (next line, U+0085), LS (line separator, U+2028), - * or PS (paragraph separator, U+2029). - * - * The behaviour of the dot, circumflex, and dollar metacharacters are affected - * by newline characters, the default is to recognize any newline character (the - * same characters recognized by "\R"). This can be changed with REGEX_NEWLINE_CR, - * REGEX_NEWLINE_LF and REGEX_NEWLINE_CRLF compile options, and with - * REGEX_MATCH_NEWLINE_ANY, REGEX_MATCH_NEWLINE_CR, REGEX_MATCH_NEWLINE_LF - * and REGEX_MATCH_NEWLINE_CRLF match options. These settings are also - * relevant when compiling a pattern if REGEX_EXTENDED is set, and an unescaped - * "#" outside a character class is encountered. This indicates a comment that - * lasts until after the next newline. - * - * Creating and manipulating the same Glib::Regex class from different threads is - * not a problem as Glib::Regex does not modify its internal state between creation and - * destruction, on the other hand Glib::MatchInfo is not threadsafe. - * - * The regular expressions low level functionalities are obtained through the - * excellent PCRE library written by Philip Hazel. - * - * @newin2p14 - */ -class Regex -{ - public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef Regex CppObjectType; - typedef GRegex BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - - // For use with Glib::RefPtr<> only. - void reference() const; - void unreference() const; - - ///Provides access to the underlying C instance. - GRegex* gobj(); - - ///Provides access to the underlying C instance. - const GRegex* gobj() const; - - ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. - GRegex* gobj_copy() const; - -protected: - // Do not derive this. Glib::Regex can neither be constructed nor deleted. - Regex(); - void operator delete(void*, size_t); - -private: - // noncopyable - Regex(const Regex&); - Regex& operator=(const Regex&); - - -public: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static Glib::RefPtr create(const Glib::ustring& pattern, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0)); -#else - static Glib::RefPtr create(const Glib::ustring& pattern, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0), std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - - /** Gets the pattern string associated with @a regex , i.e.\ a copy of - * the string passed to g_regex_new(). - * @return The pattern of @a regex - * - * @newin2p14. - */ - Glib::ustring get_pattern() const; - - /** Returns: the number of the highest back reference - * @return The number of the highest back reference - * - * @newin2p14. - */ - int get_max_backref() const; - - /** Returns: the number of capturing subpatterns - * @return The number of capturing subpatterns - * - * @newin2p14. - */ - int get_capture_count() const; - - /** Retrieves the number of the subexpression named @a name . - * @param name Name of the subexpression. - * @return The number of the subexpression or -1 if @a name - * does not exists - * - * @newin2p14. - */ - int get_string_number(const Glib::ustring& name) const; - - static Glib::ustring escape_string(const Glib::ustring& string); - - - /** Scans for a match in @a string for @a pattern . - * - * This function is equivalent to g_regex_match() but it does not - * require to compile the pattern with g_regex_new(), avoiding some - * lines of code when you need just to do a match without extracting - * substrings, capture counts, and so on. - * - * If this function is to be called on the same @a pattern more than - * once, it's more efficient to compile the pattern once with - * g_regex_new() and then use g_regex_match(). - * @param pattern The regular expression. - * @param string The string to scan for matches. - * @param compile_options Compile options for the regular expression. - * @param match_options Match options. - * @return true is the string matched, false otherwise - * - * @newin2p14. - */ - static bool match_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0)); - - //TODO: _WRAP_METHOD(bool match(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo **match_info = 0), g_regex_match) - bool match(const Glib::ustring& string, RegexMatchFlags match_options = static_cast(0)); - - //TODO: Wrap GMatchInfo as an iterator: - //_WRAP_METHOD(bool match_full(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo** match_info = 0), g_regex_match_full, errthrow) - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options); -#else - bool match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options); -#else - bool match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - //TODO: _WRAP_METHOD(bool match_all(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo ** match_info = 0), g_regex_match_all) - bool match_all(const Glib::ustring& string, RegexMatchFlags match_options = static_cast(0)); - - //TODO: _WRAP_METHOD(bool match_all_full(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo** match_info = 0), g_regex_match_all_full, errthrow) - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options); -#else - bool match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options); -#else - bool match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - - /** Breaks the string on the pattern, and returns an array of - * the tokens. If the pattern contains capturing parentheses, - * then the text for each of the substrings will also be returned. - * If the pattern does not match anywhere in the string, then the - * whole string is returned as the first token. - * - * This function is equivalent to g_regex_split() but it does - * not require to compile the pattern with g_regex_new(), avoiding - * some lines of code when you need just to do a split without - * extracting substrings, capture counts, and so on. - * - * If this function is to be called on the same @a pattern more than - * once, it's more efficient to compile the pattern once with - * g_regex_new() and then use g_regex_split(). - * - * As a special case, the result of splitting the empty string "" - * is an empty vector, not a vector containing a single string. - * The reason for this special case is that being able to represent - * a empty vector is typically more useful than consistent handling - * of empty elements. If you do need to represent empty elements, - * you'll need to check for the empty string before calling this - * function. - * - * A pattern that can match empty strings splits @a string into - * separate characters wherever it matches the empty string between - * characters. For example splitting "ab c" using as a separator - * "\s*", you will get "a", "b" and "c". - * @param pattern The regular expression. - * @param string The string to scan for matches. - * @param compile_options Compile options for the regular expression. - * @param match_options Match options. - * @return A 0-terminated gchar ** array. Free it using g_strfreev() - * - * @newin2p14. - */ - static Glib::StringArrayHandle split_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0)); - - /** Breaks the string on the pattern, and returns an array of the tokens. - * If the pattern contains capturing parentheses, then the text for each - * of the substrings will also be returned. If the pattern does not match - * anywhere in the string, then the whole string is returned as the first - * token. - * - * As a special case, the result of splitting the empty string "" is an - * empty vector, not a vector containing a single string. The reason for - * this special case is that being able to represent a empty vector is - * typically more useful than consistent handling of empty elements. If - * you do need to represent empty elements, you'll need to check for the - * empty string before calling this function. - * - * A pattern that can match empty strings splits @a string into separate - * characters wherever it matches the empty string between characters. - * For example splitting "ab c" using as a separator "\s*", you will get - * "a", "b" and "c". - * @param string The string to split with the pattern. - * @param match_options Match time option flags. - * @return A 0-terminated gchar ** array. Free it using g_strfreev() - * - * @newin2p14. - */ - Glib::StringArrayHandle split(const Glib::ustring& string, RegexMatchFlags match_options = static_cast(0)); - - - /** Breaks the string on the pattern, and returns an array of the tokens. - * If the pattern contains capturing parentheses, then the text for each - * of the substrings will also be returned. If the pattern does not match - * anywhere in the string, then the whole string is returned as the first - * token. - * - * As a special case, the result of splitting the empty string "" is an - * empty vector, not a vector containing a single string. The reason for - * this special case is that being able to represent a empty vector is - * typically more useful than consistent handling of empty elements. If - * you do need to represent empty elements, you'll need to check for the - * empty string before calling this function. - * - * A pattern that can match empty strings splits @a string into separate - * characters wherever it matches the empty string between characters. - * For example splitting "ab c" using as a separator "\s*", you will get - * "a", "b" and "c". - * - * Setting @a start_position differs from just passing over a shortened - * string and setting G::REGEX_MATCH_NOTBOL in the case of a pattern - * that begins with any kind of lookbehind assertion, such as "\b". - * @param string The string to split with the pattern. - * @param string_len The length of @a string , or -1 if @a string is nul-terminated. - * @param start_position Starting index of the string to match. - * @param match_options Match time option flags. - * @param max_tokens The maximum number of tokens to split @a string into. - * If this is less than 1, the string is split completely. - * @param error Return location for a G::Error. - * @return A 0-terminated gchar ** array. Free it using g_strfreev() - * - * @newin2p14. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::StringArrayHandle split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = static_cast(0), int max_tokens = 0) const; -#else - Glib::StringArrayHandle split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options, int max_tokens, std::auto_ptr& error) const; -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::StringArrayHandle split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens) const; -#else - Glib::StringArrayHandle split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens, std::auto_ptr& error) const; -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - - /** Replaces all occurances of the pattern in @a regex with the - * replacement text. Backreferences of the form '\number' or - * '\g<number>' in the replacement text are interpolated by the - * number-th captured subexpression of the match, '\g<name>' refers - * to the captured subexpression with the given name. '\0' refers to the - * complete match, but '\0' followed by a number is the octal representation - * of a character. To include a literal '\' in the replacement, write '\\'. - * There are also escapes that changes the case of the following text: - * - * <variablelist> - * <varlistentry><term>\l</term> - * <listitem> - * Convert to lower case the next character - * </listitem> - * </varlistentry> - * <varlistentry><term>\u</term> - * <listitem> - * Convert to upper case the next character - * </listitem> - * </varlistentry> - * <varlistentry><term>\L</term> - * <listitem> - * Convert to lower case till \E - * </listitem> - * </varlistentry> - * <varlistentry><term>\U</term> - * <listitem> - * Convert to upper case till \E - * </listitem> - * </varlistentry> - * <varlistentry><term>\E</term> - * <listitem> - * End case modification - * </listitem> - * </varlistentry> - * </variablelist> - * - * If you do not need to use backreferences use g_regex_replace_literal(). - * - * The @a replacement string must be UTF-8 encoded even if G::REGEX_RAW was - * passed to g_regex_new(). If you want to use not UTF-8 encoded stings - * you can use g_regex_replace_literal(). - * - * Setting @a start_position differs from just passing over a shortened - * string and setting G::REGEX_MATCH_NOTBOL in the case of a pattern that - * begins with any kind of lookbehind assertion, such as "\b". - * @param string The string to perform matches against. - * @param string_len The length of @a string , or -1 if @a string is nul-terminated. - * @param start_position Starting index of the string to match. - * @param replacement Text to replace each match with. - * @param match_options Options for the match. - * @param error Location to store the error occuring, or 0 to ignore errors. - * @return A newly allocated string containing the replacements - * - * @newin2p14. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast(0)); -#else - Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options); -#else - Glib::ustring replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - - /** Replaces all occurances of the pattern in @a regex with the - * replacement text. @a replacement is replaced literally, to - * include backreferences use g_regex_replace(). - * - * Setting @a start_position differs from just passing over a - * shortened string and setting G::REGEX_MATCH_NOTBOL in the - * case of a pattern that begins with any kind of lookbehind - * assertion, such as "\b". - * @param string The string to perform matches against. - * @param string_len The length of @a string , or -1 if @a string is nul-terminated. - * @param start_position Starting index of the string to match. - * @param replacement Text to replace each match with. - * @param match_options Options for the match. - * @param error Location to store the error occuring, or 0 to ignore errors. - * @return A newly allocated string containing the replacements - * - * @newin2p14. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace_literal(const gchar *string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast(0)); -#else - Glib::ustring replace_literal(const gchar * string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options); -#else - Glib::ustring replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - - /** Replaces occurances of the pattern in regex with the output of - * @a eval for that occurance. - * - * Setting @a start_position differs from just passing over a shortened - * string and setting G::REGEX_MATCH_NOTBOL in the case of a pattern - * that begins with any kind of lookbehind assertion, such as "\b". - * @param string String to perform matches against. - * @param string_len The length of @a string , or -1 if @a string is nul-terminated. - * @param start_position Starting index of the string to match. - * @param match_options Options for the match. - * @param eval A function to call for each match. - * @param user_data User data to pass to the function. - * @param error Location to store the error occuring, or 0 to ignore errors. - * @return A newly allocated string containing the replacements - * - * @newin2p14. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval, gpointer user_data); -#else - Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval, gpointer user_data, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - - /** Checks whether @a replacement is a valid replacement string - * (see g_regex_replace()), i.e.\ that all escape sequences in - * it are valid. - * - * If @a has_references is not 0 then @a replacement is checked - * for pattern references. For instance, replacement text 'foo\\n' - * does not contain references and may be evaluated without information - * about actual match, but '\0\1' (whole match followed by first - * subpattern) requires valid G::MatchInfo object. - * @param replacement The replacement string. - * @param has_references Location to store information about - * references in @a replacement or 0. - * @param error Location to store error. - * @return Whether @a replacement is a valid replacement string - * - * @newin2p14. - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references); -#else - static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - -/* Match info */ -/* -GRegex *g_match_info_get_regex (const GMatchInfo *match_info); -const gchar *g_match_info_get_string (const GMatchInfo *match_info); - -void g_match_info_free (GMatchInfo *match_info); - _WRAP_METHOD(bool g_match_info_next (GMatchInfo *match_info, - GError **error); - _WRAP_METHOD(bool g_match_info_matches (const GMatchInfo *match_info); - _WRAP_METHOD(int g_match_info_get_match_count (const GMatchInfo *match_info); - _WRAP_METHOD(bool g_match_info_is_partial_match (const GMatchInfo *match_info); -Glib::ustring g_match_info_expand_references(const GMatchInfo *match_info, - Glib::ustring& string_to_expand, - GError **error); -Glib::ustring g_match_info_fetch (const GMatchInfo *match_info, - int match_num); - _WRAP_METHOD(bool g_match_info_fetch_pos (const GMatchInfo *match_info, - int match_num, - int *start_pos, - int *end_pos); -Glib::ustring g_match_info_fetch_named (const GMatchInfo *match_info, - Glib::ustring& name); - _WRAP_METHOD(bool g_match_info_fetch_named_pos (const GMatchInfo *match_info, - Glib::ustring& name, - int *start_pos, - int *end_pos); -gchar **g_match_info_fetch_all (const GMatchInfo *match_info); -*/ - - -}; - -} // namespace Glib - - -namespace Glib -{ - - /** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates Glib::Regex - */ - Glib::RefPtr wrap(GRegex* object, bool take_copy = false); - -} // namespace Glib - - -#endif /* _GLIBMM_REGEX_H */ - diff --git a/libs/glibmm2/glib/glibmm/sarray.h b/libs/glibmm2/glib/glibmm/sarray.h deleted file mode 100644 index c9720b5028..0000000000 --- a/libs/glibmm2/glib/glibmm/sarray.h +++ /dev/null @@ -1,108 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_SARRAY_H -#define _GLIBMM_SARRAY_H - -/* $Id: sarray.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* array.h - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include - -namespace Glib { typedef Glib::ArrayHandle SArray; } - -#if 0 - -namespace Glib -{ - -template <> -inline void cpp_type_to_c_type(const ustring& cpp_value, type_constpch& ref_c_value) -{ - ref_c_value = cpp_value.c_str(); -} - -template <> -inline void cpp_type_to_c_type(const std::string& cpp_value, type_constpch& ref_c_value) -{ - ref_c_value = cpp_value.c_str(); -} - -typedef Array SArray; - -/* -class SArray: public Array -{ -public: - typedef const char* T_c; - typedef Array type_base; - - SArray(const SArray& src); - - // copy other containers - template - SArray(const T_container& t) - { - owned_ = Array_Helpers::Traits::get_owned(); - size_ = Array_Helpers::Traits::get_size(t); - pData_ = Array_Helpers::Traits::get_data(t); - } - - SArray(const T_c* pValues, size_type size); - - // copy a sequence - template - SArray(Iterator b, Iterator e); - - operator std::vector() const; - operator std::vector() const; - operator std::vector() const; - - operator std::deque() const; - operator std::deque() const; - operator std::deque() const; - - operator std::list() const; - operator std::list() const; - operator std::list() const; -}; - - -//template -//SArray::SArray(const T_container& t) -//: type_base(t) -//{ -//} - - -template -SArray::SArray(Iterator b, Iterator e) -: type_base(b, e) -{ -} -*/ - -} // namespace Glib - -#endif /* #if 0 */ - -#endif // _GLIBMM_SARRAY_H - diff --git a/libs/glibmm2/glib/glibmm/shell.cc b/libs/glibmm2/glib/glibmm/shell.cc deleted file mode 100644 index e20304aa0b..0000000000 --- a/libs/glibmm2/glib/glibmm/shell.cc +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: shell.ccg,v 1.1 2003/01/07 16:58:38 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -/**** shell utility functions **********************************************/ - -Glib::ArrayHandle shell_parse_argv(const std::string& command_line) -{ - char** argv = 0; - int argc = 0; - GError* error = 0; - - g_shell_parse_argv(command_line.c_str(), &argc, &argv, &error); - - if(error) - Glib::Error::throw_exception(error); - - return Glib::ArrayHandle(argv, argc, Glib::OWNERSHIP_DEEP); -} - -std::string shell_quote(const std::string& unquoted_string) -{ - const ScopedPtr buf (g_shell_quote(unquoted_string.c_str())); - return std::string(buf.get()); -} - -std::string shell_unquote(const std::string& quoted_string) -{ - GError* error = 0; - char *const buf = g_shell_unquote(quoted_string.c_str(), &error); - - if(error) - Glib::Error::throw_exception(error); - - return std::string(ScopedPtr(buf).get()); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::ShellError::ShellError(Glib::ShellError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_SHELL_ERROR, error_code, error_message) -{} - -Glib::ShellError::ShellError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::ShellError::Code Glib::ShellError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::ShellError::throw_func(GError* gobject) -{ - throw Glib::ShellError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::ShellError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::ShellError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/shell.h b/libs/glibmm2/glib/glibmm/shell.h deleted file mode 100644 index 19b6a11b91..0000000000 --- a/libs/glibmm2/glib/glibmm/shell.h +++ /dev/null @@ -1,130 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_SHELL_H -#define _GLIBMM_SHELL_H - - -/* $Id: shell.hg,v 1.2 2003/01/22 21:38:35 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include - -#include -#include - -#include -GLIBMM_USING_STD(string) - - -namespace Glib -{ - -/** @defgroup ShellUtils Shell-related Utilities - * Shell-like command line handling. - * @{ - */ - -/** Exception class for shell utility errors. - */ -class ShellError : public Glib::Error -{ -public: - enum Code - { - BAD_QUOTING, - EMPTY_STRING, - FAILED - }; - - ShellError(Code error_code, const Glib::ustring& error_message); - explicit ShellError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** Parses a command line into an argument vector, in much the same way the - * shell would, but without many of the expansions the shell would perform - * (variable expansion, globs, operators, filename expansion, etc.\ are not - * supported). The results are defined to be the same as those you would - * get from a UNIX98 /bin/sh, as long as the input contains none of the - * unsupported shell expansions. If the input does contain such expansions, - * they are passed through literally. - * @param command_line Command line to parse. - * @return Array of args (The generic ArrayHandle will be implicitly - * converted to any STL compatible container type). - * @throw Glib::ShellError - */ -Glib::ArrayHandle shell_parse_argv(const std::string& command_line); - -/** Quotes a string so that the shell (/bin/sh) will interpret the quoted - * string to mean @a unquoted_string. If you pass a filename to the shell, - * for example, you should first quote it with this function. The quoting - * style used is undefined (single or double quotes may be used). - * @param unquoted_string A literal string. - * @return A quoted string. - */ -std::string shell_quote(const std::string& unquoted_string); - -/** Unquotes a string as the shell (/bin/sh) would. Only handles quotes; if - * a string contains file globs, arithmetic operators, variables, backticks, - * redirections, or other special-to-the-shell features, the result will be - * different from the result a real shell would produce (the variables, - * backticks, etc. will be passed through literally instead of being expanded). - * This function is guaranteed to succeed if applied to the result of - * shell_quote(). If it fails, it throws a Glib::ShellError exception. The - * @a quoted_string need not actually contain quoted or escaped text; - * shell_unquote() simply goes through the string and unquotes/unescapes - * anything that the shell would. Both single and double quotes are handled, - * as are escapes including escaped newlines. - * - * Shell quoting rules are a bit strange. Single quotes preserve the literal - * string exactly. Escape sequences are not allowed; not even \\' -- - * if you want a ' in the quoted text, you have to do something like - * 'foo'\\''bar'. Double quotes allow $, `, - * ", \\, and newline to be escaped with backslash. - * Otherwise double quotes preserve things literally. - * - * @param quoted_string Shell-quoted string. - * @return An unquoted string. - * @throw Glib::ShellError - */ -std::string shell_unquote(const std::string& quoted_string); - -/** @} group ShellUtils */ - -} // namespace Glib - - -#endif /* _GLIBMM_SHELL_H */ - diff --git a/libs/glibmm2/glib/glibmm/signalproxy.cc b/libs/glibmm2/glib/glibmm/signalproxy.cc deleted file mode 100644 index 49e35c550e..0000000000 --- a/libs/glibmm2/glib/glibmm/signalproxy.cc +++ /dev/null @@ -1,109 +0,0 @@ -// -*- c++ -*- - -/* $Id: signalproxy.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* signalproxy.cc - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -// SignalProxyBase implementation: - -SignalProxyBase::SignalProxyBase(Glib::ObjectBase* obj) -: - obj_ (obj) -{} - - -// SignalProxyNormal implementation: - -SignalProxyNormal::SignalProxyNormal(Glib::ObjectBase* obj, const SignalProxyInfo* info) -: - SignalProxyBase (obj), - info_ (info) -{} - -SignalProxyNormal::~SignalProxyNormal() -{} - -sigc::slot_base& -SignalProxyNormal::connect_(const sigc::slot_base& slot, bool after) -{ - return connect_impl_(info_->callback, slot, after); -} - -sigc::slot_base& -SignalProxyNormal::connect_notify_(const sigc::slot_base& slot, bool after) -{ - return connect_impl_(info_->notify_callback, slot, after); -} - -sigc::slot_base& -SignalProxyNormal::connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after) -{ - // create a proxy to hold our connection info - SignalProxyConnectionNode *const pConnectionNode = - new SignalProxyConnectionNode(slot, obj_->gobj()); - - // connect it to glib - // pConnectionNode will be passed in the data argument to the callback. - pConnectionNode->connection_id_ = g_signal_connect_data( - obj_->gobj(), info_->signal_name, callback, pConnectionNode, - &SignalProxyConnectionNode::destroy_notify_handler, - static_cast((after) ? G_CONNECT_AFTER : 0)); - - return pConnectionNode->slot_; -} - -void SignalProxyNormal::emission_stop() -{ - g_signal_stop_emission_by_name(obj_->gobj(), info_->signal_name); -} - -// static -void SignalProxyNormal::slot0_void_callback(GObject* self, void* data) -{ - // Do not try to call a signal on a disassociated wrapper. - if(Glib::ObjectBase::_get_current_wrapper(self)) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - if(sigc::slot_base *const slot = data_to_slot(data)) - (*static_cast*>(slot))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - } -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/signalproxy.h b/libs/glibmm2/glib/glibmm/signalproxy.h deleted file mode 100644 index 43c8fc3fb8..0000000000 --- a/libs/glibmm2/glib/glibmm/signalproxy.h +++ /dev/null @@ -1,394 +0,0 @@ -// -*- c++ -*- -/* This is a generated file, do not edit. Generated from signalproxy.h.m4 */ - -#ifndef _GLIBMM_SIGNALPROXY_H -#define _GLIBMM_SIGNALPROXY_H - -extern "C" -{ - typedef void (*GCallback) (void); - typedef struct _GObject GObject; -} - -#include -#include - - -namespace Glib -{ - -// Forward declarations -class ObjectBase; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -struct SignalProxyInfo -{ - const char* signal_name; - GCallback callback; - GCallback notify_callback; -}; - -#endif //DOXYGEN_SHOULD_SKIP_THIS - -// This base class is used by SignalProxyNormal and SignalProxyProperty. -class SignalProxyBase -{ -public: - SignalProxyBase(Glib::ObjectBase* obj); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static inline sigc::slot_base* data_to_slot(void* data) - { - SignalProxyConnectionNode *const pConnectionNode = static_cast(data); - - // Return 0 if the connection is blocked. - return (!pConnectionNode->slot_.blocked()) ? &pConnectionNode->slot_ : 0; - } -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -protected: - ObjectBase* obj_; - -private: - SignalProxyBase& operator=(const SignalProxyBase&); // not implemented -}; - - -// shared portion of a Signal -/** The SignalProxy provides an API similar to sigc::signal that can be used to - * connect sigc::slots to glib signals. - * - * This holds the name of the glib signal and the object - * which might emit it. Actually, proxies are controlled by - * the template derivatives, which serve as gatekeepers for the - * types allowed on a particular signal. - * - */ -class SignalProxyNormal : public SignalProxyBase -{ -public: - ~SignalProxyNormal(); - - /// stops the current signal emmision (not in libsigc++) - void emission_stop(); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // This callback for SignalProxy0 - // is defined here to avoid code duplication. - static void slot0_void_callback(GObject*, void* data); -#endif - -protected: - - /** Create a proxy for a signal that can be emitted by @a obj. - * @param obj The object that can emit the signal. - * @param info Information about the signal, including its name, and the C callbacks that should be called by glib. - */ - SignalProxyNormal(Glib::ObjectBase* obj, const SignalProxyInfo* info); - - /** Connects a signal to a generic signal handler. This is called by connect() in derived SignalProxy classes. - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::slot_base& connect_(const sigc::slot_base& slot, bool after); - - /** Connects a signal to a signal handler without a return value. - * This is called by connect() in derived SignalProxy classes. - * - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::slot_base& connect_notify_(const sigc::slot_base& slot, bool after); - -private: - const SignalProxyInfo* info_; - - //TODO: We could maybe replace both connect_ and connect_notify_ with this in future, because they don't do anything extra. - /** This is called by connect_ and connect_impl_. - */ - sigc::slot_base& connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after); - - // no copy assignment - SignalProxyNormal& operator=(const SignalProxyNormal&); -}; - - - - - -/**** Glib::SignalProxy0 ***************************************************/ - -/** Proxy for signals with 0 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy0 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy0(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -/**** Glib::SignalProxy1 ***************************************************/ - -/** Proxy for signals with 1 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy1 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy1(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -/**** Glib::SignalProxy2 ***************************************************/ - -/** Proxy for signals with 2 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy2 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy2(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -/**** Glib::SignalProxy3 ***************************************************/ - -/** Proxy for signals with 3 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy3 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy3(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -/**** Glib::SignalProxy4 ***************************************************/ - -/** Proxy for signals with 4 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy4 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy4(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -/**** Glib::SignalProxy5 ***************************************************/ - -/** Proxy for signals with 5 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy5 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy5(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -/**** Glib::SignalProxy6 ***************************************************/ - -/** Proxy for signals with 6 arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class SignalProxy6 : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - SignalProxy6(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; - - -} // namespace Glib - - -#endif /* _GLIBMM_SIGNALPROXY_H */ - diff --git a/libs/glibmm2/glib/glibmm/signalproxy_connectionnode.cc b/libs/glibmm2/glib/glibmm/signalproxy_connectionnode.cc deleted file mode 100644 index 9311fad3b9..0000000000 --- a/libs/glibmm2/glib/glibmm/signalproxy_connectionnode.cc +++ /dev/null @@ -1,94 +0,0 @@ -// -*- c++ -*- - -/* $Id: signalproxy_connectionnode.cc 137 2004-10-07 16:02:01Z philipl $ */ - -/* signalproxy_connectionnode.cc - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -SignalProxyConnectionNode::SignalProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject) -: - connection_id_ (0), - slot_ (slot), - object_ (gobject) -{ - //The cleanup callback will be called when the connection is disconnected. - slot_.set_parent(this, &SignalProxyConnectionNode::notify /* cleanup callback */); -} - -// notify is a message coming up from the slot to be passed back to Gtk+ -// disconnect is a message coming up from the Gtk+ to be passed down to SigC++ -//static -void* SignalProxyConnectionNode::notify(void* data) -{ - // notification from libsigc++. - SignalProxyConnectionNode* conn = static_cast(data); - - // If there is no object, this call was triggered from destroy_notify_handler(), - // because we set conn->object to 0 there: - if(conn && conn->object_) - { - GObject* o = conn->object_; - conn->object_ = 0; - - if(g_signal_handler_is_connected(o, conn->connection_id_)) //We check first, because during destruction, GTK+ sometimes seems to disconnect them for us, before we expect it to. See bug #87912 - { - // Disconnecting triggers execution of destroy_notify_handler(), eiter immediately or later: - // When the signal handler is currently running. (for instance, if the callback disconnects its own connection) - // In that case, destroy_notify_handler() will be called after this whole function has returned. - // Anyway. destroy_notify_handler() will always be called, so we leave that to do the deletion. - - - //Forget the connection: - gulong connection_id = conn->connection_id_; - conn->connection_id_ = 0; - - g_signal_handler_disconnect(o, connection_id); - } - } - - return 0; // apparently unused in libsigc++ -} - -//static -void SignalProxyConnectionNode::destroy_notify_handler(gpointer data, GClosure*) -{ - //glib calls this when it has finished with a glib signal connection, - //either when the emitting object dies, or when the connection has been disconnected. - - // notification from gtk+. - SignalProxyConnectionNode* conn = static_cast(data); - - if(conn) - { - // the object has already lost track of this object. - conn->object_ = 0; - - delete conn; // if there are connection objects referring to slot_ they are notified during destruction of slot_ - } -} - -} /* namespace Glib */ - diff --git a/libs/glibmm2/glib/glibmm/signalproxy_connectionnode.h b/libs/glibmm2/glib/glibmm/signalproxy_connectionnode.h deleted file mode 100644 index 7d0faa3ca2..0000000000 --- a/libs/glibmm2/glib/glibmm/signalproxy_connectionnode.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H -#define _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H - -/* $Id: signalproxy_connectionnode.h 446 2007-09-26 15:10:44Z murrayc $ */ - -/* signalproxy_connectionnode.h - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -typedef struct _GObject GObject; -typedef struct _GClosure GClosure; -#endif //DOXYGEN_SHOULD_SKIP_THIS - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/** SignalProxyConnectionNode is a connection node for use with SignalProxy. - * It lives between the layer of Gtk+ and libsigc++. - * It is very much an internal class. - */ -class SignalProxyConnectionNode -{ -public: - - /** @param slot The signal handler for the glib signal. - * @param gobject The GObject that might emit this glib signal - */ - SignalProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject); - - /** Callback that is executed when the slot becomes invalid. - * This callback is registered in the slot. - * @param data The SignalProxyConnectionNode object (@p this). - */ - static void* notify(void* data); - - /** Callback that is executed when the glib closure is destroyed. - * @param data The SignalProxyConnectionNode object (@p this). - * @param closure The glib closure object. - */ - static void destroy_notify_handler(gpointer data, GClosure* closure); - - gulong connection_id_; - sigc::slot_base slot_; - -protected: - GObject* object_; -}; - -#endif //DOXYGEN_SHOULD_SKIP_THIS - -} /* namespace Glib */ - - -#endif /* _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H */ - diff --git a/libs/glibmm2/glib/glibmm/slisthandle.h b/libs/glibmm2/glib/glibmm/slisthandle.h deleted file mode 100644 index 0806e7be21..0000000000 --- a/libs/glibmm2/glib/glibmm/slisthandle.h +++ /dev/null @@ -1,405 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_SLISTHANDLE_H -#define _GLIBMM_SLISTHANDLE_H - -/* $Id: slisthandle.h 32 2003-04-21 17:39:41Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -namespace Container_Helpers -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/* Create and fill a GSList as efficient as possible. - * This requires bidirectional iterators. - */ -template -GSList* create_slist(Bi pbegin, Bi pend, Tr) -{ - GSList* head = 0; - - while(pend != pbegin) - { - // Use & to force a warning if the iterator returns a temporary object. - const void *const item = Tr::to_c_type(*&*--pend); - head = g_slist_prepend(head, const_cast(item)); - } - - return head; -} - -/* Create a GSList from a 0-terminated input sequence. - * Build it in reverse order and reverse the whole list afterwards, - * because appending to the list would be horribly inefficient. - */ -template -GSList* create_slist(For pbegin, Tr) -{ - GSList* head = 0; - - while(*pbegin) - { - // Use & to force a warning if the iterator returns a temporary object. - const void *const item = Tr::to_c_type(*&*pbegin); - head = g_slist_prepend(head, const_cast(item)); - ++pbegin; - } - - return g_slist_reverse(head); -} - - -/* Convert from any container that supports bidirectional iterators. - */ -template -struct SListSourceTraits -{ - static GSList* get_data(const Cont& cont) - { return Glib::Container_Helpers::create_slist(cont.begin(), cont.end(), Tr()); } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -/* Convert from a 0-terminated array. The Cont - * argument must be a pointer to the first element. - */ -template -struct SListSourceTraits -{ - static GSList* get_data(const Cont* array) - { return (array) ? Glib::Container_Helpers::create_slist(array, Tr()) : 0; } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -template -struct SListSourceTraits : SListSourceTraits -{}; - -/* Convert from a 0-terminated array. The Cont argument must be a pointer - * to the first element. For consistency, the array must be 0-terminated, - * even though the array size is known at compile time. - */ -template -struct SListSourceTraits -{ - static GSList* get_data(const Cont* array) - { return Glib::Container_Helpers::create_slist(array, array + (N - 1), Tr()); } - - static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW; -}; - -template -struct SListSourceTraits : SListSourceTraits -{}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** - * @ingroup ContHelpers - * If a method takes this as an argument, or has this as a return type, then you can use a standard - * container such as std::list or std::vector. - */ -template -class SListHandleIterator -{ -public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; - - typedef std::forward_iterator_tag iterator_category; - typedef CppType value_type; - typedef ptrdiff_t difference_type; - typedef value_type reference; - typedef void pointer; - - explicit inline SListHandleIterator(const GSList* node); - - inline value_type operator*() const; - inline SListHandleIterator & operator++(); - inline const SListHandleIterator operator++(int); - - inline bool operator==(const SListHandleIterator& rhs) const; - inline bool operator!=(const SListHandleIterator& rhs) const; - -private: - const GSList* node_; -}; - -} // namespace Container_Helpers - - -/** - * @ingroup ContHandles - */ -template < class T, class Tr = Glib::Container_Helpers::TypeTraits > -class SListHandle -{ -public: - typedef typename Tr::CppType CppType; - typedef typename Tr::CType CType; - - typedef CppType value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - - typedef Glib::Container_Helpers::SListHandleIterator const_iterator; - typedef Glib::Container_Helpers::SListHandleIterator iterator; - - template inline - SListHandle(const Cont& container); - - // Take over ownership of a GSList created by GTK+ functions. - inline SListHandle(GSList* glist, Glib::OwnershipType ownership); - - // Copying clears the ownership flag of the source handle. - inline SListHandle(const SListHandle& other); - - ~SListHandle(); - - inline const_iterator begin() const; - inline const_iterator end() const; - - template inline operator std::vector() const; - template inline operator std::deque() const; - template inline operator std::list() const; - - template inline - void assign_to(Cont& container) const; - template inline - void copy(Out pdest) const; - - inline GSList* data() const; - inline size_t size() const; - inline bool empty() const; - -private: - GSList * pslist_; - mutable Glib::OwnershipType ownership_; - - // No copy assignment. - SListHandle& operator=(const SListHandle&); -}; - - -/***************************************************************************/ -/* Inline implementation */ -/***************************************************************************/ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -namespace Container_Helpers -{ - -/**** Glib::Container_Helpers::SListHandleIterator<> ***********************/ - -template inline -SListHandleIterator::SListHandleIterator(const GSList* node) -: - node_ (node) -{} - -template inline -typename SListHandleIterator::value_type SListHandleIterator::operator*() const -{ - return Tr::to_cpp_type(static_cast(node_->data)); -} - -template inline -SListHandleIterator& SListHandleIterator::operator++() -{ - node_ = node_->next; - return *this; -} - -template inline -const SListHandleIterator SListHandleIterator::operator++(int) -{ - const SListHandleIterator tmp (*this); - node_ = node_->next; - return tmp; -} - -template inline -bool SListHandleIterator::operator==(const SListHandleIterator& rhs) const -{ - return (node_ == rhs.node_); -} - -template inline -bool SListHandleIterator::operator!=(const SListHandleIterator& rhs) const -{ - return (node_ != rhs.node_); -} - -} // namespace Container_Helpers - - -/**** Glib::SListHandle<> **************************************************/ - -template - template -inline -SListHandle::SListHandle(const Cont& container) -: - pslist_ (Glib::Container_Helpers::SListSourceTraits::get_data(container)), - ownership_ (Glib::Container_Helpers::SListSourceTraits::initial_ownership) -{} - -template inline -SListHandle::SListHandle(GSList* gslist, Glib::OwnershipType ownership) -: - pslist_ (gslist), - ownership_ (ownership) -{} - -template inline -SListHandle::SListHandle(const SListHandle& other) -: - pslist_ (other.pslist_), - ownership_ (other.ownership_) -{ - other.ownership_ = Glib::OWNERSHIP_NONE; -} - -template -SListHandle::~SListHandle() -{ - if(ownership_ != Glib::OWNERSHIP_NONE) - { - if(ownership_ != Glib::OWNERSHIP_SHALLOW) - { - // Deep ownership: release each container element. - for(GSList* node = pslist_; node != 0; node = node->next) - Tr::release_c_type(static_cast(node->data)); - } - g_slist_free(pslist_); - } -} - -template inline -typename SListHandle::const_iterator SListHandle::begin() const -{ - return Glib::Container_Helpers::SListHandleIterator(pslist_); -} - -template inline -typename SListHandle::const_iterator SListHandle::end() const -{ - return Glib::Container_Helpers::SListHandleIterator(0); -} - -template - template -inline -SListHandle::operator std::vector() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::vector(this->begin(), this->end()); -#else - std::vector temp; - temp.reserve(this->size()); - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -SListHandle::operator std::deque() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::deque(this->begin(), this->end()); -#else - std::deque temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -SListHandle::operator std::list() const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - return std::list(this->begin(), this->end()); -#else - std::list temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - return temp; -#endif -} - -template - template -inline -void SListHandle::assign_to(Cont& container) const -{ -#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS - container.assign(this->begin(), this->end()); -#else - Cont temp; - Glib::Container_Helpers::fill_container(temp, this->begin(), this->end()); - container.swap(temp); -#endif -} - -template - template -inline -void SListHandle::copy(Out pdest) const -{ - std::copy(this->begin(), this->end(), pdest); -} - -template inline -GSList* SListHandle::data() const -{ - return pslist_; -} - -template inline -size_t SListHandle::size() const -{ - return g_slist_length(pslist_); -} - -template inline -bool SListHandle::empty() const -{ - return (pslist_ == 0); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - - -#endif /* _GLIBMM_SLISTHANDLE_H */ - diff --git a/libs/glibmm2/glib/glibmm/spawn.cc b/libs/glibmm2/glib/glibmm/spawn.cc deleted file mode 100644 index 592001885e..0000000000 --- a/libs/glibmm2/glib/glibmm/spawn.cc +++ /dev/null @@ -1,324 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: spawn.ccg,v 1.8 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - - -namespace -{ - -extern "C" -{ - -/* Helper callback to invoke the actual sigc++ slot. - * We don't need to worry about (un)referencing, since the - * child process gets its own copy of the parent's memory anyway. - */ -static void child_setup_callback(void* user_data) -{ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - (*reinterpret_cast*>(user_data))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -static void copy_output_buf(std::string* dest, const char* buf) -{ - if(dest) - { - if(buf) - *dest = buf; - else - dest->erase(); - } -} - -} //extern "C" - -} //anonymous namespace - - -namespace Glib -{ - -/**** process spawning functions *******************************************/ - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid, - int* standard_input, - int* standard_output, - int* standard_error) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async_with_pipes( - working_directory.c_str(), - const_cast(argv.data()), - const_cast(envp.data()), - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - standard_input, standard_output, standard_error, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid, - int* standard_input, - int* standard_output, - int* standard_error) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async_with_pipes( - working_directory.c_str(), - const_cast(argv.data()), 0, - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - standard_input, standard_output, standard_error, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async( - working_directory.c_str(), - const_cast(argv.data()), - const_cast(envp.data()), - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async( - working_directory.c_str(), - const_cast(argv.data()), 0, - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags, - const sigc::slot& child_setup, - std::string* standard_output, - std::string* standard_error, - int* exit_status) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - - Glib::ScopedPtr buf_standard_output; - Glib::ScopedPtr buf_standard_error; - GError* error = 0; - - g_spawn_sync( - working_directory.c_str(), - const_cast(argv.data()), - const_cast(envp.data()), - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - (standard_output) ? buf_standard_output.addr() : 0, - (standard_error) ? buf_standard_error.addr() : 0, - exit_status, - &error); - - if(error) - Glib::Error::throw_exception(error); - - copy_output_buf(standard_output, buf_standard_output.get()); - copy_output_buf(standard_error, buf_standard_error.get()); -} - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags, - const sigc::slot& child_setup, - std::string* standard_output, - std::string* standard_error, - int* exit_status) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - - Glib::ScopedPtr buf_standard_output; - Glib::ScopedPtr buf_standard_error; - GError* error = 0; - - g_spawn_sync( - working_directory.c_str(), - const_cast(argv.data()), 0, - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - (standard_output) ? buf_standard_output.addr() : 0, - (standard_error) ? buf_standard_error.addr() : 0, - exit_status, - &error); - - if(error) - Glib::Error::throw_exception(error); - - copy_output_buf(standard_output, buf_standard_output.get()); - copy_output_buf(standard_error, buf_standard_error.get()); -} - -void spawn_command_line_async(const std::string& command_line) -{ - GError* error = 0; - g_spawn_command_line_async(command_line.c_str(), &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_command_line_sync(const std::string& command_line, - std::string* standard_output, - std::string* standard_error, - int* exit_status) -{ - Glib::ScopedPtr buf_standard_output; - Glib::ScopedPtr buf_standard_error; - GError* error = 0; - - g_spawn_command_line_sync( - command_line.c_str(), - (standard_output) ? buf_standard_output.addr() : 0, - (standard_error) ? buf_standard_error.addr() : 0, - exit_status, - &error); - - if(error) - Glib::Error::throw_exception(error); - - copy_output_buf(standard_output, buf_standard_output.get()); - copy_output_buf(standard_error, buf_standard_error.get()); -} - -void spawn_close_pid(Pid pid) -{ - g_spawn_close_pid(pid); -} - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::SpawnError::SpawnError(Glib::SpawnError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_SPAWN_ERROR, error_code, error_message) -{} - -Glib::SpawnError::SpawnError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::SpawnError::Code Glib::SpawnError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::SpawnError::throw_func(GError* gobject) -{ - throw Glib::SpawnError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::SpawnError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::SpawnError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/spawn.h b/libs/glibmm2/glib/glibmm/spawn.h deleted file mode 100644 index ae6f651a33..0000000000 --- a/libs/glibmm2/glib/glibmm/spawn.h +++ /dev/null @@ -1,210 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_SPAWN_H -#define _GLIBMM_SPAWN_H - - -/* $Id: spawn.hg,v 1.4 2004/03/02 23:29:57 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include -#include - -#include -GLIBMM_USING_STD(string) - - -namespace Glib -{ - -typedef GPid Pid; - -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %SpawnFlags operator|(SpawnFlags, SpawnFlags)
- * %SpawnFlags operator&(SpawnFlags, SpawnFlags)
- * %SpawnFlags operator^(SpawnFlags, SpawnFlags)
- * %SpawnFlags operator~(SpawnFlags)
- * %SpawnFlags& operator|=(SpawnFlags&, SpawnFlags)
- * %SpawnFlags& operator&=(SpawnFlags&, SpawnFlags)
- * %SpawnFlags& operator^=(SpawnFlags&, SpawnFlags)
- */ -enum SpawnFlags -{ - SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, - SPAWN_DO_NOT_REAP_CHILD = 1 << 1, - SPAWN_SEARCH_PATH = 1 << 2, - SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, - SPAWN_STDERR_TO_DEV_NULL = 1 << 4, - SPAWN_CHILD_INHERITS_STDIN = 1 << 5, - SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 -}; - -/** @ingroup glibmmEnums */ -inline SpawnFlags operator|(SpawnFlags lhs, SpawnFlags rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline SpawnFlags operator&(SpawnFlags lhs, SpawnFlags rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline SpawnFlags operator^(SpawnFlags lhs, SpawnFlags rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline SpawnFlags operator~(SpawnFlags flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline SpawnFlags& operator|=(SpawnFlags& lhs, SpawnFlags rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline SpawnFlags& operator&=(SpawnFlags& lhs, SpawnFlags rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline SpawnFlags& operator^=(SpawnFlags& lhs, SpawnFlags rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** @defgroup Spawn Spawning Processes - * Process launching with fork()/exec(). - * @{ - */ - -/** Exception class for errors occuring when spawning processes. - */ -class SpawnError : public Glib::Error -{ -public: - enum Code - { - FORK, - READ, - CHDIR, - ACCES, - PERM, - TOOBIG, - NOEXEC, - NAMETOOLONG, - NOENT, - NOMEM, - NOTDIR, - LOOP, - TXTBUSY, - IO, - NFILE, - MFILE, - INVAL, - ISDIR, - LIBBAD - }; - - SpawnError(Code error_code, const Glib::ustring& error_message); - explicit SpawnError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0, - int* standard_input = 0, - int* standard_output = 0, - int* standard_error = 0); - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0, - int* standard_input = 0, - int* standard_output = 0, - int* standard_error = 0); - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0); - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0); - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - std::string* standard_output = 0, - std::string* standard_error = 0, - int* exit_status = 0); - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - std::string* standard_output = 0, - std::string* standard_error = 0, - int* exit_status = 0); - -void spawn_command_line_async(const std::string& command_line); - -void spawn_command_line_sync(const std::string& command_line, - std::string* standard_output = 0, - std::string* standard_error = 0, - int* exit_status = 0); - -void spawn_close_pid(Pid pid); - -/** @} group Spawn */ - -} // namespace Glib - - -#endif /* _GLIBMM_SPAWN_H */ - diff --git a/libs/glibmm2/glib/glibmm/streamiochannel.cc b/libs/glibmm2/glib/glibmm/streamiochannel.cc deleted file mode 100644 index db7f45aabc..0000000000 --- a/libs/glibmm2/glib/glibmm/streamiochannel.cc +++ /dev/null @@ -1,216 +0,0 @@ -/* $Id: streamiochannel.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - -GLIBMM_USING_STD(ios) - - -namespace Glib -{ - -// static -Glib::RefPtr StreamIOChannel::create(std::istream& stream) -{ - return Glib::RefPtr(new StreamIOChannel(&stream, 0)); -} - -// static -Glib::RefPtr StreamIOChannel::create(std::ostream& stream) -{ - return Glib::RefPtr(new StreamIOChannel(0, &stream)); -} - -// static -Glib::RefPtr StreamIOChannel::create(std::iostream& stream) -{ - return Glib::RefPtr(new StreamIOChannel(&stream, &stream)); -} - -StreamIOChannel::StreamIOChannel(std::istream* stream_in, std::ostream* stream_out) -: - stream_in_ (stream_in), - stream_out_ (stream_out) -{ - get_flags_vfunc(); // initialize GIOChannel flag bits -} - -StreamIOChannel::~StreamIOChannel() -{} - -IOStatus StreamIOChannel::read_vfunc(char* buf, gsize count, gsize& bytes_read) -{ - g_return_val_if_fail(stream_in_ != 0, IO_STATUS_ERROR); - - stream_in_->clear(); - stream_in_->read(buf, count); - bytes_read = stream_in_->gcount(); - - if(stream_in_->eof()) - return IO_STATUS_EOF; - - if(stream_in_->fail()) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Reading from stream failed"); - #else - return IO_STATUS_ERROR; - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return IO_STATUS_NORMAL; -} - -IOStatus StreamIOChannel::write_vfunc(const char* buf, gsize count, gsize& bytes_written) -{ - g_return_val_if_fail(stream_out_ != 0, IO_STATUS_ERROR); - - bytes_written = 0; - - stream_out_->clear(); - stream_out_->write(buf, count); - - if(stream_out_->fail()) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Writing to stream failed"); - #else - return IO_STATUS_ERROR; - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - bytes_written = count; // all or nothing ;) - - return IO_STATUS_NORMAL; -} - -IOStatus StreamIOChannel::seek_vfunc(gint64 offset, SeekType type) -{ - std::ios::seekdir direction = std::ios::beg; - - switch(type) - { - case SEEK_TYPE_SET: direction = std::ios::beg; break; - case SEEK_TYPE_CUR: direction = std::ios::cur; break; - case SEEK_TYPE_END: direction = std::ios::end; break; - } - - bool failed = false; - - if(stream_in_) - { - stream_in_->clear(); - stream_in_->seekg(offset, direction); - failed = stream_in_->fail(); - } - if(stream_out_) - { - stream_out_->clear(); - stream_out_->seekp(offset, direction); - failed = (failed || stream_out_->fail()); - } - - if(failed) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Seeking into stream failed"); - #else - return IO_STATUS_ERROR; - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return Glib::IO_STATUS_NORMAL; -} - -IOStatus StreamIOChannel::close_vfunc() -{ - bool failed = false; - - if(std::fstream *const stream = dynamic_cast(stream_in_)) - { - stream->clear(); - stream->close(); - failed = stream->fail(); - } - else if(std::ifstream *const stream = dynamic_cast(stream_in_)) - { - stream->clear(); - stream->close(); - failed = stream->fail(); - } - else if(std::ofstream *const stream = dynamic_cast(stream_out_)) - { - stream->clear(); - stream->close(); - failed = stream->fail(); - } - else - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, - "Attempt to close non-file stream"); - #else - return IO_STATUS_ERROR; - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(failed) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Failed to close stream"); - #else - return IO_STATUS_ERROR; - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return IO_STATUS_NORMAL; -} - -IOStatus StreamIOChannel::set_flags_vfunc(IOFlags) -{ - return IO_STATUS_NORMAL; -} - -IOFlags StreamIOChannel::get_flags_vfunc() -{ - gobj()->is_seekable = 1; - gobj()->is_readable = (stream_in_ != 0); - gobj()->is_writeable = (stream_out_ != 0); - - IOFlags flags = IO_FLAG_IS_SEEKABLE; - - if(stream_in_) - flags |= IO_FLAG_IS_READABLE; - if(stream_out_) - flags |= IO_FLAG_IS_WRITEABLE; - - return flags; -} - -Glib::RefPtr StreamIOChannel::create_watch_vfunc(IOCondition) -{ - g_warning("Glib::StreamIOChannel::create_watch_vfunc() not implemented"); - return Glib::RefPtr(); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/streamiochannel.h b/libs/glibmm2/glib/glibmm/streamiochannel.h deleted file mode 100644 index 65c6972598..0000000000 --- a/libs/glibmm2/glib/glibmm/streamiochannel.h +++ /dev/null @@ -1,67 +0,0 @@ -// -*- c++ -*- -/* $Id: streamiochannel.h 17 2003-01-22 12:09:02Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _GLIBMM_STREAMIOCHANNEL_H -#define _GLIBMM_STREAMIOCHANNEL_H - -#include -#include -#include - -GLIBMM_USING_STD(istream) -GLIBMM_USING_STD(ostream) -GLIBMM_USING_STD(iostream) - - -namespace Glib -{ - -/** This whole class is deprecated in glibmm 2.2. - * See the Glib::IOChannel documentation for an explanation. - */ -class StreamIOChannel : public Glib::IOChannel -{ -public: - virtual ~StreamIOChannel(); - - static Glib::RefPtr create(std::istream& stream); - static Glib::RefPtr create(std::ostream& stream); - static Glib::RefPtr create(std::iostream& stream); - -protected: - std::istream* stream_in_; - std::ostream* stream_out_; - - StreamIOChannel(std::istream* stream_in, std::ostream* stream_out); - - virtual IOStatus read_vfunc(char* buf, gsize count, gsize& bytes_read); - virtual IOStatus write_vfunc(const char* buf, gsize count, gsize& bytes_written); - virtual IOStatus seek_vfunc(gint64 offset, SeekType type); - virtual IOStatus close_vfunc(); - virtual IOStatus set_flags_vfunc(IOFlags flags); - virtual IOFlags get_flags_vfunc(); - virtual Glib::RefPtr create_watch_vfunc(IOCondition cond); -}; - -} // namespace Glib - - -#endif /* _GLIBMM_STREAMIOCHANNEL_H */ - diff --git a/libs/glibmm2/glib/glibmm/stringutils.cc b/libs/glibmm2/glib/glibmm/stringutils.cc deleted file mode 100644 index 6cf0137b54..0000000000 --- a/libs/glibmm2/glib/glibmm/stringutils.cc +++ /dev/null @@ -1,128 +0,0 @@ -// -*- c++ -*- -/* $Id: stringutils.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include -#include - -GLIBMM_USING_STD(out_of_range) -GLIBMM_USING_STD(overflow_error) -GLIBMM_USING_STD(underflow_error) - - -bool Glib::str_has_prefix(const std::string& str, const std::string& prefix) -{ - return g_str_has_prefix(str.c_str(), prefix.c_str()); -} - -bool Glib::str_has_suffix(const std::string& str, const std::string& suffix) -{ - return g_str_has_suffix(str.c_str(), suffix.c_str()); -} - -double Glib::Ascii::strtod(const std::string& str) -{ - std::string::size_type dummy; - return Glib::Ascii::strtod(str, dummy, 0); -} - -double Glib::Ascii::strtod(const std::string& str, - std::string::size_type& end_index, - std::string::size_type start_index) -{ - if(start_index > str.size()) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - throw std::out_of_range("out of range (strtod): start_index > str.size()"); - #else - return 0; - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - const char *const bufptr = str.c_str(); - char* endptr = 0; - - const double result = g_ascii_strtod(bufptr + start_index, &endptr); - const int err_no = errno; - - if(err_no != 0) - { - g_return_val_if_fail(err_no == ERANGE, result); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - //Interpret the result in the event of an error: - if(result > 0.0) - throw std::overflow_error("overflow (strtod): positive number too large"); - - if(result < 0.0) - throw std::overflow_error("overflow (strtod): negative number too large"); - - throw std::underflow_error("underflow (strtod): number too small"); - #else - return result; - #endif // GLIBMM_EXCEPTIONS_ENABLED - } - - if(endptr) - end_index = endptr - bufptr; - else - end_index = str.size(); - - return result; -} - -std::string Glib::Ascii::dtostr(double d) -{ - char buf[G_ASCII_DTOSTR_BUF_SIZE]; - - return g_ascii_dtostr(buf, sizeof(buf), d); -} - -std::string Glib::strescape(const std::string& source) -{ - const Glib::ScopedPtr buf (g_strescape(source.c_str(), 0)); - return buf.get(); -} - -std::string Glib::strescape(const std::string& source, const std::string& exceptions) -{ - const Glib::ScopedPtr buf (g_strescape(source.c_str(), exceptions.c_str())); - return buf.get(); -} - -std::string Glib::strcompress(const std::string& source) -{ - const Glib::ScopedPtr buf (g_strcompress(source.c_str())); - return buf.get(); -} - -Glib::ustring Glib::strerror(int errnum) -{ - return g_strerror(errnum); -} - -Glib::ustring Glib::strsignal(int signum) -{ - return g_strsignal(signum); -} - diff --git a/libs/glibmm2/glib/glibmm/stringutils.h b/libs/glibmm2/glib/glibmm/stringutils.h deleted file mode 100644 index aa32e755e3..0000000000 --- a/libs/glibmm2/glib/glibmm/stringutils.h +++ /dev/null @@ -1,184 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_STRINGUTILS_H -#define _GLIBMM_STRINGUTILS_H - -/* $Id: stringutils.h 116 2004-06-07 17:26:39Z daniel $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -/** @defgroup StringUtils String Utility Functions - * - * This section describes a number of utility functions for creating - * and manipulating strings, as well as other string-related stuff. - */ - -/** Looks whether the string @a str begins with @a prefix. - * @ingroup StringUtils - * @param str A string. - * @param prefix The prefix to look for. - * @return true if @a str begins with @a prefix, false otherwise. - */ -bool str_has_prefix(const std::string& str, const std::string& prefix); - -/** Looks whether the string @a str ends with @a suffix. - * @ingroup StringUtils - * @param str A string. - * @param suffix The suffix to look for. - * @return true if @a str ends with @a suffix, false otherwise. - */ -bool str_has_suffix(const std::string& str, const std::string& suffix); - - -namespace Ascii -{ - -/** Converts a string to a double value. - * @ingroup StringUtils - * This function behaves like the standard %strtod() function does in - * the C locale. It does this without actually changing the current - * locale, since that would not be thread-safe. - * - * This function is typically used when reading configuration files or other - * non-user input that should be locale independent. To handle input from the - * user you should normally use locale-sensitive C++ streams. - * - * To convert from a string to double in a locale-insensitive way, use - * Glib::Ascii::dtostr(). - * - * @param str The string to convert to a numeric value. - * @return The double value. - * @throw std::overflow_error Thrown if the correct value would cause overflow. - * @throw std::underflow_error Thrown if the correct value would cause underflow. - */ -double strtod(const std::string& str); - -/** Converts a string to a double value. - * @ingroup StringUtils - * This function behaves like the standard %strtod() function does in - * the C locale. It does this without actually changing the current - * locale, since that would not be thread-safe. - * - * This function is typically used when reading configuration files or other - * non-user input that should be locale independent. To handle input from the - * user you should normally use locale-sensitive C++ streams. - * - * To convert from a string to double in a locale-insensitive way, use - * Glib::Ascii::dtostr(). - * - * @param str The string to convert to a numeric value. - * @param start_index The index of the first character that should be used in the conversion. - * @retval end_index The index of the character after the last character used in the conversion. - * @return The double value. - * @throw std::out_of_range Thrown if @a start_index is out of range. - * @throw std::overflow_error Thrown if the correct value would cause overflow. - * @throw std::underflow_error Thrown if the correct value would cause underflow. - */ -double strtod(const std::string& str, - std::string::size_type& end_index, - std::string::size_type start_index = 0); - -/** Converts a double to a string, using the '.' as decimal point. - * @ingroup StringUtils - * This functions generates enough precision that converting the string back - * using Glib::Ascii::strtod() gives the same machine-number (on machines with - * IEEE compatible 64bit doubles). - * - * @param d The double value to convert. - * @return The converted string. - */ -std::string dtostr(double d); - -} // namespace Ascii - - -/** Escapes all special characters in the string. - * @ingroup StringUtils - * Escapes the special characters '\\b', '\\f', '\\n', - * '\\r', '\\t', '\\' and '"' in the string - * @a source by inserting a '\\' before them. Additionally all characters - * in the range 0x01 - 0x1F (everything below SPACE) - * and in the range 0x80 - 0xFF (all non-ASCII chars) - * are replaced with a '\\' followed by their octal representation. - * - * Glib::strcompress() does the reverse conversion. - * - * @param source A string to escape. - * @return A copy of @a source with certain characters escaped. See above. - */ -std::string strescape(const std::string& source); - -/** Escapes all special characters in the string. - * @ingroup StringUtils - * Escapes the special characters '\\b', '\\f', '\\n', - * '\\r', '\\t', '\\' and '"' in the string - * @a source by inserting a '\\' before them. Additionally all characters - * in the range 0x01 - 0x1F (everything below SPACE) - * and in the range 0x80 - 0xFF (all non-ASCII chars) - * are replaced with a '\\' followed by their octal representation. - * Characters supplied in @a exceptions are not escaped. - * - * Glib::strcompress() does the reverse conversion. - * - * @param source A string to escape. - * @param exceptions A string of characters not to escape in @a source. - * @return A copy of @a source with certain characters escaped. See above. - */ -std::string strescape(const std::string& source, const std::string& exceptions); - -/** Replaces all escaped characters with their one byte equivalent. - * @ingroup StringUtils - * This function does the reverse conversion of Glib::strescape(). - * - * @param source A string to compress. - * @return A copy of @a source with all escaped characters compressed. - */ -std::string strcompress(const std::string& source); - -/** Returns a string corresponding to the given error code, e.g.\ "no such process". - * @ingroup StringUtils - * This function is included since not all platforms support the - * %strerror() function. - * - * @param errnum The system error number. See the standard C errno documentation. - * @return A string describing the error code. If the error code is unknown, - * "unknown error (\)" is returned. - */ -Glib::ustring strerror(int errnum); - -/** Returns a string describing the given signal, e.g.\ "Segmentation fault". - * @ingroup StringUtils - * This function is included since not all platforms support the - * %strsignal() function. - * - * @param signum The signal number. See the signal() documentation. - * @return A string describing the signal. If the signal is unknown, - * "unknown signal (\)" is returned. - */ -Glib::ustring strsignal(int signum); - -} // namespace Glib - - -#endif /* _GLIBMM_STRINGUTILS_H */ - diff --git a/libs/glibmm2/glib/glibmm/thread.cc b/libs/glibmm2/glib/glibmm/thread.cc deleted file mode 100644 index 9a67a0b4ee..0000000000 --- a/libs/glibmm2/glib/glibmm/thread.cc +++ /dev/null @@ -1,412 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: thread.ccg,v 1.9 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace -{ - -extern "C" -{ - -static void* call_thread_entry_slot(void* data) -{ - sigc::slot_base *const slot = reinterpret_cast(data); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - // Recreate the specific slot, and drop the reference obtained by create(). - (*static_cast*>(slot))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Thread::Exit&) - { - // Just exit from the thread. The Thread::Exit exception - // is our sane C++ replacement of g_thread_exit(). - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - delete slot; - return 0; -} - -} //extern "C" - -} // anonymous namespace - - -namespace Glib -{ - -// internal -void thread_init_impl() -{ - // Make sure the exception map is initialized before creating any thread. - Glib::Error::register_init(); -} - - -/**** Glib::Thread *********************************************************/ - -// static -Thread* Thread::create(const sigc::slot& slot, bool joinable) -{ - // Make a copy of slot on the heap - sigc::slot_base *const slot_copy = new sigc::slot(slot); - - GError* error = 0; - - GThread *const thread = g_thread_create( - &call_thread_entry_slot, slot_copy, joinable, &error); - - if(error) - { - delete slot_copy; - Glib::Error::throw_exception(error); - } - - return reinterpret_cast(thread); -} - -// static -Thread* Thread::create(const sigc::slot& slot, unsigned long stack_size, - bool joinable, bool bound, ThreadPriority priority) -{ - // Make a copy of slot on the heap - sigc::slot_base *const slot_copy = new sigc::slot(slot); - - GError* error = 0; - - GThread *const thread = g_thread_create_full( - &call_thread_entry_slot, slot_copy, stack_size, joinable, - bound, (GThreadPriority) priority, &error); - - if(error) - { - delete slot_copy; - Glib::Error::throw_exception(error); - } - - return reinterpret_cast(thread); -} - -// static -Thread* Thread::self() -{ - return reinterpret_cast(g_thread_self()); -} - -bool Thread::joinable() const -{ - return gobject_.joinable; -} - -void Thread::join() -{ - g_thread_join(&gobject_); -} - -void Thread::set_priority(ThreadPriority priority) -{ - g_thread_set_priority(&gobject_, (GThreadPriority) priority); -} - -ThreadPriority Thread::get_priority() const -{ - return (ThreadPriority) gobject_.priority; -} - -// static -void Thread::yield() -{ - g_thread_yield(); -} - -Thread* wrap(GThread* gobject) -{ - return reinterpret_cast(gobject); -} - - -/**** Glib::StaticMutex ****************************************************/ - -void StaticMutex::lock() -{ - g_static_mutex_lock(&gobject_); -} - -bool StaticMutex::trylock() -{ - return g_static_mutex_trylock(&gobject_); -} - -void StaticMutex::unlock() -{ - g_static_mutex_unlock(&gobject_); -} - -StaticMutex::operator Mutex&() -{ - // If GStaticMutex is implemented as struct (e.g. on Linux), its first struct - // member (runtime_mutex) is a GMutex pointer. If the gthread implementation - // is native (i.e. the vtable pointer passed to g_thread_init() was 0), then - // the runtime_mutex pointer is unused, and the rest of the GStaticMutex - // struct resembles the mutex data. - // - // On Win32, GStaticMutex is just a typedef to struct _GMutex*. Either way, - // the first sizeof(GMutex*) bytes of GStaticMutex always resemble a GMutex - // pointer. The gthread implementation relies on that, and we'll also do so. - - GMutex*& runtime_mutex = reinterpret_cast(gobject_); - - // Fortunately, it cannot hurt if we set this to the GMutex pointer returned - // by g_static_mutex_get_mutex(). Either we just overwrite it with the same - // value, or it was unused anyway. Doing that allows casting the pointer - // location to a Glib::Mutex reference (its only data member is a GMutex*). - - runtime_mutex = g_static_mutex_get_mutex(&gobject_); - - return reinterpret_cast(runtime_mutex); -} - - -/**** Glib::Mutex **********************************************************/ - -Mutex::Mutex() -: - gobject_ (g_mutex_new()) -{} - -Mutex::~Mutex() -{ - g_mutex_free(gobject_); -} - -void Mutex::lock() -{ - g_mutex_lock(gobject_); -} - -bool Mutex::trylock() -{ - return g_mutex_trylock(gobject_); -} - -void Mutex::unlock() -{ - g_mutex_unlock(gobject_); -} - - -/**** Glib::StaticRecMutex *************************************************/ - -void StaticRecMutex::lock() -{ - g_static_rec_mutex_lock(&gobject_); -} - -bool StaticRecMutex::trylock() -{ - return g_static_rec_mutex_trylock(&gobject_); -} - -void StaticRecMutex::unlock() -{ - g_static_rec_mutex_unlock(&gobject_); -} - -void StaticRecMutex::lock_full(unsigned int depth) -{ - g_static_rec_mutex_lock_full(&gobject_, depth); -} - -unsigned int StaticRecMutex::unlock_full() -{ - return g_static_rec_mutex_unlock_full(&gobject_); -} - -StaticRecMutex::operator RecMutex&() -{ - return static_cast(*this); -} - - -/**** Glib::RecMutex *******************************************************/ - -RecMutex::RecMutex() -{ - g_static_rec_mutex_init(&gobject_); - - // GLib doesn't have GRecMutex, only GStaticRecMutex. Force initialization - // of the mutex now, to mimic the behaviour of a (hypothetical) GRecMutex. - g_static_mutex_get_mutex(&gobject_.mutex); -} - -RecMutex::~RecMutex() -{ - g_static_rec_mutex_free(&gobject_); -} - - -/**** Glib::StaticRWLock ***************************************************/ - -void StaticRWLock::reader_lock() -{ - g_static_rw_lock_reader_lock(&gobject_); -} - -bool StaticRWLock::reader_trylock() -{ - return g_static_rw_lock_reader_trylock(&gobject_); -} - -void StaticRWLock::reader_unlock() -{ - g_static_rw_lock_reader_unlock(&gobject_); -} - -void StaticRWLock::writer_lock() -{ - g_static_rw_lock_writer_lock(&gobject_); -} - -bool StaticRWLock::writer_trylock() -{ - return g_static_rw_lock_writer_trylock(&gobject_); -} - -void StaticRWLock::writer_unlock() -{ - g_static_rw_lock_writer_unlock(&gobject_); -} - -StaticRWLock::operator RWLock&() -{ - return static_cast(*this); -} - - -/**** Glib::RWLock *********************************************************/ - -RWLock::RWLock() -{ - g_static_rw_lock_init(&gobject_); - - // GLib doesn't have GRWLock, only GStaticRWLock. Force initialization - // of the mutex and the condition variables now, to mimic the behaviour - // of a (hypothetical) GRWLock. - - if(g_static_mutex_get_mutex(&gobject_.mutex)) - { - gobject_.read_cond = g_cond_new(); - gobject_.write_cond = g_cond_new(); - } -} - -RWLock::~RWLock() -{ - g_static_rw_lock_free(&gobject_); -} - - -/**** Glib::Cond ***********************************************************/ - -Cond::Cond() -: - gobject_ (g_cond_new()) -{} - -Cond::~Cond() -{ - g_cond_free(gobject_); -} - -void Cond::signal() -{ - g_cond_signal(gobject_); -} - -void Cond::broadcast() -{ - g_cond_broadcast(gobject_); -} - -void Cond::wait(Mutex& mutex) -{ - g_cond_wait(gobject_, mutex.gobj()); -} - -bool Cond::timed_wait(Mutex& mutex, const Glib::TimeVal& abs_time) -{ - return g_cond_timed_wait(gobject_, mutex.gobj(), const_cast(&abs_time)); -} - - -} // namespace Glib - - -namespace -{ -} // anonymous namespace - - -Glib::ThreadError::ThreadError(Glib::ThreadError::Code error_code, const Glib::ustring& error_message) -: - Glib::Error (G_THREAD_ERROR, error_code, error_message) -{} - -Glib::ThreadError::ThreadError(GError* gobject) -: - Glib::Error (gobject) -{} - -Glib::ThreadError::Code Glib::ThreadError::code() const -{ - return static_cast(Glib::Error::code()); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -void Glib::ThreadError::throw_func(GError* gobject) -{ - throw Glib::ThreadError(gobject); -} -#else -//When not using exceptions, we just pass the Exception object around without throwing it: -std::auto_ptr Glib::ThreadError::throw_func(GError* gobject) -{ - return std::auto_ptr(new Glib::ThreadError(gobject)); -} -#endif //GLIBMM_EXCEPTIONS_ENABLED - - diff --git a/libs/glibmm2/glib/glibmm/thread.h b/libs/glibmm2/glib/glibmm/thread.h deleted file mode 100644 index 456d16850d..0000000000 --- a/libs/glibmm2/glib/glibmm/thread.h +++ /dev/null @@ -1,1091 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_THREAD_H -#define _GLIBMM_THREAD_H - - -/* $Id: thread.hg,v 1.13 2005/01/21 12:48:05 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include - -#include -#include -#include - -/* Shadow THREAD_PRIORITY_NORMAL macro (from winbase.h). - */ -#if defined(THREAD_PRIORITY_NORMAL) && !defined(GLIBMM_MACRO_SHADOW_THREAD_PRIORITY_NORMAL) -enum { GLIBMM_MACRO_DEFINITION_THREAD_PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL }; -#undef THREAD_PRIORITY_NORMAL -enum { THREAD_PRIORITY_NORMAL = GLIBMM_MACRO_DEFINITION_THREAD_PRIORITY_NORMAL }; -#define THREAD_PRIORITY_NORMAL THREAD_PRIORITY_NORMAL -#define GLIBMM_MACRO_SHADOW_THREAD_PRIORITY_NORMAL 1 -#endif - - -/** Initializer macro for Glib::StaticMutex. - * @relates Glib::StaticMutex - * @hideinitializer - */ -#define GLIBMM_STATIC_MUTEX_INIT { G_STATIC_MUTEX_INIT } - -/** Initializer macro for Glib::StaticRecMutex. - * @relates Glib::StaticRecMutex - * @hideinitializer - */ -#define GLIBMM_STATIC_REC_MUTEX_INIT { G_STATIC_REC_MUTEX_INIT } - -/** Initializer macro for Glib::StaticRWLock. - * @relates Glib::StaticRWLock - * @hideinitializer - */ -#define GLIBMM_STATIC_RW_LOCK_INIT { G_STATIC_RW_LOCK_INIT } - -/** Initializer macro for Glib::StaticPrivate. - * @relates Glib::StaticPrivate - * @hideinitializer - */ -#define GLIBMM_STATIC_PRIVATE_INIT { G_STATIC_PRIVATE_INIT } - - -namespace Glib -{ - -/** Specifies the priority of a thread. - * @note It is not guaranteed, that threads with different priorities really - * behave accordingly. On some systems (e.g. Linux) only root can - * increase priorities. On other systems (e.g. Solaris) there doesn't seem to - * be different scheduling for different priorities. All in all try to avoid - * being dependent on priorities. - */ -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - */ -enum ThreadPriority -{ - THREAD_PRIORITY_LOW, - THREAD_PRIORITY_NORMAL, - THREAD_PRIORITY_HIGH, - THREAD_PRIORITY_URGENT -}; - - -/*! @var ThreadPriority THREAD_PRIORITY_LOW - * A priority lower than normal. - */ -/*! @var ThreadPriority THREAD_PRIORITY_NORMAL - * The default priority. - */ -/*! @var ThreadPriority THREAD_PRIORITY_HIGH - * A priority higher than normal. - */ -/*! @var ThreadPriority THREAD_PRIORITY_URGENT - * The highest priority. - */ - - -/** @defgroup Threads Threads - * Thread abstraction; including threads, different mutexes, - * conditions and thread private data. - * @{ - */ - -enum NotLock { NOT_LOCK }; -enum TryLock { TRY_LOCK }; - -/** Initializes the GLib thread system. - * Before you use a thread related function in glibmm, you should initialize - * the thread system. This is done by calling Glib::thread_init(). - * - * @note You should only call thread_init() with a non-0 parameter - * if you really know what you are doing. - * - * @note thread_init() must not be called directly or indirectly as - * a callback from glibmm. Also no mutexes may be currently locked while - * calling thread_init(). - * - * thread_init() might only be called once. On the second call it will - * abort with an error. If you want to make sure that the thread system - * is initialized, you can do that too: - * @code - * if(!Glib::thread_supported()) Glib::thread_init(); - * @endcode - * After that line either the thread system is initialized, or the program - * will abort if no thread system is available in GLib, i.e. either - * @c G_THREADS_ENABLED is not defined or @c G_THREADS_IMPL_NONE is defined. - * - * If no thread system is available and @a vtable is 0 or if not all - * elements of @a vtable are non-0, then thread_init() will abort. - * - * @note To use thread_init() in your program, you have to link with the - * libraries that the command pkg-config --libs gthread-2.0 - * outputs. This is not the case for all the other thread related functions - * of glibmm. Those can be used without having to link with the thread - * libraries. (You @em have to link with gthread-2.0 if you actually - * want to use threads in your application, though.) - * - * @param vtable A function table of type @c GThreadFunctions, that provides - * the entry points to the thread system to be used. - */ -inline void thread_init(GThreadFunctions* vtable = 0); - -/** Returns whether the thread system is initialized. - * @return @c true, if the thread system is initialized. - */ -inline bool thread_supported(); - - -class Mutex; -class RecMutex; -class RWLock; -struct StaticMutex; -struct StaticRecMutex; -struct StaticRWLock; - - -/** Exception class for thread-related errors. - */ -class ThreadError : public Glib::Error -{ -public: - enum Code - { - AGAIN - }; - - ThreadError(Code error_code, const Glib::ustring& error_message); - explicit ThreadError(GError* gobject); - Code code() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -private: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static void throw_func(GError* gobject); -#else - //When not using exceptions, we just pass the Exception object around without throwing it: - static std::auto_ptr throw_func(GError* gobject); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - friend void wrap_init(); // uses throw_func() -#endif -}; - - -/** Represents a running thread. - * An instance of this class can only be obtained with create(), self(), - * or wrap(GThread*). It's not possible to delete a Thread object. If the - * thread is @em not joinable, its resources will be freed automatically - * when it exits. Otherwise, if the thread @em is joinable, you must call - * join() to avoid a memory leak. - * - * @note g_thread_exit() is not wrapped, because that function exits a thread - * without any cleanup. That's especially dangerous in C++ code, since the - * destructors of automatic objects won't be invoked. Instead, you can throw - * a Thread::Exit exception, which will be caught by the internal thread - * entry function. - * - * @note You might have noticed that the thread entry slot doesn't have the - * usual void* return value. If you want to return any data from your thread - * you can pass an additional output argument to the thread's entry slot. - */ -class Thread -{ -public: - class Exit; - - /** Creates a new thread with the priority THREAD_PRIORITY_NORMAL. - * If @a joinable is @c true, you can wait for this thread's termination by - * calling join(). Otherwise the thread will just disappear, when ready. - * - * The new thread executes the function or method @a slot points to. You can - * pass additional arguments using sigc::bind(). If the thread was created - * successfully, it is returned, otherwise a ThreadError exception is thrown. - * - * @param slot A slot to execute in the new thread. - * @param joinable Should this thread be joinable? - * @return The new Thread* on success. - * @throw Glib::ThreadError - */ - static Thread* create(const sigc::slot& slot, bool joinable); - - /** Creates a new thread with the priority @a priority. The stack gets the - * size @a stack_size or the default value for the current platform, if - * @a stack_size is 0. - * - * If @a joinable is @c true, you can wait for this thread's termination by - * calling join(). Otherwise the thread will just disappear, when ready. - * If @a bound is @c true, this thread will be scheduled in the system scope, - * otherwise the implementation is free to do scheduling in the process - * scope. The first variant is more expensive resource-wise, but generally - * faster. On some systems (e.g. Linux) all threads are bound. - * - * The new thread executes the function or method @a slot points to. You can - * pass additional arguments using sigc::bind(). If the thread was created - * successfully, it is returned. - * - * @note It is not guaranteed, that threads with different priorities really - * behave accordingly. On some systems (e.g. Linux) only root can increase - * priorities. On other systems (e.g. Solaris) there doesn't seem to be - * different scheduling for different priorities. All in all try to avoid - * being dependent on priorities. Use Glib::THREAD_PRIORITY_NORMAL - * here as a default. - * - * @note Only use the extended - * create(const sigc::slot&, unsigned long, bool, bool, ThreadPriority) - * function, when you really can't use the simple - * create(const sigc::slot&, bool) - * instead. The latter overload does not take @a stack_size, @a bound and - * @a priority as arguments, as they should only be used for cases, where - * it is inevitable. - * - * @param slot A slot to execute in the new thread. - * @param stack_size A stack size for the new thread, or 0. - * @param joinable Should this thread be joinable? - * @param bound Should this thread be bound to a system thread? - * @param priority A priority for the thread. - * @return The new Thread* on success. - * @throw Glib::ThreadError - */ - static Thread* create(const sigc::slot& slot, unsigned long stack_size, - bool joinable, bool bound, ThreadPriority priority); - - /** Returns the Thread* corresponding to the calling thread. - * @return The current thread. - */ - static Thread* self(); - - /** Returns whether the thread is joinable. - * @return Whether the thread is joinable. - */ - bool joinable() const; - - /** Waits until the thread finishes. - * Waits until the thread finishes, i.e. the slot, as given to create(), - * returns or g_thread_exit() is called by the thread. (Calling - * g_thread_exit() in a C++ program should be avoided.) All resources of - * the thread including the Glib::Thread object are released. The thread - * must have been created with joinable = true. - */ - void join(); - - /** Changes the priority of the thread to @a priority. - * @note It is not guaranteed, that threads with different priorities really - * behave accordingly. On some systems (e.g. Linux) only @c root can - * increase priorities. On other systems (e.g. Solaris) there doesn't seem - * to be different scheduling for different priorities. All in all try to - * avoid being dependent on priorities. - * @param priority A new priority for the thread. - */ - void set_priority(ThreadPriority priority); - - /** Returns the priority of the thread. - * @return The thread's priority. - */ - ThreadPriority get_priority() const; - - /** Gives way to other threads waiting to be scheduled. - * This function is often used as a method to make busy wait less evil. But - * in most cases, you will encounter, there are better methods to do that. - * So in general you shouldn't use this function. - */ - static void yield(); - - GThread* gobj() { return &gobject_; } - const GThread* gobj() const { return &gobject_; } - -private: - GThread gobject_; - - // Glib::Thread can neither be constructed nor deleted. - Thread(); - void operator delete(void*, size_t); - - // noncopyable - Thread(const Thread&); - Thread& operator=(const Thread&); -}; - -/** %Exception class used to exit from a thread. - * @code - * throw Glib::Thread::Exit(); - * @endcode - * Write this if you want to exit from a thread created by Thread::create(). - * Of course you must make sure not to catch Thread::Exit by accident, i.e. - * when using catch(...) somewhere in your code. - */ -class Thread::Exit -{}; - -/** @relates Glib::Thread */ -Thread* wrap(GThread* gobject); - - -/** Like Glib::Mutex, but can be defined at compile time. - * Use @c GLIBMM_STATIC_MUTEX_INIT to initialize a StaticMutex: - * @code - * Glib::StaticMutex mutex = GLIBMM_STATIC_MUTEX_INIT; - * @endcode - * A StaticMutex can be used without calling Glib::thread_init(), it will - * silently do nothing then. That will also work when using the implicit - * conversion to Mutex&, thus you can safely use Mutex::Lock with a - * StaticMutex. - */ -struct StaticMutex -{ - void lock(); - bool trylock(); - void unlock(); - - operator Mutex&(); - - GStaticMutex* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticMutex gobject_; -#endif -}; - -/** Represents a mutex (mutual exclusion). - * It can be used to protect data against shared access. Try to use - * Mutex::Lock instead of calling lock() and unlock() directly -- - * it will make your life much easier. - * - * @note Before creating a Glib::Mutex, Glib::thread_init() has to be called. - * - * @note Glib::Mutex is not recursive, i.e. a thread will deadlock, if it - * already has locked the mutex while calling lock(). Use Glib::RecMutex - * instead, if you need recursive mutexes. - */ -class Mutex -{ -public: - class Lock; - - Mutex(); - ~Mutex(); - - /** Locks the mutex. - * If mutex is already locked by another thread, the current thread will - * block until mutex is unlocked by the other thread. - * @see Mutex::Lock - */ - void lock(); - - /** Tries to lock the mutex. - * If the mutex is already locked by another thread, it immediately returns - * @c false. Otherwise it locks the mutex and returns @c true. - * @return Whether the mutex could be locked. - * @see Mutex::Lock - */ - bool trylock(); - - /** Unlocks the mutex. - * If another thread is blocked in a lock() call for this mutex, it will be - * woken and can lock the mutex itself. - * @see Mutex::Lock - */ - void unlock(); - - GMutex* gobj() { return gobject_; } - -private: - GMutex* gobject_; - - // noncopyable - Mutex(const Mutex&); - Mutex& operator=(const Mutex&); -}; - -/** Utility class for exception-safe mutex locking. - * @par Usage example: - * @code - * { - * Glib::Mutex::Lock lock (mutex); // calls mutex.lock() - * do_something(); - * } // the destructor calls mutex.unlock() - * @endcode - * As you can see, the compiler takes care of the unlocking. This is not - * only exception safe but also much less error-prone. You could even - * return while still holding the lock and it will be released - * properly. - */ -class Mutex::Lock -{ -public: - explicit inline Lock(Mutex& mutex); - inline Lock(Mutex& mutex, NotLock); - inline Lock(Mutex& mutex, TryLock); - inline ~Lock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - Mutex& mutex_; - bool locked_; - - // noncopyable - Lock(const Mutex::Lock&); - Mutex::Lock& operator=(const Mutex::Lock&); -}; - - -/** Like Glib::RecMutex, but can be defined at compile time. - * Use @c GLIBMM_STATIC_REC_MUTEX_INIT to initialize a StaticRecMutex: - * @code - * Glib::StaticRecMutex mutex = GLIBMM_STATIC_REC_MUTEX_INIT; - * @endcode - * A StaticRecMutex can be used without calling Glib::thread_init(), it will - * silently do nothing then. That will also work when using the implicit - * conversion to RecMutex&, thus you can safely use RecMutex::Lock with a - * StaticRecMutex. - */ -struct StaticRecMutex -{ - void lock(); - bool trylock(); - void unlock(); - - void lock_full(unsigned int depth); - unsigned int unlock_full(); - - operator RecMutex&(); - - GStaticRecMutex* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticRecMutex gobject_; -#endif -}; - -class RecMutex : public StaticRecMutex -{ -public: - class Lock; - - RecMutex(); - ~RecMutex(); - -private: - // noncopyable - RecMutex(const RecMutex&); - RecMutex& operator=(const RecMutex&); -}; - -/** Utility class for exception-safe locking of recursive mutexes. - */ -class RecMutex::Lock -{ -public: - explicit inline Lock(RecMutex& mutex); - inline Lock(RecMutex& mutex, NotLock); - inline Lock(RecMutex& mutex, TryLock); - inline ~Lock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - RecMutex& mutex_; - bool locked_; - - // noncopyable - Lock(const RecMutex::Lock&); - RecMutex::Lock& operator=(const RecMutex::Lock&); -}; - - -/** Like Glib::RWLock, but can be defined at compile time. - * Use @c GLIBMM_STATIC_RW_LOCK_INIT to initialize a StaticRWLock: - * @code - * Glib::StaticRWLock rw_lock = GLIBMM_STATIC_RW_LOCK_INIT; - * @endcode - * A StaticRWLock can be used without calling Glib::thread_init(), it will - * silently do nothing then. That will also work when using the implicit - * conversion to RWLock&, thus you can safely use RWLock::ReaderLock and - * RWLock::WriterLock with a StaticRWLock. - */ -struct StaticRWLock -{ - void reader_lock(); - bool reader_trylock(); - void reader_unlock(); - - void writer_lock(); - bool writer_trylock(); - void writer_unlock(); - - operator RWLock&(); - - GStaticRWLock* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticRWLock gobject_; -#endif -}; - -class RWLock : public StaticRWLock -{ -public: - class ReaderLock; - class WriterLock; - - RWLock(); - ~RWLock(); - -private: - // noncopyable - RWLock(const RWLock&); - RWLock& operator=(const RWLock&); -}; - -/** Utility class for exception-safe locking of read/write locks. - */ -class RWLock::ReaderLock -{ -public: - explicit inline ReaderLock(RWLock& rwlock); - inline ReaderLock(RWLock& rwlock, NotLock); - inline ReaderLock(RWLock& rwlock, TryLock); - inline ~ReaderLock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - RWLock& rwlock_; - bool locked_; - - // noncopyable - ReaderLock(const RWLock::ReaderLock&); - RWLock::ReaderLock& operator=(const RWLock::ReaderLock&); -}; - -/** Utility class for exception-safe locking of read/write locks. - */ -class RWLock::WriterLock -{ -public: - explicit inline WriterLock(RWLock& rwlock); - inline WriterLock(RWLock& rwlock, NotLock); - inline WriterLock(RWLock& rwlock, TryLock); - inline ~WriterLock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - RWLock& rwlock_; - bool locked_; - - // noncopyable - WriterLock(const RWLock::WriterLock&); - RWLock::WriterLock& operator=(const RWLock::WriterLock&); -}; - -/** An opaque data structure to represent a condition. - * A @a Cond is an object that threads can block on, if they find a certain - * condition to be false. If other threads change the state of this condition - * they can signal the @a Cond, such that the waiting thread is woken up. - * @par Usage example: - * @code - * Glib::Cond data_cond; - * Glib::Mutex data_mutex; - * void* current_data = NULL; - * - * void push_data (void* data) - * { - * data_mutex.lock(); - * current_data = data; - * data_cond.signal(); - * data_mutex.unlock(); - * } - * - * void* pop_data () - * { - * void* data; - * - * data_mutex.lock(); - * while (!current_data) - * data_cond.wait(data_mutex); - * data = current_data; - * current_data = NULL; - * data_mutex.unlock(); - * return data; - * } - * @endcode -*/ -class Cond -{ -public: - Cond(); - ~Cond(); - - /** If threads are waiting for this @a Cond, exactly one of them is woken up. - * It is good practice to hold the same lock as the waiting thread, while calling - * this method, though not required. - * - * @note This method can also be used if @a Glib::thread_init() has not yet been - * called and will do nothing then. - */ - void signal(); - - /** If threads are waiting for this @a Cond, all of them are woken up. - * It is good practice to hold the same lock as the waiting thread, while calling - * this method, though not required. - * - * @note This method can also be used if @a Glib::thread_init() has not yet been - * called and will do nothing then. - */ - void broadcast(); - - /** Waits until this thread is woken up on this @a Cond. - * The mutex is unlocked before falling asleep and locked again before resuming. - * - * This method can also be used if @a Glib::thread_init() has not yet been - * called and will immediately return then. - * - * @param mutex a @a Mutex that is currently locked. - * - * @note It is important to use the @a wait() and @a timed_wait() methods - * only inside a loop, which checks for the condition to be true as it is not - * guaranteed that the waiting thread will find it fulfilled, even if the signaling - * thread left the condition in that state. This is because another thread can have - * altered the condition, before the waiting thread got the chance to be woken up, - * even if the condition itself is protected by a @a Mutex. - */ - void wait(Mutex& mutex); - - /** Waits until this thread is woken up on this @a Cond, but not longer than until the time, that is specified by @a abs_time. - * The mutex is unlocked before falling asleep and locked again before resuming. - * - * This function can also be used, if @a Glib::thread_init() has not yet been - * called and will immediately return @c true then. - * - * @param mutex a @a Mutex that is currently locked. - * @param abs_time a max time to wait. - * - * @note It is important to use the @a wait() and @a timed_wait() methods - * only inside a loop, which checks for the condition to be true as it is not - * guaranteed that the waiting thread will find it fulfilled, even if the signaling - * thread left the condition in that state. This is because another thread can have - * altered the condition, before the waiting thread got the chance to be woken up, - * even if the condition itself is protected by a @a Mutex. - */ - bool timed_wait(Mutex& mutex, const Glib::TimeVal& abs_time); - - GCond* gobj() { return gobject_; } - -private: - GCond* gobject_; - - // noncopyable - Cond(const Cond&); - Cond& operator=(const Cond&); -}; - - -template -struct StaticPrivate -{ - typedef void (*DestroyNotifyFunc) (void*); - - static void delete_ptr(void* data); - - inline T* get(); - inline void set(T* data, DestroyNotifyFunc notify_func = &StaticPrivate::delete_ptr); - - GStaticPrivate* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticPrivate gobject_; -#endif -}; - -template -class Private -{ -public: - typedef void (*DestructorFunc) (void*); - - static void delete_ptr(void* data); - - explicit inline Private(DestructorFunc destructor_func = &Private::delete_ptr); - inline T* get(); - inline void set(T* data); - - GPrivate* gobj() { return gobject_; } - -private: - GPrivate* gobject_; - - // noncopyable - Private(const Private&); - Private& operator=(const Private&); -}; - -/** @} group Threads */ - -/*! A glibmm thread example. - * @example thread/thread.cc - */ - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/***************************************************************************/ -/* inline implementation */ -/***************************************************************************/ - -// internal -void thread_init_impl(); - -/* This function must be inline, to avoid an unnecessary dependency on - * libgthread even if the thread system is not used. libgthread might - * not even be available if GLib was compiled without thread support. - */ -inline -void thread_init(GThreadFunctions* vtable) -{ - g_thread_init(vtable); - Glib::thread_init_impl(); -} - -inline -bool thread_supported() -{ - //MSVC++ needs the != 0 to avoid an int -> bool cast warning. - return (g_thread_supported() != 0); -} - - -/**** Glib::Mutex::Lock ****************************************************/ - -inline -Mutex::Lock::Lock(Mutex& mutex) -: - mutex_ (mutex), - locked_ (true) -{ - mutex_.lock(); -} - -inline -Mutex::Lock::Lock(Mutex& mutex, NotLock) -: - mutex_ (mutex), - locked_ (false) -{} - -inline -Mutex::Lock::Lock(Mutex& mutex, TryLock) -: - mutex_ (mutex), - locked_ (mutex.trylock()) -{} - -inline -Mutex::Lock::~Lock() -{ - if(locked_) - mutex_.unlock(); -} - -inline -void Mutex::Lock::acquire() -{ - mutex_.lock(); - locked_ = true; -} - -inline -bool Mutex::Lock::try_acquire() -{ - locked_ = mutex_.trylock(); - return locked_; -} - -inline -void Mutex::Lock::release() -{ - mutex_.unlock(); - locked_ = false; -} - -inline -bool Mutex::Lock::locked() const -{ - return locked_; -} - - -/**** Glib::RecMutex::Lock *************************************************/ - -inline -RecMutex::Lock::Lock(RecMutex& mutex) -: - mutex_ (mutex), - locked_ (true) -{ - mutex_.lock(); -} - -inline -RecMutex::Lock::Lock(RecMutex& mutex, NotLock) -: - mutex_ (mutex), - locked_ (false) -{} - -inline -RecMutex::Lock::Lock(RecMutex& mutex, TryLock) -: - mutex_ (mutex), - locked_ (mutex.trylock()) -{} - -inline -RecMutex::Lock::~Lock() -{ - if(locked_) - mutex_.unlock(); -} - -inline -void RecMutex::Lock::acquire() -{ - mutex_.lock(); - locked_ = true; -} - -inline -bool RecMutex::Lock::try_acquire() -{ - locked_ = mutex_.trylock(); - return locked_; -} - -inline -void RecMutex::Lock::release() -{ - mutex_.unlock(); - locked_ = false; -} - -inline -bool RecMutex::Lock::locked() const -{ - return locked_; -} - - -/**** Glib::RWLock::ReaderLock *********************************************/ - -inline -RWLock::ReaderLock::ReaderLock(RWLock& rwlock) -: - rwlock_ (rwlock), - locked_ (true) -{ - rwlock_.reader_lock(); -} - -inline -RWLock::ReaderLock::ReaderLock(RWLock& rwlock, NotLock) -: - rwlock_ (rwlock), - locked_ (false) -{} - -inline -RWLock::ReaderLock::ReaderLock(RWLock& rwlock, TryLock) -: - rwlock_ (rwlock), - locked_ (rwlock.reader_trylock()) -{} - -inline -RWLock::ReaderLock::~ReaderLock() -{ - if(locked_) - rwlock_.reader_unlock(); -} - -inline -void RWLock::ReaderLock::acquire() -{ - rwlock_.reader_lock(); - locked_ = true; -} - -inline -bool RWLock::ReaderLock::try_acquire() -{ - locked_ = rwlock_.reader_trylock(); - return locked_; -} - -inline -void RWLock::ReaderLock::release() -{ - rwlock_.reader_unlock(); - locked_ = false; -} - -inline -bool RWLock::ReaderLock::locked() const -{ - return locked_; -} - - -/**** Glib::RWLock::WriterLock *********************************************/ - -inline -RWLock::WriterLock::WriterLock(RWLock& rwlock) -: - rwlock_ (rwlock), - locked_ (true) -{ - rwlock_.writer_lock(); -} - -inline -RWLock::WriterLock::WriterLock(RWLock& rwlock, NotLock) -: - rwlock_ (rwlock), - locked_ (false) -{} - -inline -RWLock::WriterLock::WriterLock(RWLock& rwlock, TryLock) -: - rwlock_ (rwlock), - locked_ (rwlock.writer_trylock()) -{} - -inline -RWLock::WriterLock::~WriterLock() -{ - if(locked_) - rwlock_.writer_unlock(); -} - -inline -void RWLock::WriterLock::acquire() -{ - rwlock_.writer_lock(); - locked_ = true; -} - -inline -bool RWLock::WriterLock::try_acquire() -{ - locked_ = rwlock_.writer_trylock(); - return locked_; -} - -inline -void RWLock::WriterLock::release() -{ - rwlock_.writer_unlock(); - locked_ = false; -} - -inline -bool RWLock::WriterLock::locked() const -{ - return locked_; -} - - -/**** Glib::StaticPrivate **************************************************/ - -// static -template -void StaticPrivate::delete_ptr(void* data) -{ - delete static_cast(data); -} - -template inline -T* StaticPrivate::get() -{ - return static_cast(g_static_private_get(&gobject_)); -} - -template inline -void StaticPrivate::set(T* data, typename StaticPrivate::DestroyNotifyFunc notify_func) -{ - g_static_private_set(&gobject_, data, notify_func); -} - - -/**** Glib::Private ********************************************************/ - -// static -template -void Private::delete_ptr(void* data) -{ - delete static_cast(data); -} - -template inline -Private::Private(typename Private::DestructorFunc destructor_func) -: - gobject_ (g_private_new(destructor_func)) -{} - -template inline -T* Private::get() -{ - return static_cast(g_private_get(gobject_)); -} - -template inline -void Private::set(T* data) -{ - g_private_set(gobject_, data); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - - -#endif /* _GLIBMM_THREAD_H */ - diff --git a/libs/glibmm2/glib/glibmm/threadpool.cc b/libs/glibmm2/glib/glibmm/threadpool.cc deleted file mode 100644 index f6ccfe055b..0000000000 --- a/libs/glibmm2/glib/glibmm/threadpool.cc +++ /dev/null @@ -1,249 +0,0 @@ -// -*- c++ -*- -/* $Id: threadpool.cc 291 2006-05-12 08:08:45Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - -GLIBMM_USING_STD(list) - - -namespace Glib -{ - -// internal -class ThreadPool::SlotList -{ -public: - SlotList(); - ~SlotList(); - - sigc::slot* push(const sigc::slot& slot); - sigc::slot pop(sigc::slot* slot_ptr); - - void lock_and_unlock(); - -private: - Glib::Mutex mutex_; - std::list< sigc::slot > list_; - - // noncopyable - SlotList(const ThreadPool::SlotList&); - ThreadPool::SlotList& operator=(const ThreadPool::SlotList&); -}; - -ThreadPool::SlotList::SlotList() -{} - -ThreadPool::SlotList::~SlotList() -{} - -sigc::slot* ThreadPool::SlotList::push(const sigc::slot& slot) -{ - Mutex::Lock lock (mutex_); - - list_.push_back(slot); - return &list_.back(); -} - -sigc::slot ThreadPool::SlotList::pop(sigc::slot* slot_ptr) -{ - sigc::slot slot; - - { - Mutex::Lock lock (mutex_); - - std::list< sigc::slot >::iterator pslot = list_.begin(); - while(pslot != list_.end() && slot_ptr != &*pslot) - ++pslot; - - if(pslot != list_.end()) - { - slot = *pslot; - list_.erase(pslot); - } - } - - return slot; -} - -void ThreadPool::SlotList::lock_and_unlock() -{ - mutex_.lock(); - mutex_.unlock(); -} - -} // namespace Glib - - -namespace -{ - -static void call_thread_entry_slot(void* data, void* user_data) -{ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - Glib::ThreadPool::SlotList *const slot_list = - static_cast(user_data); - - sigc::slot slot (slot_list->pop(static_cast*>(data))); - - slot(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Thread::Exit&) - { - // Just exit from the thread. The Thread::Exit exception - // is our sane C++ replacement of g_thread_exit(). - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -} // anonymous namespace - - -namespace Glib -{ - -ThreadPool::ThreadPool(int max_threads, bool exclusive) -: - gobject_ (0), - slot_list_ (new SlotList()) -{ - GError* error = 0; - - gobject_ = g_thread_pool_new( - &call_thread_entry_slot, slot_list_, max_threads, exclusive, &error); - - if(error) - { - delete slot_list_; - slot_list_ = 0; - Glib::Error::throw_exception(error); - } -} - -ThreadPool::~ThreadPool() -{ - if(gobject_) - g_thread_pool_free(gobject_, 1, 1); - - if(slot_list_) - { - slot_list_->lock_and_unlock(); - delete slot_list_; - } -} - -void ThreadPool::push(const sigc::slot& slot) -{ - sigc::slot *const slot_ptr = slot_list_->push(slot); - - GError* error = 0; - g_thread_pool_push(gobject_, slot_ptr, &error); - - if(error) - { - slot_list_->pop(slot_ptr); - Glib::Error::throw_exception(error); - } -} - -void ThreadPool::set_max_threads(int max_threads) -{ - GError* error = 0; - g_thread_pool_set_max_threads(gobject_, max_threads, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -int ThreadPool::get_max_threads() const -{ - return g_thread_pool_get_max_threads(gobject_); -} - -unsigned int ThreadPool::get_num_threads() const -{ - return g_thread_pool_get_num_threads(gobject_); -} - -unsigned int ThreadPool::unprocessed() const -{ - return g_thread_pool_unprocessed(gobject_); -} - -bool ThreadPool::get_exclusive() const -{ - g_return_val_if_fail(gobject_ != 0, false); - - return gobject_->exclusive; -} - -void ThreadPool::shutdown(bool immediately) -{ - if(gobject_) - { - g_thread_pool_free(gobject_, immediately, 1); - gobject_ = 0; - } - - if(slot_list_) - { - slot_list_->lock_and_unlock(); - delete slot_list_; - slot_list_ = 0; - } -} - -// static -void ThreadPool::set_max_unused_threads(int max_threads) -{ - g_thread_pool_set_max_unused_threads(max_threads); -} - -// static -int ThreadPool::get_max_unused_threads() -{ - return g_thread_pool_get_max_unused_threads(); -} - -// static -unsigned int ThreadPool::get_num_unused_threads() -{ - return g_thread_pool_get_num_unused_threads(); -} - -// static -void ThreadPool::stop_unused_threads() -{ - g_thread_pool_stop_unused_threads(); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/threadpool.h b/libs/glibmm2/glib/glibmm/threadpool.h deleted file mode 100644 index 10a1209566..0000000000 --- a/libs/glibmm2/glib/glibmm/threadpool.h +++ /dev/null @@ -1,183 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_THREADPOOL_H -#define _GLIBMM_THREADPOOL_H - -/* $Id: threadpool.h 72 2004-02-10 14:26:07Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -extern "C" { typedef struct _GThreadPool GThreadPool; } - - -namespace Glib -{ - -/** @defgroup ThreadPools Thread Pools - * Pools of threads to execute work concurrently. - * @{ - */ - -/** A pool of threads to execute work concurrently. - */ -class ThreadPool -{ -public: - /** Constructs a new thread pool. - * Whenever you call ThreadPool::push(), either a new thread is created or an - * unused one is reused. At most @a max_threads threads are running - * concurrently for this thread pool. @a max_threads = -1 allows - * unlimited threads to be created for this thread pool. - * - * The parameter @a exclusive determines, whether the thread pool owns all - * threads exclusive or whether the threads are shared globally. If @a - * exclusive is true, @a max_threads threads are started immediately - * and they will run exclusively for this thread pool until it is destroyed - * by ~ThreadPool(). If @a exclusive is false, threads are created - * when needed and shared between all non-exclusive thread pools. This - * implies that @a max_threads may not be -1 for exclusive thread pools. - * - * @param max_threads The maximal number of threads to execute concurrently - * in the new thread pool, -1 means no limit. - * @param exclusive Should this thread pool be exclusive? - * @throw Glib::ThreadError An error can only occur when @a exclusive is - * set to true and not all @a max_threads threads could be created. - */ - explicit ThreadPool(int max_threads = -1, bool exclusive = false); - virtual ~ThreadPool(); - - /** Inserts @a slot into the list of tasks to be executed by the pool. - * When the number of currently running threads is lower than the maximal - * allowed number of threads, a new thread is started (or reused). Otherwise - * @a slot stays in the queue until a thread in this pool finishes its - * previous task and processes @a slot. - * @param slot A new task for the thread pool. - * @throw Glib::ThreadError An error can only occur when a new thread - * couldn't be created. In that case @a slot is simply appended to the - * queue of work to do. - */ - void push(const sigc::slot& slot); - - /** Sets the maximal allowed number of threads for the pool. - * A value of -1 means that the maximal number of threads is unlimited. - * Setting @a max_threads to 0 means stopping all work for pool. It is - * effectively frozen until @a max_threads is set to a non-zero value again. - * - * A thread is never terminated while it is still running. Instead the - * maximal number of threads only has effect for the allocation of new - * threads in ThreadPool::push(). A new thread is allocated whenever the - * number of currently running threads in the pool is smaller than the - * maximal number. - * - * @param max_threads A new maximal number of threads for the pool. - * @throw Glib::ThreadError An error can only occur when a new thread - * couldn't be created. - */ - void set_max_threads(int max_threads); - - /** Returns the maximal number of threads for the pool. - * @return The maximal number of threads. - */ - int get_max_threads() const; - - /** Returns the number of threads currently running in the pool. - * @return The number of threads currently running. - */ - unsigned int get_num_threads() const; - - /** Returns the number of tasks still unprocessed in the pool. - * @return The number of unprocessed tasks. - */ - unsigned int unprocessed() const; - - /** Returns whether all threads are exclusive to this pool. - * @return Whether all threads are exclusive to this pool. - */ - bool get_exclusive() const; - - /** Frees all resources allocated for the pool. - * If @a immediately is true, no new task is processed. Otherwise the - * pool is not freed before the last task is processed. Note however, that no - * thread of this pool is interrupted while processing a task. Instead at least - * all still running threads can finish their tasks before the pool is freed. - * - * This method does not return before all tasks to be processed (dependent on - * @a immediately, whether all or only the currently running) are ready. - * After calling shutdown() the pool must not be used anymore. - * - * @param immediately Should the pool shut down immediately? - */ - void shutdown(bool immediately = false); - - /** Sets the maximal number of unused threads to @a max_threads. - * If @a max_threads is -1, no limit is imposed on the number of unused threads. - * @param max_threads Maximal number of unused threads. - */ - static void set_max_unused_threads(int max_threads); - - /** Returns the maximal allowed number of unused threads. - * @return The maximal number of unused threads. - */ - static int get_max_unused_threads(); - - /** Returns the number of currently unused threads. - * @return The number of currently unused threads. - */ - static unsigned int get_num_unused_threads(); - - /** Stops all currently unused threads. - * This does not change the maximal number of unused threads. This function can - * be used to regularly stop all unused threads e.g. from Glib::signal_timeout(). - */ - static void stop_unused_threads(); - - GThreadPool* gobj() { return gobject_; } - const GThreadPool* gobj() const { return gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - class SlotList; -#endif - -private: - GThreadPool* gobject_; - SlotList* slot_list_; - - ThreadPool(const ThreadPool&); - ThreadPool& operator=(const ThreadPool&); -}; - -/** @} group ThreadPools */ - - -/***************************************************************************/ -/* inline implementation */ -/***************************************************************************/ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/**** Glib::Private ********************************************************/ - - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - - -#endif /* _GLIBMM_THREADPOOL_H */ - diff --git a/libs/glibmm2/glib/glibmm/timer.cc b/libs/glibmm2/glib/glibmm/timer.cc deleted file mode 100644 index 754431bf85..0000000000 --- a/libs/glibmm2/glib/glibmm/timer.cc +++ /dev/null @@ -1,72 +0,0 @@ -// -*- c++ -*- -/* $Id: timer.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* timer.cc - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace Glib -{ - -Timer::Timer() -: - gobject_ (g_timer_new()) -{} - -Timer::~Timer() -{ - g_timer_destroy(gobject_); -} - -void Timer::start() -{ - g_timer_start(gobject_); -} - -void Timer::stop() -{ - g_timer_stop(gobject_); -} - -void Timer::reset() -{ - g_timer_reset(gobject_); -} - -double Timer::elapsed() const -{ - return g_timer_elapsed(gobject_, 0); -} - -double Timer::elapsed(unsigned long& microseconds) const -{ - return g_timer_elapsed(gobject_, µseconds); -} - - -void usleep(unsigned long microseconds) -{ - g_usleep(microseconds); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/timer.h b/libs/glibmm2/glib/glibmm/timer.h deleted file mode 100644 index b80f9ef8b7..0000000000 --- a/libs/glibmm2/glib/glibmm/timer.h +++ /dev/null @@ -1,79 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_TIMER_H -#define _GLIBMM_TIMER_H - -/* $Id: timer.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* timer.h - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -extern "C" { typedef struct _GTimer GTimer; } - - -namespace Glib -{ - -/** Portable stop watch interface. - * This resembles a convient and portable timer with microseconds resolution. - */ -class Timer -{ -public: - /** Create a new timer. - * Also starts timing by calling start() implicitly. - */ - Timer(); - ~Timer(); - - void start(); - void stop(); - void reset(); - - /** Get the elapsed time. - * @return The value in seconds. - */ - double elapsed() const; - - /** Get the elapsed time. - * @return The value in seconds. Also fills @p microseconds - * with the corresponding @htmlonlyµs@endhtmlonly value. - */ - double elapsed(unsigned long& microseconds) const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GTimer* gobj() { return gobject_; } - const GTimer* gobj() const { return gobject_; } -#endif - -private: - GTimer* gobject_; - - // not copyable - Timer(const Timer&); - Timer& operator=(const Timer&); -}; - - -void usleep(unsigned long microseconds); - -} // namespace Glib - - -#endif /* _GLIBMM_TIMER_H */ - diff --git a/libs/glibmm2/glib/glibmm/timeval.cc b/libs/glibmm2/glib/glibmm/timeval.cc deleted file mode 100644 index 8010ef720d..0000000000 --- a/libs/glibmm2/glib/glibmm/timeval.cc +++ /dev/null @@ -1,120 +0,0 @@ -// -*- c++ -*- -/* $Id: timeval.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* timeval.cc - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -#include - - -namespace Glib -{ - -void TimeVal::assign_current_time() -{ - g_get_current_time(this); -} - -void TimeVal::add(const TimeVal& rhs) -{ - g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC); - g_return_if_fail(rhs.tv_usec >= 0 && rhs.tv_usec < G_USEC_PER_SEC); - - tv_usec += rhs.tv_usec; - - if(tv_usec >= G_USEC_PER_SEC) - { - tv_usec -= G_USEC_PER_SEC; - ++tv_sec; - } - - tv_sec += rhs.tv_sec; -} - -void TimeVal::subtract(const TimeVal& rhs) -{ - g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC); - g_return_if_fail(rhs.tv_usec >= 0 && rhs.tv_usec < G_USEC_PER_SEC); - - tv_usec -= rhs.tv_usec; - - if(tv_usec < 0) - { - tv_usec += G_USEC_PER_SEC; - --tv_sec; - } - - tv_sec -= rhs.tv_sec; -} - -void TimeVal::add_seconds(long seconds) -{ - g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC); - - tv_sec += seconds; -} - -void TimeVal::subtract_seconds(long seconds) -{ - g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC); - - tv_sec -= seconds; -} - -void TimeVal::add_milliseconds(long milliseconds) -{ - g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC); - - tv_usec += (milliseconds % 1000) * 1000; - - if(tv_usec < 0) - { - tv_usec += G_USEC_PER_SEC; - --tv_sec; - } - else if(tv_usec >= G_USEC_PER_SEC) - { - tv_usec -= G_USEC_PER_SEC; - ++tv_sec; - } - - tv_sec += milliseconds / 1000; -} - -void TimeVal::subtract_milliseconds(long milliseconds) -{ - add_milliseconds(-1 * milliseconds); -} - -void TimeVal::add_microseconds(long microseconds) -{ - g_time_val_add(this, microseconds); -} - -void TimeVal::subtract_microseconds(long microseconds) -{ - g_time_val_add(this, -1 * microseconds); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/timeval.h b/libs/glibmm2/glib/glibmm/timeval.h deleted file mode 100644 index 1988a01ad4..0000000000 --- a/libs/glibmm2/glib/glibmm/timeval.h +++ /dev/null @@ -1,233 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_TIMEVAL_H -#define _GLIBMM_TIMEVAL_H - -/* $Id: timeval.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* timeval.h - * - * Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -namespace Glib -{ - -/** Glib::TimeVal is a wrapper around the glib structure GTimeVal. - * The glib structure GTimeVal itself is equivalent to struct timeval, - * which is returned by the gettimeofday() UNIX call. Additionally - * this wrapper provides an assortment of time manipulation functions. - */ -struct TimeVal : public GTimeVal -{ - inline TimeVal(); - inline TimeVal(long seconds, long microseconds); - - inline TimeVal(const GTimeVal& gtimeval); - inline TimeVal& operator=(const GTimeVal& gtimeval); - - /** Assigns the current time to the TimeVal instance. - * Equivalent to the UNIX gettimeofday() function, but is portable and - * works also on Win32. - */ - void assign_current_time(); - - void add(const TimeVal& rhs); - void subtract(const TimeVal& rhs); - void add_seconds(long seconds); - void subtract_seconds(long seconds); - void add_milliseconds(long milliseconds); - void subtract_milliseconds(long milliseconds); - void add_microseconds(long microseconds); - void subtract_microseconds(long microseconds); - - inline TimeVal& operator+=(const TimeVal& gtimeval); - inline TimeVal& operator-=(const TimeVal& gtimeval); - inline TimeVal& operator+=(long seconds); - inline TimeVal& operator-=(long seconds); - - /** Returns a double representation of the time interval. - * This member function converts the time interval, that is - * internally stored as two long values for seconds and microseconds, - * to a double representation, whose unit is seconds. - */ - inline double as_double() const; - - inline bool negative() const; - - /** Checks whether the stored time interval is positive. - * Returns true if the stored time / time interval is positive. - */ - inline bool valid() const; -}; - -inline -TimeVal::TimeVal() -{ - tv_sec = 0; - tv_usec = 0; -} - -inline -TimeVal::TimeVal(long seconds, long microseconds) -{ - tv_sec = seconds; - tv_usec = microseconds; -} - -inline -TimeVal::TimeVal(const GTimeVal& gtimeval) -{ - tv_sec = gtimeval.tv_sec; - tv_usec = gtimeval.tv_usec; -} - -inline -TimeVal& TimeVal::operator=(const GTimeVal& gtimeval) -{ - tv_sec = gtimeval.tv_sec; - tv_usec = gtimeval.tv_usec; - return *this; -} - -inline -TimeVal& TimeVal::operator+=(const TimeVal& gtimeval) -{ - add(gtimeval); - - return *this; -} - -inline -TimeVal& TimeVal::operator-=(const TimeVal& gtimeval) -{ - subtract(gtimeval); - - return *this; -} - -inline -TimeVal& TimeVal::operator+=(long seconds) -{ - add_seconds(seconds); - - return *this; -} - -inline -TimeVal& TimeVal::operator-=(long seconds) -{ - subtract_seconds(seconds); - - return *this; -} - -inline -double TimeVal::as_double() const -{ - return tv_sec + ((double) tv_usec / (double) G_USEC_PER_SEC); -} - -inline -bool TimeVal::negative() const -{ - return (tv_sec < 0); -} - -inline -bool TimeVal::valid() const -{ - return (tv_usec >= 0 && tv_usec < G_USEC_PER_SEC); -} - -/** @relates Glib::TimeVal */ -inline -TimeVal operator+(const TimeVal& lhs, const TimeVal& rhs) -{ return TimeVal(lhs) += rhs; } - -/** @relates Glib::TimeVal */ -inline -TimeVal operator+(const TimeVal& lhs, long seconds) -{ return TimeVal(lhs) += seconds; } - -/** @relates Glib::TimeVal */ -inline -TimeVal operator-(const TimeVal& lhs, const TimeVal& rhs) -{ return TimeVal(lhs) -= rhs; } - -/** @relates Glib::TimeVal */ -inline -TimeVal operator-(const TimeVal& lhs, long seconds) -{ return TimeVal(lhs) -= seconds; } - - -/** @relates Glib::TimeVal */ -inline -bool operator==(const TimeVal& lhs, const TimeVal& rhs) -{ - return (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec == rhs.tv_usec); -} - -/** @relates Glib::TimeVal */ -inline -bool operator!=(const TimeVal& lhs, const TimeVal& rhs) -{ - return (lhs.tv_sec != rhs.tv_sec || lhs.tv_usec != rhs.tv_usec); -} - -/** @relates Glib::TimeVal */ -inline -bool operator<(const TimeVal& lhs, const TimeVal& rhs) -{ - return ((lhs.tv_sec < rhs.tv_sec) || - (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec < rhs.tv_usec)); -} - -/** @relates Glib::TimeVal */ -inline -bool operator>(const TimeVal& lhs, const TimeVal& rhs) -{ - return ((lhs.tv_sec > rhs.tv_sec) || - (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec > rhs.tv_usec)); -} - -/** @relates Glib::TimeVal */ -inline -bool operator<=(const TimeVal& lhs, const TimeVal& rhs) -{ - return ((lhs.tv_sec < rhs.tv_sec) || - (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec <= rhs.tv_usec)); -} - -/** @relates Glib::TimeVal */ -inline -bool operator>=(const TimeVal& lhs, const TimeVal& rhs) -{ - return ((lhs.tv_sec > rhs.tv_sec) || - (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec >= rhs.tv_usec)); -} - -} // namespace Glib - - -#endif /* _GLIBMM_TIMEVAL_H */ - - - - diff --git a/libs/glibmm2/glib/glibmm/unicode.cc b/libs/glibmm2/glib/glibmm/unicode.cc deleted file mode 100644 index a1e506049b..0000000000 --- a/libs/glibmm2/glib/glibmm/unicode.cc +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by gtkmmproc -- DO NOT MODIFY! - - -#include -#include - -// -*- c++ -*- -/* $Id: unicode.ccg,v 1.1 2003/01/07 16:58:42 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace -{ -} // anonymous namespace - - diff --git a/libs/glibmm2/glib/glibmm/unicode.h b/libs/glibmm2/glib/glibmm/unicode.h deleted file mode 100644 index f43559e11b..0000000000 --- a/libs/glibmm2/glib/glibmm/unicode.h +++ /dev/null @@ -1,316 +0,0 @@ -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef _GLIBMM_UNICODE_H -#define _GLIBMM_UNICODE_H - - -/* $Id: unicode.hg,v 1.2 2003/08/20 10:31:23 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include - -// Not used, but we want to get rid of possible macros. -#include - -#undef isalnum -#undef isalpha -#undef iscntrl -#undef isdigit -#undef isgraph -#undef islower -#undef isprint -#undef ispunct -#undef isspace -#undef isupper -#undef isxdigit -#undef istitle -#undef isdefined -#undef iswide -#undef toupper -#undef tolower -#undef totitle - - -namespace Glib -{ - -/** @addtogroup glibmmEnums Enums and Flags */ - -/** - * @ingroup glibmmEnums - */ -enum UnicodeType -{ - UNICODE_CONTROL, - UNICODE_FORMAT, - UNICODE_UNASSIGNED, - UNICODE_PRIVATE_USE, - UNICODE_SURROGATE, - UNICODE_LOWERCASE_LETTER, - UNICODE_MODIFIER_LETTER, - UNICODE_OTHER_LETTER, - UNICODE_TITLECASE_LETTER, - UNICODE_UPPERCASE_LETTER, - UNICODE_COMBINING_MARK, - UNICODE_ENCLOSING_MARK, - UNICODE_NON_SPACING_MARK, - UNICODE_DECIMAL_NUMBER, - UNICODE_LETTER_NUMBER, - UNICODE_OTHER_NUMBER, - UNICODE_CONNECT_PUNCTUATION, - UNICODE_DASH_PUNCTUATION, - UNICODE_CLOSE_PUNCTUATION, - UNICODE_FINAL_PUNCTUATION, - UNICODE_INITIAL_PUNCTUATION, - UNICODE_OTHER_PUNCTUATION, - UNICODE_OPEN_PUNCTUATION, - UNICODE_CURRENCY_SYMBOL, - UNICODE_MODIFIER_SYMBOL, - UNICODE_MATH_SYMBOL, - UNICODE_OTHER_SYMBOL, - UNICODE_LINE_SEPARATOR, - UNICODE_PARAGRAPH_SEPARATOR, - UNICODE_SPACE_SEPARATOR -}; - - -/** - * @ingroup glibmmEnums - */ -enum UnicodeBreakType -{ - UNICODE_BREAK_MANDATORY, - UNICODE_BREAK_CARRIAGE_RETURN, - UNICODE_BREAK_LINE_FEED, - UNICODE_BREAK_COMBINING_MARK, - UNICODE_BREAK_SURROGATE, - UNICODE_BREAK_ZERO_WIDTH_SPACE, - UNICODE_BREAK_INSEPARABLE, - UNICODE_BREAK_NON_BREAKING_GLUE, - UNICODE_BREAK_CONTINGENT, - UNICODE_BREAK_SPACE, - UNICODE_BREAK_AFTER, - UNICODE_BREAK_BEFORE, - UNICODE_BREAK_BEFORE_AND_AFTER, - UNICODE_BREAK_HYPHEN, - UNICODE_BREAK_NON_STARTER, - UNICODE_BREAK_OPEN_PUNCTUATION, - UNICODE_BREAK_CLOSE_PUNCTUATION, - UNICODE_BREAK_QUOTATION, - UNICODE_BREAK_EXCLAMATION, - UNICODE_BREAK_IDEOGRAPHIC, - UNICODE_BREAK_NUMERIC, - UNICODE_BREAK_INFIX_SEPARATOR, - UNICODE_BREAK_SYMBOL, - UNICODE_BREAK_ALPHABETIC, - UNICODE_BREAK_PREFIX, - UNICODE_BREAK_POSTFIX, - UNICODE_BREAK_COMPLEX_CONTEXT, - UNICODE_BREAK_AMBIGUOUS, - UNICODE_BREAK_UNKNOWN, - UNICODE_BREAK_NEXT_LINE, - UNICODE_BREAK_WORD_JOINER, - UNICODE_BREAK_HANGUL_L_JAMO, - UNICODE_BREAK_HANGUL_V_JAMO, - UNICODE_BREAK_HANGUL_T_JAMO, - UNICODE_BREAK_HANGUL_LV_SYLLABLE, - UNICODE_BREAK_HANGUL_LVT_SYLLABLE -}; - - -/** - * @ingroup glibmmEnums - * @par Bitwise operators: - * %AsciiType operator|(AsciiType, AsciiType)
- * %AsciiType operator&(AsciiType, AsciiType)
- * %AsciiType operator^(AsciiType, AsciiType)
- * %AsciiType operator~(AsciiType)
- * %AsciiType& operator|=(AsciiType&, AsciiType)
- * %AsciiType& operator&=(AsciiType&, AsciiType)
- * %AsciiType& operator^=(AsciiType&, AsciiType)
- */ -enum AsciiType -{ - ASCII_ALNUM = 1 << 0, - ASCII_ALPHA = 1 << 1, - ASCII_CNTRL = 1 << 2, - ASCII_DIGIT = 1 << 3, - ASCII_GRAPH = 1 << 4, - ASCII_LOWER = 1 << 5, - ASCII_PRINT = 1 << 6, - ASCII_PUNCT = 1 << 7, - ASCII_SPACE = 1 << 8, - ASCII_UPPER = 1 << 9, - ASCII_XDIGIT = 1 << 10 -}; - -/** @ingroup glibmmEnums */ -inline AsciiType operator|(AsciiType lhs, AsciiType rhs) - { return static_cast(static_cast(lhs) | static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline AsciiType operator&(AsciiType lhs, AsciiType rhs) - { return static_cast(static_cast(lhs) & static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline AsciiType operator^(AsciiType lhs, AsciiType rhs) - { return static_cast(static_cast(lhs) ^ static_cast(rhs)); } - -/** @ingroup glibmmEnums */ -inline AsciiType operator~(AsciiType flags) - { return static_cast(~static_cast(flags)); } - -/** @ingroup glibmmEnums */ -inline AsciiType& operator|=(AsciiType& lhs, AsciiType rhs) - { return (lhs = static_cast(static_cast(lhs) | static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline AsciiType& operator&=(AsciiType& lhs, AsciiType rhs) - { return (lhs = static_cast(static_cast(lhs) & static_cast(rhs))); } - -/** @ingroup glibmmEnums */ -inline AsciiType& operator^=(AsciiType& lhs, AsciiType rhs) - { return (lhs = static_cast(static_cast(lhs) ^ static_cast(rhs))); } - - -/** - * @ingroup glibmmEnums - */ -enum NormalizeMode -{ - NORMALIZE_DEFAULT, - NORMALIZE_NFD, - NORMALIZE_DEFAULT_COMPOSE, - NORMALIZE_NFC = NORMALIZE_DEFAULT_COMPOSE, - NORMALIZE_ALL, - NORMALIZE_NFKD = NORMALIZE_ALL, - NORMALIZE_ALL_COMPOSE, - NORMALIZE_NFKC = NORMALIZE_ALL_COMPOSE -}; - - -/** @defgroup Unicode Unicode Manipulation - * Functions operating on Unicode characters and UTF-8 strings. - * @{ - */ - -namespace Unicode -{ - -inline bool validate(gunichar uc) - { return (g_unichar_validate(uc) != 0); } -inline bool isalnum(gunichar uc) - { return (g_unichar_isalnum(uc) != 0); } -inline bool isalpha(gunichar uc) - { return (g_unichar_isalpha(uc) != 0); } -inline bool iscntrl(gunichar uc) - { return (g_unichar_iscntrl(uc) != 0); } -inline bool isdigit(gunichar uc) - { return (g_unichar_isdigit(uc) != 0); } -inline bool isgraph(gunichar uc) - { return (g_unichar_isgraph(uc) != 0); } -inline bool islower(gunichar uc) - { return (g_unichar_islower(uc) != 0); } -inline bool isprint(gunichar uc) - { return (g_unichar_isprint(uc) != 0); } -inline bool ispunct(gunichar uc) - { return (g_unichar_ispunct(uc) != 0); } -inline bool isspace(gunichar uc) - { return (g_unichar_isspace(uc) != 0); } -inline bool isupper(gunichar uc) - { return (g_unichar_isupper(uc) != 0); } -inline bool isxdigit(gunichar uc) - { return (g_unichar_isxdigit(uc) != 0); } -inline bool istitle(gunichar uc) - { return (g_unichar_istitle(uc) != 0); } -inline bool isdefined(gunichar uc) - { return (g_unichar_isdefined(uc) != 0); } -inline bool iswide(gunichar uc) - { return (g_unichar_iswide(uc) != 0); } - -inline gunichar toupper(gunichar uc) - { return g_unichar_toupper(uc); } -inline gunichar tolower(gunichar uc) - { return g_unichar_tolower(uc); } -inline gunichar totitle(gunichar uc) - { return g_unichar_totitle(uc); } - -inline int digit_value(gunichar uc) - { return g_unichar_digit_value(uc); } -inline int xdigit_value(gunichar uc) - { return g_unichar_xdigit_value(uc); } - -inline Glib::UnicodeType type(gunichar uc) - { return static_cast(static_cast(g_unichar_type(uc))); } - -inline Glib::UnicodeBreakType break_type(gunichar uc) - { return static_cast(static_cast(g_unichar_break_type(uc))); } - -} // namespace Unicode - - -namespace Ascii -{ - -inline bool isalnum(char c) - { return g_ascii_isalnum(c); } -inline bool isalpha(char c) - { return g_ascii_isalpha(c); } -inline bool iscntrl(char c) - { return g_ascii_iscntrl(c); } -inline bool isdigit(char c) - { return g_ascii_isdigit(c); } -inline bool isgraph(char c) - { return g_ascii_isgraph(c); } -inline bool islower(char c) - { return g_ascii_islower(c); } -inline bool isprint(char c) - { return g_ascii_isprint(c); } -inline bool ispunct(char c) - { return g_ascii_ispunct(c); } -inline bool isspace(char c) - { return g_ascii_isspace(c); } -inline bool isupper(char c) - { return g_ascii_isupper(c); } -inline bool isxdigit(char c) - { return g_ascii_isxdigit(c); } - -inline char tolower(char c) - { return g_ascii_tolower(c); } -inline char toupper(char c) - { return g_ascii_toupper(c); } - -inline int digit_value(char c) - { return g_ascii_digit_value(c); } -inline int xdigit_value(char c) - { return g_ascii_xdigit_value(c); } - -} // namespace Ascii - - -/** @} group Unicode */ - -} // namespace Glib - - -#endif /* _GLIBMM_UNICODE_H */ - diff --git a/libs/glibmm2/glib/glibmm/ustring.cc b/libs/glibmm2/glib/glibmm/ustring.cc deleted file mode 100644 index f7bf3bcf0a..0000000000 --- a/libs/glibmm2/glib/glibmm/ustring.cc +++ /dev/null @@ -1,1224 +0,0 @@ -// -*- c++ -*- -/* $Id: ustring.cc 369 2007-01-20 10:19:33Z daniel $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - -#include -#include - -#include -GLIBMM_USING_STD(find) - - -namespace -{ - -using Glib::ustring; - -// Little helper to make the conversion from gunichar to UTF-8 a one-liner. -// -struct UnicharToUtf8 -{ - char buf[6]; - ustring::size_type len; - - explicit UnicharToUtf8(gunichar uc) - : len (g_unichar_to_utf8(uc, buf)) {} -}; - - -// All utf8_*_offset() functions return npos if offset is out of range. -// The caller should decide if npos is a valid argument and just marks -// the whole string, or if it is not allowed (e.g. for start positions). -// In the latter case std::out_of_range should be thrown, but usually -// std::string will do that for us. - -// First overload: stop on '\0' character. -static -ustring::size_type utf8_byte_offset(const char* str, ustring::size_type offset) -{ - if(offset == ustring::npos) - return ustring::npos; - - const char *const utf8_skip = g_utf8_skip; - const char* p = str; - - for(; offset != 0; --offset) - { - const unsigned int c = static_cast(*p); - - if(c == 0) - return ustring::npos; - - p += utf8_skip[c]; - } - - return (p - str); -} - -// Second overload: stop when reaching maxlen. -static -ustring::size_type utf8_byte_offset(const char* str, ustring::size_type offset, - ustring::size_type maxlen) -{ - if(offset == ustring::npos) - return ustring::npos; - - const char *const utf8_skip = g_utf8_skip; - const char *const pend = str + maxlen; - const char* p = str; - - for(; offset != 0; --offset) - { - if(p >= pend) - return ustring::npos; - - p += utf8_skip[static_cast(*p)]; - } - - return (p - str); -} - -// Third overload: stop when reaching str.size(). -// -inline -ustring::size_type utf8_byte_offset(const std::string& str, ustring::size_type offset) -{ - return utf8_byte_offset(str.data(), offset, str.size()); -} - -// Takes UTF-8 character offset and count in ci and cn. -// Returns the byte offset and count in i and n. -// -struct Utf8SubstrBounds -{ - ustring::size_type i; - ustring::size_type n; - - Utf8SubstrBounds(const std::string& str, ustring::size_type ci, ustring::size_type cn) - : - i (utf8_byte_offset(str, ci)), - n (ustring::npos) - { - if(i != ustring::npos) - n = utf8_byte_offset(str.data() + i, cn, str.size() - i); - } -}; - -// Converts byte offset to UTF-8 character offset. -inline -ustring::size_type utf8_char_offset(const std::string& str, ustring::size_type offset) -{ - if(offset == ustring::npos) - return ustring::npos; - - const char *const pdata = str.data(); - return g_utf8_pointer_to_offset(pdata, pdata + offset); -} - - -// Helper to implement ustring::find_first_of() and find_first_not_of(). -// Returns the UTF-8 character offset, or ustring::npos if not found. -static -ustring::size_type utf8_find_first_of(const std::string& str, ustring::size_type offset, - const char* utf8_match, long utf8_match_size, - bool find_not_of) -{ - const ustring::size_type byte_offset = utf8_byte_offset(str, offset); - if(byte_offset == ustring::npos) - return ustring::npos; - - long ucs4_match_size = 0; - const Glib::ScopedPtr ucs4_match - (g_utf8_to_ucs4_fast(utf8_match, utf8_match_size, &ucs4_match_size)); - - const gunichar *const match_begin = ucs4_match.get(); - const gunichar *const match_end = match_begin + ucs4_match_size; - - const char *const str_begin = str.data(); - const char *const str_end = str_begin + str.size(); - - for(const char* pstr = str_begin + byte_offset; - pstr < str_end; - pstr = g_utf8_next_char(pstr)) - { - const gunichar *const pfound = std::find(match_begin, match_end, g_utf8_get_char(pstr)); - - if((pfound != match_end) != find_not_of) - return offset; - - ++offset; - } - - return ustring::npos; -} - -// Helper to implement ustring::find_last_of() and find_last_not_of(). -// Returns the UTF-8 character offset, or ustring::npos if not found. -static -ustring::size_type utf8_find_last_of(const std::string& str, ustring::size_type offset, - const char* utf8_match, long utf8_match_size, - bool find_not_of) -{ - long ucs4_match_size = 0; - const Glib::ScopedPtr ucs4_match - (g_utf8_to_ucs4_fast(utf8_match, utf8_match_size, &ucs4_match_size)); - - const gunichar *const match_begin = ucs4_match.get(); - const gunichar *const match_end = match_begin + ucs4_match_size; - - const char *const str_begin = str.data(); - const char* pstr = str_begin; - - // Set pstr one byte beyond the actual start position. - const ustring::size_type byte_offset = utf8_byte_offset(str, offset); - pstr += (byte_offset < str.size()) ? byte_offset + 1 : str.size(); - - while(pstr > str_begin) - { - // Move to previous character. - do - --pstr; - while((static_cast(*pstr) & 0xC0u) == 0x80); - - const gunichar *const pfound = std::find(match_begin, match_end, g_utf8_get_char(pstr)); - - if((pfound != match_end) != find_not_of) - return g_utf8_pointer_to_offset(str_begin, pstr); - } - - return ustring::npos; -} - -} // anonymous namespace - - -namespace Glib -{ - -#ifndef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS -// Initialize static member here, -// because the compiler did not allow us do it inline. -const ustring::size_type ustring::npos = std::string::npos; -#endif - -/* - * We need our own version of g_utf8_get_char(), because the std::string - * iterator is not necessarily a plain pointer (it's in fact not in GCC's - * libstdc++-v3). Copying the UTF-8 data into a temporary buffer isn't an - * option since this operation is quite time critical. The implementation - * is quite different from g_utf8_get_char() -- both more generic and likely - * faster. - * - * By looking at the first byte of a UTF-8 character one can determine the - * number of bytes used. GLib offers the g_utf8_skip[] array for this purpose, - * but accessing this global variable would, on IA32 at least, introduce - * a function call to fetch the Global Offset Table, plus two levels of - * indirection in order to read the value. Even worse, fetching the GOT is - * always done right at the start of the function instead of the branch that - * actually uses the variable. - * - * Fortunately, there's a better way to get the byte count. As this table - * shows, there's a nice regular pattern in the UTF-8 encoding scheme: - * - * 0x00000000 - 0x0000007F: 0xxxxxxx - * 0x00000080 - 0x000007FF: 110xxxxx 10xxxxxx - * 0x00000800 - 0x0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx - * 0x00010000 - 0x001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - * 0x00200000 - 0x03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - * 0x04000000 - 0x7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - * - * Except for the single byte case, the number of leading 1-bits equals the - * byte count. All that is needed is to shift the first byte to the left - * until bit 7 becomes 0. Naturally, doing so requires a loop -- but since - * we already have one, no additional cost is introduced. This shifting can - * further be combined with the computation of the bitmask needed to eliminate - * the leading length bits, thus saving yet another register. - * - * Note: If you change this code, it is advisable to also review what the - * compiler makes of it in the assembler output. Except for some pointless - * register moves, the generated code is sufficiently close to the optimum - * with GCC 4.1.2 on x86_64. - */ -gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) -{ - unsigned int result = static_cast(*pos); - - if((result & 0x80) != 0) - { - unsigned int mask = 0x40; - - do - { - result <<= 6; - const unsigned int c = static_cast(*++pos); - mask <<= 5; - result += c - 0x80; - } - while((result & mask) != 0); - - result &= mask - 1; - } - - return result; -} - - -/**** Glib::ustring ********************************************************/ - -ustring::ustring() -: - string_ () -{} - -ustring::ustring(const ustring& other) -: - string_ (other.string_) -{} - -ustring::ustring(const ustring& src, ustring::size_type i, ustring::size_type n) -: - string_ () -{ - const Utf8SubstrBounds bounds (src.string_, i, n); - string_.assign(src.string_, bounds.i, bounds.n); -} - -ustring::ustring(const char* src, ustring::size_type n) -: - string_ (src, utf8_byte_offset(src, n)) -{} - -ustring::ustring(const char* src) -: - string_ (src) -{} - -ustring::ustring(ustring::size_type n, gunichar uc) -: - string_ () -{ - if(uc < 0x80) - { - // Optimize the probably most common case. - string_.assign(n, static_cast(uc)); - } - else - { - const UnicharToUtf8 conv (uc); - string_.reserve(n * conv.len); - - for(; n > 0; --n) - string_.append(conv.buf, conv.len); - } -} - -ustring::ustring(ustring::size_type n, char c) -: - string_ (n, c) -{} - -ustring::ustring(const std::string& src) -: - string_ (src) -{} - -ustring::~ustring() -{} - -void ustring::swap(ustring& other) -{ - string_.swap(other.string_); -} - - -/**** Glib::ustring::operator=() *******************************************/ - -ustring& ustring::operator=(const ustring& other) -{ - string_ = other.string_; - return *this; -} - -ustring& ustring::operator=(const std::string& src) -{ - string_ = src; - return *this; -} - -ustring& ustring::operator=(const char* src) -{ - string_ = src; - return *this; -} - -ustring& ustring::operator=(gunichar uc) -{ - const UnicharToUtf8 conv (uc); - string_.assign(conv.buf, conv.len); - return *this; -} - -ustring& ustring::operator=(char c) -{ - string_ = c; - return *this; -} - - -/**** Glib::ustring::assign() **********************************************/ - -ustring& ustring::assign(const ustring& src) -{ - string_ = src.string_; - return *this; -} - -ustring& ustring::assign(const ustring& src, ustring::size_type i, ustring::size_type n) -{ - const Utf8SubstrBounds bounds (src.string_, i, n); - string_.assign(src.string_, bounds.i, bounds.n); - return *this; -} - -ustring& ustring::assign(const char* src, ustring::size_type n) -{ - string_.assign(src, utf8_byte_offset(src, n)); - return *this; -} - -ustring& ustring::assign(const char* src) -{ - string_ = src; - return *this; -} - -ustring& ustring::assign(ustring::size_type n, gunichar uc) -{ - ustring temp (n, uc); - string_.swap(temp.string_); - return *this; -} - -ustring& ustring::assign(ustring::size_type n, char c) -{ - string_.assign(n, c); - return *this; -} - - -/**** Glib::ustring::operator+=() ******************************************/ - -ustring& ustring::operator+=(const ustring& src) -{ - string_ += src.string_; - return *this; -} - -ustring& ustring::operator+=(const char* src) -{ - string_ += src; - return *this; -} - -ustring& ustring::operator+=(gunichar uc) -{ - const UnicharToUtf8 conv (uc); - string_.append(conv.buf, conv.len); - return *this; -} - -ustring& ustring::operator+=(char c) -{ - string_ += c; - return *this; -} - - -/**** Glib::ustring::push_back() *******************************************/ - -void ustring::push_back(gunichar uc) -{ - const UnicharToUtf8 conv (uc); - string_.append(conv.buf, conv.len); -} - -void ustring::push_back(char c) -{ - string_ += c; -} - - -/**** Glib::ustring::append() **********************************************/ - -ustring& ustring::append(const ustring& src) -{ - string_ += src.string_; - return *this; -} - -ustring& ustring::append(const ustring& src, ustring::size_type i, ustring::size_type n) -{ - const Utf8SubstrBounds bounds (src.string_, i, n); - string_.append(src.string_, bounds.i, bounds.n); - return *this; -} - -ustring& ustring::append(const char* src, ustring::size_type n) -{ - string_.append(src, utf8_byte_offset(src, n)); - return *this; -} - -ustring& ustring::append(const char* src) -{ - string_ += src; - return *this; -} - -ustring& ustring::append(ustring::size_type n, gunichar uc) -{ - string_.append(ustring(n, uc).string_); - return *this; -} - -ustring& ustring::append(ustring::size_type n, char c) -{ - string_.append(n, c); - return *this; -} - - -/**** Glib::ustring::insert() **********************************************/ - -ustring& ustring::insert(ustring::size_type i, const ustring& src) -{ - string_.insert(utf8_byte_offset(string_, i), src.string_); - return *this; -} - -ustring& ustring::insert(ustring::size_type i, const ustring& src, - ustring::size_type i2, ustring::size_type n) -{ - const Utf8SubstrBounds bounds2 (src.string_, i2, n); - string_.insert(utf8_byte_offset(string_, i), src.string_, bounds2.i, bounds2.n); - return *this; -} - -ustring& ustring::insert(ustring::size_type i, const char* src, ustring::size_type n) -{ - string_.insert(utf8_byte_offset(string_, i), src, utf8_byte_offset(src, n)); - return *this; -} - -ustring& ustring::insert(ustring::size_type i, const char* src) -{ - string_.insert(utf8_byte_offset(string_, i), src); - return *this; -} - -ustring& ustring::insert(ustring::size_type i, ustring::size_type n, gunichar uc) -{ - string_.insert(utf8_byte_offset(string_, i), ustring(n, uc).string_); - return *this; -} - -ustring& ustring::insert(ustring::size_type i, ustring::size_type n, char c) -{ - string_.insert(utf8_byte_offset(string_, i), n, c); - return *this; -} - -ustring::iterator ustring::insert(ustring::iterator p, gunichar uc) -{ - const size_type offset = p.base() - string_.begin(); - const UnicharToUtf8 conv (uc); - string_.insert(offset, conv.buf, conv.len); - return iterator(string_.begin() + offset); -} - -ustring::iterator ustring::insert(ustring::iterator p, char c) -{ - return iterator(string_.insert(p.base(), c)); -} - -void ustring::insert(ustring::iterator p, ustring::size_type n, gunichar uc) -{ - string_.insert(p.base() - string_.begin(), ustring(n, uc).string_); -} - -void ustring::insert(ustring::iterator p, ustring::size_type n, char c) -{ - string_.insert(p.base(), n, c); -} - - -/**** Glib::ustring::replace() *********************************************/ - -ustring& ustring::replace(ustring::size_type i, ustring::size_type n, const ustring& src) -{ - const Utf8SubstrBounds bounds (string_, i, n); - string_.replace(bounds.i, bounds.n, src.string_); - return *this; -} - -ustring& ustring::replace(ustring::size_type i, ustring::size_type n, - const ustring& src, ustring::size_type i2, ustring::size_type n2) -{ - const Utf8SubstrBounds bounds (string_, i, n); - const Utf8SubstrBounds bounds2 (src.string_, i2, n2); - string_.replace(bounds.i, bounds.n, src.string_, bounds2.i, bounds2.n); - return *this; -} - -ustring& ustring::replace(ustring::size_type i, ustring::size_type n, - const char* src, ustring::size_type n2) -{ - const Utf8SubstrBounds bounds (string_, i, n); - string_.replace(bounds.i, bounds.n, src, utf8_byte_offset(src, n2)); - return *this; -} - -ustring& ustring::replace(ustring::size_type i, ustring::size_type n, const char* src) -{ - const Utf8SubstrBounds bounds (string_, i, n); - string_.replace(bounds.i, bounds.n, src); - return *this; -} - -ustring& ustring::replace(ustring::size_type i, ustring::size_type n, - ustring::size_type n2, gunichar uc) -{ - const Utf8SubstrBounds bounds (string_, i, n); - string_.replace(bounds.i, bounds.n, ustring(n2, uc).string_); - return *this; -} - -ustring& ustring::replace(ustring::size_type i, ustring::size_type n, - ustring::size_type n2, char c) -{ - const Utf8SubstrBounds bounds (string_, i, n); - string_.replace(bounds.i, bounds.n, n2, c); - return *this; -} - -ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, const ustring& src) -{ - string_.replace(pbegin.base(), pend.base(), src.string_); - return *this; -} - -ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, - const char* src, ustring::size_type n) -{ - string_.replace(pbegin.base(), pend.base(), src, utf8_byte_offset(src, n)); - return *this; -} - -ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, const char* src) -{ - string_.replace(pbegin.base(), pend.base(), src); - return *this; -} - -ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, - ustring::size_type n, gunichar uc) -{ - string_.replace(pbegin.base(), pend.base(), ustring(n, uc).string_); - return *this; -} - -ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, - ustring::size_type n, char c) -{ - string_.replace(pbegin.base(), pend.base(), n, c); - return *this; -} - - -/**** Glib::ustring::erase() ***********************************************/ - -void ustring::clear() -{ - string_.erase(); -} - -ustring& ustring::erase(ustring::size_type i, ustring::size_type n) -{ - const Utf8SubstrBounds bounds (string_, i, n); - string_.erase(bounds.i, bounds.n); - return *this; -} - -ustring& ustring::erase() -{ - string_.erase(); - return *this; -} - -ustring::iterator ustring::erase(ustring::iterator p) -{ - return iterator(string_.erase(p.base())); -} - -ustring::iterator ustring::erase(ustring::iterator pbegin, ustring::iterator pend) -{ - return iterator(string_.erase(pbegin.base(), pend.base())); -} - - -/**** Glib::ustring::compare() *********************************************/ - -int ustring::compare(const ustring& rhs) const -{ - return g_utf8_collate(string_.c_str(), rhs.string_.c_str()); -} - -int ustring::compare(const char* rhs) const -{ - return g_utf8_collate(string_.c_str(), rhs); -} - -int ustring::compare(ustring::size_type i, ustring::size_type n, const ustring& rhs) const -{ - return ustring(*this, i, n).compare(rhs); -} - -int ustring::compare(ustring::size_type i, ustring::size_type n, - const ustring& rhs, ustring::size_type i2, ustring::size_type n2) const -{ - return ustring(*this, i, n).compare(ustring(rhs, i2, n2)); -} - -int ustring::compare(ustring::size_type i, ustring::size_type n, - const char* rhs, ustring::size_type n2) const -{ - return ustring(*this, i, n).compare(ustring(rhs, n2)); -} - -int ustring::compare(ustring::size_type i, ustring::size_type n, const char* rhs) const -{ - return ustring(*this, i, n).compare(rhs); -} - - -/**** Glib::ustring -- index access ****************************************/ - -ustring::value_type ustring::operator[](ustring::size_type i) const -{ - return g_utf8_get_char(g_utf8_offset_to_pointer(string_.data(), i)); -} - -ustring::value_type ustring::at(ustring::size_type i) const -{ - const size_type byte_offset = utf8_byte_offset(string_, i); - - // Throws std::out_of_range if the index is invalid. - return g_utf8_get_char(&string_.at(byte_offset)); -} - - -/**** Glib::ustring -- iterator access *************************************/ - -ustring::iterator ustring::begin() -{ - return iterator(string_.begin()); -} - -ustring::iterator ustring::end() -{ - return iterator(string_.end()); -} - -ustring::const_iterator ustring::begin() const -{ - return const_iterator(string_.begin()); -} - -ustring::const_iterator ustring::end() const -{ - return const_iterator(string_.end()); -} - -ustring::reverse_iterator ustring::rbegin() -{ - return reverse_iterator(iterator(string_.end())); -} - -ustring::reverse_iterator ustring::rend() -{ - return reverse_iterator(iterator(string_.begin())); -} - -ustring::const_reverse_iterator ustring::rbegin() const -{ - return const_reverse_iterator(const_iterator(string_.end())); -} - -ustring::const_reverse_iterator ustring::rend() const -{ - return const_reverse_iterator(const_iterator(string_.begin())); -} - - -/**** Glib::ustring::find() ************************************************/ - -ustring::size_type ustring::find(const ustring& str, ustring::size_type i) const -{ - return utf8_char_offset(string_, string_.find(str.string_, utf8_byte_offset(string_, i))); -} - -ustring::size_type ustring::find(const char* str, ustring::size_type i, ustring::size_type n) const -{ - return utf8_char_offset(string_, string_.find(str, utf8_byte_offset(string_, i), - utf8_byte_offset(str, n))); -} - -ustring::size_type ustring::find(const char* str, ustring::size_type i) const -{ - return utf8_char_offset(string_, string_.find(str, utf8_byte_offset(string_, i))); -} - -ustring::size_type ustring::find(gunichar uc, ustring::size_type i) const -{ - const UnicharToUtf8 conv (uc); - return utf8_char_offset(string_, string_.find(conv.buf, utf8_byte_offset(string_, i), conv.len)); -} - -ustring::size_type ustring::find(char c, ustring::size_type i) const -{ - return utf8_char_offset(string_, string_.find(c, utf8_byte_offset(string_, i))); -} - - -/**** Glib::ustring::rfind() ***********************************************/ - -ustring::size_type ustring::rfind(const ustring& str, ustring::size_type i) const -{ - return utf8_char_offset(string_, string_.rfind(str.string_, utf8_byte_offset(string_, i))); -} - -ustring::size_type ustring::rfind(const char* str, ustring::size_type i, - ustring::size_type n) const -{ - return utf8_char_offset(string_, string_.rfind(str, utf8_byte_offset(string_, i), - utf8_byte_offset(str, n))); -} - -ustring::size_type ustring::rfind(const char* str, ustring::size_type i) const -{ - return utf8_char_offset(string_, string_.rfind(str, utf8_byte_offset(string_, i))); -} - -ustring::size_type ustring::rfind(gunichar uc, ustring::size_type i) const -{ - const UnicharToUtf8 conv (uc); - return utf8_char_offset(string_, string_.rfind(conv.buf, utf8_byte_offset(string_, i), conv.len)); -} - -ustring::size_type ustring::rfind(char c, ustring::size_type i) const -{ - return utf8_char_offset(string_, string_.rfind(c, utf8_byte_offset(string_, i))); -} - - -/**** Glib::ustring::find_first_of() ***************************************/ - -ustring::size_type ustring::find_first_of(const ustring& match, ustring::size_type i) const -{ - return utf8_find_first_of(string_, i, match.string_.data(), match.string_.size(), false); -} - -ustring::size_type ustring::find_first_of(const char* match, - ustring::size_type i, ustring::size_type n) const -{ - return utf8_find_first_of(string_, i, match, n, false); -} - -ustring::size_type ustring::find_first_of(const char* match, ustring::size_type i) const -{ - return utf8_find_first_of(string_, i, match, -1, false); -} - -ustring::size_type ustring::find_first_of(gunichar uc, ustring::size_type i) const -{ - return find(uc, i); -} - -ustring::size_type ustring::find_first_of(char c, ustring::size_type i) const -{ - return find(c, i); -} - - -/**** Glib::ustring::find_last_of() ****************************************/ - -ustring::size_type ustring::find_last_of(const ustring& match, ustring::size_type i) const -{ - return utf8_find_last_of(string_, i, match.string_.data(), match.string_.size(), false); -} - -ustring::size_type ustring::find_last_of(const char* match, - ustring::size_type i, ustring::size_type n) const -{ - return utf8_find_last_of(string_, i, match, n, false); -} - -ustring::size_type ustring::find_last_of(const char* match, ustring::size_type i) const -{ - return utf8_find_last_of(string_, i, match, -1, false); -} - -ustring::size_type ustring::find_last_of(gunichar uc, ustring::size_type i) const -{ - return rfind(uc, i); -} - -ustring::size_type ustring::find_last_of(char c, ustring::size_type i) const -{ - return rfind(c, i); -} - - -/**** Glib::ustring::find_first_not_of() ***********************************/ - -ustring::size_type ustring::find_first_not_of(const ustring& match, ustring::size_type i) const -{ - return utf8_find_first_of(string_, i, match.string_.data(), match.string_.size(), true); -} - -ustring::size_type ustring::find_first_not_of(const char* match, - ustring::size_type i, ustring::size_type n) const -{ - return utf8_find_first_of(string_, i, match, n, true); -} - -ustring::size_type ustring::find_first_not_of(const char* match, ustring::size_type i) const -{ - return utf8_find_first_of(string_, i, match, -1, true); -} - -// Unfortunately, all of the find_*_not_of() methods for single -// characters need their own special implementation. -// -ustring::size_type ustring::find_first_not_of(gunichar uc, ustring::size_type i) const -{ - const size_type bi = utf8_byte_offset(string_, i); - if(bi != npos) - { - const char *const pbegin = string_.data(); - const char *const pend = pbegin + string_.size(); - - for(const char* p = pbegin + bi; - p < pend; - p = g_utf8_next_char(p), ++i) - { - if(g_utf8_get_char(p) != uc) - return i; - } - } - return npos; -} - -ustring::size_type ustring::find_first_not_of(char c, ustring::size_type i) const -{ - const size_type bi = utf8_byte_offset(string_, i); - if(bi != npos) - { - const char *const pbegin = string_.data(); - const char *const pend = pbegin + string_.size(); - - for(const char* p = pbegin + bi; - p < pend; - p = g_utf8_next_char(p), ++i) - { - if(*p != c) - return i; - } - } - return npos; -} - - -/**** Glib::ustring::find_last_not_of() ************************************/ - -ustring::size_type ustring::find_last_not_of(const ustring& match, ustring::size_type i) const -{ - return utf8_find_last_of(string_, i, match.string_.data(), match.string_.size(), true); -} - -ustring::size_type ustring::find_last_not_of(const char* match, - ustring::size_type i, ustring::size_type n) const -{ - return utf8_find_last_of(string_, i, match, n, true); -} - -ustring::size_type ustring::find_last_not_of(const char* match, ustring::size_type i) const -{ - return utf8_find_last_of(string_, i, match, -1, true); -} - -// Unfortunately, all of the find_*_not_of() methods for single -// characters need their own special implementation. -// -ustring::size_type ustring::find_last_not_of(gunichar uc, ustring::size_type i) const -{ - const char *const pbegin = string_.data(); - const char *const pend = pbegin + string_.size(); - size_type i_cur = 0; - size_type i_found = npos; - - for(const char* p = pbegin; - p < pend && i_cur <= i; - p = g_utf8_next_char(p), ++i_cur) - { - if(g_utf8_get_char(p) != uc) - i_found = i_cur; - } - return i_found; -} - -ustring::size_type ustring::find_last_not_of(char c, ustring::size_type i) const -{ - const char *const pbegin = string_.data(); - const char *const pend = pbegin + string_.size(); - size_type i_cur = 0; - size_type i_found = npos; - - for(const char* p = pbegin; - p < pend && i_cur <= i; - p = g_utf8_next_char(p), ++i_cur) - { - if(*p != c) - i_found = i_cur; - } - return i_found; -} - - -/**** Glib::ustring -- get size and resize *********************************/ - -bool ustring::empty() const -{ - return string_.empty(); -} - -ustring::size_type ustring::size() const -{ - const char *const pdata = string_.data(); - return g_utf8_pointer_to_offset(pdata, pdata + string_.size()); -} - -ustring::size_type ustring::length() const -{ - const char *const pdata = string_.data(); - return g_utf8_pointer_to_offset(pdata, pdata + string_.size()); -} - -ustring::size_type ustring::bytes() const -{ - return string_.size(); -} - -ustring::size_type ustring::capacity() const -{ - return string_.capacity(); -} - -ustring::size_type ustring::max_size() const -{ - return string_.max_size(); -} - -void ustring::resize(ustring::size_type n, gunichar uc) -{ - const size_type size_now = size(); - if(n < size_now) - erase(n, npos); - else if(n > size_now) - append(n - size_now, uc); -} - -void ustring::resize(ustring::size_type n, char c) -{ - const size_type size_now = size(); - if(n < size_now) - erase(n, npos); - else if(n > size_now) - string_.append(n - size_now, c); -} - -void ustring::reserve(ustring::size_type n) -{ - string_.reserve(n); -} - - -/**** Glib::ustring -- C string access *************************************/ - -const char* ustring::data() const -{ - return string_.data(); -} - -const char* ustring::c_str() const -{ - return string_.c_str(); -} - -// Note that copy() requests UTF-8 character offsets as -// parameters, but returns the number of copied bytes. -// -ustring::size_type ustring::copy(char* dest, ustring::size_type n, ustring::size_type i) const -{ - const Utf8SubstrBounds bounds (string_, i, n); - return string_.copy(dest, bounds.n, bounds.i); -} - - -/**** Glib::ustring -- UTF-8 utilities *************************************/ - -bool ustring::validate() const -{ - return (g_utf8_validate(string_.data(), string_.size(), 0) != 0); -} - -bool ustring::validate(ustring::iterator& first_invalid) -{ - const char *const pdata = string_.data(); - const char* valid_end = pdata; - const int is_valid = g_utf8_validate(pdata, string_.size(), &valid_end); - - first_invalid = iterator(string_.begin() + (valid_end - pdata)); - return (is_valid != 0); -} - -bool ustring::validate(ustring::const_iterator& first_invalid) const -{ - const char *const pdata = string_.data(); - const char* valid_end = pdata; - const int is_valid = g_utf8_validate(pdata, string_.size(), &valid_end); - - first_invalid = const_iterator(string_.begin() + (valid_end - pdata)); - return (is_valid != 0); -} - -bool ustring::is_ascii() const -{ - const char* p = string_.data(); - const char *const pend = p + string_.size(); - - for(; p != pend; ++p) - { - if((static_cast(*p) & 0x80u) != 0) - return false; - } - - return true; -} - -ustring ustring::normalize(NormalizeMode mode) const -{ - const ScopedPtr buf (g_utf8_normalize(string_.data(), string_.size(), - static_cast(int(mode)))); - return ustring(buf.get()); -} - -ustring ustring::uppercase() const -{ - const ScopedPtr buf (g_utf8_strup(string_.data(), string_.size())); - return ustring(buf.get()); -} - -ustring ustring::lowercase() const -{ - const ScopedPtr buf (g_utf8_strdown(string_.data(), string_.size())); - return ustring(buf.get()); -} - -ustring ustring::casefold() const -{ - const ScopedPtr buf (g_utf8_casefold(string_.data(), string_.size())); - return ustring(buf.get()); -} - -std::string ustring::collate_key() const -{ - const ScopedPtr buf (g_utf8_collate_key(string_.data(), string_.size())); - return std::string(buf.get()); -} - -std::string ustring::casefold_collate_key() const -{ - char *const casefold_buf = g_utf8_casefold(string_.data(), string_.size()); - char *const key_buf = g_utf8_collate_key(casefold_buf, -1); - g_free(casefold_buf); - return std::string(ScopedPtr(key_buf).get()); -} - - -/**** Glib::ustring::SequenceToString **************************************/ - -ustring::SequenceToString - ::SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend) -: - std::string(pbegin.base(), pend.base()) -{} - -ustring::SequenceToString - ::SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend) -: - std::string(pbegin.base(), pend.base()) -{} - - -/**** Glib::ustring -- stream I/O operators ********************************/ - -std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string) -{ - std::string locale_string; - is >> locale_string; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - utf8_string = Glib::locale_to_utf8(locale_string); - #else - std::auto_ptr error; //TODO: Check this? - utf8_string = Glib::locale_to_utf8(locale_string, error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - return is; -} - -std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string) -{ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - os << Glib::locale_from_utf8(utf8_string); - #else - std::auto_ptr error; //TODO: Check this? - os << Glib::locale_from_utf8(utf8_string, error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return os; -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/ustring.h b/libs/glibmm2/glib/glibmm/ustring.h deleted file mode 100644 index 06c97c7633..0000000000 --- a/libs/glibmm2/glib/glibmm/ustring.h +++ /dev/null @@ -1,997 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_USTRING_H -#define _GLIBMM_USTRING_H - -/* $Id: ustring.h 369 2007-01-20 10:19:33Z daniel $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -#include -#include -#include - -#include -GLIBMM_USING_STD(bidirectional_iterator_tag) -GLIBMM_USING_STD(reverse_iterator) -GLIBMM_USING_STD(string) -GLIBMM_USING_STD(istream) -GLIBMM_USING_STD(ostream) - -#ifdef GLIBMM_HAVE_STD_ITERATOR_TRAITS -GLIBMM_USING_STD(iterator_traits) -#else -#include /* for ptrdiff_t */ -GLIBMM_USING_STD(random_access_iterator_tag) -#endif - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -#ifndef GLIBMM_HAVE_STD_ITERATOR_TRAITS - -template -struct IteratorTraits -{ - typedef typename T::iterator_category iterator_category; - typedef typename T::value_type value_type; - typedef typename T::difference_type difference_type; - typedef typename T::pointer pointer; - typedef typename T::reference reference; -}; - -template -struct IteratorTraits -{ - typedef std::random_access_iterator_tag iterator_category; - typedef T value_type; - typedef ptrdiff_t difference_type; - typedef T* pointer; - typedef T& reference; -}; - -template -struct IteratorTraits -{ - typedef std::random_access_iterator_tag iterator_category; - typedef T value_type; - typedef ptrdiff_t difference_type; - typedef const T* pointer; - typedef const T& reference; -}; - -#endif /* GLIBMM_HAVE_STD_ITERATOR_TRAITS */ -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** The iterator type of Glib::ustring. - * Note this is not a random access iterator but a bidirectional one, - * since all index operations need to iterate over the UTF-8 data. Use - * std::advance() to move to a certain position. However, all of the - * relational operators are available: - * == != < > <= >= - * - * A writeable iterator isn't provided because: The number of bytes of - * the old UTF-8 character and the new one to write could be different. - * Therefore, any write operation would invalidate all other iterators - * pointing into the same string. - */ -template -class ustring_Iterator -{ -public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef gunichar value_type; - typedef std::string::difference_type difference_type; - typedef value_type reference; - typedef void pointer; - - inline ustring_Iterator(); - inline ustring_Iterator(const ustring_Iterator& other); - - inline value_type operator*() const; - - inline ustring_Iterator & operator++(); - inline const ustring_Iterator operator++(int); - inline ustring_Iterator & operator--(); - inline const ustring_Iterator operator--(int); - - explicit inline ustring_Iterator(T pos); - inline T base() const; - -private: - T pos_; -}; - - -/** Extract a UCS-4 character from UTF-8 data. - * Convert a single UTF-8 (multibyte) character starting at @p pos to - * a UCS-4 wide character. This may read up to 6 bytes after the start - * position, depending on the UTF-8 character width. You have to make - * sure the source contains at least one valid UTF-8 character. - * - * This is mainly used by the implementation of Glib::ustring::iterator, - * but it might be useful as utility function if you prefer using - * std::string even for UTF-8 encoding. - */ -gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) G_GNUC_PURE; - - -/** Glib::ustring has much the same interface as std::string, but contains - * %Unicode characters encoded as UTF-8. - * - * @par About UTF-8 and ASCII - * @par - * The standard character set ANSI_X3.4-1968 -- more commonly known as - * ASCII -- is a subset of UTF-8. So, if you want to, you can use - * Glib::ustring without even thinking about UTF-8. - * @par - * Whenever ASCII is mentioned in this manual, we mean the @em real ASCII - * (i.e. as defined in ANSI_X3.4-1968), which contains only 7-bit characters. - * Glib::ustring can @em not be used with ASCII-compatible extended 8-bit - * charsets like ISO-8859-1. It's a good idea to avoid string literals - * containing non-ASCII characters (e.g. German umlauts) in source code, - * or at least you should use UTF-8 literals. - * @par - * You can find a detailed UTF-8 and %Unicode FAQ here: - * http://www.cl.cam.ac.uk/~mgk25/unicode.html - * - * @par Glib::ustring vs. std::string - * @par - * Glib::ustring has implicit type conversions to and from std::string. - * These conversions do @em not convert to/from the current locale (see - * Glib::locale_from_utf8() and Glib::locale_to_utf8() if you need that). You - * can always use std::string instead of Glib::ustring -- however, using - * std::string with multi-byte characters is quite hard. For instance, - * std::string::operator[] might return a byte in the middle of a - * character, and std::string::length() returns the number of bytes - * rather than characters. So don't do that without a good reason. - * @par - * In a perfect world the C++ Standard Library would contain a UTF-8 string - * class. Unfortunately, the C++ standard doesn't mention UTF-8 at all. Note - * that std::wstring is not a UTF-8 string class because it contains only - * fixed-width characters (where width could be 32, 16, or even 8 bits). - * - * @par Glib::ustring and stream input/output - * @par - * The stream I/O operators, that is operator<<() and operator>>(), perform - * implicit charset conversion to/from the current locale. If that's not - * what you intented (e.g. when writing to a configuration file that should - * always be UTF-8 encoded) use ustring::raw() to override this behaviour. - * @par - * If you're using std::ostringstream to build strings for display in the - * user interface, you must convert the result back to UTF-8 as shown below: - * @code - * std::ostringstream output; - * output.imbue(std::locale("")); // use the user's locale for this stream - * output << percentage << " % done"; - * label->set_text(Glib::locale_to_utf8(output.str())); - * @endcode - * - * @par Implementation notes - * @par - * Glib::ustring does not inherit from std::string, because std::string was - * intended to be a final class. For instance, it does not have a virtual - * destructor. Also, a HAS-A relationship is more appropriate because - * ustring can't just enhance the std::string interface. Rather, it has to - * reimplement the interface so that all operations are based on characters - * instead of bytes. - */ -class ustring -{ -public: - typedef std::string::size_type size_type; - typedef std::string::difference_type difference_type; - - typedef gunichar value_type; - typedef gunichar & reference; - typedef const gunichar & const_reference; - - typedef ustring_Iterator iterator; - typedef ustring_Iterator const_iterator; - -#ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR - - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; - -#else - - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; - -#endif /* GLIBMM_HAVE_SUN_REVERSE_ITERATOR */ - -#ifdef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS - static GLIBMM_API const size_type npos = std::string::npos; -#else - //The IRIX MipsPro compiler says "The indicated constant value is not known", - //so we need to initalize the static member data elsewhere. - static GLIBMM_API const size_type npos; -#endif - - /*! Default constructor, which creates an empty string. - */ - ustring(); - - ~ustring(); - - /*! Construct a ustring as a copy of another ustring. - * @param other A source string. - */ - ustring(const ustring& other); - - /*! Assign the value of another string to this string. - * @param other A source string. - */ - ustring& operator=(const ustring& other); - - /*! Swap contents with another string. - * @param other String to swap with. - */ - void swap(ustring& other); - - /*! Construct a ustring as a copy of another std::string. - * @param src A source std::string containing text encoded as UTF-8. - */ - ustring(const std::string& src); - - /*! Construct a ustring as a copy of a substring. - * @param src %Source ustring. - * @param i Index of first character to copy from. - * @param n Number of UTF-8 characters to copy (defaults to copying the remainder). - */ - ustring(const ustring& src, size_type i, size_type n=npos); - - /*! Construct a ustring as a partial copy of a C string. - * @param src %Source C string encoded as UTF-8. - * @param n Number of UTF-8 characters to copy. - */ - ustring(const char* src, size_type n); - - /*! Construct a ustring as a copy of a C string. - * @param src %Source C string encoded as UTF-8. - */ - ustring(const char* src); - - /*! Construct a ustring as multiple characters. - * @param n Number of characters. - * @param uc UCS-4 code point to use. - */ - ustring(size_type n, gunichar uc); - - /*! Construct a ustring as multiple characters. - * @param n Number of characters. - * @param c ASCII character to use. - */ - ustring(size_type n, char c); - - /*! Construct a ustring as a copy of a range. - * @param pbegin Start of range. - * @param pend End of range. - */ - template ustring(In pbegin, In pend); - - -//! @name Assign new contents. -//! @{ - - ustring& operator=(const std::string& src); - ustring& operator=(const char* src); - ustring& operator=(gunichar uc); - ustring& operator=(char c); - - ustring& assign(const ustring& src); - ustring& assign(const ustring& src, size_type i, size_type n); - ustring& assign(const char* src, size_type n); - ustring& assign(const char* src); - ustring& assign(size_type n, gunichar uc); - ustring& assign(size_type n, char c); - template ustring& assign(In pbegin, In pend); - -//! @} -//! @name Append to the string. -//! @{ - - ustring& operator+=(const ustring& src); - ustring& operator+=(const char* src); - ustring& operator+=(gunichar uc); - ustring& operator+=(char c); - void push_back(gunichar uc); - void push_back(char c); - - ustring& append(const ustring& src); - ustring& append(const ustring& src, size_type i, size_type n); - ustring& append(const char* src, size_type n); - ustring& append(const char* src); - ustring& append(size_type n, gunichar uc); - ustring& append(size_type n, char c); - template ustring& append(In pbegin, In pend); - -//! @} -//! @name Insert into the string. -//! @{ - - ustring& insert(size_type i, const ustring& src); - ustring& insert(size_type i, const ustring& src, size_type i2, size_type n); - ustring& insert(size_type i, const char* src, size_type n); - ustring& insert(size_type i, const char* src); - ustring& insert(size_type i, size_type n, gunichar uc); - ustring& insert(size_type i, size_type n, char c); - - iterator insert(iterator p, gunichar uc); - iterator insert(iterator p, char c); - void insert(iterator p, size_type n, gunichar uc); - void insert(iterator p, size_type n, char c); - template void insert(iterator p, In pbegin, In pend); - -//! @} -//! @name Replace sub-strings. -//! @{ - - ustring& replace(size_type i, size_type n, const ustring& src); - ustring& replace(size_type i, size_type n, const ustring& src, size_type i2, size_type n2); - ustring& replace(size_type i, size_type n, const char* src, size_type n2); - ustring& replace(size_type i, size_type n, const char* src); - ustring& replace(size_type i, size_type n, size_type n2, gunichar uc); - ustring& replace(size_type i, size_type n, size_type n2, char c); - - ustring& replace(iterator pbegin, iterator pend, const ustring& src); - ustring& replace(iterator pbegin, iterator pend, const char* src, size_type n); - ustring& replace(iterator pbegin, iterator pend, const char* src); - ustring& replace(iterator pbegin, iterator pend, size_type n, gunichar uc); - ustring& replace(iterator pbegin, iterator pend, size_type n, char c); - template ustring& replace(iterator pbegin, iterator pend, In pbegin2, In pend2); - -//! @} -//! @name Erase sub-strings. -//! @{ - - void clear(); - ustring& erase(size_type i, size_type n=npos); - ustring& erase(); - iterator erase(iterator p); - iterator erase(iterator pbegin, iterator pend); - -//! @} -//! @name Compare and collate. -//! @{ - - int compare(const ustring& rhs) const; - int compare(const char* rhs) const; - int compare(size_type i, size_type n, const ustring& rhs) const; - int compare(size_type i, size_type n, const ustring& rhs, size_type i2, size_type n2) const; - int compare(size_type i, size_type n, const char* rhs, size_type n2) const; - int compare(size_type i, size_type n, const char* rhs) const; - - /*! Create a unique sorting key for the UTF-8 string. If you need to - * compare UTF-8 strings regularly, e.g. for sorted containers such as - * std::set<>, you should consider creating a collate key first - * and compare this key instead of the actual string. - * - * The ustring::compare() methods as well as the relational operators - * == != < > <= >= are quite costly - * because they have to deal with %Unicode and the collation rules defined by - * the current locale. Converting both operands to UCS-4 is just the first - * of several costly steps involved when comparing ustrings. So be careful. - */ - std::string collate_key() const; - - /*! Create a unique key for the UTF-8 string that can be used for caseless - * sorting. ustr.casefold_collate_key() results in the same string - * as ustr.casefold().collate_key(), but the former is likely more - * efficient. - */ - std::string casefold_collate_key() const; - -//! @} -//! @name Extract characters and sub-strings. -//! @{ - - /*! No reference return; use replace() to write characters. */ - value_type operator[](size_type i) const; - - /*! No reference return; use replace() to write characters. @throw std::out_of_range */ - value_type at(size_type i) const; - - inline ustring substr(size_type i=0, size_type n=npos) const; - -//! @} -//! @name Access a sequence of characters. -//! @{ - - iterator begin(); - iterator end(); - const_iterator begin() const; - const_iterator end() const; - reverse_iterator rbegin(); - reverse_iterator rend(); - const_reverse_iterator rbegin() const; - const_reverse_iterator rend() const; - -//! @} -//! @name Find sub-strings. -//! @{ - - size_type find(const ustring& str, size_type i=0) const; - size_type find(const char* str, size_type i, size_type n) const; - size_type find(const char* str, size_type i=0) const; - size_type find(gunichar uc, size_type i=0) const; - size_type find(char c, size_type i=0) const; - - size_type rfind(const ustring& str, size_type i=npos) const; - size_type rfind(const char* str, size_type i, size_type n) const; - size_type rfind(const char* str, size_type i=npos) const; - size_type rfind(gunichar uc, size_type i=npos) const; - size_type rfind(char c, size_type i=npos) const; - -//! @} -//! @name Match against a set of characters. -//! @{ - - size_type find_first_of(const ustring& match, size_type i=0) const; - size_type find_first_of(const char* match, size_type i, size_type n) const; - size_type find_first_of(const char* match, size_type i=0) const; - size_type find_first_of(gunichar uc, size_type i=0) const; - size_type find_first_of(char c, size_type i=0) const; - - size_type find_last_of(const ustring& match, size_type i=npos) const; - size_type find_last_of(const char* match, size_type i, size_type n) const; - size_type find_last_of(const char* match, size_type i=npos) const; - size_type find_last_of(gunichar uc, size_type i=npos) const; - size_type find_last_of(char c, size_type i=npos) const; - - size_type find_first_not_of(const ustring& match, size_type i=0) const; - size_type find_first_not_of(const char* match, size_type i, size_type n) const; - size_type find_first_not_of(const char* match, size_type i=0) const; - size_type find_first_not_of(gunichar uc, size_type i=0) const; - size_type find_first_not_of(char c, size_type i=0) const; - - size_type find_last_not_of(const ustring& match, size_type i=npos) const; - size_type find_last_not_of(const char* match, size_type i, size_type n) const; - size_type find_last_not_of(const char* match, size_type i=npos) const; - size_type find_last_not_of(gunichar uc, size_type i=npos) const; - size_type find_last_not_of(char c, size_type i=npos) const; - -//! @} -//! @name Retrieve the string's size. -//! @{ - - /** Returns true if the string is empty. Equivalent to *this == "". - * @result Whether the string is empty. - */ - bool empty() const; - - /** Returns the number of characters in the string, not including any null-termination. - * @result The number of UTF-8 characters. - * - * @see bytes(), empty() - */ - size_type size() const; - - //We have length() as well as size(), because std::string has both. - - /** This is the same as size(). - */ - size_type length() const; - - /** Returns the number of bytes in the string, not including any null-termination. - * @result The number of bytes. - * - * @see size(), empty() - */ - size_type bytes() const; - -//! @} -//! @name Change the string's size. -//! @{ - - void resize(size_type n, gunichar uc); - void resize(size_type n, char c='\0'); - -//! @} -//! @name Control the allocated memory. -//! @{ - - size_type capacity() const; - size_type max_size() const; - void reserve(size_type n=0); - -//! @} -//! @name Get a per-byte representation of the string. -//! @{ - - inline operator std::string() const; // e.g. std::string str = ustring(); - inline const std::string& raw() const; - - // Not necessarily an ASCII char*. Use g_utf8_*() where necessary. - const char* data() const; - const char* c_str() const; - - /*! @return Number of copied @em bytes, not characters. */ - size_type copy(char* dest, size_type n, size_type i=0) const; - -//! @} -//! @name UTF-8 utilities. -//! @{ - - /*! Check whether the string is valid UTF-8. */ - bool validate() const; - - /*! Check whether the string is valid UTF-8. */ - bool validate(iterator& first_invalid); - - /*! Check whether the string is valid UTF-8. */ - bool validate(const_iterator& first_invalid) const; - - /*! Check whether the string is plain 7-bit ASCII. @par - * Unlike any other ustring method, is_ascii() is safe to use on invalid - * UTF-8 strings. If the string isn't valid UTF-8, it cannot be valid - * ASCII either, therefore is_ascii() will just return @c false then. - * @return Whether the string contains only ASCII characters. - */ - bool is_ascii() const; - - /*! "Normalize" the %Unicode character representation of the string. */ - ustring normalize(NormalizeMode mode = NORMALIZE_DEFAULT_COMPOSE) const; - -//! @} -//! @name Character case conversion. -//! @{ - - /*! Returns a new UTF-8 string with all characters characters converted to - * their uppercase equivalent, while honoring the current locale. The - * resulting string may change in the number of bytes as well as in the - * number of characters. For instance, the German sharp s - * "ß" will be replaced by two characters - * "SS" because there is no capital "ß". - */ - ustring uppercase() const; - - /*! Returns a new UTF-8 string with all characters characters converted to - * their lowercase equivalent, while honoring the current locale. The - * resulting string may change in the number of bytes as well as in the - * number of characters. - */ - ustring lowercase() const; - - /*! Returns a caseless representation of the UTF-8 string. The resulting - * string doesn't correspond to any particular case, therefore the result - * is only useful to compare strings and should never be displayed to the - * user. - */ - ustring casefold() const; - -//! @} - -private: - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -#ifdef GLIBMM_HAVE_STD_ITERATOR_TRAITS - template ::value_type> -#else - template ::value_type> -#endif - struct SequenceToString; - - //The Tru64 compiler needs these partial specializations to be declared here, - //as well as defined later. That's probably correct. murrayc. - template - struct SequenceToString; - - template - struct SequenceToString; - - /* - template <> - struct ustring::SequenceToString; - - template <> - struct ustring::SequenceToString; - */ - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - std::string string_; -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -template -struct ustring::SequenceToString -{}; - -template -struct ustring::SequenceToString : public std::string -{ - SequenceToString(In pbegin, In pend); -}; - -template -struct ustring::SequenceToString : public std::string -{ - SequenceToString(In pbegin, In pend); -}; - -template <> -struct ustring::SequenceToString : public std::string -{ - SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend); -}; - -template <> -struct ustring::SequenceToString : public std::string -{ - SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend); -}; - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** Stream input operator. - * @relates Glib::ustring - * @throw Glib::ConvertError - */ -std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string); - -/** Stream output operator. - * @relates Glib::ustring - * @throw Glib::ConvertError - */ -std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string); - - -/***************************************************************************/ -/* Inline implementation */ -/***************************************************************************/ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/**** Glib::ustring_Iterator<> *********************************************/ - -template inline -ustring_Iterator::ustring_Iterator(T pos) -: - pos_ (pos) -{} - -template inline -T ustring_Iterator::base() const -{ - return pos_; -} - -template inline -ustring_Iterator::ustring_Iterator() -: - pos_ () -{} - -template inline -ustring_Iterator::ustring_Iterator(const ustring_Iterator& other) -: - pos_ (other.base()) -{} - -template inline -typename ustring_Iterator::value_type ustring_Iterator::operator*() const -{ - return Glib::get_unichar_from_std_iterator(pos_); -} - -template inline -ustring_Iterator& ustring_Iterator::operator++() -{ - pos_ += g_utf8_skip[static_cast(*pos_)]; - return *this; -} - -template inline -const ustring_Iterator ustring_Iterator::operator++(int) -{ - const ustring_Iterator temp (*this); - this->operator++(); - return temp; -} - -template inline -ustring_Iterator& ustring_Iterator::operator--() -{ - do --pos_; while((static_cast(*pos_) & 0xC0u) == 0x80); - return *this; -} - -template inline -const ustring_Iterator ustring_Iterator::operator--(int) -{ - const ustring_Iterator temp (*this); - this->operator--(); - return temp; -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** @relates Glib::ustring_Iterator */ -template inline -bool operator==(const ustring_Iterator& lhs, const ustring_Iterator& rhs) -{ - return (lhs.base() == rhs.base()); -} - -/** @relates Glib::ustring_Iterator */ -template inline -bool operator!=(const ustring_Iterator& lhs, const ustring_Iterator& rhs) -{ - return (lhs.base() != rhs.base()); -} - -/** @relates Glib::ustring_Iterator */ -template inline -bool operator<(const ustring_Iterator& lhs, const ustring_Iterator& rhs) -{ - return (lhs.base() < rhs.base()); -} - -/** @relates Glib::ustring_Iterator */ -template inline -bool operator>(const ustring_Iterator& lhs, const ustring_Iterator& rhs) -{ - return (lhs.base() > rhs.base()); -} - -/** @relates Glib::ustring_Iterator */ -template inline -bool operator<=(const ustring_Iterator& lhs, const ustring_Iterator& rhs) -{ - return (lhs.base() <= rhs.base()); -} - -/** @relates Glib::ustring_Iterator */ -template inline -bool operator>=(const ustring_Iterator& lhs, const ustring_Iterator& rhs) -{ - return (lhs.base() >= rhs.base()); -} - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/**** Glib::ustring::SequenceToString **************************************/ - -template -ustring::SequenceToString::SequenceToString(In pbegin, In pend) -: - std::string(pbegin, pend) -{} - -template -ustring::SequenceToString::SequenceToString(In pbegin, In pend) -{ - char utf8_buf[6]; // stores a single UTF-8 character - - for(; pbegin != pend; ++pbegin) - { - const std::string::size_type utf8_len = g_unichar_to_utf8(*pbegin, utf8_buf); - this->append(utf8_buf, utf8_len); - } -} - - -/**** Glib::ustring ********************************************************/ - -template -ustring::ustring(In pbegin, In pend) -: - string_ (Glib::ustring::SequenceToString(pbegin, pend)) -{} - -template -ustring& ustring::assign(In pbegin, In pend) -{ - Glib::ustring::SequenceToString temp_string (pbegin, pend); - string_.swap(temp_string); // constant-time operation - return *this; -} - -template -ustring& ustring::append(In pbegin, In pend) -{ - string_.append(Glib::ustring::SequenceToString(pbegin, pend)); - return *this; -} - -template -void ustring::insert(ustring::iterator p, In pbegin, In pend) -{ - string_.insert(p.base(), Glib::ustring::SequenceToString(pbegin, pend)); -} - -template -ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, In pbegin2, In pend2) -{ - string_.replace( - pbegin.base(), pend.base(), - Glib::ustring::SequenceToString(pbegin2, pend2)); - return *this; -} - -// The ustring methods substr() and operator std::string() are inline, -// so that the compiler has a fair chance to optimize the copy ctor away. - -inline -ustring ustring::substr(ustring::size_type i, ustring::size_type n) const -{ - return ustring(*this, i, n); -} - -inline -ustring::operator std::string() const -{ - return string_; -} - -inline -const std::string& ustring::raw() const -{ - return string_; -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** @relates Glib::ustring */ -inline -void swap(ustring& lhs, ustring& rhs) -{ - lhs.swap(rhs); -} - - -/**** Glib::ustring -- comparison operators ********************************/ - -/** @relates Glib::ustring */ -inline bool operator==(const ustring& lhs, const ustring& rhs) - { return (lhs.compare(rhs) == 0); } - -/** @relates Glib::ustring */ -inline bool operator==(const ustring& lhs, const char* rhs) - { return (lhs.compare(rhs) == 0); } - -/** @relates Glib::ustring */ -inline bool operator==(const char* lhs, const ustring& rhs) - { return (rhs.compare(lhs) == 0); } - - -/** @relates Glib::ustring */ -inline bool operator!=(const ustring& lhs, const ustring& rhs) - { return (lhs.compare(rhs) != 0); } - -/** @relates Glib::ustring */ -inline bool operator!=(const ustring& lhs, const char* rhs) - { return (lhs.compare(rhs) != 0); } - -/** @relates Glib::ustring */ -inline bool operator!=(const char* lhs, const ustring& rhs) - { return (rhs.compare(lhs) != 0); } - - -/** @relates Glib::ustring */ -inline bool operator<(const ustring& lhs, const ustring& rhs) - { return (lhs.compare(rhs) < 0); } - -/** @relates Glib::ustring */ -inline bool operator<(const ustring& lhs, const char* rhs) - { return (lhs.compare(rhs) < 0); } - -/** @relates Glib::ustring */ -inline bool operator<(const char* lhs, const ustring& rhs) - { return (rhs.compare(lhs) > 0); } - - -/** @relates Glib::ustring */ -inline bool operator>(const ustring& lhs, const ustring& rhs) - { return (lhs.compare(rhs) > 0); } - -/** @relates Glib::ustring */ -inline bool operator>(const ustring& lhs, const char* rhs) - { return (lhs.compare(rhs) > 0); } - -/** @relates Glib::ustring */ -inline bool operator>(const char* lhs, const ustring& rhs) - { return (rhs.compare(lhs) < 0); } - - -/** @relates Glib::ustring */ -inline bool operator<=(const ustring& lhs, const ustring& rhs) - { return (lhs.compare(rhs) <= 0); } - -/** @relates Glib::ustring */ -inline bool operator<=(const ustring& lhs, const char* rhs) - { return (lhs.compare(rhs) <= 0); } - -/** @relates Glib::ustring */ -inline bool operator<=(const char* lhs, const ustring& rhs) - { return (rhs.compare(lhs) >= 0); } - - -/** @relates Glib::ustring */ -inline bool operator>=(const ustring& lhs, const ustring& rhs) - { return (lhs.compare(rhs) >= 0); } - -/** @relates Glib::ustring */ -inline bool operator>=(const ustring& lhs, const char* rhs) - { return (lhs.compare(rhs) >= 0); } - -/** @relates Glib::ustring */ -inline bool operator>=(const char* lhs, const ustring& rhs) - { return (rhs.compare(lhs) <= 0); } - - -/**** Glib::ustring -- concatenation operators *****************************/ - -/** @relates Glib::ustring */ -inline ustring operator+(const ustring& lhs, const ustring& rhs) - { ustring temp (lhs); temp += rhs; return temp; } - -/** @relates Glib::ustring */ -inline ustring operator+(const ustring& lhs, const char* rhs) - { ustring temp (lhs); temp += rhs; return temp; } - -/** @relates Glib::ustring */ -inline ustring operator+(const char* lhs, const ustring& rhs) - { ustring temp (lhs); temp += rhs; return temp; } - -/** @relates Glib::ustring */ -inline ustring operator+(const ustring& lhs, gunichar rhs) - { ustring temp (lhs); temp += rhs; return temp; } - -/** @relates Glib::ustring */ -inline ustring operator+(gunichar lhs, const ustring& rhs) - { ustring temp (1, lhs); temp += rhs; return temp; } - -/** @relates Glib::ustring */ -inline ustring operator+(const ustring& lhs, char rhs) - { ustring temp (lhs); temp += rhs; return temp; } - -/** @relates Glib::ustring */ -inline ustring operator+(char lhs, const ustring& rhs) - { ustring temp (1, lhs); temp += rhs; return temp; } - -} // namespace Glib - - -#endif /* _GLIBMM_USTRING_H */ - diff --git a/libs/glibmm2/glib/glibmm/utility.cc b/libs/glibmm2/glib/glibmm/utility.cc deleted file mode 100644 index d23e46458c..0000000000 --- a/libs/glibmm2/glib/glibmm/utility.cc +++ /dev/null @@ -1,40 +0,0 @@ -// -*- c++ -*- - -/* $Id: utility.cc 2 2003-01-07 16:59:16Z murrayc $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -void Glib::append_canonical_typename(std::string& dest, const char* type_name) -{ - const std::string::size_type offset = dest.size(); - dest += type_name; - - std::string::iterator p = dest.begin() + offset; - const std::string::iterator pend = dest.end(); - - for(; p != pend; ++p) - { - if(!(g_ascii_isalnum(*p) || *p == '_' || *p == '-')) - *p = '+'; - } -} - diff --git a/libs/glibmm2/glib/glibmm/utility.h b/libs/glibmm2/glib/glibmm/utility.h deleted file mode 100644 index fa5c0dcfc1..0000000000 --- a/libs/glibmm2/glib/glibmm/utility.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_UTILITY_H -#define _GLIBMM_UTILITY_H -/* $Id: utility.h 386 2007-03-23 17:31:16Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/* Occasionally, a struct variable has to be initialized after its definition, - * i.e. when using structs as class member data. For convenience, the macro - * GLIBMM_INITIALIZE_STRUCT(Var, Type) is provided. It even avoids creating - * a temporary if the compiler is GCC. - */ -#if ((__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) && !defined(__STRICT_ANSI__) - -#define GLIBMM_INITIALIZE_STRUCT(Var, Type) __builtin_memset(&(Var), 0, sizeof(Type)) - -#else - -#define GLIBMM_INITIALIZE_STRUCT(Var, Type) \ - G_STMT_START{ \ - Type const temp_initializer__ = { 0, }; \ - (Var) = temp_initializer__; \ - }G_STMT_END - -#endif /* ((__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) && !defined(__STRICT_ANSI__) */ - - -namespace Glib -{ - -// These are used by gtkmmproc-generated type conversions: - -// Helper to deal with memory allocated -// by GLib functions in an exception-safe manner. -template -class ScopedPtr -{ -private: - T* ptr_; - ScopedPtr(const ScopedPtr&); - ScopedPtr& operator=(const ScopedPtr&); - -public: - ScopedPtr() : ptr_ (0) {} - explicit ScopedPtr(T* ptr) : ptr_ (ptr) {} - ~ScopedPtr() { g_free(ptr_); } - T* get() const { return ptr_; } - T** addr() { return &ptr_; } -}; - -// Removes the const nature of a ptr -template -inline T* unconst(const T* t) - { return const_cast(t); } - -// Convert const gchar* to ustring, while treating NULL as empty string. -inline -Glib::ustring convert_const_gchar_ptr_to_ustring(const char* str) -{ - return (str) ? Glib::ustring(str) : Glib::ustring(); -} - -// Convert const gchar* to std::string, while treating NULL as empty string. -inline -std::string convert_const_gchar_ptr_to_stdstring(const char* str) -{ - return (str) ? std::string(str) : std::string(); -} - -// Convert a non-const gchar* return value to ustring, freeing it too. -inline -Glib::ustring convert_return_gchar_ptr_to_ustring(char* str) -{ - return (str) ? Glib::ustring(Glib::ScopedPtr(str).get()) - : Glib::ustring(); -} - -// Convert a non-const gchar* return value to std::string, freeing it too. -inline -std::string convert_return_gchar_ptr_to_stdstring(char* str) -{ - return (str) ? std::string(Glib::ScopedPtr(str).get()) - : std::string(); -} - -// Append type_name to dest, while replacing special characters with '+'. -void append_canonical_typename(std::string& dest, const char* type_name); - -} // namespace Glib - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -#endif /* _GLIBMM_UTILITY_H */ - diff --git a/libs/glibmm2/glib/glibmm/value.cc b/libs/glibmm2/glib/glibmm/value.cc deleted file mode 100644 index 63aff5f4d0..0000000000 --- a/libs/glibmm2/glib/glibmm/value.cc +++ /dev/null @@ -1,250 +0,0 @@ -// -*- c++ -*- -/* $Id: value.cc 292 2006-05-14 12:12:41Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -/**** Glib::ValueBase ******************************************************/ - -ValueBase::ValueBase() -{ - GLIBMM_INITIALIZE_STRUCT(gobject_, GValue); -} - -void ValueBase::init(GType type) -{ - g_value_init(&gobject_, type); -} - -void ValueBase::init(const GValue* value) -{ - g_value_init(&gobject_, G_VALUE_TYPE(value)); - - if(value) - g_value_copy(value, &gobject_); -} - -ValueBase::ValueBase(const ValueBase& other) -{ - GLIBMM_INITIALIZE_STRUCT(gobject_, GValue); - - g_value_init(&gobject_, G_VALUE_TYPE(&other.gobject_)); - g_value_copy(&other.gobject_, &gobject_); -} - -ValueBase& ValueBase::operator=(const ValueBase& other) -{ - // g_value_copy() prevents self-assignment and deletes the destination. - g_value_copy(&other.gobject_, &gobject_); - return *this; -} - -ValueBase::~ValueBase() -{ - g_value_unset(&gobject_); -} - -void ValueBase::reset() -{ - g_value_reset(&gobject_); -} - - -/**** Glib::ValueBase_Boxed ************************************************/ - -// static -GType ValueBase_Boxed::value_type() -{ - return G_TYPE_BOXED; -} - -void ValueBase_Boxed::set_boxed(const void* data) -{ - g_value_set_boxed(&gobject_, data); -} - -void* ValueBase_Boxed::get_boxed() const -{ - return g_value_get_boxed(&gobject_); -} - -GParamSpec* ValueBase_Boxed::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_boxed( - name.c_str(), 0, 0, G_VALUE_TYPE(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::ValueBase_Object ***********************************************/ - -// static -GType ValueBase_Object::value_type() -{ - return G_TYPE_OBJECT; -} - -void ValueBase_Object::set_object(Glib::ObjectBase* data) -{ - g_value_set_object(&gobject_, (data) ? data->gobj() : 0); -} - -Glib::ObjectBase* ValueBase_Object::get_object() const -{ - GObject *const data = static_cast(g_value_get_object(&gobject_)); - return Glib::wrap_auto(data, false); -} - -Glib::RefPtr ValueBase_Object::get_object_copy() const -{ - GObject *const data = static_cast(g_value_get_object(&gobject_)); - return Glib::RefPtr(Glib::wrap_auto(data, true)); -} - -GParamSpec* ValueBase_Object::create_param_spec(const Glib::ustring& name) const -{ - // Glib::Value_Pointer<> derives from Glib::ValueBase_Object, because - // we don't know beforehand whether a certain type is derived from - // Glib::Object or not. To keep create_param_spec() out of the template - // struggle, we dispatch here at runtime. - - if(G_VALUE_HOLDS_OBJECT(&gobject_)) - { - return g_param_spec_object( - name.c_str(), 0, 0, G_VALUE_TYPE(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); - } - else - { - g_return_val_if_fail(G_VALUE_HOLDS_POINTER(&gobject_), 0); - - return g_param_spec_pointer( - name.c_str(), 0, 0, - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); - } -} - - -/**** Glib::ValueBase_Enum *************************************************/ - -// static -GType ValueBase_Enum::value_type() -{ - return G_TYPE_ENUM; -} - -void ValueBase_Enum::set_enum(int data) -{ - g_value_set_enum(&gobject_, data); -} - -int ValueBase_Enum::get_enum() const -{ - return g_value_get_enum(&gobject_); -} - -GParamSpec* ValueBase_Enum::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_enum( - name.c_str(), 0, 0, - G_VALUE_TYPE(&gobject_), g_value_get_enum(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::ValueBase_Flags ************************************************/ - -// static -GType ValueBase_Flags::value_type() -{ - return G_TYPE_FLAGS; -} - -void ValueBase_Flags::set_flags(unsigned int data) -{ - g_value_set_flags(&gobject_, data); -} - -unsigned int ValueBase_Flags::get_flags() const -{ - return g_value_get_flags(&gobject_); -} - -GParamSpec* ValueBase_Flags::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_flags( - name.c_str(), 0, 0, - G_VALUE_TYPE(&gobject_), g_value_get_flags(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::ValueBase_String ***********************************************/ - -// static -GType ValueBase_String::value_type() -{ - return G_TYPE_STRING; -} - -void ValueBase_String::set_cstring(const char* data) -{ - g_value_set_string(&gobject_, data); -} - -const char* ValueBase_String::get_cstring() const -{ - if(const char *const data = g_value_get_string(&gobject_)) - return data; - else - return ""; -} - -GParamSpec* ValueBase_String::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_string( - name.c_str(), 0, 0, get_cstring(), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value *********************************************/ - -void Value::set(const std::string& data) -{ - g_value_set_string(&gobject_, data.c_str()); -} - - -/**** Glib::Value *******************************************/ - -void Value::set(const Glib::ustring& data) -{ - g_value_set_string(&gobject_, data.c_str()); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/value.h b/libs/glibmm2/glib/glibmm/value.h deleted file mode 100644 index 12d611bc91..0000000000 --- a/libs/glibmm2/glib/glibmm/value.h +++ /dev/null @@ -1,331 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_VALUE_H -#define _GLIBMM_VALUE_H -/* $Id: value.h 292 2006-05-14 12:12:41Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - - -namespace Glib -{ - -class ObjectBase; -class Object; - -/** @defgroup glibmmValue Generic Values - * - * Glib::Value<> is specialized for almost any type used within - * the glibmm and gtkmm libraries. - * - * - Basic types like int, char, bool, etc., also void*. - * - Glib::ustring and std::string. - * - Pointers to classes derived from Glib::Object. - * - Glib::RefPtr<> pointer types, which are assumed to be Glib::Object pointers. - * - All flags and enum types used within the gtkmm libraries. - * - * If a type doesn't fit into any of these categories, then a generic - * implementation for custom types will be used. The requirements imposed - * on custom types are described in the Glib::Value class documentation. - */ - -/** - * @ingroup glibmmValue - */ -class ValueBase -{ -public: - /** Initializes the GValue, but without a type. You have to - * call init() before using the set(), get(), or reset() methods. - */ - ValueBase(); - - ValueBase(const ValueBase& other); - ValueBase& operator=(const ValueBase& other); - - ~ValueBase(); - - /** Setup the GValue for storing the specified @a type. - * The contents will be initialized to the default value for this type. - * Note that init() should never be called twice. - * - * init() is not implemented as constructor, to avoid the necessity - * to implement a forward constructor in each derived class. - * - * @param type The type that the Value should hold. - */ - void init(GType type); - - /** Setup the GValue storing the type and value of the specified @a value. - * Note that init() should never be called twice. - * - * init() is not implemented as constructor, to avoid the necessity - * to implement a forward constructor in each derived class. - * - * @param value The existing GValue. - */ - void init(const GValue* value); - - /** Reset contents to the default value of its type. - */ - void reset(); - - GValue* gobj() { return &gobject_; } - const GValue* gobj() const { return &gobject_; } - -protected: - GValue gobject_; -}; - -/** - * @ingroup glibmmValue - */ -class ValueBase_Boxed : public ValueBase -{ -public: - static GType value_type() G_GNUC_CONST; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif - -protected: - void set_boxed(const void* data); - void* get_boxed() const; // doesn't copy -}; - - -/** - * @ingroup glibmmValue - */ -class ValueBase_Object : public ValueBase -{ -public: - static GType value_type() G_GNUC_CONST; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif - -protected: - void set_object(Glib::ObjectBase* data); - Glib::ObjectBase* get_object() const; - Glib::RefPtr get_object_copy() const; -}; - - -/** - * @ingroup glibmmValue - */ -class ValueBase_Enum : public ValueBase -{ -public: - typedef gint CType; - static GType value_type() G_GNUC_CONST; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif - -protected: - void set_enum(int data); - int get_enum() const; -}; - - -/** - * @ingroup glibmmValue - */ -class ValueBase_Flags : public ValueBase -{ -public: - typedef guint CType; - static GType value_type() G_GNUC_CONST; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif - -protected: - void set_flags(unsigned int data); - unsigned int get_flags() const; -}; - - -/** - * @ingroup glibmmValue - */ -class ValueBase_String : public ValueBase -{ -public: - typedef const gchar* CType; - static GType value_type() G_GNUC_CONST; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif - -protected: - void set_cstring(const char* data); - const char* get_cstring() const; // never returns 0 -}; - -} // namespace Glib - - -/* Include generic Glib::Value<> template, before any specializations: - */ -#define _GLIBMM_VALUE_H_INCLUDE_VALUE_CUSTOM_H -#include -#undef _GLIBMM_VALUE_H_INCLUDE_VALUE_CUSTOM_H - - -namespace Glib -{ - -/** - * @ingroup glibmmValue - */ -template -class Value_Boxed : public ValueBase_Boxed -{ -public: - typedef T CppType; - typedef typename T::BaseObjectType* CType; - - static GType value_type() { return T::get_type(); } - - void set(const CppType& data) { set_boxed(data.gobj()); } - CppType get() const { return CppType(static_cast(get_boxed())); } -}; - -//More spec-compliant compilers (such as Tru64) need this to be near Glib::Object instead. -#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION - -/** Partial specialization for RefPtr<> to Glib::Object. - * @ingroup glibmmValue - */ -template -class Value< Glib::RefPtr > : public ValueBase_Object -{ -public: - typedef Glib::RefPtr CppType; - typedef typename T::BaseObjectType* CType; - - static GType value_type() { return T::get_base_type(); } - - void set(const CppType& data) { set_object(data.operator->()); } - CppType get() const { return Glib::RefPtr::cast_dynamic(get_object_copy()); } -}; - -//The SUN Forte Compiler has a problem with this: -#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -/** Partial specialization for RefPtr<> to const Glib::Object. - * @ingroup glibmmValue - */ -template -class Value< Glib::RefPtr > : public ValueBase_Object -{ -public: - typedef Glib::RefPtr CppType; - typedef typename T::BaseObjectType* CType; - - static GType value_type() { return T::get_base_type(); } - - void set(const CppType& data) { set_object(const_cast(data.operator->())); } - CppType get() const { return Glib::RefPtr::cast_dynamic(get_object_copy()); } -}; -#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS - -#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION - -} // namespace Glib - - -/* Include generated specializations of Glib::Value<> for fundamental types: - */ -#define _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H -#include -#undef _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H - - -namespace Glib -{ - -/** Specialization for strings. - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase_String -{ -public: - typedef std::string CppType; - - void set(const std::string& data); - std::string get() const { return get_cstring(); } -}; - -/** Specialization for UTF-8 strings. - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase_String -{ -public: - typedef Glib::ustring CppType; - - void set(const Glib::ustring& data); - Glib::ustring get() const { return get_cstring(); } -}; - - -/** Base class of Glib::Value specializations for enum types. - * @ingroup glibmmValue - */ -template -class Value_Enum : public ValueBase_Enum -{ -public: - typedef T CppType; - - void set(CppType data) { set_enum(data); } - CppType get() const { return CppType(get_enum()); } -}; - -/** Base class of Glib::Value specializations for flags types. - * @ingroup glibmmValue - */ -template -class Value_Flags : public ValueBase_Flags -{ -public: - typedef T CppType; - - void set(CppType data) { set_flags(data); } - CppType get() const { return CppType(get_flags()); } -}; - -} // namespace Glib - - -#endif /* _GLIBMM_VALUE_H */ - diff --git a/libs/glibmm2/glib/glibmm/value_basictypes.cc b/libs/glibmm2/glib/glibmm/value_basictypes.cc deleted file mode 100644 index 9a3275075d..0000000000 --- a/libs/glibmm2/glib/glibmm/value_basictypes.cc +++ /dev/null @@ -1,336 +0,0 @@ -// -*- c++ -*- -// This is a generated file, do not edit. Generated from value_basictypes.cc.m4 - -#include - -namespace Glib -{ - -G_GNUC_EXTENSION typedef long long long_long; -G_GNUC_EXTENSION typedef unsigned long long unsigned_long_long; - - -/**** Glib::Value ****************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_BOOLEAN; -} - -void Value::set(bool data) -{ - g_value_set_boolean(&gobject_, data); -} - -bool Value::get() const -{ - return g_value_get_boolean(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_boolean( - name.c_str(), 0, 0, - g_value_get_boolean(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value ****************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_CHAR; -} - -void Value::set(char data) -{ - g_value_set_char(&gobject_, data); -} - -char Value::get() const -{ - return g_value_get_char(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_char( - name.c_str(), 0, 0, - -128, 127, g_value_get_char(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value *******************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_UCHAR; -} - -void Value::set(unsigned char data) -{ - g_value_set_uchar(&gobject_, data); -} - -unsigned char Value::get() const -{ - return g_value_get_uchar(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_uchar( - name.c_str(), 0, 0, - 0, 255, g_value_get_uchar(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value *****************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_INT; -} - -void Value::set(int data) -{ - g_value_set_int(&gobject_, data); -} - -int Value::get() const -{ - return g_value_get_int(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_int( - name.c_str(), 0, 0, - G_MININT, G_MAXINT, g_value_get_int(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value ********************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_UINT; -} - -void Value::set(unsigned int data) -{ - g_value_set_uint(&gobject_, data); -} - -unsigned int Value::get() const -{ - return g_value_get_uint(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_uint( - name.c_str(), 0, 0, - 0, G_MAXUINT, g_value_get_uint(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value ****************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_LONG; -} - -void Value::set(long data) -{ - g_value_set_long(&gobject_, data); -} - -long Value::get() const -{ - return g_value_get_long(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_long( - name.c_str(), 0, 0, - G_MINLONG, G_MAXLONG, g_value_get_long(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value *******************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_ULONG; -} - -void Value::set(unsigned long data) -{ - g_value_set_ulong(&gobject_, data); -} - -unsigned long Value::get() const -{ - return g_value_get_ulong(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_ulong( - name.c_str(), 0, 0, - 0, G_MAXULONG, g_value_get_ulong(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value ***********************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_INT64; -} - -void Value::set(long_long data) -{ - g_value_set_int64(&gobject_, data); -} - -long_long Value::get() const -{ - return g_value_get_int64(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_int64( - name.c_str(), 0, 0, - G_GINT64_CONSTANT(0x8000000000000000), G_GINT64_CONSTANT(0x7fffffffffffffff), g_value_get_int64(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value **************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_UINT64; -} - -void Value::set(unsigned_long_long data) -{ - g_value_set_uint64(&gobject_, data); -} - -unsigned_long_long Value::get() const -{ - return g_value_get_uint64(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_uint64( - name.c_str(), 0, 0, - G_GINT64_CONSTANT(0U), G_GINT64_CONSTANT(0xffffffffffffffffU), g_value_get_uint64(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value ***************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_FLOAT; -} - -void Value::set(float data) -{ - g_value_set_float(&gobject_, data); -} - -float Value::get() const -{ - return g_value_get_float(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_float( - name.c_str(), 0, 0, - -G_MAXFLOAT, G_MAXFLOAT, g_value_get_float(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value **************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_DOUBLE; -} - -void Value::set(double data) -{ - g_value_set_double(&gobject_, data); -} - -double Value::get() const -{ - return g_value_get_double(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_double( - name.c_str(), 0, 0, - -G_MAXDOUBLE, G_MAXDOUBLE, g_value_get_double(&gobject_), - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - - -/**** Glib::Value ***************************************************/ - -// static -GType Value::value_type() -{ - return G_TYPE_POINTER; -} - -void Value::set(void* data) -{ - g_value_set_pointer(&gobject_, data); -} - -void* Value::get() const -{ - return g_value_get_pointer(&gobject_); -} - -GParamSpec* Value::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_pointer( - name.c_str(), 0, 0, - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/value_basictypes.h b/libs/glibmm2/glib/glibmm/value_basictypes.h deleted file mode 100644 index 3d81e3ece8..0000000000 --- a/libs/glibmm2/glib/glibmm/value_basictypes.h +++ /dev/null @@ -1,271 +0,0 @@ -// -*- c++ -*- -// This is a generated file, do not edit. Generated from value_basictypes.h.m4 - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -#ifndef _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H -#error "glibmm/value_basictypes.h cannot be included directly" -#endif -#endif - -/* Suppress warnings about `long long' when GCC is in -pedantic mode. - */ -#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) -#pragma GCC system_header -#endif - -namespace Glib -{ - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef bool CppType; - typedef gboolean CType; - - static GType value_type() G_GNUC_CONST; - - void set(bool data); - bool get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef char CppType; - typedef gchar CType; - - static GType value_type() G_GNUC_CONST; - - void set(char data); - char get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef unsigned char CppType; - typedef guchar CType; - - static GType value_type() G_GNUC_CONST; - - void set(unsigned char data); - unsigned char get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef int CppType; - typedef gint CType; - - static GType value_type() G_GNUC_CONST; - - void set(int data); - int get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef unsigned int CppType; - typedef guint CType; - - static GType value_type() G_GNUC_CONST; - - void set(unsigned int data); - unsigned int get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef long CppType; - typedef glong CType; - - static GType value_type() G_GNUC_CONST; - - void set(long data); - long get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef unsigned long CppType; - typedef gulong CType; - - static GType value_type() G_GNUC_CONST; - - void set(unsigned long data); - unsigned long get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef long long CppType; - typedef gint64 CType; - - static GType value_type() G_GNUC_CONST; - - void set(long long data); - long long get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef unsigned long long CppType; - typedef guint64 CType; - - static GType value_type() G_GNUC_CONST; - - void set(unsigned long long data); - unsigned long long get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef float CppType; - typedef gfloat CType; - - static GType value_type() G_GNUC_CONST; - - void set(float data); - float get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef double CppType; - typedef gdouble CType; - - static GType value_type() G_GNUC_CONST; - - void set(double data); - double get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - - -/** - * @ingroup glibmmValue - */ -template <> -class Value : public ValueBase -{ -public: - typedef void* CppType; - typedef gpointer CType; - - static GType value_type() G_GNUC_CONST; - - void set(void* data); - void* get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/value_custom.cc b/libs/glibmm2/glib/glibmm/value_custom.cc deleted file mode 100644 index 09919f4a6b..0000000000 --- a/libs/glibmm2/glib/glibmm/value_custom.cc +++ /dev/null @@ -1,145 +0,0 @@ -// -*- c++ -*- -/* $Id: value_custom.cc 260 2006-04-12 08:12:12Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - - -namespace -{ - -static void warn_already_registered(const char* location, const std::string& full_name) -{ - g_warning("file %s: (%s): The type name `%s' has been registered already.\n" - "This is not supposed to happen -- please send a mail with detailed " - "information about your platform to gtkmm-list@gnome.org. Thanks.\n", - __FILE__, location, full_name.c_str()); -} - -} // anonymous namespace - - -namespace Glib -{ - -GType custom_boxed_type_register(const char* type_name, - ValueInitFunc init_func, - ValueFreeFunc free_func, - ValueCopyFunc copy_func) -{ - std::string full_name ("glibmm__CustomBoxed_"); - Glib::append_canonical_typename(full_name, type_name); - - // Templates of the same type _might_ be duplicated when instantiated in - // multiple translation units -- I'm not sure whether this is true. If the - // static custom_type_ variable in Value<> is duplicated, then the type - // would be registered more than once. - // - // Lookup the type name to see whether this scenario actually happens. - // If this turns out to be common behaviour on some platform the warning - // should be removed. - - if(const GType existing_type = g_type_from_name(full_name.c_str())) - { - warn_already_registered("Glib::custom_boxed_type_register", full_name); - return existing_type; - } - - // Via GTypeValueTable, we can teach GValue how to instantiate, - // destroy, and copy arbitrary objects of the C++ type. - - const GTypeValueTable value_table = - { - init_func, - free_func, - copy_func, - 0, // value_peek_pointer - 0, // collect_format - 0, // collect_value - 0, // lcopy_format - 0, // lcopy_value - }; - - const GTypeInfo type_info = - { - 0, // class_size - 0, // base_init - 0, // base_finalize - 0, // class_init_func - 0, // class_finalize - 0, // class_data - 0, // instance_size - 0, // n_preallocs - 0, // instance_init - &value_table, - }; - - // Don't use g_boxed_type_register_static(), because that wouldn't allow - // for a non-NULL default value. The implementation of g_boxed_copy() will - // use our custom GTypeValueTable automatically. - - return g_type_register_static(G_TYPE_BOXED, full_name.c_str(), &type_info, GTypeFlags(0)); -} - -GType custom_pointer_type_register(const char* type_name) -{ - std::string full_name ("glibmm__CustomPointer_"); - Glib::append_canonical_typename(full_name, type_name); - - // Templates of the same type _might_ be duplicated when instantiated in - // multiple translation units -- I'm not sure whether this is true. If the - // static custom_type variable in Value<>::value_type_() is duplicated, then - // the type would be registered more than once. - // - // Lookup the type name to see whether this scenario actually happens. - // If this turns out to be common behaviour on some platform the warning - // should be removed. - - if(const GType existing_type = g_type_from_name(full_name.c_str())) - { - warn_already_registered("Glib::custom_pointer_type_register", full_name); - return existing_type; - } - - const GTypeInfo type_info = - { - 0, // class_size - 0, // base_init - 0, // base_finalize - 0, // class_init_func - 0, // class_finalize - 0, // class_data - 0, // instance_size - 0, // n_preallocs - 0, // instance_init - 0, // value_table - }; - - // We could probably use g_pointer_type_register_static(), but I want - // to keep this function symmetric to custom_boxed_type_register(). Also, - // g_pointer_type_register_static() would lookup the type name once again. - - return g_type_register_static(G_TYPE_POINTER, full_name.c_str(), &type_info, GTypeFlags(0)); -} - - -} // namespace Glib - diff --git a/libs/glibmm2/glib/glibmm/value_custom.h b/libs/glibmm2/glib/glibmm/value_custom.h deleted file mode 100644 index b08c591051..0000000000 --- a/libs/glibmm2/glib/glibmm/value_custom.h +++ /dev/null @@ -1,295 +0,0 @@ -// -*- c++ -*- -/* $Id: value_custom.h 419 2007-06-22 14:43:53Z murrayc $ */ - -/* Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _GLIBMM_VALUE_CUSTOM_H -#define _GLIBMM_VALUE_CUSTOM_H - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -#ifndef _GLIBMM_VALUE_H_INCLUDE_VALUE_CUSTOM_H -#error "glibmm/value_custom.h cannot be included directly" -#endif -#endif - -#include -#include -#include - -GLIBMM_USING_STD(nothrow) - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -extern "C" -{ - typedef void (* ValueInitFunc) (GValue*); - typedef void (* ValueFreeFunc) (GValue*); - typedef void (* ValueCopyFunc) (const GValue*, GValue*); -} - -/* When using Glib::Value with custom types, each T will be registered - * as subtype of G_TYPE_BOXED, via this function. The type_name argument - * should be the C++ RTTI name. - */ -GType custom_boxed_type_register(const char* type_name, - ValueInitFunc init_func, - ValueFreeFunc free_func, - ValueCopyFunc copy_func); - -/* When using Glib::Value or Glib::Value with custom types, - * each T* or const T* will be registered as a subtype of G_TYPE_POINTER, - * via this function. The type_name argument should be the C++ RTTI name. - */ -GType custom_pointer_type_register(const char* type_name); - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - -/** - * @ingroup glibmmValue - */ -template -class Value_Pointer : public ValueBase_Object -{ -public: - typedef PtrT CppType; - typedef void* CType; - - static inline GType value_type() G_GNUC_CONST; - - inline void set(CppType data); - inline CppType get() const; - -private: - inline - static GType value_type_(Glib::Object*); - static GType value_type_(void*); - - inline void set_(CppType data, Glib::Object*); - inline void set_(CppType data, void*); - - inline CppType get_(Glib::Object*) const; - inline CppType get_(void*) const; -}; - - -/** Generic value implementation for custom types. - * @ingroup glibmmValue - * Any type to be used with this template must implement: - * - default constructor - * - copy constructor - * - assignment operator - * - destructor - * - * Compiler-generated implementations are OK, provided they do the - * right thing for the type. In other words, any type that works with - * std::vector will work with Glib::Value<>. - * - * @note None of the operations listed above are allowed to throw. If you - * cannot ensure that no exceptions will be thrown, consider using either - * a normal pointer or a smart pointer to hold your objects indirectly. - */ -template -class Value : public ValueBase_Boxed -{ -public: - typedef T CppType; - typedef T* CType; - - static GType value_type() G_GNUC_CONST; - - inline void set(const CppType& data); - inline CppType get() const; - -private: - static GType custom_type_; - - static void value_init_func(GValue* value); - static void value_free_func(GValue* value); - static void value_copy_func(const GValue* src_value, GValue* dest_value); -}; - - -/** Specialization for pointers to instances of any type. - * @ingroup glibmmValue - * No attempt is made to manage the memory associated with the - * pointer, you must take care of that yourself. - */ -template -class Value : public Value_Pointer -{}; - -/** Specialization for pointers to const instances of any type. - * @ingroup glibmmValue - * No attempt is made to manage the memory associated with the - * pointer, you must take care of that yourself. - */ -template -class Value : public Value_Pointer -{}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/**** Glib::Value_Pointer *****************************************/ - -/** Implementation for Glib::Object pointers **/ - -// static -template inline -GType Value_Pointer::value_type_(Glib::Object*) -{ - return T::get_base_type(); -} - -template inline -void Value_Pointer::set_(PtrT data, Glib::Object*) -{ - set_object(const_cast(data)); -} - -//More spec-compliant compilers (such as Tru64) need this to be near Glib::Object instead. -#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION -template inline -PtrT Value_Pointer::get_(Glib::Object*) const -{ - return dynamic_cast(get_object()); -} -#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION - -/** Implementation for custom pointers **/ - -// static -template -GType Value_Pointer::value_type_(void*) -{ - static GType custom_type = 0; - - if(!custom_type) - custom_type = Glib::custom_pointer_type_register(typeid(PtrT).name()); - - return custom_type; -} - -template inline -void Value_Pointer::set_(PtrT data, void*) -{ - gobject_.data[0].v_pointer = const_cast(data); -} - -template inline -PtrT Value_Pointer::get_(void*) const -{ - return static_cast(gobject_.data[0].v_pointer); -} - -/** Public forwarding interface **/ - -// static -template inline -GType Value_Pointer::value_type() -{ - // Dispatch to the specific value_type_() overload. - return Value_Pointer::value_type_(static_cast(0)); -} - -template inline -void Value_Pointer::set(PtrT data) -{ - // Dispatch to the specific set_() overload. - this->set_(data, static_cast(0)); -} - -template inline -PtrT Value_Pointer::get() const -{ - // Dispatch to the specific get_() overload. - return this->get_(static_cast(0)); -} - - -/**** Glib::Value *******************************************************/ - -// Static data, specific to each template instantiation. -template -GType Value::custom_type_ = 0; - -template inline -void Value::set(const typename Value::CppType& data) -{ - // Assume the value is already default-initialized. See value_init_func(). - *static_cast(gobject_.data[0].v_pointer) = data; -} - -template inline -typename Value::CppType Value::get() const -{ - // Assume the pointer is not NULL. See value_init_func(). - return *static_cast(gobject_.data[0].v_pointer); -} - -// static -template -GType Value::value_type() -{ - if(!custom_type_) - { - custom_type_ = Glib::custom_boxed_type_register( - typeid(CppType).name(), - &Value::value_init_func, - &Value::value_free_func, - &Value::value_copy_func); - } - return custom_type_; -} - -// static -template -void Value::value_init_func(GValue* value) -{ - // Never store a NULL pointer (unless we're out of memory). - value->data[0].v_pointer = new(std::nothrow) T(); -} - -// static -template -void Value::value_free_func(GValue* value) -{ - delete static_cast(value->data[0].v_pointer); -} - -// static -template -void Value::value_copy_func(const GValue* src_value, GValue* dest_value) -{ - // Assume the source is not NULL. See value_init_func(). - const T& source = *static_cast(src_value->data[0].v_pointer); - dest_value->data[0].v_pointer = new(std::nothrow) T(source); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - -#endif //_GLIBMM_VALUE_CUSTOM_H - - diff --git a/libs/glibmm2/glib/glibmm/wrap.cc b/libs/glibmm2/glib/glibmm/wrap.cc deleted file mode 100644 index 49a1e15c79..0000000000 --- a/libs/glibmm2/glib/glibmm/wrap.cc +++ /dev/null @@ -1,209 +0,0 @@ -// -*- c++ -*- -/* $Id: wrap.cc 447 2007-10-03 09:51:41Z murrayc $ */ - -/* wrap.cc - * - * Copyright (C) 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -#include -#include -#include -#include - -#include -GLIBMM_USING_STD(vector) - - -namespace -{ - -// Although the new g_type_set_qdata() interface is used now, we still need -// a table because we cannot assume that a function pointer fits into void* -// on any platform. Nevertheless, indexing a vector costs almost nothing -// compared to a map lookup. - -typedef std::vector WrapFuncTable; - -static WrapFuncTable* wrap_func_table = 0; - -} // anonymous namespace - - -namespace Glib -{ - -void wrap_register_init() -{ - g_type_init(); - - if(!Glib::quark_) - { - Glib::quark_ = g_quark_from_static_string("glibmm__Glib::quark_"); - Glib::quark_cpp_wrapper_deleted_ = g_quark_from_static_string("glibmm__Glib::quark_cpp_wrapper_deleted_"); - } - - if(!wrap_func_table) - { - // Make the first element a dummy so we can detect unregistered types. - // g_type_get_qdata() returns NULL if no data has been set up. - wrap_func_table = new WrapFuncTable(1); - } -} - -void wrap_register_cleanup() -{ - if(wrap_func_table) - { - delete wrap_func_table; - wrap_func_table = 0; - } -} - -// Register the unique wrap_new() function of a new C++ wrapper type. -// The GType argument specifies the parent C type to wrap from. -// -void wrap_register(GType type, WrapNewFunction func) -{ - const guint idx = wrap_func_table->size(); - wrap_func_table->push_back(func); - - // Store the table index in the type's static data. - g_type_set_qdata(type, Glib::quark_, GUINT_TO_POINTER(idx)); -} - - -static Glib::ObjectBase* wrap_create_new_wrapper(GObject* object) -{ - g_return_val_if_fail(wrap_func_table != 0, 0); - - const bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_); - if(gtkmm_wrapper_already_deleted) - { - g_warning("Glib::wrap_create_new_wrapper: Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper has been deleted."); - return 0; - } - - // Traverse upwards through the inheritance hierarchy - // to find the most-specialized wrap_new() for this GType. - // - for(GType type = G_OBJECT_TYPE(object); type != 0; type = g_type_parent(type)) - { - // Look up the wrap table index stored in the type's static data. - // If a wrap_new() has been registered for the type then call it. - // - if(const gpointer idx = g_type_get_qdata(type, Glib::quark_)) - { - const Glib::WrapNewFunction func = (*wrap_func_table)[GPOINTER_TO_UINT(idx)]; - return (*func)(object); - } - } - - return 0; -} - -static gboolean gtype_wraps_interface(GType implementer_type, GType interface_type) -{ - guint n_ifaces = 0; - GType *ifaces = g_type_interfaces (implementer_type, &n_ifaces); - - gboolean found = FALSE; - while (n_ifaces-- && !found) - { - found = (ifaces[n_ifaces] == interface_type); - } - - g_free (ifaces); - - return found; -} - -Glib::ObjectBase* wrap_create_new_wrapper_for_interface(GObject* object, GType interface_gtype) -{ - g_return_val_if_fail(wrap_func_table != 0, 0); - - const bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_); - if(gtkmm_wrapper_already_deleted) - { - g_warning("Glib::wrap_create_new_wrapper: Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper has been deleted."); - return 0; - } - - // Traverse upwards through the inheritance hierarchy - // to find the most-specialized wrap_new() for this GType. - // - for(GType type = G_OBJECT_TYPE(object); type != 0; type = g_type_parent(type)) - { - // Look up the wrap table index stored in the type's static data. - // If a wrap_new() has been registered for the type then call it. - // But only if the type implements the interface, - // so that the C++ instance is likely to inherit from the appropriate class too. - // - const gpointer idx = g_type_get_qdata(type, Glib::quark_); - if(idx && gtype_wraps_interface(type, interface_gtype)) - { - const Glib::WrapNewFunction func = (*wrap_func_table)[GPOINTER_TO_UINT(idx)]; - return (*func)(object); - } - } - - return 0; -} - - -// This is a factory function that converts any type to -// its C++ wrapper instance by looking up a wrap_new() function in a map. -// -ObjectBase* wrap_auto(GObject* object, bool take_copy) -{ - if(!object) - return 0; - - // Look up current C++ wrapper instance: - ObjectBase* pCppObject = ObjectBase::_get_current_wrapper(object); - - if(!pCppObject) - { - // There's not already a wrapper: generate a new C++ instance. - pCppObject = wrap_create_new_wrapper(object); - - if(!pCppObject) - { - g_warning("failed to wrap type of '%s'", G_OBJECT_TYPE_NAME(object)); - return 0; - } - } - - // take_copy=true is used where the GTK+ function doesn't do - // an extra ref for us, and always for plain struct members. - if(take_copy) - pCppObject->reference(); - - return pCppObject; -} - -Glib::RefPtr wrap(GObject* object, bool take_copy /* = false */) -{ - return Glib::RefPtr(dynamic_cast(wrap_auto(object, take_copy))); -} - -} /* namespace Glib */ - diff --git a/libs/glibmm2/glib/glibmm/wrap.h b/libs/glibmm2/glib/glibmm/wrap.h deleted file mode 100644 index 83aae3c880..0000000000 --- a/libs/glibmm2/glib/glibmm/wrap.h +++ /dev/null @@ -1,164 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_WRAP_H -#define _GLIBMM_WRAP_H - -/* $Id: wrap.h 447 2007-10-03 09:51:41Z murrayc $ */ - -/* Copyright (C) 1998-2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -class ObjectBase; -class Object; - -// Type of the per-class wrap_new() functions. -typedef Glib::ObjectBase* (*WrapNewFunction) (GObject*); - -// Setup and free the structures used by wrap_register(). -// Both functions might be called more than once. -void wrap_register_init(); -void wrap_register_cleanup(); - -// Register a new type for auto allocation. -void wrap_register(GType type, WrapNewFunction func); - -// Return the current C++ wrapper instance of the GObject, -// or automatically generate a new wrapper if there's none. -Glib::ObjectBase* wrap_auto(GObject* object, bool take_copy = false); - -/** Create a C++ instance of a known C++ type that is mostly closely associated with the GType of the C object. - * @param object The C object which should be placed in a new C++ instance. - * @param interface_gtype The returned instance will implement this interface. Otherwise it will be NULL. - */ -Glib::ObjectBase* wrap_create_new_wrapper_for_interface(GObject* object, GType interface_gtype); - -// Return the current C++ wrapper instance of the GObject, -// or automatically generate a new wrapper if there's none. -template -TInterface* wrap_auto_interface(GObject* object, bool take_copy = false) -{ - if(!object) - return 0; - - // Look up current C++ wrapper instance: - ObjectBase* pCppObject = ObjectBase::_get_current_wrapper(object); - - if(!pCppObject) - { - // There's not already a wrapper: generate a new C++ instance. - // We use exact_type_only=true avoid creating Glib::Object for interfaces of unknown implementation, - // because we do not want a C++ object that does not dynamic_cast to the expected interface type. - pCppObject = wrap_create_new_wrapper_for_interface(object, TInterface::get_base_type()); - } - - //If no exact wrapper was created, - //create an instance of the interface, - //so we at least get the expected type: - TInterface* result = 0; - if(pCppObject) - result = dynamic_cast(pCppObject); - else - result = new TInterface((typename TInterface::BaseObjectType*)object); - - // take_copy=true is used where the GTK+ function doesn't do - // an extra ref for us, and always for plain struct members. - if(take_copy && result) - result->reference(); - - return result; -} - -#endif //DOXYGEN_SHOULD_SKIP_THIS - -// Get a C++ instance that wraps the C instance. -// This always returns the same C++ instance for the same C instance. -// Each wrapper has it's own override of Glib::wrap(). -// use take_copy = true when wrapping a struct member. -// TODO: move to object.h ? -/** @relates Glib::Object */ -Glib::RefPtr wrap(GObject* object, bool take_copy = false); - - -/** Get the underlying C instance from the C++ instance. This is just - * like calling gobj(), but it does its own check for a NULL pointer. - */ -template inline -typename T::BaseObjectType* unwrap(T* ptr) -{ - return (ptr) ? ptr->gobj() : 0; -} - -/** Get the underlying C instance from the C++ instance. This is just - * like calling gobj(), but it does its own check for a NULL pointer. - */ -template inline -const typename T::BaseObjectType* unwrap(const T* ptr) -{ - return (ptr) ? ptr->gobj() : 0; -} - -/** Get the underlying C instance from the C++ instance. This is just - * like calling gobj(), but it does its own check for a NULL pointer. - */ -template inline -typename T::BaseObjectType* unwrap(const Glib::RefPtr& ptr) -{ - return (ptr) ? ptr->gobj() : 0; -} - -/** Get the underlying C instance from the C++ instance. This is just - * like calling gobj(), but it does its own check for a NULL pointer. - */ -template inline -const typename T::BaseObjectType* unwrap(const Glib::RefPtr& ptr) -{ - return (ptr) ? ptr->gobj() : 0; -} - -/** Get the underlying C instance from the C++ instance and acquire a - * reference. This is just like calling gobj_copy(), but it does its own - * check for a NULL pointer. - */ -template inline -typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr& ptr) -{ - return (ptr) ? ptr->gobj_copy() : 0; -} - -/** Get the underlying C instance from the C++ instance and acquire a - * reference. This is just like calling gobj_copy(), but it does its own - * check for a NULL pointer. - */ -template inline -const typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr& ptr) -{ - return (ptr) ? ptr->gobj_copy() : 0; -} - -} // namespace Glib - - -#endif /* _GLIBMM_WRAP_H */ - diff --git a/libs/glibmm2/glib/glibmm/wrap_init.cc b/libs/glibmm2/glib/glibmm/wrap_init.cc deleted file mode 100644 index f1eafb8f09..0000000000 --- a/libs/glibmm2/glib/glibmm/wrap_init.cc +++ /dev/null @@ -1,79 +0,0 @@ - -#include - -// Disable the 'const' function attribute of the get_type() functions. -// GCC would optimize them out because we don't use the return value. -#undef G_GNUC_CONST -#define G_GNUC_CONST /* empty */ - -#include -#include -#include - -// #include the widget headers so that we can call the get_type() static methods: - -#include "convert.h" -#include "date.h" -#include "fileutils.h" -#include "iochannel.h" -#include "keyfile.h" -#include "markup.h" -#include "module.h" -#include "optioncontext.h" -#include "optionentry.h" -#include "optiongroup.h" -#include "regex.h" -#include "shell.h" -#include "spawn.h" -#include "thread.h" -#include "unicode.h" - -extern "C" -{ - -//Declarations of the *_get_type() functions: - - -//Declarations of the *_error_quark() functions: - -GQuark g_convert_error_quark(void); -GQuark g_file_error_quark(void); -GQuark g_io_channel_error_quark(void); -GQuark g_key_file_error_quark(void); -GQuark g_markup_error_quark(void); -GQuark g_option_error_quark(void); -GQuark g_regex_error_quark(void); -GQuark g_shell_error_quark(void); -GQuark g_spawn_error_quark(void); -GQuark g_thread_error_quark(void); -} // extern "C" - - -//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers: - - -namespace Glib { - -void wrap_init() -{ - // Register Error domains: - Glib::Error::register_domain(g_convert_error_quark(), &Glib::ConvertError::throw_func); - Glib::Error::register_domain(g_file_error_quark(), &Glib::FileError::throw_func); - Glib::Error::register_domain(g_io_channel_error_quark(), &Glib::IOChannelError::throw_func); - Glib::Error::register_domain(g_key_file_error_quark(), &Glib::KeyFileError::throw_func); - Glib::Error::register_domain(g_markup_error_quark(), &Glib::MarkupError::throw_func); - Glib::Error::register_domain(g_option_error_quark(), &Glib::OptionError::throw_func); - Glib::Error::register_domain(g_regex_error_quark(), &Glib::RegexError::throw_func); - Glib::Error::register_domain(g_shell_error_quark(), &Glib::ShellError::throw_func); - Glib::Error::register_domain(g_spawn_error_quark(), &Glib::SpawnError::throw_func); - Glib::Error::register_domain(g_thread_error_quark(), &Glib::ThreadError::throw_func); - -// Map gtypes to gtkmm wrapper-creation functions: - - // Register the gtkmm gtypes: - -} // wrap_init() - -} //Glib - - diff --git a/libs/glibmm2/glib/glibmm/wrap_init.h b/libs/glibmm2/glib/glibmm/wrap_init.h deleted file mode 100644 index cd5dd0dfa0..0000000000 --- a/libs/glibmm2/glib/glibmm/wrap_init.h +++ /dev/null @@ -1,38 +0,0 @@ -// -*- c++ -*- -#ifndef _GLIBMM_WRAP_INIT_H -#define _GLIBMM_WRAP_INIT_H - -/* $Id: wrap_init.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* wrap_init.h - * - * Copyright 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -void wrap_init(); - -} // namespace Glib - - -#endif /* _GLIBMM_WRAP_INIT_H */ - diff --git a/libs/glibmm2/glib/glibmmconfig.h b/libs/glibmm2/glib/glibmmconfig.h deleted file mode 100644 index 4e4bfa308f..0000000000 --- a/libs/glibmm2/glib/glibmmconfig.h +++ /dev/null @@ -1,93 +0,0 @@ -/* glib/glibmmconfig.h. Generated from glibmmconfig.h.in by configure. */ -#ifndef _GLIBMM_CONFIG_H -#define _GLIBMM_CONFIG_H 1 - -/* version numbers */ -#define GLIBMM_MAJOR_VERSION 2 -#define GLIBMM_MINOR_VERSION 14 -#define GLIBMM_MICRO_VERSION 2 - -// detect common platforms -#if defined(_WIN32) -// Win32 compilers have a lot of varation -#if defined(_MSC_VER) -#define GLIBMM_MSC -#define GLIBMM_WIN32 -#define GLIBMM_DLL -#elif defined(__CYGWIN__) -#define GLIBMM_CONFIGURE -#elif defined(__MINGW32__) -#define GLIBMM_WIN32 -#define GLIBMM_DLL -#define GLIBMM_CONFIGURE -#else -//AIX clR compiler complains about this even though it doesn't get this far: -//#warning "Unknown architecture (send me gcc --dumpspecs or equiv)" -#endif -#else -#define GLIBMM_CONFIGURE -#endif /* _WIN32 */ - -#ifdef GLIBMM_CONFIGURE -/* #undef GLIBMM_CXX_HAVE_MUTABLE */ -/* #undef GLIBMM_CXX_HAVE_NAMESPACES */ -//#undef GLIBMM_CXX_GAUB -//#undef GLIBMM_CXX_AMBIGUOUS_TEMPLATES -#define GLIBMM_HAVE_NAMESPACE_STD 1 -#define GLIBMM_HAVE_STD_ITERATOR_TRAITS 1 -/* #undef GLIBMM_HAVE_SUN_REVERSE_ITERATOR */ -#define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS 1 -#define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1 -#define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1 -/* #undef GLIBMM_COMPILER_SUN_FORTE */ -/* #undef GLIBMM_DEBUG_REFCOUNTING */ -#define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1 -#define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1 -#define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1 -#define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1 -#define GLIBMM_PROPERTIES_ENABLED 1 -#define GLIBMM_VFUNCS_ENABLED 1 -#define GLIBMM_EXCEPTIONS_ENABLED 1 -#define GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 1 -#endif - -#ifdef GLIBMM_MSC - #define GLIBMM_CXX_HAVE_MUTABLE 1 - #define GLIBMM_CXX_HAVE_NAMESPACES 1 - #define GLIBMM_HAVE_NAMESPACE_STD 1 - #define GLIBMM_HAVE_STD_ITERATOR_TRAITS 1 - #define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS 1 - #define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1 - #define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1 - #define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1 - #define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1 - #define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1 - #define GLIBMM_PROPERTIES_ENABLED 1 - #define GLIBMM_VFUNCS_ENABLED 1 - #define GLIBMM_EXCEPTIONS_ENABLED 1 - #define GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 1 - #pragma warning (disable: 4786 4355 4800 4181) -#endif - -#ifndef GLIBMM_HAVE_NAMESPACE_STD -# define GLIBMM_USING_STD(Symbol) namespace std { using ::Symbol; } -#else -# define GLIBMM_USING_STD(Symbol) /* empty */ -#endif - -#ifdef GLIBMM_DLL - #if defined(GLIBMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ - #define GLIBMM_API - #elif !defined(GLIBMM_BUILD) - #define GLIBMM_API __declspec(dllimport) - #else - /* Build a static library */ - #define GLIBMM_API - #endif /* GLIBMM_BUILD - _WINDLL */ -#else - #define GLIBMM_API -#endif /* GLIBMM_DLL */ - -#endif /* _GLIBMM_CONFIG_H */ - diff --git a/libs/glibmm2/glib/glibmmconfig.h.in b/libs/glibmm2/glib/glibmmconfig.h.in deleted file mode 100644 index 8a971fe5b3..0000000000 --- a/libs/glibmm2/glib/glibmmconfig.h.in +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef _GLIBMM_CONFIG_H -#define _GLIBMM_CONFIG_H 1 - -/* version numbers */ -#undef GLIBMM_MAJOR_VERSION -#undef GLIBMM_MINOR_VERSION -#undef GLIBMM_MICRO_VERSION - -// detect common platforms -#if defined(_WIN32) -// Win32 compilers have a lot of varation -#if defined(_MSC_VER) -#define GLIBMM_MSC -#define GLIBMM_WIN32 -#define GLIBMM_DLL -#elif defined(__CYGWIN__) -#define GLIBMM_CONFIGURE -#elif defined(__MINGW32__) -#define GLIBMM_WIN32 -#define GLIBMM_DLL -#define GLIBMM_CONFIGURE -#else -//AIX clR compiler complains about this even though it doesn't get this far: -//#warning "Unknown architecture (send me gcc --dumpspecs or equiv)" -#endif -#else -#define GLIBMM_CONFIGURE -#endif /* _WIN32 */ - -#ifdef GLIBMM_CONFIGURE -#undef GLIBMM_CXX_HAVE_MUTABLE -#undef GLIBMM_CXX_HAVE_NAMESPACES -//#undef GLIBMM_CXX_GAUB -//#undef GLIBMM_CXX_AMBIGUOUS_TEMPLATES -#undef GLIBMM_HAVE_NAMESPACE_STD -#undef GLIBMM_HAVE_STD_ITERATOR_TRAITS -#undef GLIBMM_HAVE_SUN_REVERSE_ITERATOR -#undef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS -#undef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS -#undef GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 -#undef GLIBMM_COMPILER_SUN_FORTE -#undef GLIBMM_DEBUG_REFCOUNTING -#undef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION -#undef GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS -#undef GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC -#undef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS -#undef GLIBMM_PROPERTIES_ENABLED -#undef GLIBMM_VFUNCS_ENABLED -#undef GLIBMM_EXCEPTIONS_ENABLED -#undef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -#endif - -#ifdef GLIBMM_MSC - #define GLIBMM_CXX_HAVE_MUTABLE 1 - #define GLIBMM_CXX_HAVE_NAMESPACES 1 - #define GLIBMM_HAVE_NAMESPACE_STD 1 - #define GLIBMM_HAVE_STD_ITERATOR_TRAITS 1 - #define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS 2 - #define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1 - #define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1 - #define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1 - #define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1 - #define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1 - #define GLIBMM_PROPERTIES_ENABLED 1 - #define GLIBMM_VFUNCS_ENABLED 1 - #define GLIBMM_EXCEPTIONS_ENABLED 1 - #define GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 1 - #pragma warning (disable: 4786 4355 4800 4181) -#endif - -#ifndef GLIBMM_HAVE_NAMESPACE_STD -# define GLIBMM_USING_STD(Symbol) namespace std { using ::Symbol; } -#else -# define GLIBMM_USING_STD(Symbol) /* empty */ -#endif - -#ifdef GLIBMM_DLL - #if defined(GLIBMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ - #define GLIBMM_API - #elif !defined(GLIBMM_BUILD) - #define GLIBMM_API __declspec(dllimport) - #else - /* Build a static library */ - #define GLIBMM_API - #endif /* GLIBMM_BUILD - _WINDLL */ -#else - #define GLIBMM_API -#endif /* GLIBMM_DLL */ - -#endif /* _GLIBMM_CONFIG_H */ - diff --git a/libs/glibmm2/glib/src/Makefile.am b/libs/glibmm2/glib/src/Makefile.am deleted file mode 100644 index ae1b6ea209..0000000000 --- a/libs/glibmm2/glib/src/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## Copyright (c) 2002 -## The gtkmm development team. - -sublib_name = glibmm -sublib_namespace = Glib -files_defs = glib.defs glib_enums.defs glib_functions.defs gobject.defs gobject_enums.defs gobject_functions.defs gmodule_enums.defs gmodule_functions.defs glib_docs.xml glib_docs_override.xml - -include $(top_srcdir)/build_shared/Makefile_gensrc.am_fragment - -glibmm_files_m4 = signalproxy.h.m4 value_basictypes.cc.m4 value_basictypes.h.m4 - -files_stamp += $(glibmm_files_m4:%.m4=$(gensrc_destdir)/%) -EXTRA_DIST += $(glibmm_files_m4) template.macros.m4 - - -$(gensrc_destdir)/%.cc: %.cc.m4 template.macros.m4 - $(M4) -I$(srcdir) $< >$@ - -$(gensrc_destdir)/%.h: %.h.m4 template.macros.m4 - $(M4) -I$(srcdir) $< >$@ - diff --git a/libs/glibmm2/glib/src/Makefile.in b/libs/glibmm2/glib/src/Makefile.in deleted file mode 100644 index c7533e21d0..0000000000 --- a/libs/glibmm2/glib/src/Makefile.in +++ /dev/null @@ -1,416 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/Makefile_list_of_hg.am_fragment \ - $(top_srcdir)/build_shared/Makefile_gensrc.am_fragment \ - $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment \ - $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment \ - $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment \ - $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment -subdir = glib/src -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/glib/glibmmconfig.h \ - $(top_builddir)/gio/giommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GIOMM_CFLAGS = @GIOMM_CFLAGS@ -GIOMM_LIBS = @GIOMM_LIBS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GMMPROC_DIR = @GMMPROC_DIR@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -sublib_name = glibmm -sublib_namespace = Glib -files_defs = glib.defs glib_enums.defs glib_functions.defs gobject.defs gobject_enums.defs gobject_functions.defs gmodule_enums.defs gmodule_functions.defs glib_docs.xml glib_docs_override.xml -tools_dir_m4 = $(top_srcdir)/tools/m4 -tools_dir_pm = $(top_srcdir)/tools/pm -gensrc_destdir = $(srcdir)/../$(sublib_name) -stamp_dir = $(srcdir)/.stamps -files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \ - class_generic.m4 class_gobject.m4 class_gtkobject.m4 \ - class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \ - gerror.m4 \ - compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \ - convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \ - method.m4 property.m4 signal.m4 vfunc.m4 - -files_tools_pm = DocsParser.pm GtkDefs.pm Enum.pm Function.pm FunctionBase.pm Object.pm Output.pm Property.pm Util.pm WrapParser.pm -files_tools_genwrap = generate_wrap_init.pl -files_tools_perl = $(files_tools_genwrap) gmmproc.in -tools_m4 = $(files_tools_m4:%.m4=$(tools_dir_m4)/%.m4) -tools_pm = $(files_tools_pm:%.pm=$(tools_dir_pm)/%.pm) -files_posix_hg = -files_win32_hg = -files_general_hg = convert.hg date.hg fileutils.hg iochannel.hg keyfile.hg markup.hg module.hg optioncontext.hg optionentry.hg optiongroup.hg regex.hg shell.hg spawn.hg thread.hg unicode.hg -files_all_hg = $(files_general_hg) $(files_posix_hg) $(files_win32_hg) -@OS_WIN32_FALSE@files_hg = $(files_general_hg) $(files_posix_hg) -@OS_WIN32_TRUE@files_hg = $(files_general_hg) $(files_win32_hg) -files_all_ccg = $(files_all_hg:%.hg=%.ccg) -files_h = $(files_all_hg:%.hg=$(gensrc_destdir)/%.h) -files_cc = $(files_all_hg:%.hg=$(gensrc_destdir)/%.cc) -files_stamp = $(files_all_hg:%.hg=$(stamp_dir)/stamp-%) \ - $(glibmm_files_m4:%.m4=$(gensrc_destdir)/%) -gmmproc_in = $(top_srcdir)/tools/gmmproc.in -gmmproc_path = $(top_builddir)/tools/gmmproc -gmmproc_args = -I $(tools_dir_m4) --defs $(srcdir) -run_gmmproc = $(PERL_PATH) -I$(tools_dir_pm) $(gmmproc_path) $(gmmproc_args) -gen_wrap_init_in = $(top_srcdir)/tools/generate_wrap_init.pl.in -gen_wrap_init_path = $(top_builddir)/tools/generate_wrap_init.pl -gen_wrap_init_args = --namespace=$(sublib_namespace) -run_gen_wrap_init = $(PERL_PATH) $(gen_wrap_init_path) $(gen_wrap_init_args) -EXTRA_DIST = Makefile_list_of_hg.am_fragment $(files_defs) \ - $(files_all_hg) $(files_all_ccg) $(glibmm_files_m4) \ - template.macros.m4 -glibmm_files_m4 = signalproxy.h.m4 value_basictypes.cc.m4 value_basictypes.h.m4 -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/build_shared/Makefile_gensrc.am_fragment $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment $(srcdir)/Makefile_list_of_hg.am_fragment $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glib/src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu glib/src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -@MAINTAINER_MODE_FALSE@all-local: -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -$(stamp_dir)/stamp-%: %.hg %.ccg $(gmmproc_in) $(tools_m4) $(tools_pm) $(files_defs) - $(run_gmmproc) $(notdir $*) $(srcdir) $(gensrc_destdir) - @echo 'timestamp' >$@ - -$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_in) $(files_all_hg) - $(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) >$@ - -create-stamp-dir: - @(test -d $(stamp_dir) || mkdir $(stamp_dir)) - -@MAINTAINER_MODE_TRUE@all-local: create-stamp-dir $(files_stamp) $(gensrc_destdir)/wrap_init.cc - -maintainer-clean-local: - rm -rf $(stamp_dir) - -.PHONY: create-stamp-dir - -$(gensrc_destdir)/%.cc: %.cc.m4 template.macros.m4 - $(M4) -I$(srcdir) $< >$@ - -$(gensrc_destdir)/%.h: %.h.m4 template.macros.m4 - $(M4) -I$(srcdir) $< >$@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/glib/src/Makefile_list_of_hg.am_fragment b/libs/glibmm2/glib/src/Makefile_list_of_hg.am_fragment deleted file mode 100644 index 4cc446def7..0000000000 --- a/libs/glibmm2/glib/src/Makefile_list_of_hg.am_fragment +++ /dev/null @@ -1,8 +0,0 @@ -## This file is include by other Makefile.am files, using the automake -## include feature. The include happens in Makefile.am, not Makefile.in -## or Makefile, so it's like copy-and-pasting this into each of those -## Makefile.am files. - -files_posix_hg = -files_win32_hg = -files_general_hg = convert.hg date.hg fileutils.hg iochannel.hg keyfile.hg markup.hg module.hg optioncontext.hg optionentry.hg optiongroup.hg regex.hg shell.hg spawn.hg thread.hg unicode.hg diff --git a/libs/glibmm2/glib/src/convert.ccg b/libs/glibmm2/glib/src/convert.ccg deleted file mode 100644 index d598fc17b9..0000000000 --- a/libs/glibmm2/glib/src/convert.ccg +++ /dev/null @@ -1,395 +0,0 @@ -// -*- c++ -*- -/* $Id: convert.ccg,v 1.4 2006/06/05 17:32:14 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -/**** Glib::IConv **********************************************************/ - -IConv::IConv(const std::string& to_codeset, const std::string& from_codeset) -: - gobject_ (g_iconv_open(to_codeset.c_str(), from_codeset.c_str())) -{ - if(gobject_ == reinterpret_cast(-1)) - { - GError* gerror = 0; - - // Abuse g_convert() to create a GError object. This may seem a weird - // thing to do, but it gives us consistently translated error messages - // at no further cost. - g_convert("", 0, to_codeset.c_str(), from_codeset.c_str(), 0, 0, &gerror); - - // If this should ever fail we're fucked. - g_assert(gerror != 0); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } -} - -IConv::IConv(GIConv gobject) -: - gobject_ (gobject) -{} - -IConv::~IConv() -{ - g_iconv_close(gobject_); -} - -size_t IConv::iconv(char** inbuf, gsize* inbytes_left, char** outbuf, gsize* outbytes_left) -{ - return g_iconv(gobject_, inbuf, inbytes_left, outbuf, outbytes_left); -} - -void IConv::reset() -{ - // Apparently iconv() on Solaris <= 7 segfaults if you pass in - // NULL for anything but inbuf; work around that. (NULL outbuf - // or NULL *outbuf is allowed by Unix98.) - - char* outbuf = 0; - gsize inbytes_left = 0; - gsize outbytes_left = 0; - - g_iconv(gobject_, 0, &inbytes_left, &outbuf, &outbytes_left); -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string IConv::convert(const std::string& str) -#else -std::string IConv::convert(const std::string& str, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert_with_iconv( - str.data(), str.size(), gobject_, 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -/**** charset conversion functions *****************************************/ - -bool get_charset() -{ - return g_get_charset(0); -} - -bool get_charset(std::string& charset) -{ - const char* charset_cstr = 0; - const bool is_utf8 = g_get_charset(&charset_cstr); - - charset = charset_cstr; - return is_utf8; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset) -#else -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert( - str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), - 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset) -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert_with_fallback( - str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), 0, - 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback) -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_convert_with_fallback( - str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), - const_cast(fallback.c_str()), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring locale_to_utf8(const std::string& opsys_string) -#else -Glib::ustring locale_to_utf8(const std::string& opsys_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_locale_to_utf8( - opsys_string.data(), opsys_string.size(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - const ScopedPtr scoped_buf (buf); - return Glib::ustring(scoped_buf.get(), scoped_buf.get() + bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string locale_from_utf8(const Glib::ustring& utf8_string) -#else -std::string locale_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_locale_from_utf8( - utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_utf8(const std::string& opsys_string) -#else -Glib::ustring filename_to_utf8(const std::string& opsys_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_filename_to_utf8( - opsys_string.data(), opsys_string.size(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - const ScopedPtr scoped_buf (buf); - return Glib::ustring(scoped_buf.get(), scoped_buf.get() + bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_utf8(const Glib::ustring& utf8_string) -#else -std::string filename_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; - GError* gerror = 0; - - char *const buf = g_filename_from_utf8( - utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get(), bytes_written); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname) -#else -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - char* hostname_buf = 0; - GError* gerror = 0; - - char *const buf = g_filename_from_uri(uri.c_str(), &hostname_buf, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - // Let's take ownership at this point. - const ScopedPtr scoped_buf (buf); - - if(hostname_buf) - hostname = ScopedPtr(hostname_buf).get(); - else - hostname.erase(); - - return std::string(scoped_buf.get()); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri) -#else -std::string filename_from_uri(const Glib::ustring& uri, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - char *const buf = g_filename_from_uri(uri.c_str(), 0, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return std::string(ScopedPtr(buf).get()); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname) -#else -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - char *const buf = g_filename_to_uri(filename.c_str(), hostname.c_str(), &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return Glib::ustring(ScopedPtr(buf).get()); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename) -#else -Glib::ustring filename_to_uri(const std::string& filename, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - char *const buf = g_filename_to_uri(filename.c_str(), 0, &gerror); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) ::Glib::Error::throw_exception(gerror); - #else - if(gerror) error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return Glib::ustring(ScopedPtr(buf).get()); -} - -Glib::ustring filename_display_basename(const std::string& filename) -{ - char *const buf = g_filename_display_basename(filename.c_str()); - - return Glib::ustring(ScopedPtr(buf).get()); -} - - -Glib::ustring filename_display_name(const std::string& filename) -{ - char *const buf = g_filename_display_name(filename.c_str()); - - return Glib::ustring(ScopedPtr(buf).get()); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/convert.hg b/libs/glibmm2/glib/src/convert.hg deleted file mode 100644 index 9f89a599e7..0000000000 --- a/libs/glibmm2/glib/src/convert.hg +++ /dev/null @@ -1,324 +0,0 @@ -/* $Id: convert.hg,v 1.5 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include /* for gsize */ - -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GIConv* GIConv; } -#endif - - -namespace Glib -{ - -/** @defgroup CharsetConv Character Set Conversion - * Utility functions for converting strings between different character sets. - * @{ - */ - -/** Exception class for charset conversion errors. - * Glib::convert() and friends throw a ConvertError exception if the charset - * conversion failed for some reason. When writing non-trivial applications - * you should always catch those errors, and then try to recover, or tell the - * user the input was invalid. - */ -_WRAP_GERROR(ConvertError, GConvertError, G_CONVERT_ERROR, NO_GTYPE) - - -/** Thin %iconv() wrapper. - * glibmm provides Glib::convert() and Glib::locale_to_utf8() which - * are likely more convenient than the raw iconv wrappers. However, - * creating an IConv object once and using the convert() method could - * be useful when converting multiple times between the same charsets. - */ -class IConv -{ -public: - /** Open new conversion descriptor. - * @param to_codeset Destination codeset. - * @param from_codeset %Source codeset. - * @throw Glib::ConvertError - */ - IConv(const std::string& to_codeset, const std::string& from_codeset); - - explicit IConv(GIConv gobject); - - /** Close conversion descriptor. - */ - ~IConv(); - - /** Same as the standard UNIX routine %iconv(), but may be implemented - * via libiconv on UNIX flavors that lack a native implementation. glibmm - * provides Glib::convert() and Glib::locale_to_utf8() which are likely - * more convenient than the raw iconv wrappers. - * @param inbuf Bytes to convert. - * @param inbytes_left In/out parameter, bytes remaining to convert in @a inbuf. - * @param outbuf Converted output bytes. - * @param outbytes_left In/out parameter, bytes available to fill in @a outbuf. - * @return Count of non-reversible conversions, or static_cast(-1) on error. - */ - size_t iconv(char** inbuf, gsize* inbytes_left, char** outbuf, gsize* outbytes_left); - - /** Reset conversion descriptor to initial state. - * Same as iconv(0, 0, 0, 0), but implemented slightly differently - * in order to work on Sun Solaris <= 7. It's also more obvious so you're - * encouraged to use it. - */ - void reset(); - - /** Convert from one encoding to another. - * @param str The string to convert. - * @return The converted string. - * @throw Glib::ConvertError - */ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - std::string convert(const std::string& str); - #else - std::string convert(const std::string& str, std::auto_ptr& error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - GIConv gobj() { return gobject_; } - -private: - GIConv gobject_; - - // noncopyable - IConv(const IConv&); - IConv& operator=(const IConv&); -}; - - -/** Get the charset used by the current locale. - * @return Whether the current locale uses the UTF-8 charset. - */ -bool get_charset(); - -/** Get the charset used by the current locale. - * @param charset Will be filled with the charset's name. - * @return Whether the current locale uses the UTF-8 charset. - */ -bool get_charset(std::string& charset); - -/** Convert from one encoding to another. - * @param str The string to convert. - * @param to_codeset Name of the target charset. - * @param from_codeset Name of the source charset. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset); -#else -std::string convert(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string from one character set to another, possibly including - * fallback sequences for characters not representable in the output. - * Characters not in the target encoding will be represented as Unicode - * escapes \\x{XXXX} or \\x{XXXXXX}. - * @param str The string to convert. - * @param to_codeset Name of the target charset. - * @param from_codeset Name of the source charset. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset); -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string from one character set to another, possibly including - * fallback sequences for characters not representable in the output. - * @note It is not guaranteed that the specification for the fallback sequences - * in @a fallback will be honored. Some systems may do a approximate conversion - * from @a from_codeset to @a to_codeset in their iconv() functions, in which - * case Glib will simply return that approximate conversion. - * - * @param str The string to convert. - * @param to_codeset Name of the target charset. - * @param from_codeset Name of the source charset. - * @param fallback UTF-8 string to be used in place of characters which aren't - * available in the target encoding. All characters in the fallback string - * @em must be available in the target encoding. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback); -#else -std::string convert_with_fallback(const std::string& str, - const std::string& to_codeset, - const std::string& from_codeset, - const Glib::ustring& fallback, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Convert from the current locale's encoding to UTF-8. - * Convenience wrapper around Glib::convert(). - * @param opsys_string The string to convert. Must be encoded in the charset - * used by the operating system's current locale. - * @return The input string converted to UTF-8 encoding. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring locale_to_utf8(const std::string& opsys_string); -#else -Glib::ustring locale_to_utf8(const std::string& opsys_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Convert from UTF-8 to the current locale's encoding. - * Convenience wrapper around Glib::convert(). - * @param utf8_string The UTF-8 string to convert. - * @return The input string converted to the charset used by the operating - * system's current locale. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string locale_from_utf8(const Glib::ustring& utf8_string); -#else -std::string locale_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string which is in the encoding used for filenames into - * a UTF-8 string. - * @param opsys_string A string in the encoding for filenames. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_utf8(const std::string& opsys_string); -#else -Glib::ustring filename_to_utf8(const std::string& opsys_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts a string from UTF-8 to the encoding used for filenames. - * @param utf8_string A UTF-8 encoded string. - * @return The converted string. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_utf8(const Glib::ustring& utf8_string); -#else -std::string filename_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an escaped UTF-8 encoded URI to a local filename - * in the encoding used for filenames. - * @param uri A string in the encoding for filenames. - * @param hostname Location to store hostname for the URI. If there is no - * hostname in the URI, "" will be stored in this location. - * @return The resulting filename. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname); -#else -std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an escaped UTF-8 encoded URI to a local filename in the encoding - * used for filenames. - * @param uri A string in the encoding for filenames. - * @return The resulting filename. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -std::string filename_from_uri(const Glib::ustring& uri); -#else -std::string filename_from_uri(const Glib::ustring& uri, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an absolute filename to an escaped UTF-8 encoded URI. - * @param filename An absolute filename specified in the encoding used - * for filenames by the operating system. - * @param hostname A UTF-8 encoded hostname. - * @return The resulting URI. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname); -#else -Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Converts an absolute filename to an escaped UTF-8 encoded URI. - * @param filename An absolute filename specified in the encoding used - * for filenames by the operating system. - * @return The resulting URI. - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring filename_to_uri(const std::string& filename); -#else -Glib::ustring filename_to_uri(const std::string& filename, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - -/** Returns the display basename for the particular filename, guaranteed - * to be valid UTF-8. The display name might not be identical to the filename, - * for instance there might be problems converting it to UTF-8, and some files - * can be translated in the display - * - * You must pass the whole absolute pathname to this function so that - * translation of well known locations can be done. - * - * This function is preferred over filename_display_name() if you know the - * whole path, as it allows translation. - * - * @param filename An absolute pathname in the GLib file name encoding. - * @result A string containing a rendition of the basename of the filename in valid UTF-8 - */ -Glib::ustring filename_display_basename(const std::string& filename); - -/** Converts a filename into a valid UTF-8 string. The - * conversion is not necessarily reversible, so you - * should keep the original around and use the return - * value of this function only for display purposes. - * Unlike g_filename_to_utf8(), the result is guaranteed - * to be non-empty even if the filename actually isn't in the GLib - * file name encoding. - * - * If you know the whole pathname of the file you should use - * g_filename_display_basename(), since that allows location-based - * translation of filenames. - * - * @param filename: a pathname hopefully in the GLib file name encoding - * @result A string containing a rendition of the filename in valid UTF-8. - */ -Glib::ustring filename_display_name(const std::string& filename); - -/** @} group CharsetConv */ - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/date.ccg b/libs/glibmm2/glib/src/date.ccg deleted file mode 100644 index ab99a1c407..0000000000 --- a/libs/glibmm2/glib/src/date.ccg +++ /dev/null @@ -1,375 +0,0 @@ -// -*- c++ -*- -/* $Id: date.ccg,v 1.7 2006/07/16 13:54:02 jjongsma Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#include -#include - -#include -#include - -#include -GLIBMM_USING_STD(max) - -namespace Glib -{ - -Date::Date() -{ - g_date_clear(&gobject_, 1); -} - -Date::Date(Date::Day day, Date::Month month, Date::Year year) -{ - g_date_clear(&gobject_, 1); - g_date_set_dmy(&gobject_, day, (GDateMonth) month, year); -} - -Date::Date(guint32 julian_day) -{ - g_date_clear(&gobject_, 1); - g_date_set_julian(&gobject_, julian_day); -} - -Date::Date(const GDate& castitem) -: - gobject_ (castitem) -{} - -void Date::clear() -{ - g_date_clear(&gobject_, 1); -} - -void Date::set_parse(const Glib::ustring& str) -{ - g_date_set_parse(&gobject_, str.c_str()); -} - - -_DEPRECATE_IFDEF_START - -//Avoid a build problem in the case that time_t is equivalent to guint32 (GTime is also guint32) -//That would make the set_time() method overload impossible. -#ifdef GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 -void Date::set_time(GTime time) -{ - //This method, and the C function that it wraps, are deprecated. - g_date_set_time(&gobject_, time); -} -#endif //GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 - -_DEPRECATE_IFDEF_END - - -void Date::set_time(time_t timet) -{ - g_date_set_time_t(&gobject_, timet); -} - -void Date::set_time_current() -{ - //As suggested in the C documentation: - g_date_set_time_t(&gobject_, time(NULL)); -} - -void Date::set_time(const GTimeVal& timeval) -{ - g_date_set_time_val(&gobject_, const_cast(&timeval)); -} - -void Date::set_month(Date::Month month) -{ - g_date_set_month(&gobject_, (GDateMonth) month); -} - -void Date::set_day(Date::Day day) -{ - g_date_set_day(&gobject_, day); -} - -void Date::set_year(Date::Year year) -{ - g_date_set_year(&gobject_, year); -} - -void Date::set_dmy(Date::Day day, Date::Month month, Date::Year year) -{ - g_date_set_dmy(&gobject_, day, (GDateMonth) month, year); -} - -void Date::set_julian(guint32 julian_day) -{ - g_date_set_julian(&gobject_, julian_day); -} - -Date& Date::add_days(int n_days) -{ - if(n_days >= 0) - g_date_add_days(&gobject_, n_days); - else - g_date_subtract_days(&gobject_, -n_days); - return *this; -} - -Date& Date::subtract_days(int n_days) -{ - if(n_days >= 0) - g_date_subtract_days(&gobject_, n_days); - else - g_date_add_days(&gobject_, -n_days); - return *this; -} - -Date& Date::add_months(int n_months) -{ - if(n_months >= 0) - g_date_add_months(&gobject_, n_months); - else - g_date_subtract_months(&gobject_, -n_months); - return *this; -} - -Date& Date::subtract_months(int n_months) -{ - if(n_months >= 0) - g_date_subtract_months(&gobject_, n_months); - else - g_date_add_months(&gobject_, -n_months); - return *this; -} - -Date& Date::add_years(int n_years) -{ - if(n_years >= 0) - g_date_add_years(&gobject_, n_years); - else - g_date_subtract_years(&gobject_, -n_years); - return *this; -} - -Date& Date::subtract_years(int n_years) -{ - if(n_years >= 0) - g_date_subtract_years(&gobject_, n_years); - else - g_date_add_years(&gobject_, -n_years); - return *this; -} - -int Date::days_between(const Date& rhs) const -{ - return g_date_days_between(&gobject_, &rhs.gobject_); -} - -int Date::compare(const Date& rhs) const -{ - return g_date_compare(&gobject_, &rhs.gobject_); -} - -Date& Date::clamp(const Date& min_date, const Date& max_date) -{ - g_date_clamp(&gobject_, &min_date.gobject_, &max_date.gobject_); - return *this; -} - -Date& Date::clamp_min(const Date& min_date) -{ - g_date_clamp(&gobject_, &min_date.gobject_, 0 /* see the C docs */); - return *this; -} - -Date& Date::clamp_max(const Date& max_date) -{ - g_date_clamp(&gobject_, 0 /* see the C docs */, &max_date.gobject_); - return *this; -} - -void Date::order(Date& other) -{ - g_date_order(&gobject_, &other.gobject_); -} - -Date::Weekday Date::get_weekday() const -{ - return (Date::Weekday) g_date_get_weekday(&gobject_); -} - -Date::Month Date::get_month() const -{ - return (Date::Month) g_date_get_month(&gobject_); -} - -Date::Year Date::get_year() const -{ - return g_date_get_year(&gobject_); -} - -Date::Day Date::get_day() const -{ - return g_date_get_day(&gobject_); -} - -guint32 Date::get_julian() const -{ - return g_date_get_julian(&gobject_); -} - -unsigned int Date::get_day_of_year() const -{ - return g_date_get_day_of_year(&gobject_); -} - -unsigned int Date::get_monday_week_of_year() const -{ - return g_date_get_monday_week_of_year(&gobject_); -} - -unsigned int Date::get_sunday_week_of_year() const -{ - return g_date_get_sunday_week_of_year(&gobject_); -} - -bool Date::is_first_of_month() const -{ - return g_date_is_first_of_month(&gobject_); -} - -bool Date::is_last_of_month() const -{ - return g_date_is_last_of_month(&gobject_); -} - -//static -guint8 Date::get_days_in_month(Date::Month month, Date::Year year) -{ - return g_date_get_days_in_month((GDateMonth) month, year); -} - -//static -guint8 Date::get_monday_weeks_in_year(Date::Year year) -{ - return g_date_get_monday_weeks_in_year(year); -} - -//static -guint8 Date::get_sunday_weeks_in_year(Date::Year year) -{ - return g_date_get_sunday_weeks_in_year(year); -} - -//static -bool Date::is_leap_year(Date::Year year) -{ - return g_date_is_leap_year(year); -} - -Glib::ustring Date::format_string(const Glib::ustring& format) const -{ - struct tm tm_data; - g_date_to_struct_tm(&gobject_, &tm_data); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - const std::string locale_format = locale_from_utf8(format); - #else - std::auto_ptr error; //TODO: Check it? - const std::string locale_format = locale_from_utf8(format, error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - - gsize bufsize = std::max(2 * locale_format.size(), 128); - - do - { - const ScopedPtr buf (static_cast(g_malloc(bufsize))); - - // Set the first byte to something other than '\0', to be able to - // recognize whether strftime actually failed or just returned "". - buf.get()[0] = '\1'; - const gsize len = strftime(buf.get(), bufsize, locale_format.c_str(), &tm_data); - - if(len != 0 || buf.get()[0] == '\0') - { - g_assert(len < bufsize); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - return locale_to_utf8(std::string(buf.get(), len)); - #else - std::auto_ptr error; //TODO: Check it? - return locale_to_utf8(std::string(buf.get(), len), error); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - } - while((bufsize *= 2) <= 65536); - - // This error is quite unlikely (unless strftime is buggy). - g_warning("Glib::Date::format_string(): maximum size of strftime buffer exceeded, giving up"); - - return Glib::ustring(); -} - -void Date::to_struct_tm(struct tm& dest) const -{ - g_date_to_struct_tm(&gobject_, &dest); -} - -bool Date::valid() const -{ - return g_date_valid(&gobject_); -} - -//static -bool Date::valid_day(Date::Day day) -{ - return g_date_valid_day(day); -} - -//static -bool Date::valid_month(Date::Month month) -{ - return g_date_valid_month((GDateMonth) month); -} - -//static -bool Date::valid_year(Date::Year year) -{ - return g_date_valid_year(year); -} - -//static -bool Date::valid_weekday(Date::Weekday weekday) -{ - return g_date_valid_weekday((GDateWeekday) weekday); -} - -//static -bool Date::valid_julian(guint32 julian_day) -{ - return g_date_valid_julian(julian_day); -} - -//static -bool Date::valid_dmy(Date::Day day, Date::Month month, Date::Year year) -{ - return g_date_valid_dmy(day, (GDateMonth) month, year); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/date.hg b/libs/glibmm2/glib/src/date.hg deleted file mode 100644 index 9d04a29719..0000000000 --- a/libs/glibmm2/glib/src/date.hg +++ /dev/null @@ -1,408 +0,0 @@ -/* $Id: date.hg,v 1.6 2005/11/29 15:53:27 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#m4 _PUSH(SECTION_HEADER1) -#m4 #undef G_DISABLE_DEPRECATED //So we can use deprecated functions in our deprecated methods. -#m4 _POP() - -#include - -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { struct tm; } -#endif - -namespace Glib -{ - -/** Julian calendar date. - */ -class Date -{ -public: - typedef guint8 Day; - typedef guint16 Year; - - _WRAP_ENUM(Month, GDateMonth, s#^DATE_##, NO_GTYPE, get_type_func=) - _WRAP_ENUM(Weekday, GDateWeekday, s#^DATE_##, NO_GTYPE) - _WRAP_ENUM(DMY, GDateDMY, s#^DATE_##, NO_GTYPE) - - static const Day BAD_DAY = 0; - static const Year BAD_YEAR = 0; - static const guint32 BAD_JULIAN = 0; - - Date(); - Date(Day day, Month month, Year year); - explicit Date(guint32 julian_day); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit Date(const GDate& castitem); -#endif - - void clear(); - /** Clear the date. The cleared dates will not represent an existing date, but will not contain garbage. - * @param month Month to set. - */ - - /** Parses a user-inputted string str, and try to figure out what date it represents, taking the current locale into account. If the string is successfully parsed, the date will be valid after the call. Otherwise, it will be invalid. - * This function is not appropriate for file formats and the like; it isn't very precise, and its exact behavior varies with the locale. It's intended to be a heuristic routine that guesses what the user means by a given string (and it does work pretty well in that capacity). - * @param str String to parse. - */ - void set_parse (const Glib::ustring& str); - - - _DEPRECATE_IFDEF_START - - //Avoid a build problem in the case that time_t is equivalent to guint32 (GTime is also guint32) - //That would make the set_time() method overload impossible. - #ifdef GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 - /** Sets the value of a date from a GTime (time_t) value. - * - * @param time GTime value to set. - * - * @deprecated Please use set_time(time_t) or set_time(const GTimeVal&). - */ - void set_time(GTime time); - #endif //GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 - - _DEPRECATE_IFDEF_END - - - /** Sets the value of a date from a time_t value. - * - * @param timet time_t value to set - * - * @see set_time_current() - * - * Since: 2.10 - */ - void set_time(time_t timet); - - /** Sets the value of a date from a GTimeVal value. Note that the - * tv_usec member is ignored, because Glib::Date can't make use of the - * additional precision. - * - * @see set_time_current() - * - * @param timeval GTimeVal value to set - * - * Since: 2.10 - */ - void set_time(const GTimeVal& timeval); - - void set_time_current(); - - /** Sets the month of the year. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param month Month to set. - */ - void set_month(Month month); - - /** Sets the day of the month. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param day Day to set. - */ - void set_day(Day day); - - /** Sets the year. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param year Year to set. - */ - void set_year(Year year); - - /** Sets the value of a day, month, and year.. If the resulting day-month-year triplet is invalid, the date will be invalid. - * @param day Day to set. - * @param month Month to set. - * @param year Year to set. - */ - void set_dmy(Day day, Month month, Year year); - - /** Sets the value of a GDate from a Julian day number. - * @param julian_day Julian day to set. - */ - void set_julian(guint32 julian_day); - - //TODO: Why return Date& (which is always *this) from these methods? - //Isn't it enough to also change the current instance? - //Maybe we need a copy constructor too. - //murrayc - - /** Add a number of days to a Date. - * @param n_days Days to add. - * @return Resulting Date - */ - Date& add_days(int n_days); - - /** Subtract n_days to a Date. - * @param n_days Days to subtract. - * @return Resulting Date - */ - Date& subtract_days(int n_days); - - /** Add n_months to a Date. - * @param n_months Months to add. - * @return Resulting Date - */ - Date& add_months(int n_months); - - /** Subtract n_months to a Date. - * @param n_months Months to subtract. - * @return Resulting Date - */ - Date& subtract_months(int n_months); - - /** Add n_days to a Date. - * @param n_years Years to add. - * @return Resulting Date - */ - Date& add_years(int n_years); - - /** Subtract n_years to a Date. - * @param n_years Years to subtract. - * @return Resulting Date - */ - Date& subtract_years(int n_years); - - /** Calculate days between two dates. - * @param rhs Date. - * @return Numbers of days. - */ - int days_between(const Date& rhs) const; - - /** Compare two dates. - * @param rhs Date to compare. - * @return Result of comparition. - */ - int compare(const Date& rhs) const; - - /** If date is prior to min_date, sets date equal to min_date. - * If date falls after max_date, sets date equal to max_date. All dates must be valid. - * See also clamp_min() and clamp_max(). - * @param min_date Date minimum value. - * @param max_date Date maximum value. - * @return Date in interval. - */ - Date& clamp(const Date& min_date, const Date& max_date); - - /** If date is prior to min_date, sets date equal to min_date. - * See also clamp(), and clamp_max(). - * @param min_date Date minimum value. - * @return Date in interval. - */ - Date& clamp_min(const Date& min_date); - - /** If date falls after max_date, sets date equal to max_date. - * See also clamp(), and clamp_min(). - * @param max_date Date maximum value. - * @return Date in interval. - */ - Date& clamp_max(const Date& max_date); - - /** Checks if date is less than or equal to other date, and swap the values if this is not the case. - * @param other Date ro compare. - * @return Date. - */ - void order(Date& other); - - /** Returns the day of the week for a Date. The date must be valid. - * @return Day of the week as a Date::Weekday. - */ - Weekday get_weekday() const; - - /** Returns the month of the year. The date must be valid. - * @return Month of the year as a Date::Month. - */ - Month get_month() const; - - /** Returns the year of a Date. The date must be valid. - * @return Year in which the date falls. - */ - Year get_year() const; - - /** Returns the day of the month. The date must be valid. - * @return Day of the month.. - */ - Day get_day() const; - - /** Returns the Julian day or "serial number" of the Date. - * The Julian day is simply the number of days since January 1, Year 1; - * i.e., January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, etc. - * The date must be valid. - * @return Julian day. - */ - guint32 get_julian() const; - - /** Returns the day of the year, where Jan 1 is the first day of the year. - * The date must be valid. - * @return Julian day. - */ - unsigned int get_day_of_year() const; - - /** Returns the week of the year, where weeks are understood to start on Monday. - * If the date is before the first Monday of the year, return 0. - * The date must be valid. - * @return Week of the year. - */ - unsigned int get_monday_week_of_year() const; - - /** Returns the week of the year during which this date falls, if weeks are understood to being on Sunday. - * Can return 0 if the day is before the first Sunday of the year. - * The date must be valid. - * @return Week of the year. - */ - unsigned int get_sunday_week_of_year() const; - - /** Returns true if the date is on the first of a month. - * The date must be valid. - * @return true if the date is the first of the month. - */ - bool is_first_of_month() const; - - /** Returns true if the date is the last day of the month. - * The date must be valid. - * @return true if the date is the last day of the month. - */ - bool is_last_of_month() const; - - /** Returns the number of days in a month, taking leap years into account. - * @param month Month. - * @param year Year. - * @return Number of days in month during the year. - */ - static guint8 get_days_in_month(Month month, Year year); - - /** Returns the number of weeks in the year, where weeks are taken to start on Monday. Will be 52 or 53. - * (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Mondays are in the year, i.e. there are 53 Mondays if one of the extra days happens to be a Monday.) - * @param year Year to count weeks in. - * @return Number of weeks. - */ - static guint8 get_monday_weeks_in_year(Year year); - - /** Returns the number of weeks in the year, where weeks are taken to start on Sunday. Will be 52 or 53. - * (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Sundays are in the year, i.e. there are 53 Sundays if one of the extra days happens to be a Sunday.) - * @param year Year to count weeks in. - * @return Number of weeks. - */ - static guint8 get_sunday_weeks_in_year(Year year); - - /** Returns true if the year is a leap year. - * @param year Year to check. - * @return true if the year is a leap year. - */ - static bool is_leap_year(Year year); - - /** Convert date to string. - * @param format A format string as used by @c strftime(), in UTF-8 - * encoding. Only date formats are allowed, the result of time formats - * is undefined. - * @return The formatted date string. - * @throw Glib::ConvertError - */ - Glib::ustring format_string(const Glib::ustring& format) const; - - /** Fills in the date-related bits of a struct tm using the date value. Initializes the non-date parts with something sane but meaningless. - * @param dest Struct tm to fill. - */ - void to_struct_tm(struct tm& dest) const; - - /** Returns true if the Date represents an existing day. - * @return true if the date is valid. - */ - bool valid() const; - - /** Returns true if the day of the month is valid (a day is valid if it's between 1 and 31 inclusive). - * @param day Day to check. - * @return true if the day is valid. - */ - static bool valid_day(Day day); - - /** Returns true if the month value is valid. The 12 Date::Month enumeration values are the only valid months. - * @param month Month to check. - * @return true if the month is valid. - */ - static bool valid_month(Month month); - - - /** Returns true if the year is valid. - * Any year greater than 0 is valid, though there is a 16-bit limit to what Date will understand. - * @param year Year to check. - * @return true if the year is valid. - */ - static bool valid_year(Year year); - - /** Returns true if the weekday is valid. - * The 7 Date::Weekday enumeration values are the only valid. - * @param weekday Weekday to check. - * @return true if the weekday is valid. - */ - static bool valid_weekday(Weekday weekday); - - /** Returns true if the Julian day is valid. - * Anything greater than zero is basically a valid Julian, though there is a 32-bit limit. - * @param julian_day Julian day to check. - * @return true if the Julian day is valid. - */ - static bool valid_julian(guint32 julian_day); - - - /** Returns true if the day-month-year triplet forms a valid, existing day in the range of days Date understands (Year 1 or later, no more than a few thousand years in the future). - * @param day Day to check. - * @param month Month to check. - * @param year Year to check. - * @return true if the date is a valid one. - */ - static bool valid_dmy(Day day, Month month, Year year); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GDate* gobj() { return &gobject_; } - const GDate* gobj() const { return &gobject_; } -#endif - -private: - GDate gobject_; -}; - - -/** @relates Glib::Date */ -inline bool operator==(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) == 0); } - -/** @relates Glib::Date */ -inline bool operator!=(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) != 0); } - -/** @relates Glib::Date */ -inline bool operator<(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) < 0); } - -/** @relates Glib::Date */ -inline bool operator>(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) > 0); } - -/** @relates Glib::Date */ -inline bool operator<=(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) <= 0); } - -/** @relates Glib::Date */ -inline bool operator>=(const Date& lhs, const Date& rhs) - { return (lhs.compare(rhs) >= 0); } - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/fileutils.ccg b/libs/glibmm2/glib/src/fileutils.ccg deleted file mode 100644 index 84df93f952..0000000000 --- a/libs/glibmm2/glib/src/fileutils.ccg +++ /dev/null @@ -1,185 +0,0 @@ -// -*- c++ -*- -/* $Id: fileutils.ccg,v 1.1 2003/01/07 16:58:25 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -/**** Glib::Dir ************************************************************/ - -Dir::Dir(const std::string& path) -{ - GError* error = 0; - gobject_ = g_dir_open(path.c_str(), 0, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -Dir::Dir(GDir* gobject) -: - gobject_ (gobject) -{} - -Dir::~Dir() -{ - if(gobject_) - g_dir_close(gobject_); -} - -std::string Dir::read_name() -{ - const char *const name = g_dir_read_name(gobject_); - return (name) ? std::string(name) : std::string(); -} - -void Dir::rewind() -{ - g_dir_rewind(gobject_); -} - -void Dir::close() -{ - if(gobject_) - { - g_dir_close(gobject_); - gobject_ = 0; - } -} - -DirIterator Dir::begin() -{ - g_dir_rewind(gobject_); - return DirIterator(gobject_, g_dir_read_name(gobject_)); -} - -DirIterator Dir::end() -{ - return DirIterator(gobject_, 0); -} - - -/**** Glib::DirIterator ****************************************************/ - -DirIterator::DirIterator() -: - gobject_ (0), - current_ (0) -{} - -DirIterator::DirIterator(GDir* gobject, const char* current) -: - gobject_ (gobject), - current_ (current) -{} - -std::string DirIterator::operator*() const -{ - return (current_) ? std::string(current_) : std::string(); -} - -DirIterator& DirIterator::operator++() -{ - current_ = g_dir_read_name(gobject_); - return *this; -} - -void DirIterator::operator++(int) -{ - current_ = g_dir_read_name(gobject_); -} - -bool DirIterator::operator==(const DirIterator& rhs) const -{ - return (current_ == rhs.current_); -} - -bool DirIterator::operator!=(const DirIterator& rhs) const -{ - return (current_ != rhs.current_); -} - - -bool file_test(const std::string& filename, FileTest test) -{ - return g_file_test(filename.c_str(), static_cast(unsigned(test))); -} - -int mkstemp(std::string& filename_template) -{ - const ScopedPtr buf (g_strndup(filename_template.data(), filename_template.size())); - const int fileno = g_mkstemp(buf.get()); - - filename_template = buf.get(); - return fileno; -} - -int file_open_tmp(std::string& name_used, const std::string& prefix) -{ - std::string basename_template (prefix); - basename_template += "XXXXXX"; // this sillyness shouldn't be in the interface - - GError* error = 0; - ScopedPtr buf_name_used; - - const int fileno = g_file_open_tmp(basename_template.c_str(), buf_name_used.addr(), &error); - - if(error) - Glib::Error::throw_exception(error); - - name_used = buf_name_used.get(); - return fileno; -} - -int file_open_tmp(std::string& name_used) -{ - GError* error = 0; - ScopedPtr buf_name_used; - - const int fileno = g_file_open_tmp(0, buf_name_used.addr(), &error); - - if(error) - Glib::Error::throw_exception(error); - - name_used = buf_name_used.get(); - return fileno; -} - -std::string file_get_contents(const std::string& filename) -{ - ScopedPtr contents; - gsize length = 0; - GError* error = 0; - - g_file_get_contents(filename.c_str(), contents.addr(), &length, &error); - - if(error) - Glib::Error::throw_exception(error); - - return std::string(contents.get(), length); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/fileutils.hg b/libs/glibmm2/glib/src/fileutils.hg deleted file mode 100644 index 70dc779ee0..0000000000 --- a/libs/glibmm2/glib/src/fileutils.hg +++ /dev/null @@ -1,400 +0,0 @@ -/* $Id: fileutils.hg,v 1.3 2004/01/22 18:38:12 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GDir GDir; } -#endif - -#include -#include - -#include -#include - -GLIBMM_USING_STD(input_iterator_tag) -GLIBMM_USING_STD(string) - - -namespace Glib -{ - -_WRAP_ENUM(FileTest, GFileTest, NO_GTYPE) - -/** @defgroup FileUtils File Utilities - * Various file-related classes and functions. - */ - -/** Exception class for file-related errors. - * @ingroup FileUtils - */ -_WRAP_GERROR(FileError, GFileError, G_FILE_ERROR, NO_GTYPE, - s#^EXIST$#EXISTS#, - s#^ISDIR$#IS_DIRECTORY#, - s#^ACCES$#ACCESS_DENIED#, - s#^NAMETOOLONG$#NAME_TOO_LONG#, - s#^NOENT$#NO_SUCH_ENTITY#, - s#^NOTDIR$#NOT_DIRECTORY#, - s#^NXIO$#NO_SUCH_DEVICE#, - s#^NODEV$#NOT_DEVICE#, - s#^ROFS$#READONLY_FILESYSTEM#, - s#^TXTBSY$#TEXT_FILE_BUSY#, - s#^FAULT$#FAULTY_ADDRESS#, - s#^LOOP$#SYMLINK_LOOP#, - s#^NOSPC$#NO_SPACE_LEFT#, - s#^NOMEM$#NOT_ENOUGH_MEMORY#, - s#^MFILE$#TOO_MANY_OPEN_FILES#, - s#^NFILE$#FILE_TABLE_OVERFLOW#, - s#^BADF$#BAD_FILE_DESCRIPTOR#, - s#^INVAL$#INVALID_ARGUMENT#, - s#^PIPE$#BROKEN_PIPE#, - s#^AGAIN$#TRYAGAIN#, - s#^INTR$#INTERRUPTED#, - s#^IO$#IO_ERROR#, - s#^PERM$#NOT_OWNER# -) - -/** @enum FileError::Code - * Values corresponding to errno codes returned from file operations - * on UNIX. - * Unlike errno codes, FileError::Code values are available on all - * systems, even Windows. The exact meaning of each code depends on what sort - * of file operation you were performing; the UNIX documentation gives more - * details. The following error code descriptions come from the GNU C Library - * manual, and are under the copyright of that manual. - * - * It's not very portable to make detailed assumptions about exactly which - * errors will be returned from a given operation. Some errors don't occur on - * some systems, etc., sometimes there are subtle differences in when a system - * will report a given error, etc. - */ - -/** @var FileError::Code FileError::EXISTS - * (EEXIST) Operation not permitted; only the owner of the file (or - * other resource) or processes with special privileges can perform the operation. - *

- */ -/** @var FileError::Code FileError::IS_DIRECTORY - * (EISDIR) File is a directory; you cannot open a directory for writing, - * or create or remove hard links to it. - *

- */ -/** @var FileError::Code FileError::ACCESS_DENIED - * (EACCES) Permission denied; the file permissions do not allow the - * attempted operation. - *

- */ -/** @var FileError::Code FileError::NAME_TOO_LONG - * (ENAMETOOLONG) Filename too long. - *

- */ -/** @var FileError::Code FileError::NO_SUCH_ENTITY - * (ENOENT) No such file or directory. This is a "file doesn't exist" - * error for ordinary files that are referenced in contexts where they are expected - * to already exist. - *

- */ -/** @var FileError::Code FileError::NOT_DIRECTORY - * (ENOTDIR) A file that isn't a directory was specified when a directory - * is required. - *

- */ -/** @var FileError::Code FileError::NO_SUCH_DEVICE - * (ENXIO) No such device or address. The system tried to use the device - * represented by a file you specified, and it couldn't find the device. This can - * mean that the device file was installed incorrectly, or that the physical device - * is missing or not correctly attached to the computer. - *

- */ -/** @var FileError::Code FileError::NOT_DEVICE - * (ENODEV) This file is of a type that doesn't support mapping. - *

- */ -/** @var FileError::Code FileError::READONLY_FILESYSTEM - * (EROFS) The directory containing the new link can't be modified - * because it's on a read-only file system. - *

- */ -/** @var FileError::Code FileError::TEXT_FILE_BUSY - * (ETXTBSY) Text file busy. - *

- */ -/** @var FileError::Code FileError::FAULTY_ADDRESS - * (EFAULT) You passed in a pointer to bad memory. (Glib won't - * reliably return this, don't pass in pointers to bad memory.) - *

- */ -/** @var FileError::Code FileError::SYMLINK_LOOP - * (ELOOP) Too many levels of symbolic links were encountered in - * looking up a file name. This often indicates a cycle of symbolic links. - *

- */ -/** @var FileError::Code FileError::NO_SPACE_LEFT - * (ENOSPC) No space left on device; write operation on a file failed - * because the disk is full. - *

- */ -/** @var FileError::Code FileError::NOT_ENOUGH_MEMORY - * (ENOMEM) No memory available. The system cannot allocate more - * virtual memory because its capacity is full. - *

- */ -/** @var FileError::Code FileError::TOO_MANY_OPEN_FILES - * (EMFILE) The current process has too many files open and can't - * open any more. Duplicate descriptors do count toward this limit. - *

- */ -/** @var FileError::Code FileError::FILE_TABLE_OVERFLOW - * (ENFILE) There are too many distinct file openings in the - * entire system. - *

- */ -/** @var FileError::Code FileError::BAD_FILE_DESCRIPTOR - * (EBADF) Bad file descriptor; for example, I/O on a descriptor - * that has been closed or reading from a descriptor open only for writing - * (or vice versa). - *

- */ -/** @var FileError::Code FileError::INVALID_ARGUMENT - * (EINVAL) Invalid argument. This is used to indicate various kinds - * of problems with passing the wrong argument to a library function. - *

- */ -/** @var FileError::Code FileError::BROKEN_PIPE - * (EPIPE) Broken pipe; there is no process reading from the other - * end of a pipe. Every library function that returns this error code also - * generates a SIGPIPE signal; this signal terminates the program - * if not handled or blocked. Thus, your program will never actually see - * this code unless it has handled or blocked SIGPIPE. - *

- */ -/** @var FileError::Code FileError::TRYAGAIN - * (EAGAIN) Resource temporarily unavailable; the call might work - * if you try again later. - * We used TRYAGAIN instead of TRY_AGAIN, because that is a defined as a macro by a Unix header. - *

- */ -/** @var FileError::Code FileError::INTERRUPTED - * (EINTR) Interrupted function call; an asynchronous signal occurred - * and prevented completion of the call. When this happens, you should try - * the call again. - *

- */ -/** @var FileError::Code FileError::IO_ERROR - * (EIO) Input/output error; usually used for physical read or write - * errors. I.e. the disk or other physical device hardware is returning errors. - *

- */ -/** @var FileError::Code FileError::NOT_OWNER - * (EPERM) Operation not permitted; only the owner of the file (or other - * resource) or processes with special privileges can perform the operation. - *

- */ -/** @var FileError::Code FileError::FAILED - * Does not correspond to a UNIX error code; this is the standard "failed for - * unspecified reason" error code present in all Glib::Error error code - * enumerations. Returned if no specific code applies. - */ - -class Dir; - -/** The iterator type of Glib::Dir. - * @ingroup FileUtils - */ -class DirIterator -{ -public: - typedef std::input_iterator_tag iterator_category; - typedef std::string value_type; - typedef int difference_type; - typedef value_type reference; - typedef void pointer; - - DirIterator(); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - DirIterator(GDir* gobject, const char* current); -#endif - - std::string operator*() const; - DirIterator& operator++(); - - /** @note DirIterator has input iterator semantics, which means real - * postfix increment is impossible. The return type is @c void to - * prevent surprising behaviour. - */ - void operator++(int); - - bool operator==(const DirIterator& rhs) const; - bool operator!=(const DirIterator& rhs) const; - -private: - GDir* gobject_; - const char* current_; -}; - - -/** Utility class representing an open directory. - * @ingroup FileUtils - * It's highly recommended to use the iterator interface. With iterators, - * reading an entire directory into a STL container is really easy: - * @code - * Glib::Dir dir (directory_path); - * std::list entries (dir.begin(), dir.end()); - * @endcode - * @note The encoding of the directory entries isn't necessarily UTF-8. - * Use Glib::filename_to_utf8() if you need to display them. - */ -class Dir -{ -public: - typedef DirIterator iterator; - typedef DirIterator const_iterator; - - /** Opens a directory for reading. The names of the files in the - * directory can then be retrieved using read_name(). - * @param path The path to the directory you are interested in. - * @throw Glib::FileError - */ - explicit Dir(const std::string& path); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - explicit Dir(GDir* gobject); -#endif - - /** Closes the directory and deallocates all related resources. - */ - ~Dir(); - - /** Retrieves the name of the next entry in the directory. - * The '.' and '..' entries are omitted. - * @return The entry's name or "" if there are no more entries. - * @see begin(), end() - */ - std::string read_name(); - - /** Resets the directory. The next call to - * read_name() will return the first entry again. - */ - void rewind(); - - /** Closes the directory and deallocates all related resources. - * Note that close() is implicitely called by ~Dir(). Thus you don't - * need to call close() yourself unless you want to close the directory - * before the destructor runs. - */ - void close(); - - /** Get the begin of an input iterator sequence. - * @return An input iterator pointing to the first directory entry. - */ - DirIterator begin(); - - /** Get the end of an input iterator sequence. - * @return An input iterator pointing behind the last directory entry. - */ - DirIterator end(); - -private: - GDir* gobject_; - - // noncopyable - Dir(const Dir&); - Dir& operator=(const Dir&); -}; - - -/** Returns @c true if any of the tests in the bitfield @a test are true. - * @ingroup FileUtils - * For example, (Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_DIR) will - * return @c true if the file exists; the check whether it's a directory - * doesn't matter since the existence test is true. With the current set of - * available tests, there's no point passing in more than one test at a time. - * - * Apart from Glib::FILE_TEST_IS_SYMLINK all tests follow symbolic - * links, so for a symbolic link to a regular file file_test() will return - * @c true for both Glib::FILE_TEST_IS_SYMLINK and - * Glib::FILE_TEST_IS_REGULAR. - * - * @note For a dangling symbolic link file_test() will return @c true for - * Glib::FILE_TEST_IS_SYMLINK and @c false for all other flags. - * - * @param filename A filename to test. - * @param test Bitfield of Glib::FileTest flags. - * @return Whether a test was true. - */ -bool file_test(const std::string& filename, FileTest test); - -/** Opens a temporary file. - * @ingroup FileUtils - * See the %mkstemp() documentation on most UNIX-like systems. This is a - * portability wrapper, which simply calls %mkstemp() on systems that have - * it, and implements it in GLib otherwise. - * @param filename_template A string that should match the rules for - * %mkstemp(), i.e. end in "XXXXXX". The X string - * will be modified to form the name of a file that didn't exist. - * @return A file handle (as from open()) to the file opened for reading - * and writing. The file is opened in binary mode on platforms where there - * is a difference. The file handle should be closed with close(). In - * case of errors, -1 is returned. - */ -int mkstemp(std::string& filename_template); - -/** Opens a file for writing in the preferred directory for temporary files - * (as returned by Glib::get_tmp_dir()). - * @ingroup FileUtils - * @a prefix should a basename template; it'll be suffixed by 6 characters - * in order to form a unique filename. No directory components are allowed. - * - * The actual name used is returned in @a name_used. - * - * @param prefix Template for file name, basename only. - * @retval name_used The actual name used. - * @return A file handle (as from open()) to the file opened for reading - * and writing. The file is opened in binary mode on platforms where there is a - * difference. The file handle should be closed with close(). - * @throw Glib::FileError - */ -int file_open_tmp(std::string& name_used, const std::string& prefix); - -/** Opens a file for writing in the preferred directory for temporary files - * (as returned by Glib::get_tmp_dir()). - * @ingroup FileUtils - * This function works like file_open_tmp(std::string&, const std::string&) - * but uses a default basename prefix. - * - * @retval name_used The actual name used. - * @return A file handle (as from open()) to the file opened for reading - * and writing. The file is opened in binary mode on platforms where there is a - * difference. The file handle should be closed with close(). - * @throw Glib::FileError - */ -int file_open_tmp(std::string& name_used); - -/** Reads an entire file into a string, with good error checking. - * @ingroup FileUtils - * @param filename A file to read contents from. - * @return The file contents. - * @throw Glib::FileError - */ -std::string file_get_contents(const std::string& filename); - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/glib.defs b/libs/glibmm2/glib/src/glib.defs deleted file mode 100644 index ce4f36d9d3..0000000000 --- a/libs/glibmm2/glib/src/glib.defs +++ /dev/null @@ -1,5 +0,0 @@ -(include glib_functions.defs) -(include glib_enums.defs) -(include gobject_functions.defs) -(include gmodule_functions.defs) -(include gmodule_enums.defs) diff --git a/libs/glibmm2/glib/src/glib_docs.xml b/libs/glibmm2/glib/src/glib_docs.xml deleted file mode 100644 index e013376865..0000000000 --- a/libs/glibmm2/glib/src/glib_docs.xml +++ /dev/null @@ -1,18080 +0,0 @@ - - - -Converts a string to a hash value. -It can be passed to g_hash_table_new() as the @hash_func -parameter, when using strings as keys in a #GHashTable. - - - - - - a string key - - - - a hash value corresponding to the key - - - - - -A case-insensitive string comparison, corresponding to the standard -strcasecmp() function on platforms which support it. - - - - - - a string. - - - - a string to compare with @s1. - - - - 0 if the strings match, a negative value if @s1 &lt; @s2, -or a positive value if @s1 &gt; @s2. - -Deprecated:2.2: See g_strncasecmp() for a discussion of why this function -is deprecated and how to replace it. - - - - - -Removes a source from its #GMainContext, if any, and mark it as -destroyed. The source cannot be subsequently added to another -context. - - - - - a #GSource - - - - - - - - -Determines whether a character is numeric (i.e. a digit). This -covers ASCII 0-9 and also digits in other languages/scripts. Given -some UTF-8 text, obtain a character value with g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is a digit - - - - - -Unquotes a string as the shell (/bin/sh) would. Only handles -quotes; if a string contains file globs, arithmetic operators, -variables, backticks, redirections, or other special-to-the-shell -features, the result will be different from the result a real shell -would produce (the variables, backticks, etc. will be passed -through literally instead of being expanded). This function is -guaranteed to succeed if applied to the result of -g_shell_quote(). If it fails, it returns %NULL and sets the -error. The @quoted_string need not actually contain quoted or -escaped text; g_shell_unquote() simply goes through the string and -unquotes/unescapes anything that the shell would. Both single and -double quotes are handled, as are escapes including escaped -newlines. The return value must be freed with g_free(). Possible -errors are in the #G_SHELL_ERROR domain. - -Shell quoting rules are a bit strange. Single quotes preserve the -literal string exactly. escape sequences are not allowed; not even -\' - if you want a ' in the quoted text, you have to do something -like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to -be escaped with backslash. Otherwise double quotes preserve things -literally. - - - - - - shell-quoted string - - - - error return location or NULL - - - - an unquoted string - - - - - -Behaves exactly like g_build_path(), but takes the path elements -as a string array, instead of varargs. This function is mainly -meant for language bindings. - - - - - - a string used to separator the elements of the path. - - - - %NULL-terminated array of strings containing the path elements. - - - - a newly-allocated string that must be freed with g_free(). - -Since: 2.8 - - - - - -If @dest is %NULL, free @src; otherwise, -moves @src into *@dest. *@dest must be %NULL. - - - - - error return location - - - - error to move into the return location - - - - - - - - -Return value: the number of threads currently running - - - - - a #GThreadPool - - - - the number of threads currently running - - - - - -Retrieves the names of the applications that have registered the -bookmark for @uri. - -In the event the URI cannot be found, %NULL is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location of the length of the returned list, or %NULL - - - - return location for a #GError, or %NULL - - - - a newly allocated %NULL-terminated array of strings. -Use g_strfreev() to free it. - -Since: 2.12 - - - - - -Close an IO channel. Any pending data to be written will be -flushed, ignoring errors. The channel will not be freed until the -last reference is dropped using g_io_channel_unref(). - -Deprecated:2.2: Use g_io_channel_shutdown() instead. - - - - - A #GIOChannel - - - - - - - - -Compares two strings for equality, returning %TRUE if they are equal. -For use with #GHashTable. - - - - - - a #GString - - - - another #GString - - - - %TRUE if they strings are the same length and contain the -same bytes - - - - - -Gets whether the private flag of the bookmark for @uri is set. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the -event that the private flag cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - %TRUE if the private flag is set, %FALSE otherwise. - -Since: 2.12 - - - - - -Return value: The currently firing source or %NULL. - - - - - The currently firing source or %NULL. - -Since: 2.12 - - - - - -Returns: a canonical representation for the string - - - - - a string - - - - a canonical representation for the string - -Since: 2.10 - - - - - -Associates a list of double values with @key under -@group_name. If @key cannot be found then it is created. -If @group_name is %NULL the start group is used. - -Since: 2.12 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an array of double values - - - - number of double values in @list - - - - - - - - -Return value: the position of @iter - - - - - a #GSequenceIter - - - - the position of @iter - -Since: 2.14 - - - - - -Creates a new #GSource structure. The size is specified to -allow creating structures derived from #GSource that contain -additional data. The size passed in must be at least -&lt;literal&gt;sizeof (GSource)&lt;/literal&gt;. - -The source will not initially be associated with any #GMainContext -and must be added to one with g_source_attach() before it will be -executed. - - - - - - structure containing functions that implement -the sources behavior. - - - - size of the #GSource structure to create. - - - - the newly-created #GSource. - - - - - -Sets the encoding for the input/output of the channel. The internal -encoding is always UTF-8. The default encoding for the -external file is UTF-8. - -The encoding %NULL is safe to use with binary data. - -The encoding can only be set if one of the following conditions -is true: - -1. The channel was just created, and has not been written to -or read from yet. - -2. The channel is write-only. - -3. The channel is a file, and the file pointer was just -repositioned by a call to g_io_channel_seek_position(). -(This flushes all the internal buffers.) - -4. The current encoding is %NULL or UTF-8. - -5. One of the (new API) read functions has just returned %G_IO_STATUS_EOF -(or, in the case of g_io_channel_read_to_end (), %G_IO_STATUS_NORMAL). - -6. One of the functions g_io_channel_read_chars () or g_io_channel_read_unichar () -has returned %G_IO_STATUS_AGAIN or %G_IO_STATUS_ERROR. This may be -useful in the case of %G_CONVERT_ERROR_ILLEGAL_SEQUENCE. -Returning one of these statuses from g_io_channel_read_line (), -g_io_channel_read_line_string (), or g_io_channel_read_to_end () -does &lt;emphasis&gt;not&lt;/emphasis&gt; guarantee that the encoding can be changed. - -Channels which do not meet one of the above conditions cannot call -g_io_channel_seek_position () with an offset of %G_SEEK_CUR, -and, if they are "seekable", cannot -call g_io_channel_write_chars () after calling one -of the API "read" functions. - - - - - - a #GIOChannel - - - - the encoding type - - - - location to store an error of type #GConvertError. - - - - %G_IO_STATUS_NORMAL if the encoding was successfully set. - - - - - -Frees a #GMarkupParseContext. Can't be called from inside -one of the #GMarkupParser functions. - - - - - - a #GMarkupParseContext - - - - - - - - -Creates a new #GStringChunk. - - - - - - the default size of the blocks of memory which are -allocated to store the strings. If a particular string -is larger than this default size, a larger block of -memory will be allocated for it. - - - - a new #GStringChunk - - - - - -Converts a string into canonical form, standardizing -such issues as whether a character with an accent -is represented as a base character and combining -accent or as a single precomposed character. You -should generally call g_utf8_normalize() before -comparing two Unicode strings. - -The normalization mode %G_NORMALIZE_DEFAULT only -standardizes differences that do not affect the -text content, such as the above-mentioned accent -representation. %G_NORMALIZE_ALL also standardizes -the "compatibility" characters in Unicode, such -as SUPERSCRIPT THREE to the standard forms -(in this case DIGIT THREE). Formatting information -may be lost but for most text operations such -characters should be considered the same. -For example, g_utf8_collate() normalizes -with %G_NORMALIZE_ALL as its first step. - -%G_NORMALIZE_DEFAULT_COMPOSE and %G_NORMALIZE_ALL_COMPOSE -are like %G_NORMALIZE_DEFAULT and %G_NORMALIZE_ALL, -but returned a result with composed forms rather -than a maximally decomposed form. This is often -useful if you intend to convert the string to -a legacy encoding or pass it to a system with -less capable Unicode handling. - - - - - - a UTF-8 encoded string. - - - - length of @str, in bytes, or -1 if @str is nul-terminated. - - - - the type of normalization to perform. - - - - a newly allocated string, that is the -normalized form of @str. - - - - - -Scans for the next match using the same parameters of the previous -call to g_regex_match_full() or g_regex_match() that returned -@match_info. - -The match is done on the string passed to the match function, so you -cannot free it before calling this function. - - - - - - a #GMatchInfo structure - - - - location to store the error occuring, or %NULL to ignore errors - - - - %TRUE is the string matched, %FALSE otherwise - -Since: 2.14 - - - - - -This is just like the standard C qsort() function, but -the comparison routine accepts a user data argument. - - - - - - start of array to sort - - - - elements in the array - - - - size of each element - - - - function to compare elements - - - - data to pass to @compare_func - - - - - - - - -Retrieves the name of the next entry in the directory. The '.' and -'..' entries are omitted. On Windows, the returned name is in -UTF-8. On Unix, it is in the on-disk encoding. - - - - - - a #GDir* created by g_dir_open() - - - - The entry's name or %NULL if there are no -more entries. The return value is owned by GLib and -must not be modified or freed. - - - - - -If @context is currently waiting in a poll(), interrupt -the poll(), and continue the iteration process. - - - - - a #GMainContext - - - - - - - - -Gets a human-readable name for the application, as set by -g_set_application_name(). This name should be localized if -possible, and is intended for display to the user. Contrast with -g_get_prgname(), which gets a non-localized name. If -g_set_application_name() has not been called, returns the result of -g_get_prgname() (which may be %NULL if g_set_prgname() has also not -been called). - - - - - - human-readable application name. may return %NULL - -Since: 2.2 - - - - - -Gets the directory to use for temporary files. This is found from -inspecting the environment variables &lt;envar&gt;TMPDIR&lt;/envar&gt;, -&lt;envar&gt;TMP&lt;/envar&gt;, and &lt;envar&gt;TEMP&lt;/envar&gt; in that order. If none -of those are defined "/tmp" is returned on UNIX and "C:\" on Windows. -The encoding of the returned string is system-defined. On Windows, -it is always UTF-8. The return value is never %NULL. - - - - - - the directory to use for temporary files. - - - - - -A safer form of the standard sprintf() function. The output is guaranteed -to not exceed @n characters (including the terminating nul character), so -it is easy to ensure that a buffer overflow cannot occur. - -See also g_strdup_printf(). - -In versions of GLib prior to 1.2.3, this function may return -1 if the -output was truncated, and the truncated string may not be nul-terminated. -In versions prior to 1.3.12, this function returns the length of the output -string. - -The return value of g_snprintf() conforms to the snprintf() -function as standardized in ISO C99. Note that this is different from -traditional snprintf(), which returns the length of the output string. - -The format string may contain positional parameters, as specified in -the Single Unix Specification. - - - - - - the buffer to hold the output. - - - - the maximum number of characters to produce (including the -terminating nul character). - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the arguments to insert in the output. - - - - the number of characters which would be produced if the buffer -was large enough. - - - - - -Retrieves the text matching the @match_num&lt;!-- --&gt;'th capturing -parentheses. 0 is the full text of the match, 1 is the first paren -set, 2 the second, and so on. - -If @match_num is a valid sub pattern but it didn't match anything -(e.g. sub pattern 1, matching "b" against "(a)?b") then an empty -string is returned. - -If the match was obtained using the DFA algorithm, that is using -g_regex_match_all() or g_regex_match_all_full(), the retrieved -string is not that of a set of parentheses but that of a matched -substring. Substrings are matched in reverse order of length, so -0 is the longest match. - -The string is fetched from the string passed to the match function, -so you cannot call this function after freeing the string. - - - - - - #GMatchInfo structure - - - - number of the sub expression - - - - The matched substring, or %NULL if an error occurred. -You have to free the string yourself - -Since: 2.14 - - - - - -Increases the reference count on a #GMainContext object by one. - - - - - - a #GMainContext - - - - the @context that was passed in (since 2.6) - - - - - -Sets a human-readable name for the application. This name should be -localized if possible, and is intended for display to the user. -Contrast with g_set_prgname(), which sets a non-localized name. -g_set_prgname() will be called automatically by gtk_init(), -but g_set_application_name() will not. - -Note that for thread safety reasons, this function can only -be called once. - -The application name will be used in contexts such as error messages, -or when displaying an application's name in the task list. - - - - - - localized name of the application - - - - - - - - -Tries to become the owner of the specified context. -If some other context is the owner of the context, -Return value: %TRUE if the operation succeeded, and - - - - - a #GMainContext - - - - %TRUE if the operation succeeded, and -this thread is now the owner of @context. - - - - - -Returns: the string searched with @match_info - - - - - a #GMatchInfo - - - - the string searched with @match_info - -Since: 2.14 - - - - - -Writes all of @contents to a file named @filename, with good error checking. -If a file called @filename already exists it will be overwritten. - -This write is atomic in the sense that it is first written to a temporary -file which is then renamed to the final name. Notes: -&lt;itemizedlist&gt; -&lt;listitem&gt; -On Unix, if @filename already exists hard links to @filename will break. -Also since the file is recreated, existing permissions, access control -lists, metadata etc. may be lost. If @filename is a symbolic link, -the link itself will be replaced, not the linked file. -&lt;/listitem&gt; -&lt;listitem&gt; -On Windows renaming a file will not remove an existing file with the -new name, so on Windows there is a race condition between the existing -file being removed and the temporary file being renamed. -&lt;/listitem&gt; -&lt;listitem&gt; -On Windows there is no way to remove a file that is open to some -process, or mapped into memory. Thus, this function will fail if -@filename already exists and is open. -&lt;/listitem&gt; -&lt;/itemizedlist&gt; - -If the call was sucessful, it returns %TRUE. If the call was not successful, -it returns %FALSE and sets @error. The error domain is #G_FILE_ERROR. -Possible error codes are those in the #GFileError enumeration. - - - - - - name of a file to write @contents to, in the GLib file name -encoding - - - - string to write to the file - - - - length of @contents, or -1 if @contents is a nul-terminated string - - - - return location for a #GError, or %NULL - - - - %TRUE on success, %FALSE if an error occurred - -Since: 2.8 - - - - - -Adds a function to be called whenever there are no higher priority -events pending. If the function returns %FALSE it is automatically -removed from the list of event sources and will not be called again. - - - - - - the priority of the idle source. Typically this will be in the -range btweeen #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. - - - - function to call - - - - data to pass to @function - - - - function to call when the idle is removed, or %NULL - - - - the ID (greater than 0) of the event source. - - - - - -Resets the given directory. The next call to g_dir_read_name() -will return the first entry again. - - - - - a #GDir* created by g_dir_open() - - - - - - - - -Retrieves every key inside @hash_table. The returned data is valid -until @hash_table is modified. - - - - - - a #GHashTable - - - - a #GList containing all the keys inside the hash -table. The content of the list is owned by the hash table and -should not be modified or freed. Use g_list_free() when done -using the list. - -Since: 2.14 - - - - - -Return value: a %NULL-terminated array of strings owned by GLib that must - - - - - a %NULL-terminated array of strings owned by GLib that must -not be modified or freed. -Since: 2.6 - - - - - -Removes the @n'th element of @queue. - - - - - - a #GQueue - - - - the position of the element. - - - - the element's data, or %NULL if @n is off the end of @queue. - -Since: 2.4 - - - - - -Looks whether the key file has the key @key in the group -@group_name. - - - - - - a #GKeyFile - - - - a group name - - - - a key name - - - - return location for a #GError - - - - %TRUE if @key is a part of @group_name, %FALSE -otherwise. - -Since: 2.6 - - - - - -Replacement for g_io_channel_read() with the new API. - - - - - - a #GIOChannel - - - - a buffer to read data into - - - - the size of the buffer. Note that the buffer may -not be complelely filled even if there is data -in the buffer if the remaining data is not a -complete character. - - - - The number of bytes read. This may be zero even on -success if count &lt; 6 and the channel's encoding is non-%NULL. -This indicates that the next UTF-8 character is too wide for -the buffer. - - - - A location to return an error of type #GConvertError -or #GIOChannelError. - - - - the status of the operation. - - - - - -Associates a list of boolean values with @key under -@group_name. If @key cannot be found then it is created. -If @group_name is %NULL, the start_group is used. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an array of boolean values - - - - length of @list - - - - - - - - -Return value: A random number. - - - - - a #GRand. - - - - A random number. - - - - - -Feed some data to the #GMarkupParseContext. The data need not -be valid UTF-8; an error will be signaled if it's invalid. -The data need not be an entire document; you can feed a document -into the parser incrementally, via multiple calls to this function. -Typically, as you receive data from a network connection or file, -you feed each received chunk of data into this function, aborting -the process if an error occurs. Once an error is reported, no further -data may be fed to the #GMarkupParseContext; all errors are fatal. - - - - - - a #GMarkupParseContext - - - - chunk of text to parse - - - - length of @text in bytes - - - - return location for a #GError - - - - %FALSE if an error occurred, %TRUE on success - - - - - -Recursively copies a #GNode and its data. - - - - - - a #GNode - - - - the function which is called to copy the data inside each node, -or %NULL to use the original data. - - - - data to pass to @copy_func - - - - a new #GNode containing copies of the data in @node. - -Since: 2.4 - - - - - -Runs a single iteration for the given main loop. This involves -checking to see if any event sources are ready to be processed, -then if no events sources are ready and @may_block is %TRUE, waiting -for a source to become ready, then dispatching the highest priority -events sources that are ready. Note that even when @may_block is %TRUE, -it is still possible for g_main_context_iteration() to return -%FALSE, since the the wait may be interrupted for other -reasons than an event source becoming ready. - - - - - - a #GMainContext (if %NULL, the default context will be used) - - - - whether the call may block. - - - - %TRUE if events were dispatched. - - - - - -Reads the contents of the symbolic link @filename like the POSIX -readlink() function. The returned string is in the encoding used -for filenames. Use g_filename_to_utf8() to convert it to UTF-8. - - - - - - the symbolic link - - - - return location for a #GError - - - - A newly allocated string with the contents of the symbolic link, -or %NULL if an error occurred. - -Since: 2.4 - - - - - -Converts a character to the titlecase. - - - - - - a Unicode character - - - - the result of converting @c to titlecase. -If @c is not an uppercase or lowercase character, -@c is returned unchanged. - - - - - -Creates a new GSequence. The @data_destroy function, if non-%NULL will -be called on all items when the sequence is destroyed and on items that -are removed from the sequence. - - - - - - a #GDestroyNotify function, or %NULL - - - - a new #GSequence - -Since: 2.14 - - - - - -Decreases the reference count on a #GMainLoop object by one. If -the result is zero, free the loop and free all associated memory. - - - - - a #GMainLoop - - - - - - - - -Return value: the values associated with the key as a list of - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - the number of integers returned - - - - return location for a #GError - - - - the values associated with the key as a list of -integers, or %NULL if the key was not found or could not be parsed. - -Since: 2.6 - - - - - -Gets a #GFileError constant based on the passed-in @errno. -For example, if you pass in %EEXIST this function returns -#G_FILE_ERROR_EXIST. Unlike @errno values, you can portably -assume that all #GFileError values will exist. - -Normally a #GFileError value goes into a #GError returned -from a function that manipulates files. So you would use -g_file_error_from_errno() when constructing a #GError. - - - - - - an "errno" value - - - - #GFileError corresponding to the given @errno - - - - - -Finds a source with the given source functions and user data. If -multiple sources exist with the same source function and user data, -the first one found will be returned. - - - - - - a #GMainContext (if %NULL, the default context will be used). - - - - the @source_funcs passed to g_source_new(). - - - - the user data from the callback. - - - - the source, if one was found, otherwise %NULL - - - - - -This function looks for a desktop bookmark file named @file in the -paths returned from g_get_user_data_dir() and g_get_system_data_dirs(), -loads the file into @bookmark and returns the file's full path in -@full_path. If the file could not be loaded then an %error is -set to either a #GFileError or #GBookmarkFileError. - - - - - - a #GBookmarkFile - - - - a relative path to a filename to open and parse - - - - return location for a string containing the full path -of the file, or %NULL - - - - return location for a #GError, or %NULL - - - - %TRUE if a key file could be loaded, %FALSE othewise - -Since: 2.12 - - - - - -Incrementally decode a sequence of binary data from its Base-64 stringified -representation. By calling this function multiple times you can convert -data in chunks to avoid having to have the full encoded data in memory. - -The output buffer must be large enough to fit all the data that will -be written to it. Since base64 encodes 3 bytes in 4 chars you need -at least: @len * 3 / 4 bytes. - - - - - - binary input data - - - - max length of @in data to decode - - - - output buffer - - - - Saved state between steps, initialize to 0 - - - - Saved state between steps, initialize to 0 - - - - The number of bytes of output that was written - -Since: 2.12 - - - - - -Converts a string from one character set to another. - -Note that you should use g_iconv() for streaming -conversions&lt;footnoteref linkend="streaming-state"/&gt;. - - - - - - the string to convert - - - - the length of the string, or -1 if the string is -nul-terminated&lt;footnote id="nul-unsafe"&gt; - &lt;para&gt; - Note that some encodings may allow nul bytes to - occur inside strings. In that case, using -1 for - the @len parameter is unsafe. - &lt;/para&gt; - &lt;/footnote&gt;. - - - - name of character set into which to convert @str - - - - character set of @str. - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. If the error -#G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - If the conversion was successful, a newly allocated -nul-terminated string, which must be freed with -g_free(). Otherwise %NULL and @error will be set. - - - - - -Finds an iterator somewhere in the range (@begin, @end). This -iterator will be close to the middle of the range, but is not -guaranteed to be &lt;emphasis&gt;exactly&lt;/emphasis&gt; in the middle. - -The @begin and @end iterators must both point to the same sequence and -@begin must come before or be equal to @end in the sequence. - - - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - A #GSequenceIter pointing somewhere in the -(@begin, @end) range. - -Since: 2.14 - - - - - -Adds a file descriptor to the set of file descriptors polled for -this context. This will very seldomly be used directly. Instead -a typical event source will use g_source_add_poll() instead. - - - - - a #GMainContext (or %NULL for the default context) - - - - a #GPollFD structure holding information about a file -descriptor to watch. - - - - the priority for this file descriptor which should be -the same as the priority used for g_source_attach() to ensure that the -file descriptor is polled whenever the results may be needed. - - - - - - - - -A convenience function to use gettext() for translating -user-visible strings. - -Since: 2.6 - - - - - a #GOptionGroup - - - - the domain to use - - - - - - - - -Return value: the main group of @context, or %NULL if @context doesn't - - - - - a #GOptionContext - - - - the main group of @context, or %NULL if @context doesn't -have a main group. Note that group belongs to @context and should -not be modified or freed. - -Since: 2.6 - - - - - -Computes the canonical ordering of a string in-place. -This rearranges decomposed characters in the string -according to their combining classes. See the Unicode -manual for more information. - - - - - a UCS-4 encoded string. - - - - the maximum length of @string to use. - - - - - - - - -Converts all upper case ASCII letters to lower case ASCII letters. - - - - - - a string. - - - - length of @str in bytes, or -1 if @str is nul-terminated. - - - - a newly-allocated string, with all the upper case -characters in @str converted to lower case, with -semantics that exactly match g_ascii_tolower(). (Note -that this is unlike the old g_strdown(), which modified -the string in place.) - - - - - -Retrieves the list of group names of the bookmark for @uri. - -In the event the URI cannot be found, %NULL is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - -The returned array is %NULL terminated, so @length may optionally -be %NULL. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for the length of the returned string, or %NULL - - - - return location for a #GError, or %NULL - - - - a newly allocated %NULL-terminated array of group names. -Use g_strfreev() to free it. - -Since: 2.12 - - - - - -A wrapper for the POSIX freopen() function. The freopen() function -opens a file and associates it with an existing stream. - -See the C library manual for more details about freopen(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - a string describing the mode in which the file should be -opened - - - - an existing stream which will be reused, or %NULL - - - - A &lt;type&gt;FILE&lt;/type&gt; pointer if the file was successfully -opened, or %NULL if an error occurred. - -Since: 2.6 - - - - - -Calls @func for each element in the queue passing @user_data to the -function. - -Since: 2.4 - - - - - a #GQueue - - - - the function to call for each element's data - - - - user data to pass to @func - - - - - - - - -Removes the first element in @queue that contains @data. - -Since: 2.4 - - - - - a #GQueue - - - - data to remove. - - - - - - - - -Compares two strings for byte-by-byte equality and returns %TRUE -if they are equal. It can be passed to g_hash_table_new() as the -@key_equal_func parameter, when using strings as keys in a #GHashTable. - - - - - - a key - - - - a key to compare with @v1 - - - - %TRUE if the two keys match - - - - - -Return value: The start group of the key file. - - - - - a #GKeyFile - - - - The start group of the key file. - -Since: 2.6 - - - - - -Gets the value corresponding to the given key. Since a #GTree is -automatically balanced as key/value pairs are added, key lookup is very -fast. - - - - - - a #GTree. - - - - the key to look up. - - - - the value corresponding to the key, or %NULL if the key was -not found. - - - - - -Destroys all keys and values in the #GHashTable and decrements its -reference count by 1. If keys and/or values are dynamically allocated, -you should either free them first or create the #GHashTable with destroy -notifiers using g_hash_table_new_full(). In the latter case the destroy -functions you supplied will be called on all keys and values during the -destruction phase. - - - - - a #GHashTable. - - - - - - - - -Return value: the value associated with the key as a double, or - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for a #GError - - - - the value associated with the key as a double, or -0.0 if the key was not found or could not be parsed. - -Since: 2.12 - - - - - -Looks whether the desktop bookmark has an item with its URI set to @uri. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - %TRUE if @uri is inside @bookmark, %FALSE otherwise - -Since: 2.12 - - - - - -This function will return the maximum @interval that a thread will -wait in the thread pool for new tasks before being stopped. - -If this function returns 0, threads waiting in the thread pool for -new work are not stopped. - - - - - - the maximum @interval to wait for new tasks in the -thread pool before stopping the thread (1/1000ths of a second). - -Since: 2.10 - - - - - -Increases the reference count of the asynchronous @queue by 1. You -do not need to hold the lock to call this function. - - - - - - a #GAsyncQueue. - - - - the @queue that was passed in (since 2.6) - - - - - -Removes @len bytes from a #GString, starting at position @pos. -The rest of the #GString is shifted down to fill the gap. - - - - - - a #GString - - - - the position of the content to remove - - - - the number of bytes to remove, or -1 to remove all -following bytes - - - - @string - - - - - -Return value: a string owned by GLib that must not be modified - - - - - a string owned by GLib that must not be modified -or freed. -Since: 2.6 - - - - - -Compare @s1 and @s2, ignoring the case of ASCII characters and any -characters after the first @n in each string. - -Unlike the BSD strcasecmp() function, this only recognizes standard -ASCII letters and ignores the locale, treating all non-ASCII -characters as if they are not letters. - -The same warning as in g_ascii_strcasecmp() applies: Use this -function only on strings known to be in encodings where bytes -corresponding to ASCII letters always represent themselves. - - - - - - string to compare with @s2. - - - - string to compare with @s1. - - - - number of characters to compare. - - - - 0 if the strings match, a negative value if @s1 &lt; @s2, -or a positive value if @s1 &gt; @s2. - - - - - -Decreases the reference count of a source by one. If the -resulting reference count is zero the source and associated -memory will be destroyed. - - - - - a #GSource - - - - - - - - -Atomically increments the reference count of @hash_table by one. -This function is MT-safe and may be called from any thread. - - - - - - a valid #GHashTable. - - - - the passed in #GHashTable. - -Since: 2.10 - - - - - -Runs a main loop until g_main_loop_quit() is called on the loop. -If this is called for the thread of the loop's #GMainContext, -it will process events from the loop, otherwise it will -simply wait. - - - - - a #GMainLoop - - - - - - - - -Adds a new element at the head of the queue. - - - - - a #GQueue. - - - - a single #GList element, &lt;emphasis&gt;not&lt;/emphasis&gt; a list with -more than one element. - - - - - - - - -Determines if a character is typically rendered in a double-width -cell. - - - - - - a Unicode character - - - - %TRUE if the character is wide - - - - - -Converts a string to lower case. - - - - - - the string to convert. - - - - the string - -Deprecated:2.2: This function is totally broken for the reasons discussed -in the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown() -instead. - - - - - -Finds an element in a #GQueue, using a supplied function to find the -desired element. It iterates over the queue, calling the given function -which should return 0 when the desired element is found. The function -takes two gconstpointer arguments, the #GQueue element's data as the -first argument and the given user data as the second argument. - - - - - - a #GQueue - - - - user data passed to @func - - - - a #GCompareFunc to call for each element. It should return 0 -when the desired element is found - - - - The found link, or %NULL if it wasn't found - -Since: 2.4 - - - - - -Returns: the number of capturing subpatterns - - - - - a #GRegex - - - - the number of capturing subpatterns - -Since: 2.14 - - - - - -Associates a function with @group which will be called -from g_option_context_parse() when an error occurs. - -Note that the user data to be passed to @pre_parse_func and -@post_parse_func can be specified when constructing the group -with g_option_group_new(). - -Since: 2.6 - - - - - a #GOptionGroup - - - - a function to call when an error occurs - - - - - - - - -Checks whether @ch is a valid Unicode character. Some possible -integer values of @ch will not be valid. 0 is considered a valid -character, though it's normally a string terminator. - - - - - - a Unicode character - - - - %TRUE if @ch is a valid Unicode character - - - - - -Frees all resources allocated for @pool. - -If @immediate is %TRUE, no new task is processed for -@pool. Otherwise @pool is not freed before the last task is -processed. Note however, that no thread of this pool is -interrupted, while processing a task. Instead at least all still -running threads can finish their tasks before the @pool is freed. - -If @wait_ is %TRUE, the functions does not return before all tasks -to be processed (dependent on @immediate, whether all or only the -currently running) are ready. Otherwise the function returns immediately. - -After calling this function @pool must not be used anymore. - - - - - a #GThreadPool - - - - should @pool shut down immediately? - - - - should the function wait for all tasks to be finished? - - - - - - - - -Gets the time when the bookmark for @uri was last modified. - -In the event the URI cannot be found, -1 is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - a timestamp - -Since: 2.12 - - - - - -Finds the previous UTF-8 character in the string before @p. - -@p does not have to be at the beginning of a UTF-8 character. No check -is made to see if the character found is actually valid other than -it starts with an appropriate byte. If @p might be the first -character of the string, you must use g_utf8_find_prev_char() instead. - - - - - - a pointer to a position within a UTF-8 encoded string - - - - a pointer to the found character. - - - - - -An implementation of the standard fprintf() function which supports -positional parameters, as specified in the Single Unix Specification. - - - - - - the stream to write to. - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.2 - - - - - -Find the next conversion in a printf-style format string. -Partially based on code from printf-parser.c, -Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc. - - - - - - a printf-style format string - - - - location to store a pointer to the character after -the returned conversion. On a %NULL return, returns the -pointer to the trailing NUL in the string - - - - pointer to the next conversion in @format, -or %NULL, if none. - - - - - -Converts a string from UTF-8 to the encoding GLib uses for -filenames. Note that on Windows GLib uses UTF-8 for filenames; -on other platforms, this function indirectly depends on the -&lt;link linkend="setlocale"&gt;current locale&lt;/link&gt;. - - - - - - a UTF-8 encoded string. - - - - the length of the string, or -1 if the string is -nul-terminated. - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. If the error -#G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - The converted string, or %NULL on an error. - - - - - -Return a name for the machine. - -The returned name is not necessarily a fully-qualified domain name, -or even present in DNS or some other name service at all. It need -not even be unique on your local network or site, but usually it -is. Callers should not rely on the return value having any specific -properties like uniqueness for security purposes. Even if the name -of the machine is changed while an application is running, the -return value from this function does not change. The returned -string is owned by GLib and should not be modified or freed. If no -name can be determined, a default fixed string "localhost" is -returned. - - - - - - the host name of the machine. - -Since: 2.8 - - - - - -A simple version of g_spawn_async() that parses a command line with -g_shell_parse_argv() and passes it to g_spawn_async(). Runs a -command line in the background. Unlike g_spawn_async(), the -%G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note -that %G_SPAWN_SEARCH_PATH can have security implications, so -consider using g_spawn_async() directly if appropriate. Possible -errors are those from g_shell_parse_argv() and g_spawn_async(). - -The same concerns on Windows apply as for g_spawn_command_line_sync(). - - - - - - a command line - - - - return location for errors - - - - %TRUE on success, %FALSE if error is set. - - - - - -Looks up a key in a #GHashTable. Note that this function cannot -distinguish between a key that is not present and one which is present -and has the value %NULL. If you need this distinction, use -g_hash_table_lookup_extended(). - - - - - - a #GHashTable. - - - - the key to look up. - - - - the associated value, or %NULL if the key is not found. - - - - - -Return value: A random number. - - - - - lower closed bound of the interval. - - - - upper open bound of the interval. - - - - A random number. - - - - - -Adds the given number of microseconds to @time_. @microseconds can -also be negative to decrease the value of @time_. - - - - - a #GTimeVal - - - - number of microseconds to add to @time - - - - - - - - -Associates a new double value with @key under @group_name. -If @key cannot be found then it is created. If @group_name -is %NULL, the start group is used. - -Since: 2.12 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an double value - - - - - - - - -Encode a sequence of binary data into its Base-64 stringified -representation. - - - - - - the binary data to encode - - - - the length of @data - - - - a newly allocated, zero-terminated Base-64 encoded -string representing @data. - -Since: 2.12 - - - - - -Create a directory if it doesn't already exist. Create intermediate -parent directories as needed, too. - - - - - - a pathname in the GLib file name encoding - - - - permissions to use for newly created directories - - - - 0 if the directory already exists, or was successfully -created. Returns -1 if an error occurred, with errno set. - -Since: 2.8 - - - - - -Creates a new option context. - -The @parameter_string can serve multiple purposes. It can be used -to add descriptions for "rest" arguments, which are not parsed by -the #GOptionContext, typically something like "FILES" or -"FILE1 FILE2...". If you are using #G_OPTION_REMAINING for -collecting "rest" arguments, GLib handles this automatically by -using the @arg_description of the corresponding #GOptionEntry in -the usage summary. - -Another usage is to give a short summary of the program -functionality, like " - frob the strings", which will be displayed -in the same line as the usage. For a longer description of the -program functionality that should be displayed as a paragraph -below the usage line, use g_option_context_set_summary(). - -Note that the @parameter_string is translated (see -g_option_context_set_translate_func()). - - - - - - a string which is displayed in -the first line of &lt;option&gt;--help&lt;/option&gt; output, after the -usage summary -&lt;literal&gt;&lt;replaceable&gt;programname&lt;/replaceable&gt; [OPTION...]&lt;/literal&gt; - - - - a newly created #GOptionContext, which must be -freed with g_option_context_free() after use. - -Since: 2.6 - - - - - -This function cannot be called on a channel with %NULL encoding. - - - - - - a #GIOChannel - - - - a character - - - - A location to return an error of type #GConvertError -or #GIOChannelError - - - - a #GIOStatus - - - - - -Sets a function to be called when the child indicated by @pid -exits, at a default priority, #G_PRIORITY_DEFAULT. - -If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes() -you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to -the spawn function for the child watching to work. - -Note that on platforms where #GPid must be explicitly closed -(see g_spawn_close_pid()) @pid must not be closed while the -source is still active. Typically, you will want to call -g_spawn_close_pid() in the callback function for the source. - -GLib supports only a single callback per process id. - - - - - - process id of a child process to watch - - - - function to call - - - - data to pass to @function - - - - the ID (greater than 0) of the event source. - -Since: 2.4 - - - - - -Return value: the length of the @queue. - - - - - a #GAsyncQueue. - - - - the length of the @queue. - - - - - -Adds a copy of @string to the #GStringChunk. -It returns a pointer to the new copy of the string -in the #GStringChunk. The characters in the string -can be changed, if necessary, though you should not -change anything after the end of the string. - -Unlike g_string_chunk_insert_const(), this function -does not check for duplicates. Also strings added -with g_string_chunk_insert() will not be searched -by g_string_chunk_insert_const() when looking for -duplicates. - - - - - - a #GStringChunk - - - - the string to add - - - - a pointer to the copy of @string within -the #GStringChunk - - - - - -Locates the first executable named @program in the user's path, in the -same way that execvp() would locate it. Returns an allocated string -with the absolute path name, or %NULL if the program is not found in -the path. If @program is already an absolute path, returns a copy of -@program if @program exists and is executable, and %NULL otherwise. - -On Windows, if @program does not have a file type suffix, tries -with the suffixes .exe, .cmd, .bat and .com, and the suffixes in -the &lt;envar&gt;PATHEXT&lt;/envar&gt; environment variable. - -On Windows, it looks for the file in the same way as CreateProcess() -would. This means first in the directory where the executing -program was loaded from, then in the current directory, then in the -Windows 32-bit system directory, then in the Windows directory, and -finally in the directories in the &lt;envar&gt;PATH&lt;/envar&gt; environment -variable. If the program is found, the return value contains the -full name including the type suffix. - - - - - - a program name in the GLib file name encoding - - - - absolute path, or %NULL - - - - - -Frees a #GError and associated resources. - - - - - - a #GError - - - - - - - - -Adds a function to be called whenever there are no higher priority -events pending to the default main loop. The function is given the -default idle priority, #G_PRIORITY_DEFAULT_IDLE. If the function -Return value: the ID (greater than 0) of the event source. - - - - - function to call - - - - data to pass to @function. - - - - the ID (greater than 0) of the event source. - - - - - -Appends a formatted string onto the end of a #GString. -This function is is similar to g_string_printf() except -that the text is appended to the #GString. - - - - - a #GString - - - - the string format. See the printf() documentation - - - - the parameters to insert into the format string - - - - - - - - -Return value: A random number. - - - - - A random number. - - - - - -Formats arguments according to @format, escaping -all string and character arguments in the fashion -of g_markup_escape_text(). This is useful when you -want to insert literal strings into XML-style markup -output, without having to worry that the strings -might themselves contain markup. - -&lt;informalexample&gt;&lt;programlisting&gt; -const char *store = "Fortnum &amp; Mason"; -const char *item = "Tea"; -char *output; -&nbsp; -output = g_markup_printf_escaped ("&lt;purchase&gt;" -"&lt;store&gt;&percnt;s&lt;/store&gt;" -"&lt;item&gt;&percnt;s&lt;/item&gt;" -"&lt;/purchase&gt;", -store, item); -&lt;/programlisting&gt;&lt;/informalexample&gt; - - - - - - printf() style format string - - - - the arguments to insert in the format string - - - - newly allocated result from formatting -operation. Free with g_free(). - -Since: 2.4 - - - - - -Given a position @p with a UTF-8 encoded string @str, find the start -of the previous UTF-8 character starting before @p. Returns %NULL if no -UTF-8 characters are present in @str before @p. - -@p does not have to be at the beginning of a UTF-8 character. No check -is made to see if the character found is actually valid other than -it starts with an appropriate byte. - - - - - - pointer to the beginning of a UTF-8 encoded string - - - - pointer to some position within @str - - - - a pointer to the found character or %NULL. - - - - - -Like g_sequence_search(), but uses -a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as -the compare function. - - - - - - a #GSequence - - - - data for the new item - - - - the #GSequenceIterCompare function used to compare iterators -in the sequence. It is called with two iterators pointing into @seq. -It should return 0 if the iterators are equal, a negative value if the -first iterator comes before the second, and a positive value if the -second iterator comes before the first. - - - - user data passed to @iter_cmp - - - - a #GSequenceIter pointing to the position in @seq -where @data would have been inserted according to @iter_cmp and @cmp_data. - -Since: 2.14 - - - - - -Moves the item pointed to by @src to the position indicated by @dest. -After calling this function @dest will point to the position immediately -after @src. It is allowed for @src and @dest to point into different -sequences. - -Since: 2.14 - - - - - a #GSequenceIter pointing to the item to move - - - - a #GSequenceIter pointing to the position to which -the item is moved. - - - - - - - - -Writes a formatted string into a #GString. -This function is similar to g_string_printf() except that -the arguments to the format string are passed as a va_list. - -Since: 2.14 - - - - - a #GString - - - - the string format. See the printf() documentation - - - - the parameters to insert into the format string - - - - - - - - -Decreases the reference count on a #GMainContext object by one. If -the result is zero, free the context and free all associated memory. - - - - - a #GMainContext - - - - - - - - -Gets the names of all variables set in the environment. - - - - - - a %NULL-terminated list of strings which must be freed -with g_strfreev(). - -Programs that want to be portable to Windows should typically use -this function and g_getenv() instead of using the environ array -from the C library directly. On Windows, the strings in the environ -array are in system codepage encoding, while in most of the typical -use cases for environment variables in GLib-using programs you want -the UTF-8 encoding that this function and g_getenv() provide. - -Since: 2.8 - - - - - -Sets a function to be called at regular intervals with the default -priority, #G_PRIORITY_DEFAULT. The function is called repeatedly until -it returns %FALSE, at which point the timeout is automatically destroyed -and the function will not be called again. - -See g_timeout_add_seconds_full() for the differences between -g_timeout_add() and g_timeout_add_seconds(). - - - - - - the time between calls to the function, in seconds - - - - function to call - - - - data to pass to @function - - - - the ID (greater than 0) of the event source. - -Since: 2.14 - - - - - -Sets the time the bookmark for @uri was added into @bookmark. - -If no bookmark for @uri is found then it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - a timestamp or -1 to use the current time - - - - - - - - -Changes the data for the item pointed to by @iter to be @data. If -the sequence has a data destroy function associated with it, that -function is called on the existing data that @iter pointed to. - -Since: 2.14 - - - - - a #GSequenceIter - - - - new data for the item - - - - - - - - -Determines whether this thread holds the (recursive) -ownership of this #GMaincontext. This is useful to -know before waiting on another thread that may be -blocking to get ownership of @context. - - - - - - a #GMainContext - - - - %TRUE if current thread is owner of @context. - -Since: 2.10 - - - - - -Return a random #guint32 equally distributed over the range -[0..2^32-1]. - - - - - - A random number. - - - - - -Equivalent to the UNIX gettimeofday() function, but portable. - - - - - #GTimeVal structure in which to store current time. - - - - - - - - -Determines the break type of @c. @c should be a Unicode character -(to derive a character from UTF-8 encoded text, use -g_utf8_get_char()). The break type is used to find word and line -breaks ("text boundaries"), Pango implements the Unicode boundary -resolution algorithms and normally you would use a function such -as pango_break() instead of caring about break types yourself. - - - - - - a Unicode character - - - - the break type of @c - - - - - -Removes a key and its associated value from a #GHashTable without -calling the key and value destroy functions. - - - - - - a #GHashTable. - - - - the key to remove. - - - - %TRUE if the key was found and removed from the #GHashTable. - - - - - -Return value: the length of @seq - - - - - a #GSequence - - - - the length of @seq - -Since: 2.14 - - - - - -Sets the callback function storing the data as a refcounted callback -"object". This is used internally. Note that calling -g_source_set_callback_indirect() assumes -an initial reference count on @callback_data, and thus -@callback_funcs-&gt;unref will eventually be called once more -than @callback_funcs-&gt;ref. - - - - - the source - - - - pointer to callback data "object" - - - - functions for reference counting @callback_data -and getting the callback and data - - - - - - - - -Sets the value of a date from a #GTime value. - -@Deprecated:2.10: Use g_date_set_time_t() instead. - - - - - a #GDate. - - - - #GTime value to set. - - - - - - - - -Creates a new #GString with @len bytes of the @init buffer. -Because a length is provided, @init need not be nul-terminated, -and can contain embedded nul bytes. - -Since this function does not stop at nul bytes, it is the caller's -responsibility to ensure that @init has at least @len addressable -bytes. - - - - - - initial contents of the string - - - - length of @init to use - - - - a new #GString - - - - - -Adds a new element at the tail of the queue. - - - - - a #GQueue. - - - - the data for the new element. - - - - - - - - -A wrapper for the POSIX access() function. This function is used to -test a pathname for one or several of read, write or execute -permissions, or just existence. On Windows, the underlying access() -function in the C library only checks the READONLY attribute, and -does not look at the ACL at all. Software that needs to handle file -permissions on Windows more exactly should use the Win32 API. - -See the C library manual for more details about access(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - as in access() - - - - zero if the pathname refers to an existing file system -object that has all the tested permissions, or -1 otherwise or on -error. - -Since: 2.8 - - - - - -Frees all the memory associated with the #GMatchInfo structure. - -Since: 2.14 - - - - - a #GMatchInfo - - - - - - - - -Looks whether the key file has the group @group_name. - - - - - - a #GKeyFile - - - - a group name - - - - %TRUE if @group_name is a part of @key_file, %FALSE -otherwise. -Since: 2.6 - - - - - -Duplicates the first @n bytes of a string, returning a newly-allocated -buffer @n + 1 bytes long which will always be nul-terminated. -If @str is less than @n bytes long the buffer is padded with nuls. -If @str is %NULL it returns %NULL. -The returned value should be freed when no longer needed. - -&lt;note&gt;&lt;para&gt; -To copy a number of characters from a UTF-8 encoded string, use -g_utf8_strncpy() instead. -&lt;/para&gt;&lt;/note&gt; - - - - - - the string to duplicate - - - - the maximum number of bytes to copy from @str - - - - a newly-allocated buffer containing the first @n bytes -of @str, nul-terminated - - - - - -Removes the first element of the queue. - - - - - - a #GQueue. - - - - the data of the first element in the queue, or %NULL if the queue -is empty. - - - - - -Returns: the data of the first element in the queue, or %NULL if the queue - - - - - a #GQueue. - - - - the data of the first element in the queue, or %NULL if the queue -is empty. - - - - - -Associates two functions with @group which will be called -from g_option_context_parse() before the first option is parsed -and after the last option has been parsed, respectively. - -Note that the user data to be passed to @pre_parse_func and -@post_parse_func can be specified when constructing the group -with g_option_group_new(). - -Since: 2.6 - - - - - a #GOptionGroup - - - - a function to call before parsing, or %NULL - - - - a function to call after parsing, or %NULL - - - - - - - - -Replaces all occurances of the pattern in @regex with the -replacement text. Backreferences of the form '\number' or -'\g&lt;number&gt;' in the replacement text are interpolated by the -number-th captured subexpression of the match, '\g&lt;name&gt;' refers -to the captured subexpression with the given name. '\0' refers to the -complete match, but '\0' followed by a number is the octal representation -of a character. To include a literal '\' in the replacement, write '\\'. -There are also escapes that changes the case of the following text: - -&lt;variablelist&gt; -&lt;varlistentry&gt;&lt;term&gt;\l&lt;/term&gt; -&lt;listitem&gt; -&lt;para&gt;Convert to lower case the next character&lt;/para&gt; -&lt;/listitem&gt; -&lt;/varlistentry&gt; -&lt;varlistentry&gt;&lt;term&gt;\u&lt;/term&gt; -&lt;listitem&gt; -&lt;para&gt;Convert to upper case the next character&lt;/para&gt; -&lt;/listitem&gt; -&lt;/varlistentry&gt; -&lt;varlistentry&gt;&lt;term&gt;\L&lt;/term&gt; -&lt;listitem&gt; -&lt;para&gt;Convert to lower case till \E&lt;/para&gt; -&lt;/listitem&gt; -&lt;/varlistentry&gt; -&lt;varlistentry&gt;&lt;term&gt;\U&lt;/term&gt; -&lt;listitem&gt; -&lt;para&gt;Convert to upper case till \E&lt;/para&gt; -&lt;/listitem&gt; -&lt;/varlistentry&gt; -&lt;varlistentry&gt;&lt;term&gt;\E&lt;/term&gt; -&lt;listitem&gt; -&lt;para&gt;End case modification&lt;/para&gt; -&lt;/listitem&gt; -&lt;/varlistentry&gt; -&lt;/variablelist&gt; - -If you do not need to use backreferences use g_regex_replace_literal(). - -The @replacement string must be UTF-8 encoded even if #G_REGEX_RAW was -passed to g_regex_new(). If you want to use not UTF-8 encoded stings -you can use g_regex_replace_literal(). - -Setting @start_position differs from just passing over a shortened -string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that -begins with any kind of lookbehind assertion, such as "\b". - - - - - - a #GRegex structure - - - - the string to perform matches against - - - - the length of @string, or -1 if @string is nul-terminated - - - - starting index of the string to match - - - - text to replace each match with - - - - options for the match - - - - location to store the error occuring, or %NULL to ignore errors - - - - a newly allocated string containing the replacements - -Since: 2.14 - - - - - -Sets the (writeable) flags in @channel to (@flags & %G_IO_CHANNEL_SET_MASK). - - - - - - a #GIOChannel. - - - - the flags to set on the IO channel. - - - - A location to return an error of type #GIOChannelError. - - - - the status of the operation. - - - - - -Adds the application with @name and @exec to the list of -applications that have registered a bookmark for @uri into -@bookmark. - -Every bookmark inside a #GBookmarkFile must have at least an -application registered. Each application must provide a name, a -command line useful for launching the bookmark, the number of times -the bookmark has been registered by the application and the last -time the application registered this bookmark. - -If @name is %NULL, the name of the application will be the -same returned by g_get_application(); if @exec is %NULL, the -command line will be a composition of the program name as -returned by g_get_prgname() and the "%u" modifier, which will be -expanded to the bookmark's URI. - -This function will automatically take care of updating the -registrations count and timestamping in case an application -with the same @name had already registered a bookmark for -@uri inside @bookmark. - -If no bookmark for @uri is found, one is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - the name of the application registering the bookmark -or %NULL - - - - command line to be used to launch the bookmark or %NULL - - - - - - - - -Looks up the #GUnicodeScript for a particular character (as defined -by Unicode Standard Annex #24). No check is made for @ch being a -valid Unicode character; if you pass in invalid character, the -result is undefined. - - - - - - a Unicode character - - - - the #GUnicodeScript for the character. - -Since: 2.14 - - - - - -Destroys the #GTree. If keys and/or values are dynamically allocated, you -should either free them first or create the #GTree using g_tree_new_full(). -In the latter case the destroy functions you supplied will be called on -all keys and values before destroying the #GTree. - - - - - a #GTree. - - - - - - - - -Closes the directory and deallocates all related resources. - - - - - a #GDir* created by g_dir_open() - - - - - - - - -Appends @len bytes of @val to @string. Because @len is -provided, @val may contain embedded nuls and need not -be nul-terminated. - -Since this function does not stop at nul bytes, it is -the caller's responsibility to ensure that @val has at -least @len addressable bytes. - - - - - - a #GString - - - - bytes to append - - - - number of bytes of @val to use - - - - @string - - - - - -Returns: A newly allocated string containing the help text - - - - - a #GOptionContext - - - - if %TRUE, only include the main group - - - - the #GOptionGroup to create help for, or %NULL - - - - A newly allocated string containing the help text - -Since: 2.14 - - - - - -Inserts a new element into @queue at the given position - -Since: 2.4 - - - - - a #GQueue - - - - the data for the new element - - - - the position to insert the new element. If @n is negative or -larger than the number of elements in the @queue, the element is -added to the end of the queue. - - - - - - - - -Inserts @data into @queue after @sibling - -@sibling must be part of @queue - -Since: 2.4 - - - - - a #GQueue - - - - a #GList link that &lt;emphasis&gt;must&lt;/emphasis&gt; be part of @queue - - - - the data to insert - - - - - - - - -Determines whether a character is alphanumeric. -Given some UTF-8 text, obtain a character value -with g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is an alphanumeric character - - - - - -Incrementally encode a sequence of binary data into it's Base-64 stringified -representation. By calling this function multiple times you can convert -data in chunks to avoid having to have the full encoded data in memory. - -When all of the data has been converted you must call -g_base64_encode_close() to flush the saved state. - -The output buffer must be large enough to fit all the data that will -be written to it. Due to the way base64 encodes you will need -at least: @len * 4 / 3 + 6 bytes. If you enable line-breaking you will -need at least: @len * 4 / 3 + @len * 4 / (3 * 72) + 7 bytes. - -@break_lines is typically used when putting base64-encoded data in emails. -It breaks the lines at 72 columns instead of putting all of the text on -the same line. This avoids problems with long lines in the email system. - - - - - - the binary data to encode - - - - the length of @in - - - - whether to break long lines - - - - pointer to destination buffer - - - - Saved state between steps, initialize to 0 - - - - Saved state between steps, initialize to 0 - - - - The number of bytes of output that was written - -Since: 2.12 - - - - - -Creates a new #GMainContext strcuture - - - - - - the new #GMainContext - - - - - -A safer form of the standard vsprintf() function. The output is guaranteed -to not exceed @n characters (including the terminating nul character), so -it is easy to ensure that a buffer overflow cannot occur. - -See also g_strdup_vprintf(). - -In versions of GLib prior to 1.2.3, this function may return -1 if the -output was truncated, and the truncated string may not be nul-terminated. -In versions prior to 1.3.12, this function returns the length of the output -string. - -The return value of g_vsnprintf() conforms to the vsnprintf() function -as standardized in ISO C99. Note that this is different from traditional -vsnprintf(), which returns the length of the output string. - -The format string may contain positional parameters, as specified in -the Single Unix Specification. - - - - - - the buffer to hold the output. - - - - the maximum number of characters to produce (including the -terminating nul character). - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the list of arguments to insert in the output. - - - - the number of characters which would be produced if the buffer -was large enough. - - - - - -Converts a string containing an ISO 8601 encoded date and time -to a #GTimeVal and puts it into @time_. - - - - - - a ISO 8601 encoded date string - - - - a #GTimeVal - - - - %TRUE if the conversion was successful. - -Since: 2.12 - - - - - -Converts all lower case ASCII letters to upper case ASCII letters. - - - - - - a string. - - - - length of @str in bytes, or -1 if @str is nul-terminated. - - - - a newly allocated string, with all the lower case -characters in @str converted to upper case, with -semantics that exactly match g_ascii_toupper(). (Note -that this is unlike the old g_strup(), which modified -the string in place.) - - - - - -Pushes the @data into the @queue. @data must not be %NULL. - - - - - a #GAsyncQueue. - - - - @data to push into the @queue. - - - - - - - - -Converts a string to a #gdouble value. -It calls the standard strtod() function to handle the conversion, but -if the string is not completely converted it attempts the conversion -again with g_ascii_strtod(), and returns the best match. - -This function should seldomly be used. The normal situation when reading -numbers not for human consumption is to use g_ascii_strtod(). Only when -you know that you must expect both locale formatted and C formatted numbers -should you use this. Make sure that you don't pass strings such as comma -separated lists of values, since the commas may be interpreted as a decimal -point in some locales, causing unexpected results. - - - - - - the string to convert to a numeric value. - - - - if non-%NULL, it returns the character after -the last character used in the conversion. - - - - the #gdouble value. - - - - - -Return value: a %NULL-terminated array of strings owned by GLib that must - - - - - a %NULL-terminated array of strings owned by GLib that must -not be modified or freed. -Since: 2.6 - - - - - -Return value: A negative number if @a comes before @b, 0 if they are - - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - A negative number if @a comes before @b, 0 if they are -equal, and a positive number if @a comes after @b. - -Since: 2.14 - - - - - -Adds a string on to the start of a #GString, -expanding it if necessary. - - - - - - a #GString - - - - the string to prepend on the start of @string - - - - @string - - - - - -Expires as many unused cache buckets as it needs to in order to get -the total number of buckets &lt; ICONV_CACHE_SIZE. - - - - - - - - - -Converts a Unicode character into UTF-8, and appends it -to the string. - - - - - - a #GString - - - - a Unicode character - - - - @string - - - - - -Returns: %TRUE if unknown options are ignored. - - - - - a #GOptionContext - - - - %TRUE if unknown options are ignored. - -Since: 2.6 - - - - - -Breaks the string on the pattern, and returns an array of the tokens. -If the pattern contains capturing parentheses, then the text for each -of the substrings will also be returned. If the pattern does not match -anywhere in the string, then the whole string is returned as the first -token. - -As a special case, the result of splitting the empty string "" is an -empty vector, not a vector containing a single string. The reason for -this special case is that being able to represent a empty vector is -typically more useful than consistent handling of empty elements. If -you do need to represent empty elements, you'll need to check for the -empty string before calling this function. - -A pattern that can match empty strings splits @string into separate -characters wherever it matches the empty string between characters. -For example splitting "ab c" using as a separator "\s*", you will get -"a", "b" and "c". - -Setting @start_position differs from just passing over a shortened -string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b". - - - - - - a #GRegex structure - - - - the string to split with the pattern - - - - the length of @string, or -1 if @string is nul-terminated - - - - starting index of the string to match - - - - match time option flags - - - - the maximum number of tokens to split @string into. -If this is less than 1, the string is split completely - - - - return location for a #GError - - - - a %NULL-terminated gchar ** array. Free it using g_strfreev() - -Since: 2.14 - - - - - -Converts from an integer character offset to a pointer to a position -within the string. - -Since 2.10, this function allows to pass a negative @offset to -step backwards. It is usually worth stepping backwards from the end -instead of forwards if @offset is in the last fourth of the string, -since moving forward is about 3 times faster than moving backward. - - - - - - a UTF-8 encoded string - - - - a character offset within @str - - - - the resulting pointer - - - - - -Gets the encoding for the input/output of the channel. The internal -encoding is always UTF-8. The encoding %NULL makes the -channel safe for binary data. - - - - - - a #GIOChannel - - - - A string containing the encoding, this string is -owned by GLib and must not be freed. - - - - - -Return value: a newly allocated string or %NULL if the specified - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - a locale or %NULL - - - - return location for a #GError, or %NULL - - - - a newly allocated string or %NULL if the specified -key cannot be found. - -Since: 2.6 - - - - - -Inserts a new item just before the item pointed to by @iter. - - - - - - a #GSequenceIter - - - - the data for the new item - - - - an iterator pointing to the new item - -Since: 2.14 - - - - - -Loads a desktop bookmark file into an empty #GBookmarkFile structure. -If the file could not be loaded then @error is set to either a #GFileError -or #GBookmarkFileError. - - - - - - an empty #GBookmarkFile struct - - - - the path of a filename to load, in the GLib file name encoding - - - - return location for a #GError, or %NULL - - - - %TRUE if a desktop bookmark file could be loaded - -Since: 2.12 - - - - - -A wrapper for the POSIX chmod() function. The chmod() function is -used to set the permissions of a file system object. Note that on -Windows the file protection mechanism is not at all POSIX-like, and -the underlying chmod() function in the C library just sets or -clears the READONLY attribute. It does not touch any ACL. Software -that needs to manage file permissions on Windows exactly should -use the Win32 API. - -See the C library manual for more details about chmod(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - as in chmod() - - - - zero if the operation succeeded, -1 on error. - -Since: 2.8 - - - - - -Retrieves the text matching the capturing parentheses named @name. - -If @name is a valid sub pattern name but it didn't match anything -(e.g. sub pattern "X", matching "b" against "(?P&lt;X&gt;a)?b") -then an empty string is returned. - -The string is fetched from the string passed to the match function, -so you cannot call this function after freeing the string. - - - - - - #GMatchInfo structure - - - - name of the subexpression - - - - The matched substring, or %NULL if an error occurred. -You have to free the string yourself - -Since: 2.14 - - - - - -Determines if a character is a hexidecimal digit. - - - - - - a Unicode character. - - - - %TRUE if the character is a hexadecimal digit - - - - - -Creates a new parse context. A parse context is used to parse -marked-up documents. You can feed any number of documents into -a context, as long as no errors occur; once an error occurs, -the parse context can't continue to parse text (you have to free it -and create a new parse context). - - - - - - a #GMarkupParser - - - - one or more #GMarkupParseFlags - - - - user data to pass to #GMarkupParser functions - - - - user data destroy notifier called when the parse context is freed - - - - a new #GMarkupParseContext - - - - - -Associates a new boolean value with @key under @group_name. -If @key cannot be found then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - %TRUE or %FALSE - - - - - - - - -Frees all strings contained within the #GStringChunk. -After calling g_string_chunk_clear() it is not safe to -access any of the strings which were contained within it. - -Since: 2.14 - - - - - a #GStringChunk - - - - - - - - -Adds @group to the list of groups to which the bookmark for @uri -belongs to. - -If no bookmark for @uri is found then it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - the group name to be added - - - - - - - - -Removes the bookmark for @uri from the bookmark file @bookmark. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - %TRUE if the bookmark was removed successfully. - -Since: 2.12 - - - - - -Attempts to complete the string @prefix using the #GCompletion target items. -In contrast to g_completion_complete(), this function returns the largest common -prefix that is a valid UTF-8 string, omitting a possible common partial -character. - -You should use this function instead of g_completion_complete() if your -items are UTF-8 strings. - - - - - - the #GCompletion - - - - the prefix string, typically used by the user, which is compared -with each of the items - - - - if non-%NULL, returns the longest prefix which is common to all -items that matched @prefix, or %NULL if no items matched @prefix. -This string should be freed when no longer needed. - - - - the list of items whose strings begin with @prefix. This should -not be changed. - -Since: 2.4 - - - - - -Adds a new item to the front of @seq - - - - - - a #GSequence - - - - the data for the new item - - - - an iterator pointing to the new item - -Since: 2.14 - - - - - -Convert a string from UTF-8 to UTF-16. A 0 character will be -added to the result after the converted text. - - - - - - a UTF-8 encoded string - - - - the maximum length (number of characters) of @str to use. -If @len &lt; 0, then the string is nul-terminated. - - - - location to store number of bytes read, or %NULL. -If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be -returned in case @str contains a trailing partial -character. If an error occurs then the index of the -invalid input is stored here. - - - - location to store number of &lt;type&gt;gunichar2&lt;/type&gt; written, -or %NULL. -The value stored here does not include the trailing 0. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError other than -%G_CONVERT_ERROR_NO_CONVERSION may occur. - - - - a pointer to a newly allocated UTF-16 string. -This value must be freed with g_free(). If an -error occurs, %NULL will be returned and -@error set. - - - - - -Inserts @link into @queue at the given position. - -Since: 2.4 - - - - - a #GQueue - - - - the position to insert the link. If this is negative or larger than -the number of elements in @queue, the link is added to the end of -@queue. - - - - the link to add to @queue - - - - - - - - -Call @thread_func on all existing #GThread structures. Note that -threads may decide to exit while @thread_func is running, so -without intimate knowledge about the lifetime of foreign threads, -@thread_func shouldn't access the GThread* pointer passed in as -first argument. However, @thread_func will not be called for threads -which are known to have exited already. - -Due to thread lifetime checks, this function has an execution complexity -which is quadratic in the number of existing threads. - -Since: 2.10 - - - - - function to call for all GThread structures - - - - second argument to @thread_func - - - - - - - - -Returns: the data of the last element in the queue, or %NULL if the queue - - - - - a #GQueue. - - - - the data of the last element in the queue, or %NULL if the queue -is empty. - - - - - -Adds a new element at the head of the queue. - - - - - a #GQueue. - - - - the data for the new element. - - - - - - - - -Decreases the reference count of the asynchronous @queue by 1. If -the reference count went to 0, the @queue will be destroyed and the -memory allocated will be freed. So you are not allowed to use the -@queue afterwards, as it might have disappeared. You do not need to -hold the lock to call this function. - - - - - a #GAsyncQueue. - - - - - - - - -Sets a function to be called when the child indicated by @pid -exits, at the priority @priority. - -If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes() -you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to -the spawn function for the child watching to work. - -Note that on platforms where #GPid must be explicitly closed -(see g_spawn_close_pid()) @pid must not be closed while the -source is still active. Typically, you will want to call -g_spawn_close_pid() in the callback function for the source. - -GLib supports only a single callback per process id. - - - - - - the priority of the idle source. Typically this will be in the -range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. - - - - process id of a child process to watch - - - - function to call - - - - data to pass to @function - - - - function to call when the idle is removed, or %NULL - - - - the ID (greater than 0) of the event source. - -Since: 2.4 - - - - - -Return value: the values associated with the key as a list of - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - the number of doubles returned - - - - return location for a #GError - - - - the values associated with the key as a list of -doubles, or %NULL if the key was not found or could not be parsed. - -Since: 2.12 - - - - - -Return value: a #GSequenceIter pointing to the previous position before - - - - - a #GSequenceIter - - - - a #GSequenceIter pointing to the previous position before -@iter. - -Since: 2.14 - - - - - -Frees context and all the groups which have been -added to it. - -Since: 2.6 - - - - - a #GOptionContext - - - - - - - - -Sets the current position in the #GIOChannel, similar to the standard library -function fseek(). - - - - - - a #GIOChannel. - - - - an offset, in bytes, which is added to the position specified by @type - - - - the position in the file, which can be %G_SEEK_CUR (the current -position), %G_SEEK_SET (the start of the file), or %G_SEEK_END (the end of the -file). - - - - %G_IO_ERROR_NONE if the operation was successful. - -Deprecated:2.2: Use g_io_channel_seek_position() instead. - - - - - -Converts all Unicode characters in the string that have a case -to lowercase. The exact manner that this is done depends -on the current locale, and may result in the number of -characters in the string changing. - - - - - - a UTF-8 encoded string - - - - length of @str, in bytes, or -1 if @str is nul-terminated. - - - - a newly allocated string, with all characters -converted to lowercase. - - - - - -A wrapper for the POSIX stat() function. The stat() function -Returns: 0 if the information was successfully retrieved, -1 if an error - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - a pointer to a &lt;structname&gt;stat&lt;/structname&gt; struct, which -will be filled with the file information - - - - 0 if the information was successfully retrieved, -1 if an error -occurred - -Since: 2.6 - - - - - -Retrieves the number of matched substrings (including substring 0, -that is the whole matched text), so 1 is returned if the pattern -has no substrings in it and 0 is returned if the match failed. - -If the last match was obtained using the DFA algorithm, that is -using g_regex_match_all() or g_regex_match_all_full(), the retrieved -count is not that of the number of capturing parentheses but that of -the number of matched substrings. - - - - - - a #GMatchInfo structure - - - - Number of matched substrings, or -1 if an error occurred - -Since: 2.14 - - - - - -Opens a temporary file. See the mkstemp() documentation -on most UNIX-like systems. - -The parameter is a string that should follow the rules for -mkstemp() templates, i.e. contain the string "XXXXXX". -g_mkstemp() is slightly more flexible than mkstemp() -in that the sequence does not have to occur at the very end of the -template. The X string will -be modified to form the name of a file that didn't exist. -The string should be in the GLib file name encoding. Most importantly, -on Windows it should be in UTF-8. - - - - - - template filename - - - - A file handle (as from open()) to the file -opened for reading and writing. The file is opened in binary mode -on platforms where there is a difference. The file handle should be -closed with close(). In case of errors, -1 is returned. - - - - - -Return value: a newly allocated string containing - - - - - an absolute pathname in the GLib file name encoding - - - - a newly allocated string containing -a rendition of the basename of the filename in valid UTF-8 - -Since: 2.6 - - - - - -This function outputs @bookmark into a file. The write process is -guaranteed to be atomic by using g_file_set_contents() internally. - - - - - - a #GBookmarkFile - - - - path of the output file - - - - return location for a #GError, or %NULL - - - - %TRUE if the file was successfully written. - -Since: 2.12 - - - - - -Turns on flag values for a data list. This function is used -to keep a small number of boolean flags in an object with -a data list without using any additional space. It is -not generally useful except in circumstances where space -is very tight. (It is used in the base #GObject type, for -example.) - -Since: 2.8 - - - - - pointer to the location that holds a list - - - - the flags to turn on. The values of the flags are -restricted by %G_DATALIST_FLAGS_MASK (currently -3; giving two possible boolean flags). -A value for @flags that doesn't fit within the mask is -an error. - - - - - - - - -Validates UTF-8 encoded text. @str is the text to validate; -if @str is nul-terminated, then @max_len can be -1, otherwise -@max_len should be the number of bytes to validate. -If @end is non-%NULL, then the end of the valid range -will be stored there (i.e. the start of the first invalid -character if some bytes were invalid, or the end of the text -being validated otherwise). - -Note that g_utf8_validate() returns %FALSE if @max_len is -positive and NUL is met before @max_len bytes have been read. - -Return value: %TRUE if the text was valid UTF-8 - - - - - a pointer to character data - - - - max bytes to validate, or -1 to go until NUL - - - - return location for end of valid data - - - - %TRUE if the text was valid UTF-8 - - - - - -Creates a new cache bucket, inserts it into the cache and -increments the cache size. - -This assumes ownership of @key. - - - - - - cache key - - - - iconv descriptor - - - -a pointer to the newly allocated cache bucket. - - - - - -Creates a new timeout source. - -The source will not initially be associated with any #GMainContext -and must be added to one with g_source_attach() before it will be -executed. - -The scheduling granularity/accuracy of this timeout source will be -in seconds. - - - - - - the timeout interval in seconds - - - - the newly-created timeout source - -Since: 2.14 - - - - - -Converts a string into a collation key that can be compared -with other collation keys produced by the same function using -strcmp(). - -The results of comparing the collation keys of two strings -with strcmp() will always be the same as comparing the two -original keys with g_utf8_collate(). - -Note that this function depends on the -&lt;link linkend="setlocale"&gt;current locale&lt;/link&gt;. - - - - - - a UTF-8 encoded string. - - - - length of @str, in bytes, or -1 if @str is nul-terminated. - - - - a newly allocated string. This string should -be freed with g_free() when you are done with it. - - - - - -Pops data from the @queue. If no data is received before @end_time, -%NULL is returned. This function must be called while holding the -@queue's lock. - -To easily calculate @end_time a combination of g_get_current_time() -and g_time_val_add() can be used. - - - - - - a #GAsyncQueue. - - - - a #GTimeVal, determining the final time. - - - - data from the queue or %NULL, when no data is -received before @end_time. - - - - - -Sets the buffer size. - - - - - a #GIOChannel - - - - the size of the buffer. 0 == pick a good size - - - - - - - - -Return value: the value associated with the key as an integer, or - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for a #GError - - - - the value associated with the key as an integer, or -0 if the key was not found or could not be parsed. - -Since: 2.6 - - - - - -In Unicode, some characters are &lt;firstterm&gt;mirrored&lt;/firstterm&gt;. This -means that their images are mirrored horizontally in text that is laid -out from right to left. For instance, "(" would become its mirror image, -")", in right-to-left text. - -If @ch has the Unicode mirrored property and there is another unicode -character that typically has a glyph that is the mirror image of @ch's -glyph and @mirrored_ch is set, it puts that character in the address -pointed to by @mirrored_ch. Otherwise the original character is put. - - - - - - a Unicode character - - - - location to store the mirrored character - - - - %TRUE if @ch has a mirrored character, %FALSE otherwise - -Since: 2.4 - - - - - -Creates a filename from a series of elements using the correct -separator for filenames. - -On Unix, this function behaves identically to &lt;literal&gt;g_build_path -(G_DIR_SEPARATOR_S, first_element, ....)&lt;/literal&gt;. - -On Windows, it takes into account that either the backslash -(&lt;literal&gt;\&lt;/literal&gt; or slash (&lt;literal&gt;/&lt;/literal&gt;) can be used -as separator in filenames, but otherwise behaves as on Unix. When -file pathname separators need to be inserted, the one that last -previously occurred in the parameters (reading from left to right) -is used. - -No attempt is made to force the resulting filename to be an absolute -path. If the first element is a relative path, the result will -be a relative path. - - - - - - the first element in the path - - - - remaining elements in path, terminated by %NULL - - - - a newly-allocated string that must be freed with g_free(). - - - - - -Determines the canonical combining class of a Unicode character. - - - - - - a Unicode character - - - - the combining class of the character - -Since: 2.14 - - - - - -Converts a string from one character set to another. - -Note that you should use g_iconv() for streaming -conversions&lt;footnote id="streaming-state"&gt; -&lt;para&gt; -Despite the fact that @byes_read can return information about partial -characters, the &lt;literal&gt;g_convert_...&lt;/literal&gt; functions -are not generally suitable for streaming. If the underlying converter -being used maintains internal state, then this won't be preserved -across successive calls to g_convert(), g_convert_with_iconv() or -g_convert_with_fallback(). (An example of this is the GNU C converter -for CP1255 which does not emit a base character until it knows that -the next character is not a mark that could combine with the base -character.) -&lt;/para&gt; -&lt;/footnote&gt;. - - - - - - the string to convert - - - - the length of the string, or -1 if the string is -nul-terminated&lt;footnoteref linkend="nul-unsafe"/&gt;. - - - - conversion descriptor from g_iconv_open() - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. If the error -#G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - If the conversion was successful, a newly allocated -nul-terminated string, which must be freed with -g_free(). Otherwise %NULL and @error will be set. - - - - - -Copies %NULL-terminated array of strings. The copy is a deep copy; -the new array should be freed by first freeing each string, then -the array itself. g_strfreev() does this for you. If called -on a %NULL value, g_strdupv() simply returns %NULL. - - - - - - %NULL-terminated array of strings. - - - - a new %NULL-terminated array of strings. - - - - - -Adds a string onto the end of a #GString, expanding -it if necessary. - - - - - - a #GString - - - - the string to append onto the end of @string - - - - @string - - - - - -Converts a #gdouble to a string, using the '.' as -decimal point. - -This functions generates enough precision that converting -the string back using g_ascii_strtod() gives the same machine-number -(on machines with IEEE compatible 64bit doubles). It is -guaranteed that the size of the resulting string will never -be larger than @G_ASCII_DTOSTR_BUF_SIZE bytes. - - - - - - A buffer to place the resulting string in - - - - The length of the buffer. - - - - The #gdouble to convert - - - - The pointer to the buffer with the converted string. - - - - - -Gets the number of bookmarks inside @bookmark. - - - - - - a #GBookmarkFile - - - - the number of bookmarks - -Since: 2.12 - - - - - -Return value: a newly allocated %NULL-terminated array of strings. - - - - - a #GBookmarkFile - - - - return location for the number of returned URIs, or %NULL - - - - a newly allocated %NULL-terminated array of strings. -Use g_strfreev() to free it. - -Since: 2.12 - - - - - -Checks that the GLib library in use is compatible with the -given version. Generally you would pass in the constants -#GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION -as the three arguments to this function; that produces -a check that the library in use is compatible with -the version of GLib the application or module was compiled -against. - -Compatibility is defined by two things: first the version -of the running library is newer than the version -@required_major.required_minor.@required_micro. Second -the running library must be binary compatible with the -version @required_major.required_minor.@required_micro -(same major version.) - - - - - - the required major version. - - - - the required minor version. - - - - the required micro version. - - - - %NULL if the GLib library is compatible with the -given version, or a string describing the version mismatch. -The returned string is owned by GLib and must not be modified -or freed. - -Since: 2.6 - - - - - -Writes data to a #GIOChannel. - - - - - - a #GIOChannel. - - - - the buffer containing the data to write. - - - - the number of bytes to write. - - - - the number of bytes actually written. - - - - %G_IO_ERROR_NONE if the operation was successful. - -Deprecated:2.2: Use g_io_channel_write_chars() instead. - - - - - -This function looks for a key file named @file in the paths -returned from g_get_user_data_dir() and g_get_system_data_dirs(), -loads the file into @key_file and returns the file's full path in -@full_path. If the file could not be loaded then an %error is -set to either a #GFileError or #GKeyFileError. - - - - - - an empty #GKeyFile struct - - - - a relative path to a filename to open and parse - - - - return location for a string containing the full path -of the file, or %NULL - - - - flags from #GKeyFileFlags - - - - return location for a #GError, or %NULL - - - - %TRUE if a key file could be loaded, %FALSE othewise -Since: 2.6 - - - - - -Like g_sequence_insert_sorted(), but uses -a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as -the compare function. - - - - - - a #GSequence - - - - data for the new item - - - - the #GSequenceItercompare used to compare iterators in the -sequence. It is called with two iterators pointing into @seq. It should -return 0 if the iterators are equal, a negative value if the first -iterator comes before the second, and a positive value if the second -iterator comes before the first. - - - - user data passed to @cmp_func - - - - a #GSequenceIter pointing to the new item - -Since: 2.14 - - - - - -Finds a source with the given user data for the callback. If -multiple sources exist with the same user data, the first -one found will be returned. - - - - - - a #GMainContext - - - - the user_data for the callback. - - - - the source, if one was found, otherwise %NULL - - - - - -Adds a new element at the tail of the queue. - - - - - a #GQueue. - - - - a single #GList element, &lt;emphasis&gt;not&lt;/emphasis&gt; a list with -more than one element. - - - - - - - - -Creates a hash code for @str; for use with #GHashTable. - - - - - - a string to hash - - - - hash code for @str - - - - - -An implementation of the standard vsprintf() function which supports -positional parameters, as specified in the Single Unix Specification. - - - - - - the buffer to hold the output. - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the list of arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.2 - - - - - -Tries to pop data from the @queue. If no data is available, %NULL is -returned. - - - - - - a #GAsyncQueue. - - - - data from the queue or %NULL, when no data is -available immediately. - - - - - -Determines whether a character is a control character. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is a control character - - - - - -Appends a formatted string onto the end of a #GString. -This function is is similar to g_string_sprintf() except that -the text is appended to the #GString. - -Deprecated: This function has been renamed to g_string_append_printf() - - - - - a #GString - - - - the string format. See the sprintf() documentation - - - - the parameters to insert into the format string - - - - - - - - -Converts a filename from UTF-8 to the system codepage. - -On NT-based Windows, on NTFS file systems, file names are in -Unicode. It is quite possible that Unicode file names contain -characters not representable in the system codepage. (For instance, -Greek or Cyrillic characters on Western European or US Windows -installations, or various less common CJK characters on CJK Windows -installations.) - -In such a case, and if the filename refers to an existing file, and -the file system stores alternate short (8.3) names for directory -entries, the short form of the filename is returned. Note that the -"short" name might in fact be longer than the Unicode name if the -Unicode name has very short pathname components containing -non-ASCII characters. If no system codepage name for the file is -possible, %NULL is returned. - -The return value is dynamically allocated and should be freed with -g_free() when no longer needed. - - - - - - a UTF-8 encoded filename. - - - - The converted filename, or %NULL on conversion -failure and lack of short names. - -Since: 2.8 - - - - - -Reads a line from a #GIOChannel, using a #GString as a buffer. - - - - - - a #GIOChannel - - - - a #GString into which the line will be written. -If @buffer already contains data, the old data will -be overwritten. - - - - location to store position of line terminator, or %NULL - - - - a location to store an error of type #GConvertError -or #GIOChannelError - - - - the status of the operation. - - - - - -Does nothing if @err is %NULL; if @err is non-%NULL, then *@err must -be %NULL. A new #GError is created and assigned to *@err. - - - - - a return location for a #GError, or %NULL - - - - error domain - - - - error code - - - - printf()-style format - - - - args for @format - - - - - - - - -Return value: the first link in @queue, or %NULL if @queue is empty - - - - - a #GQueue - - - - the first link in @queue, or %NULL if @queue is empty - -Since: 2.4 - - - - - -Creates a new child_watch source. - -The source will not initially be associated with any #GMainContext -and must be added to one with g_source_attach() before it will be -executed. - -Note that child watch sources can only be used in conjunction with -&lt;literal&gt;g_spawn...&lt;/literal&gt; when the %G_SPAWN_DO_NOT_REAP_CHILD -flag is used. - -Note that on platforms where #GPid must be explicitly closed -(see g_spawn_close_pid()) @pid must not be closed while the -source is still active. Typically, you will want to call -g_spawn_close_pid() in the callback function for the source. - -Note further that using g_child_watch_source_new() is not -compatible with calling &lt;literal&gt;waitpid(-1)&lt;/literal&gt; in -the application. Calling waitpid() for individual pids will -still work fine. - - - - - - process id of a child process to watch. On Windows, a HANDLE -for the process to watch (which actually doesn't have to be a child). - - - - the newly-created child watch source - -Since: 2.4 - - - - - -Creates a new #GOptionGroup. - - - - - - the name for the option group, this is used to provide -help for the options in this group with &lt;option&gt;--help-&lt;/option&gt;@name - - - - a description for this group to be shown in -&lt;option&gt;--help&lt;/option&gt;. This string is translated using the translation -domain or translation function of the group - - - - a description for the &lt;option&gt;--help-&lt;/option&gt;@name option. -This string is translated using the translation domain or translation function -of the group - - - - user data that will be passed to the pre- and post-parse hooks, -the error hook and to callbacks of %G_OPTION_ARG_CALLBACK options, or %NULL - - - - a function that will be called to free @user_data, or %NULL - - - - a newly created option group. It should be added -to a #GOptionContext or freed with g_option_group_free(). - -Since: 2.6 - - - - - -Unmaps the buffer of @file and frees it. - -Since: 2.8 - - - - - a #GMappedFile - - - - - - - - -Return value: the maximal number of unused threads - - - - - the maximal number of unused threads - - - - - -Converts an &lt;literal&gt;errno&lt;/literal&gt; error number to a #GIOChannelError. - - - - - - an &lt;literal&gt;errno&lt;/literal&gt; error number, e.g. %EINVAL. - - - - a #GIOChannelError error number, e.g. %G_IO_CHANNEL_ERROR_INVAL. - - - - - -Compares the two #gint values being pointed to and returns -%TRUE if they are equal. -It can be passed to g_hash_table_new() as the @key_equal_func -parameter, when using pointers to integers as keys in a #GHashTable. - - - - - - a pointer to a #gint key. - - - - a pointer to a #gint key to compare with @v1. - - - - %TRUE if the two keys match. - - - - - -Creates a new idle source. - -The source will not initially be associated with any #GMainContext -and must be added to one with g_source_attach() before it will be -executed. Note that the default priority for idle sources is -%G_PRIORITY_DEFAULT_IDLE, as compared to other sources which -have a default priority of %G_PRIORITY_DEFAULT. - - - - - - the newly-created idle source - - - - - -Adds a copy of the first @len bytes of @string to the #GStringChunk. -The copy is nul-terminated. - -Since this function does not stop at nul bytes, it is the caller's -responsibility to ensure that @string has at least @len addressable -bytes. - -The characters in the returned string can be changed, if necessary, -though you should not change anything after the end of the string. - - - - - - a #GStringChunk - - - - bytes to insert - - - - number of bytes of @string to insert, or -1 to insert a -nul-terminated string - - - - a pointer to the copy of @string within the #GStringChunk - -Since: 2.4 - - - - - -Like g_sequence_sort_changed(), but uses -a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as -the compare function. - -Since: 2.14 - - - - - a #GSequenceIter - - - - the #GSequenceItercompare used to compare iterators in the -sequence. It is called with two iterators pointing into @seq. It should -return 0 if the iterators are equal, a negative value if the first -iterator comes before the second, and a positive value if the second -iterator comes before the first. - - - - user data passed to @cmp_func - - - - - - - - -Converts a string to a #guint64 value. -This function behaves like the standard strtoull() function -does in the C locale. It does this without actually -changing the current locale, since that would not be -thread-safe. - -This function is typically used when reading configuration -files or other non-user input that should be locale independent. -To handle input from the user you should normally use the -locale-sensitive system strtoull() function. - -If the correct value would cause overflow, %G_MAXUINT64 -is returned, and %ERANGE is stored in %errno. If the base is -outside the valid range, zero is returned, and %EINVAL is stored -in %errno. If the string conversion fails, zero is returned, and -@endptr returns @nptr (if @endptr is non-%NULL). - - - - - - the string to convert to a numeric value. - - - - if non-%NULL, it returns the character after -the last character used in the conversion. - - - - to be used for the conversion, 2..36 or 0 - - - - the #guint64 value or zero on error. - -Since: 2.2 - - - - - -Determines if a given character is assigned in the Unicode -standard. - - - - - - a Unicode character - - - - %TRUE if the character has an assigned value - - - - - -Formats the data in @args according to @format, escaping -all string and character arguments in the fashion -of g_markup_escape_text(). See g_markup_printf_escaped(). - - - - - - printf() style format string - - - - variable argument list, similar to vprintf() - - - - newly allocated result from formatting -operation. Free with g_free(). - -Since: 2.4 - - - - - -Sets the private flag of the bookmark for @uri. - -If a bookmark for @uri cannot be found then it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - %TRUE if the bookmark should be marked as private - - - - - - - - -Return value: the value associated with the key as a boolean, or - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for a #GError - - - - the value associated with the key as a boolean, or -%FALSE if the key was not found or could not be parsed. - -Since: 2.6 - - - - - -Sorts @queue using @func. - -This function will lock @queue before it sorts the queue and unlock -it when it is finished. - -If you were sorting a list of priority numbers to make sure the -lowest priority would be at the top of the queue, you could use: -&lt;informalexample&gt;&lt;programlisting&gt; -gint32 id1; -gint32 id2; - -id1 = GPOINTER_TO_INT (element1); -id2 = GPOINTER_TO_INT (element2); - -return (id1 &gt; id2 ? +1 : id1 == id2 ? 0 : -1); -&lt;/programlisting&gt;&lt;/informalexample&gt; - -Since: 2.10 - - - - - a #GAsyncQueue - - - - the #GCompareDataFunc is used to sort @queue. This -function is passed two elements of the @queue. The function -should return 0 if they are equal, a negative value if the -first element should be higher in the @queue or a positive -value if the first element should be lower in the @queue than -the second element. - - - - user data passed to @func - - - - - - - - -Returns: %TRUE if @file_name is an absolute path. - - - - - a file name. - - - - %TRUE if @file_name is an absolute path. - - - - - -Prepends @len bytes of @val to @string. -Because @len is provided, @val may contain -embedded nuls and need not be nul-terminated. - -Since this function does not stop at nul bytes, -it is the caller's responsibility to ensure that -@val has at least @len addressable bytes. - - - - - - a #GString - - - - bytes to prepend - - - - number of bytes in @val to prepend - - - - @string - - - - - -Overwrites part of a string, lengthening it if necessary. -This function will work with embedded nuls. - - - - - - a #GString - - - - the position at which to start overwriting - - - - the string that will overwrite the @string starting at @pos - - - - the number of bytes to write from @val - - - - @string - -Since: 2.14 - - - - - -Checks to see if the main loop is currently being run via g_main_loop_run(). - - - - - - a #GMainLoop. - - - - %TRUE if the mainloop is currently being run. - - - - - -Return value: a newly allocated string or %NULL if the specified - - - - - a #GBookmarkFile - - - - a valid URI or %NULL - - - - return location for a #GError, or %NULL - - - - a newly allocated string or %NULL if the specified -URI cannot be found. - -Since: 2.12 - - - - - -Creates a new #GString, initialized with the given string. - - - - - - the initial text to copy into the string - - - - the new #GString - - - - - -Converts an absolute filename to an escaped ASCII-encoded URI, with the path -component following Section 3.3. of RFC 2396. - - - - - - an absolute filename specified in the GLib file name encoding, -which is the on-disk file name bytes on Unix, and UTF-8 on -Windows - - - - A UTF-8 encoded hostname, or %NULL for none. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - a newly-allocated string holding the resulting -URI, or %NULL on an error. - - - - - -Converts a #GString to lowercase. - - - - - - a #GString - - - - the #GString. - -Deprecated:2.2: This function uses the locale-specific -tolower() function, which is almost never the right thing. -Use g_string_ascii_down() or g_utf8_strdown() instead. - - - - - -Converts a string to upper case. - - - - - - the string to convert. - - - - the string - -Deprecated:2.2: This function is totally broken for the reasons discussed -in the g_strncasecmp() docs - use g_ascii_strup() or g_utf8_strup() instead. - - - - - -Returns: ISO 8601 week number of the year. - - - - - a valid #GDate - - - - ISO 8601 week number of the year. - -Since: 2.6 - - - - - -Try to determine the installation directory for a software package. - -@package should be a short identifier for the package. Typically it -is the same identifier as used for -&lt;literal&gt;GETTEXT_PACKAGE&lt;/literal&gt; in software configured using GNU -autotools. The function first looks in the Windows Registry for the -value &lt;literal&gt;&num;InstallationDirectory&lt;/literal&gt; in the key -&lt;literal&gt;&num;HKLM\Software\@package&lt;/literal&gt;, and if that value -exists and is a string, returns that. - -It is strongly recommended that packagers of GLib-using libraries -for Windows do not store installation paths in the Registry to be -used by this function as that interfers with having several -parallel installations of the library. Parallel installations of -different versions of some GLib-using library, or GLib itself, -might well be desirable for various reasons. - -For the same reason it is recommeded to always pass %NULL as -@package to this function, to avoid the temptation to use the -Registry. - -If @package is %NULL, or the above value isn't found in the -Registry, but @dll_name is non-%NULL, it should name a DLL loaded -into the current process. Typically that would be the name of the -DLL calling this function, looking for its installation -directory. The function then asks Windows what directory that DLL -was loaded from. If that directory's last component is "bin" or -"lib", the parent directory is returned, otherwise the directory -itself. If that DLL isn't loaded, the function proceeds as if -@dll_name was %NULL. - -If both @package and @dll_name are %NULL, the directory from where -the main executable of the process was loaded is used instead in -the same way as above. - - - - - - An identifier for a software package, or %NULL, in UTF-8 - - - - The name of a DLL that a package provides, or %NULL, in UTF-8 - - - - a string containing the installation directory for -@package. The string is in the GLib file name encoding, i.e. UTF-8 -on Windows. The return value should be freed with g_free() when not -needed any longer. - - - - - -Stops all currently unused threads. This does not change the -maximal number of unused threads. This function can be used to -regularly stop all unused threads e.g. from g_timeout_add(). - - - - - - - - - -Return value: the number of key/value pairs in the #GHashTable. - - - - - a #GHashTable. - - - - the number of key/value pairs in the #GHashTable. - - - - - -Removes @key in @group_name from the key file. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key name to remove - - - - return location for a #GError or %NULL - - - - - - - - -Gets the priority of a source. - - - - - - a #GSource - - - - the priority of the source - - - - - -Replaces all occurances of the pattern in @regex with the -replacement text. @replacement is replaced literally, to -include backreferences use g_regex_replace(). - -Setting @start_position differs from just passing over a -shortened string and setting #G_REGEX_MATCH_NOTBOL in the -case of a pattern that begins with any kind of lookbehind -assertion, such as "\b". - - - - - - a #GRegex structure - - - - the string to perform matches against - - - - the length of @string, or -1 if @string is nul-terminated - - - - starting index of the string to match - - - - text to replace each match with - - - - options for the match - - - - location to store the error occuring, or %NULL to ignore errors - - - - a newly allocated string containing the replacements - -Since: 2.14 - - - - - -Finds the first link in @queue which contains @data. - - - - - - a #GQueue - - - - data to find - - - - The first link in @queue which contains @data. - -Since: 2.4 - - - - - -Creates a new empty #GBookmarkFile object. - -Use g_bookmark_file_load_from_file(), g_bookmark_file_load_from_data() -or g_bookmark_file_load_from_data_dirs() to read an existing bookmark -file. - - - - - - an empty #GBookmarkFile - -Since: 2.12 - - - - - -Checks whether the bookmark for @uri inside @bookmark has been -registered by application @name. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - the name of the application - - - - return location for a #GError or %NULL - - - - %TRUE if the application @name was found - -Since: 2.12 - - - - - -Removes and returns the link at the given position. - - - - - - a #GQueue - - - - the link's position - - - - The @n'th link, or %NULL if @n is off the end of @queue. - -Since: 2.4 - - - - - -Setting this flag to %TRUE for a channel you have already closed -can cause problems. - - - - - a #GIOChannel - - - - Whether to close the channel on the final unref of -the GIOChannel data structure. The default value of -this is %TRUE for channels created by g_io_channel_new_file (), -and %FALSE for all other channels. - - - - - - - - -Pops data from the @queue. This function blocks until data become -available. - - - - - - a #GAsyncQueue. - - - - data from the queue. - - - - - -Decreases the reference count of the asynchronous @queue by 1 and -releases the lock. This function must be called while holding the -@queue's lock. If the reference count went to 0, the @queue will be -destroyed and the memory allocated will be freed. - -@Deprecated: Since 2.8, reference counting is done atomically -so g_async_queue_unref() can be used regardless of the @queue's -lock. - - - - - a #GAsyncQueue. - - - - - - - - -Returns: the description - - - - - a #GOptionContext - - - - the description - -Since: 2.12 - - - - - -Copies a nul-terminated string into the dest buffer, include the -trailing nul, and return a pointer to the trailing nul byte. -This is useful for concatenating multiple strings together -without having to repeatedly scan for the end. - - - - - - destination buffer. - - - - source string. - - - - a pointer to trailing nul byte. - - - - - -Inserts a byte into a #GString, expanding it if necessary. - - - - - - a #GString - - - - the position to insert the byte - - - - the byte to insert - - - - @string - - - - - -Gets the time the bookmark for @uri was added to @bookmark - -In the event the URI cannot be found, -1 is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - a timestamp - -Since: 2.12 - - - - - -Close an IO channel. Any pending data to be written will be -flushed if @flush is %TRUE. The channel will not be freed until the -last reference is dropped using g_io_channel_unref(). - - - - - - a #GIOChannel - - - - if %TRUE, flush pending - - - - location to store a #GIOChannelError - - - - the status of the operation. - - - - - -Convert a string from UCS-4 to UTF-16. A 0 character will be -added to the result after the converted text. - - - - - - a UCS-4 encoded string - - - - the maximum length (number of characters) of @str to use. -If @len &lt; 0, then the string is terminated with a 0 character. - - - - location to store number of bytes read, or %NULL. -If an error occurs then the index of the invalid input -is stored here. - - - - location to store number of &lt;type&gt;gunichar2&lt;/type&gt; -written, or %NULL. The value stored here does not -include the trailing 0. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError other than -%G_CONVERT_ERROR_NO_CONVERSION may occur. - - - - a pointer to a newly allocated UTF-16 string. -This value must be freed with g_free(). If an -error occurs, %NULL will be returned and -@error set. - - - - - -Return value: the number of unprocessed tasks - - - - - a #GThreadPool - - - - the number of unprocessed tasks - - - - - -Sets the maximal number of unused threads to @max_threads. If -@max_threads is -1, no limit is imposed on the number of unused -threads. - - - - - maximal number of unused threads - - - - - - - - -Sets @description as the description of the bookmark for @uri. - -If @uri is %NULL, the description of @bookmark is set. - -If a bookmark for @uri cannot be found then it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI or %NULL - - - - a string - - - - - - - - -Convert a sequence of bytes encoded as UTF-8 to a Unicode character. -This function checks for incomplete characters, for invalid characters -such as characters that are out of the range of Unicode, and for -overlong encodings of valid characters. - - - - - - a pointer to Unicode character encoded as UTF-8 - - - - the maximum number of bytes to read, or -1, for no maximum or -if @p is nul-terminated - - - - the resulting character. If @p points to a partial -sequence at the end of a string that could begin a valid -character (or if @max_len is zero), returns (gunichar)-2; -otherwise, if @p does not point to a valid UTF-8 encoded -Unicode character, returns (gunichar)-1. - - - - - -Convert a string from UTF-8 to a 32-bit fixed width -representation as UCS-4, assuming valid UTF-8 input. -This function is roughly twice as fast as g_utf8_to_ucs4() -but does no error checking on the input. - - - - - - a UTF-8 encoded string - - - - the maximum length of @str to use. If @len &lt; 0, then -the string is nul-terminated. - - - - location to store the number of characters in the -result, or %NULL. - - - - a pointer to a newly allocated UCS-4 string. -This value must be freed with g_free(). - - - - - -Inserts a new key and value into a #GHashTable similar to -g_hash_table_insert(). The difference is that if the key already exists -in the #GHashTable, it gets replaced by the new key. If you supplied a -@value_destroy_func when creating the #GHashTable, the old value is freed -using that function. If you supplied a @key_destroy_func when creating the -#GHashTable, the old key is freed using that function. - - - - - a #GHashTable. - - - - a key to insert. - - - - the value to associate with the key. - - - - - - - - -Removes the source with the given id from the default main context. -The id of -a #GSource is given by g_source_get_id(), or will be returned by the -functions g_source_attach(), g_idle_add(), g_idle_add_full(), -g_timeout_add(), g_timeout_add_full(), g_child_watch_add(), -g_child_watch_add_full(), g_io_add_watch(), and g_io_add_watch_full(). - -See also g_source_destroy(). - - - - - - the ID of the source to remove. - - - - %TRUE if the source was found and removed. - - - - - -Sets a function to be called at regular intervals, with @priority. -The function is called repeatedly until it returns %FALSE, at which -point the timeout is automatically destroyed and the function will -not be called again. - -Unlike g_timeout_add(), this function operates at whole second granularity. -The initial starting point of the timer is determined by the implementation -and the implementation is expected to group multiple timers together so that -they fire all at the same time. -To allow this grouping, the @interval to the first timer is rounded -and can deviate up to one second from the specified interval. -Subsequent timer iterations will generally run at the specified interval. - -Note that timeout functions may be delayed, due to the processing of other -event sources. Thus they should not be relied on for precise timing. -After each call to the timeout function, the time of the next -timeout is recalculated based on the current time and the given @interval - -If you want timing more precise than whole seconds, use g_timeout_add() -instead. - -The grouping of timers to fire at the same time results in a more power -and CPU efficient behavior so if your timer is in multiples of seconds -and you don't require the first timer exactly one second from now, the -use of g_timeout_add_seconds() is preferred over g_timeout_add(). - - - - - - the priority of the timeout source. Typically this will be in -the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. - - - - the time between calls to the function, in seconds - - - - function to call - - - - data to pass to @function - - - - function to call when the timeout is removed, or %NULL - - - - the ID (greater than 0) of the event source. - -Since: 2.14 - - - - - -Inserts @data into @queue using @func to determine the new position. - -Since: 2.4 - - - - - a #GQueue - - - - the data to insert - - - - the #GCompareDataFunc used to compare elements in the queue. It is -called with two elements of the @queue and @user_data. It should -return 0 if the elements are equal, a negative value if the first -element comes before the second, and a positive value if the second -element comes before the first. - - - - user data passed to @func. - - - - - - - - -Inserts a copy of a string into a #GString, -expanding it if necessary. - - - - - - a #GString - - - - the position to insert the copy of the string - - - - the string to insert - - - - @string - - - - - -Return value: a string owned by GLib that must not be modified - - - - - a string owned by GLib that must not be modified -or freed. -Since: 2.6 - - - - - -Pops data from the @queue. This function blocks until data become -available. This function must be called while holding the @queue's -lock. - - - - - - a #GAsyncQueue. - - - - data from the queue. - - - - - -Creates a new #GError; unlike g_error_new(), @message is not -a printf()-style format string. Use this -function if @message contains text you don't have control over, -that could include printf() escape sequences. - - - - - - error domain - - - - error code - - - - error message - - - - a new #GError - - - - - -Frees a #GOptionGroup. Note that you must &lt;emphasis&gt;not&lt;/emphasis&gt; -free groups which have been added to a #GOptionContext. - -Since: 2.6 - - - - - a #GOptionGroup - - - - - - - - -Return value: length of @str_array. - - - - - a %NULL-terminated array of strings. - - - - length of @str_array. - -Since: 2.6 - - - - - -Return value: The position of @link_, or -1 if the link is - - - - - a #Gqueue - - - - A #GList link - - - - The position of @link_, or -1 if the link is -not part of @queue - -Since: 2.4 - - - - - -On some platforms, notably WIN32, the #GPid type represents a resource -which must be closed to prevent resource leaking. g_spawn_close_pid() -is provided for this purpose. It should be used on all platforms, even -though it doesn't do anything under UNIX. - - - - - The process identifier to close - - - - - - - - -Same as the standard UNIX routine iconv_open(), but -may be implemented via libiconv on UNIX flavors that lack -a native implementation. - -GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers. - - - - - - destination codeset - - - - source codeset - - - - a "conversion descriptor", or (GIConv)-1 if -opening the converter failed. - - - - - -Frees the memory allocated for the #GRand. - - - - - a #GRand. - - - - - - - - -Adds the options specified in @entries to @group. - -Since: 2.6 - - - - - a #GOptionGroup - - - - a %NULL-terminated array of #GOptionEntry&lt;!-- --&gt;s - - - - - - - - -Sets a list of group names for the item with URI @uri. Each previously -set group name list is removed. - -If @uri cannot be found then an item for it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - an item's URI - - - - an array of group names, or %NULL to remove all groups - - - - number of group name values in @groups - - - - - - - - -Return value: Whether the channel will be closed on the final unref of - - - - - a #GIOChannel. - - - - Whether the channel will be closed on the final unref of -the GIOChannel data structure. - - - - - -Return value: a newly-allocated %NULL-terminated array of strings. - - - - - a #GKeyFile - - - - return location for the number of returned groups, or %NULL - - - - a newly-allocated %NULL-terminated array of strings. -Use g_strfreev() to free it. -Since: 2.6 - - - - - -Increases the reference count on a source by one. - - - - - - a #GSource - - - - @source - - - - - -Converts a string which is in the encoding used by GLib for -filenames into a UTF-8 string. Note that on Windows GLib uses UTF-8 -for filenames; on other platforms, this function indirectly depends on -the &lt;link linkend="setlocale"&gt;current locale&lt;/link&gt;. - - - - - - a string in the encoding for filenames - - - - the length of the string, or -1 if the string is -nul-terminated&lt;footnoteref linkend="nul-unsafe"/&gt;. - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. If the error -#G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - The converted string, or %NULL on an error. - - - - - -Searches the string @haystack for the last occurrence -of the string @needle. - - - - - - a nul-terminated string. - - - - the nul-terminated string to search for. - - - - a pointer to the found occurrence, or -%NULL if not found. - - - - - -Returns: #GRegex object used in @match_info - - - - - a #GMatchInfo - - - - #GRegex object used in @match_info - -Since: 2.14 - - - - - -Calls @func for each item in the range (@begin, @end) passing -@user_data to the function. - -Since: 2.14 - - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - a #GFunc - - - - user data passed to @func - - - - - - - - -Tries to become the owner of the specified context, -as with g_main_context_acquire(). But if another thread -is the owner, atomically drop @mutex and wait on @cond until -that owner releases ownership or until @cond is signaled, then -try again (once) to become the owner. - - - - - - a #GMainContext - - - - a condition variable - - - - a mutex, currently held - - - - %TRUE if the operation succeeded, and -this thread is now the owner of @context. - - - - - -Sets the value of a date from a &lt;type&gt;time_t&lt;/type&gt; value. - -To set the value of a date to the current day, you could write: -&lt;informalexample&gt;&lt;programlisting&gt; -g_date_set_time_t (date, time (NULL)); -&lt;/programlisting&gt;&lt;/informalexample&gt; - -Since: 2.10 - - - - - a #GDate - - - - &lt;type&gt;time_t&lt;/type&gt; value to set - - - - - - - - -Places a comment above @key from @group_name. -@group_name. If @key is %NULL then @comment will -be written above @group_name. If both @key -and @group_name are NULL, then @comment will -be written above the first group in the file. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name, or %NULL - - - - a key - - - - a comment - - - - return location for a #GError - - - - - - - - - - - - - The quark used as %G_IO_CHANNEL_ERROR - - - - - -Adds a #GOptionGroup to the @context, so that parsing with @context -will recognize the options in the group. Note that the group will -be freed together with the context when g_option_context_free() is -called, so you must not free the group yourself after adding it -to a context. - -Since: 2.6 - - - - - a #GOptionContext - - - - the group to add - - - - - - - - -Calls the given function for each key/value pair in the #GHashTable. -If the function returns %TRUE, then the key/value pair is removed from the -#GHashTable. If you supplied key or value destroy functions when creating -the #GHashTable, they are used to free the memory allocated for the removed -keys and values. - - - - - - a #GHashTable. - - - - the function to call for each key/value pair. - - - - user data to pass to the function. - - - - the number of key/value pairs removed. - - - - - -Creates a new random number generator initialized with @seed. - - - - - - an array of seeds to initialize the random number generator. - - - - an array of seeds to initialize the random number generator. - - - - the new #GRand. - -Since: 2.4 - - - - - -Converts a Unicode character into UTF-8, and prepends it -to the string. - - - - - - a #GString - - - - a Unicode character - - - - @string - - - - - -Initializes the random number generator by an array of -longs. Array can be of arbitrary size, though only the -first 624 values are taken. This function is useful -if you have many low entropy seeds, or if you require more then -32bits of actual entropy for your application. - -Since: 2.4 - - - - - a #GRand. - - - - array to initialize with - - - - length of array - - - - - - - - -Scans for a match in @string for @pattern. - -This function is equivalent to g_regex_match() but it does not -require to compile the pattern with g_regex_new(), avoiding some -lines of code when you need just to do a match without extracting -substrings, capture counts, and so on. - -If this function is to be called on the same @pattern more than -once, it's more efficient to compile the pattern once with -g_regex_new() and then use g_regex_match(). - - - - - - the regular expression - - - - the string to scan for matches - - - - compile options for the regular expression - - - - match options - - - - %TRUE is the string matched, %FALSE otherwise - -Since: 2.14 - - - - - -Converts a string which is in the encoding used for strings by -the C runtime (usually the same as that used by the operating -system) in the &lt;link linkend="setlocale"&gt;current locale&lt;/link&gt; into a -UTF-8 string. - - - - - - a string in the encoding of the current locale. On Windows -this means the system codepage. - - - - the length of the string, or -1 if the string is -nul-terminated&lt;footnoteref linkend="nul-unsafe"/&gt;. - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. If the error -#G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - The converted string, or %NULL on an error. - - - - - -Return value: a newly allocated string or %NULL if the specified - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for a #GError, or %NULL - - - - a newly allocated string or %NULL if the specified -key cannot be found. - -Since: 2.6 - - - - - -Removes a file descriptor from the set of file descriptors polled for -this source. - - - - -a #GSource - - - - a #GPollFD structure previously passed to g_source_add_poll(). - - - - - - - - -Using the standard algorithm for regular expression matching only -the longest match in the string is retrieved, it is not possibile -to obtain all the available matches. For instance matching -"&lt;a&gt; &lt;b&gt; &lt;c&gt;" against the pattern "&lt;.*&gt;" -you get "&lt;a&gt; &lt;b&gt; &lt;c&gt;". - -This function uses a different algorithm (called DFA, i.e. deterministic -finite automaton), so it can retrieve all the possible matches, all -starting at the same point in the string. For instance matching -"&lt;a&gt; &lt;b&gt; &lt;c&gt;" against the pattern "&lt;.*&gt;" -you would obtain three matches: "&lt;a&gt; &lt;b&gt; &lt;c&gt;", -"&lt;a&gt; &lt;b&gt;" and "&lt;a&gt;". - -The number of matched strings is retrieved using -g_match_info_get_match_count(). To obtain the matched strings and -their position you can use, respectively, g_match_info_fetch() and -g_match_info_fetch_pos(). Note that the strings are returned in -reverse order of length; that is, the longest matching string is -given first. - -Note that the DFA algorithm is slower than the standard one and it -is not able to capture substrings, so backreferences do not work. - -Setting @start_position differs from just passing over a shortened -string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b". - -A #GMatchInfo structure, used to get information on the match, is -stored in @match_info if not %NULL. Note that if @match_info is -not %NULL then it is created even if the function returns %FALSE, -i.e. you must free it regardless if regular expression actually -matched. - - - - - - a #GRegex structure from g_regex_new() - - - - the string to scan for matches - - - - the length of @string, or -1 if @string is nul-terminated - - - - starting index of the string to match - - - - match options - - - - pointer to location where to store the #GMatchInfo, -or %NULL if you do not need it - - - - location to store the error occuring, or %NULL to ignore errors - - - - %TRUE is the string matched, %FALSE otherwise - -Since: 2.14 - - - - - -Gets the real name of the user. This usually comes from the user's entry -in the &lt;filename&gt;passwd&lt;/filename&gt; file. The encoding of the returned -string is system-defined. (On Windows, it is, however, always UTF-8.) -If the real user name cannot be determined, the string "Unknown" is -returned. - - - - - - the user's real name. - - - - - -Frees a %NULL-terminated array of strings, and the array itself. -If called on a %NULL value, g_strfreev() simply returns. - - - - - a %NULL-terminated array of strings to free. - - - - - - - - -Adds a byte onto the end of a #GString, expanding -it if necessary. - - - - - - a #GString - - - - the byte to append onto the end of @string - - - - @string - - - - - -Associates a new value with @key under @group_name. If @key -cannot be found then it is created. If @group_name cannot be -found then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - a string - - - - - - - - -Set the pointer at the specified location to %NULL. - - - - - the memory address of the pointer. - - - - - - - - -Associates a list of integer values with @key under -@group_name. If @key cannot be found then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an array of integer values - - - - number of integer values in @list - - - - - - - - -Returns: a pointer into @file_name after the root component. - - - - - a file name. - - - - a pointer into @file_name after the root component. - - - - - -Return value: the length of the string in characters - - - - - pointer to the start of a UTF-8 encoded string. - - - - the maximum number of bytes to examine. If @max -is less than 0, then the string is assumed to be -nul-terminated. If @max is 0, @p will not be examined and -may be %NULL. - - - - the length of the string in characters - - - - - -Same as the standard UNIX routine iconv(), but -may be implemented via libiconv on UNIX flavors that lack -a native implementation. - -GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers. - - - - - - conversion descriptor from g_iconv_open() - - - - bytes to convert - - - - inout parameter, bytes remaining to convert in @inbuf - - - - converted output bytes - - - - inout parameter, bytes available to fill in @outbuf - - - - count of non-reversible conversions, or -1 on error - - - - - -Dispatches all pending sources. - - - - - a #GMainContext - - - - - - - - -Swaps the items pointed to by @a and @b. It is allowed for @a and @b -to point into difference sequences. - -Since: 2.14 - - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - - - - - -Gets the last component of the filename. If @file_name ends with a -directory separator it gets the component before the last slash. If -@file_name consists only of directory separators (and on Windows, -possibly a drive letter), a single separator is returned. If -@file_name is empty, it gets ".". - - - - - - the name of the file. - - - - a newly allocated string containing the last component of -the filename. - - - - - -Remove all elemeents in @queue which contains @data. - -Since: 2.4 - - - - - a #GQueue - - - - data to remove - - - - - - - - -Inserts @data into @queue using @func to determine the new -position. - -This function requires that the @queue is sorted before pushing on -new elements. - -This function is called while holding the @queue's lock. - -For an example of @func see g_async_queue_sort(). - -Since: 2.10 - - - - - a #GAsyncQueue - - - - the @data to push into the @queue - - - - the #GCompareDataFunc is used to sort @queue. This function -is passed two elements of the @queue. The function should return -0 if they are equal, a negative value if the first element -should be higher in the @queue or a positive value if the first -element should be lower in the @queue than the second element. - - - - user data passed to @func. - - - - - - - - -Enables or disables automatic generation of &lt;option&gt;--help&lt;/option&gt; -output. By default, g_option_context_parse() recognizes -&lt;option&gt;--help&lt;/option&gt;, &lt;option&gt;-?&lt;/option&gt;, &lt;option&gt;--help-all&lt;/option&gt; -and &lt;option&gt;--help-&lt;/option&gt;&lt;replaceable&gt;groupname&lt;/replaceable&gt; and creates -suitable output to stdout. - -Since: 2.6 - - - - - a #GOptionContext - - - - %TRUE to enable &lt;option&gt;--help&lt;/option&gt;, %FALSE to disable it - - - - - - - - -Writes a formatted string into a #GString. -This is similar to the standard sprintf() function, -except that the #GString buffer automatically expands -to contain the results. The previous contents of the -#GString are destroyed. - -Deprecated: This function has been renamed to g_string_printf(). - - - - - a #GString - - - - the string format. See the sprintf() documentation - - - - the parameters to insert into the format string - - - - - - - - -Frees a #GKeyFile. - -Since: 2.6 - - - - - a #GKeyFile - - - - - - - - -Calls the given function for each node in the #GTree. - -Deprecated:2.2: The order of a balanced tree is somewhat arbitrary. If you -just want to visit all nodes in sorted order, use g_tree_foreach() -instead. If you really need to visit nodes in a different order, consider -using an &lt;link linkend="glib-N-ary-Trees"&gt;N-ary Tree&lt;/link&gt;. - - - - - a #GTree. - - - - the function to call for each node visited. If this -function returns %TRUE, the traversal is stopped. - - - - the order in which nodes are visited, one of %G_IN_ORDER, -%G_PRE_ORDER and %G_POST_ORDER. - - - - user data to pass to the function. - - - - - - - - -Overwrites part of a string, lengthening it if necessary. - - - - - - a #GString - - - - the position at which to start overwriting - - - - the string that will overwrite the @string starting at @pos - - - - @string - -Since: 2.14 - - - - - -Return value: A random number. - - - - - a #GRand. - - - - lower closed bound of the interval. - - - - upper open bound of the interval. - - - - A random number. - - - - - -Determines the preferred character sets used for filenames. -The first character set from the @charsets is the filename encoding, the -subsequent character sets are used when trying to generate a displayable -representation of a filename, see g_filename_display_name(). - -On Unix, the character sets are determined by consulting the -environment variables &lt;envar&gt;G_FILENAME_ENCODING&lt;/envar&gt; and -&lt;envar&gt;G_BROKEN_FILENAMES&lt;/envar&gt;. On Windows, the character set -used in the GLib API is always UTF-8 and said environment variables -have no effect. - -&lt;envar&gt;G_FILENAME_ENCODING&lt;/envar&gt; may be set to a comma-separated list -of character set names. The special token "&commat;locale" is taken to -mean the character set for the &lt;link linkend="setlocale"&gt;current -locale&lt;/link&gt;. If &lt;envar&gt;G_FILENAME_ENCODING&lt;/envar&gt; is not set, but -&lt;envar&gt;G_BROKEN_FILENAMES&lt;/envar&gt; is, the character set of the current -locale is taken as the filename encoding. If neither environment variable -is set, UTF-8 is taken as the filename encoding, but the character -set of the current locale is also put in the list of encodings. - -The returned @charsets belong to GLib and must not be freed. - -Note that on Unix, regardless of the locale character set or -&lt;envar&gt;G_FILENAME_ENCODING&lt;/envar&gt; value, the actual file names present -on a system might be in any random encoding or just gibberish. - - - - - - return location for the %NULL-terminated list of encoding names - - - - %TRUE if the filename encoding is UTF-8. - -Since: 2.6 - - - - - -Gets the pattern string associated with @regex, i.e. a copy of -the string passed to g_regex_new(). - - - - - - a #GRegex structure - - - - the pattern of @regex - -Since: 2.14 - - - - - -Gets the "current time" to be used when checking -this source. The advantage of calling this function over -calling g_get_current_time() directly is that when -checking multiple sources, GLib can cache a single value -instead of having to repeatedly get the system time. - - - - - a #GSource - - - - #GTimeVal structure in which to store current time. - - - - - - - - -Pushes the @data into the @queue. @data must not be %NULL. This -function must be called while holding the @queue's lock. - - - - - a #GAsyncQueue. - - - - @data to push into the @queue. - - - - - - - - -Returns: the number of the highest back reference - - - - - a #GRegex - - - - the number of the highest back reference - -Since: 2.14 - - - - - -Return value: the last link in @queue, or %NULL if @queue is empty - - - - - a #GQueue - - - - the last link in @queue, or %NULL if @queue is empty - -Since: 2.4 - - - - - -Creates a path from a series of elements using @separator as the -separator between elements. At the boundary between two elements, -any trailing occurrences of separator in the first element, or -leading occurrences of separator in the second element are removed -and exactly one copy of the separator is inserted. - -Empty elements are ignored. - -The number of leading copies of the separator on the result is -the same as the number of leading copies of the separator on -the first non-empty element. - -The number of trailing copies of the separator on the result is -the same as the number of trailing copies of the separator on -the last non-empty element. (Determination of the number of -trailing copies is done without stripping leading copies, so -if the separator is &lt;literal&gt;ABA&lt;/literal&gt;, &lt;literal&gt;ABABA&lt;/literal&gt; -has 1 trailing copy.) - -However, if there is only a single non-empty element, and there -are no characters in that element not part of the leading or -trailing separators, then the result is exactly the original value -of that element. - -Other than for determination of the number of leading and trailing -copies of the separator, elements consisting only of copies -of the separator are ignored. - - - - - - a string used to separator the elements of the path. - - - - the first element in the path - - - - remaining elements in path, terminated by %NULL - - - - a newly-allocated string that must be freed with g_free(). - - - - - -Determines the numeric value of a character as a hexidecimal -digit. Differs from g_unichar_xdigit_value() because it takes -a char, so there's no worry about sign extension if characters -are signed. - - - - - - an ASCII character. - - - - If @c is a hex digit (according to -g_ascii_isxdigit()), its numeric value. Otherwise, -1. - - - - - -Retrieves the description of the bookmark for @uri. - -In the event the URI cannot be found, %NULL is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - a newly allocated string or %NULL if the specified -URI cannot be found. - -Since: 2.12 - - - - - -Frees the memory allocated for @seq. If @seq has a data destroy -function associated with it, that function is called on all items in -@seq. - -Since: 2.14 - - - - - a #GSequence - - - - - - - - -Sets the seed for the global random number generator, which is used -by the &lt;function&gt;g_random_*&lt;/function&gt; functions, to @seed. - - - - - a value to reinitialize the global random number generator. - - - - - - - - -Adds a new item to the end of @seq. - - - - - - a #GSequencePointer - - - - the data for the new item - - - - an iterator pointing to the new item - -Since: 2.14 - - - - - -Sets the priority of a source. While the main loop is being -run, a source will be dispatched if it is ready to be dispatched and no sources -at a higher (numerically smaller) priority are ready to be dispatched. - - - - - a #GSource - - - - the new priority. - - - - - - - - -Breaks the string on the pattern, and returns an array of -the tokens. If the pattern contains capturing parentheses, -then the text for each of the substrings will also be returned. -If the pattern does not match anywhere in the string, then the -whole string is returned as the first token. - -This function is equivalent to g_regex_split() but it does -not require to compile the pattern with g_regex_new(), avoiding -some lines of code when you need just to do a split without -extracting substrings, capture counts, and so on. - -If this function is to be called on the same @pattern more than -once, it's more efficient to compile the pattern once with -g_regex_new() and then use g_regex_split(). - -As a special case, the result of splitting the empty string "" -is an empty vector, not a vector containing a single string. -The reason for this special case is that being able to represent -a empty vector is typically more useful than consistent handling -of empty elements. If you do need to represent empty elements, -you'll need to check for the empty string before calling this -function. - -A pattern that can match empty strings splits @string into -separate characters wherever it matches the empty string between -characters. For example splitting "ab c" using as a separator -"\s*", you will get "a", "b" and "c". - - - - - - the regular expression - - - - the string to scan for matches - - - - compile options for the regular expression - - - - match options - - - - a %NULL-terminated gchar ** array. Free it using g_strfreev() - -Since: 2.14 - - - - - -Calls @func for each item in the sequence passing @user_data -to the function. - -Since: 2.14 - - - - - a #GSequence - - - - the function to call for each item in @seq - - - - user data passed to @func - - - - - - - - -Removes all keys and their associated values from a #GHashTable -without calling the key and value destroy functions. - -Since: 2.12 - - - - - a #GHashTable. - - - - - - - - -Opens a file for writing in the preferred directory for temporary -files (as returned by g_get_tmp_dir()). - -@tmpl should be a string in the GLib file name encoding containing -a sequence of six 'X' characters, as the parameter to g_mkstemp(). -However, unlike these functions, the template should only be a -basename, no directory components are allowed. If template is -%NULL, a default template is used. - -Note that in contrast to g_mkstemp() (and mkstemp()) -@tmpl is not modified, and might thus be a read-only literal string. - -The actual name used is returned in @name_used if non-%NULL. This -string should be freed with g_free() when not needed any longer. -The returned name is in the GLib file name encoding. - - - - - - Template for file name, as in g_mkstemp(), basename only, -or %NULL, to a default template - - - - location to store actual name used - - - - return location for a #GError - - - - A file handle (as from open()) to -the file opened for reading and writing. The file is opened in binary -mode on platforms where there is a difference. The file handle should be -closed with close(). In case of errors, -1 is returned -and @error will be set. - - - - - -Removes file descriptor from the set of file descriptors to be -polled for a particular context. - - - - -a #GMainContext - - - - a #GPollFD descriptor previously added with g_main_context_add_poll() - - - - - - - - -Return value: the ID (greater than 0) for the source - - - - - a #GSource - - - - the ID (greater than 0) for the source - - - - - -Returns: the contents of @file. - - - - - a #GMappedFile - - - - the contents of @file. - -Since: 2.8 - - - - - -Compares two #gpointer arguments and returns %TRUE if they are equal. -It can be passed to g_hash_table_new() as the @key_equal_func -parameter, when using pointers as keys in a #GHashTable. - - - - - - a key. - - - - a key to compare with @v1. - - - - %TRUE if the two keys match. - - - - - -Creates a new #GHashTable with a reference count of 1. - - - - - - a function to create a hash value from a key. -Hash values are used to determine where keys are stored within the -#GHashTable data structure. The g_direct_hash(), g_int_hash() and -g_str_hash() functions are provided for some common types of keys. -If hash_func is %NULL, g_direct_hash() is used. - - - - a function to check two keys for equality. This is -used when looking up keys in the #GHashTable. The g_direct_equal(), -g_int_equal() and g_str_equal() functions are provided for the most -common types of keys. If @key_equal_func is %NULL, keys are compared -directly in a similar fashion to g_direct_equal(), but without the -overhead of a function call. - - - - a new #GHashTable. - - - - - -Gets the number of nodes in a #GTree. - - - - - - a #GTree. - - - - the number of nodes in the #GTree. - - - - - -Loads a bookmark file from memory into an empty #GBookmarkFile -structure. If the object cannot be created then @error is set to a -#GBookmarkFileError. - - - - - - an empty #GBookmarkFile struct - - - - desktop bookmarks loaded in memory - - - - the length of @data in bytes - - - - return location for a #GError, or %NULL - - - - %TRUE if a desktop bookmark could be loaded. - -Since: 2.12 - - - - - -A convenience function to use gettext() for translating -user-visible strings. - -Since: 2.12 - - - - - a #GOptionContext - - - - the domain to use - - - - - - - - -The setlocale() function in the Microsoft C library uses locale -names of the form "English_United States.1252" etc. We want the -UNIXish standard form "en_US", "zh_TW" etc. This function gets the -current thread locale from Windows - without any encoding info - -and returns it as a string of the above form for use in forming -file names etc. The returned string should be deallocated with -g_free(). - - - - - - newly-allocated locale name. - - - - - -Return value: the #GSequence that @iter points into. - - - - - a #GSequenceIter - - - - the #GSequence that @iter points into. - -Since: 2.14 - - - - - -Retrieves the name of the currently open element. - -Since: 2.2 - - - - - a #GMarkupParseContext - - - - the name of the currently open element, or %NULL - - - - - -A wrapper for the POSIX rename() function. The rename() function -renames a file, moving it between directories if required. - -See your C library manual for more details about how rename() works -on your system. Note in particular that on Win9x it is not possible -to rename a file if a file with the new name already exists. Also -it is not possible in general on Windows to rename an open file. - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - a pathname in the GLib file name encoding - - - - 0 if the renaming succeeded, -1 if an error occurred - -Since: 2.6 - - - - - -Gets the buffer size. - - - - - - a #GIOChannel - - - - the size of the buffer. - - - - - -Copies a @queue. Note that is a shallow copy. If the elements in the -queue consist of pointers to data, the pointers are copied, but the -actual data is not. - - - - - - a #GQueue - - - - A copy of @queue - -Since: 2.4 - - - - - -Sorts @queue using @compare_func. - -Since: 2.4 - - - - - a #GQueue - - - - the #GCompareDataFunc used to sort @queue. This function -is passed two elements of the queue and should return 0 if they are -equal, a negative value if the first comes before the second, and -a positive value if the second comes before the first. - - - - user data passed to @compare_func - - - - - - - - -Looks up a key in the #GTree, returning the original key and the -associated value and a #gboolean which is %TRUE if the key was found. This -is useful if you need to free the memory allocated for the original key, -for example before calling g_tree_remove(). - - - - - - a #GTree. - - - - the key to look up. - - - - returns the original key. - - - - returns the value associated with the key. - - - - %TRUE if the key was found in the #GTree. - - - - - -Determines if a character is uppercase. - - - - - - a Unicode character - - - - %TRUE if @c is an uppercase character - - - - - -Determines the numeric value of a character as a decimal -digit. - - - - - - a Unicode character - - - - If @c is a decimal digit (according to -g_unichar_isdigit()), its numeric value. Otherwise, -1. - - - - - -Removes application registered with @name from the list of applications -that have registered a bookmark for @uri inside @bookmark. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. -In the event that no application with name @app_name has registered -a bookmark for @uri, %FALSE is returned and error is set to -#G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - the name of the application - - - - return location for a #GError or %NULL - - - - %TRUE if the application was successfully removed. - -Since: 2.12 - - - - - -Calls a function for each element of a #GPtrArray. - -Since: 2.4 - - - - - a #GPtrArray - - - - the function to call for each array element - - - - user data to pass to the function - - - - - - - - -Copies the bytes from a string into a #GString, -destroying any previous contents. It is rather like -the standard strcpy() function, except that you do not -have to worry about having enough space to copy the string. - - - - - - the destination #GString. Its current contents -are destroyed. - - - - the string to copy into @string - - - - @string - - - - - -Sets a #GOptionGroup as main group of the @context. -This has the same effect as calling g_option_context_add_group(), -the only difference is that the options in the main group are -treated differently when generating &lt;option&gt;--help&lt;/option&gt; output. - -Since: 2.6 - - - - - a #GOptionContext - - - - the group to set as main group - - - - - - - - -Reads an entire file into allocated memory, with good error -checking. - -If the call was successful, it returns %TRUE and sets @contents to the file -contents and @length to the length of the file contents in bytes. The string -stored in @contents will be nul-terminated, so for text files you can pass -%NULL for the @length argument. If the call was not successful, it returns -%FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error -codes are those in the #GFileError enumeration. In the error case, -@contents is set to %NULL and @length is set to zero. - - - - - - name of a file to read contents from, in the GLib file name encoding - - - - location to store an allocated string - - - - location to store length in bytes of the contents, or %NULL - - - - return location for a #GError, or %NULL - - - - %TRUE on success, %FALSE if an error occurred - - - - - -Return value: the number of currently unused threads - - - - - the number of currently unused threads - - - - - -Cuts off the end of the GString, leaving the first @len bytes. - - - - - - a #GString - - - - the new size of @string - - - - @string - - - - - -Associates a new string value with @key under @group_name. If -@key cannot be found then it is created. If @group_name -cannot be found then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - a string - - - - - - - - -Return value: the values associated with the key as a list of - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - the number of booleans returned - - - - return location for a #GError - - - - the values associated with the key as a list of -booleans, or %NULL if the key was not found or could not be parsed. - -Since: 2.6 - - - - - -A wrapper for the POSIX fopen() function. The fopen() function opens -a file and associates a new stream with it. - -See the C library manual for more details about fopen(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - a string describing the mode in which the file should be -opened - - - - A &lt;type&gt;FILE&lt;/type&gt; pointer if the file was successfully -opened, or %NULL if an error occurred - -Since: 2.6 - - - - - -Makes a copy of @error. - - - - - - a #GError - - - - a new #GError - - - - - -Retrieves the position of the capturing parentheses named @name. - -If @name is a valid sub pattern name but it didn't match anything -(e.g. sub pattern "X", matching "b" against "(?P&lt;X&gt;a)?b") -then @start_pos and @end_pos are set to -1 and %TRUE is returned. - - - - - - #GMatchInfo structure - - - - name of the subexpression - - - - pointer to location where to store the start position - - - - pointer to location where to store the end position - - - - %TRUE if the position was fetched, %FALSE otherwise. If -the position cannot be fetched, @start_pos and @end_pos are left -unchanged - -Since: 2.14 - - - - - -Breaks the string on the pattern, and returns an array of the tokens. -If the pattern contains capturing parentheses, then the text for each -of the substrings will also be returned. If the pattern does not match -anywhere in the string, then the whole string is returned as the first -token. - -As a special case, the result of splitting the empty string "" is an -empty vector, not a vector containing a single string. The reason for -this special case is that being able to represent a empty vector is -typically more useful than consistent handling of empty elements. If -you do need to represent empty elements, you'll need to check for the -empty string before calling this function. - -A pattern that can match empty strings splits @string into separate -characters wherever it matches the empty string between characters. -For example splitting "ab c" using as a separator "\s*", you will get -"a", "b" and "c". - - - - - - a #GRegex structure - - - - the string to split with the pattern - - - - match time option flags - - - - a %NULL-terminated gchar ** array. Free it using g_strfreev() - -Since: 2.14 - - - - - -Maps a file into memory. On UNIX, this is using the mmap() function. - -If @writable is %TRUE, the mapped buffer may be modified, otherwise -it is an error to modify the mapped buffer. Modifications to the buffer -are not visible to other processes mapping the same file, and are not -written back to the file. - -Note that modifications of the underlying file might affect the contents -of the #GMappedFile. Therefore, mapping should only be used if the file -will not be modified, or if all modifications of the file are done -atomically (e.g. using g_file_set_contents()). - - - - - - The path of the file to load, in the GLib filename encoding - - - - wether the mapping should be writable - - - - return location for a #GError, or %NULL - - - - a newly allocated #GMappedFile which must be freed -with g_mapped_file_free(), or %NULL if the mapping failed. - -Since: 2.8 - - - - - -Reads data from a #GIOChannel. - - - - - - a #GIOChannel. - - - - a buffer to read the data into (which should be at least count bytes long). - - - - the number of bytes to read from the #GIOChannel. - - - - returns the number of bytes actually read. - - - - %G_IO_ERROR_NONE if the operation was successful. - -Deprecated:2.2: Use g_io_channel_read_chars() instead. - - - - - -Convert a string from a 32-bit fixed width representation as UCS-4. -to UTF-8. The result will be terminated with a 0 byte. - - - - - - a UCS-4 encoded string - - - - the maximum length (number of characters) of @str to use. -If @len &lt; 0, then the string is terminated with a 0 character. - - - - location to store number of characters read, or %NULL. - - - - location to store number of bytes written or %NULL. -The value here stored does not include the trailing 0 -byte. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError other than -%G_CONVERT_ERROR_NO_CONVERSION may occur. - - - - a pointer to a newly allocated UTF-8 string. -This value must be freed with g_free(). If an -error occurs, %NULL will be returned and -@error set. In that case, @items_read will be -set to the position of the first invalid input -character. - - - - - -Determines whether a character is printable. -Unlike g_unichar_isgraph(), returns %TRUE for spaces. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is printable - - - - - -Sets the callback function for a source. The callback for a source is -called from the source's dispatch function. - -The exact type of @func depends on the type of source; ie. you -should not count on @func being called with @data as its first -parameter. - -Typically, you won't use this function. Instead use functions specific -to the type of source you are using. - - - - - the source - - - - a callback function - - - - the data to pass to callback function - - - - a function to call when @data is no longer in use, or %NULL. - - - - - - - - -Like g_sequence_sort(), but uses a #GSequenceIterCompareFunc instead -of a GCompareDataFunc as the compare function - -Since: 2.14 - - - - - a #GSequence - - - - the #GSequenceItercompare used to compare iterators in the -sequence. It is called with two iterators pointing into @seq. It should -return 0 if the iterators are equal, a negative value if the first -iterator comes before the second, and a positive value if the second -iterator comes before the first. - - - - user data passed to @cmp_func - - - - - - - - -This function outputs @bookmark as a string. - - - - - - a #GBookmarkFile - - - - return location for the length of the returned string, or %NULL - - - - return location for a #GError, or %NULL - - - - a newly allocated string holding -the contents of the #GBookmarkFile - -Since: 2.12 - - - - - -Return value: the #GMainContext of @loop - - - - - a #GMainLoop. - - - - the #GMainContext of @loop - - - - - -Acquires the @queue's lock. After that you can only call the -&lt;function&gt;g_async_queue_*_unlocked()&lt;/function&gt; function variants on that -@queue. Otherwise it will deadlock. - - - - - a #GAsyncQueue. - - - - - - - - -Converts all Unicode characters in the string that have a case -to uppercase. The exact manner that this is done depends -on the current locale, and may result in the number of -characters in the string increasing. (For instance, the -German ess-zet will be changed to SS.) - - - - - - a UTF-8 encoded string - - - - length of @str, in bytes, or -1 if @str is nul-terminated. - - - - a newly allocated string, with all characters -converted to uppercase. - - - - - -Sets whether a source can be called recursively. If @can_recurse is -%TRUE, then while the source is being dispatched then this source -will be processed normally. Otherwise, all processing of this -source is blocked until the dispatch function returns. - - - - - a #GSource - - - - whether recursion is allowed for this source - - - - - - - - -Replacement for g_io_channel_seek() with the new API. - - - - - - a #GIOChannel - - - - The offset in bytes from the position specified by @type - - - - a #GSeekType. The type %G_SEEK_CUR is only allowed in those -cases where a call to g_io_channel_set_encoding () -is allowed. See the documentation for -g_io_channel_set_encoding () for details. - - - - A location to return an error of type #GIOChannelError - - - - the status of the operation. - - - - - -An implementation of the standard printf() function which supports -positional parameters, as specified in the Single Unix Specification. - - - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.2 - - - - - -Inserts @data into @queue before @sibling. - -@sibling must be part of @queue. - -Since: 2.4 - - - - - a #GQueue - - - - a #GList link that &lt;emphasis&gt;must&lt;/emphasis&gt; be part of @queue - - - - the data to insert - - - - - - - - -Removes all the elements in @queue. If queue elements contain -dynamically-allocated memory, they should be freed first. - -Since: 2.14 - - - - - a #GQueue - - - - - - - - -Sets an environment variable. Both the variable's name and value -should be in the GLib file name encoding. On UNIX, this means that -they can be any sequence of bytes. On Windows, they should be in -UTF-8. - -Note that on some systems, when variables are overwritten, the memory -used for the previous variables and its value isn't reclaimed. - - - - - - the environment variable to set, must not contain '='. - - - - the value for to set the variable to. - - - - whether to change the variable if it already exists. - - - - %FALSE if the environment variable couldn't be set. - -Since: 2.4 - - - - - -Replaces occurances of the pattern in regex with the output of -@eval for that occurance. - -Setting @start_position differs from just passing over a shortened -string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b". - - - - - - a #GRegex structure from g_regex_new() - - - - string to perform matches against - - - - the length of @string, or -1 if @string is nul-terminated - - - - starting index of the string to match - - - - options for the match - - - - a function to call for each match - - - - user data to pass to the function - - - - location to store the error occuring, or %NULL to ignore errors - - - - a newly allocated string containing the replacements - -Since: 2.14 - - - - - -Looks up a key in the #GHashTable, returning the original key and the -associated value and a #gboolean which is %TRUE if the key was found. This -is useful if you need to free the memory allocated for the original key, -for example before calling g_hash_table_remove(). - - - - - - a #GHashTable. - - - - the key to look up. - - - - returns the original key. - - - - returns the value associated with the key. - - - - %TRUE if the key was found in the #GHashTable. - - - - - -Retrieves the MIME type of the resource pointed by @uri. - -In the event the URI cannot be found, %NULL is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the -event that the MIME type cannot be found, %NULL is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - a newly allocated string or %NULL if the specified -URI cannot be found. - -Since: 2.12 - - - - - -Turns off flag values for a data list. See g_datalist_unset_flags() - -Since: 2.8 - - - - - pointer to the location that holds a list - - - - the flags to turn off. The values of the flags are -restricted by %G_DATALIST_FLAGS_MASK (currently -3: giving two possible boolean flags). -A value for @flags that doesn't fit within the mask is -an error. - - - - - - - - -Converts a string into a collation key that can be compared -with other collation keys produced by the same function using strcmp(). - -In order to sort filenames correctly, this function treats the dot '.' -as a special case. Most dictionary orderings seem to consider it -insignificant, thus producing the ordering "event.c" "eventgenerator.c" -"event.h" instead of "event.c" "event.h" "eventgenerator.c". Also, we -would like to treat numbers intelligently so that "file1" "file10" "file5" -is sorted as "file1" "file5" "file10". - -Note that this function depends on the -&lt;link linkend="setlocale"&gt;current locale&lt;/link&gt;. - - - - - - a UTF-8 encoded string. - - - - length of @str, in bytes, or -1 if @str is nul-terminated. - - - - a newly allocated string. This string should -be freed with g_free() when you are done with it. - -Since: 2.8 - - - - - -Converts a string from one character set to another, possibly -including fallback sequences for characters not representable -in the output. Note that it is not guaranteed that the specification -for the fallback sequences in @fallback will be honored. Some -systems may do a approximate conversion from @from_codeset -to @to_codeset in their iconv() functions, -in which case GLib will simply return that approximate conversion. - -Note that you should use g_iconv() for streaming -conversions&lt;footnoteref linkend="streaming-state"/&gt;. - - - - - - the string to convert - - - - the length of the string, or -1 if the string is -nul-terminated&lt;footnoteref linkend="nul-unsafe"/&gt;. - - - - name of character set into which to convert @str - - - - character set of @str. - - - - UTF-8 string to use in place of character not -present in the target encoding. (The string must be -representable in the target encoding). - If %NULL, characters not in the target encoding will - be represented as Unicode escapes \uxxxx or \Uxxxxyyyy. - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - If the conversion was successful, a newly allocated -nul-terminated string, which must be freed with -g_free(). Otherwise %NULL and @error will be set. - - - - - -Inserts the (@begin, @end) range at the destination pointed to by ptr. -The @begin and @end iters must point into the same sequence. It is -allowed for @dest to point to a different sequence than the one pointed -into by @begin and @end. - -If @dest is NULL, the range indicated by @begin and @end is -removed from the sequence. If @dest iter points to a place within -the (@begin, @end) range, the range does not move. - -Since: 2.14 - - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - - - - - -Sets the last time the bookmark for @uri was last modified. - -If no bookmark for @uri is found then it is created. - -The "modified" time should only be set when the bookmark's meta-data -was actually changed. Every function of #GBookmarkFile that -modifies a bookmark also changes the modification time, except for -g_bookmark_file_set_visited(). - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - a timestamp or -1 to use the current time - - - - - - - - -Searches the string @haystack for the last occurrence -of the string @needle, limiting the length of the search -to @haystack_len. - - - - - - a nul-terminated string. - - - - the maximum length of @haystack. - - - - the nul-terminated string to search for. - - - - a pointer to the found occurrence, or -%NULL if not found. - - - - - -Return value: the value of the environment variable, or %NULL if - - - - - the environment variable to get, in the GLib file name encoding. - - - - the value of the environment variable, or %NULL if -the environment variable is not found. The returned string may be -overwritten by the next call to g_getenv(), g_setenv() or -g_unsetenv(). - - - - - -Releases ownership of a context previously acquired by this thread -with g_main_context_acquire(). If the context was acquired multiple -times, the only release ownership when g_main_context_release() -is called as many times as it was acquired. - - - - - a #GMainContext - - - - - - - - -Converts all upper case ASCII letters to lower case ASCII letters. - - - - - - a GString - - - - passed-in @string pointer, with all the upper case -characters converted to lower case in place, with -semantics that exactly match g_ascii_tolower(). - - - - - -Return value: The data for the @n'th element of @queue, or %NULL if @n is - - - - - a #GQueue - - - - the position of the element. - - - - The data for the @n'th element of @queue, or %NULL if @n is -off the end of @queue. - -Since: 2.4 - - - - - -Gets the icon of the bookmark for @uri. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for the icon's location or %NULL - - - - return location for the icon's MIME type or %NULL - - - - return location for a #GError or %NULL - - - - %TRUE if the icon for the bookmark for the URI was found. -You should free the returned strings. - -Since: 2.12 - - - - - -Flushes the write buffer for the GIOChannel. - - - - - - a #GIOChannel - - - - location to store an error of type #GIOChannelError - - - - the status of the operation: One of -#G_IO_CHANNEL_NORMAL, #G_IO_CHANNEL_AGAIN, or -#G_IO_CHANNEL_ERROR. - - - - - -Looks whether the string @str ends with @suffix. - - - - - - a nul-terminated string. - - - - the nul-terminated suffix to look for. - - - - %TRUE if @str end with @suffix, %FALSE otherwise. - -Since: 2.2 - - - - - -Sets @mime_type as the MIME type of the bookmark for @uri. - -If a bookmark for @uri cannot be found then it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - a MIME type - - - - - - - - -Scans for a match in string for the pattern in @regex. -The @match_options are combined with the match options specified -when the @regex structure was created, letting you have more -flexibility in reusing #GRegex structures. - -A #GMatchInfo structure, used to get information on the match, -is stored in @match_info if not %NULL. Note that if @match_info -is not %NULL then it is created even if the function returns %FALSE, -i.e. you must free it regardless if regular expression actually matched. - -To retrieve all the non-overlapping matches of the pattern in -string you can use g_match_info_next(). - -&lt;informalexample&gt;&lt;programlisting&gt; -static void -print_uppercase_words (const gchar *string) -{ -/&ast; Print all uppercase-only words. &ast;/ -GRegex *regex; -GMatchInfo *match_info; -&nbsp; -regex = g_regex_new ("[A-Z]+", 0, 0, NULL); -g_regex_match (regex, string, 0, &amp;match_info); -while (g_match_info_matches (match_info)) -{ -gchar *word = g_match_info_fetch (match_info, 0); -g_print ("Found: %s\n", word); -g_free (word); -g_match_info_next (match_info, NULL); -} -g_match_info_free (match_info); -g_regex_unref (regex); -} -&lt;/programlisting&gt;&lt;/informalexample&gt; - - - - - - a #GRegex structure from g_regex_new() - - - - the string to scan for matches - - - - match options - - - - pointer to location where to store the #GMatchInfo, -or %NULL if you do not need it - - - - %TRUE is the string matched, %FALSE otherwise - -Since: 2.14 - - - - - -Sets the seed for the random number generator #GRand to @seed. - - - - - a #GRand. - - - - a value to reinitialize the random number generator. - - - - - - - - -Removes a comment above @key from @group_name. -@group_name. If @key is %NULL then @comment will -be written above @group_name. If both @key -and @group_name are NULL, then @comment will -be written above the first group in the file. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name, or %NULL - - - - a key - - - - return location for a #GError - - - - - - - - -Determines if a character is titlecase. Some characters in -Unicode which are composites, such as the DZ digraph -have three case variants instead of just two. The titlecase -form is used at the beginning of a word where only the -first letter is capitalized. The titlecase form of the DZ -digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z. - - - - - - a Unicode character - - - - %TRUE if the character is titlecase - - - - - -Increases the reference count on a #GMainLoop object by one. - - - - - - a #GMainLoop - - - - @loop - - - - - -Return value: a newly-allocated %NULL-terminated array of - - - - - a #GKeyFile - - - - a group name - - - - return location for the number of keys returned, or %NULL - - - - return location for a #GError, or %NULL - - - - a newly-allocated %NULL-terminated array of -strings. Use g_strfreev() to free it. - -Since: 2.6 - - - - - -Changes the URI of a bookmark item from @old_uri to @new_uri. Any -existing bookmark for @new_uri will be overwritten. If @new_uri is -%NULL, then the bookmark is removed. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - a valid URI, or %NULL - - - - return location for a #GError or %NULL - - - - %TRUE if the URI was successfully changed - -Since: 2.12 - - - - - -A wrapper for the POSIX open() function. The open() function is -used to convert a pathname into a file descriptor. Note that on -POSIX systems file descriptors are implemented by the operating -system. On Windows, it's the C library that implements open() and -file descriptors. The actual Windows API for opening files is -something different. - -See the C library manual for more details about open(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - as in open() - - - - as in open() - - - - a new file descriptor, or -1 if an error occurred. The -return value can be used exactly like the return value from open(). - -Since: 2.6 - - - - - -Determines whether a character is a mark (non-spacing mark, -combining mark, or enclosing mark in Unicode speak). -Given some UTF-8 text, obtain a character value -with g_utf8_get_char(). - -Note: in most cases where isalpha characters are allowed, -ismark characters should be allowed to as they are essential -for writing most European languages as well as many non-Latin -scripts. - - - - - - a Unicode character - - - - %TRUE if @c is a mark character - -Since: 2.14 - - - - - -Checks whether the allocator used by g_malloc() is the system's -malloc implementation. If it returns %TRUE memory allocated with -malloc() can be used interchangeable with memory allocated using g_malloc(). -This function is useful for avoiding an extra copy of allocated memory returned -by a non-GLib-based API. - -A different allocator can be set using g_mem_set_vtable(). - - - - - - if %TRUE, malloc() and g_malloc() can be mixed. - - - - - -Gets the registration informations of @app_name for the bookmark for -@uri. See g_bookmark_file_set_app_info() for more informations about -the returned data. - -The string returned in @app_exec must be freed. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the -event that no application with name @app_name has registered a bookmark -for @uri, %FALSE is returned and error is set to -#G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting -the command line fails, an error of the #G_SHELL_ERROR domain is -set and %FALSE is returned. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - an application's name - - - - location for the command line of the application, or %NULL - - - - return location for the registration count, or %NULL - - - - return location for the last registration time, or %NULL - - - - return location for a #GError, or %NULL - - - - %TRUE on success. - -Since: 2.12 - - - - - -Looks whether the string @str begins with @prefix. - - - - - - a nul-terminated string. - - - - the nul-terminated prefix to look for. - - - - %TRUE if @str begins with @prefix, %FALSE otherwise. - -Since: 2.2 - - - - - -Retrieves the position of the @match_num&lt;!-- --&gt;'th capturing -parentheses. 0 is the full text of the match, 1 is the first -paren set, 2 the second, and so on. - -If @match_num is a valid sub pattern but it didn't match anything -(e.g. sub pattern 1, matching "b" against "(a)?b") then @start_pos -and @end_pos are set to -1 and %TRUE is returned. - -If the match was obtained using the DFA algorithm, that is using -g_regex_match_all() or g_regex_match_all_full(), the retrieved -position is not that of a set of parentheses but that of a matched -substring. Substrings are matched in reverse order of length, so -0 is the longest match. - - - - - - #GMatchInfo structure - - - - number of the sub expression - - - - pointer to location where to store the start position - - - - pointer to location where to store the end position - - - - %TRUE if the position was fetched, %FALSE otherwise. If -the position cannot be fetched, @start_pos and @end_pos are left -unchanged - -Since: 2.14 - - - - - -Parses a string containing debugging options -into a %guint containing bit flags. This is used -within GDK and GTK+ to parse the debug options passed on the -command line or through environment variables. - - - - - - a list of debug options separated by colons, spaces, or -commas; or the string "all" to set all flags. - - - - pointer to an array of #GDebugKey which associate -strings with bit flags. - - - - the number of #GDebugKey&lt;!-- --&gt;s in the array. - - - - the combined set of bit flags. - - - - - -Determines whether a character is punctuation or a symbol. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is a punctuation or symbol character - - - - - -Removes an environment variable from the environment. - -Note that on some systems, when variables are overwritten, the memory -used for the previous variables and its value isn't reclaimed. -Furthermore, this function can't be guaranteed to operate in a -threadsafe way. - -Since: 2.4 - - - - - the environment variable to remove, must not contain '='. - - - - - - - - -Removes the first element of the queue. - - - - - - a #GQueue. - - - - the #GList element at the head of the queue, or %NULL if the queue -is empty. - - - - - -Convert a string from UTF-16 to UTF-8. The result will be -terminated with a 0 byte. - -Note that the input is expected to be already in native endianness, -an initial byte-order-mark character is not handled specially. -g_convert() can be used to convert a byte buffer of UTF-16 data of -ambiguous endianess. - - - - - - a UTF-16 encoded string - - - - the maximum length (number of &lt;type&gt;gunichar2&lt;/type&gt;) of @str to use. -If @len &lt; 0, then the string is terminated with a 0 character. - - - - location to store number of words read, or %NULL. -If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be -returned in case @str contains a trailing partial -character. If an error occurs then the index of the -invalid input is stored here. - - - - location to store number of bytes written, or %NULL. -The value stored here does not include the trailing -0 byte. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError other than -%G_CONVERT_ERROR_NO_CONVERSION may occur. - - - - a pointer to a newly allocated UTF-8 string. -This value must be freed with g_free(). If an -error occurs, %NULL will be returned and -@error set. - - - - - -An implementation of the standard vprintf() function which supports -positional parameters, as specified in the Single Unix Specification. - - - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the list of arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.2 - - - - - -Sets the icon for the bookmark for @uri. If @href is %NULL, unsets -the currently set icon. - -If no bookmark for @uri is found it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - the URI of the icon for the bookmark, or %NULL - - - - the MIME type of the icon for the bookmark - - - - - - - - -Checks whether @group appears in the list of groups to which -the bookmark for @uri belongs to. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - the group name to be searched - - - - return location for a #GError, or %NULL - - - - %TRUE if @group was found. - -Since: 2.12 - - - - - -Creates a new random number generator initialized with a seed taken -either from &lt;filename&gt;/dev/urandom&lt;/filename&gt; (if existing) or from -the current time (as a fallback). - - - - - - the new #GRand. - - - - - -Calls the given function for key/value pairs in the #GHashTable until -@predicate returns %TRUE. The function is passed the key and value of -each pair, and the given @user_data parameter. The hash table may not -be modified while iterating over it (you can't add/remove items). - -Note, that hash tables are really only optimized for forward lookups, -i.e. g_hash_table_lookup(). -So code that frequently issues g_hash_table_find() or -g_hash_table_foreach() (e.g. in the order of once per every entry in a -hash table) should probably be reworked to use additional or different -data structures for reverse lookups (keep in mind that an O(n) find/foreach -operation issued for all n values in a hash table ends up needing O(n*n) -operations). - - - - - - a #GHashTable. - - - - function to test the key/value pairs for a certain property. - - - - user data to pass to the function. - - - - The value of the first key/value pair is returned, for which -func evaluates to %TRUE. If no pair with the requested property is found, -%NULL is returned. - -Since: 2.4 - - - - - -Return value: the data that @iter points to - - - - - a #GSequenceIter - - - - the data that @iter points to - -Since: 2.14 - - - - - -Inserts @data into @sequence using @func to determine the new position. -The sequence must already be sorted according to @cmp_func; otherwise the -new position of @data is undefined. - - - - - - a #GSequence - - - - the data to insert - - - - the #GCompareDataFunc used to compare items in the sequence. It -is called with two items of the @seq and @user_data. It should -return 0 if the items are equal, a negative value if the first -item comes before the second, and a positive value if the second -item comes before the first. - - - - user data passed to @cmp_func. - - - - a #GSequenceIter pointing to the new item. - -Since: 2.14 - - - - - -Return value: a string owned by GLib that must not be modified - - - - - a string owned by GLib that must not be modified -or freed. -Since: 2.6 - - - - - -Retrieves the current line number and the number of the character on -that line. Intended for use in error messages; there are no strict -semantics for what constitutes the "current" line number other than -"the best number we could come up with for error messages." - - - - - - a #GMarkupParseContext - - - - return location for a line number, or %NULL - - - - return location for a char-on-line number, or %NULL - - - - - - - - -Return value: a #GSequenceIter pointing to the next position after @iter. - - - - - a #GSequenceIter - - - - a #GSequenceIter pointing to the next position after @iter. - -Since: 2.14 - - - - - -Open a file @filename as a #GIOChannel using mode @mode. This -channel will be closed when the last reference to it is dropped, -so there is no need to call g_io_channel_close() (though doing -so will not cause problems, as long as no attempt is made to -access the channel after it is closed). - - - - - - A string containing the name of a file. - - - - One of "r", "w", "a", "r+", "w+", "a+". These have -the same meaning as in fopen(). - - - - A location to return an error of type %G_FILE_ERROR. - - - - A #GIOChannel on success, %NULL on failure. - - - - - -This function will set the maximum @interval that a thread waiting -in the pool for new tasks can be idle for before being -stopped. This function is similar to calling -g_thread_pool_stop_unused_threads() on a regular timeout, except, -this is done on a per thread basis. - -By setting @interval to 0, idle threads will not be stopped. - -This function makes use of g_async_queue_timed_pop () using -@interval. - -Since: 2.10 - - - - - the maximum @interval (1/1000ths of a second) a thread -can be idle. - - - - - - - - -Converts a pointer to a #gint to a hash value. -It can be passed to g_hash_table_new() as the @hash_func parameter, -when using pointers to integers values as keys in a #GHashTable. - - - - - - a pointer to a #gint key - - - - a hash value corresponding to the key. - - - - - -Creates a new #GMainLoop structure. - - - - - - a #GMainContext (if %NULL, the default context will be used). - - - - set to %TRUE to indicate that the loop is running. This -is not very important since calling g_main_loop_run() will set this to -%TRUE anyway. - - - - a new #GMainLoop. - - - - - -Checks whether a source is allowed to be called recursively. -see g_source_set_can_recurse(). - - - - - - a #GSource - - - - whether recursion is allowed. - - - - - -Return value: whether @iter is the begin iterator - - - - - a #GSequenceIter - - - - whether @iter is the begin iterator - -Since: 2.14 - - - - - -Writes a formatted string into a #GString. -This is similar to the standard sprintf() function, -except that the #GString buffer automatically expands -to contain the results. The previous contents of the -#GString are destroyed. - - - - - a #GString - - - - the string format. See the printf() documentation - - - - the parameters to insert into the format string - - - - - - - - -Finds the leftmost occurrence of the given Unicode character -in a UTF-8 encoded string, while limiting the search to @len bytes. -If @len is -1, allow unbounded search. - - - - - - a nul-terminated UTF-8 encoded string - - - - the maximum length of @p - - - - a Unicode character - - - - %NULL if the string does not contain the character, -otherwise, a pointer to the start of the leftmost occurrence of -the character in the string. - - - - - -Returns: a string containing the complete path to @subdir inside - - - - - An identifier for a software package, in UTF-8, or %NULL - - - - The name of a DLL that a package provides, in UTF-8, or %NULL - - - - A subdirectory of the package installation directory, also in UTF-8 - - - - a string containing the complete path to @subdir inside -the installation directory of @package. The returned string is in -the GLib file name encoding, i.e. UTF-8 on Windows. The return -value should be freed with g_free() when no longer needed. - - - - - -Return value: an #GSequenceIter pointing to the position where @data - - - - - a #GSequence - - - - data for the new item - - - - the #GCompareDataFunc used to compare items in the sequence. It -is called with two items of the @seq and @user_data. It should -return 0 if the items are equal, a negative value if the first -item comes before the second, and a positive value if the second -item comes before the first. - - - - user data passed to @cmp_func. - - - - an #GSequenceIter pointing to the position where @data -would have been inserted according to @cmp_func and @cmp_data. - -Since: 2.14 - - - - - -Return value: a %NULL-terminated string array or %NULL if the specified - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for the number of returned strings, or %NULL - - - - return location for a #GError, or %NULL - - - - a %NULL-terminated string array or %NULL if the specified -key cannot be found. The array should be freed with g_strfreev(). - -Since: 2.6 - - - - - -Decreases reference count of @regex by 1. When reference count drops -to zero, it frees all the memory associated with the regex structure. - -Since: 2.14 - - - - - a #GRegex - - - - - - - - -Gets the height of a #GTree. - -If the #GTree contains no nodes, the height is 0. -If the #GTree contains only one root node the height is 1. -If the root node has children the height is 2, etc. - - - - - - a #GTree. - - - - the height of the #GTree. - - - - - -Parses a command line into an argument vector, in much the same way -the shell would, but without many of the expansions the shell would -perform (variable expansion, globs, operators, filename expansion, -etc. are not supported). The results are defined to be the same as -those you would get from a UNIX98 /bin/sh, as long as the input -contains none of the unsupported shell expansions. If the input -does contain such expansions, they are passed through -literally. Possible errors are those from the #G_SHELL_ERROR -domain. Free the returned vector with g_strfreev(). - - - - - - command line to parse - - - - return location for number of args - - - - return location for array of args - - - - return location for error - - - - %TRUE on success, %FALSE if error set - - - - - -Gets the user name of the current user. The encoding of the returned -string is system-defined. On UNIX, it might be the preferred file name -encoding, or something else, and there is no guarantee that it is even -consistent on a machine. On Windows, it is always UTF-8. - - - - - - the user name of the current user. - - - - - -Usually if the string passed to g_regex_match*() matches as far as -it goes, but is too short to match the entire pattern, %FALSE is -returned. There are circumstances where it might be helpful to -distinguish this case from other cases in which there is no match. - -Consider, for example, an application where a human is required to -type in data for a field with specific formatting requirements. An -example might be a date in the form ddmmmyy, defined by the pattern -"^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$". -If the application sees the user’s keystrokes one by one, and can -check that what has been typed so far is potentially valid, it is -able to raise an error as soon as a mistake is made. - -GRegex supports the concept of partial matching by means of the -#G_REGEX_MATCH_PARTIAL flag. When this is set the return code for -g_regex_match() or g_regex_match_full() is, as usual, %TRUE -for a complete match, %FALSE otherwise. But, when these functions -return %FALSE, you can check if the match was partial calling -g_match_info_is_partial_match(). - -When using partial matching you cannot use g_match_info_fetch*(). - -Because of the way certain internal optimizations are implemented -the partial matching algorithm cannot be used with all patterns. -So repeated single characters such as "a{2,4}" and repeated single -meta-sequences such as "\d+" are not permitted if the maximum number -of occurrences is greater than one. Optional items such as "\d?" -(where the maximum is one) are permitted. Quantifiers with any values -are permitted after parentheses, so the invalid examples above can be -coded thus "(a){2,4}" and "(\d)+". If #G_REGEX_MATCH_PARTIAL is set -for a pattern that does not conform to the restrictions, matching -functions return an error. - - - - - - a #GMatchInfo structure - - - - %TRUE if the match was partial, %FALSE otherwise - -Since: 2.14 - - - - - -Stops a #GMainLoop from running. Any calls to g_main_loop_run() -for the loop will return. - - - - - a #GMainLoop - - - - - - - - -Converts a string to a #gdouble value. -This function behaves like the standard strtod() function -does in the C locale. It does this without actually -changing the current locale, since that would not be -thread-safe. - -This function is typically used when reading configuration -files or other non-user input that should be locale independent. -To handle input from the user you should normally use the -locale-sensitive system strtod() function. - -To convert from a #gdouble to a string in a locale-insensitive -way, use g_ascii_dtostr(). - -If the correct value would cause overflow, plus or minus %HUGE_VAL -is returned (according to the sign of the value), and %ERANGE is -stored in %errno. If the correct value would cause underflow, -zero is returned and %ERANGE is stored in %errno. - -This function resets %errno before calling strtod() so that -you can reliably detect overflow and underflow. - - - - - - the string to convert to a numeric value. - - - - if non-%NULL, it returns the character after -the last character used in the conversion. - - - - the #gdouble value. - - - - - -Return value: The link at the @n'th position, or %NULL if @n is off the - - - - - a #GQueue - - - - the position of the link - - - - The link at the @n'th position, or %NULL if @n is off the -end of the list - -Since: 2.4 - - - - - -Converts a single character to UTF-8. - - - - - - a Unicode character code - - - - output buffer, must have at least 6 bytes of space. -If %NULL, the length will be computed and returned -and nothing will be written to @outbuf. - - - - number of bytes written - - - - - -Bundles up pointers to each of the matching substrings from a match -and stores them in an array of gchar pointers. The first element in -the returned array is the match number 0, i.e. the entire matched -text. - -If a sub pattern didn't match anything (e.g. sub pattern 1, matching -"b" against "(a)?b") then an empty string is inserted. - -If the last match was obtained using the DFA algorithm, that is using -g_regex_match_all() or g_regex_match_all_full(), the retrieved -strings are not that matched by sets of parentheses but that of the -matched substring. Substrings are matched in reverse order of length, -so the first one is the longest match. - -The strings are fetched from the string passed to the match function, -so you cannot call this function after freeing the string. - - - - - - a #GMatchInfo structure - - - - a %NULL-terminated array of gchar * pointers. It must be -freed using g_strfreev(). If the previous match failed %NULL is -returned - -Since: 2.14 - - - - - -Same as the standard UNIX routine iconv_close(), but -may be implemented via libiconv on UNIX flavors that lack -a native implementation. Should be called to clean up -the conversion descriptor from g_iconv_open() when -you are done converting things. - -GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers. - - - - - - a conversion descriptor from g_iconv_open() - - - - -1 on error, 0 on success - - - - - -Increases the reference count of the asynchronous @queue by 1. - -@Deprecated: Since 2.8, reference counting is done atomically -so g_async_queue_ref() can be used regardless of the @queue's -lock. - - - - - a #GAsyncQueue. - - - - - - - - -Converts a string into a form that is independent of case. The -result will not correspond to any particular case, but can be -compared for equality or ordered with the results of calling -g_utf8_casefold() on other strings. - -Note that calling g_utf8_casefold() followed by g_utf8_collate() is -only an approximation to the correct linguistic case insensitive -ordering, though it is a fairly good one. Getting this exactly -right would require a more sophisticated collation function that -takes case sensitivity into account. GLib does not currently -provide such a function. - - - - - - a UTF-8 encoded string - - - - length of @str, in bytes, or -1 if @str is nul-terminated. - - - - a newly allocated string, that is a -case independent form of @str. - - - - - -Compare two strings, ignoring the case of ASCII characters. - -Unlike the BSD strcasecmp() function, this only recognizes standard -ASCII letters and ignores the locale, treating all non-ASCII -bytes as if they are not letters. - -This function should be used only on strings that are known to be -in encodings where the bytes corresponding to ASCII letters always -represent themselves. This includes UTF-8 and the ISO-8859-* -charsets, but not for instance double-byte encodings like the -Windows Codepage 932, where the trailing bytes of double-byte -characters include all ASCII letters. If you compare two CP932 -strings using this function, you will get false matches. - - - - - - string to compare with @s2. - - - - string to compare with @s1. - - - - 0 if the strings match, a negative value if @s1 &lt; @s2, -or a positive value if @s1 &gt; @s2. - - - - - -Converts a sequence of bytes encoded as UTF-8 to a Unicode character. -If @p does not point to a valid UTF-8 encoded character, results are -undefined. If you are not sure that the bytes are complete -valid Unicode characters, you should use g_utf8_get_char_validated() -instead. - - - - - - a pointer to Unicode character encoded as UTF-8 - - - - the resulting character - - - - - -Determines whether a character is printable and not a space -(returns %FALSE for control characters, format characters, and -spaces). g_unichar_isprint() is similar, but returns %TRUE for -spaces. Given some UTF-8 text, obtain a character value with -g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is printable unless it's a space - - - - - -Return value: the default main context. - - - - - the default main context. - - - - - -Frees all memory allocated by the #GStringChunk. -After calling g_string_chunk_free() it is not safe to -access any of the strings which were contained within it. - - - - - a #GStringChunk - - - - - - - - -Convert a character to ASCII upper case. - -Unlike the standard C library toupper() function, this only -recognizes standard ASCII letters and ignores the locale, returning -all non-ASCII characters unchanged, even if they are upper case -letters in a particular character set. Also unlike the standard -library function, this takes and returns a char, not an int, so -don't call it on %EOF but no need to worry about casting to #guchar -before passing a possibly non-ASCII character in. - - - - - - any character. - - - - the result of converting @c to upper case. -If @c is not an ASCII lower case letter, -@c is returned unchanged. - - - - - -Quotes a string so that the shell (/bin/sh) will interpret the -quoted string to mean @unquoted_string. If you pass a filename to -the shell, for example, you should first quote it with this -function. The return value must be freed with g_free(). The -quoting style used is undefined (single or double quotes may be -used). - - - - - - a literal string - - - - quoted string - - - - - -A wrapper for the POSIX chdir() function. The function changes the -current directory of the process to @path. - -See your C library manual for more details about chdir(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - 0 on success, -1 if an error occurred. - -Since: 2.8 - - - - - -Gets the current directory. -The returned string should be freed when no longer needed. The encoding -of the returned string is system defined. On Windows, it is always UTF-8. - - - - - - the current directory. - - - - - -Removes a source from the default main loop context given the -source functions and user data. If multiple sources exist with the -same source functions and user data, only one will be destroyed. - - - - - - The @source_funcs passed to g_source_new() - - - - the user data for the callback - - - - %TRUE if a source was found and removed. - - - - - -Sets the length of a #GString. If the length is less than -the current length, the string will be truncated. If the -length is greater than the current length, the contents -of the newly added area are undefined. (However, as -always, string-&gt;str[string-&gt;len] will be a nul byte.) - - - - - - a #GString - - - - the new length - - - - @string - - - - - -Removes @group from the list of groups to which the bookmark -for @uri belongs to. - -In the event the URI cannot be found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. -In the event no group was defined, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - the group name to be removed - - - - return location for a #GError, or %NULL - - - - %TRUE if @group was successfully removed. - -Since: 2.12 - - - - - -Sets the meta-data of application @name inside the list of -applications that have registered a bookmark for @uri inside -@bookmark. - -You should rarely use this function; use g_bookmark_file_add_application() -and g_bookmark_file_remove_application() instead. - -@name can be any UTF-8 encoded string used to identify an -application. -@exec can have one of these two modifiers: "%f", which will -be expanded as the local file name retrieved from the bookmark's -URI; "%u", which will be expanded as the bookmark's URI. -The expansion is done automatically when retrieving the stored -command line using the g_bookmark_file_get_app_info() function. -@count is the number of times the application has registered the -bookmark; if is &lt; 0, the current registration count will be increased -by one, if is 0, the application with @name will be removed from -the list of registered applications. -@stamp is the Unix time of the last registration; if it is -1, the -current time will be used. - -If you try to remove an application by setting its registration count to -zero, and no bookmark for @uri is found, %FALSE is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, -in the event that no application @name has registered a bookmark -for @uri, %FALSE is returned and error is set to -#G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark -for @uri is found, one is created. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - an application's name - - - - an application's command line - - - - the number of registrations done for this application - - - - the time of the last registration for this application - - - - return location for a #GError or %NULL - - - - %TRUE if the application's meta-data was successfully -changed. - -Since: 2.12 - - - - - -Splits @string into a number of tokens not containing any of the characters -in @delimiter. A token is the (possibly empty) longest string that does not -contain any of the characters in @delimiters. If @max_tokens is reached, the -remainder is appended to the last token. - -For example the result of g_strsplit_set ("abc:def/ghi", ":/", -1) is a -%NULL-terminated vector containing the three strings "abc", "def", -and "ghi". - -The result if g_strsplit_set (":def/ghi:", ":/", -1) is a %NULL-terminated -vector containing the four strings "", "def", "ghi", and "". - -As a special case, the result of splitting the empty string "" is an empty -vector, not a vector containing a single string. The reason for this -special case is that being able to represent a empty vector is typically -more useful than consistent handling of empty elements. If you do need -to represent empty elements, you'll need to check for the empty string -before calling g_strsplit_set(). - -Note that this function works on bytes not characters, so it can't be used -to delimit UTF-8 strings for anything but ASCII characters. - - - - - - The string to be tokenized - - - - A nul-terminated string containing bytes that are used -to split the string. - - - - The maximum number of tokens to split @string into. -If this is less than 1, the string is split completely - - - - a newly-allocated %NULL-terminated array of strings. Use -g_strfreev() to free it. - -Since: 2.4 - - - - - -Finds a #GSource given a pair of context and ID. - - - - - - a #GMainContext (if %NULL, the default context will be used) - - - - the source ID, as returned by g_source_get_id(). - - - - the #GSource if found, otherwise, %NULL - - - - - -This function outputs @key_file as a string. - - - - - - a #GKeyFile - - - - return location for the length of the -returned string, or %NULL - - - - return location for a #GError, or %NULL - - - - a newly allocated string holding -the contents of the #GKeyFile - -Since: 2.6 - - - - - -Returns: %TRUE if the previous match operation succeeded, - - - - - a #GMatchInfo structure - - - - %TRUE if the previous match operation succeeded, -%FALSE otherwise - -Since: 2.14 - - - - - -Prepares to poll sources within a main loop. The resulting information -for polling is determined by calling g_main_context_query (). - - - - - - a #GMainContext - - - - location to store priority of highest priority -source already ready. - - - - %TRUE if some source is ready to be dispatched -prior to polling. - - - - - -This function looks for a key file named @file in the paths -specified in @search_dirs, loads the file into @key_file and -Return value: %TRUE if a key file could be loaded, %FALSE othewise - - - - - an empty #GKeyFile struct - - - - a relative path to a filename to open and parse - - - - %NULL-terminated array of directories to search - - - - return location for a string containing the full path -of the file, or %NULL - - - - flags from #GKeyFileFlags - - - - return location for a #GError, or %NULL - - - - %TRUE if a key file could be loaded, %FALSE othewise - -Since: 2.14 - - - - - -Retrieves every value inside @hash_table. The returned data is -valid until @hash_table is modified. - - - - - - a #GHashTable - - - - a #GList containing all the values inside the hash -table. The content of the list is owned by the hash table and -should not be modified or freed. Use g_list_free() when done -using the list. - -Since: 2.14 - - - - - -Sets the function which is used to translate user-visible -strings, for &lt;option&gt;--help&lt;/option&gt; output. Different -groups can use different #GTranslateFunc&lt;!-- --&gt;s. If @func -is %NULL, strings are not translated. - -If you are using gettext(), you only need to set the translation -domain, see g_option_group_set_translation_domain(). - -Since: 2.6 - - - - - a #GOptionGroup - - - - the #GTranslateFunc, or %NULL - - - - user data to pass to @func, or %NULL - - - - a function which gets called to free @data, or %NULL - - - - - - - - -Creates a new string @length bytes long filled with @fill_char. -The returned string should be freed when no longer needed. - - - - - - the length of the new string - - - - the byte to fill the string with - - - - a newly-allocated string filled the @fill_char - - - - - -Associates a new integer value with @key under @group_name. -If @key cannot be found then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an integer value - - - - - - - - -Get the codeset for the current locale. - - - - - - a newly allocated string containing the name -of the codeset. This string must be freed with g_free(). - - - - - -An implementation of the GNU vasprintf() function which supports -positional parameters, as specified in the Single Unix Specification. -This function is similar to g_vsprintf(), except that it allocates a -string to hold the output, instead of putting the output in a buffer -you allocate in advance. - - - - - - the return location for the newly-allocated string. - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the list of arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.4 - - - - - -Computes a list of applicable locale names, which can be used to -e.g. construct locale-dependent filenames or search paths. The returned -list is sorted from most desirable to least desirable and always contains -the default locale "C". - -For example, if LANGUAGE=de:en_US, then the returned list is -"de", "en_US", "en", "C". - -This function consults the environment variables &lt;envar&gt;LANGUAGE&lt;/envar&gt;, -&lt;envar&gt;LC_ALL&lt;/envar&gt;, &lt;envar&gt;LC_MESSAGES&lt;/envar&gt; and &lt;envar&gt;LANG&lt;/envar&gt; -to find the list of locales specified by the user. - - - - - - a %NULL-terminated array of strings owned by GLib -that must not be modified or freed. - -Since: 2.6 - - - - - -Calls the given function for each key/value pair in the #GHashTable. -If the function returns %TRUE, then the key/value pair is removed from the -#GHashTable, but no key or value destroy functions are called. - - - - - - a #GHashTable. - - - - the function to call for each key/value pair. - - - - user data to pass to the function. - - - - the number of key/value pairs removed. - - - - - -Retrieves a comment above @key from @group_name. -@group_name. If @key is %NULL then @comment will -be read from above @group_name. If both @key -and @group_name are NULL, then @comment will -be read from above the first group in the file. - - - - - - a #GKeyFile - - - - a group name, or %NULL - - - - a key - - - - return location for a #GError - - - - a comment that should be freed with g_free() - -Since: 2.6 - - - - - -Sets the function used to sort the list of tasks. This allows the -tasks to be processed by a priority determined by @func, and not -just in the order in which they were added to the pool. - -Note, if the maximum number of threads is more than 1, the order -that threads are executed can not be guranteed 100%. Threads are -scheduled by the operating system and are executed at random. It -cannot be assumed that threads are executed in the order they are -created. - -Since: 2.10 - - - - - a #GThreadPool - - - - the #GCompareDataFunc used to sort the list of tasks. -This function is passed two tasks. It should return -0 if the order in which they are handled does not matter, -a negative value if the first task should be processed before -the second or a positive value if the second task should be -processed first. - - - - user data passed to @func. - - - - - - - - -A wrapper for the POSIX creat() function. The creat() function is -used to convert a pathname into a file descriptor, creating a file -if necessar. Note that on POSIX systems file descriptors are -implemented by the operating system. On Windows, it's the C library -that implements creat() and file descriptors. The actual Windows -API for opening files is something different. - -See the C library manual for more details about creat(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - as in creat() - - - - a new file descriptor, or -1 if an error occurred. The -return value can be used exactly like the return value from creat(). - -Since: 2.8 - - - - - -Translate a Win32 error code (as returned by GetLastError()) into -the corresponding message. The message is either language neutral, -or in the thread's language, or the user's language, the system's -language, or US English (see docs for FormatMessage()). The -returned string is in UTF-8. It should be deallocated with -g_free(). - - - - - - error code. - - - - newly-allocated error message - - - - - -Convert a string from UTF-16 to UCS-4. The result will be -terminated with a 0 character. - - - - - - a UTF-16 encoded string - - - - the maximum length (number of &lt;type&gt;gunichar2&lt;/type&gt;) of @str to use. -If @len &lt; 0, then the string is terminated with a 0 character. - - - - location to store number of words read, or %NULL. -If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be -returned in case @str contains a trailing partial -character. If an error occurs then the index of the -invalid input is stored here. - - - - location to store number of characters written, or %NULL. -The value stored here does not include the trailing -0 character. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError other than -%G_CONVERT_ERROR_NO_CONVERSION may occur. - - - - a pointer to a newly allocated UCS-4 string. -This value must be freed with g_free(). If an -error occurs, %NULL will be returned and -@error set. - - - - - -Inserts a key/value pair into a #GTree. If the given key already exists -in the #GTree its corresponding value is set to the new value. If you -supplied a value_destroy_func when creating the #GTree, the old value is -freed using that function. If you supplied a @key_destroy_func when -creating the #GTree, the passed key is freed using that function. - -The tree is automatically 'balanced' as new key/value pairs are added, -so that the distance from the root to every leaf is as small as possible. - - - - - a #GTree. - - - - the key to insert. - - - - the value corresponding to the key. - - - - - - - - -Flush the status from a sequence of calls to g_base64_encode_step(). - - - - - - whether to break long lines - - - - pointer to destination buffer - - - - Saved state from g_base64_encode_step() - - - - Saved state from g_base64_encode_step() - - - - The number of bytes of output that was written - -Since: 2.12 - - - - - -Releases the queue's lock. - - - - - a #GAsyncQueue. - - - - - - - - -Adds a file descriptor to the set of file descriptors polled for -this source. This is usually combined with g_source_new() to add an -event source. The event source's check function will typically test -the @revents field in the #GPollFD struct and return %TRUE if events need -to be processed. - - - - -a #GSource - - - - a #GPollFD structure holding information about a file -descriptor to watch. - - - - - - - - -Atomically decrements the reference count of @hash_table by one. -If the reference count drops to 0, all keys and values will be -destroyed, and all memory allocated by the hash table is released. -This function is MT-safe and may be called from any thread. - -Since: 2.10 - - - - - a valid #GHashTable. - - - - - - - - -Creates a new random number generator initialized with @seed. - - - - - - a value to initialize the random number generator. - - - - the new #GRand. - - - - - -Return value: Whether @iter is the end iterator. - - - - - a #GSequenceIter - - - - Whether @iter is the end iterator. - -Since: 2.14 - - - - - -Removes the last element of the queue. - - - - - - a #GQueue. - - - - the #GList element at the tail of the queue, or %NULL if the queue -is empty. - - - - - -Inserts @data into @queue using @func to determine the new -position. - -This function requires that the @queue is sorted before pushing on -new elements. - -This function will lock @queue before it sorts the queue and unlock -it when it is finished. - -For an example of @func see g_async_queue_sort(). - -Since: 2.10 - - - - - a #GAsyncQueue - - - - the @data to push into the @queue - - - - the #GCompareDataFunc is used to sort @queue. This function -is passed two elements of the @queue. The function should return -0 if they are equal, a negative value if the first element -should be higher in the @queue or a positive value if the first -element should be lower in the @queue than the second element. - - - - user data passed to @func. - - - - - - - - -Determines the numeric value of a character as a hexidecimal -digit. - - - - - - a Unicode character - - - - If @c is a hex digit (according to -g_unichar_isxdigit()), its numeric value. Otherwise, -1. - - - - - -Appends a formatted string onto the end of a #GString. -This function is is similar to g_string_append_printf() -except that the arguments to the format string are passed -as a va_list. - -Since: 2.14 - - - - - a #GString - - - - the string format. See the printf() documentation - - - - the list of arguments to insert in the output - - - - - - - - -Returns: The version information. - - - - - The version information. - -Since: 2.6 - - - - - -Gets the directory components of a file name. If the file name has no -directory components "." is returned. The returned string should be -freed when no longer needed. - - - - - - the name of the file. - - - - the directory components of the file. - - - - - -Classifies a Unicode character by type. - - - - - - a Unicode character - - - - the type of the character. - - - - - -Converts an escaped ASCII-encoded URI to a local filename in the -encoding used for filenames. - - - - - - a uri describing a filename (escaped, encoded in ASCII). - - - - Location to store hostname for the URI, or %NULL. -If there is no hostname in the URI, %NULL will be -stored in this location. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - a newly-allocated string holding the resulting -filename, or %NULL on an error. - - - - - -Returns: %TRUE if automatic help generation is turned on. - - - - - a #GOptionContext - - - - %TRUE if automatic help generation is turned on. - -Since: 2.6 - - - - - -Adds a string to be displayed in &lt;option&gt;--help&lt;/option&gt; output -after the list of options. This text often includes a bug reporting -address. - -Note that the summary is translated (see -g_option_context_set_translate_func()). - -Since: 2.12 - - - - - a #GOptionContext - - - - a string to be shown in &lt;option&gt;--help&lt;/option&gt; output -after the list of options, or %NULL - - - - - - - - -Sets the name of the program. This name should &lt;emphasis&gt;not&lt;/emphasis&gt; -be localized, contrast with g_set_application_name(). Note that for -thread-safety reasons this function can only be called once. - - - - - the name of the program. - - - - - - - - -Gets the #GMainContext with which the source is associated. -Calling this function on a destroyed source is an error. - - - - - - a #GSource - - - - the #GMainContext with which the source is associated, -or %NULL if the context has not yet been added -to a source. - - - - - -Converts a character to lower case. - - - - - - a Unicode character. - - - - the result of converting @c to lower case. -If @c is not an upperlower or titlecase character, -or has no lowercase equivalent @c is returned unchanged. - - - - - -Executes a child program asynchronously (your program will not -block waiting for the child to exit). The child program is -specified by the only argument that must be provided, @argv. @argv -should be a %NULL-terminated array of strings, to be passed as the -argument vector for the child. The first string in @argv is of -course the name of the program to execute. By default, the name of -the program must be a full path; the &lt;envar&gt;PATH&lt;/envar&gt; shell variable -will only be searched if you pass the %G_SPAWN_SEARCH_PATH flag. - -On Windows, note that all the string or string vector arguments to -this function and the other g_spawn*() functions are in UTF-8, the -GLib file name encoding. Unicode characters that are not part of -the system codepage passed in argument vectors will be correctly -available in the spawned program only if it uses wide character API -to retrieve its command line. For C programs built with Microsoft's -tools it is enough to make the program have a wmain() instead of -main(). wmain() has a wide character argument vector as parameter. - -At least currently, mingw doesn't support wmain(), so if you use -mingw to develop the spawned program, it will have to call the -undocumented function __wgetmainargs() to get the wide character -argument vector and environment. See gspawn-win32-helper.c in the -GLib sources or init.c in the mingw runtime sources for a prototype -for that function. Alternatively, you can retrieve the Win32 system -level wide character command line passed to the spawned program -using the GetCommandLineW() function. - -On Windows the low-level child process creation API -&lt;function&gt;CreateProcess()&lt;/function&gt; doesn't use argument vectors, -but a command line. The C runtime library's -&lt;function&gt;spawn*()&lt;/function&gt; family of functions (which -g_spawn_async_with_pipes() eventually calls) paste the argument -vector elements together into a command line, and the C runtime startup code -does a corresponding reconstruction of an argument vector from the -command line, to be passed to main(). Complications arise when you have -argument vector elements that contain spaces of double quotes. The -&lt;function&gt;spawn*()&lt;/function&gt; functions don't do any quoting or -escaping, but on the other hand the startup code does do unquoting -and unescaping in order to enable receiving arguments with embedded -spaces or double quotes. To work around this asymmetry, -g_spawn_async_with_pipes() will do quoting and escaping on argument -vector elements that need it before calling the C runtime -spawn() function. - -@envp is a %NULL-terminated array of strings, where each string -has the form &lt;literal&gt;KEY=VALUE&lt;/literal&gt;. This will become -the child's environment. If @envp is %NULL, the child inherits its -parent's environment. - -@flags should be the bitwise OR of any flags you want to affect the -function's behaviour. The %G_SPAWN_DO_NOT_REAP_CHILD means that -the child will not automatically be reaped; you must use a -#GChildWatch source to be notified about the death of the child -process. Eventually you must call g_spawn_close_pid() on the -@child_pid, in order to free resources which may be associated -with the child process. (On Unix, using a #GChildWatch source is -equivalent to calling waitpid() or handling the %SIGCHLD signal -manually. On Windows, calling g_spawn_close_pid() is equivalent -to calling CloseHandle() on the process handle returned in -@child_pid). - -%G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file -descriptors will be inherited by the child; otherwise all -descriptors except stdin/stdout/stderr will be closed before -calling exec() in the child. %G_SPAWN_SEARCH_PATH -means that &lt;literal&gt;argv[0]&lt;/literal&gt; need not be an absolute path, it -will be looked for in the user's &lt;envar&gt;PATH&lt;/envar&gt;. -%G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output will -be discarded, instead of going to the same location as the parent's -standard output. If you use this flag, @standard_output must be %NULL. -%G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error -will be discarded, instead of going to the same location as the parent's -standard error. If you use this flag, @standard_error must be %NULL. -%G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's -standard input (by default, the child's standard input is attached to -/dev/null). If you use this flag, @standard_input must be %NULL. -%G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is -the file to execute, while the remaining elements are the -actual argument vector to pass to the file. Normally -g_spawn_async_with_pipes() uses @argv[0] as the file to execute, and -passes all of @argv to the child. - -@child_setup and @user_data are a function and user data. On POSIX -platforms, the function is called in the child after GLib has -performed all the setup it plans to perform (including creating -pipes, closing file descriptors, etc.) but before calling -exec(). That is, @child_setup is called just -before calling exec() in the child. Obviously -actions taken in this function will only affect the child, not the -parent. On Windows, there is no separate fork() and exec() -functionality. Child processes are created and run with -a single API call, CreateProcess(). @child_setup is -called in the parent process just before creating the child -process. You should carefully consider what you do in @child_setup -if you intend your software to be portable to Windows. - -If non-%NULL, @child_pid will on Unix be filled with the child's -process ID. You can use the process ID to send signals to the -child, or to use g_child_watch_add() (or waitpid()) if you specified the -%G_SPAWN_DO_NOT_REAP_CHILD flag. On Windows, @child_pid will be -filled with a handle to the child process only if you specified the -%G_SPAWN_DO_NOT_REAP_CHILD flag. You can then access the child -process using the Win32 API, for example wait for its termination -with the &lt;function&gt;WaitFor*()&lt;/function&gt; functions, or examine its -exit code with GetExitCodeProcess(). You should close the handle -with CloseHandle() or g_spawn_close_pid() when you no longer need it. - -If non-%NULL, the @standard_input, @standard_output, @standard_error -locations will be filled with file descriptors for writing to the child's -standard input or reading from its standard output or standard error. -The caller of g_spawn_async_with_pipes() must close these file descriptors -when they are no longer in use. If these parameters are %NULL, the corresponding -pipe won't be created. - -If @standard_input is NULL, the child's standard input is attached to -/dev/null unless %G_SPAWN_CHILD_INHERITS_STDIN is set. - -If @standard_error is NULL, the child's standard error goes to the same -location as the parent's standard error unless %G_SPAWN_STDERR_TO_DEV_NULL -is set. - -If @standard_output is NULL, the child's standard output goes to the same -location as the parent's standard output unless %G_SPAWN_STDOUT_TO_DEV_NULL -is set. - -@error can be %NULL to ignore errors, or non-%NULL to report errors. -If an error is set, the function returns %FALSE. Errors -are reported even if they occur in the child (for example if the -executable in &lt;literal&gt;argv[0]&lt;/literal&gt; is not found). Typically -the &lt;literal&gt;message&lt;/literal&gt; field of returned errors should be displayed -to users. Possible errors are those from the #G_SPAWN_ERROR domain. - -If an error occurs, @child_pid, @standard_input, @standard_output, -and @standard_error will not be filled with valid values. - -If @child_pid is not %NULL and an error does not occur then the returned -pid must be closed using g_spawn_close_pid(). - -&lt;note&gt;&lt;para&gt; -If you are writing a GTK+ application, and the program you -are spawning is a graphical application, too, then you may -want to use gdk_spawn_on_screen_with_pipes() instead to ensure that -the spawned program opens its windows no the right screen. -&lt;/para&gt;&lt;/note&gt; - - - - - - child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding - - - - child's argument vector, in the GLib file name encoding - - - - child's environment, or %NULL to inherit parent's, in the GLib file name encoding - - - - flags from #GSpawnFlags - - - - function to run in the child just before exec() - - - - user data for @child_setup - - - - return location for child process ID, or %NULL - - - - return location for file descriptor to write to child's stdin, or %NULL - - - - return location for file descriptor to read child's stdout, or %NULL - - - - return location for file descriptor to read child's stderr, or %NULL - - - - return location for error - - - - %TRUE on success, %FALSE if an error was set - - - - - -Return value: The #GSequenceIter at position @pos - - - - - a #GSequence - - - - a position in @seq, or -1 for the end. - - - - The #GSequenceIter at position @pos - -Since: 2.14 - - - - - -Converts from a pointer to position within a string to a integer -character offset. - -Since 2.10, this function allows @pos to be before @str, and returns -a negative offset in this case. - - - - - - a UTF-8 encoded string - - - - a pointer to a position within @str - - - - the resulting character offset - - - - - -Sets the time the bookmark for @uri was last visited. - -If no bookmark for @uri is found then it is created. - -The "visited" time should only be set if the bookmark was launched, -either using the command line retrieved by g_bookmark_file_get_app_info() -or by the default application for the bookmark's MIME type, retrieved -using g_bookmark_file_get_mime_type(). Changing the "visited" time -does not affect the "modified" time. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI - - - - a timestamp or -1 to use the current time - - - - - - - - -Copies a #GRand into a new one with the same exact state as before. -This way you can take a snapshot of the random number generator for -replaying later. - - - - - - a #GRand. - - - - the new #GRand. - -Since: 2.4 - - - - - -Executes a child synchronously (waits for the child to exit before returning). -All output from the child is stored in @standard_output and @standard_error, -if those parameters are non-%NULL. If @exit_status is non-%NULL, the exit -status of the child is stored there as it would be returned by -waitpid(); standard UNIX macros such as WIFEXITED() and WEXITSTATUS() -must be used to evaluate the exit status. If an error occurs, no data is -returned in @standard_output, @standard_error, or @exit_status. - -This function calls g_spawn_async_with_pipes() internally; see that -function for full details on the other parameters and details on -how these functions work on Windows. - - - - - - child's current working directory, or %NULL to inherit parent's - - - - child's argument vector - - - - child's environment, or %NULL to inherit parent's - - - - flags from #GSpawnFlags - - - - function to run in the child just before exec() - - - - user data for @child_setup - - - - return location for child output - - - - return location for child error messages - - - - return location for child exit status, as returned by waitpid() - - - - return location for error - - - - %TRUE on success, %FALSE if an error was set. - - - - - -Return value: The position of the first element in @queue which contains @data, or -1 if no element in @queue contains @data. - - - - - a #GQueue - - - - the data to find. - - - - The position of the first element in @queue which contains @data, or -1 if no element in @queue contains @data. - -Since: 2.4 - - - - - -Find the rightmost occurrence of the given Unicode character -in a UTF-8 encoded string, while limiting the search to @len bytes. -If @len is -1, allow unbounded search. - - - - - - a nul-terminated UTF-8 encoded string - - - - the maximum length of @p - - - - a Unicode character - - - - %NULL if the string does not contain the character, -otherwise, a pointer to the start of the rightmost occurrence of the -character in the string. - - - - - -Sets whether to ignore unknown options or not. If an argument is -ignored, it is left in the @argv array after parsing. By default, -g_option_context_parse() treats unknown options as error. - -This setting does not affect non-option arguments (i.e. arguments -which don't start with a dash). But note that GOption cannot reliably -determine whether a non-option belongs to a preceding unknown option. - -Since: 2.6 - - - - - a #GOptionContext - - - - %TRUE to ignore unknown options, %FALSE to produce -an error when unknown options are met - - - - - - - - -If @err is %NULL, does nothing. If @err is non-%NULL, -calls g_error_free() on *@err and sets *@err to %NULL. - - - - - a #GError return location - - - - - - - - -Return value: the end iterator for @seq - - - - - a #GSequence - - - - the end iterator for @seq - -Since: 2.14 - - - - - -Convert a character to ASCII lower case. - -Unlike the standard C library tolower() function, this only -recognizes standard ASCII letters and ignores the locale, returning -all non-ASCII characters unchanged, even if they are lower case -letters in a particular character set. Also unlike the standard -library function, this takes and returns a char, not an int, so -don't call it on %EOF but no need to worry about casting to #guchar -before passing a possibly non-ASCII character in. - - - - - - any character. - - - - the result of converting @c to lower case. -If @c is not an ASCII upper case letter, -@c is returned unchanged. - - - - - -Return value: The number of items in @queue. - - - - - a #GQueue - - - - The number of items in @queue. - -Since: 2.4 - - - - - -This returns the string that #GIOChannel uses to determine -where in the file a line break occurs. A value of %NULL -indicates auto detection. - - - - - - a #GIOChannel - - - - a location to return the length of the line terminator - - - - The line termination string. This value -is owned by GLib and must not be freed. - - - - - -Reverses a UTF-8 string. @str must be valid UTF-8 encoded text. -(Use g_utf8_validate() on all text before trying to use UTF-8 -utility functions with it.) - -Note that unlike g_strreverse(), this function returns -newly-allocated memory, which should be freed with g_free() when -no longer needed. - - - - - - a UTF-8 encoded string - - - - the maximum length of @str to use. If @len &lt; 0, then -the string is nul-terminated. - - - - a newly-allocated string which is the reverse of @str. - -Since: 2.2 - - - - - -Return value: A random number. - - - - - lower closed bound of the interval. - - - - upper open bound of the interval. - - - - A random number. - - - - - -Gets flags values packed in together with the datalist. -See g_datalist_set_flags(). - - - - - - pointer to the location that holds a list - - - - the flags of the datalist - -Since: 2.8 - - - - - -Removes the idle function with the given data. - - - - - - the data for the idle source's callback. - - - - %TRUE if an idle source was found and removed. - - - - - -Creates a new #GQueue. - - - - - - a new #GQueue. - - - - - -Gets the name of the file without any leading directory components. -It returns a pointer into the given file name string. - - - - - - the name of the file. - - - - the name of the file without any leading directory components. - -Deprecated:2.2: Use g_path_get_basename() instead, but notice that -g_path_get_basename() allocates new memory for the returned string, unlike -this function which returns a pointer into the argument. - - - - - -A wrapper for the POSIX unlink() function. The unlink() function -deletes a name from the filesystem. If this was the last link to the -file and no processes have it opened, the diskspace occupied by the -file is freed. - -See your C library manual for more details about unlink(). Note -that on Windows, it is in general not possible to delete files that -are open to some process, or mapped into memory. - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - 0 if the name was successfully deleted, -1 if an error -occurred - -Since: 2.6 - - - - - -Return Value: %TRUE if the @channel is buffered. - - - - - a #GIOChannel. - - - - %TRUE if the @channel is buffered. - - - - - -Reads all the remaining data from the file. - - - - - - a #GIOChannel - - - - Location to store a pointer to a string holding -the remaining data in the #GIOChannel. This data should -be freed with g_free() when no longer needed. This -data is terminated by an extra nul character, but there -may be other nuls in the intervening data. - - - - Location to store length of the data - - - - A location to return an error of type #GConvertError -or #GIOChannelError - - - - %G_IO_STATUS_NORMAL on success. -This function never returns %G_IO_STATUS_EOF. - - - - - -Removes the item pointed to by @iter. It is an error to pass the -end iterator to this function. - -If the sequnce has a data destroy function associated with it, this -function is called on the data for the removed item. - -Since: 2.14 - - - - - a #GSequenceIter - - - - - - - - -Determines whether a character is a lowercase letter. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is a lowercase letter - - - - - -Tries to pop data from the @queue. If no data is available, %NULL is -returned. This function must be called while holding the @queue's -lock. - - - - - - a #GAsyncQueue. - - - - data from the queue or %NULL, when no data is -available immediately. - - - - - -Returns the depth of the stack of calls to - - - - -the depth of the stack of calls to -g_main_context_dispatch() on any #GMainContext in the current thread. -That is, when called from the toplevel, it gives 0. When -called from within a callback from g_main_context_iteration() -(or g_main_loop_run(), etc.) it returns 1. When called from within -a callback to a recursive call to g_main_context_iterate(), -it returns 2. And so forth. - -This function is useful in a situation like the following: -Imagine an extremely simple "garbage collected" system. - -&lt;example&gt; -static GList *free_list; - -gpointer -allocate_memory (gsize size) -{ -gpointer result = g_malloc (size); -free_list = g_list_prepend (free_list, result); -return result; -} - -void -free_allocated_memory (void) -{ -GList *l; -for (l = free_list; l; l = l-&gt;next); -g_free (l-&gt;data); -g_list_free (free_list); -free_list = NULL; -} - -[...] - -while (TRUE); -{ -g_main_context_iteration (NULL, TRUE); -free_allocated_memory(); -} -&lt;/example&gt; - -This works from an application, however, if you want to do the same -thing from a library, it gets more difficult, since you no longer -control the main loop. You might think you can simply use an idle -function to make the call to free_allocated_memory(), but that -doesn't work, since the idle function could be called from a -recursive callback. This can be fixed by using g_main_depth() - -&lt;example&gt; -gpointer -allocate_memory (gsize size) -{ -FreeListBlock *block = g_new (FreeListBlock, 1);\ -block-&gt;mem = g_malloc (size); -block-&gt;depth = g_main_depth (); -free_list = g_list_prepend (free_list, block); -return block-&gt;mem; -} - -void -free_allocated_memory (void) -{ -GList *l; - -int depth = g_main_depth (); -for (l = free_list; l; ); -{ -GList *next = l-&gt;next; -FreeListBlock *block = l-&gt;data; -if (block-&gt;depth &gt; depth) -{ -g_free (block-&gt;mem); -g_free (block); -free_list = g_list_delete_link (free_list, l); -} - -l = next; -} -} -&lt;/example&gt; - -There is a temptation to use g_main_depth() to solve -problems with reentrancy. For instance, while waiting for data -to be received from the network in response to a menu item, -the menu item might be selected again. It might seem that -one could make the menu item's callback return immediately -and do nothing if g_main_depth() returns a value greater than 1. -However, this should be avoided since the user then sees selecting -the menu item do nothing. Furthermore, you'll find yourself adding -these checks all over your code, since there are doubtless many, -many things that the user could do. Instead, you can use the -following techniques: - -&lt;orderedlist&gt; -&lt;listitem&gt; -&lt;para&gt; -Use gtk_widget_set_sensitive() or modal dialogs to prevent -the user from interacting with elements while the main -loop is recursing. -&lt;/para&gt; -&lt;/listitem&gt; -&lt;listitem&gt; -&lt;para&gt; -Avoid main loop recursion in situations where you can't handle -arbitrary callbacks. Instead, structure your code so that you -simply return to the main loop and then get called again when -there is more work to do. -&lt;/para&gt; -&lt;/listitem&gt; -&lt;/orderedlist&gt; - - - - - -Removes all keys and their associated values from a #GHashTable. - -If the #GHashTable was created using g_hash_table_new_full(), the keys -and values are freed using the supplied destroy functions, otherwise you -have to make sure that any dynamically allocated values are freed -yourself. - -Since: 2.12 - - - - - a #GHashTable - - - - - - - - -Return value: A random number. - - - - - a #GRand. - - - - lower closed bound of the interval. - - - - upper open bound of the interval. - - - - A random number. - - - - - -Removes a key and its associated value from a #GHashTable. - -If the #GHashTable was created using g_hash_table_new_full(), the -key and value are freed using the supplied destroy functions, otherwise -you have to make sure that any dynamically allocated values are freed -yourself. - - - - - - a #GHashTable. - - - - the key to remove. - - - - %TRUE if the key was found and removed from the #GHashTable. - - - - - -Converts a #GString to uppercase. - - - - - - a #GString - - - - @string - -Deprecated:2.2: This function uses the locale-specific -toupper() function, which is almost never the right thing. -Use g_string_ascii_up() or g_utf8_strup() instead. - - - - - -Return value: whether @error has @domain and @code - - - - - a #GError - - - - an error domain - - - - an error code - - - - whether @error has @domain and @code - - - - - -Creates a new #GString, with enough space for @dfl_size -bytes. This is useful if you are going to add a lot of -text to the string and don't want it to be reallocated -too often. - - - - - - the default size of the space allocated to -hold the string - - - - the new #GString - - - - - -Return the path to the lib\locale subfolder of the GLib -installation folder. The path is in the system codepage. We have to -use system codepage as bindtextdomain() doesn't have a UTF-8 -interface. - - - - - - - - - -Converts a filename into a valid UTF-8 string. The conversion is -not necessarily reversible, so you should keep the original around -and use the return value of this function only for display purposes. -Unlike g_filename_to_utf8(), the result is guaranteed to be non-%NULL -even if the filename actually isn't in the GLib file name encoding. - -If GLib can not make sense of the encoding of @filename, as a last resort it -replaces unknown characters with U+FFFD, the Unicode replacement character. -You can search the result for the UTF-8 encoding of this character (which is -"\357\277\275" in octal notation) to find out if @filename was in an invalid -encoding. - -If you know the whole pathname of the file you should use -g_filename_display_basename(), since that allows location-based -translation of filenames. - - - - - - a pathname hopefully in the GLib file name encoding - - - - a newly allocated string containing -a rendition of the filename in valid UTF-8 - -Since: 2.6 - - - - - -A convenience function which creates a main group if it doesn't -exist, adds the @entries to it and sets the translation domain. - -Since: 2.6 - - - - - a #GOptionContext - - - - a %NULL-terminated array of #GOptionEntry&lt;!-- --&gt;s - - - - a translation domain to use for translating -the &lt;option&gt;--help&lt;/option&gt; output for the options in @entries -with gettext(), or %NULL - - - - - - - - -Opens a directory for reading. The names of the files in the -directory can then be retrieved using g_dir_read_name(). - - - - - - the path to the directory you are interested in. On Unix -in the on-disk encoding. On Windows in UTF-8 - - - - Currently must be set to 0. Reserved for future use. - - - - return location for a #GError, or %NULL. -If non-%NULL, an error will be set if and only if -g_dir_open() fails. - - - - a newly allocated #GDir on success, %NULL on failure. -If non-%NULL, you must free the result with g_dir_close() -when you are finished with it. - - - - - -A wrapper for the POSIX lstat() function. The lstat() function is -like stat() except that in the case of symbolic links, it returns -information about the symbolic link itself and not the file that it -refers to. If the system does not support symbolic links g_lstat() -is identical to g_stat(). - -See the C library manual for more details about lstat(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - a pointer to a &lt;structname&gt;stat&lt;/structname&gt; struct, which -will be filled with the file information - - - - 0 if the information was successfully retrieved, -1 if an error -occurred - -Since: 2.6 - - - - - -Inserts @data into the list of tasks to be executed by @pool. When -the number of currently running threads is lower than the maximal -allowed number of threads, a new thread is started (or reused) with -the properties given to g_thread_pool_new (). Otherwise @data stays -in the queue until a thread in this pool finishes its previous task -and processes @data. - -@error can be %NULL to ignore errors, or non-%NULL to report -errors. An error can only occur when a new thread couldn't be -created. In that case @data is simply appended to the queue of work -to do. - - - - - a #GThreadPool - - - - a new task for @pool - - - - return location for error - - - - - - - - -Increases reference count of @regex by 1. - - - - - - a #GRegex - - - - @regex - -Since: 2.14 - - - - - -Adds a byte onto the start of a #GString, -expanding it if necessary. - - - - - - a #GString - - - - the byte to prepend on the start of the #GString - - - - @string - - - - - -Moves the data pointed to a new position as indicated by @cmp_func. This -function should be called for items in a sequence already sorted according -to @cmp_func whenever some aspect of an item changes so that @cmp_func -may return different values for that item. - -Since: 2.14 - - - - - A #GSequenceIter - - - - the #GCompareDataFunc used to compare items in the sequence. It -is called with two items of the @seq and @user_data. It should -return 0 if the items are equal, a negative value if the first -item comes before the second, and a positive value if the second -item comes before the first. - - - - user data passed to @cmp_func. - - - - - - - - -An auxiliary function for gettext() support (see Q_()). - - - - - - a string - - - - another string - - - - @msgval, unless @msgval is identical to @msgid and contains -a '|' character, in which case a pointer to the substring of msgid after -the first '|' character is returned. - -Since: 2.4 - - - - - -Determines information necessary to poll this main loop. - - - - - - a #GMainContext - - - - maximum priority source to check - - - - location to store timeout to be used in polling - - - - location to store #GPollFD records that need to be polled. - - - - length of @fds. - - - - the number of records actually stored in @fds, -or, if more than @n_fds records need to be stored, the number -of records that need to be stored. - - - - - -Gets the current user's home directory as defined in the -password database. - -Note that in contrast to traditional UNIX tools, this function -prefers &lt;filename&gt;passwd&lt;/filename&gt; entries over the &lt;envar&gt;HOME&lt;/envar&gt; -environment variable. - -One of the reasons for this decision is that applications in many -cases need special handling to deal with the case where -&lt;envar&gt;HOME&lt;/envar&gt; is -&lt;simplelist&gt; -&lt;member&gt;Not owned by the user&lt;/member&gt; -&lt;member&gt;Not writeable&lt;/member&gt; -&lt;member&gt;Not even readable&lt;/member&gt; -&lt;/simplelist&gt; -Since applications are in general &lt;emphasis&gt;not&lt;/emphasis&gt; written -to deal with these situations it was considered better to make -g_get_homedir() not pay attention to &lt;envar&gt;HOME&lt;/envar&gt; and to -return the real home directory for the user. If applications -want to pay attention to &lt;envar&gt;HOME&lt;/envar&gt;, they can do: -&lt;informalexample&gt;&lt;programlisting&gt; -const char *homedir = g_getenv ("HOME"); -if (!homedir) -homedir = g_get_homedir (&lt;!-- --&gt;); -&lt;/programlisting&gt;&lt;/informalexample&gt; - - - - - - the current user's home directory - - - - - -Copies a block of memory @len bytes long, from @src to @dest. -The source and destination areas may overlap. - -In order to use this function, you must include -&lt;filename&gt;string.h&lt;/filename&gt; yourself, because this macro will -typically simply resolve to memmove() and GLib does not include -&lt;filename&gt;string.h&lt;/filename&gt; for you. - - - - - the destination address to copy the bytes to. - - - - the source address to copy the bytes from. - - - - the number of bytes to copy. - - - - - - - - -Frees the memory allocated for the #GQueue. Only call this function if -@queue was created with g_queue_new(). If queue elements contain -dynamically-allocated memory, they should be freed first. - - - - - a #GQueue. - - - - - - - - -Returns: the expanded string, or %NULL if an error occurred - - - - - a #GMatchInfo or %NULL - - - - the string to expand - - - - location to store the error occuring, or %NULL to ignore errors - - - - the expanded string, or %NULL if an error occurred - -Since: 2.14 - - - - - -Loads a key file from memory into an empty #GKeyFile structure. If -the object cannot be created then %error is set to a -#GKeyFileError. - - - - - - an empty #GKeyFile struct - - - - key file loaded in memory. - - - - the length of @data in bytes - - - - flags from #GKeyFileFlags - - - - return location for a #GError, or %NULL - - - - %TRUE if a key file could be loaded, %FALSE othewise -Since: 2.6 - - - - - -Converts all lower case ASCII letters to upper case ASCII letters. - - - - - - a GString - - - - passed-in @string pointer, with all the lower case -characters converted to upper case in place, with -semantics that exactly match g_ascii_toupper(). - - - - - -Return value: a newly allocated string or %NULL if the specified - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for a #GError, or %NULL - - - - a newly allocated string or %NULL if the specified -key cannot be found. - -Since: 2.6 - - - - - -Signals to the #GMarkupParseContext that all data has been -fed into the parse context with g_markup_parse_context_parse(). -This function reports an error if the document isn't complete, -for example if elements are still open. - - - - - - a #GMarkupParseContext - - - - return location for a #GError - - - - %TRUE on success, %FALSE if an error was set - - - - - -Return value: the maximal number of threads - - - - - a #GThreadPool - - - - the maximal number of threads - - - - - -Determines the numeric value of a character as a decimal -digit. Differs from g_unichar_digit_value() because it takes -a char, so there's no worry about sign extension if characters -are signed. - - - - - - an ASCII character. - - - - If @c is a decimal digit (according to -g_ascii_isdigit()), its numeric value. Otherwise, -1. - - - - - -Sets the function to use to handle polling of file descriptors. It -will be used instead of the poll() system call -(or GLib's replacement function, which is used where -poll() isn't available). - -This function could possibly be used to integrate the GLib event -loop with an external event loop. - - - - - a #GMainContext - - - - the function to call to poll all file descriptors - - - - - - - - -Compiles the regular expression to an internal form, and does -the initial setup of the #GRegex structure. - - - - - - the regular expression - - - - compile options for the regular expression - - - - match options for the regular expression - - - - return location for a #GError - - - - a #GRegex structure. Call g_regex_unref() when you -are done with it - -Since: 2.14 - - - - - -Removes the last element of the queue. - - - - - - a #GQueue. - - - - the data of the last element in the queue, or %NULL if the queue -is empty. - - - - - -Sets a function to be called at regular intervals, with the given -priority. The function is called repeatedly until it returns -%FALSE, at which point the timeout is automatically destroyed and -the function will not be called again. The @notify function is -called when the timeout is destroyed. The first call to the -function will be at the end of the first @interval. - -Note that timeout functions may be delayed, due to the processing of other -event sources. Thus they should not be relied on for precise timing. -After each call to the timeout function, the time of the next -timeout is recalculated based on the current time and the given interval -(it does not try to 'catch up' time lost in delays). - - - - - - the priority of the timeout source. Typically this will be in -the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. - - - - the time between calls to the function, in milliseconds -(1/1000ths of a second) - - - - function to call - - - - data to pass to @function - - - - function to call when the timeout is removed, or %NULL - - - - the ID (greater than 0) of the event source. - - - - - -Return value: %TRUE if the source has been destroyed - - - - - a #GSource - - - - %TRUE if the source has been destroyed - -Since: 2.12 - - - - - -Sets the value of a date from a #GTimeVal value. Note that the -@tv_usec member is ignored, because #GDate can't make use of the -additional precision. - -Since: 2.10 - - - - - a #GDate - - - - #GTimeVal value to set - - - - - - - - -Determines if a given character typically takes zero width when rendered. -The return value is %TRUE for all non-spacing and enclosing marks -(e.g., combining accents), format characters, zero-width -space, but not U+00AD SOFT HYPHEN. - -A typical use of this function is with one of g_unichar_iswide() or -g_unichar_iswide_cjk() to determine the number of cells a string occupies -when displayed on a grid display (terminals). However, note that not all -terminals support zero-width rendering of zero-width marks. - - - - - - a Unicode character - - - - %TRUE if the character has zero width - -Since: 2.14 - - - - - -Like the standard C strncpy() function, but -copies a given number of characters instead of a given number of -bytes. The @src string must be valid UTF-8 encoded text. -(Use g_utf8_validate() on all text before trying to use UTF-8 -utility functions with it.) - - - - - - buffer to fill with characters from @src - - - - UTF-8 encoded string - - - - character count - - - - @dest - - - - - -Checks whether @replacement is a valid replacement string -(see g_regex_replace()), i.e. that all escape sequences in -it are valid. - -If @has_references is not %NULL then @replacement is checked -for pattern references. For instance, replacement text 'foo\n' -does not contain references and may be evaluated without information -about actual match, but '\0\1' (whole match followed by first -subpattern) requires valid #GMatchInfo object. - - - - - - the replacement string - - - - location to store information about -references in @replacement or %NULL - - - - location to store error - - - - whether @replacement is a valid replacement string - -Since: 2.14 - - - - - -Decode a sequence of Base-64 encoded text into binary data - - - - - - zero-terminated string with base64 text to decode - - - - The length of the decoded data is written here - - - - a newly allocated buffer containing the binary data -that @text represents - -Since: 2.12 - - - - - -Return value: whether a test was %TRUE - - - - - a filename to test in the GLib file name encoding - - - - bitfield of #GFileTest flags - - - - whether a test was %TRUE - - - - - -Searches the string @haystack for the first occurrence -of the string @needle, limiting the length of the search -to @haystack_len. - - - - - - a string. - - - - the maximum length of @haystack. - - - - the string to search for. - - - - a pointer to the found occurrence, or -%NULL if not found. - - - - - -Converts a #gdouble to a string, using the '.' as -decimal point. To format the number you pass in -a printf()-style format string. Allowed conversion -specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'. - -If you just want to want to serialize the value into a -string, use g_ascii_dtostr(). - - - - - - A buffer to place the resulting string in - - - - The length of the buffer. - - - - The printf()-style format to use for the -code to use for converting. - - - - The #gdouble to convert - - - - The pointer to the buffer with the converted string. - - - - - -Sets @title as the title of the bookmark for @uri inside the -bookmark file @bookmark. - -If @uri is %NULL, the title of @bookmark is set. - -If a bookmark for @uri cannot be found then it is created. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - a valid URI or %NULL - - - - a UTF-8 encoded string - - - - - - - - -Sets the maximal allowed number of threads for @pool. A value of -1 -means, that the maximal number of threads is unlimited. - -Setting @max_threads to 0 means stopping all work for @pool. It is -effectively frozen until @max_threads is set to a non-zero value -again. - -A thread is never terminated while calling @func, as supplied by -g_thread_pool_new (). Instead the maximal number of threads only -has effect for the allocation of new threads in g_thread_pool_push(). -A new thread is allocated, whenever the number of currently -running threads in @pool is smaller than the maximal number. - -@error can be %NULL to ignore errors, or non-%NULL to report -errors. An error can only occur when a new thread couldn't be -created. - - - - - a #GThreadPool - - - - a new maximal number of threads for @pool - - - - return location for error - - - - - - - - -Finds the start of the next UTF-8 character in the string after @p. - -@p does not have to be at the beginning of a UTF-8 character. No check -is made to see if the character found is actually valid other than -it starts with an appropriate byte. - - - - - - a pointer to a position within a UTF-8 encoded string - - - - a pointer to the end of the string, or %NULL to indicate -that the string is nul-terminated, in which case -the returned value will be - - - - a pointer to the found character or %NULL - - - - - -Determines whether a character is a space, tab, or line separator -(newline, carriage return, etc.). Given some UTF-8 text, obtain a -character value with g_utf8_get_char(). - -(Note: don't use this to do word breaking; you have to use -Pango or equivalent to get word breaking right, the algorithm -is fairly complex.) - - - - - - a Unicode character - - - - %TRUE if @c is a space character - - - - - -Convert a string from UTF-8 to a 32-bit fixed width -representation as UCS-4. A trailing 0 will be added to the -string after the converted text. - - - - - - a UTF-8 encoded string - - - - the maximum length of @str to use. If @len &lt; 0, then -the string is nul-terminated. - - - - location to store number of bytes read, or %NULL. -If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be -returned in case @str contains a trailing partial -character. If an error occurs then the index of the -invalid input is stored here. - - - - location to store number of characters written or %NULL. -The value here stored does not include the trailing 0 -character. - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError other than -%G_CONVERT_ERROR_NO_CONVERSION may occur. - - - - a pointer to a newly allocated UCS-4 string. -This value must be freed with g_free(). If an -error occurs, %NULL will be returned and -@error set. - - - - - -Searches a #GTree using @search_func. - -The @search_func is called with a pointer to the key of a key/value pair in -the tree, and the passed in @user_data. If @search_func returns 0 for a -key/value pair, then g_tree_search_func() will return the value of that -pair. If @search_func returns -1, searching will proceed among the -key/value pairs that have a smaller key; if @search_func returns 1, -searching will proceed among the key/value pairs that have a larger key. - - - - - - a #GTree. - - - - a function used to search the #GTree. - - - - the data passed as the second argument to the @search_func -function. - - - - the value corresponding to the found key, or %NULL if the key -was not found. - - - - - -Gets the name of the program. This name should &lt;emphasis&gt;not&lt;/emphasis&gt; -be localized, contrast with g_get_application_name(). -(If you are using GDK or GTK+ the program name is set in gdk_init(), -which is called by gtk_init(). The program name is found by taking -the last component of &lt;literal&gt;argv[0]&lt;/literal&gt;.) - - - - - - the name of the program. The returned string belongs -to GLib and must not be modified or freed. - - - - - -Inserts @len bytes of @val into @string at @pos. -Because @len is provided, @val may contain embedded -nuls and need not be nul-terminated. If @pos is -1, -bytes are inserted at the end of the string. - -Since this function does not stop at nul bytes, it is -the caller's responsibility to ensure that @val has at -least @len addressable bytes. - - - - - - a #GString - - - - position in @string where insertion should -happen, or -1 for at the end - - - - bytes to insert - - - - number of bytes of @val to insert - - - - @string - - - - - -Inserts a new key and value into a #GTree similar to g_tree_insert(). -The difference is that if the key already exists in the #GTree, it gets -replaced by the new key. If you supplied a @value_destroy_func when -creating the #GTree, the old value is freed using that function. If you -supplied a @key_destroy_func when creating the #GTree, the old key is -freed using that function. - -The tree is automatically 'balanced' as new key/value pairs are added, -so that the distance from the root to every leaf is as small as possible. - - - - - a #GTree. - - - - the key to insert. - - - - the value corresponding to the key. - - - - - - - - -This function creates a new thread pool. - -Whenever you call g_thread_pool_push(), either a new thread is -created or an unused one is reused. At most @max_threads threads -are running concurrently for this thread pool. @max_threads = -1 -allows unlimited threads to be created for this thread pool. The -newly created or reused thread now executes the function @func with -the two arguments. The first one is the parameter to -g_thread_pool_push() and the second one is @user_data. - -The parameter @exclusive determines, whether the thread pool owns -all threads exclusive or whether the threads are shared -globally. If @exclusive is %TRUE, @max_threads threads are started -immediately and they will run exclusively for this thread pool until -it is destroyed by g_thread_pool_free(). If @exclusive is %FALSE, -threads are created, when needed and shared between all -non-exclusive thread pools. This implies that @max_threads may not -be -1 for exclusive thread pools. - -@error can be %NULL to ignore errors, or non-%NULL to report -errors. An error can only occur when @exclusive is set to %TRUE and -not all @max_threads threads could be created. - - - - - - a function to execute in the threads of the new thread pool - - - - user data that is handed over to @func every time it -is called - - - - the maximal number of threads to execute concurrently in -the new thread pool, -1 means no limit - - - - should this thread pool be exclusive? - - - - return location for error - - - - the new #GThreadPool - - - - - -Adds a #GSource to a @context so that it will be executed within -that context. - - - - - - a #GSource - - - - a #GMainContext (if %NULL, the default context will be used) - - - - the ID (greater than 0) for the source within the -#GMainContext. - - - - - -An implementation of the standard fprintf() function which supports -positional parameters, as specified in the Single Unix Specification. - - - - - - the stream to write to. - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the list of arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.2 - - - - - -Associates a list of string values for @key and @locale under -@group_name. If the translation for @key cannot be found then -it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - a locale - - - - a %NULL-terminated array of locale string values - - - - the length of @list - - - - - - - - -Creates a new #GError with the given @domain and @code, -and a message formatted with @format. - - - - - - error domain - - - - error code - - - - printf()-style format for error message - - - - parameters for message format - - - - a new #GError - - - - - -Removes a key/value pair from a #GTree. - -If the #GTree was created using g_tree_new_full(), the key and value -are freed using the supplied destroy functions, otherwise you have to -make sure that any dynamically allocated values are freed yourself. -If the key does not exist in the #GTree, the function does nothing. - - - - - - a #GTree. - - - - the key to remove. - - - - %TRUE if the key was found (prior to 2.8, this function returned -nothing) - - - - - -A wrapper for the POSIX rmdir() function. The rmdir() function -deletes a directory from the filesystem. - -See your C library manual for more details about how rmdir() works -on your system. - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - 0 if the directory was successfully removed, -1 if an error -occurred - -Since: 2.6 - - - - - -Creates a new asynchronous queue with the initial reference count of 1. - - - - - - the new #GAsyncQueue. - - - - - -Specifies a function to be called at normal program termination. - -Since GLib 2.8.2, on Windows g_atexit() actually is a preprocessor -macro that maps to a call to the atexit() function in the C -library. This means that in case the code that calls g_atexit(), -i.e. atexit(), is in a DLL, the function will be called when the -DLL is detached from the program. This typically makes more sense -than that the function is called when the GLib DLL is detached, -which happened earlier when g_atexit() was a function in the GLib -DLL. - -The behaviour of atexit() in the context of dynamically loaded -modules is not formally specified and varies wildly. - -On POSIX systems, calling g_atexit() (or atexit()) in a dynamically -loaded module which is unloaded before the program terminates might -well cause a crash at program exit. - -Some POSIX systems implement atexit() like Windows, and have each -dynamically loaded module maintain an own atexit chain that is -called when the module is unloaded. - -On other POSIX systems, before a dynamically loaded module is -unloaded, the registered atexit functions (if any) residing in that -module are called, regardless where the code that registered them -resided. This is presumably the most robust approach. - -As can be seen from the above, for portability it's best to avoid -calling g_atexit() (or atexit()) except in the main executable of a -program. - - - - - the function to call on normal program termination. - - - - - - - - -Compares two strings for ordering using the linguistically -correct rules for the &lt;link linkend="setlocale"&gt;current locale&lt;/link&gt;. -When sorting a large number of strings, it will be significantly -faster to obtain collation keys with g_utf8_collate_key() and -compare the keys with strcmp() when sorting instead of sorting -the original strings. - - - - - - a UTF-8 encoded string - - - - a UTF-8 encoded string - - - - &lt; 0 if @str1 compares before @str2, -0 if they compare equal, &gt; 0 if @str1 compares after @str2. - - - - - -See g_spawn_async_with_pipes() for a full description; this function -simply calls the g_spawn_async_with_pipes() without any pipes. - -&lt;note&gt;&lt;para&gt; -If you are writing a GTK+ application, and the program you -are spawning is a graphical application, too, then you may -want to use gdk_spawn_on_screen() instead to ensure that -the spawned program opens its windows on the right screen. -&lt;/para&gt;&lt;/note&gt; - - - - - - child's current working directory, or %NULL to inherit parent's - - - - child's argument vector - - - - child's environment, or %NULL to inherit parent's - - - - flags from #GSpawnFlags - - - - function to run in the child just before exec() - - - - user data for @child_setup - - - - return location for child process ID, or %NULL - - - - return location for error - - - - %TRUE on success, %FALSE if error is set - - - - - -Pops data from the @queue. If no data is received before @end_time, -%NULL is returned. - -To easily calculate @end_time a combination of g_get_current_time() -and g_time_val_add() can be used. - - - - - - a #GAsyncQueue. - - - - a #GTimeVal, determining the final time. - - - - data from the queue or %NULL, when no data is -received before @end_time. - - - - - -Splits an URI list conforming to the text/uri-list -mime type defined in RFC 2483 into individual URIs, -discarding any comments. The URIs are not validated. - - - - - - an URI list - - - - a newly allocated %NULL-terminated list of -strings holding the individual URIs. The array should -be freed with g_strfreev(). - -Since: 2.6 - - - - - -Inserts a new key and value into a #GHashTable. - -If the key already exists in the #GHashTable its current value is replaced -with the new value. If you supplied a @value_destroy_func when creating the -#GHashTable, the old value is freed using that function. If you supplied -a @key_destroy_func when creating the #GHashTable, the passed key is freed -using that function. - - - - - a #GHashTable. - - - - a key to insert. - - - - the value to associate with the key. - - - - - - - - -Removes a source from the default main loop context given the user -data for the callback. If multiple sources exist with the same user -data, only one will be destroyed. - - - - - - the user_data for the callback. - - - - %TRUE if a source was found and removed. - - - - - -Removes a key and its associated value from a #GTree without calling -the key and value destroy functions. - -If the key does not exist in the #GTree, the function does nothing. - - - - - - a #GTree. - - - - the key to remove. - - - - %TRUE if the key was found (prior to 2.8, this function returned -nothing) - - - - - -Calls the given function for each of the key/value pairs in the #GTree. -The function is passed the key and value of each pair, and the given -@data parameter. The tree is traversed in sorted order. - -The tree may not be modified while iterating over it (you can't -add/remove items). To remove all items matching a predicate, you need -to add each item to a list in your #GTraverseFunc as you walk over -the tree, then walk the list and remove each item. - - - - - a #GTree. - - - - the function to call for each node visited. If this function -returns %TRUE, the traversal is stopped. - - - - user data to pass to the function. - - - - - - - - -Checks if any sources have pending events for the given context. - - - - - - a #GMainContext (if %NULL, the default context will be used) - - - - %TRUE if events are pending. - - - - - -Creates a new timeout source. - -The source will not initially be associated with any #GMainContext -and must be added to one with g_source_attach() before it will be -executed. - - - - - - the timeout interval in milliseconds. - - - - the newly-created timeout source - - - - - -Creates a new #GTree like g_tree_new() and allows to specify functions -to free the memory allocated for the key and value that get called when -removing the entry from the #GTree. - - - - - - qsort()-style comparison function. - - - - data to pass to comparison function. - - - - a function to free the memory allocated for the key -used when removing the entry from the #GTree or %NULL if you don't -want to supply such a function. - - - - a function to free the memory allocated for the -value used when removing the entry from the #GTree or %NULL if you -don't want to supply such a function. - - - - a new #GTree. - - - - - -Gets the poll function set by g_main_context_set_poll_func(). - - - - - - a #GMainContext - - - - the poll function - - - - - -Adds a copy of @string to the #GStringChunk, unless the same -string has already been added to the #GStringChunk with -g_string_chunk_insert_const(). - -This function is useful if you need to copy a large number -of strings but do not want to waste space storing duplicates. -But you must remember that there may be several pointers to -the same string, and so any changes made to the strings -should be done very carefully. - -Note that g_string_chunk_insert_const() will not return a -pointer to a string added with g_string_chunk_insert(), even -if they do match. - - - - - - a #GStringChunk - - - - the string to add - - - - a pointer to the new or existing copy of @string -within the #GStringChunk - - - - - -Frees the memory allocated for the #GString. -If @free_segment is %TRUE it also frees the character data. - - - - - - a #GString - - - - if %TRUE the actual character data is freed as well - - - - the character data of @string -(i.e. %NULL if @free_segment is %TRUE) - - - - - -Converts a character to uppercase. - - - - - - a Unicode character - - - - the result of converting @c to uppercase. -If @c is not an lowercase or titlecase character, -or has no upper case equivalent @c is returned unchanged. - - - - - -Removes all items in the (@begin, @end) range. - -If the sequence has a data destroy function associated with it, this -function is called on the data for the removed items. - -Since: 2.14 - - - - - a #GSequenceIter - - - - a #GSequenceIter - - - - - - - - -This sets the string that #GIOChannel uses to determine -where in the file a line break occurs. - - - - - a #GIOChannel - - - - The line termination string. Use %NULL for auto detect. -Auto detection breaks on "\n", "\r\n", "\r", "\0", and -the Unicode paragraph separator. Auto detection should -not be used for anything other than file-based channels. - - - - The length of the termination string. If -1 is passed, the -string is assumed to be nul-terminated. This option allows -termination strings with embeded nuls. - - - - - - - - -An implementation of the standard sprintf() function which supports -positional parameters, as specified in the Single Unix Specification. - - - - - - A pointer to a memory buffer to contain the resulting string. It -is up to the caller to ensure that the allocated buffer is large -enough to hold the formatted result - - - - a standard printf() format string, but notice -&lt;link linkend="string-precision"&gt;string precision pitfalls&lt;/link&gt;. - - - - the arguments to insert in the output. - - - - the number of characters printed. - -Since: 2.2 - - - - - -A case-insensitive string comparison, corresponding to the standard -strncasecmp() function on platforms which support it. -It is similar to g_strcasecmp() except it only compares the first @n -characters of the strings. - - - - - - a string. - - - - a string to compare with @s1. - - - - the maximum number of characters to compare. - - - - 0 if the strings match, a negative value if @s1 &lt; @s2, -or a positive value if @s1 &gt; @s2. - -Deprecated:2.2: The problem with g_strncasecmp() is that it does the -comparison by calling toupper()/tolower(). These functions are -locale-specific and operate on single bytes. However, it is impossible -to handle things correctly from an I18N standpoint by operating on -bytes, since characters may be multibyte. Thus g_strncasecmp() is -broken if your string is guaranteed to be ASCII, since it's -locale-sensitive, and it's broken if your string is localized, since -it doesn't work on many encodings at all, including UTF-8, EUC-JP, -etc. - -There are therefore two replacement functions: g_ascii_strncasecmp(), -which only works on ASCII and is not locale-sensitive, and -g_utf8_casefold(), which is good for case-insensitive sorting of UTF-8. - - - - - -Computes the canonical decomposition of a Unicode character. - - - - - - a Unicode character. - - - - location to store the length of the return value. - - - - a newly allocated string of Unicode characters. -@result_len is set to the resulting length of the string. - - - - - -Return value: the begin iterator for @seq. - - - - - a #GSequence - - - - the begin iterator for @seq. - -Since: 2.14 - - - - - -Expires a single cache bucket @bucket. This should only ever be -called on a bucket that currently has no used iconv descriptors -open. - -@node is not a required argument. If @node is not supplied, we -search for it ourselves. - - - - - cache bucket's node - - - - cache bucket - - - - - - - - -Creates a new #GTree with a comparison function that accepts user data. -See g_tree_new() for more details. - - - - - - qsort()-style comparison function. - - - - data to pass to comparison function. - - - - a new #GTree. - - - - - -Removes the specified group, @group_name, -from the key file. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - return location for a #GError or %NULL - - - - - - - - -Return value: A random number. - - - - - a #GRand. - - - - A random number. - - - - - -Determines if a character is typically rendered in a double-width -cell under legacy East Asian locales. If a character is wide according to -g_unichar_iswide(), then it is also reported wide with this function, but -the converse is not necessarily true. See the -&lt;ulink url="http://www.unicode.org/reports/tr11/"&gt;Unicode Standard -Annex #11&lt;/ulink&gt; for details. - - - - - - a Unicode character - - - - %TRUE if the character is wide in legacy East Asian locales - -Since: 2.12 - - - - - -Sets the function which is used to translate the contexts -user-visible strings, for &lt;option&gt;--help&lt;/option&gt; output. -If @func is %NULL, strings are not translated. - -Note that option groups have their own translation functions, -this function only affects the @parameter_string (see g_option_context_new()), -the summary (see g_option_context_set_summary()) and the description -(see g_option_context_set_description()). - -If you are using gettext(), you only need to set the translation -domain, see g_context_group_set_translation_domain(). - -Since: 2.12 - - - - - a #GOptionContext - - - - the #GTranslateFunc, or %NULL - - - - user data to pass to @func, or %NULL - - - - a function which gets called to free @data, or %NULL - - - - - - - - -This function returns a #GIOCondition depending on whether there -is data to be read/space to write data in the -internal buffers in the #GIOChannel. Only the flags %G_IO_IN and -%G_IO_OUT may be set. - - - - - - A #GIOChannel - - - - A #GIOCondition - - - - - -Calls the given function for each of the key/value pairs in the -#GHashTable. The function is passed the key and value of each -pair, and the given @user_data parameter. The hash table may not -be modified while iterating over it (you can't add/remove -items). To remove all items matching a predicate, use -g_hash_table_foreach_remove(). - -See g_hash_table_find() for performance caveats for linear -order searches in contrast to g_hash_table_lookup(). - - - - - a #GHashTable. - - - - the function to call for each key/value pair. - - - - user data to pass to the function. - - - - - - - - -Return value: a newly allocated %NULL-terminated string array - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - a locale - - - - return location for the number of returned strings or %NULL - - - - return location for a #GError or %NULL - - - - a newly allocated %NULL-terminated string array -or %NULL if the key isn't found. The string array should be freed -with g_strfreev(). - -Since: 2.6 - - - - - -Sorts @queue using @func. - -This function is called while holding the @queue's lock. - -Since: 2.10 - - - - - a #GAsyncQueue - - - - the #GCompareDataFunc is used to sort @queue. This -function is passed two elements of the @queue. The function -should return 0 if they are equal, a negative value if the -first element should be higher in the @queue or a positive -value if the first element should be lower in the @queue than -the second element. - - - - user data passed to @func - - - - - - - - -Reads a line, including the terminating character(s), -from a #GIOChannel into a newly-allocated string. -@str_return will contain allocated memory if the return -is %G_IO_STATUS_NORMAL. - - - - - - a #GIOChannel - - - - The line read from the #GIOChannel, including the -line terminator. This data should be freed with g_free() -when no longer needed. This is a nul-terminated string. -If a @length of zero is returned, this will be %NULL instead. - - - - location to store length of the read data, or %NULL - - - - location to store position of line terminator, or %NULL - - - - A location to return an error of type #GConvertError -or #GIOChannelError - - - - the status of the operation. - - - - - -Return value: a #GSequenceIter which is @delta positions away from @iter. - - - - - a #GSequenceIter - - - - A positive or negative number indicating how many positions away -from @iter the returned #GSequenceIter will be. - - - - a #GSequenceIter which is @delta positions away from @iter. - -Since: 2.14 - - - - - -Associates a string value for @key and @locale under -@group_name. If the translation for @key cannot be found -then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - a locale - - - - a string - - - - - - - - -Converts a Unicode character into UTF-8, and insert it -into the string at the given position. - - - - - - a #GString - - - - the position at which to insert character, or -1 to -append at the end of the string - - - - a Unicode character - - - - @string - - - - - -Frees a #GBookmarkFile. - -Since: 2.12 - - - - - a #GBookmarkFile - - - - - - - - -Scans for a match in string for the pattern in @regex. -The @match_options are combined with the match options specified -when the @regex structure was created, letting you have more -flexibility in reusing #GRegex structures. - -Setting @start_position differs from just passing over a shortened -string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b". - -A #GMatchInfo structure, used to get information on the match, is -stored in @match_info if not %NULL. Note that if @match_info is -not %NULL then it is created even if the function returns %FALSE, -i.e. you must free it regardless if regular expression actually -matched. - -@string is not copied and is used in #GMatchInfo internally. If -you use any #GMatchInfo method (except g_match_info_free()) after -freeing or modifying @string then the behaviour is undefined. - -To retrieve all the non-overlapping matches of the pattern in -string you can use g_match_info_next(). - -&lt;informalexample&gt;&lt;programlisting&gt; -static void -print_uppercase_words (const gchar *string) -{ -/&ast; Print all uppercase-only words. &ast;/ -GRegex *regex; -GMatchInfo *match_info; -GError *error = NULL; -&nbsp; -regex = g_regex_new ("[A-Z]+", 0, 0, NULL); -g_regex_match_full (regex, string, -1, 0, 0, &amp;match_info, &amp;error); -while (g_match_info_matches (match_info)) -{ -gchar *word = g_match_info_fetch (match_info, 0); -g_print ("Found: %s\n", word); -g_free (word); -g_match_info_next (match_info, &amp;error); -} -g_match_info_free (match_info); -g_regex_unref (regex); -if (error != NULL) -{ -g_printerr ("Error while matching: %s\n", error-&gt;message); -g_error_free (error); -} -} -&lt;/programlisting&gt;&lt;/informalexample&gt; - - - - - - a #GRegex structure from g_regex_new() - - - - the string to scan for matches - - - - the length of @string, or -1 if @string is nul-terminated - - - - starting index of the string to match - - - - match options - - - - pointer to location where to store the #GMatchInfo, -or %NULL if you do not need it - - - - location to store the error occuring, or %NULL to ignore errors - - - - %TRUE is the string matched, %FALSE otherwise - -Since: 2.14 - - - - - -Obtains the character set for the &lt;link linkend="setlocale"&gt;current -locale&lt;/link&gt;; you might use this character set as an argument to -g_convert(), to convert from the current locale's encoding to some -other encoding. (Frequently g_locale_to_utf8() and g_locale_from_utf8() -are nice shortcuts, though.) - -The return value is %TRUE if the locale's encoding is UTF-8, in that -case you can perhaps avoid calling g_convert(). - -The string returned in @charset is not allocated, and should not be -freed. - - - - - - return location for character set name - - - - %TRUE if the returned charset is UTF-8 - - - - - -Associates a list of string values for @key under @group_name. -If @key cannot be found then it is created. If @group_name -cannot be found then it is created. - -Since: 2.6 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an array of locale string values - - - - number of locale string values in @list - - - - - - - - -Escapes text so that the markup parser will parse it verbatim. -Less than, greater than, ampersand, etc. are replaced with the -corresponding entities. This function would typically be used -when writing out a file to be parsed with the markup parser. - -Note that this function doesn't protect whitespace and line endings -from being processed according to the XML rules for normalization -of line endings and attribute values. - - - - - - some valid UTF-8 text - - - - length of @text in bytes, or -1 if the text is nul-terminated - - - - a newly allocated string with the escaped text - - - - - -Parses the command line arguments, recognizing options -which have been added to @context. A side-effect of -calling this function is that g_set_prgname() will be -called. - -If the parsing is successful, any parsed arguments are -removed from the array and @argc and @argv are updated -accordingly. A '--' option is stripped from @argv -unless there are unparsed options before and after it, -or some of the options after it start with '-'. In case -of an error, @argc and @argv are left unmodified. - -If automatic &lt;option&gt;--help&lt;/option&gt; support is enabled -(see g_option_context_set_help_enabled()), and the -@argv array contains one of the recognized help options, -this function will produce help output to stdout and -call &lt;literal&gt;exit (0)&lt;/literal&gt;. - -Note that function depends on the -&lt;link linkend="setlocale"&gt;current locale&lt;/link&gt; for -automatic character set conversion of string and filename -arguments. - - - - - - a #GOptionContext - - - - a pointer to the number of command line arguments - - - - a pointer to the array of command line arguments - - - - a return location for errors - - - - %TRUE if the parsing was successful, -%FALSE if an error occurred - -Since: 2.6 - - - - - -Returns: a canonical representation for the string - - - - - a static string - - - - a canonical representation for the string - -Since: 2.10 - - - - - -Splits a string into a maximum of @max_tokens pieces, using the given -@delimiter. If @max_tokens is reached, the remainder of @string is appended -to the last token. - -As a special case, the result of splitting the empty string "" is an empty -vector, not a vector containing a single string. The reason for this -special case is that being able to represent a empty vector is typically -more useful than consistent handling of empty elements. If you do need -to represent empty elements, you'll need to check for the empty string -before calling g_strsplit(). - - - - - - a string to split. - - - - a string which specifies the places at which to split the string. -The delimiter is not included in any of the resulting strings, unless -@max_tokens is reached. - - - - the maximum number of pieces to split @string into. If this is -less than 1, the string is split completely. - - - - a newly-allocated %NULL-terminated array of strings. Use -g_strfreev() to free it. - - - - - -Returns: %TRUE if the queue is empty. - - - - - a #GQueue. - - - - %TRUE if the queue is empty. - - - - - -Creates a new #GHashTable like g_hash_table_new() with a reference count -of 1 and allows to specify functions to free the memory allocated for the -key and value that get called when removing the entry from the #GHashTable. - - - - - - a function to create a hash value from a key. - - - - a function to check two keys for equality. - - - - a function to free the memory allocated for the key -used when removing the entry from the #GHashTable or %NULL if you -don't want to supply such a function. - - - - a function to free the memory allocated for the -value used when removing the entry from the #GHashTable or %NULL if -you don't want to supply such a function. - - - - a new #GHashTable. - - - - - -A wrapper for the POSIX remove() function. The remove() function -deletes a name from the filesystem. - -See your C library manual for more details about how remove() works -on your system. On Unix, remove() removes also directories, as it -calls unlink() for files and rmdir() for directories. On Windows, -although remove() in the C library only works for files, this -function tries first remove() and then if that fails rmdir(), and -thus works for both files and directories. Note however, that on -Windows, it is in general not possible to remove a file that is -open to some process, or mapped into memory. - -If this function fails on Windows you can't infer too much from the -errno value. rmdir() is tried regardless of what caused remove() to -fail. Any errno value set by remove() will be overwritten by that -set by rmdir(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - 0 if the file was successfully removed, -1 if an error -occurred - -Since: 2.6 - - - - - -Retrieves the number of the subexpression named @name. - - - - - - #GRegex structure - - - - name of the subexpression - - - - The number of the subexpression or -1 if @name -does not exists - -Since: 2.14 - - - - - -Passes the results of polling back to the main loop. - - - - - - a #GMainContext - - - - the maximum numerical priority of sources to check - - - - array of #GPollFD's that was passed to the last call to -g_main_context_query() - - - - return value of g_main_context_query() - - - - %TRUE if some sources are ready to be dispatched. - - - - - -A simple version of g_spawn_sync() with little-used parameters -removed, taking a command line instead of an argument vector. See -g_spawn_sync() for full details. @command_line will be parsed by -g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag -is enabled. Note that %G_SPAWN_SEARCH_PATH can have security -implications, so consider using g_spawn_sync() directly if -appropriate. Possible errors are those from g_spawn_sync() and those -from g_shell_parse_argv(). - -If @exit_status is non-%NULL, the exit status of the child is stored there as -it would be returned by waitpid(); standard UNIX macros such as WIFEXITED() -and WEXITSTATUS() must be used to evaluate the exit status. - -On Windows, please note the implications of g_shell_parse_argv() -parsing @command_line. Parsing is done according to Unix shell rules, not -Windows command interpreter rules. -Space is a separator, and backslashes are -special. Thus you cannot simply pass a @command_line containing -canonical Windows paths, like "c:\\program files\\app\\app.exe", as -the backslashes will be eaten, and the space will act as a -separator. You need to enclose such paths with single quotes, like -"'c:\\program files\\app\\app.exe' 'e:\\folder\\argument.txt'". - - - - - - a command line - - - - return location for child output - - - - return location for child errors - - - - return location for child exit status, as returned by waitpid() - - - - return location for errors - - - - %TRUE on success, %FALSE if an error was set - - - - - -Sorts @seq using @cmp_func. - -Since: 2.14 - - - - - a #GSequence - - - - the #GCompareDataFunc used to sort @seq. This function is -passed two items of @seq and should return 0 if they are equal, -a negative value fi the first comes before the second, and a -positive value if the second comes before the first. - - - - user data passed to @cmp_func - - - - - - - - -Adds a string to be displayed in &lt;option&gt;--help&lt;/option&gt; output -before the list of options. This is typically a summary of the -program functionality. - -Note that the summary is translated (see -g_option_context_set_translate_func(), g_option_context_set_translation_domain()). - -Since: 2.12 - - - - - a #GOptionContext - - - - a string to be shown in &lt;option&gt;--help&lt;/option&gt; output -before the list of options, or %NULL - - - - - - - - -Behaves exactly like g_build_filename(), but takes the path elements -as a string array, instead of varargs. This function is mainly -meant for language bindings. - - - - - - %NULL-terminated array of strings containing the path elements. - - - - a newly-allocated string that must be freed with g_free(). - -Since: 2.8 - - - - - -Replacement for g_io_channel_write() with the new API. - -On seekable channels with encodings other than %NULL or UTF-8, generic -mixing of reading and writing is not allowed. A call to g_io_channel_write_chars () -may only be made on a channel from which data has been read in the -cases described in the documentation for g_io_channel_set_encoding (). - - - - - - a #GIOChannel - - - - a buffer to write data from - - - - the size of the buffer. If -1, the buffer -is taken to be a nul-terminated string. - - - - The number of bytes written. This can be nonzero -even if the return value is not %G_IO_STATUS_NORMAL. -If the return value is %G_IO_STATUS_NORMAL and the -channel is blocking, this will always be equal -to @count if @count &gt;= 0. - - - - A location to return an error of type #GConvertError -or #GIOChannelError - - - - the status of the operation. - - - - - -Gets the current flags for a #GIOChannel, including read-only -flags such as %G_IO_FLAG_IS_READABLE. - -The values of the flags %G_IO_FLAG_IS_READABLE and %G_IO_FLAG_IS_WRITEABLE -are cached for internal use by the channel when it is created. -If they should change at some later point (e.g. partial shutdown -of a socket with the UNIX shutdown() function), the user -should immediately call g_io_channel_get_flags () to update -the internal values of these flags. - - - - - - a #GIOChannel - - - - the flags which are set on the channel - - - - - -Converts a string from UTF-8 to the encoding used for strings by -the C runtime (usually the same as that used by the operating -system) in the &lt;link linkend="setlocale"&gt;current locale&lt;/link&gt;. - - - - - - a UTF-8 encoded string - - - - the length of the string, or -1 if the string is -nul-terminated&lt;footnoteref linkend="nul-unsafe"/&gt;. - - - - location to store the number of bytes in the -input string that were successfully converted, or %NULL. -Even if the conversion was successful, this may be -less than @len if there were partial characters -at the end of the input. If the error -#G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence. - - - - the number of bytes stored in the output buffer (not -including the terminating nul). - - - - location to store the error occuring, or %NULL to ignore -errors. Any of the errors in #GConvertError may occur. - - - - The converted string, or %NULL on an error. - - - - - -Sets the character which is used to separate -values in lists. Typically ';' or ',' are used -as separators. The default list separator is ';'. - -Since: 2.6 - - - - - a #GKeyFile - - - - the separator - - - - - - - - -Creates a new #GTree. - - - - - - the function used to order the nodes in the #GTree. -It should return values similar to the standard strcmp() function - -0 if the two arguments are equal, a negative value if the first argument -comes before the second, or a positive value if the first argument comes -after the second. - - - - a new #GTree. - - - - - -Sets a function to be called at regular intervals, with the default -priority, #G_PRIORITY_DEFAULT. The function is called repeatedly -until it returns %FALSE, at which point the timeout is automatically -destroyed and the function will not be called again. The first call -to the function will be at the end of the first @interval. - -Note that timeout functions may be delayed, due to the processing of other -event sources. Thus they should not be relied on for precise timing. -After each call to the timeout function, the time of the next -timeout is recalculated based on the current time and the given interval -(it does not try to 'catch up' time lost in delays). - -If you want to have a timer in the "seconds" range and do not care -about the exact time of the first call of the timer, use the -g_timeout_add_seconds() function; this function allows for more -optimizations and more efficient system power usage. - - - - - - the time between calls to the function, in milliseconds -(1/1000ths of a second) - - - - function to call - - - - data to pass to @function - - - - the ID (greater than 0) of the event source. - - - - - -Returns: the length of the contents of @file. - - - - - a #GMappedFile - - - - the length of the contents of @file. - -Since: 2.8 - - - - - -Loads a key file into an empty #GKeyFile structure. -If the file could not be loaded then %error is set to -either a #GFileError or #GKeyFileError. - - - - - - an empty #GKeyFile struct - - - - the path of a filename to load, in the GLib file name encoding - - - - flags from #GKeyFileFlags - - - - return location for a #GError, or %NULL - - - - %TRUE if a key file could be loaded, %FALSE othewise -Since: 2.6 - - - - - -A statically-allocated #GQueue must be initialized with this function -before it can be used. Alternatively you can initialize it with -#G_QUEUE_INIT. It is not necessary to initialize queues created with -g_queue_new(). - -Since: 2.14 - - - - - an uninitialized #GQueue - - - - - - - - -Removes @link_ from @queue and frees it. - -@link_ must be part of @queue. - -Since: 2.4 - - - - - a #GQueue - - - - a #GList link that &lt;emphasis&gt;must&lt;/emphasis&gt; be part of @queue - - - - - - - - -Reverses the order of the items in @queue. - -Since: 2.4 - - - - - a #GQueue - - - - - - - - -Return value: the length of the @queue. - - - - - a #GAsyncQueue. - - - - the length of the @queue. - - - - - -Converts a string to a #gint64 value. -This function behaves like the standard strtoll() function -does in the C locale. It does this without actually -changing the current locale, since that would not be -thread-safe. - -This function is typically used when reading configuration -files or other non-user input that should be locale independent. -To handle input from the user you should normally use the -locale-sensitive system strtoll() function. - -If the correct value would cause overflow, %G_MAXINT64 or %G_MININT64 -is returned, and %ERANGE is stored in %errno. If the base is -outside the valid range, zero is returned, and %EINVAL is stored -in %errno. If the string conversion fails, zero is returned, and -@endptr returns @nptr (if @endptr is non-%NULL). - - - - - - the string to convert to a numeric value. - - - - if non-%NULL, it returns the character after -the last character used in the conversion. - - - - to be used for the conversion, 2..36 or 0 - - - - the #gint64 value or zero on error. - -Since: 2.12 - - - - - -Escapes the special characters used for regular expressions -in @string, for instance "a.b*c" becomes "a\.b\*c". This -function is useful to dynamically generate regular expressions. - -@string can contain nul characters that are replaced with "\0", -in this case remember to specify the correct length of @string -in @length. - - - - - - the string to escape - - - - the length of @string, or -1 if @string is nul-terminated - - - - a newly-allocated escaped string - -Since: 2.14 - - - - - -This function cannot be called on a channel with %NULL encoding. - - - - - - a #GIOChannel - - - - a location to return a character - - - - A location to return an error of type #GConvertError -or #GIOChannelError - - - - a #GIOStatus - - - - - -A wrapper for the POSIX mkdir() function. The mkdir() function -attempts to create a directory with the given name and permissions. -The mode argument is ignored on Windows. - -See the C library manual for more details about mkdir(). - - - - - - a pathname in the GLib file name encoding (UTF-8 on Windows) - - - - permissions to use for the newly created directory - - - - 0 if the directory was successfully created, -1 if an error -occurred - -Since: 2.6 - - - - - -Returns: the summary - - - - - a #GOptionContext - - - - the summary - -Since: 2.12 - - - - - -Converts @time_ into a ISO 8601 encoded string, relative to the -Coordinated Universal Time (UTC). - - - - - - a #GTimeVal - - - - a newly allocated string containing a ISO 8601 date - -Since: 2.12 - - - - - -Return value: the path to the specified special directory, or %NULL - - - - - the logical id of special directory - - - - the path to the specified special directory, or %NULL -if the logical id was not found. The returned string is owned by -GLib and should not be modified or freed. - -Since: 2.14 - - - - - -Sets the source functions (can be used to override -default implementations) of an unattached source. - -Since: 2.12 - - - - - a #GSource - - - - the new #GSourceFuncs - - - - - - - - -Using the standard algorithm for regular expression matching only -the longest match in the string is retrieved. This function uses -a different algorithm so it can retrieve all the possible matches. -For more documentation see g_regex_match_all_full(). - -A #GMatchInfo structure, used to get information on the match, is -stored in @match_info if not %NULL. Note that if @match_info is -not %NULL then it is created even if the function returns %FALSE, -i.e. you must free it regardless if regular expression actually -matched. - - - - - - a #GRegex structure from g_regex_new() - - - - the string to scan for matches - - - - match options - - - - pointer to location where to store the #GMatchInfo, -or %NULL if you do not need it - - - - %TRUE is the string matched, %FALSE otherwise - -Since: 2.14 - - - - - -Converts a gpointer to a hash value. -It can be passed to g_hash_table_new() as the @hash_func parameter, -when using pointers as keys in a #GHashTable. - - - - - - a #gpointer key - - - - a hash value corresponding to the key. - - - - - -Determines whether a character is alphabetic (i.e. a letter). -Given some UTF-8 text, obtain a character value with -g_utf8_get_char(). - - - - - - a Unicode character - - - - %TRUE if @c is an alphabetic character - - - - - -Unlinks @link_ so that it will no longer be part of @queue. The link is -not freed. - -@link_ must be part of @queue, - -Since: 2.4 - - - - - a #GQueue - - - - a #GList link that &lt;emphasis&gt;must&lt;/emphasis&gt; be part of @queue - - - - - - - - -Gets the time the bookmark for @uri was last visited. - -In the event the URI cannot be found, -1 is returned and -@error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. - - - - - - a #GBookmarkFile - - - - a valid URI - - - - return location for a #GError, or %NULL - - - - a timestamp. - -Since: 2.12 - - - - - -The buffering state can only be set if the channel's encoding -is %NULL. For any other encoding, the channel must be buffered. - -A buffered channel can only be set unbuffered if the channel's -internal buffers have been flushed. Newly created channels or -channels which have returned %G_IO_STATUS_EOF -not require such a flush. For write-only channels, a call to -g_io_channel_flush () is sufficient. For all other channels, -the buffers may be flushed by a call to g_io_channel_seek_position (). -This includes the possibility of seeking with seek type %G_SEEK_CUR -and an offset of zero. Note that this means that socket-based -channels cannot be set unbuffered once they have had data -read from them. - -On unbuffered channels, it is safe to mix read and write -calls from the new and old APIs, if this is necessary for -maintaining old code. - -The default state of the channel is buffered. - - - - - a #GIOChannel - - - - whether to set the channel buffered or unbuffered - - - - - - - - -Creates a new empty #GKeyFile object. Use -g_key_file_load_from_file(), g_key_file_load_from_data(), -g_key_file_load_from_dirs() or g_key_file_load_from_data_dirs() to -read an existing key file. - - - - - - an empty #GKeyFile. - -Since: 2.6 - - - - diff --git a/libs/glibmm2/glib/src/glib_docs_override.xml b/libs/glibmm2/glib/src/glib_docs_override.xml deleted file mode 100644 index 3ad6b3a584..0000000000 --- a/libs/glibmm2/glib/src/glib_docs_override.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - Adds a string to be displayed in --help output before the list of options. This - is typically a summary of the program functionality. - - Note that the summary is translated (see set_translate_func(), - set_translation_domain()). - - Since: 2.14 - - - - - a string to be shown in --help output before the list of - options - - - - - - - - - Returns: the summary - See set_summary() for more information - - - - - the summary - - Since: 2.14 - - - - - - Adds a string to be displayed in --help output after the list of - options. This text often includes a bug reporting address. - - Note that the summary is translated (see set_translate_func()). - - Since: 2.14 - - - - - a string to be shown in --help output - after the list of options - - - - - - - - - Returns: the description - See set_description() for more information - - - - - the description - - Since: 2.14 - - - - - - A convenience function to use gettext() for translating - user-visible strings. - - Since: 2.14 - - - - - the domain to use - - - - - - - - - -Return value: the value associated with the key as a double, or - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - return location for a #GError - - - - the value associated with the key as a double, or -0.0 if the key was not found or could not be parsed. - -Since: 2.14 - - - - - - -Associates a new double value with @key under @group_name. -If @key cannot be found then it is created. - -Since: 2.14 - - - - - a #GKeyFile - - - - a group name - - - - a key - - - - an double value - - - - - - - - - diff --git a/libs/glibmm2/glib/src/glib_enums.defs b/libs/glibmm2/glib/src/glib_enums.defs deleted file mode 100644 index 46b366fb1c..0000000000 --- a/libs/glibmm2/glib/src/glib_enums.defs +++ /dev/null @@ -1,720 +0,0 @@ -;; From /opt/gnome218/include/glib-2.0/glib/gbookmarkfile.h - -(define-enum-extended BookmarkFileError - (in-module "G") - (c-name "GBookmarkFileError") - (values - '("invalid-uri" "G_BOOKMARK_FILE_ERROR_INVALID_URI" "0") - '("invalid-value" "G_BOOKMARK_FILE_ERROR_INVALID_VALUE" "1") - '("app-not-registered" "G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED" "2") - '("uri-not-found" "G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND" "3") - '("read" "G_BOOKMARK_FILE_ERROR_READ" "4") - '("unknown-encoding" "G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING" "5") - '("write" "G_BOOKMARK_FILE_ERROR_WRITE" "6") - '("file-not-found" "G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND" "7") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gconvert.h - -(define-enum-extended ConvertError - (in-module "G") - (c-name "GConvertError") - (values - '("no-conversion" "G_CONVERT_ERROR_NO_CONVERSION" "0") - '("illegal-sequence" "G_CONVERT_ERROR_ILLEGAL_SEQUENCE" "1") - '("failed" "G_CONVERT_ERROR_FAILED" "2") - '("partial-input" "G_CONVERT_ERROR_PARTIAL_INPUT" "3") - '("bad-uri" "G_CONVERT_ERROR_BAD_URI" "4") - '("not-absolute-path" "G_CONVERT_ERROR_NOT_ABSOLUTE_PATH" "5") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gdate.h - -(define-enum-extended DateDMY - (in-module "G") - (c-name "GDateDMY") - (values - '("day" "G_DATE_DAY" "0") - '("month" "G_DATE_MONTH" "1") - '("year" "G_DATE_YEAR" "2") - ) -) - -(define-enum-extended DateWeekday - (in-module "G") - (c-name "GDateWeekday") - (values - '("bad-weekday" "G_DATE_BAD_WEEKDAY" "0") - '("monday" "G_DATE_MONDAY" "1") - '("tuesday" "G_DATE_TUESDAY" "2") - '("wednesday" "G_DATE_WEDNESDAY" "3") - '("thursday" "G_DATE_THURSDAY" "4") - '("friday" "G_DATE_FRIDAY" "5") - '("saturday" "G_DATE_SATURDAY" "6") - '("sunday" "G_DATE_SUNDAY" "7") - ) -) - -(define-enum-extended DateMonth - (in-module "G") - (c-name "GDateMonth") - (values - '("bad-month" "G_DATE_BAD_MONTH" "0") - '("january" "G_DATE_JANUARY" "1") - '("february" "G_DATE_FEBRUARY" "2") - '("march" "G_DATE_MARCH" "3") - '("april" "G_DATE_APRIL" "4") - '("may" "G_DATE_MAY" "5") - '("june" "G_DATE_JUNE" "6") - '("july" "G_DATE_JULY" "7") - '("august" "G_DATE_AUGUST" "8") - '("september" "G_DATE_SEPTEMBER" "9") - '("october" "G_DATE_OCTOBER" "10") - '("november" "G_DATE_NOVEMBER" "11") - '("december" "G_DATE_DECEMBER" "12") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gfileutils.h - -(define-enum-extended FileError - (in-module "G") - (c-name "GFileError") - (values - '("exist" "G_FILE_ERROR_EXIST" "0") - '("isdir" "G_FILE_ERROR_ISDIR" "1") - '("acces" "G_FILE_ERROR_ACCES" "2") - '("nametoolong" "G_FILE_ERROR_NAMETOOLONG" "3") - '("noent" "G_FILE_ERROR_NOENT" "4") - '("notdir" "G_FILE_ERROR_NOTDIR" "5") - '("nxio" "G_FILE_ERROR_NXIO" "6") - '("nodev" "G_FILE_ERROR_NODEV" "7") - '("rofs" "G_FILE_ERROR_ROFS" "8") - '("txtbsy" "G_FILE_ERROR_TXTBSY" "9") - '("fault" "G_FILE_ERROR_FAULT" "10") - '("loop" "G_FILE_ERROR_LOOP" "11") - '("nospc" "G_FILE_ERROR_NOSPC" "12") - '("nomem" "G_FILE_ERROR_NOMEM" "13") - '("mfile" "G_FILE_ERROR_MFILE" "14") - '("nfile" "G_FILE_ERROR_NFILE" "15") - '("badf" "G_FILE_ERROR_BADF" "16") - '("inval" "G_FILE_ERROR_INVAL" "17") - '("pipe" "G_FILE_ERROR_PIPE" "18") - '("again" "G_FILE_ERROR_AGAIN" "19") - '("intr" "G_FILE_ERROR_INTR" "20") - '("io" "G_FILE_ERROR_IO" "21") - '("perm" "G_FILE_ERROR_PERM" "22") - '("nosys" "G_FILE_ERROR_NOSYS" "23") - '("failed" "G_FILE_ERROR_FAILED" "24") - ) -) - -(define-flags-extended FileTest - (in-module "G") - (c-name "GFileTest") - (values - '("is-regular" "G_FILE_TEST_IS_REGULAR" "1 << 0") - '("is-symlink" "G_FILE_TEST_IS_SYMLINK" "1 << 1") - '("is-dir" "G_FILE_TEST_IS_DIR" "1 << 2") - '("is-executable" "G_FILE_TEST_IS_EXECUTABLE" "1 << 3") - '("exists" "G_FILE_TEST_EXISTS" "1 << 4") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/ghook.h - -(define-flags-extended HookFlagMask - (in-module "G") - (c-name "GHookFlagMask") - (values - '("active" "G_HOOK_FLAG_ACTIVE" "1 << 0") - '("in-call" "G_HOOK_FLAG_IN_CALL" "1 << 1") - '("mask" "G_HOOK_FLAG_MASK" "0x0f") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/giochannel.h - -(define-enum-extended IOError - (in-module "G") - (c-name "GIOError") - (values - '("none" "G_IO_ERROR_NONE" "0") - '("again" "G_IO_ERROR_AGAIN" "1") - '("inval" "G_IO_ERROR_INVAL" "2") - '("unknown" "G_IO_ERROR_UNKNOWN" "3") - ) -) - -(define-enum-extended IOChannelError - (in-module "G") - (c-name "GIOChannelError") - (values - '("fbig" "G_IO_CHANNEL_ERROR_FBIG" "0") - '("inval" "G_IO_CHANNEL_ERROR_INVAL" "1") - '("io" "G_IO_CHANNEL_ERROR_IO" "2") - '("isdir" "G_IO_CHANNEL_ERROR_ISDIR" "3") - '("nospc" "G_IO_CHANNEL_ERROR_NOSPC" "4") - '("nxio" "G_IO_CHANNEL_ERROR_NXIO" "5") - '("overflow" "G_IO_CHANNEL_ERROR_OVERFLOW" "6") - '("pipe" "G_IO_CHANNEL_ERROR_PIPE" "7") - '("failed" "G_IO_CHANNEL_ERROR_FAILED" "8") - ) -) - -(define-enum-extended IOStatus - (in-module "G") - (c-name "GIOStatus") - (values - '("error" "G_IO_STATUS_ERROR" "0") - '("normal" "G_IO_STATUS_NORMAL" "1") - '("eof" "G_IO_STATUS_EOF" "2") - '("again" "G_IO_STATUS_AGAIN" "3") - ) -) - -(define-enum-extended SeekType - (in-module "G") - (c-name "GSeekType") - (values - '("cur" "G_SEEK_CUR" "0") - '("set" "G_SEEK_SET" "1") - '("end" "G_SEEK_END" "2") - ) -) - -(define-enum-extended IOCondition - (in-module "G") - (c-name "GIOCondition") - (values - ) -) - -(define-flags-extended IOFlags - (in-module "G") - (c-name "GIOFlags") - (values - '("append" "G_IO_FLAG_APPEND" "1 << 0") - '("nonblock" "G_IO_FLAG_NONBLOCK" "1 << 1") - '("is-readable" "G_IO_FLAG_IS_READABLE" "1 << 2") - '("is-writeable" "G_IO_FLAG_IS_WRITEABLE" "1 << 3") - '("is-seekable" "G_IO_FLAG_IS_SEEKABLE" "1 << 4") - '("get-mask" "G_IO_FLAG_GET_MASK" "0x0") - '("set-mask" "G_IO_FLAG_SET_MASK" "0x1") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gkeyfile.h - -(define-enum-extended KeyFileError - (in-module "G") - (c-name "GKeyFileError") - (values - '("unknown-encoding" "G_KEY_FILE_ERROR_UNKNOWN_ENCODING" "0") - '("parse" "G_KEY_FILE_ERROR_PARSE" "1") - '("not-found" "G_KEY_FILE_ERROR_NOT_FOUND" "2") - '("key-not-found" "G_KEY_FILE_ERROR_KEY_NOT_FOUND" "3") - '("group-not-found" "G_KEY_FILE_ERROR_GROUP_NOT_FOUND" "4") - '("invalid-value" "G_KEY_FILE_ERROR_INVALID_VALUE" "5") - ) -) - -(define-flags-extended KeyFileFlags - (in-module "G") - (c-name "GKeyFileFlags") - (values - '("none" "G_KEY_FILE_NONE" "0") - '("keep-comments" "G_KEY_FILE_KEEP_COMMENTS" "1 << 0") - '("keep-translations" "G_KEY_FILE_KEEP_TRANSLATIONS" "1 << 1") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gmarkup.h - -(define-enum-extended MarkupError - (in-module "G") - (c-name "GMarkupError") - (values - '("bad-utf8" "G_MARKUP_ERROR_BAD_UTF8" "0") - '("empty" "G_MARKUP_ERROR_EMPTY" "1") - '("parse" "G_MARKUP_ERROR_PARSE" "2") - '("unknown-element" "G_MARKUP_ERROR_UNKNOWN_ELEMENT" "3") - '("unknown-attribute" "G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE" "4") - '("invalid-content" "G_MARKUP_ERROR_INVALID_CONTENT" "5") - ) -) - -(define-flags-extended MarkupParseFlags - (in-module "G") - (c-name "GMarkupParseFlags") - (values - '("do-not-use-this-unsupported-flag" "G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG" "1 << 0") - '("treat-cdata-as-text" "G_MARKUP_TREAT_CDATA_AS_TEXT" "1 << 1") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gmessages.h - -(define-flags-extended LogLevelFlags - (in-module "G") - (c-name "GLogLevelFlags") - (values - '("flag-recursion" "G_LOG_FLAG_RECURSION" "1 << 0") - '("flag-fatal" "G_LOG_FLAG_FATAL" "1 << 1") - '("level-error" "G_LOG_LEVEL_ERROR" "1 << 2") - '("level-critical" "G_LOG_LEVEL_CRITICAL" "1 << 3") - '("level-warning" "G_LOG_LEVEL_WARNING" "1 << 4") - '("level-message" "G_LOG_LEVEL_MESSAGE" "1 << 5") - '("level-info" "G_LOG_LEVEL_INFO" "1 << 6") - '("level-debug" "G_LOG_LEVEL_DEBUG" "1 << 7") - '("level-mask" "G_LOG_LEVEL_MASK" "0xFFFFFFFE") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gnode.h - -(define-flags-extended TraverseFlags - (in-module "G") - (c-name "GTraverseFlags") - (values - '("leaves" "G_TRAVERSE_LEAVES" "1 << 0") - '("non-leaves" "G_TRAVERSE_NON_LEAVES" "1 << 1") - '("all" "G_TRAVERSE_ALL" "0x1") - '("mask" "G_TRAVERSE_MASK" "0x03") - '("leafs" "G_TRAVERSE_LEAFS" "0x1") - '("non-leafs" "G_TRAVERSE_NON_LEAFS" "0x2") - ) -) - -(define-enum-extended TraverseType - (in-module "G") - (c-name "GTraverseType") - (values - '("in-order" "G_IN_ORDER" "0") - '("pre-order" "G_PRE_ORDER" "1") - '("post-order" "G_POST_ORDER" "2") - '("level-order" "G_LEVEL_ORDER" "3") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/goption.h - -(define-flags-extended OptionFlags - (in-module "G") - (c-name "GOptionFlags") - (values - '("hidden" "G_OPTION_FLAG_HIDDEN" "1 << 0") - '("in-main" "G_OPTION_FLAG_IN_MAIN" "1 << 1") - '("reverse" "G_OPTION_FLAG_REVERSE" "1 << 2") - '("no-arg" "G_OPTION_FLAG_NO_ARG" "1 << 3") - '("filename" "G_OPTION_FLAG_FILENAME" "1 << 4") - '("optional-arg" "G_OPTION_FLAG_OPTIONAL_ARG" "1 << 5") - '("noalias" "G_OPTION_FLAG_NOALIAS" "1 << 6") - ) -) - -(define-enum-extended OptionArg - (in-module "G") - (c-name "GOptionArg") - (values - '("none" "G_OPTION_ARG_NONE" "0") - '("string" "G_OPTION_ARG_STRING" "1") - '("int" "G_OPTION_ARG_INT" "2") - '("callback" "G_OPTION_ARG_CALLBACK" "3") - '("filename" "G_OPTION_ARG_FILENAME" "4") - '("string-array" "G_OPTION_ARG_STRING_ARRAY" "5") - '("filename-array" "G_OPTION_ARG_FILENAME_ARRAY" "6") - '("double" "G_OPTION_ARG_DOUBLE" "7") - '("int64" "G_OPTION_ARG_INT64" "8") - ) -) - -(define-enum-extended OptionError - (in-module "G") - (c-name "GOptionError") - (values - '("unknown-option" "G_OPTION_ERROR_UNKNOWN_OPTION" "0") - '("bad-value" "G_OPTION_ERROR_BAD_VALUE" "1") - '("failed" "G_OPTION_ERROR_FAILED" "2") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gregex.h - -(define-enum-extended RegexError - (in-module "G") - (c-name "GRegexError") - (values - '("compile" "G_REGEX_ERROR_COMPILE" "0") - '("optimize" "G_REGEX_ERROR_OPTIMIZE" "1") - '("replace" "G_REGEX_ERROR_REPLACE" "2") - '("match" "G_REGEX_ERROR_MATCH" "3") - ) -) - -(define-flags-extended RegexCompileFlags - (in-module "G") - (c-name "GRegexCompileFlags") - (values - '("caseless" "G_REGEX_CASELESS" "1 << 0") - '("multiline" "G_REGEX_MULTILINE" "1 << 1") - '("dotall" "G_REGEX_DOTALL" "1 << 2") - '("extended" "G_REGEX_EXTENDED" "1 << 3") - '("anchored" "G_REGEX_ANCHORED" "1 << 4") - '("dollar-endonly" "G_REGEX_DOLLAR_ENDONLY" "1 << 5") - '("ungreedy" "G_REGEX_UNGREEDY" "1 << 9") - '("raw" "G_REGEX_RAW" "1 << 11") - '("no-auto-capture" "G_REGEX_NO_AUTO_CAPTURE" "1 << 12") - '("optimize" "G_REGEX_OPTIMIZE" "1 << 13") - '("dupnames" "G_REGEX_DUPNAMES" "1 << 19") - '("newline-cr" "G_REGEX_NEWLINE_CR" "1 << 20") - '("newline-lf" "G_REGEX_NEWLINE_LF" "1 << 21") - '("newline-crlf" "G_REGEX_NEWLINE_CRLF" "0x100000") - ) -) - -(define-flags-extended RegexMatchFlags - (in-module "G") - (c-name "GRegexMatchFlags") - (values - '("anchored" "G_REGEX_MATCH_ANCHORED" "1 << 4") - '("notbol" "G_REGEX_MATCH_NOTBOL" "1 << 7") - '("noteol" "G_REGEX_MATCH_NOTEOL" "1 << 8") - '("notempty" "G_REGEX_MATCH_NOTEMPTY" "1 << 10") - '("partial" "G_REGEX_MATCH_PARTIAL" "1 << 15") - '("newline-cr" "G_REGEX_MATCH_NEWLINE_CR" "1 << 20") - '("newline-lf" "G_REGEX_MATCH_NEWLINE_LF" "1 << 21") - '("newline-crlf" "G_REGEX_MATCH_NEWLINE_CRLF" "0x100000") - '("newline-any" "G_REGEX_MATCH_NEWLINE_ANY" "1 << 22") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gscanner.h - -(define-enum-extended ErrorType - (in-module "G") - (c-name "GErrorType") - (values - '("unknown" "G_ERR_UNKNOWN" "0") - '("unexp-eof" "G_ERR_UNEXP_EOF" "1") - '("unexp-eof-in-string" "G_ERR_UNEXP_EOF_IN_STRING" "2") - '("unexp-eof-in-comment" "G_ERR_UNEXP_EOF_IN_COMMENT" "3") - '("non-digit-in-const" "G_ERR_NON_DIGIT_IN_CONST" "4") - '("digit-radix" "G_ERR_DIGIT_RADIX" "5") - '("float-radix" "G_ERR_FLOAT_RADIX" "6") - '("float-malformed" "G_ERR_FLOAT_MALFORMED" "7") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gshell.h - -(define-enum-extended ShellError - (in-module "G") - (c-name "GShellError") - (values - '("bad-quoting" "G_SHELL_ERROR_BAD_QUOTING" "0") - '("empty-string" "G_SHELL_ERROR_EMPTY_STRING" "1") - '("failed" "G_SHELL_ERROR_FAILED" "2") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gslice.h - -(define-enum-extended SliceConfig - (in-module "G") - (c-name "GSliceConfig") - (values - '("always-malloc" "G_SLICE_CONFIG_ALWAYS_MALLOC" "1") - '("bypass-magazines" "G_SLICE_CONFIG_BYPASS_MAGAZINES" "2") - '("working-set-msecs" "G_SLICE_CONFIG_WORKING_SET_MSECS" "3") - '("color-increment" "G_SLICE_CONFIG_COLOR_INCREMENT" "4") - '("chunk-sizes" "G_SLICE_CONFIG_CHUNK_SIZES" "5") - '("contention-counter" "G_SLICE_CONFIG_CONTENTION_COUNTER" "6") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gspawn.h - -(define-enum-extended SpawnError - (in-module "G") - (c-name "GSpawnError") - (values - '("fork" "G_SPAWN_ERROR_FORK" "0") - '("read" "G_SPAWN_ERROR_READ" "1") - '("chdir" "G_SPAWN_ERROR_CHDIR" "2") - '("acces" "G_SPAWN_ERROR_ACCES" "3") - '("perm" "G_SPAWN_ERROR_PERM" "4") - '("2big" "G_SPAWN_ERROR_2BIG" "5") - '("noexec" "G_SPAWN_ERROR_NOEXEC" "6") - '("nametoolong" "G_SPAWN_ERROR_NAMETOOLONG" "7") - '("noent" "G_SPAWN_ERROR_NOENT" "8") - '("nomem" "G_SPAWN_ERROR_NOMEM" "9") - '("notdir" "G_SPAWN_ERROR_NOTDIR" "10") - '("loop" "G_SPAWN_ERROR_LOOP" "11") - '("txtbusy" "G_SPAWN_ERROR_TXTBUSY" "12") - '("io" "G_SPAWN_ERROR_IO" "13") - '("nfile" "G_SPAWN_ERROR_NFILE" "14") - '("mfile" "G_SPAWN_ERROR_MFILE" "15") - '("inval" "G_SPAWN_ERROR_INVAL" "16") - '("isdir" "G_SPAWN_ERROR_ISDIR" "17") - '("libbad" "G_SPAWN_ERROR_LIBBAD" "18") - ) -) - -(define-flags-extended SpawnFlags - (in-module "G") - (c-name "GSpawnFlags") - (values - '("leave-descriptors-open" "G_SPAWN_LEAVE_DESCRIPTORS_OPEN" "1 << 0") - '("do-not-reap-child" "G_SPAWN_DO_NOT_REAP_CHILD" "1 << 1") - '("search-path" "G_SPAWN_SEARCH_PATH" "1 << 2") - '("stdout-to-dev-null" "G_SPAWN_STDOUT_TO_DEV_NULL" "1 << 3") - '("stderr-to-dev-null" "G_SPAWN_STDERR_TO_DEV_NULL" "1 << 4") - '("child-inherits-stdin" "G_SPAWN_CHILD_INHERITS_STDIN" "1 << 5") - '("file-and-argv-zero" "G_SPAWN_FILE_AND_ARGV_ZERO" "1 << 6") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gstrfuncs.h - -(define-flags-extended AsciiType - (in-module "G") - (c-name "GAsciiType") - (values - '("alnum" "G_ASCII_ALNUM" "1 << 0") - '("alpha" "G_ASCII_ALPHA" "1 << 1") - '("cntrl" "G_ASCII_CNTRL" "1 << 2") - '("digit" "G_ASCII_DIGIT" "1 << 3") - '("graph" "G_ASCII_GRAPH" "1 << 4") - '("lower" "G_ASCII_LOWER" "1 << 5") - '("print" "G_ASCII_PRINT" "1 << 6") - '("punct" "G_ASCII_PUNCT" "1 << 7") - '("space" "G_ASCII_SPACE" "1 << 8") - '("upper" "G_ASCII_UPPER" "1 << 9") - '("xdigit" "G_ASCII_XDIGIT" "1 << 10") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gthread.h - -(define-enum-extended ThreadError - (in-module "G") - (c-name "GThreadError") - (values - '("n" "G_THREAD_ERROR_AGAIN" "0") - ) -) - -(define-enum-extended ThreadPriority - (in-module "G") - (c-name "GThreadPriority") - (values - '("low" "G_THREAD_PRIORITY_LOW" "0") - '("normal" "G_THREAD_PRIORITY_NORMAL" "1") - '("high" "G_THREAD_PRIORITY_HIGH" "2") - '("urgent" "G_THREAD_PRIORITY_URGENT" "3") - ) -) - -(define-enum-extended OnceStatus - (in-module "G") - (c-name "GOnceStatus") - (values - '("notcalled" "G_ONCE_STATUS_NOTCALLED" "0") - '("progress" "G_ONCE_STATUS_PROGRESS" "1") - '("ready" "G_ONCE_STATUS_READY" "2") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gunicode.h - -(define-enum-extended UnicodeType - (in-module "G") - (c-name "GUnicodeType") - (values - '("control" "G_UNICODE_CONTROL" "0") - '("format" "G_UNICODE_FORMAT" "1") - '("unassigned" "G_UNICODE_UNASSIGNED" "2") - '("private-use" "G_UNICODE_PRIVATE_USE" "3") - '("surrogate" "G_UNICODE_SURROGATE" "4") - '("lowercase-letter" "G_UNICODE_LOWERCASE_LETTER" "5") - '("modifier-letter" "G_UNICODE_MODIFIER_LETTER" "6") - '("other-letter" "G_UNICODE_OTHER_LETTER" "7") - '("titlecase-letter" "G_UNICODE_TITLECASE_LETTER" "8") - '("uppercase-letter" "G_UNICODE_UPPERCASE_LETTER" "9") - '("combining-mark" "G_UNICODE_COMBINING_MARK" "10") - '("enclosing-mark" "G_UNICODE_ENCLOSING_MARK" "11") - '("non-spacing-mark" "G_UNICODE_NON_SPACING_MARK" "12") - '("decimal-number" "G_UNICODE_DECIMAL_NUMBER" "13") - '("letter-number" "G_UNICODE_LETTER_NUMBER" "14") - '("other-number" "G_UNICODE_OTHER_NUMBER" "15") - '("connect-punctuation" "G_UNICODE_CONNECT_PUNCTUATION" "16") - '("dash-punctuation" "G_UNICODE_DASH_PUNCTUATION" "17") - '("close-punctuation" "G_UNICODE_CLOSE_PUNCTUATION" "18") - '("final-punctuation" "G_UNICODE_FINAL_PUNCTUATION" "19") - '("initial-punctuation" "G_UNICODE_INITIAL_PUNCTUATION" "20") - '("other-punctuation" "G_UNICODE_OTHER_PUNCTUATION" "21") - '("open-punctuation" "G_UNICODE_OPEN_PUNCTUATION" "22") - '("currency-symbol" "G_UNICODE_CURRENCY_SYMBOL" "23") - '("modifier-symbol" "G_UNICODE_MODIFIER_SYMBOL" "24") - '("math-symbol" "G_UNICODE_MATH_SYMBOL" "25") - '("other-symbol" "G_UNICODE_OTHER_SYMBOL" "26") - '("line-separator" "G_UNICODE_LINE_SEPARATOR" "27") - '("paragraph-separator" "G_UNICODE_PARAGRAPH_SEPARATOR" "28") - '("space-separator" "G_UNICODE_SPACE_SEPARATOR" "29") - ) -) - -(define-enum-extended UnicodeBreakType - (in-module "G") - (c-name "GUnicodeBreakType") - (values - '("mandatory" "G_UNICODE_BREAK_MANDATORY" "0") - '("carriage-return" "G_UNICODE_BREAK_CARRIAGE_RETURN" "1") - '("line-feed" "G_UNICODE_BREAK_LINE_FEED" "2") - '("combining-mark" "G_UNICODE_BREAK_COMBINING_MARK" "3") - '("surrogate" "G_UNICODE_BREAK_SURROGATE" "4") - '("zero-width-space" "G_UNICODE_BREAK_ZERO_WIDTH_SPACE" "5") - '("inseparable" "G_UNICODE_BREAK_INSEPARABLE" "6") - '("non-breaking-glue" "G_UNICODE_BREAK_NON_BREAKING_GLUE" "7") - '("contingent" "G_UNICODE_BREAK_CONTINGENT" "8") - '("space" "G_UNICODE_BREAK_SPACE" "9") - '("after" "G_UNICODE_BREAK_AFTER" "10") - '("before" "G_UNICODE_BREAK_BEFORE" "11") - '("before-and-after" "G_UNICODE_BREAK_BEFORE_AND_AFTER" "12") - '("hyphen" "G_UNICODE_BREAK_HYPHEN" "13") - '("non-starter" "G_UNICODE_BREAK_NON_STARTER" "14") - '("open-punctuation" "G_UNICODE_BREAK_OPEN_PUNCTUATION" "15") - '("close-punctuation" "G_UNICODE_BREAK_CLOSE_PUNCTUATION" "16") - '("quotation" "G_UNICODE_BREAK_QUOTATION" "17") - '("exclamation" "G_UNICODE_BREAK_EXCLAMATION" "18") - '("ideographic" "G_UNICODE_BREAK_IDEOGRAPHIC" "19") - '("numeric" "G_UNICODE_BREAK_NUMERIC" "20") - '("infix-separator" "G_UNICODE_BREAK_INFIX_SEPARATOR" "21") - '("symbol" "G_UNICODE_BREAK_SYMBOL" "22") - '("alphabetic" "G_UNICODE_BREAK_ALPHABETIC" "23") - '("prefix" "G_UNICODE_BREAK_PREFIX" "24") - '("postfix" "G_UNICODE_BREAK_POSTFIX" "25") - '("complex-context" "G_UNICODE_BREAK_COMPLEX_CONTEXT" "26") - '("ambiguous" "G_UNICODE_BREAK_AMBIGUOUS" "27") - '("unknown" "G_UNICODE_BREAK_UNKNOWN" "28") - '("next-line" "G_UNICODE_BREAK_NEXT_LINE" "29") - '("word-joiner" "G_UNICODE_BREAK_WORD_JOINER" "30") - '("hangul-l-jamo" "G_UNICODE_BREAK_HANGUL_L_JAMO" "31") - '("hangul-v-jamo" "G_UNICODE_BREAK_HANGUL_V_JAMO" "32") - '("hangul-t-jamo" "G_UNICODE_BREAK_HANGUL_T_JAMO" "33") - '("hangul-lv-syllable" "G_UNICODE_BREAK_HANGUL_LV_SYLLABLE" "34") - '("hangul-lvt-syllable" "G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE" "35") - ) -) - -(define-enum-extended UnicodeScript - (in-module "G") - (c-name "GUnicodeScript") - (values - '("invalid-code" "G_UNICODE_SCRIPT_INVALID_CODE" "-1") - '("common" "G_UNICODE_SCRIPT_COMMON" "0") - '("inherited" "G_UNICODE_SCRIPT_INHERITED" "1") - '("arabic" "G_UNICODE_SCRIPT_ARABIC" "2") - '("armenian" "G_UNICODE_SCRIPT_ARMENIAN" "3") - '("bengali" "G_UNICODE_SCRIPT_BENGALI" "4") - '("bopomofo" "G_UNICODE_SCRIPT_BOPOMOFO" "5") - '("cherokee" "G_UNICODE_SCRIPT_CHEROKEE" "6") - '("coptic" "G_UNICODE_SCRIPT_COPTIC" "7") - '("cyrillic" "G_UNICODE_SCRIPT_CYRILLIC" "8") - '("deseret" "G_UNICODE_SCRIPT_DESERET" "9") - '("devanagari" "G_UNICODE_SCRIPT_DEVANAGARI" "10") - '("ethiopic" "G_UNICODE_SCRIPT_ETHIOPIC" "11") - '("georgian" "G_UNICODE_SCRIPT_GEORGIAN" "12") - '("gothic" "G_UNICODE_SCRIPT_GOTHIC" "13") - '("greek" "G_UNICODE_SCRIPT_GREEK" "14") - '("gujarati" "G_UNICODE_SCRIPT_GUJARATI" "15") - '("gurmukhi" "G_UNICODE_SCRIPT_GURMUKHI" "16") - '("han" "G_UNICODE_SCRIPT_HAN" "17") - '("hangul" "G_UNICODE_SCRIPT_HANGUL" "18") - '("hebrew" "G_UNICODE_SCRIPT_HEBREW" "19") - '("hiragana" "G_UNICODE_SCRIPT_HIRAGANA" "20") - '("kannada" "G_UNICODE_SCRIPT_KANNADA" "21") - '("katakana" "G_UNICODE_SCRIPT_KATAKANA" "22") - '("khmer" "G_UNICODE_SCRIPT_KHMER" "23") - '("lao" "G_UNICODE_SCRIPT_LAO" "24") - '("latin" "G_UNICODE_SCRIPT_LATIN" "25") - '("malayalam" "G_UNICODE_SCRIPT_MALAYALAM" "26") - '("mongolian" "G_UNICODE_SCRIPT_MONGOLIAN" "27") - '("myanmar" "G_UNICODE_SCRIPT_MYANMAR" "28") - '("ogham" "G_UNICODE_SCRIPT_OGHAM" "29") - '("old-italic" "G_UNICODE_SCRIPT_OLD_ITALIC" "30") - '("oriya" "G_UNICODE_SCRIPT_ORIYA" "31") - '("runic" "G_UNICODE_SCRIPT_RUNIC" "32") - '("sinhala" "G_UNICODE_SCRIPT_SINHALA" "33") - '("syriac" "G_UNICODE_SCRIPT_SYRIAC" "34") - '("tamil" "G_UNICODE_SCRIPT_TAMIL" "35") - '("telugu" "G_UNICODE_SCRIPT_TELUGU" "36") - '("thaana" "G_UNICODE_SCRIPT_THAANA" "37") - '("thai" "G_UNICODE_SCRIPT_THAI" "38") - '("tibetan" "G_UNICODE_SCRIPT_TIBETAN" "39") - '("canadian-aboriginal" "G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL" "40") - '("yi" "G_UNICODE_SCRIPT_YI" "41") - '("tagalog" "G_UNICODE_SCRIPT_TAGALOG" "42") - '("hanunoo" "G_UNICODE_SCRIPT_HANUNOO" "43") - '("buhid" "G_UNICODE_SCRIPT_BUHID" "44") - '("tagbanwa" "G_UNICODE_SCRIPT_TAGBANWA" "45") - '("braille" "G_UNICODE_SCRIPT_BRAILLE" "46") - '("cypriot" "G_UNICODE_SCRIPT_CYPRIOT" "47") - '("limbu" "G_UNICODE_SCRIPT_LIMBU" "48") - '("osmanya" "G_UNICODE_SCRIPT_OSMANYA" "49") - '("shavian" "G_UNICODE_SCRIPT_SHAVIAN" "50") - '("linear-b" "G_UNICODE_SCRIPT_LINEAR_B" "51") - '("tai-le" "G_UNICODE_SCRIPT_TAI_LE" "52") - '("ugaritic" "G_UNICODE_SCRIPT_UGARITIC" "53") - '("new-tai-lue" "G_UNICODE_SCRIPT_NEW_TAI_LUE" "54") - '("buginese" "G_UNICODE_SCRIPT_BUGINESE" "55") - '("glagolitic" "G_UNICODE_SCRIPT_GLAGOLITIC" "56") - '("tifinagh" "G_UNICODE_SCRIPT_TIFINAGH" "57") - '("syloti-nagri" "G_UNICODE_SCRIPT_SYLOTI_NAGRI" "58") - '("old-persian" "G_UNICODE_SCRIPT_OLD_PERSIAN" "59") - '("kharoshthi" "G_UNICODE_SCRIPT_KHAROSHTHI" "60") - '("unknown" "G_UNICODE_SCRIPT_UNKNOWN" "61") - '("balinese" "G_UNICODE_SCRIPT_BALINESE" "62") - '("cuneiform" "G_UNICODE_SCRIPT_CUNEIFORM" "63") - '("phoenician" "G_UNICODE_SCRIPT_PHOENICIAN" "64") - '("phags-pa" "G_UNICODE_SCRIPT_PHAGS_PA" "65") - '("nko" "G_UNICODE_SCRIPT_NKO" "66") - ) -) - -(define-enum-extended NormalizeMode - (in-module "G") - (c-name "GNormalizeMode") - (values - '("default" "G_NORMALIZE_DEFAULT" "0") - '("nfd" "G_NORMALIZE_NFD" "#error") - '("default-compose" "G_NORMALIZE_DEFAULT_COMPOSE" "1") - '("nfc" "G_NORMALIZE_NFC" "1") - '("all" "G_NORMALIZE_ALL" "2") - '("nfkd" "G_NORMALIZE_NFKD" "2") - '("all-compose" "G_NORMALIZE_ALL_COMPOSE" "3") - '("nfkc" "G_NORMALIZE_NFKC" "3") - ) -) - -;; From /opt/gnome218/include/glib-2.0/glib/gutils.h - -(define-enum-extended UserDirectory - (in-module "G") - (c-name "GUserDirectory") - (values - '("directory-desktop" "G_USER_DIRECTORY_DESKTOP" "0") - '("directory-documents" "G_USER_DIRECTORY_DOCUMENTS" "1") - '("directory-download" "G_USER_DIRECTORY_DOWNLOAD" "2") - '("directory-music" "G_USER_DIRECTORY_MUSIC" "3") - '("directory-pictures" "G_USER_DIRECTORY_PICTURES" "4") - '("directory-public-share" "G_USER_DIRECTORY_PUBLIC_SHARE" "5") - '("directory-templates" "G_USER_DIRECTORY_TEMPLATES" "6") - '("directory-videos" "G_USER_DIRECTORY_VIDEOS" "7") - '("n-directories" "G_USER_N_DIRECTORIES" "8") - ) -) - diff --git a/libs/glibmm2/glib/src/glib_functions.defs b/libs/glibmm2/glib/src/glib_functions.defs deleted file mode 100644 index c3c64fe72a..0000000000 --- a/libs/glibmm2/glib/src/glib_functions.defs +++ /dev/null @@ -1,10118 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -;; Enumerations and flags ... - -(define-enum FileError - (in-module "GBookmark") - (c-name "GBookmarkFileError") - (gtype-id "G_TYPE_BOOKMARK_FILE_ERROR") - (values - '("invalid-uri" "G_BOOKMARK_FILE_ERROR_INVALID_URI") - '("invalid-value" "G_BOOKMARK_FILE_ERROR_INVALID_VALUE") - '("app-not-registered" "G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED") - '("uri-not-found" "G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND") - '("read" "G_BOOKMARK_FILE_ERROR_READ") - '("unknown-encoding" "G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING") - '("write" "G_BOOKMARK_FILE_ERROR_WRITE") - '("file-not-found" "G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND") - ) -) - -(define-flags ArrayFlags - (in-module "GBSearch") - (c-name "GBSearchArrayFlags") - (gtype-id "G_TYPE_B_SEARCH_ARRAY_FLAGS") - (values - '("lign-power2" "G_BSEARCH_ARRAY_ALIGN_POWER2") - '("uto-shrink" "G_BSEARCH_ARRAY_AUTO_SHRINK") - ) -) - -(define-enum Error - (in-module "GConvert") - (c-name "GConvertError") - (gtype-id "G_TYPE_CONVERT_ERROR") - (values - '("no-conversion" "G_CONVERT_ERROR_NO_CONVERSION") - '("illegal-sequence" "G_CONVERT_ERROR_ILLEGAL_SEQUENCE") - '("failed" "G_CONVERT_ERROR_FAILED") - '("partial-input" "G_CONVERT_ERROR_PARTIAL_INPUT") - '("bad-uri" "G_CONVERT_ERROR_BAD_URI") - '("not-absolute-path" "G_CONVERT_ERROR_NOT_ABSOLUTE_PATH") - ) -) - -(define-enum DMY - (in-module "GDate") - (c-name "GDateDMY") - (gtype-id "G_TYPE_DATE_DMY") - (values - '("day" "G_DATE_DAY") - '("month" "G_DATE_MONTH") - '("year" "G_DATE_YEAR") - ) -) - -(define-enum Weekday - (in-module "GDate") - (c-name "GDateWeekday") - (gtype-id "G_TYPE_DATE_WEEKDAY") - (values - '("bad-weekday" "G_DATE_BAD_WEEKDAY") - '("monday" "G_DATE_MONDAY") - '("tuesday" "G_DATE_TUESDAY") - '("wednesday" "G_DATE_WEDNESDAY") - '("thursday" "G_DATE_THURSDAY") - '("friday" "G_DATE_FRIDAY") - '("saturday" "G_DATE_SATURDAY") - '("sunday" "G_DATE_SUNDAY") - ) -) - -(define-enum Month - (in-module "GDate") - (c-name "GDateMonth") - (gtype-id "G_TYPE_DATE_MONTH") - (values - '("bad-month" "G_DATE_BAD_MONTH") - '("january" "G_DATE_JANUARY") - '("february" "G_DATE_FEBRUARY") - '("march" "G_DATE_MARCH") - '("april" "G_DATE_APRIL") - '("may" "G_DATE_MAY") - '("june" "G_DATE_JUNE") - '("july" "G_DATE_JULY") - '("august" "G_DATE_AUGUST") - '("september" "G_DATE_SEPTEMBER") - '("october" "G_DATE_OCTOBER") - '("november" "G_DATE_NOVEMBER") - '("december" "G_DATE_DECEMBER") - ) -) - -(define-flags Flag - (in-module "GDebug") - (c-name "GDebugFlag") - (gtype-id "G_TYPE_DEBUG_FLAG") - (values - '("warnings" "G_DEBUG_FATAL_WARNINGS") - '("criticals" "G_DEBUG_FATAL_CRITICALS") - ) -) - -(define-enum Error - (in-module "GFile") - (c-name "GFileError") - (gtype-id "G_TYPE_FILE_ERROR") - (values - '("exist" "G_FILE_ERROR_EXIST") - '("isdir" "G_FILE_ERROR_ISDIR") - '("acces" "G_FILE_ERROR_ACCES") - '("nametoolong" "G_FILE_ERROR_NAMETOOLONG") - '("noent" "G_FILE_ERROR_NOENT") - '("notdir" "G_FILE_ERROR_NOTDIR") - '("nxio" "G_FILE_ERROR_NXIO") - '("nodev" "G_FILE_ERROR_NODEV") - '("rofs" "G_FILE_ERROR_ROFS") - '("txtbsy" "G_FILE_ERROR_TXTBSY") - '("fault" "G_FILE_ERROR_FAULT") - '("loop" "G_FILE_ERROR_LOOP") - '("nospc" "G_FILE_ERROR_NOSPC") - '("nomem" "G_FILE_ERROR_NOMEM") - '("mfile" "G_FILE_ERROR_MFILE") - '("nfile" "G_FILE_ERROR_NFILE") - '("badf" "G_FILE_ERROR_BADF") - '("inval" "G_FILE_ERROR_INVAL") - '("pipe" "G_FILE_ERROR_PIPE") - '("again" "G_FILE_ERROR_AGAIN") - '("intr" "G_FILE_ERROR_INTR") - '("io" "G_FILE_ERROR_IO") - '("perm" "G_FILE_ERROR_PERM") - '("nosys" "G_FILE_ERROR_NOSYS") - '("failed" "G_FILE_ERROR_FAILED") - ) -) - -(define-flags Test - (in-module "GFile") - (c-name "GFileTest") - (gtype-id "G_TYPE_FILE_TEST") - (values - '("is-regular" "G_FILE_TEST_IS_REGULAR") - '("is-symlink" "G_FILE_TEST_IS_SYMLINK") - '("is-dir" "G_FILE_TEST_IS_DIR") - '("is-executable" "G_FILE_TEST_IS_EXECUTABLE") - '("exists" "G_FILE_TEST_EXISTS") - ) -) - -(define-flags FlagMask - (in-module "GHook") - (c-name "GHookFlagMask") - (gtype-id "G_TYPE_HOOK_FLAG_MASK") - (values - '("active" "G_HOOK_FLAG_ACTIVE") - '("in-call" "G_HOOK_FLAG_IN_CALL") - '("mask" "G_HOOK_FLAG_MASK") - ) -) - -(define-enum r - (in-module "GIOErro") - (c-name "GIOError") - (gtype-id "G_TYPE_IO_ERROR") - (values - '("none" "G_IO_ERROR_NONE") - '("again" "G_IO_ERROR_AGAIN") - '("inval" "G_IO_ERROR_INVAL") - '("unknown" "G_IO_ERROR_UNKNOWN") - ) -) - -(define-enum Error - (in-module "GIOChannel") - (c-name "GIOChannelError") - (gtype-id "G_TYPE_IO_CHANNEL_ERROR") - (values - '("fbig" "G_IO_CHANNEL_ERROR_FBIG") - '("inval" "G_IO_CHANNEL_ERROR_INVAL") - '("io" "G_IO_CHANNEL_ERROR_IO") - '("isdir" "G_IO_CHANNEL_ERROR_ISDIR") - '("nospc" "G_IO_CHANNEL_ERROR_NOSPC") - '("nxio" "G_IO_CHANNEL_ERROR_NXIO") - '("overflow" "G_IO_CHANNEL_ERROR_OVERFLOW") - '("pipe" "G_IO_CHANNEL_ERROR_PIPE") - '("failed" "G_IO_CHANNEL_ERROR_FAILED") - ) -) - -(define-enum s - (in-module "GIOStatu") - (c-name "GIOStatus") - (gtype-id "G_TYPE_IO_STATUS") - (values - '("error" "G_IO_STATUS_ERROR") - '("normal" "G_IO_STATUS_NORMAL") - '("eof" "G_IO_STATUS_EOF") - '("again" "G_IO_STATUS_AGAIN") - ) -) - -(define-enum Type - (in-module "GSeek") - (c-name "GSeekType") - (gtype-id "G_TYPE_SEEK_TYPE") - (values - '("cur" "G_SEEK_CUR") - '("set" "G_SEEK_SET") - '("end" "G_SEEK_END") - ) -) - -(define-enum n - (in-module "GIOConditio") - (c-name "GIOCondition") - (gtype-id "G_TYPE_IO_CONDITION") - (values - '("in" "G_IO_IN") - '("out" "G_IO_OUT") - '("pri" "G_IO_PRI") - '("err" "G_IO_ERR") - '("hup" "G_IO_HUP") - '("nval" "G_IO_NVAL") - ) -) - -(define-flags s - (in-module "GIOFlag") - (c-name "GIOFlags") - (gtype-id "G_TYPE_IO_FLAGS") - (values - '("append" "G_IO_FLAG_APPEND") - '("nonblock" "G_IO_FLAG_NONBLOCK") - '("is-readable" "G_IO_FLAG_IS_READABLE") - '("is-writeable" "G_IO_FLAG_IS_WRITEABLE") - '("is-seekable" "G_IO_FLAG_IS_SEEKABLE") - '("mask" "G_IO_FLAG_MASK") - '("get-mask" "G_IO_FLAG_GET_MASK") - '("set-mask" "G_IO_FLAG_SET_MASK") - ) -) - -(define-enum FileError - (in-module "GKey") - (c-name "GKeyFileError") - (gtype-id "G_TYPE_KEY_FILE_ERROR") - (values - '("unknown-encoding" "G_KEY_FILE_ERROR_UNKNOWN_ENCODING") - '("parse" "G_KEY_FILE_ERROR_PARSE") - '("not-found" "G_KEY_FILE_ERROR_NOT_FOUND") - '("key-not-found" "G_KEY_FILE_ERROR_KEY_NOT_FOUND") - '("group-not-found" "G_KEY_FILE_ERROR_GROUP_NOT_FOUND") - '("invalid-value" "G_KEY_FILE_ERROR_INVALID_VALUE") - ) -) - -(define-flags FileFlags - (in-module "GKey") - (c-name "GKeyFileFlags") - (gtype-id "G_TYPE_KEY_FILE_FLAGS") - (values - '("none" "G_KEY_FILE_NONE") - '("keep-comments" "G_KEY_FILE_KEEP_COMMENTS") - '("keep-translations" "G_KEY_FILE_KEEP_TRANSLATIONS") - ) -) - -(define-enum Error - (in-module "GMarkup") - (c-name "GMarkupError") - (gtype-id "G_TYPE_MARKUP_ERROR") - (values - '("bad-utf8" "G_MARKUP_ERROR_BAD_UTF8") - '("empty" "G_MARKUP_ERROR_EMPTY") - '("parse" "G_MARKUP_ERROR_PARSE") - '("unknown-element" "G_MARKUP_ERROR_UNKNOWN_ELEMENT") - '("unknown-attribute" "G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE") - '("invalid-content" "G_MARKUP_ERROR_INVALID_CONTENT") - ) -) - -(define-flags ParseFlags - (in-module "GMarkup") - (c-name "GMarkupParseFlags") - (gtype-id "G_TYPE_MARKUP_PARSE_FLAGS") - (values - '("do-not-use-this-unsupported-flag" "G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG") - '("treat-cdata-as-text" "G_MARKUP_TREAT_CDATA_AS_TEXT") - ) -) - -(define-flags LevelFlags - (in-module "GLog") - (c-name "GLogLevelFlags") - (gtype-id "G_TYPE_LOG_LEVEL_FLAGS") - (values - '("flag-recursion" "G_LOG_FLAG_RECURSION") - '("flag-fatal" "G_LOG_FLAG_FATAL") - '("level-error" "G_LOG_LEVEL_ERROR") - '("level-critical" "G_LOG_LEVEL_CRITICAL") - '("level-warning" "G_LOG_LEVEL_WARNING") - '("level-message" "G_LOG_LEVEL_MESSAGE") - '("level-info" "G_LOG_LEVEL_INFO") - '("level-debug" "G_LOG_LEVEL_DEBUG") - '("level-mask" "G_LOG_LEVEL_MASK") - ) -) - -(define-flags Flags - (in-module "GTraverse") - (c-name "GTraverseFlags") - (gtype-id "G_TYPE_TRAVERSE_FLAGS") - (values - '("leaves" "G_TRAVERSE_LEAVES") - '("non-leaves" "G_TRAVERSE_NON_LEAVES") - '("all" "G_TRAVERSE_ALL") - '("mask" "G_TRAVERSE_MASK") - '("leafs" "G_TRAVERSE_LEAFS") - '("non-leafs" "G_TRAVERSE_NON_LEAFS") - ) -) - -(define-enum Type - (in-module "GTraverse") - (c-name "GTraverseType") - (gtype-id "G_TYPE_TRAVERSE_TYPE") - (values - '("in-order" "G_IN_ORDER") - '("pre-order" "G_PRE_ORDER") - '("post-order" "G_POST_ORDER") - '("level-order" "G_LEVEL_ORDER") - ) -) - -(define-flags Flags - (in-module "GOption") - (c-name "GOptionFlags") - (gtype-id "G_TYPE_OPTION_FLAGS") - (values - '("hidden" "G_OPTION_FLAG_HIDDEN") - '("in-main" "G_OPTION_FLAG_IN_MAIN") - '("reverse" "G_OPTION_FLAG_REVERSE") - '("no-arg" "G_OPTION_FLAG_NO_ARG") - '("filename" "G_OPTION_FLAG_FILENAME") - '("optional-arg" "G_OPTION_FLAG_OPTIONAL_ARG") - '("noalias" "G_OPTION_FLAG_NOALIAS") - ) -) - -(define-enum Arg - (in-module "GOption") - (c-name "GOptionArg") - (gtype-id "G_TYPE_OPTION_ARG") - (values - '("none" "G_OPTION_ARG_NONE") - '("string" "G_OPTION_ARG_STRING") - '("int" "G_OPTION_ARG_INT") - '("callback" "G_OPTION_ARG_CALLBACK") - '("filename" "G_OPTION_ARG_FILENAME") - '("string-array" "G_OPTION_ARG_STRING_ARRAY") - '("filename-array" "G_OPTION_ARG_FILENAME_ARRAY") - '("double" "G_OPTION_ARG_DOUBLE") - '("int64" "G_OPTION_ARG_INT64") - ) -) - -(define-enum Error - (in-module "GOption") - (c-name "GOptionError") - (gtype-id "G_TYPE_OPTION_ERROR") - (values - '("unknown-option" "G_OPTION_ERROR_UNKNOWN_OPTION") - '("bad-value" "G_OPTION_ERROR_BAD_VALUE") - '("failed" "G_OPTION_ERROR_FAILED") - ) -) - -(define-enum Error - (in-module "GRegex") - (c-name "GRegexError") - (gtype-id "G_TYPE_REGEX_ERROR") - (values - '("compile" "G_REGEX_ERROR_COMPILE") - '("optimize" "G_REGEX_ERROR_OPTIMIZE") - '("replace" "G_REGEX_ERROR_REPLACE") - '("match" "G_REGEX_ERROR_MATCH") - ) -) - -(define-flags CompileFlags - (in-module "GRegex") - (c-name "GRegexCompileFlags") - (gtype-id "G_TYPE_REGEX_COMPILE_FLAGS") - (values - '("caseless" "G_REGEX_CASELESS") - '("multiline" "G_REGEX_MULTILINE") - '("dotall" "G_REGEX_DOTALL") - '("extended" "G_REGEX_EXTENDED") - '("anchored" "G_REGEX_ANCHORED") - '("dollar-endonly" "G_REGEX_DOLLAR_ENDONLY") - '("ungreedy" "G_REGEX_UNGREEDY") - '("raw" "G_REGEX_RAW") - '("no-auto-capture" "G_REGEX_NO_AUTO_CAPTURE") - '("optimize" "G_REGEX_OPTIMIZE") - '("dupnames" "G_REGEX_DUPNAMES") - '("newline-cr" "G_REGEX_NEWLINE_CR") - '("newline-lf" "G_REGEX_NEWLINE_LF") - '("newline-crlf" "G_REGEX_NEWLINE_CRLF") - ) -) - -(define-flags MatchFlags - (in-module "GRegex") - (c-name "GRegexMatchFlags") - (gtype-id "G_TYPE_REGEX_MATCH_FLAGS") - (values - '("anchored" "G_REGEX_MATCH_ANCHORED") - '("notbol" "G_REGEX_MATCH_NOTBOL") - '("noteol" "G_REGEX_MATCH_NOTEOL") - '("notempty" "G_REGEX_MATCH_NOTEMPTY") - '("partial" "G_REGEX_MATCH_PARTIAL") - '("newline-cr" "G_REGEX_MATCH_NEWLINE_CR") - '("newline-lf" "G_REGEX_MATCH_NEWLINE_LF") - '("newline-crlf" "G_REGEX_MATCH_NEWLINE_CRLF") - '("newline-any" "G_REGEX_MATCH_NEWLINE_ANY") - ) -) - -(define-enum Type - (in-module "GError") - (c-name "GErrorType") - (gtype-id "G_TYPE_ERROR_TYPE") - (values - '("unknown" "G_ERR_UNKNOWN") - '("unexp-eof" "G_ERR_UNEXP_EOF") - '("unexp-eof-in-string" "G_ERR_UNEXP_EOF_IN_STRING") - '("unexp-eof-in-comment" "G_ERR_UNEXP_EOF_IN_COMMENT") - '("non-digit-in-const" "G_ERR_NON_DIGIT_IN_CONST") - '("digit-radix" "G_ERR_DIGIT_RADIX") - '("float-radix" "G_ERR_FLOAT_RADIX") - '("float-malformed" "G_ERR_FLOAT_MALFORMED") - ) -) - -(define-enum Error - (in-module "GShell") - (c-name "GShellError") - (gtype-id "G_TYPE_SHELL_ERROR") - (values - '("bad-quoting" "G_SHELL_ERROR_BAD_QUOTING") - '("empty-string" "G_SHELL_ERROR_EMPTY_STRING") - '("failed" "G_SHELL_ERROR_FAILED") - ) -) - -(define-enum Config - (in-module "GSlice") - (c-name "GSliceConfig") - (gtype-id "G_TYPE_SLICE_CONFIG") - (values - '("always-malloc" "G_SLICE_CONFIG_ALWAYS_MALLOC") - '("bypass-magazines" "G_SLICE_CONFIG_BYPASS_MAGAZINES") - '("working-set-msecs" "G_SLICE_CONFIG_WORKING_SET_MSECS") - '("color-increment" "G_SLICE_CONFIG_COLOR_INCREMENT") - '("chunk-sizes" "G_SLICE_CONFIG_CHUNK_SIZES") - '("contention-counter" "G_SLICE_CONFIG_CONTENTION_COUNTER") - ) -) - -(define-enum Error - (in-module "GSpawn") - (c-name "GSpawnError") - (gtype-id "G_TYPE_SPAWN_ERROR") - (values - '("fork" "G_SPAWN_ERROR_FORK") - '("read" "G_SPAWN_ERROR_READ") - '("chdir" "G_SPAWN_ERROR_CHDIR") - '("acces" "G_SPAWN_ERROR_ACCES") - '("perm" "G_SPAWN_ERROR_PERM") - '("2big" "G_SPAWN_ERROR_2BIG") - '("noexec" "G_SPAWN_ERROR_NOEXEC") - '("nametoolong" "G_SPAWN_ERROR_NAMETOOLONG") - '("noent" "G_SPAWN_ERROR_NOENT") - '("nomem" "G_SPAWN_ERROR_NOMEM") - '("notdir" "G_SPAWN_ERROR_NOTDIR") - '("loop" "G_SPAWN_ERROR_LOOP") - '("txtbusy" "G_SPAWN_ERROR_TXTBUSY") - '("io" "G_SPAWN_ERROR_IO") - '("nfile" "G_SPAWN_ERROR_NFILE") - '("mfile" "G_SPAWN_ERROR_MFILE") - '("inval" "G_SPAWN_ERROR_INVAL") - '("isdir" "G_SPAWN_ERROR_ISDIR") - '("libbad" "G_SPAWN_ERROR_LIBBAD") - '("failed" "G_SPAWN_ERROR_FAILED") - ) -) - -(define-flags Flags - (in-module "GSpawn") - (c-name "GSpawnFlags") - (gtype-id "G_TYPE_SPAWN_FLAGS") - (values - '("leave-descriptors-open" "G_SPAWN_LEAVE_DESCRIPTORS_OPEN") - '("do-not-reap-child" "G_SPAWN_DO_NOT_REAP_CHILD") - '("search-path" "G_SPAWN_SEARCH_PATH") - '("stdout-to-dev-null" "G_SPAWN_STDOUT_TO_DEV_NULL") - '("stderr-to-dev-null" "G_SPAWN_STDERR_TO_DEV_NULL") - '("child-inherits-stdin" "G_SPAWN_CHILD_INHERITS_STDIN") - '("file-and-argv-zero" "G_SPAWN_FILE_AND_ARGV_ZERO") - ) -) - -(define-flags Type - (in-module "GAscii") - (c-name "GAsciiType") - (gtype-id "G_TYPE_ASCII_TYPE") - (values - '("alnum" "G_ASCII_ALNUM") - '("alpha" "G_ASCII_ALPHA") - '("cntrl" "G_ASCII_CNTRL") - '("digit" "G_ASCII_DIGIT") - '("graph" "G_ASCII_GRAPH") - '("lower" "G_ASCII_LOWER") - '("print" "G_ASCII_PRINT") - '("punct" "G_ASCII_PUNCT") - '("space" "G_ASCII_SPACE") - '("upper" "G_ASCII_UPPER") - '("xdigit" "G_ASCII_XDIGIT") - ) -) - -(define-enum Error - (in-module "GThread") - (c-name "GThreadError") - (gtype-id "G_TYPE_THREAD_ERROR") - (values - '("n" "G_THREAD_ERROR_AGAIN") - ) -) - -(define-enum Priority - (in-module "GThread") - (c-name "GThreadPriority") - (gtype-id "G_TYPE_THREAD_PRIORITY") - (values - '("low" "G_THREAD_PRIORITY_LOW") - '("normal" "G_THREAD_PRIORITY_NORMAL") - '("high" "G_THREAD_PRIORITY_HIGH") - '("urgent" "G_THREAD_PRIORITY_URGENT") - ) -) - -(define-enum Status - (in-module "GOnce") - (c-name "GOnceStatus") - (gtype-id "G_TYPE_ONCE_STATUS") - (values - '("notcalled" "G_ONCE_STATUS_NOTCALLED") - '("progress" "G_ONCE_STATUS_PROGRESS") - '("ready" "G_ONCE_STATUS_READY") - ) -) - -(define-enum Type - (in-module "GUnicode") - (c-name "GUnicodeType") - (gtype-id "G_TYPE_UNICODE_TYPE") - (values - '("control" "G_UNICODE_CONTROL") - '("format" "G_UNICODE_FORMAT") - '("unassigned" "G_UNICODE_UNASSIGNED") - '("private-use" "G_UNICODE_PRIVATE_USE") - '("surrogate" "G_UNICODE_SURROGATE") - '("lowercase-letter" "G_UNICODE_LOWERCASE_LETTER") - '("modifier-letter" "G_UNICODE_MODIFIER_LETTER") - '("other-letter" "G_UNICODE_OTHER_LETTER") - '("titlecase-letter" "G_UNICODE_TITLECASE_LETTER") - '("uppercase-letter" "G_UNICODE_UPPERCASE_LETTER") - '("combining-mark" "G_UNICODE_COMBINING_MARK") - '("enclosing-mark" "G_UNICODE_ENCLOSING_MARK") - '("non-spacing-mark" "G_UNICODE_NON_SPACING_MARK") - '("decimal-number" "G_UNICODE_DECIMAL_NUMBER") - '("letter-number" "G_UNICODE_LETTER_NUMBER") - '("other-number" "G_UNICODE_OTHER_NUMBER") - '("connect-punctuation" "G_UNICODE_CONNECT_PUNCTUATION") - '("dash-punctuation" "G_UNICODE_DASH_PUNCTUATION") - '("close-punctuation" "G_UNICODE_CLOSE_PUNCTUATION") - '("final-punctuation" "G_UNICODE_FINAL_PUNCTUATION") - '("initial-punctuation" "G_UNICODE_INITIAL_PUNCTUATION") - '("other-punctuation" "G_UNICODE_OTHER_PUNCTUATION") - '("open-punctuation" "G_UNICODE_OPEN_PUNCTUATION") - '("currency-symbol" "G_UNICODE_CURRENCY_SYMBOL") - '("modifier-symbol" "G_UNICODE_MODIFIER_SYMBOL") - '("math-symbol" "G_UNICODE_MATH_SYMBOL") - '("other-symbol" "G_UNICODE_OTHER_SYMBOL") - '("line-separator" "G_UNICODE_LINE_SEPARATOR") - '("paragraph-separator" "G_UNICODE_PARAGRAPH_SEPARATOR") - '("space-separator" "G_UNICODE_SPACE_SEPARATOR") - ) -) - -(define-enum BreakType - (in-module "GUnicode") - (c-name "GUnicodeBreakType") - (gtype-id "G_TYPE_UNICODE_BREAK_TYPE") - (values - '("mandatory" "G_UNICODE_BREAK_MANDATORY") - '("carriage-return" "G_UNICODE_BREAK_CARRIAGE_RETURN") - '("line-feed" "G_UNICODE_BREAK_LINE_FEED") - '("combining-mark" "G_UNICODE_BREAK_COMBINING_MARK") - '("surrogate" "G_UNICODE_BREAK_SURROGATE") - '("zero-width-space" "G_UNICODE_BREAK_ZERO_WIDTH_SPACE") - '("inseparable" "G_UNICODE_BREAK_INSEPARABLE") - '("non-breaking-glue" "G_UNICODE_BREAK_NON_BREAKING_GLUE") - '("contingent" "G_UNICODE_BREAK_CONTINGENT") - '("space" "G_UNICODE_BREAK_SPACE") - '("after" "G_UNICODE_BREAK_AFTER") - '("before" "G_UNICODE_BREAK_BEFORE") - '("before-and-after" "G_UNICODE_BREAK_BEFORE_AND_AFTER") - '("hyphen" "G_UNICODE_BREAK_HYPHEN") - '("non-starter" "G_UNICODE_BREAK_NON_STARTER") - '("open-punctuation" "G_UNICODE_BREAK_OPEN_PUNCTUATION") - '("close-punctuation" "G_UNICODE_BREAK_CLOSE_PUNCTUATION") - '("quotation" "G_UNICODE_BREAK_QUOTATION") - '("exclamation" "G_UNICODE_BREAK_EXCLAMATION") - '("ideographic" "G_UNICODE_BREAK_IDEOGRAPHIC") - '("numeric" "G_UNICODE_BREAK_NUMERIC") - '("infix-separator" "G_UNICODE_BREAK_INFIX_SEPARATOR") - '("symbol" "G_UNICODE_BREAK_SYMBOL") - '("alphabetic" "G_UNICODE_BREAK_ALPHABETIC") - '("prefix" "G_UNICODE_BREAK_PREFIX") - '("postfix" "G_UNICODE_BREAK_POSTFIX") - '("complex-context" "G_UNICODE_BREAK_COMPLEX_CONTEXT") - '("ambiguous" "G_UNICODE_BREAK_AMBIGUOUS") - '("unknown" "G_UNICODE_BREAK_UNKNOWN") - '("next-line" "G_UNICODE_BREAK_NEXT_LINE") - '("word-joiner" "G_UNICODE_BREAK_WORD_JOINER") - '("hangul-l-jamo" "G_UNICODE_BREAK_HANGUL_L_JAMO") - '("hangul-v-jamo" "G_UNICODE_BREAK_HANGUL_V_JAMO") - '("hangul-t-jamo" "G_UNICODE_BREAK_HANGUL_T_JAMO") - '("hangul-lv-syllable" "G_UNICODE_BREAK_HANGUL_LV_SYLLABLE") - '("hangul-lvt-syllable" "G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE") - ) -) - -(define-enum Script - (in-module "GUnicode") - (c-name "GUnicodeScript") - (gtype-id "G_TYPE_UNICODE_SCRIPT") - (values - '("invalid-code" "G_UNICODE_SCRIPT_INVALID_CODE") - '("common" "G_UNICODE_SCRIPT_COMMON") - '("inherited" "G_UNICODE_SCRIPT_INHERITED") - '("arabic" "G_UNICODE_SCRIPT_ARABIC") - '("armenian" "G_UNICODE_SCRIPT_ARMENIAN") - '("bengali" "G_UNICODE_SCRIPT_BENGALI") - '("bopomofo" "G_UNICODE_SCRIPT_BOPOMOFO") - '("cherokee" "G_UNICODE_SCRIPT_CHEROKEE") - '("coptic" "G_UNICODE_SCRIPT_COPTIC") - '("cyrillic" "G_UNICODE_SCRIPT_CYRILLIC") - '("deseret" "G_UNICODE_SCRIPT_DESERET") - '("devanagari" "G_UNICODE_SCRIPT_DEVANAGARI") - '("ethiopic" "G_UNICODE_SCRIPT_ETHIOPIC") - '("georgian" "G_UNICODE_SCRIPT_GEORGIAN") - '("gothic" "G_UNICODE_SCRIPT_GOTHIC") - '("greek" "G_UNICODE_SCRIPT_GREEK") - '("gujarati" "G_UNICODE_SCRIPT_GUJARATI") - '("gurmukhi" "G_UNICODE_SCRIPT_GURMUKHI") - '("han" "G_UNICODE_SCRIPT_HAN") - '("hangul" "G_UNICODE_SCRIPT_HANGUL") - '("hebrew" "G_UNICODE_SCRIPT_HEBREW") - '("hiragana" "G_UNICODE_SCRIPT_HIRAGANA") - '("kannada" "G_UNICODE_SCRIPT_KANNADA") - '("katakana" "G_UNICODE_SCRIPT_KATAKANA") - '("khmer" "G_UNICODE_SCRIPT_KHMER") - '("lao" "G_UNICODE_SCRIPT_LAO") - '("latin" "G_UNICODE_SCRIPT_LATIN") - '("malayalam" "G_UNICODE_SCRIPT_MALAYALAM") - '("mongolian" "G_UNICODE_SCRIPT_MONGOLIAN") - '("myanmar" "G_UNICODE_SCRIPT_MYANMAR") - '("ogham" "G_UNICODE_SCRIPT_OGHAM") - '("old-italic" "G_UNICODE_SCRIPT_OLD_ITALIC") - '("oriya" "G_UNICODE_SCRIPT_ORIYA") - '("runic" "G_UNICODE_SCRIPT_RUNIC") - '("sinhala" "G_UNICODE_SCRIPT_SINHALA") - '("syriac" "G_UNICODE_SCRIPT_SYRIAC") - '("tamil" "G_UNICODE_SCRIPT_TAMIL") - '("telugu" "G_UNICODE_SCRIPT_TELUGU") - '("thaana" "G_UNICODE_SCRIPT_THAANA") - '("thai" "G_UNICODE_SCRIPT_THAI") - '("tibetan" "G_UNICODE_SCRIPT_TIBETAN") - '("canadian-aboriginal" "G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL") - '("yi" "G_UNICODE_SCRIPT_YI") - '("tagalog" "G_UNICODE_SCRIPT_TAGALOG") - '("hanunoo" "G_UNICODE_SCRIPT_HANUNOO") - '("buhid" "G_UNICODE_SCRIPT_BUHID") - '("tagbanwa" "G_UNICODE_SCRIPT_TAGBANWA") - '("braille" "G_UNICODE_SCRIPT_BRAILLE") - '("cypriot" "G_UNICODE_SCRIPT_CYPRIOT") - '("limbu" "G_UNICODE_SCRIPT_LIMBU") - '("osmanya" "G_UNICODE_SCRIPT_OSMANYA") - '("shavian" "G_UNICODE_SCRIPT_SHAVIAN") - '("linear-b" "G_UNICODE_SCRIPT_LINEAR_B") - '("tai-le" "G_UNICODE_SCRIPT_TAI_LE") - '("ugaritic" "G_UNICODE_SCRIPT_UGARITIC") - '("new-tai-lue" "G_UNICODE_SCRIPT_NEW_TAI_LUE") - '("buginese" "G_UNICODE_SCRIPT_BUGINESE") - '("glagolitic" "G_UNICODE_SCRIPT_GLAGOLITIC") - '("tifinagh" "G_UNICODE_SCRIPT_TIFINAGH") - '("syloti-nagri" "G_UNICODE_SCRIPT_SYLOTI_NAGRI") - '("old-persian" "G_UNICODE_SCRIPT_OLD_PERSIAN") - '("kharoshthi" "G_UNICODE_SCRIPT_KHAROSHTHI") - '("unknown" "G_UNICODE_SCRIPT_UNKNOWN") - '("balinese" "G_UNICODE_SCRIPT_BALINESE") - '("cuneiform" "G_UNICODE_SCRIPT_CUNEIFORM") - '("phoenician" "G_UNICODE_SCRIPT_PHOENICIAN") - '("phags-pa" "G_UNICODE_SCRIPT_PHAGS_PA") - '("nko" "G_UNICODE_SCRIPT_NKO") - ) -) - -(define-enum Mode - (in-module "GNormalize") - (c-name "GNormalizeMode") - (gtype-id "G_TYPE_NORMALIZE_MODE") - (values - '("default" "G_NORMALIZE_DEFAULT") - '("nfd" "G_NORMALIZE_NFD") - '("default-compose" "G_NORMALIZE_DEFAULT_COMPOSE") - '("nfc" "G_NORMALIZE_NFC") - '("all" "G_NORMALIZE_ALL") - '("nfkd" "G_NORMALIZE_NFKD") - '("all-compose" "G_NORMALIZE_ALL_COMPOSE") - '("nfkc" "G_NORMALIZE_NFKC") - ) -) - -(define-enum Directory - (in-module "GUser") - (c-name "GUserDirectory") - (gtype-id "G_TYPE_USER_DIRECTORY") - (values - '("directory-desktop" "G_USER_DIRECTORY_DESKTOP") - '("directory-documents" "G_USER_DIRECTORY_DOCUMENTS") - '("directory-download" "G_USER_DIRECTORY_DOWNLOAD") - '("directory-music" "G_USER_DIRECTORY_MUSIC") - '("directory-pictures" "G_USER_DIRECTORY_PICTURES") - '("directory-public-share" "G_USER_DIRECTORY_PUBLIC_SHARE") - '("directory-templates" "G_USER_DIRECTORY_TEMPLATES") - '("directory-videos" "G_USER_DIRECTORY_VIDEOS") - '("n-directories" "G_USER_N_DIRECTORIES") - ) -) - - -;; From galias.h - - - -;; From galloca.h - -(define-function alloca - (c-name "alloca") - (return-type "char*") - (parameters - ) -) - - - -;; From garray.h - -(define-function g_array_new - (c-name "g_array_new") - (is-constructor-of "GArray") - (return-type "GArray*") - (parameters - '("gboolean" "zero_terminated") - '("gboolean" "clear_") - '("guint" "element_size") - ) -) - -(define-function g_array_sized_new - (c-name "g_array_sized_new") - (is-constructor-of "GArraySized") - (return-type "GArray*") - (parameters - '("gboolean" "zero_terminated") - '("gboolean" "clear_") - '("guint" "element_size") - '("guint" "reserved_size") - ) -) - -(define-method free - (of-object "GArray") - (c-name "g_array_free") - (return-type "gchar*") - (parameters - '("gboolean" "free_segment") - ) -) - -(define-method append_vals - (of-object "GArray") - (c-name "g_array_append_vals") - (return-type "GArray*") - (parameters - '("gconstpointer" "data") - '("guint" "len") - ) -) - -(define-method prepend_vals - (of-object "GArray") - (c-name "g_array_prepend_vals") - (return-type "GArray*") - (parameters - '("gconstpointer" "data") - '("guint" "len") - ) -) - -(define-method insert_vals - (of-object "GArray") - (c-name "g_array_insert_vals") - (return-type "GArray*") - (parameters - '("guint" "index_") - '("gconstpointer" "data") - '("guint" "len") - ) -) - -(define-method set_size - (of-object "GArray") - (c-name "g_array_set_size") - (return-type "GArray*") - (parameters - '("guint" "length") - ) -) - -(define-method remove_index - (of-object "GArray") - (c-name "g_array_remove_index") - (return-type "GArray*") - (parameters - '("guint" "index_") - ) -) - -(define-method remove_index_fast - (of-object "GArray") - (c-name "g_array_remove_index_fast") - (return-type "GArray*") - (parameters - '("guint" "index_") - ) -) - -(define-method remove_range - (of-object "GArray") - (c-name "g_array_remove_range") - (return-type "GArray*") - (parameters - '("guint" "index_") - '("guint" "length") - ) -) - -(define-method sort - (of-object "GArray") - (c-name "g_array_sort") - (return-type "none") - (parameters - '("GCompareFunc" "compare_func") - ) -) - -(define-method sort_with_data - (of-object "GArray") - (c-name "g_array_sort_with_data") - (return-type "none") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - -(define-function g_ptr_array_new - (c-name "g_ptr_array_new") - (is-constructor-of "GPtrArray") - (return-type "GPtrArray*") -) - -(define-function g_ptr_array_sized_new - (c-name "g_ptr_array_sized_new") - (is-constructor-of "GPtrArraySized") - (return-type "GPtrArray*") - (parameters - '("guint" "reserved_size") - ) -) - -(define-method free - (of-object "GPtrArray") - (c-name "g_ptr_array_free") - (return-type "gpointer*") - (parameters - '("gboolean" "free_seg") - ) -) - -(define-method set_size - (of-object "GPtrArray") - (c-name "g_ptr_array_set_size") - (return-type "none") - (parameters - '("gint" "length") - ) -) - -(define-method remove_index - (of-object "GPtrArray") - (c-name "g_ptr_array_remove_index") - (return-type "gpointer") - (parameters - '("guint" "index_") - ) -) - -(define-method remove_index_fast - (of-object "GPtrArray") - (c-name "g_ptr_array_remove_index_fast") - (return-type "gpointer") - (parameters - '("guint" "index_") - ) -) - -(define-method remove - (of-object "GPtrArray") - (c-name "g_ptr_array_remove") - (return-type "gboolean") - (parameters - '("gpointer" "data") - ) -) - -(define-method remove_fast - (of-object "GPtrArray") - (c-name "g_ptr_array_remove_fast") - (return-type "gboolean") - (parameters - '("gpointer" "data") - ) -) - -(define-method remove_range - (of-object "GPtrArray") - (c-name "g_ptr_array_remove_range") - (return-type "none") - (parameters - '("guint" "index_") - '("guint" "length") - ) -) - -(define-method add - (of-object "GPtrArray") - (c-name "g_ptr_array_add") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method sort - (of-object "GPtrArray") - (c-name "g_ptr_array_sort") - (return-type "none") - (parameters - '("GCompareFunc" "compare_func") - ) -) - -(define-method sort_with_data - (of-object "GPtrArray") - (c-name "g_ptr_array_sort_with_data") - (return-type "none") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - -(define-method foreach - (of-object "GPtrArray") - (c-name "g_ptr_array_foreach") - (return-type "none") - (parameters - '("GFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-function g_byte_array_new - (c-name "g_byte_array_new") - (is-constructor-of "GByteArray") - (return-type "GByteArray*") -) - -(define-function g_byte_array_sized_new - (c-name "g_byte_array_sized_new") - (is-constructor-of "GByteArraySized") - (return-type "GByteArray*") - (parameters - '("guint" "reserved_size") - ) -) - -(define-method free - (of-object "GByteArray") - (c-name "g_byte_array_free") - (return-type "guint8*") - (parameters - '("gboolean" "free_segment") - ) -) - -(define-method append - (of-object "GByteArray") - (c-name "g_byte_array_append") - (return-type "GByteArray*") - (parameters - '("const-guint8*" "data") - '("guint" "len") - ) -) - -(define-method prepend - (of-object "GByteArray") - (c-name "g_byte_array_prepend") - (return-type "GByteArray*") - (parameters - '("const-guint8*" "data") - '("guint" "len") - ) -) - -(define-method set_size - (of-object "GByteArray") - (c-name "g_byte_array_set_size") - (return-type "GByteArray*") - (parameters - '("guint" "length") - ) -) - -(define-method remove_index - (of-object "GByteArray") - (c-name "g_byte_array_remove_index") - (return-type "GByteArray*") - (parameters - '("guint" "index_") - ) -) - -(define-method remove_index_fast - (of-object "GByteArray") - (c-name "g_byte_array_remove_index_fast") - (return-type "GByteArray*") - (parameters - '("guint" "index_") - ) -) - -(define-method remove_range - (of-object "GByteArray") - (c-name "g_byte_array_remove_range") - (return-type "GByteArray*") - (parameters - '("guint" "index_") - '("guint" "length") - ) -) - -(define-method sort - (of-object "GByteArray") - (c-name "g_byte_array_sort") - (return-type "none") - (parameters - '("GCompareFunc" "compare_func") - ) -) - -(define-method sort_with_data - (of-object "GByteArray") - (c-name "g_byte_array_sort_with_data") - (return-type "none") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - - - -;; From gasyncqueue.h - -(define-function g_async_queue_new - (c-name "g_async_queue_new") - (is-constructor-of "GAsyncQueue") - (return-type "GAsyncQueue*") -) - -(define-method lock - (of-object "GAsyncQueue") - (c-name "g_async_queue_lock") - (return-type "none") -) - -(define-method unlock - (of-object "GAsyncQueue") - (c-name "g_async_queue_unlock") - (return-type "none") -) - -(define-method ref - (of-object "GAsyncQueue") - (c-name "g_async_queue_ref") - (return-type "GAsyncQueue*") -) - -(define-method unref - (of-object "GAsyncQueue") - (c-name "g_async_queue_unref") - (return-type "none") -) - -(define-method ref_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_ref_unlocked") - (return-type "none") -) - -(define-method unref_and_unlock - (of-object "GAsyncQueue") - (c-name "g_async_queue_unref_and_unlock") - (return-type "none") -) - -(define-method push - (of-object "GAsyncQueue") - (c-name "g_async_queue_push") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method push_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_push_unlocked") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method push_sorted - (of-object "GAsyncQueue") - (c-name "g_async_queue_push_sorted") - (return-type "none") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method push_sorted_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_push_sorted_unlocked") - (return-type "none") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method pop - (of-object "GAsyncQueue") - (c-name "g_async_queue_pop") - (return-type "gpointer") -) - -(define-method pop_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_pop_unlocked") - (return-type "gpointer") -) - -(define-method try_pop - (of-object "GAsyncQueue") - (c-name "g_async_queue_try_pop") - (return-type "gpointer") -) - -(define-method try_pop_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_try_pop_unlocked") - (return-type "gpointer") -) - -(define-method timed_pop - (of-object "GAsyncQueue") - (c-name "g_async_queue_timed_pop") - (return-type "gpointer") - (parameters - '("GTimeVal*" "end_time") - ) -) - -(define-method timed_pop_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_timed_pop_unlocked") - (return-type "gpointer") - (parameters - '("GTimeVal*" "end_time") - ) -) - -(define-method length - (of-object "GAsyncQueue") - (c-name "g_async_queue_length") - (return-type "gint") -) - -(define-method length_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_length_unlocked") - (return-type "gint") -) - -(define-method sort - (of-object "GAsyncQueue") - (c-name "g_async_queue_sort") - (return-type "none") - (parameters - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method sort_unlocked - (of-object "GAsyncQueue") - (c-name "g_async_queue_sort_unlocked") - (return-type "none") - (parameters - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - - - -;; From gatomic.h - -(define-function g_atomic_int_exchange_and_add - (c-name "g_atomic_int_exchange_and_add") - (return-type "gint") - (parameters - '("volatile-gint*" "atomic") - '("gint" "val") - ) -) - -(define-function g_atomic_int_add - (c-name "g_atomic_int_add") - (return-type "none") - (parameters - '("volatile-gint*" "atomic") - '("gint" "val") - ) -) - -(define-function g_atomic_int_compare_and_exchange - (c-name "g_atomic_int_compare_and_exchange") - (return-type "gboolean") - (parameters - '("volatile-gint*" "atomic") - '("gint" "oldval") - '("gint" "newval") - ) -) - -(define-function g_atomic_pointer_compare_and_exchange - (c-name "g_atomic_pointer_compare_and_exchange") - (return-type "gboolean") - (parameters - '("volatile-gpointer*" "atomic") - '("gpointer" "oldval") - '("gpointer" "newval") - ) -) - -(define-function g_atomic_int_get - (c-name "g_atomic_int_get") - (return-type "gint") - (parameters - '("volatile-gint*" "atomic") - ) -) - -(define-function g_atomic_int_set - (c-name "g_atomic_int_set") - (return-type "none") - (parameters - '("volatile-gint*" "atomic") - '("gint" "newval") - ) -) - -(define-function g_atomic_pointer_get - (c-name "g_atomic_pointer_get") - (return-type "gpointer") - (parameters - '("volatile-gpointer*" "atomic") - ) -) - -(define-function g_atomic_pointer_set - (c-name "g_atomic_pointer_set") - (return-type "none") - (parameters - '("volatile-gpointer*" "atomic") - '("gpointer" "newval") - ) -) - - - -;; From gbacktrace.h - -(define-function g_on_error_query - (c-name "g_on_error_query") - (return-type "none") - (parameters - '("const-gchar*" "prg_name") - ) -) - -(define-function g_on_error_stack_trace - (c-name "g_on_error_stack_trace") - (return-type "none") - (parameters - '("const-gchar*" "prg_name") - ) -) - - - -;; From gbase64.h - -(define-function g_base64_encode_step - (c-name "g_base64_encode_step") - (return-type "gsize") - (parameters - '("const-guchar*" "in") - '("gsize" "len") - '("gboolean" "break_lines") - '("gchar*" "out") - '("gint*" "state") - '("gint*" "save") - ) -) - -(define-function g_base64_encode_close - (c-name "g_base64_encode_close") - (return-type "gsize") - (parameters - '("gboolean" "break_lines") - '("gchar*" "out") - '("gint*" "state") - '("gint*" "save") - ) -) - -(define-function g_base64_encode - (c-name "g_base64_encode") - (return-type "gchar*") - (parameters - '("const-guchar*" "data") - '("gsize" "len") - ) -) - -(define-function g_base64_decode_step - (c-name "g_base64_decode_step") - (return-type "gsize") - (parameters - '("const-gchar*" "in") - '("gsize" "len") - '("guchar*" "out") - '("gint*" "state") - '("guint*" "save") - ) -) - -(define-function g_base64_decode - (c-name "g_base64_decode") - (return-type "guchar*") - (parameters - '("const-gchar*" "text") - '("gsize*" "out_len") - ) -) - - - -;; From gbookmarkfile.h - -(define-function g_bookmark_file_error_quark - (c-name "g_bookmark_file_error_quark") - (return-type "GQuark") -) - -(define-function g_bookmark_file_new - (c-name "g_bookmark_file_new") - (is-constructor-of "GBookmarkFile") - (return-type "GBookmarkFile*") -) - -(define-method free - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_free") - (return-type "none") -) - -(define-method load_from_file - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_load_from_file") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-method load_from_data - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_load_from_data") - (return-type "gboolean") - (parameters - '("const-gchar*" "data") - '("gsize" "length") - '("GError**" "error") - ) -) - -(define-method load_from_data_dirs - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_load_from_data_dirs") - (return-type "gboolean") - (parameters - '("const-gchar*" "file") - '("gchar**" "full_path") - '("GError**" "error") - ) -) - -(define-method to_data - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_to_data") - (return-type "gchar*") - (parameters - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method to_file - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_to_file") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-method set_title - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_title") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "title") - ) -) - -(define-method get_title - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_title") - (return-type "gchar*") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method set_description - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_description") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "description") - ) -) - -(define-method get_description - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_description") - (return-type "gchar*") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method set_mime_type - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_mime_type") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "mime_type") - ) -) - -(define-method get_mime_type - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_mime_type") - (return-type "gchar*") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method set_groups - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_groups") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar**" "groups") - '("gsize" "length") - ) -) - -(define-method add_group - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_add_group") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "group") - ) -) - -(define-method has_group - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_has_group") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "group") - '("GError**" "error") - ) -) - -(define-method get_groups - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_groups") - (return-type "gchar**") - (parameters - '("const-gchar*" "uri") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method add_application - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_add_application") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "name") - '("const-gchar*" "exec") - ) -) - -(define-method has_application - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_has_application") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "name") - '("GError**" "error") - ) -) - -(define-method get_applications - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_applications") - (return-type "gchar**") - (parameters - '("const-gchar*" "uri") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method set_app_info - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_app_info") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "name") - '("const-gchar*" "exec") - '("gint" "count") - '("time_t" "stamp") - '("GError**" "error") - ) -) - -(define-method get_app_info - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_app_info") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "name") - '("gchar**" "exec") - '("guint*" "count") - '("time_t*" "stamp") - '("GError**" "error") - ) -) - -(define-method set_is_private - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_is_private") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("gboolean" "is_private") - ) -) - -(define-method get_is_private - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_is_private") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method set_icon - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_icon") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "href") - '("const-gchar*" "mime_type") - ) -) - -(define-method get_icon - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_icon") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("gchar**" "href") - '("gchar**" "mime_type") - '("GError**" "error") - ) -) - -(define-method set_added - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_added") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("time_t" "added") - ) -) - -(define-method get_added - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_added") - (return-type "time_t") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method set_modified - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_modified") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("time_t" "modified") - ) -) - -(define-method get_modified - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_modified") - (return-type "time_t") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method set_visited - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_set_visited") - (return-type "none") - (parameters - '("const-gchar*" "uri") - '("time_t" "visited") - ) -) - -(define-method get_visited - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_visited") - (return-type "time_t") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method has_item - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_has_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-method get_size - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_size") - (return-type "gint") -) - -(define-method get_uris - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_get_uris") - (return-type "gchar**") - (parameters - '("gsize*" "length") - ) -) - -(define-method remove_group - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_remove_group") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "group") - '("GError**" "error") - ) -) - -(define-method remove_application - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_remove_application") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "name") - '("GError**" "error") - ) -) - -(define-method remove_item - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_remove_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method move_item - (of-object "GBookmarkFile") - (c-name "g_bookmark_file_move_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "old_uri") - '("const-gchar*" "new_uri") - '("GError**" "error") - ) -) - - - -;; From gbsearcharray.h - -(define-function if - (c-name "if") - (return-type "else") - (parameters - '("cmp-<" "0") - ) -) - -(define-function MIN - (c-name "MIN") - (return-type "return") - (parameters - '("barray->n_nodes-+" "1") - ) -) - - - -;; From gcache.h - -(define-function g_cache_new - (c-name "g_cache_new") - (is-constructor-of "GCache") - (return-type "GCache*") - (parameters - '("GCacheNewFunc" "value_new_func") - '("GCacheDestroyFunc" "value_destroy_func") - '("GCacheDupFunc" "key_dup_func") - '("GCacheDestroyFunc" "key_destroy_func") - '("GHashFunc" "hash_key_func") - '("GHashFunc" "hash_value_func") - '("GEqualFunc" "key_equal_func") - ) -) - -(define-method destroy - (of-object "GCache") - (c-name "g_cache_destroy") - (return-type "none") -) - -(define-method insert - (of-object "GCache") - (c-name "g_cache_insert") - (return-type "gpointer") - (parameters - '("gpointer" "key") - ) -) - -(define-method remove - (of-object "GCache") - (c-name "g_cache_remove") - (return-type "none") - (parameters - '("gconstpointer" "value") - ) -) - -(define-method key_foreach - (of-object "GCache") - (c-name "g_cache_key_foreach") - (return-type "none") - (parameters - '("GHFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method value_foreach - (of-object "GCache") - (c-name "g_cache_value_foreach") - (return-type "none") - (parameters - '("GHFunc" "func") - '("gpointer" "user_data") - ) -) - - - -;; From gcompletion.h - -(define-function g_completion_new - (c-name "g_completion_new") - (is-constructor-of "GCompletion") - (return-type "GCompletion*") - (parameters - '("GCompletionFunc" "func") - ) -) - -(define-method add_items - (of-object "GCompletion") - (c-name "g_completion_add_items") - (return-type "none") - (parameters - '("GList*" "items") - ) -) - -(define-method remove_items - (of-object "GCompletion") - (c-name "g_completion_remove_items") - (return-type "none") - (parameters - '("GList*" "items") - ) -) - -(define-method clear_items - (of-object "GCompletion") - (c-name "g_completion_clear_items") - (return-type "none") -) - -(define-method complete - (of-object "GCompletion") - (c-name "g_completion_complete") - (return-type "GList*") - (parameters - '("const-gchar*" "prefix") - '("gchar**" "new_prefix") - ) -) - -(define-method complete_utf8 - (of-object "GCompletion") - (c-name "g_completion_complete_utf8") - (return-type "GList*") - (parameters - '("const-gchar*" "prefix") - '("gchar**" "new_prefix") - ) -) - -(define-method set_compare - (of-object "GCompletion") - (c-name "g_completion_set_compare") - (return-type "none") - (parameters - '("GCompletionStrncmpFunc" "strncmp_func") - ) -) - -(define-method free - (of-object "GCompletion") - (c-name "g_completion_free") - (return-type "none") -) - - - -;; From gconvert.h - -(define-function g_convert_error_quark - (c-name "g_convert_error_quark") - (return-type "GQuark") -) - -(define-function g_iconv_open - (c-name "g_iconv_open") - (return-type "GIConv") - (parameters - '("const-gchar*" "to_codeset") - '("const-gchar*" "from_codeset") - ) -) - -(define-method close - (of-object "GIConv") - (c-name "g_iconv_close") - (return-type "gint") -) - -(define-function g_convert - (c-name "g_convert") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - '("const-gchar*" "to_codeset") - '("const-gchar*" "from_codeset") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_convert_with_iconv - (c-name "g_convert_with_iconv") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - '("GIConv" "converter") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_convert_with_fallback - (c-name "g_convert_with_fallback") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - '("const-gchar*" "to_codeset") - '("const-gchar*" "from_codeset") - '("gchar*" "fallback") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_locale_to_utf8 - (c-name "g_locale_to_utf8") - (return-type "gchar*") - (parameters - '("const-gchar*" "opsysstring") - '("gssize" "len") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_locale_from_utf8 - (c-name "g_locale_from_utf8") - (return-type "gchar*") - (parameters - '("const-gchar*" "utf8string") - '("gssize" "len") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_filename_to_utf8 - (c-name "g_filename_to_utf8") - (return-type "gchar*") - (parameters - '("const-gchar*" "opsysstring") - '("gssize" "len") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_filename_from_utf8 - (c-name "g_filename_from_utf8") - (return-type "gchar*") - (parameters - '("const-gchar*" "utf8string") - '("gssize" "len") - '("gsize*" "bytes_read") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-function g_filename_from_uri - (c-name "g_filename_from_uri") - (return-type "gchar*") - (parameters - '("const-gchar*" "uri") - '("gchar**" "hostname") - '("GError**" "error") - ) -) - -(define-function g_filename_to_uri - (c-name "g_filename_to_uri") - (return-type "gchar*") - (parameters - '("const-gchar*" "filename") - '("const-gchar*" "hostname") - '("GError**" "error") - ) -) - -(define-function g_filename_display_name - (c-name "g_filename_display_name") - (return-type "gchar*") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_get_filename_charsets - (c-name "g_get_filename_charsets") - (return-type "gboolean") - (parameters - '("const-gchar***" "charsets") - ) -) - -(define-function g_filename_display_basename - (c-name "g_filename_display_basename") - (return-type "gchar*") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_uri_list_extract_uris - (c-name "g_uri_list_extract_uris") - (return-type "gchar**") - (parameters - '("const-gchar*" "uri_list") - ) -) - - - -;; From gdataset.h - -(define-function g_datalist_init - (c-name "g_datalist_init") - (return-type "none") - (parameters - '("GData**" "datalist") - ) -) - -(define-function g_datalist_clear - (c-name "g_datalist_clear") - (return-type "none") - (parameters - '("GData**" "datalist") - ) -) - -(define-function g_datalist_id_get_data - (c-name "g_datalist_id_get_data") - (return-type "gpointer") - (parameters - '("GData**" "datalist") - '("GQuark" "key_id") - ) -) - -(define-function g_datalist_id_set_data_full - (c-name "g_datalist_id_set_data_full") - (return-type "none") - (parameters - '("GData**" "datalist") - '("GQuark" "key_id") - '("gpointer" "data") - '("GDestroyNotify" "destroy_func") - ) -) - -(define-function g_datalist_id_remove_no_notify - (c-name "g_datalist_id_remove_no_notify") - (return-type "gpointer") - (parameters - '("GData**" "datalist") - '("GQuark" "key_id") - ) -) - -(define-function g_datalist_foreach - (c-name "g_datalist_foreach") - (return-type "none") - (parameters - '("GData**" "datalist") - '("GDataForeachFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-function g_datalist_set_flags - (c-name "g_datalist_set_flags") - (return-type "none") - (parameters - '("GData**" "datalist") - '("guint" "flags") - ) -) - -(define-function g_datalist_unset_flags - (c-name "g_datalist_unset_flags") - (return-type "none") - (parameters - '("GData**" "datalist") - '("guint" "flags") - ) -) - -(define-function g_datalist_get_flags - (c-name "g_datalist_get_flags") - (return-type "guint") - (parameters - '("GData**" "datalist") - ) -) - -(define-function g_dataset_destroy - (c-name "g_dataset_destroy") - (return-type "none") - (parameters - '("gconstpointer" "dataset_location") - ) -) - -(define-function g_dataset_id_get_data - (c-name "g_dataset_id_get_data") - (return-type "gpointer") - (parameters - '("gconstpointer" "dataset_location") - '("GQuark" "key_id") - ) -) - -(define-function g_dataset_id_set_data_full - (c-name "g_dataset_id_set_data_full") - (return-type "none") - (parameters - '("gconstpointer" "dataset_location") - '("GQuark" "key_id") - '("gpointer" "data") - '("GDestroyNotify" "destroy_func") - ) -) - -(define-function g_dataset_id_remove_no_notify - (c-name "g_dataset_id_remove_no_notify") - (return-type "gpointer") - (parameters - '("gconstpointer" "dataset_location") - '("GQuark" "key_id") - ) -) - -(define-function g_dataset_foreach - (c-name "g_dataset_foreach") - (return-type "none") - (parameters - '("gconstpointer" "dataset_location") - '("GDataForeachFunc" "func") - '("gpointer" "user_data") - ) -) - - - -;; From gdatasetprivate.h - - - -;; From gdate.h - -(define-function g_date_new - (c-name "g_date_new") - (is-constructor-of "GDate") - (return-type "GDate*") -) - -(define-function g_date_new_dmy - (c-name "g_date_new_dmy") - (return-type "GDate*") - (parameters - '("GDateDay" "day") - '("GDateMonth" "month") - '("GDateYear" "year") - ) -) - -(define-function g_date_new_julian - (c-name "g_date_new_julian") - (return-type "GDate*") - (parameters - '("guint32" "julian_day") - ) -) - -(define-method free - (of-object "GDate") - (c-name "g_date_free") - (return-type "none") -) - -(define-method valid - (of-object "GDate") - (c-name "g_date_valid") - (return-type "gboolean") -) - -(define-function g_date_valid_day - (c-name "g_date_valid_day") - (return-type "gboolean") - (parameters - '("GDateDay" "day") - ) -) - -(define-function g_date_valid_month - (c-name "g_date_valid_month") - (return-type "gboolean") - (parameters - '("GDateMonth" "month") - ) -) - -(define-function g_date_valid_year - (c-name "g_date_valid_year") - (return-type "gboolean") - (parameters - '("GDateYear" "year") - ) -) - -(define-function g_date_valid_weekday - (c-name "g_date_valid_weekday") - (return-type "gboolean") - (parameters - '("GDateWeekday" "weekday") - ) -) - -(define-function g_date_valid_julian - (c-name "g_date_valid_julian") - (return-type "gboolean") - (parameters - '("guint32" "julian_date") - ) -) - -(define-function g_date_valid_dmy - (c-name "g_date_valid_dmy") - (return-type "gboolean") - (parameters - '("GDateDay" "day") - '("GDateMonth" "month") - '("GDateYear" "year") - ) -) - -(define-method get_weekday - (of-object "GDate") - (c-name "g_date_get_weekday") - (return-type "GDateWeekday") -) - -(define-method get_month - (of-object "GDate") - (c-name "g_date_get_month") - (return-type "GDateMonth") -) - -(define-method get_year - (of-object "GDate") - (c-name "g_date_get_year") - (return-type "GDateYear") -) - -(define-method get_day - (of-object "GDate") - (c-name "g_date_get_day") - (return-type "GDateDay") -) - -(define-method get_julian - (of-object "GDate") - (c-name "g_date_get_julian") - (return-type "guint32") -) - -(define-method get_day_of_year - (of-object "GDate") - (c-name "g_date_get_day_of_year") - (return-type "guint") -) - -(define-method get_monday_week_of_year - (of-object "GDate") - (c-name "g_date_get_monday_week_of_year") - (return-type "guint") -) - -(define-method get_sunday_week_of_year - (of-object "GDate") - (c-name "g_date_get_sunday_week_of_year") - (return-type "guint") -) - -(define-method get_iso8601_week_of_year - (of-object "GDate") - (c-name "g_date_get_iso8601_week_of_year") - (return-type "guint") -) - -(define-method clear - (of-object "GDate") - (c-name "g_date_clear") - (return-type "none") - (parameters - '("guint" "n_dates") - ) -) - -(define-method set_parse - (of-object "GDate") - (c-name "g_date_set_parse") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - -(define-method set_time_t - (of-object "GDate") - (c-name "g_date_set_time_t") - (return-type "none") - (parameters - '("time_t" "timet") - ) -) - -(define-method set_time_val - (of-object "GDate") - (c-name "g_date_set_time_val") - (return-type "none") - (parameters - '("GTimeVal*" "timeval") - ) -) - -(define-method set_time - (of-object "GDate") - (c-name "g_date_set_time") - (return-type "none") - (parameters - '("GTime" "time_") - ) -) - -(define-method set_month - (of-object "GDate") - (c-name "g_date_set_month") - (return-type "none") - (parameters - '("GDateMonth" "month") - ) -) - -(define-method set_day - (of-object "GDate") - (c-name "g_date_set_day") - (return-type "none") - (parameters - '("GDateDay" "day") - ) -) - -(define-method set_year - (of-object "GDate") - (c-name "g_date_set_year") - (return-type "none") - (parameters - '("GDateYear" "year") - ) -) - -(define-method set_dmy - (of-object "GDate") - (c-name "g_date_set_dmy") - (return-type "none") - (parameters - '("GDateDay" "day") - '("GDateMonth" "month") - '("GDateYear" "y") - ) -) - -(define-method set_julian - (of-object "GDate") - (c-name "g_date_set_julian") - (return-type "none") - (parameters - '("guint32" "julian_date") - ) -) - -(define-method is_first_of_month - (of-object "GDate") - (c-name "g_date_is_first_of_month") - (return-type "gboolean") -) - -(define-method is_last_of_month - (of-object "GDate") - (c-name "g_date_is_last_of_month") - (return-type "gboolean") -) - -(define-method add_days - (of-object "GDate") - (c-name "g_date_add_days") - (return-type "none") - (parameters - '("guint" "n_days") - ) -) - -(define-method subtract_days - (of-object "GDate") - (c-name "g_date_subtract_days") - (return-type "none") - (parameters - '("guint" "n_days") - ) -) - -(define-method add_months - (of-object "GDate") - (c-name "g_date_add_months") - (return-type "none") - (parameters - '("guint" "n_months") - ) -) - -(define-method subtract_months - (of-object "GDate") - (c-name "g_date_subtract_months") - (return-type "none") - (parameters - '("guint" "n_months") - ) -) - -(define-method add_years - (of-object "GDate") - (c-name "g_date_add_years") - (return-type "none") - (parameters - '("guint" "n_years") - ) -) - -(define-method subtract_years - (of-object "GDate") - (c-name "g_date_subtract_years") - (return-type "none") - (parameters - '("guint" "n_years") - ) -) - -(define-function g_date_is_leap_year - (c-name "g_date_is_leap_year") - (return-type "gboolean") - (parameters - '("GDateYear" "year") - ) -) - -(define-function g_date_get_days_in_month - (c-name "g_date_get_days_in_month") - (return-type "guint8") - (parameters - '("GDateMonth" "month") - '("GDateYear" "year") - ) -) - -(define-function g_date_get_monday_weeks_in_year - (c-name "g_date_get_monday_weeks_in_year") - (return-type "guint8") - (parameters - '("GDateYear" "year") - ) -) - -(define-function g_date_get_sunday_weeks_in_year - (c-name "g_date_get_sunday_weeks_in_year") - (return-type "guint8") - (parameters - '("GDateYear" "year") - ) -) - -(define-method days_between - (of-object "GDate") - (c-name "g_date_days_between") - (return-type "gint") - (parameters - '("const-GDate*" "date2") - ) -) - -(define-method compare - (of-object "GDate") - (c-name "g_date_compare") - (return-type "gint") - (parameters - '("const-GDate*" "rhs") - ) -) - -(define-method to_struct_tm - (of-object "GDate") - (c-name "g_date_to_struct_tm") - (return-type "none") - (parameters - '("struct-tm*" "tm") - ) -) - -(define-method clamp - (of-object "GDate") - (c-name "g_date_clamp") - (return-type "none") - (parameters - '("const-GDate*" "min_date") - '("const-GDate*" "max_date") - ) -) - -(define-method order - (of-object "GDate") - (c-name "g_date_order") - (return-type "none") - (parameters - '("GDate*" "date2") - ) -) - -(define-function g_date_strftime - (c-name "g_date_strftime") - (return-type "gsize") - (parameters - '("gchar*" "s") - '("gsize" "slen") - '("const-gchar*" "format") - '("const-GDate*" "date") - ) -) - - - -;; From gdebug.h - - - -;; From gdir.h - -(define-function g_dir_open - (c-name "g_dir_open") - (return-type "GDir*") - (parameters - '("const-gchar*" "path") - '("guint" "flags") - '("GError**" "error") - ) -) - -(define-method read_name - (of-object "GDir") - (c-name "g_dir_read_name") - (return-type "const-gchar*") -) - -(define-method rewind - (of-object "GDir") - (c-name "g_dir_rewind") - (return-type "none") -) - -(define-method close - (of-object "GDir") - (c-name "g_dir_close") - (return-type "none") -) - - - -;; From gerror.h - -(define-function g_error_new - (c-name "g_error_new") - (is-constructor-of "GError") - (return-type "GError*") - (parameters - '("GQuark" "domain") - '("gint" "code") - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-function g_error_new_literal - (c-name "g_error_new_literal") - (return-type "GError*") - (parameters - '("GQuark" "domain") - '("gint" "code") - '("const-gchar*" "message") - ) -) - -(define-method free - (of-object "GError") - (c-name "g_error_free") - (return-type "none") -) - -(define-method copy - (of-object "GError") - (c-name "g_error_copy") - (return-type "GError*") -) - -(define-method matches - (of-object "GError") - (c-name "g_error_matches") - (return-type "gboolean") - (parameters - '("GQuark" "domain") - '("gint" "code") - ) -) - -(define-function g_set_error - (c-name "g_set_error") - (return-type "none") - (parameters - '("GError**" "err") - '("GQuark" "domain") - '("gint" "code") - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-function g_propagate_error - (c-name "g_propagate_error") - (return-type "none") - (parameters - '("GError**" "dest") - '("GError*" "src") - ) -) - -(define-function g_clear_error - (c-name "g_clear_error") - (return-type "none") - (parameters - '("GError**" "err") - ) -) - - - -;; From gfileutils.h - -(define-function g_file_error_quark - (c-name "g_file_error_quark") - (return-type "GQuark") -) - -(define-function g_file_error_from_errno - (c-name "g_file_error_from_errno") - (return-type "GFileError") - (parameters - '("gint" "err_no") - ) -) - -(define-function g_file_test - (c-name "g_file_test") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - '("GFileTest" "test") - ) -) - -(define-function g_file_get_contents - (c-name "g_file_get_contents") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - '("gchar**" "contents") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-function g_file_set_contents - (c-name "g_file_set_contents") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - '("const-gchar*" "contents") - '("gssize" "length") - '("GError**" "error") - ) -) - -(define-function g_file_read_link - (c-name "g_file_read_link") - (return-type "gchar*") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-function g_mkstemp - (c-name "g_mkstemp") - (return-type "gint") - (parameters - '("gchar*" "tmpl") - ) -) - -(define-function g_file_open_tmp - (c-name "g_file_open_tmp") - (return-type "gint") - (parameters - '("const-gchar*" "tmpl") - '("gchar**" "name_used") - '("GError**" "error") - ) -) - -(define-function g_build_path - (c-name "g_build_path") - (return-type "gchar*") - (parameters - '("const-gchar*" "separator") - '("const-gchar*" "first_element") - ) - (varargs #t) -) - -(define-function g_build_pathv - (c-name "g_build_pathv") - (return-type "gchar*") - (parameters - '("const-gchar*" "separator") - '("gchar**" "args") - ) -) - -(define-function g_build_filename - (c-name "g_build_filename") - (return-type "gchar*") - (parameters - '("const-gchar*" "first_element") - ) - (varargs #t) -) - -(define-function g_build_filenamev - (c-name "g_build_filenamev") - (return-type "gchar*") - (parameters - '("gchar**" "args") - ) -) - -(define-function g_mkdir_with_parents - (c-name "g_mkdir_with_parents") - (return-type "int") - (parameters - '("const-gchar*" "pathname") - '("int" "mode") - ) -) - - - -;; From ghash.h - -(define-function g_hash_table_new - (c-name "g_hash_table_new") - (is-constructor-of "GHashTable") - (return-type "GHashTable*") - (parameters - '("GHashFunc" "hash_func") - '("GEqualFunc" "key_equal_func") - ) -) - -(define-function g_hash_table_new_full - (c-name "g_hash_table_new_full") - (return-type "GHashTable*") - (parameters - '("GHashFunc" "hash_func") - '("GEqualFunc" "key_equal_func") - '("GDestroyNotify" "key_destroy_func") - '("GDestroyNotify" "value_destroy_func") - ) -) - -(define-method destroy - (of-object "GHashTable") - (c-name "g_hash_table_destroy") - (return-type "none") -) - -(define-method insert - (of-object "GHashTable") - (c-name "g_hash_table_insert") - (return-type "none") - (parameters - '("gpointer" "key") - '("gpointer" "value") - ) -) - -(define-method replace - (of-object "GHashTable") - (c-name "g_hash_table_replace") - (return-type "none") - (parameters - '("gpointer" "key") - '("gpointer" "value") - ) -) - -(define-method remove - (of-object "GHashTable") - (c-name "g_hash_table_remove") - (return-type "gboolean") - (parameters - '("gconstpointer" "key") - ) -) - -(define-method remove_all - (of-object "GHashTable") - (c-name "g_hash_table_remove_all") - (return-type "none") -) - -(define-method steal - (of-object "GHashTable") - (c-name "g_hash_table_steal") - (return-type "gboolean") - (parameters - '("gconstpointer" "key") - ) -) - -(define-method steal_all - (of-object "GHashTable") - (c-name "g_hash_table_steal_all") - (return-type "none") -) - -(define-method lookup - (of-object "GHashTable") - (c-name "g_hash_table_lookup") - (return-type "gpointer") - (parameters - '("gconstpointer" "key") - ) -) - -(define-method lookup_extended - (of-object "GHashTable") - (c-name "g_hash_table_lookup_extended") - (return-type "gboolean") - (parameters - '("gconstpointer" "lookup_key") - '("gpointer*" "orig_key") - '("gpointer*" "value") - ) -) - -(define-method foreach - (of-object "GHashTable") - (c-name "g_hash_table_foreach") - (return-type "none") - (parameters - '("GHFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method find - (of-object "GHashTable") - (c-name "g_hash_table_find") - (return-type "gpointer") - (parameters - '("GHRFunc" "predicate") - '("gpointer" "user_data") - ) -) - -(define-method foreach_remove - (of-object "GHashTable") - (c-name "g_hash_table_foreach_remove") - (return-type "guint") - (parameters - '("GHRFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method foreach_steal - (of-object "GHashTable") - (c-name "g_hash_table_foreach_steal") - (return-type "guint") - (parameters - '("GHRFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method size - (of-object "GHashTable") - (c-name "g_hash_table_size") - (return-type "guint") -) - -(define-method get_keys - (of-object "GHashTable") - (c-name "g_hash_table_get_keys") - (return-type "GList*") -) - -(define-method get_values - (of-object "GHashTable") - (c-name "g_hash_table_get_values") - (return-type "GList*") -) - -(define-method ref - (of-object "GHashTable") - (c-name "g_hash_table_ref") - (return-type "GHashTable*") -) - -(define-method unref - (of-object "GHashTable") - (c-name "g_hash_table_unref") - (return-type "none") -) - -(define-function g_str_equal - (c-name "g_str_equal") - (return-type "gboolean") - (parameters - '("gconstpointer" "v1") - '("gconstpointer" "v2") - ) -) - -(define-function g_str_hash - (c-name "g_str_hash") - (return-type "guint") - (parameters - '("gconstpointer" "v") - ) -) - -(define-function g_int_equal - (c-name "g_int_equal") - (return-type "gboolean") - (parameters - '("gconstpointer" "v1") - '("gconstpointer" "v2") - ) -) - -(define-function g_int_hash - (c-name "g_int_hash") - (return-type "guint") - (parameters - '("gconstpointer" "v") - ) -) - -(define-function g_direct_hash - (c-name "g_direct_hash") - (return-type "guint") - (parameters - '("gconstpointer" "v") - ) -) - -(define-function g_direct_equal - (c-name "g_direct_equal") - (return-type "gboolean") - (parameters - '("gconstpointer" "v1") - '("gconstpointer" "v2") - ) -) - - - -;; From ghook.h - -(define-method init - (of-object "GHookList") - (c-name "g_hook_list_init") - (return-type "none") - (parameters - '("guint" "hook_size") - ) -) - -(define-method clear - (of-object "GHookList") - (c-name "g_hook_list_clear") - (return-type "none") -) - -(define-function g_hook_alloc - (c-name "g_hook_alloc") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - ) -) - -(define-function g_hook_free - (c-name "g_hook_free") - (return-type "none") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - ) -) - -(define-function g_hook_ref - (c-name "g_hook_ref") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - ) -) - -(define-function g_hook_unref - (c-name "g_hook_unref") - (return-type "none") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - ) -) - -(define-function g_hook_destroy - (c-name "g_hook_destroy") - (return-type "gboolean") - (parameters - '("GHookList*" "hook_list") - '("gulong" "hook_id") - ) -) - -(define-function g_hook_destroy_link - (c-name "g_hook_destroy_link") - (return-type "none") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - ) -) - -(define-function g_hook_prepend - (c-name "g_hook_prepend") - (return-type "none") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - ) -) - -(define-function g_hook_insert_before - (c-name "g_hook_insert_before") - (return-type "none") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "sibling") - '("GHook*" "hook") - ) -) - -(define-function g_hook_insert_sorted - (c-name "g_hook_insert_sorted") - (return-type "none") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - '("GHookCompareFunc" "func") - ) -) - -(define-function g_hook_get - (c-name "g_hook_get") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("gulong" "hook_id") - ) -) - -(define-function g_hook_find - (c-name "g_hook_find") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("gboolean" "need_valids") - '("GHookFindFunc" "func") - '("gpointer" "data") - ) -) - -(define-function g_hook_find_data - (c-name "g_hook_find_data") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("gboolean" "need_valids") - '("gpointer" "data") - ) -) - -(define-function g_hook_find_func - (c-name "g_hook_find_func") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("gboolean" "need_valids") - '("gpointer" "func") - ) -) - -(define-function g_hook_find_func_data - (c-name "g_hook_find_func_data") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("gboolean" "need_valids") - '("gpointer" "func") - '("gpointer" "data") - ) -) - -(define-function g_hook_first_valid - (c-name "g_hook_first_valid") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("gboolean" "may_be_in_call") - ) -) - -(define-function g_hook_next_valid - (c-name "g_hook_next_valid") - (return-type "GHook*") - (parameters - '("GHookList*" "hook_list") - '("GHook*" "hook") - '("gboolean" "may_be_in_call") - ) -) - -(define-method compare_ids - (of-object "GHook") - (c-name "g_hook_compare_ids") - (return-type "gint") - (parameters - '("GHook*" "sibling") - ) -) - -(define-method invoke - (of-object "GHookList") - (c-name "g_hook_list_invoke") - (return-type "none") - (parameters - '("gboolean" "may_recurse") - ) -) - -(define-method invoke_check - (of-object "GHookList") - (c-name "g_hook_list_invoke_check") - (return-type "none") - (parameters - '("gboolean" "may_recurse") - ) -) - -(define-method marshal - (of-object "GHookList") - (c-name "g_hook_list_marshal") - (return-type "none") - (parameters - '("gboolean" "may_recurse") - '("GHookMarshaller" "marshaller") - '("gpointer" "marshal_data") - ) -) - -(define-method marshal_check - (of-object "GHookList") - (c-name "g_hook_list_marshal_check") - (return-type "none") - (parameters - '("gboolean" "may_recurse") - '("GHookCheckMarshaller" "marshaller") - '("gpointer" "marshal_data") - ) -) - - - -;; From gi18n.h - - - -;; From gi18n-lib.h - - - -;; From giochannel.h - -(define-method init - (of-object "GIOChannel") - (c-name "g_io_channel_init") - (return-type "none") -) - -(define-method ref - (of-object "GIOChannel") - (c-name "g_io_channel_ref") - (return-type "GIOChannel*") -) - -(define-method unref - (of-object "GIOChannel") - (c-name "g_io_channel_unref") - (return-type "none") -) - -(define-method read - (of-object "GIOChannel") - (c-name "g_io_channel_read") - (return-type "GIOError") - (parameters - '("gchar*" "buf") - '("gsize" "count") - '("gsize*" "bytes_read") - ) -) - -(define-method write - (of-object "GIOChannel") - (c-name "g_io_channel_write") - (return-type "GIOError") - (parameters - '("const-gchar*" "buf") - '("gsize" "count") - '("gsize*" "bytes_written") - ) -) - -(define-method seek - (of-object "GIOChannel") - (c-name "g_io_channel_seek") - (return-type "GIOError") - (parameters - '("gint64" "offset") - '("GSeekType" "type") - ) -) - -(define-method close - (of-object "GIOChannel") - (c-name "g_io_channel_close") - (return-type "none") -) - -(define-method shutdown - (of-object "GIOChannel") - (c-name "g_io_channel_shutdown") - (return-type "GIOStatus") - (parameters - '("gboolean" "flush") - '("GError**" "err") - ) -) - -(define-function g_io_add_watch_full - (c-name "g_io_add_watch_full") - (return-type "guint") - (parameters - '("GIOChannel*" "channel") - '("gint" "priority") - '("GIOCondition" "condition") - '("GIOFunc" "func") - '("gpointer" "user_data") - '("GDestroyNotify" "notify") - ) -) - -(define-function g_io_create_watch - (c-name "g_io_create_watch") - (return-type "GSource*") - (parameters - '("GIOChannel*" "channel") - '("GIOCondition" "condition") - ) -) - -(define-function g_io_add_watch - (c-name "g_io_add_watch") - (return-type "guint") - (parameters - '("GIOChannel*" "channel") - '("GIOCondition" "condition") - '("GIOFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method set_buffer_size - (of-object "GIOChannel") - (c-name "g_io_channel_set_buffer_size") - (return-type "none") - (parameters - '("gsize" "size") - ) -) - -(define-method get_buffer_size - (of-object "GIOChannel") - (c-name "g_io_channel_get_buffer_size") - (return-type "gsize") -) - -(define-method get_buffer_condition - (of-object "GIOChannel") - (c-name "g_io_channel_get_buffer_condition") - (return-type "GIOCondition") -) - -(define-method set_flags - (of-object "GIOChannel") - (c-name "g_io_channel_set_flags") - (return-type "GIOStatus") - (parameters - '("GIOFlags" "flags") - '("GError**" "error") - ) -) - -(define-method get_flags - (of-object "GIOChannel") - (c-name "g_io_channel_get_flags") - (return-type "GIOFlags") -) - -(define-method set_line_term - (of-object "GIOChannel") - (c-name "g_io_channel_set_line_term") - (return-type "none") - (parameters - '("const-gchar*" "line_term") - '("gint" "length") - ) -) - -(define-method get_line_term - (of-object "GIOChannel") - (c-name "g_io_channel_get_line_term") - (return-type "const-gchar*") - (parameters - '("gint*" "length") - ) -) - -(define-method set_buffered - (of-object "GIOChannel") - (c-name "g_io_channel_set_buffered") - (return-type "none") - (parameters - '("gboolean" "buffered") - ) -) - -(define-method get_buffered - (of-object "GIOChannel") - (c-name "g_io_channel_get_buffered") - (return-type "gboolean") -) - -(define-method set_encoding - (of-object "GIOChannel") - (c-name "g_io_channel_set_encoding") - (return-type "GIOStatus") - (parameters - '("const-gchar*" "encoding") - '("GError**" "error") - ) -) - -(define-method get_encoding - (of-object "GIOChannel") - (c-name "g_io_channel_get_encoding") - (return-type "const-gchar*") -) - -(define-method set_close_on_unref - (of-object "GIOChannel") - (c-name "g_io_channel_set_close_on_unref") - (return-type "none") - (parameters - '("gboolean" "do_close") - ) -) - -(define-method get_close_on_unref - (of-object "GIOChannel") - (c-name "g_io_channel_get_close_on_unref") - (return-type "gboolean") -) - -(define-method flush - (of-object "GIOChannel") - (c-name "g_io_channel_flush") - (return-type "GIOStatus") - (parameters - '("GError**" "error") - ) -) - -(define-method read_line - (of-object "GIOChannel") - (c-name "g_io_channel_read_line") - (return-type "GIOStatus") - (parameters - '("gchar**" "str_return") - '("gsize*" "length") - '("gsize*" "terminator_pos") - '("GError**" "error") - ) -) - -(define-method read_line_string - (of-object "GIOChannel") - (c-name "g_io_channel_read_line_string") - (return-type "GIOStatus") - (parameters - '("GString*" "buffer") - '("gsize*" "terminator_pos") - '("GError**" "error") - ) -) - -(define-method read_to_end - (of-object "GIOChannel") - (c-name "g_io_channel_read_to_end") - (return-type "GIOStatus") - (parameters - '("gchar**" "str_return") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method read_chars - (of-object "GIOChannel") - (c-name "g_io_channel_read_chars") - (return-type "GIOStatus") - (parameters - '("gchar*" "buf") - '("gsize" "count") - '("gsize*" "bytes_read") - '("GError**" "error") - ) -) - -(define-method read_unichar - (of-object "GIOChannel") - (c-name "g_io_channel_read_unichar") - (return-type "GIOStatus") - (parameters - '("gunichar*" "thechar") - '("GError**" "error") - ) -) - -(define-method write_chars - (of-object "GIOChannel") - (c-name "g_io_channel_write_chars") - (return-type "GIOStatus") - (parameters - '("const-gchar*" "buf") - '("gssize" "count") - '("gsize*" "bytes_written") - '("GError**" "error") - ) -) - -(define-method write_unichar - (of-object "GIOChannel") - (c-name "g_io_channel_write_unichar") - (return-type "GIOStatus") - (parameters - '("gunichar" "thechar") - '("GError**" "error") - ) -) - -(define-method seek_position - (of-object "GIOChannel") - (c-name "g_io_channel_seek_position") - (return-type "GIOStatus") - (parameters - '("gint64" "offset") - '("GSeekType" "type") - '("GError**" "error") - ) -) - -(define-function g_io_channel_new_file - (c-name "g_io_channel_new_file") - (return-type "GIOChannel*") - (parameters - '("const-gchar*" "filename") - '("const-gchar*" "mode") - '("GError**" "error") - ) -) - -(define-function g_io_channel_error_quark - (c-name "g_io_channel_error_quark") - (return-type "GQuark") -) - -(define-function g_io_channel_error_from_errno - (c-name "g_io_channel_error_from_errno") - (return-type "GIOChannelError") - (parameters - '("gint" "en") - ) -) - -(define-function g_io_channel_unix_new - (c-name "g_io_channel_unix_new") - (is-constructor-of "GIoChannelUnix") - (return-type "GIOChannel*") - (parameters - '("int" "fd") - ) -) - -(define-method unix_get_fd - (of-object "GIOChannel") - (c-name "g_io_channel_unix_get_fd") - (return-type "gint") -) - -(define-method win32_make_pollfd - (of-object "GIOChannel") - (c-name "g_io_channel_win32_make_pollfd") - (return-type "none") - (parameters - '("GIOCondition" "condition") - '("GPollFD*" "fd") - ) -) - -(define-function g_io_channel_win32_poll - (c-name "g_io_channel_win32_poll") - (return-type "gint") - (parameters - '("GPollFD*" "fds") - '("gint" "n_fds") - '("gint" "timeout_") - ) -) - -(define-function g_io_channel_win32_new_messages - (c-name "g_io_channel_win32_new_messages") - (return-type "GIOChannel*") - (parameters - '("guint" "hwnd") - ) -) - -(define-function g_io_channel_win32_new_fd - (c-name "g_io_channel_win32_new_fd") - (return-type "GIOChannel*") - (parameters - '("gint" "fd") - ) -) - -(define-method win32_get_fd - (of-object "GIOChannel") - (c-name "g_io_channel_win32_get_fd") - (return-type "gint") -) - -(define-function g_io_channel_win32_new_socket - (c-name "g_io_channel_win32_new_socket") - (return-type "GIOChannel*") - (parameters - '("gint" "socket") - ) -) - - - -;; From gkeyfile.h - -(define-function g_key_file_error_quark - (c-name "g_key_file_error_quark") - (return-type "GQuark") -) - -(define-function g_key_file_new - (c-name "g_key_file_new") - (is-constructor-of "GKeyFile") - (return-type "GKeyFile*") -) - -(define-method free - (of-object "GKeyFile") - (c-name "g_key_file_free") - (return-type "none") -) - -(define-method set_list_separator - (of-object "GKeyFile") - (c-name "g_key_file_set_list_separator") - (return-type "none") - (parameters - '("gchar" "separator") - ) -) - -(define-method load_from_file - (of-object "GKeyFile") - (c-name "g_key_file_load_from_file") - (return-type "gboolean") - (parameters - '("const-gchar*" "file") - '("GKeyFileFlags" "flags") - '("GError**" "error") - ) -) - -(define-method load_from_data - (of-object "GKeyFile") - (c-name "g_key_file_load_from_data") - (return-type "gboolean") - (parameters - '("const-gchar*" "data") - '("gsize" "length") - '("GKeyFileFlags" "flags") - '("GError**" "error") - ) -) - -(define-method load_from_dirs - (of-object "GKeyFile") - (c-name "g_key_file_load_from_dirs") - (return-type "gboolean") - (parameters - '("const-gchar*" "file") - '("const-gchar**" "search_dirs") - '("gchar**" "full_path") - '("GKeyFileFlags" "flags") - '("GError**" "error") - ) -) - -(define-method load_from_data_dirs - (of-object "GKeyFile") - (c-name "g_key_file_load_from_data_dirs") - (return-type "gboolean") - (parameters - '("const-gchar*" "file") - '("gchar**" "full_path") - '("GKeyFileFlags" "flags") - '("GError**" "error") - ) -) - -(define-method to_data - (of-object "GKeyFile") - (c-name "g_key_file_to_data") - (return-type "gchar*") - (parameters - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method get_start_group - (of-object "GKeyFile") - (c-name "g_key_file_get_start_group") - (return-type "gchar*") -) - -(define-method get_groups - (of-object "GKeyFile") - (c-name "g_key_file_get_groups") - (return-type "gchar**") - (parameters - '("gsize*" "length") - ) -) - -(define-method get_keys - (of-object "GKeyFile") - (c-name "g_key_file_get_keys") - (return-type "gchar**") - (parameters - '("const-gchar*" "group_name") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method has_group - (of-object "GKeyFile") - (c-name "g_key_file_has_group") - (return-type "gboolean") - (parameters - '("const-gchar*" "group_name") - ) -) - -(define-method has_key - (of-object "GKeyFile") - (c-name "g_key_file_has_key") - (return-type "gboolean") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method get_value - (of-object "GKeyFile") - (c-name "g_key_file_get_value") - (return-type "gchar*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method set_value - (of-object "GKeyFile") - (c-name "g_key_file_set_value") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "value") - ) -) - -(define-method get_string - (of-object "GKeyFile") - (c-name "g_key_file_get_string") - (return-type "gchar*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method set_string - (of-object "GKeyFile") - (c-name "g_key_file_set_string") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "string") - ) -) - -(define-method get_locale_string - (of-object "GKeyFile") - (c-name "g_key_file_get_locale_string") - (return-type "gchar*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "locale") - '("GError**" "error") - ) -) - -(define-method set_locale_string - (of-object "GKeyFile") - (c-name "g_key_file_set_locale_string") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "locale") - '("const-gchar*" "string") - ) -) - -(define-method get_boolean - (of-object "GKeyFile") - (c-name "g_key_file_get_boolean") - (return-type "gboolean") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method set_boolean - (of-object "GKeyFile") - (c-name "g_key_file_set_boolean") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gboolean" "value") - ) -) - -(define-method get_integer - (of-object "GKeyFile") - (c-name "g_key_file_get_integer") - (return-type "gint") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method set_integer - (of-object "GKeyFile") - (c-name "g_key_file_set_integer") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gint" "value") - ) -) - -(define-method get_double - (of-object "GKeyFile") - (c-name "g_key_file_get_double") - (return-type "gdouble") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method set_double - (of-object "GKeyFile") - (c-name "g_key_file_set_double") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gdouble" "value") - ) -) - -(define-method get_string_list - (of-object "GKeyFile") - (c-name "g_key_file_get_string_list") - (return-type "gchar**") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method set_string_list - (of-object "GKeyFile") - (c-name "g_key_file_set_string_list") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*-const[]" "list") - '("gsize" "length") - ) -) - -(define-method get_locale_string_list - (of-object "GKeyFile") - (c-name "g_key_file_get_locale_string_list") - (return-type "gchar**") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "locale") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method set_locale_string_list - (of-object "GKeyFile") - (c-name "g_key_file_set_locale_string_list") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "locale") - '("const-gchar*-const[]" "list") - '("gsize" "length") - ) -) - -(define-method get_boolean_list - (of-object "GKeyFile") - (c-name "g_key_file_get_boolean_list") - (return-type "gboolean*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method set_boolean_list - (of-object "GKeyFile") - (c-name "g_key_file_set_boolean_list") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gboolean[]" "list") - '("gsize" "length") - ) -) - -(define-method get_integer_list - (of-object "GKeyFile") - (c-name "g_key_file_get_integer_list") - (return-type "gint*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method set_double_list - (of-object "GKeyFile") - (c-name "g_key_file_set_double_list") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gdouble[]" "list") - '("gsize" "length") - ) -) - -(define-method get_double_list - (of-object "GKeyFile") - (c-name "g_key_file_get_double_list") - (return-type "gdouble*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gsize*" "length") - '("GError**" "error") - ) -) - -(define-method set_integer_list - (of-object "GKeyFile") - (c-name "g_key_file_set_integer_list") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("gint[]" "list") - '("gsize" "length") - ) -) - -(define-method set_comment - (of-object "GKeyFile") - (c-name "g_key_file_set_comment") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("const-gchar*" "comment") - '("GError**" "error") - ) -) - -(define-method get_comment - (of-object "GKeyFile") - (c-name "g_key_file_get_comment") - (return-type "gchar*") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method remove_comment - (of-object "GKeyFile") - (c-name "g_key_file_remove_comment") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method remove_key - (of-object "GKeyFile") - (c-name "g_key_file_remove_key") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("const-gchar*" "key") - '("GError**" "error") - ) -) - -(define-method remove_group - (of-object "GKeyFile") - (c-name "g_key_file_remove_group") - (return-type "none") - (parameters - '("const-gchar*" "group_name") - '("GError**" "error") - ) -) - - - -;; From glib.h - - - -;; From glibintl.h - - - -;; From glib-object.h - - - -;; From glist.h - -(define-function g_list_alloc - (c-name "g_list_alloc") - (return-type "GList*") -) - -(define-method free - (of-object "GList") - (c-name "g_list_free") - (return-type "none") -) - -(define-method free_1 - (of-object "GList") - (c-name "g_list_free_1") - (return-type "none") -) - -(define-method append - (of-object "GList") - (c-name "g_list_append") - (return-type "GList*") - (parameters - '("gpointer" "data") - ) -) - -(define-method prepend - (of-object "GList") - (c-name "g_list_prepend") - (return-type "GList*") - (parameters - '("gpointer" "data") - ) -) - -(define-method insert - (of-object "GList") - (c-name "g_list_insert") - (return-type "GList*") - (parameters - '("gpointer" "data") - '("gint" "position") - ) -) - -(define-method insert_sorted - (of-object "GList") - (c-name "g_list_insert_sorted") - (return-type "GList*") - (parameters - '("gpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method insert_sorted_with_data - (of-object "GList") - (c-name "g_list_insert_sorted_with_data") - (return-type "GList*") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method insert_before - (of-object "GList") - (c-name "g_list_insert_before") - (return-type "GList*") - (parameters - '("GList*" "sibling") - '("gpointer" "data") - ) -) - -(define-method concat - (of-object "GList") - (c-name "g_list_concat") - (return-type "GList*") - (parameters - '("GList*" "list2") - ) -) - -(define-method remove - (of-object "GList") - (c-name "g_list_remove") - (return-type "GList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method remove_all - (of-object "GList") - (c-name "g_list_remove_all") - (return-type "GList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method remove_link - (of-object "GList") - (c-name "g_list_remove_link") - (return-type "GList*") - (parameters - '("GList*" "llink") - ) -) - -(define-method delete_link - (of-object "GList") - (c-name "g_list_delete_link") - (return-type "GList*") - (parameters - '("GList*" "link_") - ) -) - -(define-method reverse - (of-object "GList") - (c-name "g_list_reverse") - (return-type "GList*") -) - -(define-method copy - (of-object "GList") - (c-name "g_list_copy") - (return-type "GList*") -) - -(define-method nth - (of-object "GList") - (c-name "g_list_nth") - (return-type "GList*") - (parameters - '("guint" "n") - ) -) - -(define-method nth_prev - (of-object "GList") - (c-name "g_list_nth_prev") - (return-type "GList*") - (parameters - '("guint" "n") - ) -) - -(define-method find - (of-object "GList") - (c-name "g_list_find") - (return-type "GList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method find_custom - (of-object "GList") - (c-name "g_list_find_custom") - (return-type "GList*") - (parameters - '("gconstpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method position - (of-object "GList") - (c-name "g_list_position") - (return-type "gint") - (parameters - '("GList*" "llink") - ) -) - -(define-method index - (of-object "GList") - (c-name "g_list_index") - (return-type "gint") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method last - (of-object "GList") - (c-name "g_list_last") - (return-type "GList*") -) - -(define-method first - (of-object "GList") - (c-name "g_list_first") - (return-type "GList*") -) - -(define-method length - (of-object "GList") - (c-name "g_list_length") - (return-type "guint") -) - -(define-method foreach - (of-object "GList") - (c-name "g_list_foreach") - (return-type "none") - (parameters - '("GFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method sort - (of-object "GList") - (c-name "g_list_sort") - (return-type "GList*") - (parameters - '("GCompareFunc" "compare_func") - ) -) - -(define-method sort_with_data - (of-object "GList") - (c-name "g_list_sort_with_data") - (return-type "GList*") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - -(define-method nth_data - (of-object "GList") - (c-name "g_list_nth_data") - (return-type "gpointer") - (parameters - '("guint" "n") - ) -) - -(define-function g_list_push_allocator - (c-name "g_list_push_allocator") - (return-type "none") - (parameters - '("gpointer" "allocator") - ) -) - -(define-function g_list_pop_allocator - (c-name "g_list_pop_allocator") - (return-type "none") -) - - - -;; From gmacros.h - - - -;; From gmain.h - -(define-function g_main_context_new - (c-name "g_main_context_new") - (is-constructor-of "GMainContext") - (return-type "GMainContext*") -) - -(define-method ref - (of-object "GMainContext") - (c-name "g_main_context_ref") - (return-type "GMainContext*") -) - -(define-method unref - (of-object "GMainContext") - (c-name "g_main_context_unref") - (return-type "none") -) - -(define-function g_main_context_default - (c-name "g_main_context_default") - (return-type "GMainContext*") -) - -(define-method iteration - (of-object "GMainContext") - (c-name "g_main_context_iteration") - (return-type "gboolean") - (parameters - '("gboolean" "may_block") - ) -) - -(define-method pending - (of-object "GMainContext") - (c-name "g_main_context_pending") - (return-type "gboolean") -) - -(define-method find_source_by_id - (of-object "GMainContext") - (c-name "g_main_context_find_source_by_id") - (return-type "GSource*") - (parameters - '("guint" "source_id") - ) -) - -(define-method find_source_by_user_data - (of-object "GMainContext") - (c-name "g_main_context_find_source_by_user_data") - (return-type "GSource*") - (parameters - '("gpointer" "user_data") - ) -) - -(define-method find_source_by_funcs_user_data - (of-object "GMainContext") - (c-name "g_main_context_find_source_by_funcs_user_data") - (return-type "GSource*") - (parameters - '("GSourceFuncs*" "funcs") - '("gpointer" "user_data") - ) -) - -(define-method wakeup - (of-object "GMainContext") - (c-name "g_main_context_wakeup") - (return-type "none") -) - -(define-method acquire - (of-object "GMainContext") - (c-name "g_main_context_acquire") - (return-type "gboolean") -) - -(define-method release - (of-object "GMainContext") - (c-name "g_main_context_release") - (return-type "none") -) - -(define-method is_owner - (of-object "GMainContext") - (c-name "g_main_context_is_owner") - (return-type "gboolean") -) - -(define-method wait - (of-object "GMainContext") - (c-name "g_main_context_wait") - (return-type "gboolean") - (parameters - '("GCond*" "cond") - '("GMutex*" "mutex") - ) -) - -(define-method prepare - (of-object "GMainContext") - (c-name "g_main_context_prepare") - (return-type "gboolean") - (parameters - '("gint*" "priority") - ) -) - -(define-method query - (of-object "GMainContext") - (c-name "g_main_context_query") - (return-type "gint") - (parameters - '("gint" "max_priority") - '("gint*" "timeout_") - '("GPollFD*" "fds") - '("gint" "n_fds") - ) -) - -(define-method check - (of-object "GMainContext") - (c-name "g_main_context_check") - (return-type "gint") - (parameters - '("gint" "max_priority") - '("GPollFD*" "fds") - '("gint" "n_fds") - ) -) - -(define-method dispatch - (of-object "GMainContext") - (c-name "g_main_context_dispatch") - (return-type "none") -) - -(define-method set_poll_func - (of-object "GMainContext") - (c-name "g_main_context_set_poll_func") - (return-type "none") - (parameters - '("GPollFunc" "func") - ) -) - -(define-method get_poll_func - (of-object "GMainContext") - (c-name "g_main_context_get_poll_func") - (return-type "GPollFunc") -) - -(define-method add_poll - (of-object "GMainContext") - (c-name "g_main_context_add_poll") - (return-type "none") - (parameters - '("GPollFD*" "fd") - '("gint" "priority") - ) -) - -(define-method remove_poll - (of-object "GMainContext") - (c-name "g_main_context_remove_poll") - (return-type "none") - (parameters - '("GPollFD*" "fd") - ) -) - -(define-function g_main_depth - (c-name "g_main_depth") - (return-type "gint") -) - -(define-function g_main_current_source - (c-name "g_main_current_source") - (return-type "GSource*") -) - -(define-function g_main_loop_new - (c-name "g_main_loop_new") - (is-constructor-of "GMainLoop") - (return-type "GMainLoop*") - (parameters - '("GMainContext*" "context") - '("gboolean" "is_running") - ) -) - -(define-method run - (of-object "GMainLoop") - (c-name "g_main_loop_run") - (return-type "none") -) - -(define-method quit - (of-object "GMainLoop") - (c-name "g_main_loop_quit") - (return-type "none") -) - -(define-method ref - (of-object "GMainLoop") - (c-name "g_main_loop_ref") - (return-type "GMainLoop*") -) - -(define-method unref - (of-object "GMainLoop") - (c-name "g_main_loop_unref") - (return-type "none") -) - -(define-method is_running - (of-object "GMainLoop") - (c-name "g_main_loop_is_running") - (return-type "gboolean") -) - -(define-method get_context - (of-object "GMainLoop") - (c-name "g_main_loop_get_context") - (return-type "GMainContext*") -) - -(define-function g_source_new - (c-name "g_source_new") - (is-constructor-of "GSource") - (return-type "GSource*") - (parameters - '("GSourceFuncs*" "source_funcs") - '("guint" "struct_size") - ) -) - -(define-method ref - (of-object "GSource") - (c-name "g_source_ref") - (return-type "GSource*") -) - -(define-method unref - (of-object "GSource") - (c-name "g_source_unref") - (return-type "none") -) - -(define-method attach - (of-object "GSource") - (c-name "g_source_attach") - (return-type "guint") - (parameters - '("GMainContext*" "context") - ) -) - -(define-method destroy - (of-object "GSource") - (c-name "g_source_destroy") - (return-type "none") -) - -(define-method set_priority - (of-object "GSource") - (c-name "g_source_set_priority") - (return-type "none") - (parameters - '("gint" "priority") - ) -) - -(define-method get_priority - (of-object "GSource") - (c-name "g_source_get_priority") - (return-type "gint") -) - -(define-method set_can_recurse - (of-object "GSource") - (c-name "g_source_set_can_recurse") - (return-type "none") - (parameters - '("gboolean" "can_recurse") - ) -) - -(define-method get_can_recurse - (of-object "GSource") - (c-name "g_source_get_can_recurse") - (return-type "gboolean") -) - -(define-method get_id - (of-object "GSource") - (c-name "g_source_get_id") - (return-type "guint") -) - -(define-method get_context - (of-object "GSource") - (c-name "g_source_get_context") - (return-type "GMainContext*") -) - -(define-method set_callback - (of-object "GSource") - (c-name "g_source_set_callback") - (return-type "none") - (parameters - '("GSourceFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-method set_funcs - (of-object "GSource") - (c-name "g_source_set_funcs") - (return-type "none") - (parameters - '("GSourceFuncs*" "funcs") - ) -) - -(define-method is_destroyed - (of-object "GSource") - (c-name "g_source_is_destroyed") - (return-type "gboolean") -) - -(define-method set_callback_indirect - (of-object "GSource") - (c-name "g_source_set_callback_indirect") - (return-type "none") - (parameters - '("gpointer" "callback_data") - '("GSourceCallbackFuncs*" "callback_funcs") - ) -) - -(define-method add_poll - (of-object "GSource") - (c-name "g_source_add_poll") - (return-type "none") - (parameters - '("GPollFD*" "fd") - ) -) - -(define-method remove_poll - (of-object "GSource") - (c-name "g_source_remove_poll") - (return-type "none") - (parameters - '("GPollFD*" "fd") - ) -) - -(define-method get_current_time - (of-object "GSource") - (c-name "g_source_get_current_time") - (return-type "none") - (parameters - '("GTimeVal*" "timeval") - ) -) - -(define-function g_idle_source_new - (c-name "g_idle_source_new") - (is-constructor-of "GIdleSource") - (return-type "GSource*") -) - -(define-function g_child_watch_source_new - (c-name "g_child_watch_source_new") - (is-constructor-of "GChildWatchSource") - (return-type "GSource*") - (parameters - '("GPid" "pid") - ) -) - -(define-function g_timeout_source_new - (c-name "g_timeout_source_new") - (is-constructor-of "GTimeoutSource") - (return-type "GSource*") - (parameters - '("guint" "interval") - ) -) - -(define-function g_timeout_source_new_seconds - (c-name "g_timeout_source_new_seconds") - (return-type "GSource*") - (parameters - '("guint" "interval") - ) -) - -(define-function g_get_current_time - (c-name "g_get_current_time") - (return-type "none") - (parameters - '("GTimeVal*" "result") - ) -) - -(define-function g_source_remove - (c-name "g_source_remove") - (return-type "gboolean") - (parameters - '("guint" "tag") - ) -) - -(define-function g_source_remove_by_user_data - (c-name "g_source_remove_by_user_data") - (return-type "gboolean") - (parameters - '("gpointer" "user_data") - ) -) - -(define-function g_source_remove_by_funcs_user_data - (c-name "g_source_remove_by_funcs_user_data") - (return-type "gboolean") - (parameters - '("GSourceFuncs*" "funcs") - '("gpointer" "user_data") - ) -) - -(define-function g_timeout_add_full - (c-name "g_timeout_add_full") - (return-type "guint") - (parameters - '("gint" "priority") - '("guint" "interval") - '("GSourceFunc" "function") - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-function g_timeout_add - (c-name "g_timeout_add") - (return-type "guint") - (parameters - '("guint" "interval") - '("GSourceFunc" "function") - '("gpointer" "data") - ) -) - -(define-function g_timeout_add_seconds - (c-name "g_timeout_add_seconds") - (return-type "guint") - (parameters - '("guint" "interval") - '("GSourceFunc" "function") - '("gpointer" "data") - ) -) - -(define-function g_child_watch_add_full - (c-name "g_child_watch_add_full") - (return-type "guint") - (parameters - '("gint" "priority") - '("GPid" "pid") - '("GChildWatchFunc" "function") - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-function g_child_watch_add - (c-name "g_child_watch_add") - (return-type "guint") - (parameters - '("GPid" "pid") - '("GChildWatchFunc" "function") - '("gpointer" "data") - ) -) - -(define-function g_idle_add - (c-name "g_idle_add") - (return-type "guint") - (parameters - '("GSourceFunc" "function") - '("gpointer" "data") - ) -) - -(define-function g_idle_add_full - (c-name "g_idle_add_full") - (return-type "guint") - (parameters - '("gint" "priority") - '("GSourceFunc" "function") - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-function g_idle_remove_by_data - (c-name "g_idle_remove_by_data") - (return-type "gboolean") - (parameters - '("gpointer" "data") - ) -) - - - -;; From gmappedfile.h - -(define-function g_mapped_file_new - (c-name "g_mapped_file_new") - (is-constructor-of "GMappedFile") - (return-type "GMappedFile*") - (parameters - '("const-gchar*" "filename") - '("gboolean" "writable") - '("GError**" "error") - ) -) - -(define-method get_length - (of-object "GMappedFile") - (c-name "g_mapped_file_get_length") - (return-type "gsize") -) - -(define-method get_contents - (of-object "GMappedFile") - (c-name "g_mapped_file_get_contents") - (return-type "gchar*") -) - -(define-method free - (of-object "GMappedFile") - (c-name "g_mapped_file_free") - (return-type "none") -) - - - -;; From gmarkup.h - -(define-function g_markup_error_quark - (c-name "g_markup_error_quark") - (return-type "GQuark") -) - -(define-function g_markup_parse_context_new - (c-name "g_markup_parse_context_new") - (is-constructor-of "GMarkupParseContext") - (return-type "GMarkupParseContext*") - (parameters - '("const-GMarkupParser*" "parser") - '("GMarkupParseFlags" "flags") - '("gpointer" "user_data") - '("GDestroyNotify" "user_data_dnotify") - ) -) - -(define-method free - (of-object "GMarkupParseContext") - (c-name "g_markup_parse_context_free") - (return-type "none") -) - -(define-method parse - (of-object "GMarkupParseContext") - (c-name "g_markup_parse_context_parse") - (return-type "gboolean") - (parameters - '("const-gchar*" "text") - '("gssize" "text_len") - '("GError**" "error") - ) -) - -(define-method end_parse - (of-object "GMarkupParseContext") - (c-name "g_markup_parse_context_end_parse") - (return-type "gboolean") - (parameters - '("GError**" "error") - ) -) - -(define-method get_element - (of-object "GMarkupParseContext") - (c-name "g_markup_parse_context_get_element") - (return-type "const-gchar*") -) - -(define-method get_position - (of-object "GMarkupParseContext") - (c-name "g_markup_parse_context_get_position") - (return-type "none") - (parameters - '("gint*" "line_number") - '("gint*" "char_number") - ) -) - -(define-function g_markup_escape_text - (c-name "g_markup_escape_text") - (return-type "gchar*") - (parameters - '("const-gchar*" "text") - '("gssize" "length") - ) -) - -(define-function g_markup_printf_escaped - (c-name "g_markup_printf_escaped") - (return-type "gchar*") - (parameters - '("const-char*" "format") - ) - (varargs #t) -) - -(define-function g_markup_vprintf_escaped - (c-name "g_markup_vprintf_escaped") - (return-type "gchar*") - (parameters - '("const-char*" "format") - '("va_list" "args") - ) -) - - - -;; From gmem.h - -(define-function g_malloc - (c-name "g_malloc") - (return-type "gpointer") - (parameters - '("gulong" "n_bytes") - ) -) - -(define-function g_malloc0 - (c-name "g_malloc0") - (return-type "gpointer") - (parameters - '("gulong" "n_bytes") - ) -) - -(define-function g_realloc - (c-name "g_realloc") - (return-type "gpointer") - (parameters - '("gpointer" "mem") - '("gulong" "n_bytes") - ) -) - -(define-function g_free - (c-name "g_free") - (return-type "none") - (parameters - '("gpointer" "mem") - ) -) - -(define-function g_try_malloc - (c-name "g_try_malloc") - (return-type "gpointer") - (parameters - '("gulong" "n_bytes") - ) -) - -(define-function g_try_malloc0 - (c-name "g_try_malloc0") - (return-type "gpointer") - (parameters - '("gulong" "n_bytes") - ) -) - -(define-function g_try_realloc - (c-name "g_try_realloc") - (return-type "gpointer") - (parameters - '("gpointer" "mem") - '("gulong" "n_bytes") - ) -) - -(define-function g_mem_set_vtable - (c-name "g_mem_set_vtable") - (return-type "none") - (parameters - '("GMemVTable*" "vtable") - ) -) - -(define-function g_mem_is_system_malloc - (c-name "g_mem_is_system_malloc") - (return-type "gboolean") -) - -(define-function g_mem_profile - (c-name "g_mem_profile") - (return-type "none") -) - -(define-function g_mem_chunk_new - (c-name "g_mem_chunk_new") - (is-constructor-of "GMemChunk") - (return-type "GMemChunk*") - (parameters - '("const-gchar*" "name") - '("gint" "atom_size") - '("gulong" "area_size") - '("gint" "type") - ) -) - -(define-method destroy - (of-object "GMemChunk") - (c-name "g_mem_chunk_destroy") - (return-type "none") -) - -(define-method alloc - (of-object "GMemChunk") - (c-name "g_mem_chunk_alloc") - (return-type "gpointer") -) - -(define-method alloc0 - (of-object "GMemChunk") - (c-name "g_mem_chunk_alloc0") - (return-type "gpointer") -) - -(define-method free - (of-object "GMemChunk") - (c-name "g_mem_chunk_free") - (return-type "none") - (parameters - '("gpointer" "mem") - ) -) - -(define-method clean - (of-object "GMemChunk") - (c-name "g_mem_chunk_clean") - (return-type "none") -) - -(define-method reset - (of-object "GMemChunk") - (c-name "g_mem_chunk_reset") - (return-type "none") -) - -(define-method print - (of-object "GMemChunk") - (c-name "g_mem_chunk_print") - (return-type "none") -) - -(define-function g_mem_chunk_info - (c-name "g_mem_chunk_info") - (return-type "none") -) - -(define-function g_blow_chunks - (c-name "g_blow_chunks") - (return-type "none") -) - -(define-function g_allocator_new - (c-name "g_allocator_new") - (is-constructor-of "GAllocator") - (return-type "GAllocator*") - (parameters - '("const-gchar*" "name") - '("guint" "n_preallocs") - ) -) - -(define-method free - (of-object "GAllocator") - (c-name "g_allocator_free") - (return-type "none") -) - - - -;; From gmessages.h - -(define-function g_printf_string_upper_bound - (c-name "g_printf_string_upper_bound") - (return-type "gsize") - (parameters - '("const-gchar*" "format") - '("va_list" "args") - ) -) - -(define-function g_log_set_handler - (c-name "g_log_set_handler") - (return-type "guint") - (parameters - '("const-gchar*" "log_domain") - '("GLogLevelFlags" "log_levels") - '("GLogFunc" "log_func") - '("gpointer" "user_data") - ) -) - -(define-function g_log_remove_handler - (c-name "g_log_remove_handler") - (return-type "none") - (parameters - '("const-gchar*" "log_domain") - '("guint" "handler_id") - ) -) - -(define-function g_log_default_handler - (c-name "g_log_default_handler") - (return-type "none") - (parameters - '("const-gchar*" "log_domain") - '("GLogLevelFlags" "log_level") - '("const-gchar*" "message") - '("gpointer" "unused_data") - ) -) - -(define-function g_log_set_default_handler - (c-name "g_log_set_default_handler") - (return-type "GLogFunc") - (parameters - '("GLogFunc" "log_func") - '("gpointer" "user_data") - ) -) - -(define-function g_log - (c-name "g_log") - (return-type "none") - (parameters - '("const-gchar*" "log_domain") - '("GLogLevelFlags" "log_level") - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-function g_logv - (c-name "g_logv") - (return-type "none") - (parameters - '("const-gchar*" "log_domain") - '("GLogLevelFlags" "log_level") - '("const-gchar*" "format") - '("va_list" "args") - ) -) - -(define-function g_log_set_fatal_mask - (c-name "g_log_set_fatal_mask") - (return-type "GLogLevelFlags") - (parameters - '("const-gchar*" "log_domain") - '("GLogLevelFlags" "fatal_mask") - ) -) - -(define-function g_log_set_always_fatal - (c-name "g_log_set_always_fatal") - (return-type "GLogLevelFlags") - (parameters - '("GLogLevelFlags" "fatal_mask") - ) -) - -(define-function g_return_if_fail_warning - (c-name "g_return_if_fail_warning") - (return-type "none") - (parameters - '("const-char*" "log_domain") - '("const-char*" "pretty_function") - '("const-char*" "expression") - ) -) - -(define-function g_assert_warning - (c-name "g_assert_warning") - (return-type "none") - (parameters - '("const-char*" "log_domain") - '("const-char*" "file") - '("const-int" "line") - '("const-char*" "pretty_function") - '("const-char*" "expression") - ) -) - -(define-function g_set_print_handler - (c-name "g_set_print_handler") - (return-type "GPrintFunc") - (parameters - '("GPrintFunc" "func") - ) -) - -(define-function g_printerr - (c-name "g_printerr") - (return-type "none") - (parameters - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-function g_set_printerr_handler - (c-name "g_set_printerr_handler") - (return-type "GPrintFunc") - (parameters - '("GPrintFunc" "func") - ) -) - - - -;; From gmirroringtable.h - - - -;; From gnode.h - -(define-function g_node_new - (c-name "g_node_new") - (is-constructor-of "GNode") - (return-type "GNode*") - (parameters - '("gpointer" "data") - ) -) - -(define-method destroy - (of-object "GNode") - (c-name "g_node_destroy") - (return-type "none") -) - -(define-method unlink - (of-object "GNode") - (c-name "g_node_unlink") - (return-type "none") -) - -(define-method copy_deep - (of-object "GNode") - (c-name "g_node_copy_deep") - (return-type "GNode*") - (parameters - '("GCopyFunc" "copy_func") - '("gpointer" "data") - ) -) - -(define-method copy - (of-object "GNode") - (c-name "g_node_copy") - (return-type "GNode*") -) - -(define-method insert - (of-object "GNode") - (c-name "g_node_insert") - (return-type "GNode*") - (parameters - '("gint" "position") - '("GNode*" "node") - ) -) - -(define-method insert_before - (of-object "GNode") - (c-name "g_node_insert_before") - (return-type "GNode*") - (parameters - '("GNode*" "sibling") - '("GNode*" "node") - ) -) - -(define-method insert_after - (of-object "GNode") - (c-name "g_node_insert_after") - (return-type "GNode*") - (parameters - '("GNode*" "sibling") - '("GNode*" "node") - ) -) - -(define-method prepend - (of-object "GNode") - (c-name "g_node_prepend") - (return-type "GNode*") - (parameters - '("GNode*" "node") - ) -) - -(define-method n_nodes - (of-object "GNode") - (c-name "g_node_n_nodes") - (return-type "guint") - (parameters - '("GTraverseFlags" "flags") - ) -) - -(define-method get_root - (of-object "GNode") - (c-name "g_node_get_root") - (return-type "GNode*") -) - -(define-method is_ancestor - (of-object "GNode") - (c-name "g_node_is_ancestor") - (return-type "gboolean") - (parameters - '("GNode*" "descendant") - ) -) - -(define-method depth - (of-object "GNode") - (c-name "g_node_depth") - (return-type "guint") -) - -(define-method find - (of-object "GNode") - (c-name "g_node_find") - (return-type "GNode*") - (parameters - '("GTraverseType" "order") - '("GTraverseFlags" "flags") - '("gpointer" "data") - ) -) - -(define-method traverse - (of-object "GNode") - (c-name "g_node_traverse") - (return-type "none") - (parameters - '("GTraverseType" "order") - '("GTraverseFlags" "flags") - '("gint" "max_depth") - '("GNodeTraverseFunc" "func") - '("gpointer" "data") - ) -) - -(define-method max_height - (of-object "GNode") - (c-name "g_node_max_height") - (return-type "guint") -) - -(define-method children_foreach - (of-object "GNode") - (c-name "g_node_children_foreach") - (return-type "none") - (parameters - '("GTraverseFlags" "flags") - '("GNodeForeachFunc" "func") - '("gpointer" "data") - ) -) - -(define-method reverse_children - (of-object "GNode") - (c-name "g_node_reverse_children") - (return-type "none") -) - -(define-method n_children - (of-object "GNode") - (c-name "g_node_n_children") - (return-type "guint") -) - -(define-method nth_child - (of-object "GNode") - (c-name "g_node_nth_child") - (return-type "GNode*") - (parameters - '("guint" "n") - ) -) - -(define-method last_child - (of-object "GNode") - (c-name "g_node_last_child") - (return-type "GNode*") -) - -(define-method find_child - (of-object "GNode") - (c-name "g_node_find_child") - (return-type "GNode*") - (parameters - '("GTraverseFlags" "flags") - '("gpointer" "data") - ) -) - -(define-method child_position - (of-object "GNode") - (c-name "g_node_child_position") - (return-type "gint") - (parameters - '("GNode*" "child") - ) -) - -(define-method child_index - (of-object "GNode") - (c-name "g_node_child_index") - (return-type "gint") - (parameters - '("gpointer" "data") - ) -) - -(define-method first_sibling - (of-object "GNode") - (c-name "g_node_first_sibling") - (return-type "GNode*") -) - -(define-method last_sibling - (of-object "GNode") - (c-name "g_node_last_sibling") - (return-type "GNode*") -) - -(define-function g_node_push_allocator - (c-name "g_node_push_allocator") - (return-type "none") - (parameters - '("gpointer" "dummy") - ) -) - -(define-function g_node_pop_allocator - (c-name "g_node_pop_allocator") - (return-type "none") -) - - - -;; From goption.h - -(define-function g_option_error_quark - (c-name "g_option_error_quark") - (return-type "GQuark") -) - -(define-function g_option_context_new - (c-name "g_option_context_new") - (is-constructor-of "GOptionContext") - (return-type "GOptionContext*") - (parameters - '("const-gchar*" "parameter_string") - ) -) - -(define-method set_summary - (of-object "GOptionContext") - (c-name "g_option_context_set_summary") - (return-type "none") - (parameters - '("const-gchar*" "summary") - ) -) - -(define-method get_summary - (of-object "GOptionContext") - (c-name "g_option_context_get_summary") - (return-type "const-gchar*") -) - -(define-method set_description - (of-object "GOptionContext") - (c-name "g_option_context_set_description") - (return-type "none") - (parameters - '("const-gchar*" "description") - ) -) - -(define-method get_description - (of-object "GOptionContext") - (c-name "g_option_context_get_description") - (return-type "const-gchar*") -) - -(define-method free - (of-object "GOptionContext") - (c-name "g_option_context_free") - (return-type "none") -) - -(define-method set_help_enabled - (of-object "GOptionContext") - (c-name "g_option_context_set_help_enabled") - (return-type "none") - (parameters - '("gboolean" "help_enabled") - ) -) - -(define-method get_help_enabled - (of-object "GOptionContext") - (c-name "g_option_context_get_help_enabled") - (return-type "gboolean") -) - -(define-method set_ignore_unknown_options - (of-object "GOptionContext") - (c-name "g_option_context_set_ignore_unknown_options") - (return-type "none") - (parameters - '("gboolean" "ignore_unknown") - ) -) - -(define-method get_ignore_unknown_options - (of-object "GOptionContext") - (c-name "g_option_context_get_ignore_unknown_options") - (return-type "gboolean") -) - -(define-method add_main_entries - (of-object "GOptionContext") - (c-name "g_option_context_add_main_entries") - (return-type "none") - (parameters - '("const-GOptionEntry*" "entries") - '("const-gchar*" "translation_domain") - ) -) - -(define-method parse - (of-object "GOptionContext") - (c-name "g_option_context_parse") - (return-type "gboolean") - (parameters - '("gint*" "argc") - '("gchar***" "argv") - '("GError**" "error") - ) -) - -(define-method set_translate_func - (of-object "GOptionContext") - (c-name "g_option_context_set_translate_func") - (return-type "none") - (parameters - '("GTranslateFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy_notify") - ) -) - -(define-method set_translation_domain - (of-object "GOptionContext") - (c-name "g_option_context_set_translation_domain") - (return-type "none") - (parameters - '("const-gchar*" "domain") - ) -) - -(define-method add_group - (of-object "GOptionContext") - (c-name "g_option_context_add_group") - (return-type "none") - (parameters - '("GOptionGroup*" "group") - ) -) - -(define-method set_main_group - (of-object "GOptionContext") - (c-name "g_option_context_set_main_group") - (return-type "none") - (parameters - '("GOptionGroup*" "group") - ) -) - -(define-method get_main_group - (of-object "GOptionContext") - (c-name "g_option_context_get_main_group") - (return-type "GOptionGroup*") -) - -(define-method get_help - (of-object "GOptionContext") - (c-name "g_option_context_get_help") - (return-type "gchar*") - (parameters - '("gboolean" "main_help") - '("GOptionGroup*" "group") - ) -) - -(define-function g_option_group_new - (c-name "g_option_group_new") - (is-constructor-of "GOptionGroup") - (return-type "GOptionGroup*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "description") - '("const-gchar*" "help_description") - '("gpointer" "user_data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method set_parse_hooks - (of-object "GOptionGroup") - (c-name "g_option_group_set_parse_hooks") - (return-type "none") - (parameters - '("GOptionParseFunc" "pre_parse_func") - '("GOptionParseFunc" "post_parse_func") - ) -) - -(define-method set_error_hook - (of-object "GOptionGroup") - (c-name "g_option_group_set_error_hook") - (return-type "none") - (parameters - '("GOptionErrorFunc" "error_func") - ) -) - -(define-method free - (of-object "GOptionGroup") - (c-name "g_option_group_free") - (return-type "none") -) - -(define-method add_entries - (of-object "GOptionGroup") - (c-name "g_option_group_add_entries") - (return-type "none") - (parameters - '("const-GOptionEntry*" "entries") - ) -) - -(define-method set_translate_func - (of-object "GOptionGroup") - (c-name "g_option_group_set_translate_func") - (return-type "none") - (parameters - '("GTranslateFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy_notify") - ) -) - -(define-method set_translation_domain - (of-object "GOptionGroup") - (c-name "g_option_group_set_translation_domain") - (return-type "none") - (parameters - '("const-gchar*" "domain") - ) -) - - - -;; From gpattern.h - -(define-function g_pattern_spec_new - (c-name "g_pattern_spec_new") - (is-constructor-of "GPatternSpec") - (return-type "GPatternSpec*") - (parameters - '("const-gchar*" "pattern") - ) -) - -(define-method free - (of-object "GPatternSpec") - (c-name "g_pattern_spec_free") - (return-type "none") -) - -(define-method equal - (of-object "GPatternSpec") - (c-name "g_pattern_spec_equal") - (return-type "gboolean") - (parameters - '("GPatternSpec*" "pspec2") - ) -) - -(define-function g_pattern_match - (c-name "g_pattern_match") - (return-type "gboolean") - (parameters - '("GPatternSpec*" "pspec") - '("guint" "string_length") - '("const-gchar*" "string") - '("const-gchar*" "string_reversed") - ) -) - -(define-function g_pattern_match_string - (c-name "g_pattern_match_string") - (return-type "gboolean") - (parameters - '("GPatternSpec*" "pspec") - '("const-gchar*" "string") - ) -) - -(define-function g_pattern_match_simple - (c-name "g_pattern_match_simple") - (return-type "gboolean") - (parameters - '("const-gchar*" "pattern") - '("const-gchar*" "string") - ) -) - - - -;; From gprimes.h - -(define-function g_spaced_primes_closest - (c-name "g_spaced_primes_closest") - (return-type "guint") - (parameters - '("guint" "num") - ) -) - - - -;; From gprintf.h - -(define-function g_printf - (c-name "g_printf") - (return-type "gint") - (parameters - '("gchar-const*" "format") - ) - (varargs #t) -) - -(define-function g_fprintf - (c-name "g_fprintf") - (return-type "gint") - (parameters - '("FILE*" "file") - '("gchar-const*" "format") - ) - (varargs #t) -) - -(define-function g_sprintf - (c-name "g_sprintf") - (return-type "gint") - (parameters - '("gchar*" "string") - '("gchar-const*" "format") - ) - (varargs #t) -) - -(define-function g_vprintf - (c-name "g_vprintf") - (return-type "gint") - (parameters - '("gchar-const*" "format") - '("va_list" "args") - ) -) - -(define-function g_vfprintf - (c-name "g_vfprintf") - (return-type "gint") - (parameters - '("FILE*" "file") - '("gchar-const*" "format") - '("va_list" "args") - ) -) - -(define-function g_vsprintf - (c-name "g_vsprintf") - (return-type "gint") - (parameters - '("gchar*" "string") - '("gchar-const*" "format") - '("va_list" "args") - ) -) - -(define-function g_vasprintf - (c-name "g_vasprintf") - (return-type "gint") - (parameters - '("gchar**" "string") - '("gchar-const*" "format") - '("va_list" "args") - ) -) - - - -;; From gprintfint.h - - - -;; From gqsort.h - -(define-function g_qsort_with_data - (c-name "g_qsort_with_data") - (return-type "none") - (parameters - '("gconstpointer" "pbase") - '("gint" "total_elems") - '("gsize" "size") - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - - - -;; From gquark.h - -(define-function g_quark_try_string - (c-name "g_quark_try_string") - (return-type "GQuark") - (parameters - '("const-gchar*" "string") - ) -) - -(define-function g_quark_from_static_string - (c-name "g_quark_from_static_string") - (return-type "GQuark") - (parameters - '("const-gchar*" "string") - ) -) - -(define-function g_quark_from_string - (c-name "g_quark_from_string") - (return-type "GQuark") - (parameters - '("const-gchar*" "string") - ) -) - -(define-method to_string - (of-object "GQuark") - (c-name "g_quark_to_string") - (return-type "const-gchar*") -) - -(define-function g_intern_string - (c-name "g_intern_string") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "string") - ) -) - -(define-function g_intern_static_string - (c-name "g_intern_static_string") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "string") - ) -) - - - -;; From gqueue.h - -(define-function g_queue_new - (c-name "g_queue_new") - (is-constructor-of "GQueue") - (return-type "GQueue*") -) - -(define-method free - (of-object "GQueue") - (c-name "g_queue_free") - (return-type "none") -) - -(define-method init - (of-object "GQueue") - (c-name "g_queue_init") - (return-type "none") -) - -(define-method clear - (of-object "GQueue") - (c-name "g_queue_clear") - (return-type "none") -) - -(define-method is_empty - (of-object "GQueue") - (c-name "g_queue_is_empty") - (return-type "gboolean") -) - -(define-method get_length - (of-object "GQueue") - (c-name "g_queue_get_length") - (return-type "guint") -) - -(define-method reverse - (of-object "GQueue") - (c-name "g_queue_reverse") - (return-type "none") -) - -(define-method copy - (of-object "GQueue") - (c-name "g_queue_copy") - (return-type "GQueue*") -) - -(define-method foreach - (of-object "GQueue") - (c-name "g_queue_foreach") - (return-type "none") - (parameters - '("GFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method find - (of-object "GQueue") - (c-name "g_queue_find") - (return-type "GList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method find_custom - (of-object "GQueue") - (c-name "g_queue_find_custom") - (return-type "GList*") - (parameters - '("gconstpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method sort - (of-object "GQueue") - (c-name "g_queue_sort") - (return-type "none") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - -(define-method push_head - (of-object "GQueue") - (c-name "g_queue_push_head") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method push_tail - (of-object "GQueue") - (c-name "g_queue_push_tail") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method push_nth - (of-object "GQueue") - (c-name "g_queue_push_nth") - (return-type "none") - (parameters - '("gpointer" "data") - '("gint" "n") - ) -) - -(define-method pop_head - (of-object "GQueue") - (c-name "g_queue_pop_head") - (return-type "gpointer") -) - -(define-method pop_tail - (of-object "GQueue") - (c-name "g_queue_pop_tail") - (return-type "gpointer") -) - -(define-method pop_nth - (of-object "GQueue") - (c-name "g_queue_pop_nth") - (return-type "gpointer") - (parameters - '("guint" "n") - ) -) - -(define-method peek_head - (of-object "GQueue") - (c-name "g_queue_peek_head") - (return-type "gpointer") -) - -(define-method peek_tail - (of-object "GQueue") - (c-name "g_queue_peek_tail") - (return-type "gpointer") -) - -(define-method peek_nth - (of-object "GQueue") - (c-name "g_queue_peek_nth") - (return-type "gpointer") - (parameters - '("guint" "n") - ) -) - -(define-method index - (of-object "GQueue") - (c-name "g_queue_index") - (return-type "gint") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method remove - (of-object "GQueue") - (c-name "g_queue_remove") - (return-type "none") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method remove_all - (of-object "GQueue") - (c-name "g_queue_remove_all") - (return-type "none") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method insert_before - (of-object "GQueue") - (c-name "g_queue_insert_before") - (return-type "none") - (parameters - '("GList*" "sibling") - '("gpointer" "data") - ) -) - -(define-method insert_after - (of-object "GQueue") - (c-name "g_queue_insert_after") - (return-type "none") - (parameters - '("GList*" "sibling") - '("gpointer" "data") - ) -) - -(define-method insert_sorted - (of-object "GQueue") - (c-name "g_queue_insert_sorted") - (return-type "none") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method push_head_link - (of-object "GQueue") - (c-name "g_queue_push_head_link") - (return-type "none") - (parameters - '("GList*" "link_") - ) -) - -(define-method push_tail_link - (of-object "GQueue") - (c-name "g_queue_push_tail_link") - (return-type "none") - (parameters - '("GList*" "link_") - ) -) - -(define-method push_nth_link - (of-object "GQueue") - (c-name "g_queue_push_nth_link") - (return-type "none") - (parameters - '("gint" "n") - '("GList*" "link_") - ) -) - -(define-method pop_head_link - (of-object "GQueue") - (c-name "g_queue_pop_head_link") - (return-type "GList*") -) - -(define-method pop_tail_link - (of-object "GQueue") - (c-name "g_queue_pop_tail_link") - (return-type "GList*") -) - -(define-method pop_nth_link - (of-object "GQueue") - (c-name "g_queue_pop_nth_link") - (return-type "GList*") - (parameters - '("guint" "n") - ) -) - -(define-method peek_head_link - (of-object "GQueue") - (c-name "g_queue_peek_head_link") - (return-type "GList*") -) - -(define-method peek_tail_link - (of-object "GQueue") - (c-name "g_queue_peek_tail_link") - (return-type "GList*") -) - -(define-method peek_nth_link - (of-object "GQueue") - (c-name "g_queue_peek_nth_link") - (return-type "GList*") - (parameters - '("guint" "n") - ) -) - -(define-method link_index - (of-object "GQueue") - (c-name "g_queue_link_index") - (return-type "gint") - (parameters - '("GList*" "link_") - ) -) - -(define-method unlink - (of-object "GQueue") - (c-name "g_queue_unlink") - (return-type "none") - (parameters - '("GList*" "link_") - ) -) - -(define-method delete_link - (of-object "GQueue") - (c-name "g_queue_delete_link") - (return-type "none") - (parameters - '("GList*" "link_") - ) -) - - - -;; From grand.h - -(define-function g_rand_new_with_seed - (c-name "g_rand_new_with_seed") - (return-type "GRand*") - (parameters - '("guint32" "seed") - ) -) - -(define-function g_rand_new_with_seed_array - (c-name "g_rand_new_with_seed_array") - (return-type "GRand*") - (parameters - '("const-guint32*" "seed") - '("guint" "seed_length") - ) -) - -(define-function g_rand_new - (c-name "g_rand_new") - (is-constructor-of "GRand") - (return-type "GRand*") -) - -(define-method free - (of-object "GRand") - (c-name "g_rand_free") - (return-type "none") -) - -(define-method copy - (of-object "GRand") - (c-name "g_rand_copy") - (return-type "GRand*") -) - -(define-method set_seed - (of-object "GRand") - (c-name "g_rand_set_seed") - (return-type "none") - (parameters - '("guint32" "seed") - ) -) - -(define-method set_seed_array - (of-object "GRand") - (c-name "g_rand_set_seed_array") - (return-type "none") - (parameters - '("const-guint32*" "seed") - '("guint" "seed_length") - ) -) - -(define-method int - (of-object "GRand") - (c-name "g_rand_int") - (return-type "guint32") -) - -(define-method int_range - (of-object "GRand") - (c-name "g_rand_int_range") - (return-type "gint32") - (parameters - '("gint32" "begin") - '("gint32" "end") - ) -) - -(define-method double - (of-object "GRand") - (c-name "g_rand_double") - (return-type "gdouble") -) - -(define-method double_range - (of-object "GRand") - (c-name "g_rand_double_range") - (return-type "gdouble") - (parameters - '("gdouble" "begin") - '("gdouble" "end") - ) -) - -(define-function g_random_set_seed - (c-name "g_random_set_seed") - (return-type "none") - (parameters - '("guint32" "seed") - ) -) - -(define-function g_random_int - (c-name "g_random_int") - (return-type "guint32") -) - -(define-function g_random_int_range - (c-name "g_random_int_range") - (return-type "gint32") - (parameters - '("gint32" "begin") - '("gint32" "end") - ) -) - -(define-function g_random_double - (c-name "g_random_double") - (return-type "gdouble") -) - -(define-function g_random_double_range - (c-name "g_random_double_range") - (return-type "gdouble") - (parameters - '("gdouble" "begin") - '("gdouble" "end") - ) -) - - - -;; From gregex.h - -(define-function g_regex_error_quark - (c-name "g_regex_error_quark") - (return-type "GQuark") -) - -(define-function g_regex_new - (c-name "g_regex_new") - (is-constructor-of "GRegex") - (return-type "GRegex*") - (parameters - '("const-gchar*" "pattern") - '("GRegexCompileFlags" "compile_options") - '("GRegexMatchFlags" "match_options") - '("GError**" "error") - ) -) - -(define-method ref - (of-object "GRegex") - (c-name "g_regex_ref") - (return-type "GRegex*") -) - -(define-method unref - (of-object "GRegex") - (c-name "g_regex_unref") - (return-type "none") -) - -(define-method get_pattern - (of-object "GRegex") - (c-name "g_regex_get_pattern") - (return-type "const-gchar*") -) - -(define-method get_max_backref - (of-object "GRegex") - (c-name "g_regex_get_max_backref") - (return-type "gint") -) - -(define-method get_capture_count - (of-object "GRegex") - (c-name "g_regex_get_capture_count") - (return-type "gint") -) - -(define-method get_string_number - (of-object "GRegex") - (c-name "g_regex_get_string_number") - (return-type "gint") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function g_regex_escape_string - (c-name "g_regex_escape_string") - (return-type "gchar*") - (parameters - '("const-gchar*" "string") - '("gint" "length") - ) -) - -(define-function g_regex_match_simple - (c-name "g_regex_match_simple") - (return-type "gboolean") - (parameters - '("const-gchar*" "pattern") - '("const-gchar*" "string") - '("GRegexCompileFlags" "compile_options") - '("GRegexMatchFlags" "match_options") - ) -) - -(define-method match - (of-object "GRegex") - (c-name "g_regex_match") - (return-type "gboolean") - (parameters - '("const-gchar*" "string") - '("GRegexMatchFlags" "match_options") - '("GMatchInfo**" "match_info") - ) -) - -(define-method match_full - (of-object "GRegex") - (c-name "g_regex_match_full") - (return-type "gboolean") - (parameters - '("const-gchar*" "string") - '("gssize" "string_len") - '("gint" "start_position") - '("GRegexMatchFlags" "match_options") - '("GMatchInfo**" "match_info") - '("GError**" "error") - ) -) - -(define-method match_all - (of-object "GRegex") - (c-name "g_regex_match_all") - (return-type "gboolean") - (parameters - '("const-gchar*" "string") - '("GRegexMatchFlags" "match_options") - '("GMatchInfo**" "match_info") - ) -) - -(define-method match_all_full - (of-object "GRegex") - (c-name "g_regex_match_all_full") - (return-type "gboolean") - (parameters - '("const-gchar*" "string") - '("gssize" "string_len") - '("gint" "start_position") - '("GRegexMatchFlags" "match_options") - '("GMatchInfo**" "match_info") - '("GError**" "error") - ) -) - -(define-function g_regex_split_simple - (c-name "g_regex_split_simple") - (return-type "gchar**") - (parameters - '("const-gchar*" "pattern") - '("const-gchar*" "string") - '("GRegexCompileFlags" "compile_options") - '("GRegexMatchFlags" "match_options") - ) -) - -(define-method split - (of-object "GRegex") - (c-name "g_regex_split") - (return-type "gchar**") - (parameters - '("const-gchar*" "string") - '("GRegexMatchFlags" "match_options") - ) -) - -(define-method split_full - (of-object "GRegex") - (c-name "g_regex_split_full") - (return-type "gchar**") - (parameters - '("const-gchar*" "string") - '("gssize" "string_len") - '("gint" "start_position") - '("GRegexMatchFlags" "match_options") - '("gint" "max_tokens") - '("GError**" "error") - ) -) - -(define-method replace - (of-object "GRegex") - (c-name "g_regex_replace") - (return-type "gchar*") - (parameters - '("const-gchar*" "string") - '("gssize" "string_len") - '("gint" "start_position") - '("const-gchar*" "replacement") - '("GRegexMatchFlags" "match_options") - '("GError**" "error") - ) -) - -(define-method replace_literal - (of-object "GRegex") - (c-name "g_regex_replace_literal") - (return-type "gchar*") - (parameters - '("const-gchar*" "string") - '("gssize" "string_len") - '("gint" "start_position") - '("const-gchar*" "replacement") - '("GRegexMatchFlags" "match_options") - '("GError**" "error") - ) -) - -(define-method replace_eval - (of-object "GRegex") - (c-name "g_regex_replace_eval") - (return-type "gchar*") - (parameters - '("const-gchar*" "string") - '("gssize" "string_len") - '("gint" "start_position") - '("GRegexMatchFlags" "match_options") - '("GRegexEvalCallback" "eval") - '("gpointer" "user_data") - '("GError**" "error") - ) -) - -(define-function g_regex_check_replacement - (c-name "g_regex_check_replacement") - (return-type "gboolean") - (parameters - '("const-gchar*" "replacement") - '("gboolean*" "has_references") - '("GError**" "error") - ) -) - -(define-method get_regex - (of-object "GMatchInfo") - (c-name "g_match_info_get_regex") - (return-type "GRegex*") -) - -(define-method get_string - (of-object "GMatchInfo") - (c-name "g_match_info_get_string") - (return-type "const-gchar*") -) - -(define-method free - (of-object "GMatchInfo") - (c-name "g_match_info_free") - (return-type "none") -) - -(define-method next - (of-object "GMatchInfo") - (c-name "g_match_info_next") - (return-type "gboolean") - (parameters - '("GError**" "error") - ) -) - -(define-method matches - (of-object "GMatchInfo") - (c-name "g_match_info_matches") - (return-type "gboolean") -) - -(define-method get_match_count - (of-object "GMatchInfo") - (c-name "g_match_info_get_match_count") - (return-type "gint") -) - -(define-method is_partial_match - (of-object "GMatchInfo") - (c-name "g_match_info_is_partial_match") - (return-type "gboolean") -) - -(define-method expand_references - (of-object "GMatchInfo") - (c-name "g_match_info_expand_references") - (return-type "gchar*") - (parameters - '("const-gchar*" "string_to_expand") - '("GError**" "error") - ) -) - -(define-method fetch - (of-object "GMatchInfo") - (c-name "g_match_info_fetch") - (return-type "gchar*") - (parameters - '("gint" "match_num") - ) -) - -(define-method fetch_pos - (of-object "GMatchInfo") - (c-name "g_match_info_fetch_pos") - (return-type "gboolean") - (parameters - '("gint" "match_num") - '("gint*" "start_pos") - '("gint*" "end_pos") - ) -) - -(define-method fetch_named - (of-object "GMatchInfo") - (c-name "g_match_info_fetch_named") - (return-type "gchar*") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method fetch_named_pos - (of-object "GMatchInfo") - (c-name "g_match_info_fetch_named_pos") - (return-type "gboolean") - (parameters - '("const-gchar*" "name") - '("gint*" "start_pos") - '("gint*" "end_pos") - ) -) - -(define-method fetch_all - (of-object "GMatchInfo") - (c-name "g_match_info_fetch_all") - (return-type "gchar**") -) - - - -;; From grel.h - -(define-function g_relation_new - (c-name "g_relation_new") - (is-constructor-of "GRelation") - (return-type "GRelation*") - (parameters - '("gint" "fields") - ) -) - -(define-method destroy - (of-object "GRelation") - (c-name "g_relation_destroy") - (return-type "none") -) - -(define-method index - (of-object "GRelation") - (c-name "g_relation_index") - (return-type "none") - (parameters - '("gint" "field") - '("GHashFunc" "hash_func") - '("GEqualFunc" "key_equal_func") - ) -) - -(define-method insert - (of-object "GRelation") - (c-name "g_relation_insert") - (return-type "none") - (parameters - ) - (varargs #t) -) - -(define-method delete - (of-object "GRelation") - (c-name "g_relation_delete") - (return-type "gint") - (parameters - '("gconstpointer" "key") - '("gint" "field") - ) -) - -(define-method select - (of-object "GRelation") - (c-name "g_relation_select") - (return-type "GTuples*") - (parameters - '("gconstpointer" "key") - '("gint" "field") - ) -) - -(define-method count - (of-object "GRelation") - (c-name "g_relation_count") - (return-type "gint") - (parameters - '("gconstpointer" "key") - '("gint" "field") - ) -) - -(define-method exists - (of-object "GRelation") - (c-name "g_relation_exists") - (return-type "gboolean") - (parameters - ) - (varargs #t) -) - -(define-method print - (of-object "GRelation") - (c-name "g_relation_print") - (return-type "none") -) - -(define-method destroy - (of-object "GTuples") - (c-name "g_tuples_destroy") - (return-type "none") -) - -(define-method index - (of-object "GTuples") - (c-name "g_tuples_index") - (return-type "gpointer") - (parameters - '("gint" "index_") - '("gint" "field") - ) -) - - - -;; From gscanner.h - -(define-function g_scanner_new - (c-name "g_scanner_new") - (is-constructor-of "GScanner") - (return-type "GScanner*") - (parameters - '("const-GScannerConfig*" "config_templ") - ) -) - -(define-method destroy - (of-object "GScanner") - (c-name "g_scanner_destroy") - (return-type "none") -) - -(define-method input_file - (of-object "GScanner") - (c-name "g_scanner_input_file") - (return-type "none") - (parameters - '("gint" "input_fd") - ) -) - -(define-method sync_file_offset - (of-object "GScanner") - (c-name "g_scanner_sync_file_offset") - (return-type "none") -) - -(define-method input_text - (of-object "GScanner") - (c-name "g_scanner_input_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("guint" "text_len") - ) -) - -(define-method get_next_token - (of-object "GScanner") - (c-name "g_scanner_get_next_token") - (return-type "GTokenType") -) - -(define-method peek_next_token - (of-object "GScanner") - (c-name "g_scanner_peek_next_token") - (return-type "GTokenType") -) - -(define-method cur_token - (of-object "GScanner") - (c-name "g_scanner_cur_token") - (return-type "GTokenType") -) - -(define-method cur_value - (of-object "GScanner") - (c-name "g_scanner_cur_value") - (return-type "GTokenValue") -) - -(define-method cur_line - (of-object "GScanner") - (c-name "g_scanner_cur_line") - (return-type "guint") -) - -(define-method cur_position - (of-object "GScanner") - (c-name "g_scanner_cur_position") - (return-type "guint") -) - -(define-method eof - (of-object "GScanner") - (c-name "g_scanner_eof") - (return-type "gboolean") -) - -(define-method set_scope - (of-object "GScanner") - (c-name "g_scanner_set_scope") - (return-type "guint") - (parameters - '("guint" "scope_id") - ) -) - -(define-method scope_add_symbol - (of-object "GScanner") - (c-name "g_scanner_scope_add_symbol") - (return-type "none") - (parameters - '("guint" "scope_id") - '("const-gchar*" "symbol") - '("gpointer" "value") - ) -) - -(define-method scope_remove_symbol - (of-object "GScanner") - (c-name "g_scanner_scope_remove_symbol") - (return-type "none") - (parameters - '("guint" "scope_id") - '("const-gchar*" "symbol") - ) -) - -(define-method scope_lookup_symbol - (of-object "GScanner") - (c-name "g_scanner_scope_lookup_symbol") - (return-type "gpointer") - (parameters - '("guint" "scope_id") - '("const-gchar*" "symbol") - ) -) - -(define-method scope_foreach_symbol - (of-object "GScanner") - (c-name "g_scanner_scope_foreach_symbol") - (return-type "none") - (parameters - '("guint" "scope_id") - '("GHFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method lookup_symbol - (of-object "GScanner") - (c-name "g_scanner_lookup_symbol") - (return-type "gpointer") - (parameters - '("const-gchar*" "symbol") - ) -) - -(define-method unexp_token - (of-object "GScanner") - (c-name "g_scanner_unexp_token") - (return-type "none") - (parameters - '("GTokenType" "expected_token") - '("const-gchar*" "identifier_spec") - '("const-gchar*" "symbol_spec") - '("const-gchar*" "symbol_name") - '("const-gchar*" "message") - '("gint" "is_error") - ) -) - -(define-method error - (of-object "GScanner") - (c-name "g_scanner_error") - (return-type "none") - (parameters - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-method warn - (of-object "GScanner") - (c-name "g_scanner_warn") - (return-type "none") - (parameters - '("const-gchar*" "format") - ) - (varargs #t) -) - - - -;; From gscripttable.h - - - -;; From gsequence.h - -(define-function g_sequence_new - (c-name "g_sequence_new") - (is-constructor-of "GSequence") - (return-type "GSequence*") - (parameters - '("GDestroyNotify" "data_destroy") - ) -) - -(define-method free - (of-object "GSequence") - (c-name "g_sequence_free") - (return-type "none") -) - -(define-method get_length - (of-object "GSequence") - (c-name "g_sequence_get_length") - (return-type "gint") -) - -(define-method foreach - (of-object "GSequence") - (c-name "g_sequence_foreach") - (return-type "none") - (parameters - '("GFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-function g_sequence_foreach_range - (c-name "g_sequence_foreach_range") - (return-type "none") - (parameters - '("GSequenceIter*" "begin") - '("GSequenceIter*" "end") - '("GFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method sort - (of-object "GSequence") - (c-name "g_sequence_sort") - (return-type "none") - (parameters - '("GCompareDataFunc" "cmp_func") - '("gpointer" "cmp_data") - ) -) - -(define-method sort_iter - (of-object "GSequence") - (c-name "g_sequence_sort_iter") - (return-type "none") - (parameters - '("GSequenceIterCompareFunc" "cmp_func") - '("gpointer" "cmp_data") - ) -) - -(define-method get_begin_iter - (of-object "GSequence") - (c-name "g_sequence_get_begin_iter") - (return-type "GSequenceIter*") -) - -(define-method get_end_iter - (of-object "GSequence") - (c-name "g_sequence_get_end_iter") - (return-type "GSequenceIter*") -) - -(define-method get_iter_at_pos - (of-object "GSequence") - (c-name "g_sequence_get_iter_at_pos") - (return-type "GSequenceIter*") - (parameters - '("gint" "pos") - ) -) - -(define-method append - (of-object "GSequence") - (c-name "g_sequence_append") - (return-type "GSequenceIter*") - (parameters - '("gpointer" "data") - ) -) - -(define-method prepend - (of-object "GSequence") - (c-name "g_sequence_prepend") - (return-type "GSequenceIter*") - (parameters - '("gpointer" "data") - ) -) - -(define-function g_sequence_insert_before - (c-name "g_sequence_insert_before") - (return-type "GSequenceIter*") - (parameters - '("GSequenceIter*" "iter") - '("gpointer" "data") - ) -) - -(define-function g_sequence_move - (c-name "g_sequence_move") - (return-type "none") - (parameters - '("GSequenceIter*" "src") - '("GSequenceIter*" "dest") - ) -) - -(define-function g_sequence_swap - (c-name "g_sequence_swap") - (return-type "none") - (parameters - '("GSequenceIter*" "a") - '("GSequenceIter*" "b") - ) -) - -(define-method insert_sorted - (of-object "GSequence") - (c-name "g_sequence_insert_sorted") - (return-type "GSequenceIter*") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "cmp_func") - '("gpointer" "cmp_data") - ) -) - -(define-method insert_sorted_iter - (of-object "GSequence") - (c-name "g_sequence_insert_sorted_iter") - (return-type "GSequenceIter*") - (parameters - '("gpointer" "data") - '("GSequenceIterCompareFunc" "iter_cmp") - '("gpointer" "cmp_data") - ) -) - -(define-function g_sequence_sort_changed - (c-name "g_sequence_sort_changed") - (return-type "none") - (parameters - '("GSequenceIter*" "iter") - '("GCompareDataFunc" "cmp_func") - '("gpointer" "cmp_data") - ) -) - -(define-function g_sequence_sort_changed_iter - (c-name "g_sequence_sort_changed_iter") - (return-type "none") - (parameters - '("GSequenceIter*" "iter") - '("GSequenceIterCompareFunc" "iter_cmp") - '("gpointer" "cmp_data") - ) -) - -(define-function g_sequence_remove - (c-name "g_sequence_remove") - (return-type "none") - (parameters - '("GSequenceIter*" "iter") - ) -) - -(define-function g_sequence_remove_range - (c-name "g_sequence_remove_range") - (return-type "none") - (parameters - '("GSequenceIter*" "begin") - '("GSequenceIter*" "end") - ) -) - -(define-function g_sequence_move_range - (c-name "g_sequence_move_range") - (return-type "none") - (parameters - '("GSequenceIter*" "dest") - '("GSequenceIter*" "begin") - '("GSequenceIter*" "end") - ) -) - -(define-method search - (of-object "GSequence") - (c-name "g_sequence_search") - (return-type "GSequenceIter*") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "cmp_func") - '("gpointer" "cmp_data") - ) -) - -(define-method search_iter - (of-object "GSequence") - (c-name "g_sequence_search_iter") - (return-type "GSequenceIter*") - (parameters - '("gpointer" "data") - '("GSequenceIterCompareFunc" "iter_cmp") - '("gpointer" "cmp_data") - ) -) - -(define-function g_sequence_get - (c-name "g_sequence_get") - (return-type "gpointer") - (parameters - '("GSequenceIter*" "iter") - ) -) - -(define-function g_sequence_set - (c-name "g_sequence_set") - (return-type "none") - (parameters - '("GSequenceIter*" "iter") - '("gpointer" "data") - ) -) - -(define-method is_begin - (of-object "GSequenceIter") - (c-name "g_sequence_iter_is_begin") - (return-type "gboolean") -) - -(define-method is_end - (of-object "GSequenceIter") - (c-name "g_sequence_iter_is_end") - (return-type "gboolean") -) - -(define-method next - (of-object "GSequenceIter") - (c-name "g_sequence_iter_next") - (return-type "GSequenceIter*") -) - -(define-method prev - (of-object "GSequenceIter") - (c-name "g_sequence_iter_prev") - (return-type "GSequenceIter*") -) - -(define-method get_position - (of-object "GSequenceIter") - (c-name "g_sequence_iter_get_position") - (return-type "gint") -) - -(define-method move - (of-object "GSequenceIter") - (c-name "g_sequence_iter_move") - (return-type "GSequenceIter*") - (parameters - '("gint" "delta") - ) -) - -(define-method get_sequence - (of-object "GSequenceIter") - (c-name "g_sequence_iter_get_sequence") - (return-type "GSequence*") -) - -(define-method compare - (of-object "GSequenceIter") - (c-name "g_sequence_iter_compare") - (return-type "gint") - (parameters - '("GSequenceIter*" "b") - ) -) - -(define-function g_sequence_range_get_midpoint - (c-name "g_sequence_range_get_midpoint") - (return-type "GSequenceIter*") - (parameters - '("GSequenceIter*" "begin") - '("GSequenceIter*" "end") - ) -) - - - -;; From gshell.h - -(define-function g_shell_error_quark - (c-name "g_shell_error_quark") - (return-type "GQuark") -) - -(define-function g_shell_quote - (c-name "g_shell_quote") - (return-type "gchar*") - (parameters - '("const-gchar*" "unquoted_string") - ) -) - -(define-function g_shell_unquote - (c-name "g_shell_unquote") - (return-type "gchar*") - (parameters - '("const-gchar*" "quoted_string") - '("GError**" "error") - ) -) - -(define-function g_shell_parse_argv - (c-name "g_shell_parse_argv") - (return-type "gboolean") - (parameters - '("const-gchar*" "command_line") - '("gint*" "argcp") - '("gchar***" "argvp") - '("GError**" "error") - ) -) - - - -;; From gslice.h - -(define-function g_slice_alloc - (c-name "g_slice_alloc") - (return-type "gpointer") - (parameters - '("gsize" "block_size") - ) -) - -(define-function g_slice_alloc0 - (c-name "g_slice_alloc0") - (return-type "gpointer") - (parameters - '("gsize" "block_size") - ) -) - -(define-function g_slice_free1 - (c-name "g_slice_free1") - (return-type "none") - (parameters - '("gsize" "block_size") - '("gpointer" "mem_block") - ) -) - -(define-function g_slice_free_chain_with_offset - (c-name "g_slice_free_chain_with_offset") - (return-type "none") - (parameters - '("gsize" "block_size") - '("gpointer" "mem_chain") - '("gsize" "next_offset") - ) -) - -(define-function g_slice_set_config - (c-name "g_slice_set_config") - (return-type "none") - (parameters - '("GSliceConfig" "ckey") - '("gint64" "value") - ) -) - -(define-function g_slice_get_config - (c-name "g_slice_get_config") - (return-type "gint64") - (parameters - '("GSliceConfig" "ckey") - ) -) - -(define-function g_slice_get_config_state - (c-name "g_slice_get_config_state") - (return-type "gint64*") - (parameters - '("GSliceConfig" "ckey") - '("gint64" "address") - '("guint*" "n_values") - ) -) - - - -;; From gslist.h - -(define-function g_slist_alloc - (c-name "g_slist_alloc") - (return-type "GSList*") -) - -(define-method free - (of-object "GSList") - (c-name "g_slist_free") - (return-type "none") -) - -(define-method free_1 - (of-object "GSList") - (c-name "g_slist_free_1") - (return-type "none") -) - -(define-method append - (of-object "GSList") - (c-name "g_slist_append") - (return-type "GSList*") - (parameters - '("gpointer" "data") - ) -) - -(define-method prepend - (of-object "GSList") - (c-name "g_slist_prepend") - (return-type "GSList*") - (parameters - '("gpointer" "data") - ) -) - -(define-method insert - (of-object "GSList") - (c-name "g_slist_insert") - (return-type "GSList*") - (parameters - '("gpointer" "data") - '("gint" "position") - ) -) - -(define-method insert_sorted - (of-object "GSList") - (c-name "g_slist_insert_sorted") - (return-type "GSList*") - (parameters - '("gpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method insert_sorted_with_data - (of-object "GSList") - (c-name "g_slist_insert_sorted_with_data") - (return-type "GSList*") - (parameters - '("gpointer" "data") - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method insert_before - (of-object "GSList") - (c-name "g_slist_insert_before") - (return-type "GSList*") - (parameters - '("GSList*" "sibling") - '("gpointer" "data") - ) -) - -(define-method concat - (of-object "GSList") - (c-name "g_slist_concat") - (return-type "GSList*") - (parameters - '("GSList*" "list2") - ) -) - -(define-method remove - (of-object "GSList") - (c-name "g_slist_remove") - (return-type "GSList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method remove_all - (of-object "GSList") - (c-name "g_slist_remove_all") - (return-type "GSList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method remove_link - (of-object "GSList") - (c-name "g_slist_remove_link") - (return-type "GSList*") - (parameters - '("GSList*" "link_") - ) -) - -(define-method delete_link - (of-object "GSList") - (c-name "g_slist_delete_link") - (return-type "GSList*") - (parameters - '("GSList*" "link_") - ) -) - -(define-method reverse - (of-object "GSList") - (c-name "g_slist_reverse") - (return-type "GSList*") -) - -(define-method copy - (of-object "GSList") - (c-name "g_slist_copy") - (return-type "GSList*") -) - -(define-method nth - (of-object "GSList") - (c-name "g_slist_nth") - (return-type "GSList*") - (parameters - '("guint" "n") - ) -) - -(define-method find - (of-object "GSList") - (c-name "g_slist_find") - (return-type "GSList*") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method find_custom - (of-object "GSList") - (c-name "g_slist_find_custom") - (return-type "GSList*") - (parameters - '("gconstpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method position - (of-object "GSList") - (c-name "g_slist_position") - (return-type "gint") - (parameters - '("GSList*" "llink") - ) -) - -(define-method index - (of-object "GSList") - (c-name "g_slist_index") - (return-type "gint") - (parameters - '("gconstpointer" "data") - ) -) - -(define-method last - (of-object "GSList") - (c-name "g_slist_last") - (return-type "GSList*") -) - -(define-method length - (of-object "GSList") - (c-name "g_slist_length") - (return-type "guint") -) - -(define-method foreach - (of-object "GSList") - (c-name "g_slist_foreach") - (return-type "none") - (parameters - '("GFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method sort - (of-object "GSList") - (c-name "g_slist_sort") - (return-type "GSList*") - (parameters - '("GCompareFunc" "compare_func") - ) -) - -(define-method sort_with_data - (of-object "GSList") - (c-name "g_slist_sort_with_data") - (return-type "GSList*") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - -(define-method nth_data - (of-object "GSList") - (c-name "g_slist_nth_data") - (return-type "gpointer") - (parameters - '("guint" "n") - ) -) - -(define-function g_slist_push_allocator - (c-name "g_slist_push_allocator") - (return-type "none") - (parameters - '("gpointer" "dummy") - ) -) - -(define-function g_slist_pop_allocator - (c-name "g_slist_pop_allocator") - (return-type "none") -) - - - -;; From gspawn.h - -(define-function g_spawn_error_quark - (c-name "g_spawn_error_quark") - (return-type "GQuark") -) - -(define-function g_spawn_async - (c-name "g_spawn_async") - (return-type "gboolean") - (parameters - '("const-gchar*" "working_directory") - '("gchar**" "argv") - '("gchar**" "envp") - '("GSpawnFlags" "flags") - '("GSpawnChildSetupFunc" "child_setup") - '("gpointer" "user_data") - '("GPid*" "child_pid") - '("GError**" "error") - ) -) - -(define-function g_spawn_async_with_pipes - (c-name "g_spawn_async_with_pipes") - (return-type "gboolean") - (parameters - '("const-gchar*" "working_directory") - '("gchar**" "argv") - '("gchar**" "envp") - '("GSpawnFlags" "flags") - '("GSpawnChildSetupFunc" "child_setup") - '("gpointer" "user_data") - '("GPid*" "child_pid") - '("gint*" "standard_input") - '("gint*" "standard_output") - '("gint*" "standard_error") - '("GError**" "error") - ) -) - -(define-function g_spawn_sync - (c-name "g_spawn_sync") - (return-type "gboolean") - (parameters - '("const-gchar*" "working_directory") - '("gchar**" "argv") - '("gchar**" "envp") - '("GSpawnFlags" "flags") - '("GSpawnChildSetupFunc" "child_setup") - '("gpointer" "user_data") - '("gchar**" "standard_output") - '("gchar**" "standard_error") - '("gint*" "exit_status") - '("GError**" "error") - ) -) - -(define-function g_spawn_command_line_sync - (c-name "g_spawn_command_line_sync") - (return-type "gboolean") - (parameters - '("const-gchar*" "command_line") - '("gchar**" "standard_output") - '("gchar**" "standard_error") - '("gint*" "exit_status") - '("GError**" "error") - ) -) - -(define-function g_spawn_command_line_async - (c-name "g_spawn_command_line_async") - (return-type "gboolean") - (parameters - '("const-gchar*" "command_line") - '("GError**" "error") - ) -) - -(define-function g_spawn_close_pid - (c-name "g_spawn_close_pid") - (return-type "none") - (parameters - '("GPid" "pid") - ) -) - - - -;; From gstdio.h - -(define-function g_access - (c-name "g_access") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("int" "mode") - ) -) - -(define-function g_chdir - (c-name "g_chdir") - (return-type "int") - (parameters - '("const-gchar*" "path") - ) -) - -(define-function g_unlink - (c-name "g_unlink") - (return-type "int") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_rmdir - (c-name "g_rmdir") - (return-type "int") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_access - (c-name "g_access") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("int" "mode") - ) -) - -(define-function g_chmod - (c-name "g_chmod") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("int" "mode") - ) -) - -(define-function g_open - (c-name "g_open") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("int" "flags") - '("int" "mode") - ) -) - -(define-function g_creat - (c-name "g_creat") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("int" "mode") - ) -) - -(define-function g_rename - (c-name "g_rename") - (return-type "int") - (parameters - '("const-gchar*" "oldfilename") - '("const-gchar*" "newfilename") - ) -) - -(define-function g_mkdir - (c-name "g_mkdir") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("int" "mode") - ) -) - -(define-function g_chdir - (c-name "g_chdir") - (return-type "int") - (parameters - '("const-gchar*" "path") - ) -) - -(define-function g_stat - (c-name "g_stat") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("struct-stat*" "buf") - ) -) - -(define-function g_lstat - (c-name "g_lstat") - (return-type "int") - (parameters - '("const-gchar*" "filename") - '("struct-stat*" "buf") - ) -) - -(define-function g_unlink - (c-name "g_unlink") - (return-type "int") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_remove - (c-name "g_remove") - (return-type "int") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_rmdir - (c-name "g_rmdir") - (return-type "int") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function g_fopen - (c-name "g_fopen") - (return-type "FILE*") - (parameters - '("const-gchar*" "filename") - '("const-gchar*" "mode") - ) -) - -(define-function g_freopen - (c-name "g_freopen") - (return-type "FILE*") - (parameters - '("const-gchar*" "filename") - '("const-gchar*" "mode") - '("FILE*" "stream") - ) -) - - - -;; From gstrfuncs.h - -(define-function g_ascii_tolower - (c-name "g_ascii_tolower") - (return-type "gchar") - (parameters - '("gchar" "c") - ) -) - -(define-function g_ascii_toupper - (c-name "g_ascii_toupper") - (return-type "gchar") - (parameters - '("gchar" "c") - ) -) - -(define-function g_ascii_digit_value - (c-name "g_ascii_digit_value") - (return-type "gint") - (parameters - '("gchar" "c") - ) -) - -(define-function g_ascii_xdigit_value - (c-name "g_ascii_xdigit_value") - (return-type "gint") - (parameters - '("gchar" "c") - ) -) - -(define-function g_strdelimit - (c-name "g_strdelimit") - (return-type "gchar*") - (parameters - '("gchar*" "string") - '("const-gchar*" "delimiters") - '("gchar" "new_delimiter") - ) -) - -(define-function g_strcanon - (c-name "g_strcanon") - (return-type "gchar*") - (parameters - '("gchar*" "string") - '("const-gchar*" "valid_chars") - '("gchar" "substitutor") - ) -) - -(define-function g_strerror - (c-name "g_strerror") - (return-type "const-gchar*") - (parameters - '("gint" "errnum") - ) -) - -(define-function g_strsignal - (c-name "g_strsignal") - (return-type "const-gchar*") - (parameters - '("gint" "signum") - ) -) - -(define-function g_strreverse - (c-name "g_strreverse") - (return-type "gchar*") - (parameters - '("gchar*" "string") - ) -) - -(define-function g_strlcpy - (c-name "g_strlcpy") - (return-type "gsize") - (parameters - '("gchar*" "dest") - '("const-gchar*" "src") - '("gsize" "dest_size") - ) -) - -(define-function g_strlcat - (c-name "g_strlcat") - (return-type "gsize") - (parameters - '("gchar*" "dest") - '("const-gchar*" "src") - '("gsize" "dest_size") - ) -) - -(define-function g_strstr_len - (c-name "g_strstr_len") - (return-type "gchar*") - (parameters - '("const-gchar*" "haystack") - '("gssize" "haystack_len") - '("const-gchar*" "needle") - ) -) - -(define-function g_strrstr - (c-name "g_strrstr") - (return-type "gchar*") - (parameters - '("const-gchar*" "haystack") - '("const-gchar*" "needle") - ) -) - -(define-function g_strrstr_len - (c-name "g_strrstr_len") - (return-type "gchar*") - (parameters - '("const-gchar*" "haystack") - '("gssize" "haystack_len") - '("const-gchar*" "needle") - ) -) - -(define-function g_str_has_suffix - (c-name "g_str_has_suffix") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("const-gchar*" "suffix") - ) -) - -(define-function g_str_has_prefix - (c-name "g_str_has_prefix") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("const-gchar*" "prefix") - ) -) - -(define-function g_strtod - (c-name "g_strtod") - (return-type "gdouble") - (parameters - '("const-gchar*" "nptr") - '("gchar**" "endptr") - ) -) - -(define-function g_ascii_strtod - (c-name "g_ascii_strtod") - (return-type "gdouble") - (parameters - '("const-gchar*" "nptr") - '("gchar**" "endptr") - ) -) - -(define-function g_ascii_strtoull - (c-name "g_ascii_strtoull") - (return-type "guint64") - (parameters - '("const-gchar*" "nptr") - '("gchar**" "endptr") - '("guint" "base") - ) -) - -(define-function g_ascii_strtoll - (c-name "g_ascii_strtoll") - (return-type "gint64") - (parameters - '("const-gchar*" "nptr") - '("gchar**" "endptr") - '("guint" "base") - ) -) - -(define-function g_ascii_dtostr - (c-name "g_ascii_dtostr") - (return-type "gchar*") - (parameters - '("gchar*" "buffer") - '("gint" "buf_len") - '("gdouble" "d") - ) -) - -(define-function g_ascii_formatd - (c-name "g_ascii_formatd") - (return-type "gchar*") - (parameters - '("gchar*" "buffer") - '("gint" "buf_len") - '("const-gchar*" "format") - '("gdouble" "d") - ) -) - -(define-function g_strchug - (c-name "g_strchug") - (return-type "gchar*") - (parameters - '("gchar*" "string") - ) -) - -(define-function g_strchomp - (c-name "g_strchomp") - (return-type "gchar*") - (parameters - '("gchar*" "string") - ) -) - -(define-function g_ascii_strcasecmp - (c-name "g_ascii_strcasecmp") - (return-type "gint") - (parameters - '("const-gchar*" "s1") - '("const-gchar*" "s2") - ) -) - -(define-function g_ascii_strncasecmp - (c-name "g_ascii_strncasecmp") - (return-type "gint") - (parameters - '("const-gchar*" "s1") - '("const-gchar*" "s2") - '("gsize" "n") - ) -) - -(define-function g_ascii_strdown - (c-name "g_ascii_strdown") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_ascii_strup - (c-name "g_ascii_strup") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_strcasecmp - (c-name "g_strcasecmp") - (return-type "gint") - (parameters - '("const-gchar*" "s1") - '("const-gchar*" "s2") - ) -) - -(define-function g_strncasecmp - (c-name "g_strncasecmp") - (return-type "gint") - (parameters - '("const-gchar*" "s1") - '("const-gchar*" "s2") - '("guint" "n") - ) -) - -(define-function g_strdown - (c-name "g_strdown") - (return-type "gchar*") - (parameters - '("gchar*" "string") - ) -) - -(define-function g_strup - (c-name "g_strup") - (return-type "gchar*") - (parameters - '("gchar*" "string") - ) -) - -(define-function g_strdup - (c-name "g_strdup") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - ) -) - -(define-function g_strdup_printf - (c-name "g_strdup_printf") - (return-type "gchar*") - (parameters - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-function g_strdup_vprintf - (c-name "g_strdup_vprintf") - (return-type "gchar*") - (parameters - '("const-gchar*" "format") - '("va_list" "args") - ) -) - -(define-function g_strndup - (c-name "g_strndup") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gsize" "n") - ) -) - -(define-function g_strnfill - (c-name "g_strnfill") - (return-type "gchar*") - (parameters - '("gsize" "length") - '("gchar" "fill_char") - ) -) - -(define-function g_strconcat - (c-name "g_strconcat") - (return-type "gchar*") - (parameters - '("const-gchar*" "string1") - ) - (varargs #t) -) - -(define-function g_strjoin - (c-name "g_strjoin") - (return-type "gchar*") - (parameters - '("const-gchar*" "separator") - ) - (varargs #t) -) - -(define-function g_strcompress - (c-name "g_strcompress") - (return-type "gchar*") - (parameters - '("const-gchar*" "source") - ) -) - -(define-function g_strescape - (c-name "g_strescape") - (return-type "gchar*") - (parameters - '("const-gchar*" "source") - '("const-gchar*" "exceptions") - ) -) - -(define-function g_memdup - (c-name "g_memdup") - (return-type "gpointer") - (parameters - '("gconstpointer" "mem") - '("guint" "byte_size") - ) -) - -(define-function g_strsplit - (c-name "g_strsplit") - (return-type "gchar**") - (parameters - '("const-gchar*" "string") - '("const-gchar*" "delimiter") - '("gint" "max_tokens") - ) -) - -(define-function g_strsplit_set - (c-name "g_strsplit_set") - (return-type "gchar**") - (parameters - '("const-gchar*" "string") - '("const-gchar*" "delimiters") - '("gint" "max_tokens") - ) -) - -(define-function g_strjoinv - (c-name "g_strjoinv") - (return-type "gchar*") - (parameters - '("const-gchar*" "separator") - '("gchar**" "str_array") - ) -) - -(define-function g_strfreev - (c-name "g_strfreev") - (return-type "none") - (parameters - '("gchar**" "str_array") - ) -) - -(define-function g_strdupv - (c-name "g_strdupv") - (return-type "gchar**") - (parameters - '("gchar**" "str_array") - ) -) - -(define-function g_strv_length - (c-name "g_strv_length") - (return-type "guint") - (parameters - '("gchar**" "str_array") - ) -) - -(define-function g_stpcpy - (c-name "g_stpcpy") - (return-type "gchar*") - (parameters - '("gchar*" "dest") - '("const-char*" "src") - ) -) - -(define-function g_strip_context - (c-name "g_strip_context") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "msgid") - '("const-gchar*" "msgval") - ) -) - - - -;; From gstring.h - -(define-function g_string_chunk_new - (c-name "g_string_chunk_new") - (is-constructor-of "GStringChunk") - (return-type "GStringChunk*") - (parameters - '("gsize" "size") - ) -) - -(define-method free - (of-object "GStringChunk") - (c-name "g_string_chunk_free") - (return-type "none") -) - -(define-method clear - (of-object "GStringChunk") - (c-name "g_string_chunk_clear") - (return-type "none") -) - -(define-method insert - (of-object "GStringChunk") - (c-name "g_string_chunk_insert") - (return-type "gchar*") - (parameters - '("const-gchar*" "string") - ) -) - -(define-method insert_len - (of-object "GStringChunk") - (c-name "g_string_chunk_insert_len") - (return-type "gchar*") - (parameters - '("const-gchar*" "string") - '("gssize" "len") - ) -) - -(define-function g_string_new - (c-name "g_string_new") - (is-constructor-of "GString") - (return-type "GString*") - (parameters - '("const-gchar*" "init") - ) -) - -(define-function g_string_new_len - (c-name "g_string_new_len") - (return-type "GString*") - (parameters - '("const-gchar*" "init") - '("gssize" "len") - ) -) - -(define-function g_string_sized_new - (c-name "g_string_sized_new") - (is-constructor-of "GStringSized") - (return-type "GString*") - (parameters - '("gsize" "dfl_size") - ) -) - -(define-method free - (of-object "GString") - (c-name "g_string_free") - (return-type "gchar*") - (parameters - '("gboolean" "free_segment") - ) -) - -(define-method equal - (of-object "GString") - (c-name "g_string_equal") - (return-type "gboolean") - (parameters - '("const-GString*" "v2") - ) -) - -(define-method hash - (of-object "GString") - (c-name "g_string_hash") - (return-type "guint") -) - -(define-method assign - (of-object "GString") - (c-name "g_string_assign") - (return-type "GString*") - (parameters - '("const-gchar*" "rval") - ) -) - -(define-method truncate - (of-object "GString") - (c-name "g_string_truncate") - (return-type "GString*") - (parameters - '("gsize" "len") - ) -) - -(define-method set_size - (of-object "GString") - (c-name "g_string_set_size") - (return-type "GString*") - (parameters - '("gsize" "len") - ) -) - -(define-method insert_len - (of-object "GString") - (c-name "g_string_insert_len") - (return-type "GString*") - (parameters - '("gssize" "pos") - '("const-gchar*" "val") - '("gssize" "len") - ) -) - -(define-method append - (of-object "GString") - (c-name "g_string_append") - (return-type "GString*") - (parameters - '("const-gchar*" "val") - ) -) - -(define-method append_len - (of-object "GString") - (c-name "g_string_append_len") - (return-type "GString*") - (parameters - '("const-gchar*" "val") - '("gssize" "len") - ) -) - -(define-method append_c - (of-object "GString") - (c-name "g_string_append_c") - (return-type "GString*") - (parameters - '("gchar" "c") - ) -) - -(define-method append_unichar - (of-object "GString") - (c-name "g_string_append_unichar") - (return-type "GString*") - (parameters - '("gunichar" "wc") - ) -) - -(define-method prepend - (of-object "GString") - (c-name "g_string_prepend") - (return-type "GString*") - (parameters - '("const-gchar*" "val") - ) -) - -(define-method prepend_c - (of-object "GString") - (c-name "g_string_prepend_c") - (return-type "GString*") - (parameters - '("gchar" "c") - ) -) - -(define-method prepend_unichar - (of-object "GString") - (c-name "g_string_prepend_unichar") - (return-type "GString*") - (parameters - '("gunichar" "wc") - ) -) - -(define-method prepend_len - (of-object "GString") - (c-name "g_string_prepend_len") - (return-type "GString*") - (parameters - '("const-gchar*" "val") - '("gssize" "len") - ) -) - -(define-method insert - (of-object "GString") - (c-name "g_string_insert") - (return-type "GString*") - (parameters - '("gssize" "pos") - '("const-gchar*" "val") - ) -) - -(define-method insert_c - (of-object "GString") - (c-name "g_string_insert_c") - (return-type "GString*") - (parameters - '("gssize" "pos") - '("gchar" "c") - ) -) - -(define-method insert_unichar - (of-object "GString") - (c-name "g_string_insert_unichar") - (return-type "GString*") - (parameters - '("gssize" "pos") - '("gunichar" "wc") - ) -) - -(define-method erase - (of-object "GString") - (c-name "g_string_erase") - (return-type "GString*") - (parameters - '("gssize" "pos") - '("gssize" "len") - ) -) - -(define-method ascii_down - (of-object "GString") - (c-name "g_string_ascii_down") - (return-type "GString*") -) - -(define-method ascii_up - (of-object "GString") - (c-name "g_string_ascii_up") - (return-type "GString*") -) - -(define-method printf - (of-object "GString") - (c-name "g_string_printf") - (return-type "none") - (parameters - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-method append_printf - (of-object "GString") - (c-name "g_string_append_printf") - (return-type "none") - (parameters - '("const-gchar*" "format") - ) - (varargs #t) -) - -(define-method up - (of-object "GString") - (c-name "g_string_up") - (return-type "GString*") -) - - - -;; From gthread.h - -(define-function guint64 - (c-name "guint64") - (return-type "GLIB_VAR") - (parameters - '("*" "g_thread_gettime") - ) -) - -(define-function g_thread_init - (c-name "g_thread_init") - (return-type "none") - (parameters - '("GThreadFunctions*" "vtable") - ) -) - -(define-function g_thread_init_with_errorcheck_mutexes - (c-name "g_thread_init_with_errorcheck_mutexes") - (return-type "none") - (parameters - '("GThreadFunctions*" "vtable") - ) -) - -(define-function g_static_mutex_get_mutex_impl - (c-name "g_static_mutex_get_mutex_impl") - (return-type "GMutex*") - (parameters - '("GMutex**" "mutex") - ) -) - -(define-function g_thread_create_full - (c-name "g_thread_create_full") - (return-type "GThread*") - (parameters - '("GThreadFunc" "func") - '("gpointer" "data") - '("gulong" "stack_size") - '("gboolean" "joinable") - '("gboolean" "bound") - '("GThreadPriority" "priority") - '("GError**" "error") - ) -) - -(define-function g_thread_self - (c-name "g_thread_self") - (return-type "GThread*") -) - -(define-function g_thread_exit - (c-name "g_thread_exit") - (return-type "none") - (parameters - '("gpointer" "retval") - ) -) - -(define-method join - (of-object "GThread") - (c-name "g_thread_join") - (return-type "gpointer") -) - -(define-method set_priority - (of-object "GThread") - (c-name "g_thread_set_priority") - (return-type "none") - (parameters - '("GThreadPriority" "priority") - ) -) - -(define-method init - (of-object "GStaticMutex") - (c-name "g_static_mutex_init") - (return-type "none") -) - -(define-method free - (of-object "GStaticMutex") - (c-name "g_static_mutex_free") - (return-type "none") -) - -(define-method init - (of-object "GStaticPrivate") - (c-name "g_static_private_init") - (return-type "none") -) - -(define-method get - (of-object "GStaticPrivate") - (c-name "g_static_private_get") - (return-type "gpointer") -) - -(define-method set - (of-object "GStaticPrivate") - (c-name "g_static_private_set") - (return-type "none") - (parameters - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-method free - (of-object "GStaticPrivate") - (c-name "g_static_private_free") - (return-type "none") -) - -(define-method init - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_init") - (return-type "none") -) - -(define-method lock - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_lock") - (return-type "none") -) - -(define-method trylock - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_trylock") - (return-type "gboolean") -) - -(define-method unlock - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_unlock") - (return-type "none") -) - -(define-method lock_full - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_lock_full") - (return-type "none") - (parameters - '("guint" "depth") - ) -) - -(define-method unlock_full - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_unlock_full") - (return-type "guint") -) - -(define-method free - (of-object "GStaticRecMutex") - (c-name "g_static_rec_mutex_free") - (return-type "none") -) - -(define-method init - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_init") - (return-type "none") -) - -(define-method reader_lock - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_reader_lock") - (return-type "none") -) - -(define-method reader_trylock - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_reader_trylock") - (return-type "gboolean") -) - -(define-method reader_unlock - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_reader_unlock") - (return-type "none") -) - -(define-method writer_lock - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_writer_lock") - (return-type "none") -) - -(define-method writer_trylock - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_writer_trylock") - (return-type "gboolean") -) - -(define-method writer_unlock - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_writer_unlock") - (return-type "none") -) - -(define-method free - (of-object "GStaticRWLock") - (c-name "g_static_rw_lock_free") - (return-type "none") -) - -(define-function g_thread_foreach - (c-name "g_thread_foreach") - (return-type "none") - (parameters - '("GFunc" "thread_func") - '("gpointer" "user_data") - ) -) - -(define-method impl - (of-object "GOnce") - (c-name "g_once_impl") - (return-type "gpointer") - (parameters - '("GThreadFunc" "func") - '("gpointer" "arg") - ) -) - - - -;; From gthreadpool.h - -(define-function g_thread_pool_new - (c-name "g_thread_pool_new") - (is-constructor-of "GThreadPool") - (return-type "GThreadPool*") - (parameters - '("GFunc" "func") - '("gpointer" "user_data") - '("gint" "max_threads") - '("gboolean" "exclusive") - '("GError**" "error") - ) -) - -(define-method push - (of-object "GThreadPool") - (c-name "g_thread_pool_push") - (return-type "none") - (parameters - '("gpointer" "data") - '("GError**" "error") - ) -) - -(define-method set_max_threads - (of-object "GThreadPool") - (c-name "g_thread_pool_set_max_threads") - (return-type "none") - (parameters - '("gint" "max_threads") - '("GError**" "error") - ) -) - -(define-method get_max_threads - (of-object "GThreadPool") - (c-name "g_thread_pool_get_max_threads") - (return-type "gint") -) - -(define-method get_num_threads - (of-object "GThreadPool") - (c-name "g_thread_pool_get_num_threads") - (return-type "guint") -) - -(define-method unprocessed - (of-object "GThreadPool") - (c-name "g_thread_pool_unprocessed") - (return-type "guint") -) - -(define-method free - (of-object "GThreadPool") - (c-name "g_thread_pool_free") - (return-type "none") - (parameters - '("gboolean" "immediate") - '("gboolean" "wait_") - ) -) - -(define-function g_thread_pool_set_max_unused_threads - (c-name "g_thread_pool_set_max_unused_threads") - (return-type "none") - (parameters - '("gint" "max_threads") - ) -) - -(define-function g_thread_pool_get_max_unused_threads - (c-name "g_thread_pool_get_max_unused_threads") - (return-type "gint") -) - -(define-function g_thread_pool_get_num_unused_threads - (c-name "g_thread_pool_get_num_unused_threads") - (return-type "guint") -) - -(define-function g_thread_pool_stop_unused_threads - (c-name "g_thread_pool_stop_unused_threads") - (return-type "none") -) - -(define-method set_sort_function - (of-object "GThreadPool") - (c-name "g_thread_pool_set_sort_function") - (return-type "none") - (parameters - '("GCompareDataFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-function g_thread_pool_set_max_idle_time - (c-name "g_thread_pool_set_max_idle_time") - (return-type "none") - (parameters - '("guint" "interval") - ) -) - -(define-function g_thread_pool_get_max_idle_time - (c-name "g_thread_pool_get_max_idle_time") - (return-type "guint") -) - - - -;; From gthreadprivate.h - -(define-function g_thread_init_glib - (c-name "g_thread_init_glib") - (return-type "none") -) - - - -;; From gtimer.h - -(define-function g_timer_new - (c-name "g_timer_new") - (is-constructor-of "GTimer") - (return-type "GTimer*") -) - -(define-method destroy - (of-object "GTimer") - (c-name "g_timer_destroy") - (return-type "none") -) - -(define-method start - (of-object "GTimer") - (c-name "g_timer_start") - (return-type "none") -) - -(define-method stop - (of-object "GTimer") - (c-name "g_timer_stop") - (return-type "none") -) - -(define-method reset - (of-object "GTimer") - (c-name "g_timer_reset") - (return-type "none") -) - -(define-method continue - (of-object "GTimer") - (c-name "g_timer_continue") - (return-type "none") -) - -(define-method elapsed - (of-object "GTimer") - (c-name "g_timer_elapsed") - (return-type "gdouble") - (parameters - '("gulong*" "microseconds") - ) -) - -(define-function g_usleep - (c-name "g_usleep") - (return-type "none") - (parameters - '("gulong" "microseconds") - ) -) - -(define-method add - (of-object "GTimeVal") - (c-name "g_time_val_add") - (return-type "none") - (parameters - '("glong" "microseconds") - ) -) - -(define-function g_time_val_from_iso8601 - (c-name "g_time_val_from_iso8601") - (return-type "gboolean") - (parameters - '("const-gchar*" "iso_date") - '("GTimeVal*" "time_") - ) -) - -(define-method to_iso8601 - (of-object "GTimeVal") - (c-name "g_time_val_to_iso8601") - (return-type "gchar*") -) - - - -;; From gtree.h - -(define-function g_tree_new - (c-name "g_tree_new") - (is-constructor-of "GTree") - (return-type "GTree*") - (parameters - '("GCompareFunc" "key_compare_func") - ) -) - -(define-function g_tree_new_with_data - (c-name "g_tree_new_with_data") - (return-type "GTree*") - (parameters - '("GCompareDataFunc" "key_compare_func") - '("gpointer" "key_compare_data") - ) -) - -(define-function g_tree_new_full - (c-name "g_tree_new_full") - (return-type "GTree*") - (parameters - '("GCompareDataFunc" "key_compare_func") - '("gpointer" "key_compare_data") - '("GDestroyNotify" "key_destroy_func") - '("GDestroyNotify" "value_destroy_func") - ) -) - -(define-method destroy - (of-object "GTree") - (c-name "g_tree_destroy") - (return-type "none") -) - -(define-method insert - (of-object "GTree") - (c-name "g_tree_insert") - (return-type "none") - (parameters - '("gpointer" "key") - '("gpointer" "value") - ) -) - -(define-method replace - (of-object "GTree") - (c-name "g_tree_replace") - (return-type "none") - (parameters - '("gpointer" "key") - '("gpointer" "value") - ) -) - -(define-method remove - (of-object "GTree") - (c-name "g_tree_remove") - (return-type "gboolean") - (parameters - '("gconstpointer" "key") - ) -) - -(define-method steal - (of-object "GTree") - (c-name "g_tree_steal") - (return-type "gboolean") - (parameters - '("gconstpointer" "key") - ) -) - -(define-method lookup - (of-object "GTree") - (c-name "g_tree_lookup") - (return-type "gpointer") - (parameters - '("gconstpointer" "key") - ) -) - -(define-method lookup_extended - (of-object "GTree") - (c-name "g_tree_lookup_extended") - (return-type "gboolean") - (parameters - '("gconstpointer" "lookup_key") - '("gpointer*" "orig_key") - '("gpointer*" "value") - ) -) - -(define-method foreach - (of-object "GTree") - (c-name "g_tree_foreach") - (return-type "none") - (parameters - '("GTraverseFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method traverse - (of-object "GTree") - (c-name "g_tree_traverse") - (return-type "none") - (parameters - '("GTraverseFunc" "traverse_func") - '("GTraverseType" "traverse_type") - '("gpointer" "user_data") - ) -) - -(define-method search - (of-object "GTree") - (c-name "g_tree_search") - (return-type "gpointer") - (parameters - '("GCompareFunc" "search_func") - '("gconstpointer" "user_data") - ) -) - -(define-method height - (of-object "GTree") - (c-name "g_tree_height") - (return-type "gint") -) - -(define-method nnodes - (of-object "GTree") - (c-name "g_tree_nnodes") - (return-type "gint") -) - - - -;; From gtypes.h - - - -;; From gunibreak.h - - - -;; From gunichartables.h - - - -;; From gunicode.h - -(define-function g_get_charset - (c-name "g_get_charset") - (return-type "gboolean") - (parameters - '("const-char**" "charset") - ) -) - -(define-method isalnum - (of-object "gunichar") - (c-name "g_unichar_isalnum") - (return-type "gboolean") -) - -(define-method isalpha - (of-object "gunichar") - (c-name "g_unichar_isalpha") - (return-type "gboolean") -) - -(define-method iscntrl - (of-object "gunichar") - (c-name "g_unichar_iscntrl") - (return-type "gboolean") -) - -(define-method isdigit - (of-object "gunichar") - (c-name "g_unichar_isdigit") - (return-type "gboolean") -) - -(define-method isgraph - (of-object "gunichar") - (c-name "g_unichar_isgraph") - (return-type "gboolean") -) - -(define-method islower - (of-object "gunichar") - (c-name "g_unichar_islower") - (return-type "gboolean") -) - -(define-method isprint - (of-object "gunichar") - (c-name "g_unichar_isprint") - (return-type "gboolean") -) - -(define-method ispunct - (of-object "gunichar") - (c-name "g_unichar_ispunct") - (return-type "gboolean") -) - -(define-method isspace - (of-object "gunichar") - (c-name "g_unichar_isspace") - (return-type "gboolean") -) - -(define-method isupper - (of-object "gunichar") - (c-name "g_unichar_isupper") - (return-type "gboolean") -) - -(define-method isxdigit - (of-object "gunichar") - (c-name "g_unichar_isxdigit") - (return-type "gboolean") -) - -(define-method istitle - (of-object "gunichar") - (c-name "g_unichar_istitle") - (return-type "gboolean") -) - -(define-method isdefined - (of-object "gunichar") - (c-name "g_unichar_isdefined") - (return-type "gboolean") -) - -(define-method iswide - (of-object "gunichar") - (c-name "g_unichar_iswide") - (return-type "gboolean") -) - -(define-method iswide_cjk - (of-object "gunichar") - (c-name "g_unichar_iswide_cjk") - (return-type "gboolean") -) - -(define-method iszerowidth - (of-object "gunichar") - (c-name "g_unichar_iszerowidth") - (return-type "gboolean") -) - -(define-method ismark - (of-object "gunichar") - (c-name "g_unichar_ismark") - (return-type "gboolean") -) - -(define-method toupper - (of-object "gunichar") - (c-name "g_unichar_toupper") - (return-type "gunichar") -) - -(define-method tolower - (of-object "gunichar") - (c-name "g_unichar_tolower") - (return-type "gunichar") -) - -(define-method totitle - (of-object "gunichar") - (c-name "g_unichar_totitle") - (return-type "gunichar") -) - -(define-method digit_value - (of-object "gunichar") - (c-name "g_unichar_digit_value") - (return-type "gint") -) - -(define-method xdigit_value - (of-object "gunichar") - (c-name "g_unichar_xdigit_value") - (return-type "gint") -) - -(define-method type - (of-object "gunichar") - (c-name "g_unichar_type") - (return-type "GUnicodeType") -) - -(define-method break_type - (of-object "gunichar") - (c-name "g_unichar_break_type") - (return-type "GUnicodeBreakType") -) - -(define-function g_unicode_canonical_ordering - (c-name "g_unicode_canonical_ordering") - (return-type "none") - (parameters - '("gunichar*" "string") - '("gsize" "len") - ) -) - -(define-function g_unicode_canonical_decomposition - (c-name "g_unicode_canonical_decomposition") - (return-type "gunichar*") - (parameters - '("gunichar" "ch") - '("gsize*" "result_len") - ) -) - -(define-function g_utf8_get_char - (c-name "g_utf8_get_char") - (return-type "gunichar") - (parameters - '("const-gchar*" "p") - ) -) - -(define-function g_utf8_get_char_validated - (c-name "g_utf8_get_char_validated") - (return-type "gunichar") - (parameters - '("const-gchar*" "p") - '("gssize" "max_len") - ) -) - -(define-function g_utf8_offset_to_pointer - (c-name "g_utf8_offset_to_pointer") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("glong" "offset") - ) -) - -(define-function g_utf8_pointer_to_offset - (c-name "g_utf8_pointer_to_offset") - (return-type "glong") - (parameters - '("const-gchar*" "str") - '("const-gchar*" "pos") - ) -) - -(define-function g_utf8_prev_char - (c-name "g_utf8_prev_char") - (return-type "gchar*") - (parameters - '("const-gchar*" "p") - ) -) - -(define-function g_utf8_find_next_char - (c-name "g_utf8_find_next_char") - (return-type "gchar*") - (parameters - '("const-gchar*" "p") - '("const-gchar*" "end") - ) -) - -(define-function g_utf8_find_prev_char - (c-name "g_utf8_find_prev_char") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("const-gchar*" "p") - ) -) - -(define-function g_utf8_strlen - (c-name "g_utf8_strlen") - (return-type "glong") - (parameters - '("const-gchar*" "p") - '("gssize" "max") - ) -) - -(define-function g_utf8_strncpy - (c-name "g_utf8_strncpy") - (return-type "gchar*") - (parameters - '("gchar*" "dest") - '("const-gchar*" "src") - '("gsize" "n") - ) -) - -(define-function g_utf8_strchr - (c-name "g_utf8_strchr") - (return-type "gchar*") - (parameters - '("const-gchar*" "p") - '("gssize" "len") - '("gunichar" "c") - ) -) - -(define-function g_utf8_strrchr - (c-name "g_utf8_strrchr") - (return-type "gchar*") - (parameters - '("const-gchar*" "p") - '("gssize" "len") - '("gunichar" "c") - ) -) - -(define-function g_utf8_strreverse - (c-name "g_utf8_strreverse") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_utf8_to_utf16 - (c-name "g_utf8_to_utf16") - (return-type "gunichar2*") - (parameters - '("const-gchar*" "str") - '("glong" "len") - '("glong*" "items_read") - '("glong*" "items_written") - '("GError**" "error") - ) -) - -(define-function g_utf8_to_ucs4 - (c-name "g_utf8_to_ucs4") - (return-type "gunichar*") - (parameters - '("const-gchar*" "str") - '("glong" "len") - '("glong*" "items_read") - '("glong*" "items_written") - '("GError**" "error") - ) -) - -(define-function g_utf8_to_ucs4_fast - (c-name "g_utf8_to_ucs4_fast") - (return-type "gunichar*") - (parameters - '("const-gchar*" "str") - '("glong" "len") - '("glong*" "items_written") - ) -) - -(define-function g_utf16_to_ucs4 - (c-name "g_utf16_to_ucs4") - (return-type "gunichar*") - (parameters - '("const-gunichar2*" "str") - '("glong" "len") - '("glong*" "items_read") - '("glong*" "items_written") - '("GError**" "error") - ) -) - -(define-function g_utf16_to_utf8 - (c-name "g_utf16_to_utf8") - (return-type "gchar*") - (parameters - '("const-gunichar2*" "str") - '("glong" "len") - '("glong*" "items_read") - '("glong*" "items_written") - '("GError**" "error") - ) -) - -(define-function g_ucs4_to_utf16 - (c-name "g_ucs4_to_utf16") - (return-type "gunichar2*") - (parameters - '("const-gunichar*" "str") - '("glong" "len") - '("glong*" "items_read") - '("glong*" "items_written") - '("GError**" "error") - ) -) - -(define-function g_ucs4_to_utf8 - (c-name "g_ucs4_to_utf8") - (return-type "gchar*") - (parameters - '("const-gunichar*" "str") - '("glong" "len") - '("glong*" "items_read") - '("glong*" "items_written") - '("GError**" "error") - ) -) - -(define-method to_utf8 - (of-object "gunichar") - (c-name "g_unichar_to_utf8") - (return-type "gint") - (parameters - '("gchar*" "outbuf") - ) -) - -(define-function g_utf8_validate - (c-name "g_utf8_validate") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("gssize" "max_len") - '("const-gchar**" "end") - ) -) - -(define-method validate - (of-object "gunichar") - (c-name "g_unichar_validate") - (return-type "gboolean") -) - -(define-function g_utf8_strup - (c-name "g_utf8_strup") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_utf8_strdown - (c-name "g_utf8_strdown") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_utf8_casefold - (c-name "g_utf8_casefold") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_utf8_normalize - (c-name "g_utf8_normalize") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - '("GNormalizeMode" "mode") - ) -) - -(define-function g_utf8_collate - (c-name "g_utf8_collate") - (return-type "gint") - (parameters - '("const-gchar*" "str1") - '("const-gchar*" "str2") - ) -) - -(define-function g_utf8_collate_key - (c-name "g_utf8_collate_key") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-function g_utf8_collate_key_for_filename - (c-name "g_utf8_collate_key_for_filename") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - '("gssize" "len") - ) -) - -(define-method get_mirror_char - (of-object "gunichar") - (c-name "g_unichar_get_mirror_char") - (return-type "gboolean") - (parameters - '("gunichar*" "mirrored_ch") - ) -) - -(define-method get_script - (of-object "gunichar") - (c-name "g_unichar_get_script") - (return-type "GUnicodeScript") -) - - - -;; From gunicodeprivate.h - - - -;; From gunicomp.h - - - -;; From gunidecomp.h - - - -;; From gutils.h - -(define-function g_get_user_name - (c-name "g_get_user_name") - (return-type "const-gchar*") -) - -(define-function g_get_real_name - (c-name "g_get_real_name") - (return-type "const-gchar*") -) - -(define-function g_get_home_dir - (c-name "g_get_home_dir") - (return-type "const-gchar*") -) - -(define-function g_get_tmp_dir - (c-name "g_get_tmp_dir") - (return-type "const-gchar*") -) - -(define-function g_get_host_name - (c-name "g_get_host_name") - (return-type "const-gchar*") -) - -(define-function g_get_prgname - (c-name "g_get_prgname") - (return-type "gchar*") -) - -(define-function g_set_prgname - (c-name "g_set_prgname") - (return-type "none") - (parameters - '("const-gchar*" "prgname") - ) -) - -(define-function g_get_application_name - (c-name "g_get_application_name") - (return-type "const-gchar*") -) - -(define-function g_set_application_name - (c-name "g_set_application_name") - (return-type "none") - (parameters - '("const-gchar*" "application_name") - ) -) - -(define-function g_get_user_data_dir - (c-name "g_get_user_data_dir") - (return-type "const-gchar*") -) - -(define-function g_get_user_config_dir - (c-name "g_get_user_config_dir") - (return-type "const-gchar*") -) - -(define-function g_get_user_cache_dir - (c-name "g_get_user_cache_dir") - (return-type "const-gchar*") -) - -(define-function g_get_user_special_dir - (c-name "g_get_user_special_dir") - (return-type "const-gchar*") - (parameters - '("GUserDirectory" "directory") - ) -) - -(define-function g_parse_debug_string - (c-name "g_parse_debug_string") - (return-type "guint") - (parameters - '("const-gchar*" "string") - '("const-GDebugKey*" "keys") - '("guint" "nkeys") - ) -) - -(define-function g_snprintf - (c-name "g_snprintf") - (return-type "gint") - (parameters - '("gchar*" "string") - '("gulong" "n") - '("gchar-const*" "format") - ) - (varargs #t) -) - -(define-function g_vsnprintf - (c-name "g_vsnprintf") - (return-type "gint") - (parameters - '("gchar*" "string") - '("gulong" "n") - '("gchar-const*" "format") - '("va_list" "args") - ) -) - -(define-function g_path_is_absolute - (c-name "g_path_is_absolute") - (return-type "gboolean") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function g_path_skip_root - (c-name "g_path_skip_root") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function g_basename - (c-name "g_basename") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function g_get_current_dir - (c-name "g_get_current_dir") - (return-type "gchar*") -) - -(define-function g_path_get_basename - (c-name "g_path_get_basename") - (return-type "gchar*") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function g_path_get_dirname - (c-name "g_path_get_dirname") - (return-type "gchar*") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function g_nullify_pointer - (c-name "g_nullify_pointer") - (return-type "none") - (parameters - '("gpointer*" "nullify_location") - ) -) - -(define-function g_getenv - (c-name "g_getenv") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "variable") - ) -) - -(define-function g_setenv - (c-name "g_setenv") - (return-type "gboolean") - (parameters - '("const-gchar*" "variable") - '("const-gchar*" "value") - '("gboolean" "overwrite") - ) -) - -(define-function g_unsetenv - (c-name "g_unsetenv") - (return-type "none") - (parameters - '("const-gchar*" "variable") - ) -) - -(define-function g_listenv - (c-name "g_listenv") - (return-type "gchar**") -) - -(define-function g_atexit - (c-name "g_atexit") - (return-type "none") - (parameters - '("GVoidFunc" "func") - ) -) - -(define-function g_find_program_in_path - (c-name "g_find_program_in_path") - (return-type "gchar*") - (parameters - '("const-gchar*" "program") - ) -) - -(define-function glib_check_version - (c-name "glib_check_version") - (return-type "const-gchar*") - (parameters - '("guint" "required_major") - '("guint" "required_minor") - '("guint" "required_micro") - ) -) - - - -;; From gwin32.h - -(define-function g_win32_ftruncate - (c-name "g_win32_ftruncate") - (return-type "gint") - (parameters - '("gint" "f") - '("guint" "size") - ) -) - -(define-function g_win32_getlocale - (c-name "g_win32_getlocale") - (return-type "gchar*") -) - -(define-function g_win32_error_message - (c-name "g_win32_error_message") - (return-type "gchar*") - (parameters - '("gint" "error") - ) -) - -(define-function g_win32_get_package_installation_directory - (c-name "g_win32_get_package_installation_directory") - (return-type "gchar*") - (parameters - '("const-gchar*" "package") - '("const-gchar*" "dll_name") - ) -) - -(define-function g_win32_get_package_installation_subdirectory - (c-name "g_win32_get_package_installation_subdirectory") - (return-type "gchar*") - (parameters - '("const-gchar*" "package") - '("const-gchar*" "dll_name") - '("const-gchar*" "subdir") - ) -) - -(define-function g_win32_get_windows_version - (c-name "g_win32_get_windows_version") - (return-type "guint") -) - -(define-function g_win32_locale_filename_from_utf8 - (c-name "g_win32_locale_filename_from_utf8") - (return-type "gchar*") - (parameters - '("const-gchar*" "utf8filename") - ) -) - - diff --git a/libs/glibmm2/glib/src/gmodule_enums.defs b/libs/glibmm2/glib/src/gmodule_enums.defs deleted file mode 100644 index 16b781bd3e..0000000000 --- a/libs/glibmm2/glib/src/gmodule_enums.defs +++ /dev/null @@ -1,12 +0,0 @@ -;; From /home/murrayc/cvs/gnome212/glib/gmodule/gmodule.h - -(define-flags-extended ModuleFlags - (in-module "G") - (c-name "GModuleFlags") - (values - '("lazy" "G_MODULE_BIND_LAZY" "1 << 0") - '("local" "G_MODULE_BIND_LOCAL" "1 << 1") - '("mask" "G_MODULE_BIND_MASK" "0x03") - ) -) - diff --git a/libs/glibmm2/glib/src/gmodule_functions.defs b/libs/glibmm2/glib/src/gmodule_functions.defs deleted file mode 100644 index 220ab5148a..0000000000 --- a/libs/glibmm2/glib/src/gmodule_functions.defs +++ /dev/null @@ -1,79 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -;; Enumerations and flags ... - -(define-flags Flags - (in-module "GModule") - (c-name "GModuleFlags") - (gtype-id "G_TYPE_MODULE_FLAGS") - (values - '("lazy" "G_MODULE_BIND_LAZY") - '("local" "G_MODULE_BIND_LOCAL") - '("mask" "G_MODULE_BIND_MASK") - ) -) - - -;; From /home/murrayc/cvs/gnome212/glib/gmodule/gmoduleconf.h - - - -;; From /home/murrayc/cvs/gnome212/glib/gmodule/gmodule.h - -(define-function g_module_supported - (c-name "g_module_supported") - (return-type "gboolean") -) - -(define-function g_module_open - (c-name "g_module_open") - (return-type "GModule*") - (parameters - '("const-gchar*" "file_name") - '("GModuleFlags" "flags") - ) -) - -(define-method close - (of-object "GModule") - (c-name "g_module_close") - (return-type "gboolean") -) - -(define-method make_resident - (of-object "GModule") - (c-name "g_module_make_resident") - (return-type "none") -) - -(define-function g_module_error - (c-name "g_module_error") - (return-type "const-gchar*") -) - -(define-method symbol - (of-object "GModule") - (c-name "g_module_symbol") - (return-type "gboolean") - (parameters - '("const-gchar*" "symbol_name") - '("gpointer*" "symbol") - ) -) - -(define-method name - (of-object "GModule") - (c-name "g_module_name") - (return-type "const-gchar*") -) - -(define-function g_module_build_path - (c-name "g_module_build_path") - (return-type "gchar*") - (parameters - '("const-gchar*" "directory") - '("const-gchar*" "module_name") - ) -) - - diff --git a/libs/glibmm2/glib/src/gobject.defs b/libs/glibmm2/glib/src/gobject.defs deleted file mode 100644 index 0c9f4b99ed..0000000000 --- a/libs/glibmm2/glib/src/gobject.defs +++ /dev/null @@ -1,3 +0,0 @@ -(include gobject_functions.defs) -(include gobject_enums.defs) - diff --git a/libs/glibmm2/glib/src/gobject_enums.defs b/libs/glibmm2/glib/src/gobject_enums.defs deleted file mode 100644 index d234bdb395..0000000000 --- a/libs/glibmm2/glib/src/gobject_enums.defs +++ /dev/null @@ -1,80 +0,0 @@ -;; From gobject/gparam.h - -(define-flags-extended ParamFlags - (in-module "G") - (c-name "GParamFlags") - (values - '("readable" "G_PARAM_READABLE" "1 << 0") - '("writable" "G_PARAM_WRITABLE" "1 << 1") - '("construct" "G_PARAM_CONSTRUCT" "1 << 2") - '("construct-only" "G_PARAM_CONSTRUCT_ONLY" "1 << 3") - '("lax-validation" "G_PARAM_LAX_VALIDATION" "1 << 4") - '("private" "G_PARAM_PRIVATE" "1 << 5") - ) -) - -;; From gobject/gsignal.h - -(define-flags-extended SignalFlags - (in-module "G") - (c-name "GSignalFlags") - (values - '("run-first" "G_SIGNAL_RUN_FIRST" "1 << 0") - '("run-last" "G_SIGNAL_RUN_LAST" "1 << 1") - '("run-cleanup" "G_SIGNAL_RUN_CLEANUP" "1 << 2") - '("no-recurse" "G_SIGNAL_NO_RECURSE" "1 << 3") - '("detailed" "G_SIGNAL_DETAILED" "1 << 4") - '("action" "G_SIGNAL_ACTION" "1 << 5") - '("no-hooks" "G_SIGNAL_NO_HOOKS" "1 << 6") - ) -) - -(define-flags-extended ConnectFlags - (in-module "G") - (c-name "GConnectFlags") - (values - '("after" "G_CONNECT_AFTER" "1 << 0") - '("swapped" "G_CONNECT_SWAPPED" "1 << 1") - ) -) - -(define-flags-extended SignalMatchType - (in-module "G") - (c-name "GSignalMatchType") - (values - '("id" "G_SIGNAL_MATCH_ID" "1 << 0") - '("detail" "G_SIGNAL_MATCH_DETAIL" "1 << 1") - '("closure" "G_SIGNAL_MATCH_CLOSURE" "1 << 2") - '("func" "G_SIGNAL_MATCH_FUNC" "1 << 3") - '("data" "G_SIGNAL_MATCH_DATA" "1 << 4") - '("unblocked" "G_SIGNAL_MATCH_UNBLOCKED" "1 << 5") - ) -) - -;; From gobject/gtype.h - -(define-flags-extended TypeDebugFlags - (in-module "G") - (c-name "GTypeDebugFlags") - (values - '("none" "G_TYPE_DEBUG_NONE" "0") - '("objects" "G_TYPE_DEBUG_OBJECTS" "1 << 0") - '("signals" "G_TYPE_DEBUG_SIGNALS" "1 << 1") - '("mask" "G_TYPE_DEBUG_MASK" "0x03") - ) -) - -(define-enum-extended TypeFundamentalFlags - (in-module "G") - (c-name "GTypeFundamentalFlags") - (values - ) -) - -(define-enum-extended TypeFlags - (in-module "G") - (c-name "GTypeFlags") - (values - ) -) - diff --git a/libs/glibmm2/glib/src/gobject_functions.defs b/libs/glibmm2/glib/src/gobject_functions.defs deleted file mode 100644 index f06327cace..0000000000 --- a/libs/glibmm2/glib/src/gobject_functions.defs +++ /dev/null @@ -1,2608 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object TypeModule - (in-module "G") - (parent "GObject") - (c-name "GTypeModule") - (gtype-id "G_TYPE_TYPE_MODULE") -) - -;; Enumerations and flags ... - -(define-flags ParamFlags - (in-module "G") - (c-name "GParamFlags") - (gtype-id "G_TYPE_PARAM_FLAGS") - (values - '("readable" "G_PARAM_READABLE") - '("writable" "G_PARAM_WRITABLE") - '("construct" "G_PARAM_CONSTRUCT") - '("construct-only" "G_PARAM_CONSTRUCT_ONLY") - '("lax-validation" "G_PARAM_LAX_VALIDATION") - '("private" "G_PARAM_PRIVATE") - ) -) - -(define-flags SignalFlags - (in-module "G") - (c-name "GSignalFlags") - (gtype-id "G_TYPE_SIGNAL_FLAGS") - (values - '("run-first" "G_SIGNAL_RUN_FIRST") - '("run-last" "G_SIGNAL_RUN_LAST") - '("run-cleanup" "G_SIGNAL_RUN_CLEANUP") - '("no-recurse" "G_SIGNAL_NO_RECURSE") - '("detailed" "G_SIGNAL_DETAILED") - '("action" "G_SIGNAL_ACTION") - '("no-hooks" "G_SIGNAL_NO_HOOKS") - ) -) - -(define-flags ConnectFlags - (in-module "G") - (c-name "GConnectFlags") - (gtype-id "G_TYPE_CONNECT_FLAGS") - (values - '("after" "G_CONNECT_AFTER") - '("swapped" "G_CONNECT_SWAPPED") - ) -) - -(define-flags SignalMatchType - (in-module "G") - (c-name "GSignalMatchType") - (gtype-id "G_TYPE_SIGNAL_MATCH_TYPE") - (values - '("id" "G_SIGNAL_MATCH_ID") - '("detail" "G_SIGNAL_MATCH_DETAIL") - '("closure" "G_SIGNAL_MATCH_CLOSURE") - '("func" "G_SIGNAL_MATCH_FUNC") - '("data" "G_SIGNAL_MATCH_DATA") - '("unblocked" "G_SIGNAL_MATCH_UNBLOCKED") - ) -) - -(define-flags TypeDebugFlags - (in-module "G") - (c-name "GTypeDebugFlags") - (gtype-id "G_TYPE_TYPE_DEBUG_FLAGS") - (values - '("none" "G_TYPE_DEBUG_NONE") - '("objects" "G_TYPE_DEBUG_OBJECTS") - '("signals" "G_TYPE_DEBUG_SIGNALS") - '("mask" "G_TYPE_DEBUG_MASK") - ) -) - -(define-flags TypeFundamentalFlags - (in-module "G") - (c-name "GTypeFundamentalFlags") - (gtype-id "G_TYPE_TYPE_FUNDAMENTAL_FLAGS") - (values - '("classed" "G_TYPE_FLAG_CLASSED") - '("instantiatable" "G_TYPE_FLAG_INSTANTIATABLE") - '("derivable" "G_TYPE_FLAG_DERIVABLE") - '("deep-derivable" "G_TYPE_FLAG_DEEP_DERIVABLE") - ) -) - -(define-flags TypeFlags - (in-module "G") - (c-name "GTypeFlags") - (gtype-id "G_TYPE_TYPE_FLAGS") - (values - '("abstract" "G_TYPE_FLAG_ABSTRACT") - '("value-abstract" "G_TYPE_FLAG_VALUE_ABSTRACT") - ) -) - - -;; From gobject/gboxed.h - -(define-function g_boxed_free - (c-name "g_boxed_free") - (return-type "none") - (parameters - '("GType" "boxed_type") - '("gpointer" "boxed") - ) -) - -(define-method set_boxed - (of-object "GValue") - (c-name "g_value_set_boxed") - (return-type "none") - (parameters - '("gconstpointer" "v_boxed") - ) -) - -(define-method set_static_boxed - (of-object "GValue") - (c-name "g_value_set_static_boxed") - (return-type "none") - (parameters - '("gconstpointer" "v_boxed") - ) -) - -(define-method get_boxed - (of-object "GValue") - (c-name "g_value_get_boxed") - (return-type "gpointer") -) - -(define-method dup_boxed - (of-object "GValue") - (c-name "g_value_dup_boxed") - (return-type "gpointer") -) - -(define-function g_boxed_type_register_static - (c-name "g_boxed_type_register_static") - (return-type "GType") - (parameters - '("const-gchar*" "name") - '("GBoxedCopyFunc" "boxed_copy") - '("GBoxedFreeFunc" "boxed_free") - ) -) - -(define-method set_boxed_take_ownership - (of-object "GValue") - (c-name "g_value_set_boxed_take_ownership") - (return-type "none") - (parameters - '("gconstpointer" "v_boxed") - ) -) - -(define-function g_closure_get_type - (c-name "g_closure_get_type") - (return-type "GType") -) - -(define-function g_value_get_type - (c-name "g_value_get_type") - (return-type "GType") -) - -(define-function g_value_array_get_type - (c-name "g_value_array_get_type") - (return-type "GType") -) - -(define-function g_gstring_get_type - (c-name "g_gstring_get_type") - (return-type "GType") -) - - - -;; From gobject/gclosure.h - -(define-function g_cclosure_new - (c-name "g_cclosure_new") - (return-type "GClosure*") - (parameters - '("GCallback" "callback_func") - '("gpointer" "user_data") - '("GClosureNotify" "destroy_data") - ) -) - -(define-function g_cclosure_new_swap - (c-name "g_cclosure_new_swap") - (return-type "GClosure*") - (parameters - '("GCallback" "callback_func") - '("gpointer" "user_data") - '("GClosureNotify" "destroy_data") - ) -) - -(define-function g_signal_type_cclosure_new - (c-name "g_signal_type_cclosure_new") - (return-type "GClosure*") - (parameters - '("GType" "itype") - '("guint" "struct_offset") - ) -) - -(define-method ref - (of-object "GClosure") - (c-name "g_closure_ref") - (return-type "GClosure*") -) - -(define-method sink - (of-object "GClosure") - (c-name "g_closure_sink") - (return-type "none") -) - -(define-method unref - (of-object "GClosure") - (c-name "g_closure_unref") - (return-type "none") -) - -(define-function g_closure_new_simple - (c-name "g_closure_new_simple") - (return-type "GClosure*") - (parameters - '("guint" "sizeof_closure") - '("gpointer" "data") - ) -) - -(define-method add_finalize_notifier - (of-object "GClosure") - (c-name "g_closure_add_finalize_notifier") - (return-type "none") - (parameters - '("gpointer" "notify_data") - '("GClosureNotify" "notify_func") - ) -) - -(define-method remove_finalize_notifier - (of-object "GClosure") - (c-name "g_closure_remove_finalize_notifier") - (return-type "none") - (parameters - '("gpointer" "notify_data") - '("GClosureNotify" "notify_func") - ) -) - -(define-method add_invalidate_notifier - (of-object "GClosure") - (c-name "g_closure_add_invalidate_notifier") - (return-type "none") - (parameters - '("gpointer" "notify_data") - '("GClosureNotify" "notify_func") - ) -) - -(define-method remove_invalidate_notifier - (of-object "GClosure") - (c-name "g_closure_remove_invalidate_notifier") - (return-type "none") - (parameters - '("gpointer" "notify_data") - '("GClosureNotify" "notify_func") - ) -) - -(define-method add_marshal_guards - (of-object "GClosure") - (c-name "g_closure_add_marshal_guards") - (return-type "none") - (parameters - '("gpointer" "pre_marshal_data") - '("GClosureNotify" "pre_marshal_notify") - '("gpointer" "post_marshal_data") - '("GClosureNotify" "post_marshal_notify") - ) -) - -(define-method set_marshal - (of-object "GClosure") - (c-name "g_closure_set_marshal") - (return-type "none") - (parameters - '("GClosureMarshal" "marshal") - ) -) - -(define-method set_meta_marshal - (of-object "GClosure") - (c-name "g_closure_set_meta_marshal") - (return-type "none") - (parameters - '("gpointer" "marshal_data") - '("GClosureMarshal" "meta_marshal") - ) -) - -(define-method invalidate - (of-object "GClosure") - (c-name "g_closure_invalidate") - (return-type "none") -) - -(define-method invoke - (of-object "GClosure") - (c-name "g_closure_invoke") - (return-type "none") - (parameters - '("GValue*" "return_value") - '("guint" "n_param_values") - '("const-GValue*" "param_values") - '("gpointer" "invocation_hint") - ) -) - - - -;; From gobject/genums.h - -(define-function g_enum_get_value - (c-name "g_enum_get_value") - (return-type "GEnumValue*") - (parameters - '("GEnumClass*" "enum_class") - '("gint" "value") - ) -) - -(define-function g_enum_get_value_by_name - (c-name "g_enum_get_value_by_name") - (return-type "GEnumValue*") - (parameters - '("GEnumClass*" "enum_class") - '("const-gchar*" "name") - ) -) - -(define-function g_enum_get_value_by_nick - (c-name "g_enum_get_value_by_nick") - (return-type "GEnumValue*") - (parameters - '("GEnumClass*" "enum_class") - '("const-gchar*" "nick") - ) -) - -(define-function g_flags_get_first_value - (c-name "g_flags_get_first_value") - (return-type "GFlagsValue*") - (parameters - '("GFlagsClass*" "flags_class") - '("guint" "value") - ) -) - -(define-function g_flags_get_value_by_name - (c-name "g_flags_get_value_by_name") - (return-type "GFlagsValue*") - (parameters - '("GFlagsClass*" "flags_class") - '("const-gchar*" "name") - ) -) - -(define-function g_flags_get_value_by_nick - (c-name "g_flags_get_value_by_nick") - (return-type "GFlagsValue*") - (parameters - '("GFlagsClass*" "flags_class") - '("const-gchar*" "nick") - ) -) - -(define-method set_enum - (of-object "GValue") - (c-name "g_value_set_enum") - (return-type "none") - (parameters - '("gint" "v_enum") - ) -) - -(define-method get_enum - (of-object "GValue") - (c-name "g_value_get_enum") - (return-type "gint") -) - -(define-method set_flags - (of-object "GValue") - (c-name "g_value_set_flags") - (return-type "none") - (parameters - '("guint" "v_flags") - ) -) - -(define-method get_flags - (of-object "GValue") - (c-name "g_value_get_flags") - (return-type "guint") -) - -(define-function g_enum_register_static - (c-name "g_enum_register_static") - (return-type "GType") - (parameters - '("const-gchar*" "name") - '("const-GEnumValue*" "const_static_values") - ) -) - -(define-function g_flags_register_static - (c-name "g_flags_register_static") - (return-type "GType") - (parameters - '("const-gchar*" "name") - '("const-GFlagsValue*" "const_static_values") - ) -) - -(define-function g_enum_complete_type_info - (c-name "g_enum_complete_type_info") - (return-type "none") - (parameters - '("GType" "g_enum_type") - '("GTypeInfo*" "info") - '("const-GEnumValue*" "const_values") - ) -) - -(define-function g_flags_complete_type_info - (c-name "g_flags_complete_type_info") - (return-type "none") - (parameters - '("GType" "g_flags_type") - '("GTypeInfo*" "info") - '("const-GFlagsValue*" "const_values") - ) -) - - - -;; From gobject/gmarshal.h - - - -;; From gobject/gobject.h - -(define-method install_property - (of-object "GObjectClass") - (c-name "g_object_class_install_property") - (return-type "none") - (parameters - '("guint" "property_id") - '("GParamSpec*" "pspec") - ) -) - -(define-method find_property - (of-object "GObjectClass") - (c-name "g_object_class_find_property") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "property_name") - ) -) - -(define-function g_object_new - (c-name "g_object_new") - (return-type "gpointer") - (parameters - '("GType" "object_type") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-function g_object_newv - (c-name "g_object_newv") - (return-type "gpointer") - (parameters - '("GType" "object_type") - '("guint" "n_parameters") - '("GParameter*" "parameters") - ) -) - -(define-function g_object_new_valist - (c-name "g_object_new_valist") - (return-type "GObject*") - (parameters - '("GType" "object_type") - '("const-gchar*" "first_property_name") - '("va_list" "var_args") - ) -) - -(define-function g_object_set - (c-name "g_object_set") - (return-type "none") - (parameters - '("gpointer" "object") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-function g_object_get - (c-name "g_object_get") - (return-type "none") - (parameters - '("gpointer" "object") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-function g_object_connect - (c-name "g_object_connect") - (return-type "gpointer") - (parameters - '("gpointer" "object") - '("const-gchar*" "signal_spec") - ) - (varargs #t) -) - -(define-function g_object_disconnect - (c-name "g_object_disconnect") - (return-type "none") - (parameters - '("gpointer" "object") - '("const-gchar*" "signal_spec") - ) - (varargs #t) -) - -(define-method set_valist - (of-object "GObject") - (c-name "g_object_set_valist") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - '("va_list" "var_args") - ) -) - -(define-method get_valist - (of-object "GObject") - (c-name "g_object_get_valist") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - '("va_list" "var_args") - ) -) - -(define-method set_property - (of-object "GObject") - (c-name "g_object_set_property") - (return-type "none") - (parameters - '("const-gchar*" "property_name") - '("const-GValue*" "value") - ) -) - -(define-method get_property - (of-object "GObject") - (c-name "g_object_get_property") - (return-type "none") - (parameters - '("const-gchar*" "property_name") - '("GValue*" "value") - ) -) - -(define-method freeze_notify - (of-object "GObject") - (c-name "g_object_freeze_notify") - (return-type "none") -) - -(define-method notify - (of-object "GObject") - (c-name "g_object_notify") - (return-type "none") - (parameters - '("const-gchar*" "property_name") - ) -) - -(define-method thaw_notify - (of-object "GObject") - (c-name "g_object_thaw_notify") - (return-type "none") -) - -(define-function g_object_ref - (c-name "g_object_ref") - (return-type "gpointer") - (parameters - '("gpointer" "object") - ) -) - -(define-function g_object_unref - (c-name "g_object_unref") - (return-type "none") - (parameters - '("gpointer" "object") - ) -) - -(define-method weak_ref - (of-object "GObject") - (c-name "g_object_weak_ref") - (return-type "none") - (parameters - '("GWeakNotify" "notify") - '("gpointer" "data") - ) -) - -(define-method weak_unref - (of-object "GObject") - (c-name "g_object_weak_unref") - (return-type "none") - (parameters - '("GWeakNotify" "notify") - '("gpointer" "data") - ) -) - -(define-method add_weak_pointer - (of-object "GObject") - (c-name "g_object_add_weak_pointer") - (return-type "none") - (parameters - '("gpointer*" "weak_pointer_location") - ) -) - -(define-method remove_weak_pointer - (of-object "GObject") - (c-name "g_object_remove_weak_pointer") - (return-type "none") - (parameters - '("gpointer*" "weak_pointer_location") - ) -) - -(define-method get_qdata - (of-object "GObject") - (c-name "g_object_get_qdata") - (return-type "gpointer") - (parameters - '("GQuark" "quark") - ) -) - -(define-method set_qdata - (of-object "GObject") - (c-name "g_object_set_qdata") - (return-type "none") - (parameters - '("GQuark" "quark") - '("gpointer" "data") - ) -) - -(define-method set_qdata_full - (of-object "GObject") - (c-name "g_object_set_qdata_full") - (return-type "none") - (parameters - '("GQuark" "quark") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method steal_qdata - (of-object "GObject") - (c-name "g_object_steal_qdata") - (return-type "gpointer") - (parameters - '("GQuark" "quark") - ) -) - -(define-method get_data - (of-object "GObject") - (c-name "g_object_get_data") - (return-type "gpointer") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method set_data - (of-object "GObject") - (c-name "g_object_set_data") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gpointer" "data") - ) -) - -(define-method set_data_full - (of-object "GObject") - (c-name "g_object_set_data_full") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method steal_data - (of-object "GObject") - (c-name "g_object_steal_data") - (return-type "gpointer") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method watch_closure - (of-object "GObject") - (c-name "g_object_watch_closure") - (return-type "none") - (parameters - '("GClosure*" "closure") - ) -) - -(define-function g_cclosure_new_object - (c-name "g_cclosure_new_object") - (return-type "GClosure*") - (parameters - '("GCallback" "callback_func") - '("GObject*" "object") - ) -) - -(define-function g_cclosure_new_object_swap - (c-name "g_cclosure_new_object_swap") - (return-type "GClosure*") - (parameters - '("GCallback" "callback_func") - '("GObject*" "object") - ) -) - -(define-function g_closure_new_object - (c-name "g_closure_new_object") - (return-type "GClosure*") - (parameters - '("guint" "sizeof_closure") - '("GObject*" "object") - ) -) - -(define-method set_object - (of-object "GValue") - (c-name "g_value_set_object") - (return-type "none") - (parameters - '("gpointer" "v_object") - ) -) - -(define-method get_object - (of-object "GValue") - (c-name "g_value_get_object") - (return-type "gpointer") -) - -(define-method dup_object - (of-object "GValue") - (c-name "g_value_dup_object") - (return-type "GObject*") -) - -(define-function g_signal_connect_object - (c-name "g_signal_connect_object") - (return-type "gulong") - (parameters - '("gpointer" "instance") - '("const-gchar*" "detailed_signal") - '("GCallback" "c_handler") - '("gpointer" "gobject") - '("GConnectFlags" "connect_flags") - ) -) - -(define-method run_dispose - (of-object "GObject") - (c-name "g_object_run_dispose") - (return-type "none") -) - -(define-method set_object_take_ownership - (of-object "GValue") - (c-name "g_value_set_object_take_ownership") - (return-type "none") - (parameters - '("gpointer" "v_object") - ) -) - - - -;; From gobject/gparam.h - -(define-method ref - (of-object "GParamSpec") - (c-name "g_param_spec_ref") - (return-type "GParamSpec*") -) - -(define-method unref - (of-object "GParamSpec") - (c-name "g_param_spec_unref") - (return-type "none") -) - -(define-method sink - (of-object "GParamSpec") - (c-name "g_param_spec_sink") - (return-type "none") -) - -(define-method get_qdata - (of-object "GParamSpec") - (c-name "g_param_spec_get_qdata") - (return-type "gpointer") - (parameters - '("GQuark" "quark") - ) -) - -(define-method set_qdata - (of-object "GParamSpec") - (c-name "g_param_spec_set_qdata") - (return-type "none") - (parameters - '("GQuark" "quark") - '("gpointer" "data") - ) -) - -(define-method set_qdata_full - (of-object "GParamSpec") - (c-name "g_param_spec_set_qdata_full") - (return-type "none") - (parameters - '("GQuark" "quark") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method steal_qdata - (of-object "GParamSpec") - (c-name "g_param_spec_steal_qdata") - (return-type "gpointer") - (parameters - '("GQuark" "quark") - ) -) - -(define-function g_param_value_set_default - (c-name "g_param_value_set_default") - (return-type "none") - (parameters - '("GParamSpec*" "pspec") - '("GValue*" "value") - ) -) - -(define-function g_param_value_defaults - (c-name "g_param_value_defaults") - (return-type "gboolean") - (parameters - '("GParamSpec*" "pspec") - '("GValue*" "value") - ) -) - -(define-function g_param_value_validate - (c-name "g_param_value_validate") - (return-type "gboolean") - (parameters - '("GParamSpec*" "pspec") - '("GValue*" "value") - ) -) - -(define-function g_param_value_convert - (c-name "g_param_value_convert") - (return-type "gboolean") - (parameters - '("GParamSpec*" "pspec") - '("const-GValue*" "src_value") - '("GValue*" "dest_value") - '("gboolean" "strict_validation") - ) -) - -(define-function g_param_values_cmp - (c-name "g_param_values_cmp") - (return-type "gint") - (parameters - '("GParamSpec*" "pspec") - '("const-GValue*" "value1") - '("const-GValue*" "value2") - ) -) - -(define-method get_name - (of-object "GParamSpec") - (c-name "g_param_spec_get_name") - (return-type "const-gchar*") -) - -(define-method get_nick - (of-object "GParamSpec") - (c-name "g_param_spec_get_nick") - (return-type "const-gchar*") -) - -(define-method get_blurb - (of-object "GParamSpec") - (c-name "g_param_spec_get_blurb") - (return-type "const-gchar*") -) - -(define-method set_param - (of-object "GValue") - (c-name "g_value_set_param") - (return-type "none") - (parameters - '("GParamSpec*" "param") - ) -) - -(define-method get_param - (of-object "GValue") - (c-name "g_value_get_param") - (return-type "GParamSpec*") -) - -(define-method dup_param - (of-object "GValue") - (c-name "g_value_dup_param") - (return-type "GParamSpec*") -) - -(define-method set_param_take_ownership - (of-object "GValue") - (c-name "g_value_set_param_take_ownership") - (return-type "none") - (parameters - '("GParamSpec*" "param") - ) -) - -(define-function g_param_type_register_static - (c-name "g_param_type_register_static") - (return-type "GType") - (parameters - '("const-gchar*" "name") - '("const-GParamSpecTypeInfo*" "pspec_info") - ) -) - -(define-function _g_param_type_register_static_constant - (c-name "_g_param_type_register_static_constant") - (return-type "GType") - (parameters - '("const-gchar*" "name") - '("const-GParamSpecTypeInfo*" "pspec_info") - '("GType" "opt_type") - ) -) - -(define-function g_param_spec_internal - (c-name "g_param_spec_internal") - (return-type "gpointer") - (parameters - '("GType" "param_type") - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_pool_new - (c-name "g_param_spec_pool_new") - (return-type "GParamSpecPool*") - (parameters - '("gboolean" "type_prefixing") - ) -) - -(define-method insert - (of-object "GParamSpecPool") - (c-name "g_param_spec_pool_insert") - (return-type "none") - (parameters - '("GParamSpec*" "pspec") - '("GType" "owner_type") - ) -) - -(define-method remove - (of-object "GParamSpecPool") - (c-name "g_param_spec_pool_remove") - (return-type "none") - (parameters - '("GParamSpec*" "pspec") - ) -) - -(define-method lookup - (of-object "GParamSpecPool") - (c-name "g_param_spec_pool_lookup") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "param_name") - '("GType" "owner_type") - '("gboolean" "walk_ancestors") - ) -) - -(define-method list_owned - (of-object "GParamSpecPool") - (c-name "g_param_spec_pool_list_owned") - (return-type "GList*") - (parameters - '("GType" "owner_type") - ) -) - -(define-method list - (of-object "GParamSpecPool") - (c-name "g_param_spec_pool_list") - (return-type "GParamSpec**") - (parameters - '("GType" "owner_type") - '("guint*" "n_pspecs_p") - ) -) - - - -;; From gobject/gparamspecs.h - -(define-function g_param_spec_char - (c-name "g_param_spec_char") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gint8" "minimum") - '("gint8" "maximum") - '("gint8" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_uchar - (c-name "g_param_spec_uchar") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("guint8" "minimum") - '("guint8" "maximum") - '("guint8" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_boolean - (c-name "g_param_spec_boolean") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gboolean" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_int - (c-name "g_param_spec_int") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gint" "minimum") - '("gint" "maximum") - '("gint" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_uint - (c-name "g_param_spec_uint") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("guint" "minimum") - '("guint" "maximum") - '("guint" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_long - (c-name "g_param_spec_long") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("glong" "minimum") - '("glong" "maximum") - '("glong" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_ulong - (c-name "g_param_spec_ulong") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gulong" "minimum") - '("gulong" "maximum") - '("gulong" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_int64 - (c-name "g_param_spec_int64") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gint64" "minimum") - '("gint64" "maximum") - '("gint64" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_uint64 - (c-name "g_param_spec_uint64") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("guint64" "minimum") - '("guint64" "maximum") - '("guint64" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_unichar - (c-name "g_param_spec_unichar") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gunichar" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_enum - (c-name "g_param_spec_enum") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GType" "enum_type") - '("gint" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_flags - (c-name "g_param_spec_flags") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GType" "flags_type") - '("guint" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_float - (c-name "g_param_spec_float") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gfloat" "minimum") - '("gfloat" "maximum") - '("gfloat" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_double - (c-name "g_param_spec_double") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("gdouble" "minimum") - '("gdouble" "maximum") - '("gdouble" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_string - (c-name "g_param_spec_string") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("const-gchar*" "default_value") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_param - (c-name "g_param_spec_param") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GType" "param_type") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_boxed - (c-name "g_param_spec_boxed") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GType" "boxed_type") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_pointer - (c-name "g_param_spec_pointer") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_value_array - (c-name "g_param_spec_value_array") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GParamSpec*" "element_spec") - '("GParamFlags" "flags") - ) -) - -(define-function g_param_spec_object - (c-name "g_param_spec_object") - (return-type "GParamSpec*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "nick") - '("const-gchar*" "blurb") - '("GType" "object_type") - '("GParamFlags" "flags") - ) -) - - - -;; From gobject/gsignal.h - -(define-function g_signal_newv - (c-name "g_signal_newv") - (return-type "guint") - (parameters - '("const-gchar*" "signal_name") - '("GType" "itype") - '("GSignalFlags" "signal_flags") - '("GClosure*" "class_closure") - '("GSignalAccumulator" "accumulator") - '("gpointer" "accu_data") - '("GSignalCMarshaller" "c_marshaller") - '("GType" "return_type") - '("guint" "n_params") - '("GType*" "param_types") - ) -) - -(define-function g_signal_new_valist - (c-name "g_signal_new_valist") - (return-type "guint") - (parameters - '("const-gchar*" "signal_name") - '("GType" "itype") - '("GSignalFlags" "signal_flags") - '("GClosure*" "class_closure") - '("GSignalAccumulator" "accumulator") - '("gpointer" "accu_data") - '("GSignalCMarshaller" "c_marshaller") - '("GType" "return_type") - '("guint" "n_params") - '("va_list" "args") - ) -) - -(define-function g_signal_new - (c-name "g_signal_new") - (return-type "guint") - (parameters - '("const-gchar*" "signal_name") - '("GType" "itype") - '("GSignalFlags" "signal_flags") - '("guint" "class_offset") - '("GSignalAccumulator" "accumulator") - '("gpointer" "accu_data") - '("GSignalCMarshaller" "c_marshaller") - '("GType" "return_type") - '("guint" "n_params") - ) - (varargs #t) -) - -(define-function g_signal_emitv - (c-name "g_signal_emitv") - (return-type "none") - (parameters - '("const-GValue*" "instance_and_params") - '("guint" "signal_id") - '("GQuark" "detail") - '("GValue*" "return_value") - ) -) - -(define-function g_signal_emit_valist - (c-name "g_signal_emit_valist") - (return-type "none") - (parameters - '("gpointer" "instance") - '("guint" "signal_id") - '("GQuark" "detail") - '("va_list" "var_args") - ) -) - -(define-function g_signal_emit - (c-name "g_signal_emit") - (return-type "none") - (parameters - '("gpointer" "instance") - '("guint" "signal_id") - '("GQuark" "detail") - ) - (varargs #t) -) - -(define-function g_signal_emit_by_name - (c-name "g_signal_emit_by_name") - (return-type "none") - (parameters - '("gpointer" "instance") - '("const-gchar*" "detailed_signal") - ) - (varargs #t) -) - -(define-function g_signal_lookup - (c-name "g_signal_lookup") - (return-type "guint") - (parameters - '("const-gchar*" "name") - '("GType" "itype") - ) -) - -(define-function g_signal_name - (c-name "g_signal_name") - (return-type "const-gchar*") - (parameters - '("guint" "signal_id") - ) -) - -(define-function g_signal_query - (c-name "g_signal_query") - (return-type "none") - (parameters - '("guint" "signal_id") - '("GSignalQuery*" "query") - ) -) - -(define-function g_signal_list_ids - (c-name "g_signal_list_ids") - (return-type "guint*") - (parameters - '("GType" "itype") - '("guint*" "n_ids") - ) -) - -(define-function g_signal_parse_name - (c-name "g_signal_parse_name") - (return-type "gboolean") - (parameters - '("const-gchar*" "detailed_signal") - '("GType" "itype") - '("guint*" "signal_id_p") - '("GQuark*" "detail_p") - '("gboolean" "force_detail_quark") - ) -) - -(define-function g_signal_get_invocation_hint - (c-name "g_signal_get_invocation_hint") - (return-type "GSignalInvocationHint*") - (parameters - '("gpointer" "instance") - ) -) - -(define-function g_signal_stop_emission - (c-name "g_signal_stop_emission") - (return-type "none") - (parameters - '("gpointer" "instance") - '("guint" "signal_id") - '("GQuark" "detail") - ) -) - -(define-function g_signal_stop_emission_by_name - (c-name "g_signal_stop_emission_by_name") - (return-type "none") - (parameters - '("gpointer" "instance") - '("const-gchar*" "detailed_signal") - ) -) - -(define-function g_signal_add_emission_hook - (c-name "g_signal_add_emission_hook") - (return-type "gulong") - (parameters - '("guint" "signal_id") - '("GQuark" "quark") - '("GSignalEmissionHook" "hook_func") - '("gpointer" "hook_data") - '("GDestroyNotify" "data_destroy") - ) -) - -(define-function g_signal_remove_emission_hook - (c-name "g_signal_remove_emission_hook") - (return-type "none") - (parameters - '("guint" "signal_id") - '("gulong" "hook_id") - ) -) - -(define-function g_signal_has_handler_pending - (c-name "g_signal_has_handler_pending") - (return-type "gboolean") - (parameters - '("gpointer" "instance") - '("guint" "signal_id") - '("GQuark" "detail") - '("gboolean" "may_be_blocked") - ) -) - -(define-function g_signal_connect_closure_by_id - (c-name "g_signal_connect_closure_by_id") - (return-type "gulong") - (parameters - '("gpointer" "instance") - '("guint" "signal_id") - '("GQuark" "detail") - '("GClosure*" "closure") - '("gboolean" "after") - ) -) - -(define-function g_signal_connect_closure - (c-name "g_signal_connect_closure") - (return-type "gulong") - (parameters - '("gpointer" "instance") - '("const-gchar*" "detailed_signal") - '("GClosure*" "closure") - '("gboolean" "after") - ) -) - -(define-function g_signal_connect_data - (c-name "g_signal_connect_data") - (return-type "gulong") - (parameters - '("gpointer" "instance") - '("const-gchar*" "detailed_signal") - '("GCallback" "c_handler") - '("gpointer" "data") - '("GClosureNotify" "destroy_data") - '("GConnectFlags" "connect_flags") - ) -) - -(define-function g_signal_handler_block - (c-name "g_signal_handler_block") - (return-type "none") - (parameters - '("gpointer" "instance") - '("gulong" "handler_id") - ) -) - -(define-function g_signal_handler_unblock - (c-name "g_signal_handler_unblock") - (return-type "none") - (parameters - '("gpointer" "instance") - '("gulong" "handler_id") - ) -) - -(define-function g_signal_handler_disconnect - (c-name "g_signal_handler_disconnect") - (return-type "none") - (parameters - '("gpointer" "instance") - '("gulong" "handler_id") - ) -) - -(define-function g_signal_handler_is_connected - (c-name "g_signal_handler_is_connected") - (return-type "gboolean") - (parameters - '("gpointer" "instance") - '("gulong" "handler_id") - ) -) - -(define-function g_signal_handler_find - (c-name "g_signal_handler_find") - (return-type "gulong") - (parameters - '("gpointer" "instance") - '("GSignalMatchType" "mask") - '("guint" "signal_id") - '("GQuark" "detail") - '("GClosure*" "closure") - '("gpointer" "func") - '("gpointer" "data") - ) -) - -(define-function g_signal_handlers_block_matched - (c-name "g_signal_handlers_block_matched") - (return-type "guint") - (parameters - '("gpointer" "instance") - '("GSignalMatchType" "mask") - '("guint" "signal_id") - '("GQuark" "detail") - '("GClosure*" "closure") - '("gpointer" "func") - '("gpointer" "data") - ) -) - -(define-function g_signal_handlers_unblock_matched - (c-name "g_signal_handlers_unblock_matched") - (return-type "guint") - (parameters - '("gpointer" "instance") - '("GSignalMatchType" "mask") - '("guint" "signal_id") - '("GQuark" "detail") - '("GClosure*" "closure") - '("gpointer" "func") - '("gpointer" "data") - ) -) - -(define-function g_signal_handlers_disconnect_matched - (c-name "g_signal_handlers_disconnect_matched") - (return-type "guint") - (parameters - '("gpointer" "instance") - '("GSignalMatchType" "mask") - '("guint" "signal_id") - '("GQuark" "detail") - '("GClosure*" "closure") - '("gpointer" "func") - '("gpointer" "data") - ) -) - -(define-function g_signal_override_class_closure - (c-name "g_signal_override_class_closure") - (return-type "none") - (parameters - '("guint" "signal_id") - '("GType" "instance_type") - '("GClosure*" "class_closure") - ) -) - -(define-function g_signal_chain_from_overridden - (c-name "g_signal_chain_from_overridden") - (return-type "none") - (parameters - '("const-GValue*" "instance_and_params") - '("GValue*" "return_value") - ) -) - -(define-function _g_signals_destroy - (c-name "_g_signals_destroy") - (return-type "none") - (parameters - '("GType" "itype") - ) -) - - - -;; From gobject/gsourceclosure.h - -(define-function g_io_channel_get_type - (c-name "g_io_channel_get_type") - (return-type "GType") -) - -(define-function g_io_condition_get_type - (c-name "g_io_condition_get_type") - (return-type "GType") -) - - - -;; From gobject/gtype.h - -(define-function g_type_init - (c-name "g_type_init") - (return-type "none") -) - -(define-function g_type_init_with_debug_flags - (c-name "g_type_init_with_debug_flags") - (return-type "none") - (parameters - '("GTypeDebugFlags" "debug_flags") - ) -) - -(define-method name - (of-object "GType") - (c-name "g_type_name") - (return-type "const-gchar*") -) - -(define-method qname - (of-object "GType") - (c-name "g_type_qname") - (return-type "GQuark") -) - -(define-function g_type_from_name - (c-name "g_type_from_name") - (return-type "GType") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method parent - (of-object "GType") - (c-name "g_type_parent") - (return-type "GType") -) - -(define-method depth - (of-object "GType") - (c-name "g_type_depth") - (return-type "guint") -) - -(define-method next_base - (of-object "GType") - (c-name "g_type_next_base") - (return-type "GType") - (parameters - '("GType" "root_type") - ) -) - -(define-method is_a - (of-object "GType") - (c-name "g_type_is_a") - (return-type "gboolean") - (parameters - '("GType" "is_a_type") - ) -) - -(define-method class_ref - (of-object "GType") - (c-name "g_type_class_ref") - (return-type "gpointer") -) - -(define-method class_peek - (of-object "GType") - (c-name "g_type_class_peek") - (return-type "gpointer") -) - -(define-function g_type_class_unref - (c-name "g_type_class_unref") - (return-type "none") - (parameters - '("gpointer" "g_class") - ) -) - -(define-function g_type_class_peek_parent - (c-name "g_type_class_peek_parent") - (return-type "gpointer") - (parameters - '("gpointer" "g_class") - ) -) - -(define-function g_type_interface_peek - (c-name "g_type_interface_peek") - (return-type "gpointer") - (parameters - '("gpointer" "instance_class") - '("GType" "iface_type") - ) -) - -(define-function g_type_interface_peek_parent - (c-name "g_type_interface_peek_parent") - (return-type "gpointer") - (parameters - '("gpointer" "g_iface") - ) -) - -(define-method children - (of-object "GType") - (c-name "g_type_children") - (return-type "GType*") - (parameters - '("guint*" "n_children") - ) -) - -(define-method interfaces - (of-object "GType") - (c-name "g_type_interfaces") - (return-type "GType*") - (parameters - '("guint*" "n_interfaces") - ) -) - -(define-method set_qdata - (of-object "GType") - (c-name "g_type_set_qdata") - (return-type "none") - (parameters - '("GQuark" "quark") - '("gpointer" "data") - ) -) - -(define-method get_qdata - (of-object "GType") - (c-name "g_type_get_qdata") - (return-type "gpointer") - (parameters - '("GQuark" "quark") - ) -) - -(define-method query - (of-object "GType") - (c-name "g_type_query") - (return-type "none") - (parameters - '("GTypeQuery*" "query") - ) -) - -(define-method register_static - (of-object "GType") - (c-name "g_type_register_static") - (return-type "GType") - (parameters - '("const-gchar*" "type_name") - '("const-GTypeInfo*" "info") - '("GTypeFlags" "flags") - ) -) - -(define-method register_dynamic - (of-object "GType") - (c-name "g_type_register_dynamic") - (return-type "GType") - (parameters - '("const-gchar*" "type_name") - '("GTypePlugin*" "plugin") - '("GTypeFlags" "flags") - ) -) - -(define-method register_fundamental - (of-object "GType") - (c-name "g_type_register_fundamental") - (return-type "GType") - (parameters - '("const-gchar*" "type_name") - '("const-GTypeInfo*" "info") - '("const-GTypeFundamentalInfo*" "finfo") - '("GTypeFlags" "flags") - ) -) - -(define-method add_interface_static - (of-object "GType") - (c-name "g_type_add_interface_static") - (return-type "none") - (parameters - '("GType" "interface_type") - '("const-GInterfaceInfo*" "info") - ) -) - -(define-method add_interface_dynamic - (of-object "GType") - (c-name "g_type_add_interface_dynamic") - (return-type "none") - (parameters - '("GType" "interface_type") - '("GTypePlugin*" "plugin") - ) -) - -(define-method interface_add_prerequisite - (of-object "GType") - (c-name "g_type_interface_add_prerequisite") - (return-type "none") - (parameters - '("GType" "prerequisite_type") - ) -) - -(define-method get_plugin - (of-object "GType") - (c-name "g_type_get_plugin") - (return-type "GTypePlugin*") -) - -(define-method interface_get_plugin - (of-object "GType") - (c-name "g_type_interface_get_plugin") - (return-type "GTypePlugin*") - (parameters - '("GType" "implementation_type") - ) -) - -(define-function g_type_fundamental_next - (c-name "g_type_fundamental_next") - (return-type "GType") -) - -(define-method fundamental - (of-object "GType") - (c-name "g_type_fundamental") - (return-type "GType") -) - -(define-method create_instance - (of-object "GType") - (c-name "g_type_create_instance") - (return-type "GTypeInstance*") -) - -(define-function g_type_free_instance - (c-name "g_type_free_instance") - (return-type "none") - (parameters - '("GTypeInstance*" "instance") - ) -) - -(define-function g_type_add_class_cache_func - (c-name "g_type_add_class_cache_func") - (return-type "none") - (parameters - '("gpointer" "cache_data") - '("GTypeClassCacheFunc" "cache_func") - ) -) - -(define-function g_type_remove_class_cache_func - (c-name "g_type_remove_class_cache_func") - (return-type "none") - (parameters - '("gpointer" "cache_data") - '("GTypeClassCacheFunc" "cache_func") - ) -) - -(define-function g_type_class_unref_uncached - (c-name "g_type_class_unref_uncached") - (return-type "none") - (parameters - '("gpointer" "g_class") - ) -) - -(define-method value_table_peek - (of-object "GType") - (c-name "g_type_value_table_peek") - (return-type "GTypeValueTable*") -) - -(define-function g_type_check_instance - (c-name "g_type_check_instance") - (return-type "gboolean") - (parameters - '("GTypeInstance*" "instance") - ) -) - -(define-function g_type_check_instance_cast - (c-name "g_type_check_instance_cast") - (return-type "GTypeInstance*") - (parameters - '("GTypeInstance*" "instance") - '("GType" "iface_type") - ) -) - -(define-function g_type_check_instance_is_a - (c-name "g_type_check_instance_is_a") - (return-type "gboolean") - (parameters - '("GTypeInstance*" "instance") - '("GType" "iface_type") - ) -) - -(define-function g_type_check_class_cast - (c-name "g_type_check_class_cast") - (return-type "GTypeClass*") - (parameters - '("GTypeClass*" "g_class") - '("GType" "is_a_type") - ) -) - -(define-function g_type_check_class_is_a - (c-name "g_type_check_class_is_a") - (return-type "gboolean") - (parameters - '("GTypeClass*" "g_class") - '("GType" "is_a_type") - ) -) - -(define-method check_is_value_type - (of-object "GType") - (c-name "g_type_check_is_value_type") - (return-type "gboolean") -) - -(define-function g_type_check_value - (c-name "g_type_check_value") - (return-type "gboolean") - (parameters - '("GValue*" "value") - ) -) - -(define-function g_type_check_value_holds - (c-name "g_type_check_value_holds") - (return-type "gboolean") - (parameters - '("GValue*" "value") - '("GType" "type") - ) -) - -(define-method test_flags - (of-object "GType") - (c-name "g_type_test_flags") - (return-type "gboolean") - (parameters - '("guint" "flags") - ) -) - -(define-function g_type_name_from_instance - (c-name "g_type_name_from_instance") - (return-type "const-gchar*") - (parameters - '("GTypeInstance*" "instance") - ) -) - -(define-function g_type_name_from_class - (c-name "g_type_name_from_class") - (return-type "const-gchar*") - (parameters - '("GTypeClass*" "g_class") - ) -) - - - -;; From gobject/gtypemodule.h - -(define-function g_type_module_get_type - (c-name "g_type_module_get_type") - (return-type "GType") -) - -(define-method use - (of-object "GTypeModule") - (c-name "g_type_module_use") - (return-type "gboolean") -) - -(define-method unuse - (of-object "GTypeModule") - (c-name "g_type_module_unuse") - (return-type "none") -) - -(define-method set_name - (of-object "GTypeModule") - (c-name "g_type_module_set_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method register_type - (of-object "GTypeModule") - (c-name "g_type_module_register_type") - (return-type "GType") - (parameters - '("GType" "parent_type") - '("const-gchar*" "type_name") - '("const-GTypeInfo*" "type_info") - '("GTypeFlags" "flags") - ) -) - -(define-method add_interface - (of-object "GTypeModule") - (c-name "g_type_module_add_interface") - (return-type "none") - (parameters - '("GType" "instance_type") - '("GType" "interface_type") - '("const-GInterfaceInfo*" "interface_info") - ) -) - - - -;; From gobject/gtypeplugin.h - -(define-function g_type_plugin_get_type - (c-name "g_type_plugin_get_type") - (return-type "GType") -) - -(define-method use - (of-object "GTypePlugin") - (c-name "g_type_plugin_use") - (return-type "none") -) - -(define-method unuse - (of-object "GTypePlugin") - (c-name "g_type_plugin_unuse") - (return-type "none") -) - -(define-method complete_type_info - (of-object "GTypePlugin") - (c-name "g_type_plugin_complete_type_info") - (return-type "none") - (parameters - '("GType" "g_type") - '("GTypeInfo*" "info") - '("GTypeValueTable*" "value_table") - ) -) - -(define-method complete_interface_info - (of-object "GTypePlugin") - (c-name "g_type_plugin_complete_interface_info") - (return-type "none") - (parameters - '("GType" "interface_type") - '("GType" "instance_type") - '("GInterfaceInfo*" "info") - ) -) - - - -;; From gobject/gvaluearray.h - -(define-method get_nth - (of-object "GValueArray") - (c-name "g_value_array_get_nth") - (return-type "GValue*") - (parameters - '("guint" "index") - ) -) - -(define-function g_value_array_new - (c-name "g_value_array_new") - (return-type "GValueArray*") - (parameters - '("guint" "n_prealloced") - ) -) - -(define-method free - (of-object "GValueArray") - (c-name "g_value_array_free") - (return-type "none") -) - -(define-method copy - (of-object "GValueArray") - (c-name "g_value_array_copy") - (return-type "GValueArray*") -) - -(define-method prepend - (of-object "GValueArray") - (c-name "g_value_array_prepend") - (return-type "GValueArray*") - (parameters - '("const-GValue*" "value") - ) -) - -(define-method append - (of-object "GValueArray") - (c-name "g_value_array_append") - (return-type "GValueArray*") - (parameters - '("const-GValue*" "value") - ) -) - -(define-method insert - (of-object "GValueArray") - (c-name "g_value_array_insert") - (return-type "GValueArray*") - (parameters - '("guint" "index") - '("const-GValue*" "value") - ) -) - -(define-method remove - (of-object "GValueArray") - (c-name "g_value_array_remove") - (return-type "GValueArray*") - (parameters - '("guint" "index") - ) -) - -(define-method sort - (of-object "GValueArray") - (c-name "g_value_array_sort") - (return-type "GValueArray*") - (parameters - '("GCompareFunc" "compare_func") - ) -) - -(define-method sort_with_data - (of-object "GValueArray") - (c-name "g_value_array_sort_with_data") - (return-type "GValueArray*") - (parameters - '("GCompareDataFunc" "compare_func") - '("gpointer" "user_data") - ) -) - - - -;; From gobject/gvaluecollector.h - - - -;; From gobject/gvalue.h - -(define-method init - (of-object "GValue") - (c-name "g_value_init") - (return-type "GValue*") - (parameters - '("GType" "g_type") - ) -) - -(define-method copy - (of-object "GValue") - (c-name "g_value_copy") - (return-type "none") - (parameters - '("GValue*" "dest_value") - ) -) - -(define-method reset - (of-object "GValue") - (c-name "g_value_reset") - (return-type "GValue*") -) - -(define-method unset - (of-object "GValue") - (c-name "g_value_unset") - (return-type "none") -) - -(define-method set_instance - (of-object "GValue") - (c-name "g_value_set_instance") - (return-type "none") - (parameters - '("gpointer" "instance") - ) -) - -(define-method fits_pointer - (of-object "GValue") - (c-name "g_value_fits_pointer") - (return-type "gboolean") -) - -(define-method peek_pointer - (of-object "GValue") - (c-name "g_value_peek_pointer") - (return-type "gpointer") -) - -(define-function g_value_type_compatible - (c-name "g_value_type_compatible") - (return-type "gboolean") - (parameters - '("GType" "src_type") - '("GType" "dest_type") - ) -) - -(define-function g_value_type_transformable - (c-name "g_value_type_transformable") - (return-type "gboolean") - (parameters - '("GType" "src_type") - '("GType" "dest_type") - ) -) - -(define-method transform - (of-object "GValue") - (c-name "g_value_transform") - (return-type "gboolean") - (parameters - '("GValue*" "dest_value") - ) -) - -(define-function g_value_register_transform_func - (c-name "g_value_register_transform_func") - (return-type "none") - (parameters - '("GType" "src_type") - '("GType" "dest_type") - '("GValueTransform" "transform_func") - ) -) - - - -;; From gobject/gvaluetypes.h - -(define-method get_char - (of-object "GValue") - (c-name "g_value_get_char") - (return-type "gchar") -) - -(define-method set_uchar - (of-object "GValue") - (c-name "g_value_set_uchar") - (return-type "none") - (parameters - '("guchar" "v_uchar") - ) -) - -(define-method get_uchar - (of-object "GValue") - (c-name "g_value_get_uchar") - (return-type "guchar") -) - -(define-method set_boolean - (of-object "GValue") - (c-name "g_value_set_boolean") - (return-type "none") - (parameters - '("gboolean" "v_boolean") - ) -) - -(define-method get_boolean - (of-object "GValue") - (c-name "g_value_get_boolean") - (return-type "gboolean") -) - -(define-method set_int - (of-object "GValue") - (c-name "g_value_set_int") - (return-type "none") - (parameters - '("gint" "v_int") - ) -) - -(define-method get_int - (of-object "GValue") - (c-name "g_value_get_int") - (return-type "gint") -) - -(define-method set_uint - (of-object "GValue") - (c-name "g_value_set_uint") - (return-type "none") - (parameters - '("guint" "v_uint") - ) -) - -(define-method get_uint - (of-object "GValue") - (c-name "g_value_get_uint") - (return-type "guint") -) - -(define-method set_long - (of-object "GValue") - (c-name "g_value_set_long") - (return-type "none") - (parameters - '("glong" "v_long") - ) -) - -(define-method get_long - (of-object "GValue") - (c-name "g_value_get_long") - (return-type "glong") -) - -(define-method set_ulong - (of-object "GValue") - (c-name "g_value_set_ulong") - (return-type "none") - (parameters - '("gulong" "v_ulong") - ) -) - -(define-method get_ulong - (of-object "GValue") - (c-name "g_value_get_ulong") - (return-type "gulong") -) - -(define-method set_int64 - (of-object "GValue") - (c-name "g_value_set_int64") - (return-type "none") - (parameters - '("gint64" "v_int64") - ) -) - -(define-method get_int64 - (of-object "GValue") - (c-name "g_value_get_int64") - (return-type "gint64") -) - -(define-method set_uint64 - (of-object "GValue") - (c-name "g_value_set_uint64") - (return-type "none") - (parameters - '("guint64" "v_uint64") - ) -) - -(define-method get_uint64 - (of-object "GValue") - (c-name "g_value_get_uint64") - (return-type "guint64") -) - -(define-method set_float - (of-object "GValue") - (c-name "g_value_set_float") - (return-type "none") - (parameters - '("gfloat" "v_float") - ) -) - -(define-method get_float - (of-object "GValue") - (c-name "g_value_get_float") - (return-type "gfloat") -) - -(define-method set_double - (of-object "GValue") - (c-name "g_value_set_double") - (return-type "none") - (parameters - '("gdouble" "v_double") - ) -) - -(define-method get_double - (of-object "GValue") - (c-name "g_value_get_double") - (return-type "gdouble") -) - -(define-method set_string - (of-object "GValue") - (c-name "g_value_set_string") - (return-type "none") - (parameters - '("const-gchar*" "v_string") - ) -) - -(define-method set_static_string - (of-object "GValue") - (c-name "g_value_set_static_string") - (return-type "none") - (parameters - '("const-gchar*" "v_string") - ) -) - -(define-method get_string - (of-object "GValue") - (c-name "g_value_get_string") - (return-type "const-gchar*") -) - -(define-method dup_string - (of-object "GValue") - (c-name "g_value_dup_string") - (return-type "gchar*") -) - -(define-method set_pointer - (of-object "GValue") - (c-name "g_value_set_pointer") - (return-type "none") - (parameters - '("gpointer" "v_pointer") - ) -) - -(define-method get_pointer - (of-object "GValue") - (c-name "g_value_get_pointer") - (return-type "gpointer") -) - -(define-function g_pointer_type_register_static - (c-name "g_pointer_type_register_static") - (return-type "GType") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function g_strdup_value_contents - (c-name "g_strdup_value_contents") - (return-type "gchar*") - (parameters - '("const-GValue*" "value") - ) -) - -(define-method set_string_take_ownership - (of-object "GValue") - (c-name "g_value_set_string_take_ownership") - (return-type "none") - (parameters - '("gchar*" "v_string") - ) -) - - diff --git a/libs/glibmm2/glib/src/iochannel.ccg b/libs/glibmm2/glib/src/iochannel.ccg deleted file mode 100644 index 8763fd1123..0000000000 --- a/libs/glibmm2/glib/src/iochannel.ccg +++ /dev/null @@ -1,640 +0,0 @@ -// -*- c++ -*- -/* $Id: iochannel.ccg,v 1.6 2006/10/04 12:04:09 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - - -namespace -{ - -// Glib::IOChannel reference counting issues: -// -// Normally, you'd expect that the C++ object stays around as long as the -// C instance does. Also Glib::wrap() usually returns always the same C++ -// wrapper object for a single C instance. -// -// Unfortunately it isn't possible to implement these features if we didn't -// create the underlying GIOChannel. That is, when wrapping existing -// GIOChannel instances such as returned by e.g. g_io_channel_unix_new() or -// g_io_channel_new_file(). Neither is there a way to hook up a wrapper -// object in an existing GIOChannel, nor exists any destroy notification. -// -// So that means: If the IOChannel is implemented in C++ -- that is, our -// GlibmmIOChannel backend is used -- we use the GIOChannel reference -// counting mechanism. If the IOChannel backend is unknown, then the -// wrapper instance holds always exactly one reference to the GIOChannel. -// The wrapper object itself is then managed via our own refcounting -// mechanism. To do that a utility class ForeignIOChannel is introduced to -// override reference() and unreference(). - -class ForeignIOChannel : public Glib::IOChannel -{ -public: - ForeignIOChannel(GIOChannel* gobject, bool take_copy) - : Glib::IOChannel(gobject, take_copy), ref_count_(0) {} - - virtual void reference() const; - virtual void unreference() const; - -private: - mutable int ref_count_; -}; - -void ForeignIOChannel::reference() const -{ - ++ref_count_; -} - -void ForeignIOChannel::unreference() const -{ - if (!(--ref_count_)) delete this; -} - -} // anonymous namespace - - -namespace Glib -{ - -class GlibmmIOChannel -{ -public: - GIOChannel base; - Glib::IOChannel* wrapper; - - static const GIOFuncs vfunc_table; - - static GIOStatus io_read(GIOChannel* channel, char* buf, gsize count, - gsize* bytes_read, GError** err); - - static GIOStatus io_write(GIOChannel* channel, const char* buf, gsize count, - gsize* bytes_written, GError** err); - - static GIOStatus io_seek (GIOChannel* channel, gint64 offset, GSeekType type, GError** err); - static GIOStatus io_close(GIOChannel* channel, GError** err); - - static GSource* io_create_watch(GIOChannel* channel, GIOCondition condition); - static void io_free(GIOChannel* channel); - - static GIOStatus io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err); - static GIOFlags io_get_flags(GIOChannel* channel); -}; - -// static -const GIOFuncs GlibmmIOChannel::vfunc_table = -{ - &GlibmmIOChannel::io_read, - &GlibmmIOChannel::io_write, - &GlibmmIOChannel::io_seek, - &GlibmmIOChannel::io_close, - &GlibmmIOChannel::io_create_watch, - &GlibmmIOChannel::io_free, - &GlibmmIOChannel::io_set_flags, - &GlibmmIOChannel::io_get_flags, -}; - - -/**** GLib::IOChannel ******************************************************/ - -/* Construct a custom C++-implemented IOChannel. GlibmmIOChannel is an - * extended GIOChannel struct which allows us to hook up a pointer to this - * persistent wrapper instance. - */ -IOChannel::IOChannel() -: - gobject_ (static_cast(g_malloc(sizeof(GlibmmIOChannel)))) -{ - g_io_channel_init(gobject_); - gobject_->funcs = const_cast(&GlibmmIOChannel::vfunc_table); - - reinterpret_cast(gobject_)->wrapper = this; -} - -/* Construct an IOChannel wrapper for an already created GIOChannel. - * See the comment at the top of this file for an explanation of the - * problems with this approach. - */ -IOChannel::IOChannel(GIOChannel* gobject, bool take_copy) -: - gobject_ (gobject) -{ - // This ctor should never be called for GlibmmIOChannel instances. - g_assert(gobject != 0); - g_assert(gobject->funcs != &GlibmmIOChannel::vfunc_table); - - if(take_copy) - g_io_channel_ref(gobject_); -} - -IOChannel::~IOChannel() -{ - if(gobject_) - { - // Check whether this IOChannel is implemented in C++, i.e. whether it - // uses our GlibmmIOChannel forwarding backend. Normally, this will never - // be true because the wrapper should only be deleted in the io_free() - // callback, which clears gobject_ before deleting. But in case the ctor - // of a derived class threw an exception the GIOChannel must be destroyed - // prematurely. - // - if(gobject_->funcs == &GlibmmIOChannel::vfunc_table) - { - // Disconnect the wrapper object so that it won't be deleted twice. - reinterpret_cast(gobject_)->wrapper = 0; - } - - GIOChannel *const tmp_gobject = gobject_; - gobject_ = 0; - - g_io_channel_unref(tmp_gobject); - } -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::RefPtr IOChannel::create_from_file(const std::string& filename, const std::string& mode) -#else -Glib::RefPtr IOChannel::create_from_file(const std::string& filename, const std::string& mode, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - GIOChannel *const channel = g_io_channel_new_file(filename.c_str(), mode.c_str(), &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return Glib::wrap(channel, false); -} - -Glib::RefPtr IOChannel::create_from_fd(int fd) -{ - return Glib::wrap(g_io_channel_unix_new(fd), false); -} - -#ifdef G_OS_WIN32 - -Glib::RefPtr IOChannel::create_from_win32_fd(int fd) -{ - return Glib::wrap(g_io_channel_win32_new_fd(fd), false); -} - -Glib::RefPtr IOChannel::create_from_win32_socket(int socket) -{ - return Glib::wrap(g_io_channel_win32_new_socket(socket), false); -} - -#endif /* G_OS_WIN32 */ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::write(const Glib::ustring& str) -#else -IOStatus IOChannel::write(const Glib::ustring& str, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - gsize bytes_written = 0; -#ifdef GLIBMM_EXCEPTIONS_ENABLED - return write(str.data(), str.bytes(), bytes_written); -#else - return write(str.data(), str.bytes(), bytes_written, error); -#endif //GLIBMM_EXCEPTIONS_ENABLED -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read_line(Glib::ustring& line) -#else -IOStatus IOChannel::read_line(Glib::ustring& line, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - Glib::ScopedPtr buf; - GError* gerror = 0; - gsize bytes = 0; - - const GIOStatus status = g_io_channel_read_line(gobj(), buf.addr(), &bytes, 0, &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(buf.get()) - line.assign(buf.get(), buf.get() + bytes); - else - line.erase(); - - return (IOStatus) status; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read_to_end(Glib::ustring& str) -#else -IOStatus IOChannel::read_to_end(Glib::ustring& str, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - Glib::ScopedPtr buf; - GError* gerror = 0; - gsize bytes = 0; - - const GIOStatus status = g_io_channel_read_to_end(gobj(), buf.addr(), &bytes, &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(buf.get()) - str.assign(buf.get(), buf.get() + bytes); - else - str.erase(); - - return (IOStatus) status; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::read(Glib::ustring& str, gsize count) -#else -IOStatus IOChannel::read(Glib::ustring& str, gsize count, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - Glib::ScopedPtr buf (g_new(char, count)); - GError* gerror = 0; - gsize bytes = 0; - - const GIOStatus status = g_io_channel_read_chars(gobj(), buf.get(), count, &bytes, &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - if(buf.get()) - str.assign(buf.get(), buf.get() + bytes); - else - str.erase(); - - return (IOStatus) status; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -IOStatus IOChannel::set_encoding(const std::string& encoding) -#else -IOStatus IOChannel::set_encoding(const std::string& encoding, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - - const GIOStatus status = g_io_channel_set_encoding( - gobj(), (encoding.empty()) ? 0 : encoding.c_str(), &gerror); - - if(gerror) - { - #ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); - #else - error = Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED - } - - return (IOStatus) status; -} - -std::string IOChannel::get_encoding() const -{ - const char *const encoding = g_io_channel_get_encoding(gobject_); - return (encoding) ? std::string(encoding) : std::string(); -} - -void IOChannel::set_line_term(const std::string& term) -{ - if(term.empty()) - g_io_channel_set_line_term(gobj(), 0, 0); - else - g_io_channel_set_line_term(gobj(), term.data(), term.size()); -} - -std::string IOChannel::get_line_term() const -{ - int len = 0; - const char *const term = g_io_channel_get_line_term(gobject_, &len); - - return (term) ? std::string(term, len) : std::string(); -} - -Glib::RefPtr IOChannel::create_watch(IOCondition condition) -{ - // The corresponding unreference() takes place in the dtor - // of the Glib::RefPtr object below. - reference(); - return IOSource::create(Glib::RefPtr(this), condition); -} - -IOStatus IOChannel::read_vfunc(char*, gsize, gsize&) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOStatus IOChannel::write_vfunc(const char*, gsize, gsize&) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOStatus IOChannel::seek_vfunc(gint64, SeekType) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOStatus IOChannel::close_vfunc() -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -Glib::RefPtr IOChannel::create_watch_vfunc(IOCondition) -{ - g_assert_not_reached(); - return Glib::RefPtr(); -} - -IOStatus IOChannel::set_flags_vfunc(IOFlags) -{ - g_assert_not_reached(); - return IO_STATUS_ERROR; -} - -IOFlags IOChannel::get_flags_vfunc() -{ - g_assert_not_reached(); - return IOFlags(0); -} - -void IOChannel::reference() const -{ - g_io_channel_ref(gobject_); -} - -void IOChannel::unreference() const -{ - g_io_channel_unref(gobject_); -} - -Glib::RefPtr wrap(GIOChannel* gobject, bool take_copy) -{ - IOChannel* cpp_object = 0; - - if(gobject) - { - if(gobject->funcs == &GlibmmIOChannel::vfunc_table) - { - cpp_object = reinterpret_cast(gobject)->wrapper; - - if(take_copy && cpp_object) - cpp_object->reference(); - } - else - { - cpp_object = new ForeignIOChannel(gobject, take_copy); - cpp_object->reference(); // the refcount is initially 0 - } - } - - return Glib::RefPtr(cpp_object); -} - - -/**** Glib::GlibmmIOChannel ************************************************/ - -// static -GIOStatus GlibmmIOChannel::io_read(GIOChannel* channel, char* buf, gsize count, - gsize* bytes_read, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->read_vfunc(buf, count, *bytes_read); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOStatus GlibmmIOChannel::io_write(GIOChannel* channel, const char* buf, gsize count, - gsize* bytes_written, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->write_vfunc(buf, count, *bytes_written); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOStatus GlibmmIOChannel::io_seek(GIOChannel* channel, gint64 offset, GSeekType type, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->seek_vfunc(offset, (SeekType) type); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOStatus GlibmmIOChannel::io_close(GIOChannel* channel, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->close_vfunc(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - - return G_IO_STATUS_ERROR; -} - -// static -GSource* GlibmmIOChannel::io_create_watch(GIOChannel* channel, GIOCondition condition) -{ - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - const Glib::RefPtr source = wrapper->create_watch_vfunc((IOCondition) condition); - return (source) ? source->gobj_copy() : 0; - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return 0; -} - -// static -void GlibmmIOChannel::io_free(GIOChannel* channel) -{ - if(IOChannel *const wrapper = reinterpret_cast(channel)->wrapper) - { - wrapper->gobject_ = 0; - delete wrapper; - } - - g_free(channel); -} - -// static -GIOStatus GlibmmIOChannel::io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err) -{ - if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOStatus) wrapper->set_flags_vfunc((IOFlags) flags); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Error& error) - { - error.propagate(err); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return G_IO_STATUS_ERROR; -} - -// static -GIOFlags GlibmmIOChannel::io_get_flags(GIOChannel* channel) -{ - IOChannel *const wrapper = reinterpret_cast(channel)->wrapper; - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - return (GIOFlags) wrapper->get_flags_vfunc(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - return GIOFlags(0); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/iochannel.hg b/libs/glibmm2/glib/src/iochannel.hg deleted file mode 100644 index 049c2a390b..0000000000 --- a/libs/glibmm2/glib/src/iochannel.hg +++ /dev/null @@ -1,476 +0,0 @@ -// -*- c++ -*- -/* $Id: iochannel.hg,v 1.8 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include -#include -#include -#include - -#include -#include - -GLIBMM_USING_STD(string) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GIOChannel GIOChannel; } -#endif - - -namespace Glib -{ - -class Source; -class IOSource; - -_WRAP_ENUM(SeekType, GSeekType, NO_GTYPE, s#^SEEK_#SEEK_TYPE_#) -_WRAP_ENUM(IOStatus, GIOStatus, NO_GTYPE) -_WRAP_ENUM(IOFlags, GIOFlags, NO_GTYPE) - -/** Exception class for IOChannel errors. - */ -_WRAP_GERROR(IOChannelError, GIOChannelError, G_IO_CHANNEL_ERROR, NO_GTYPE, - s#^INVAL$#INVALID_ARGUMENT#, - s#^ISDIR$#IS_DIRECTORY#, - s#^PIPE$#BROKEN_PIPE#, - s#^NOSPC$#NO_SPACE_LEFT#, - s#^NXIO$#NO_SUCH_DEVICE#, - s#^ACCES$#ACCESS_DENIED#, - s#^FBIG$#FILE_TOO_BIG#, - s#^IO$#IO_ERROR#, - s#^OVERFLOW$#OVERFLOWN#) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class GlibmmIOChannel; -#endif - -/** IOChannel aims to provide portable I/O support for files, pipes - * and sockets, and to integrate them with the GLib main event loop. - * - * Note that IOChannels implement an automatic implicit character set - * conversion to the data stream, and usually will not pass by default - * binary data unchanged. To set the encoding of the channel, use e.g. - * set_encoding("ISO-8859-15"). To set the channel to no encoding, use - * set_encoding() without any arguments. - * - * You can create an IOChannel with one of the static create methods, or - * implement one yourself, in which case you have to 1) override all - * _vfunc() members. 2) set the GIOChannel flags in your constructor. - * - * @note This feature of being able to implement a custom Glib::IOChannel is - * deprecated in glibmm 2.2. The vfunc interface has not yet stabilized - * enough to allow that -- the C++ wrapper went in by pure accident. Besides, - * it isn't terribly useful either. Thus please refrain from overriding any - * IOChannel vfuncs. - */ -class IOChannel : public sigc::trackable -{ - _CLASS_GENERIC(IOChannel, GIOChannel) - - dnl // We can't support get_fd() properly because it is impossible - dnl // to detect the specific GIOChannel type at runtime. - _IGNORE(g_io_channel_unix_get_fd, g_io_channel_win32_get_fd) - - dnl // deprecated or internal - _IGNORE(g_io_channel_seek, g_io_channel_close, g_io_channel_read, - g_io_channel_write, g_io_channel_win32_make_pollfd) - -public: - virtual ~IOChannel(); - - /** Open a file @a filename as an I/O channel using mode @a mode. - * This channel will be closed when the last reference to it is dropped, - * so there is no need to call close() (though doing so will not cause - * problems, as long as no attempt is made to access the channel after - * it is closed). - * @param filename The name of the file to open. - * @param mode One of "r", "w", "a", - * "r+", "w+", "a+". These have the - * same meaning as in fopen(). - * @return An IOChannel for the opened file. - * @throw Glib::FileError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static Glib::RefPtr create_from_file(const std::string& filename, const std::string& mode); -#else - static Glib::RefPtr create_from_file(const std::string& filename, const std::string& mode, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - _IGNORE(g_io_channel_new_file) - - /** Creates an I/O channel from a file descriptor. - * On Unix, IOChannels created with this function work for any file - * descriptor or socket. - * - * On Win32, this can be used either for files opened with the MSVCRT (the - * Microsoft run-time C library) _open() or _pipe(), - * including file descriptors 0, 1 and 2 (corresponding to stdin, - * stdout and stderr), or for Winsock SOCKETs. If - * the parameter is a legal file descriptor, it is assumed to be such, - * otherwise it should be a SOCKET. This relies on SOCKETs - * and file descriptors not overlapping. If you want to be certain, call - * either create_from_win32_fd() or create_from_win32_socket() instead as - * appropriate. - * - * The term file descriptor as used in the context of Win32 refers to the - * emulated Unix-like file descriptors MSVCRT provides. The native - * corresponding concept is file HANDLE. There isn't as of yet - * a way to get IOChannels for Win32 file HANDLEs. - */ - static Glib::RefPtr create_from_fd(int fd); - _IGNORE(g_io_channel_unix_new) - -/* defined(DOXYGEN_SHOULD_SKIP_THIS) actually does the opposite of what it looks like... */ -#if defined(G_OS_WIN32) || defined(DOXYGEN_SHOULD_SKIP_THIS) - - /** Create an I/O channel for C runtime (emulated Unix-like) file descriptors. - * After calling add_watch() on a I/O channel returned by this function, you - * shouldn't call read() on the file descriptor. This is because adding - * polling for a file descriptor is implemented on Win32 by starting a thread - * that sits blocked in a %read() from the file descriptor most of - * the time. All reads from the file descriptor should be done by this - * internal GLib thread. Your code should call only IOChannel::read(). - */ - static Glib::RefPtr create_from_win32_fd(int fd); - _IGNORE(g_io_channel_win32_new_fd) - - /** Create an I/O channel for a winsock socket. The parameter should be a - * SOCKET. Contrary to I/O channels for file descriptors (on Win32), - * you can use normal recv() or recvfrom() on sockets even - * if GLib is polling them. - */ - static Glib::RefPtr create_from_win32_socket(int socket); - _IGNORE(g_io_channel_win32_new_socket) - -#endif /* defined(G_OS_WIN32) || defined(DOXYGEN_SHOULD_SKIP_THIS) */ - - /** Read a single UCS-4 character. - * @retval thechar The Unicode character. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - _WRAP_METHOD(IOStatus read(gunichar& thechar), g_io_channel_read_unichar, errthrow) - - /** Read a character sequence into memory. - * @param buf A buffer to read data into. - * @param count The size of the buffer in bytes. Note that the buffer may - * not be complelely filled even if there is data in the buffer if the - * remaining data is not a complete character. - * @retval bytes_read The number of bytes read. This may be zero even on - * success if @a count < 6 and the channel's encoding is not "". - * This indicates that the next UTF-8 character is too wide for the buffer. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - _WRAP_METHOD(IOStatus read(char* buf, gsize count, gsize& bytes_read), - g_io_channel_read_chars, errthrow) - - /** Read a maximum of @a count bytes into @a str. - * @param count The maximum number of bytes to read. - * @retval str The characters that have been read. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read(Glib::ustring& str, gsize count); -#else - IOStatus read(Glib::ustring& str, gsize count, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - /** Read a whole line. - * Reads until the line separator is found, which is included - * in the result string. - * @retval line The line that was read. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read_line(Glib::ustring& line); -#else - IOStatus read_line(Glib::ustring& line, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - _IGNORE(g_io_channel_read_line, g_io_channel_read_line_string) - - /** Reads all the remaining data from the file. - * @retval str The resulting string. - * @return Glib::IO_STATUS_NORMAL on success. This function never - * returns Glib::IO_STATUS_EOF. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus read_to_end(Glib::ustring& str); -#else - IOStatus read_to_end(Glib::ustring& str, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - _IGNORE(g_io_channel_read_to_end) - - /** Write a string to the I/O channel. - * Note that this method does not return the number of characters written. - * If the channel is blocking and the returned value is - * Glib::IO_STATUS_NORMAL, the whole string was written. - * @param str the string to write. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus write(const Glib::ustring& str); -#else - IOStatus write(const Glib::ustring& str, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - /** Write a memory area of @a count bytes to the I/O channel. - * @param buf The start of the memory area. - * @param count The number of bytes to write. - * @retval bytes_written The number of bytes written to the channel. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - _WRAP_METHOD(IOStatus write(const char* buf, gssize count, gsize& bytes_written), - g_io_channel_write_chars, errthrow) - - /** Write a single UCS-4 character to the I/O channel. - * @param unichar The character to write. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - _WRAP_METHOD(IOStatus write(gunichar unichar), g_io_channel_write_unichar, errthrow) - - /** Seek the I/O channel to a specific position. - * @param offset The offset in bytes from the position specified by @a type. - * @param type A SeekType. The type Glib::SEEK_TYPE_CUR is only allowed in - * those cases where a call to set_encoding() is allowed. See the - * documentation for set_encoding() for details. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - _WRAP_METHOD(IOStatus seek(gint64 offset, SeekType type = SEEK_TYPE_SET), - g_io_channel_seek_position, errthrow) - - /** Flush the buffers of the I/O channel. - * @return The status of the operation. - * @throw Glib::IOChannelError - * @throw Glib::ConvertError - */ - _WRAP_METHOD(IOStatus flush(), g_io_channel_flush, errthrow) - - /** Close the I/O channel. - * Any pending data to be written will be flushed if @a flush is true. - * The channel will not be freed until the last reference is dropped. - * Accessing the channel after closing it is considered an error. - * @param flush Whether to flush() pending data before closing the channel. - * @return The status of the operation. - * @throw Glib::IOChannelError - */ - _WRAP_METHOD(IOStatus close(bool flush = true), g_io_channel_shutdown, errthrow) - - /** Get the IOChannel internal buffer size. - * @return The buffer size. - */ - _WRAP_METHOD(gsize get_buffer_size() const, g_io_channel_get_buffer_size) - - /** Set the internal IOChannel buffer size. - * @param size The buffer size the IOChannel should use. - */ - _WRAP_METHOD(void set_buffer_size(gsize size), g_io_channel_set_buffer_size) - - /** Get the current flags for a IOChannel, including read-only - * flags such as Glib::IO_FLAG_IS_READABLE. - * - * The values of the flags Glib::IO_FLAG_IS_READABLE and - * Glib::IO_FLAG_IS_WRITEABLE are cached for internal use by the channel when - * it is created. If they should change at some later point (e.g. partial - * shutdown of a socket with the UNIX shutdown() function), the user - * should immediately call get_flags() to update the internal values of these - * flags. - * @return Bitwise combination of the flags set on the channel. - */ - _WRAP_METHOD(IOFlags get_flags() const, g_io_channel_get_flags) - - /** Set flags on the IOChannel. - * @param flags Bitwise combination of the flags to set. - * @return The operation result code. - * @throw Glib::IOChannelError - */ - _WRAP_METHOD(IOStatus set_flags(IOFlags flags), g_io_channel_set_flags, errthrow) - - /** Set the buffering status of the I/O channel. - * The buffering state can only be set if the channel's encoding is - * "". For any other encoding, the channel must be buffered. - * - * A buffered channel can only be set unbuffered if the channel's internal - * buffers have been flushed. Newly created channels or channels which have - * returned Glib::IO_STATUS_EOF not require such a flush. For write-only - * channels, a call to flush() is sufficient. For all other channels, the - * buffers may be flushed by a call to seek(). This includes the possibility - * of seeking with seek type Glib::SEEK_TYPE_CUR and an offset of zero. Note - * that this means that socket-based channels cannot be set unbuffered once - * they have had data read from them. - * - * The default state of the channel is buffered. - * - * @param buffered Whether to set the channel buffered or unbuffered. - */ - _WRAP_METHOD(void set_buffered(bool buffered), g_io_channel_set_buffered) - - /** Get the buffering status of the I/O channel. - * @return The buffering status of the channel. - */ - _WRAP_METHOD(bool get_buffered() const, g_io_channel_get_buffered) - - /** Returns an IOCondition depending on whether there is data to be - * read/space to write data in the internal buffers in the I/O channel. - * Only the flags Glib::IO_IN and Glib::IO_OUT may be set. - * @return Bitwise combination of Glib::IOCondition flags. - */ - _WRAP_METHOD(IOCondition get_buffer_condition() const, g_io_channel_get_buffer_condition) - - /** Returns whether the file/socket/whatever associated with the I/O channel - * will be closed when the channel receives its final unref and is destroyed. - * The default value of this is true for channels created by - * create_from_file(), and false for all other channels. - * @return Whether the channel will be closed on the final unref of the - * IOChannel object. - */ - _WRAP_METHOD(bool get_close_on_unref() const, g_io_channel_get_close_on_unref) - - /** Setting this flag to true for a channel you have already closed - * can cause problems. - * @param do_close Whether to close the channel on the final unref of the - * IOChannel object. The default value of this is true for channels - * created by create_from_file(), and false for all other channels. - */ - _WRAP_METHOD(void set_close_on_unref(bool do_close), g_io_channel_set_close_on_unref) - - /** Sets the encoding for the input/output of the channel. - * The internal encoding is always UTF-8. The default encoding for the - * external file is UTF-8. The encoding "" is safe to use with - * binary data. - * - * The encoding can only be set if one of the following conditions - * is true: - * - * -# The channel was just created, and has not been written to or read from - * yet. - * -# The channel is write-only. - * -# The channel is a file, and the file pointer was just repositioned by a - * call to seek_position(). (This flushes all the internal buffers.) - * -# The current encoding is "" or UTF-8. - * -# One of the read methods has just returned Glib::IO_STATUS_EOF (or, in - * the case of read_to_end(), Glib::IO_STATUS_NORMAL). - * -# The read() method has returned Glib::IO_STATUS_AGAIN or thrown - * a Glib::Error exception. This may be useful in the case of - * ConvertError::ILLEGAL_SEQUENCE. Returning one of these statuses - * from read_line() or read_to_end() does not guarantee that - * the encoding can be changed. - * - * Channels which do not meet one of the above conditions cannot call - * seek_position() with a seek type of Glib::SEEK_TYPE_CUR and, if they - * are "seekable", cannot call write() after calling one of the API - * "read" methods. - * - * @param encoding The encoding name, or "" for binary. - * @return Glib::IO_STATUS_NORMAL if the encoding was successfully set. - * @throw Glib::IOChannelError - */ -#ifdef GLIBMM_EXCEPTIONS_ENABLED - IOStatus set_encoding(const std::string& encoding = std::string()); -#else - IOStatus set_encoding(const std::string& encoding, std::auto_ptr& error); -#endif //GLIBMM_EXCEPTIONS_ENABLED - _IGNORE(g_io_channel_set_encoding) - - /** Get the encoding of the I/O channel. - * @return The current encoding of the channel. - */ - std::string get_encoding() const; - _IGNORE(g_io_channel_get_encoding) - - void set_line_term(const std::string& term = std::string()); - _IGNORE(g_io_channel_set_line_term) - - std::string get_line_term() const; - _IGNORE(g_io_channel_get_line_term) - - /** Creates an IOSource object. - * Create a slot from a function to be called when condition is met - * for the channel with sigc::ptr_fun() or sigc::mem_fun() and pass - * it into the connect() function of the returned IOSource object. - * Polling of the channel will start when you attach a MainContext - * object to the returned IOSource object using its attach() function. - * - * Glib::signal_io().connect() is a simpler interface to the same - * functionality, for the case where you want to add the source to the - * default main context. - * @param condition The condition to watch for. - * @return An IOSource object that can be polled from a MainContext's event loop. - */ - Glib::RefPtr create_watch(IOCondition condition); - _IGNORE(g_io_channel_create_watch) - - virtual void reference() const; - virtual void unreference() const; - _IGNORE(g_io_channel_ref, g_io_channel_unref) - - GIOChannel* gobj() { return gobject_; } - const GIOChannel* gobj() const { return gobject_; } - -protected: - GIOChannel* gobject_; - - /** Constructor that should be used by derived classes. - * Use this constructor if you want to inherit from IOChannel. - * It will set up a GIOChannel that will call the vfuncs of your - * class even if it is being used from C code, and it will keep - * a reference to the C++ code while the GIOChannel exists. - */ - IOChannel(); - _IGNORE(g_io_channel_init) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - IOChannel(GIOChannel* gobject, bool take_copy); -#endif - - virtual IOStatus read_vfunc(char* buf, gsize count, gsize& bytes_read); - virtual IOStatus write_vfunc(const char* buf, gsize count, gsize& bytes_written); - virtual IOStatus seek_vfunc(gint64 offset, SeekType type); - virtual IOStatus close_vfunc(); - virtual IOStatus set_flags_vfunc(IOFlags flags); - virtual IOFlags get_flags_vfunc(); - virtual Glib::RefPtr create_watch_vfunc(IOCondition cond); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - friend class Glib::GlibmmIOChannel; -#endif -}; - -Glib::RefPtr wrap(GIOChannel* gobject, bool take_copy = false); - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/keyfile.ccg b/libs/glibmm2/glib/src/keyfile.ccg deleted file mode 100644 index 5ff2afcd03..0000000000 --- a/libs/glibmm2/glib/src/keyfile.ccg +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright 2006 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -namespace Glib -{ - -/**** Glib::KeyFile ********************************************************/ - -KeyFile::KeyFile() -{ - gobject_ = g_key_file_new(); - owns_gobject_ = true; -} - -KeyFile::KeyFile(GKeyFile* castitem, bool takes_ownership) -{ - gobject_ = castitem; - owns_gobject_ = takes_ownership; -} - -KeyFile::~KeyFile() -{ - if (owns_gobject_) - g_key_file_free(gobject_); -} - -bool KeyFile::load_from_data(const Glib::ustring& data, KeyFileFlags flags) -{ - GError *error = 0; - bool retvalue = g_key_file_load_from_data(gobj(), data.c_str(), data.bytes(), ((GKeyFileFlags)(flags)), &(error)); - if(error) :: Glib::Error::throw_exception(error); - return retvalue; -} - -bool KeyFile::load_from_data_dirs(const std::string& file, std::string& full_path, KeyFileFlags flags) -{ - GError *error = 0; - char *full_path_c; - bool retvalue = g_key_file_load_from_data_dirs(gobj(), file.c_str(), &full_path_c, ((GKeyFileFlags)(flags)), &(error)); - full_path = Glib::convert_return_gchar_ptr_to_ustring(full_path_c); - if(error) :: Glib::Error::throw_exception(error); - return retvalue; -} - -Glib::ustring KeyFile::to_data() -{ - GError *error = 0; - gsize size; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_to_data(gobj(), &size, &error)); - if(error) :: Glib::Error::throw_exception(error); - return retvalue; -} - -Glib::ArrayHandle KeyFile::get_groups() const -{ - gchar** group_names = 0; - gsize number_of_groups = 0; - group_names = g_key_file_get_groups(const_cast(gobj()), &number_of_groups); - return Glib::ArrayHandle(group_names, number_of_groups, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_keys(const Glib::ustring& group_name) const -{ - gchar** key_names = 0; - gsize number_of_keys = 0; - GError* error = 0; - key_names = g_key_file_get_keys(const_cast(gobj()), group_name.c_str(), &number_of_keys, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(key_names, number_of_keys, Glib::OWNERSHIP_DEEP); -} - -Glib::ustring KeyFile::get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - GError *error = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_locale_string(const_cast(gobj()), group_name.c_str(), key.c_str(), 0, &(error))); - if(error) ::Glib::Error::throw_exception(error); - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -int KeyFile::get_integer(const Glib::ustring& key) const -#else -int KeyFile::get_integer(const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - int retvalue = g_key_file_get_integer(const_cast(gobj()), NULL, key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -double KeyFile::get_double(const Glib::ustring& key) const -#else -double KeyFile::get_double(const Glib::ustring& key, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - double retvalue = g_key_file_get_double(const_cast(gobj()), NULL, key.c_str(), &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -void KeyFile::set_double(const Glib::ustring& key, double value) -{ - g_key_file_set_double(gobj(), 0, key.c_str(), value); -} - - -Glib::ArrayHandle KeyFile::get_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gchar** string_list = 0; - gsize length_of_list = 0; - GError* error = 0; - string_list = g_key_file_get_string_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(string_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const -{ - gchar** string_list = 0; - gsize length_of_list = 0; - GError* error = 0; - string_list = g_key_file_get_locale_string_list(const_cast(gobj()), group_name.c_str(), key.c_str(), locale.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(string_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gboolean* bool_list = 0; - gsize length_of_list = 0; - GError* error = 0; - bool_list = g_key_file_get_boolean_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(&bool_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_integer_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gint* integer_list = 0; - gsize length_of_list = 0; - GError* error = 0; - integer_list = g_key_file_get_integer_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(integer_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -Glib::ArrayHandle KeyFile::get_double_list(const Glib::ustring& group_name, const Glib::ustring& key) const -{ - gdouble* integer_list = 0; - gsize length_of_list = 0; - GError* error = 0; - integer_list = g_key_file_get_double_list(const_cast(gobj()), group_name.c_str(), key.c_str(), &length_of_list, &error); - if(error) - Glib::Error::throw_exception(error); - return Glib::ArrayHandle(integer_list, length_of_list, Glib::OWNERSHIP_DEEP); -} - -void KeyFile::set_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_string_list(gobj(), group_name.c_str(), key.c_str(), list.data(), length_of_list); -} - -void KeyFile::set_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_locale_string_list(gobj(), group_name.c_str(), key.c_str(), locale.c_str(), list.data(), length_of_list); -} - -void KeyFile::set_integer_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_integer_list(gobj(), group_name.c_str(), key.c_str(), const_cast(list.data()), length_of_list); -} - -void KeyFile::set_double_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_double_list(gobj(), group_name.c_str(), key.c_str(), const_cast(list.data()), length_of_list); -} - -void KeyFile::set_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list) -{ - gsize length_of_list = list.size(); - g_key_file_set_boolean_list(gobj(), group_name.c_str(), key.c_str(), *(list.data()), length_of_list); -} - -Glib::ustring KeyFile::get_comment() const -{ - GError *error = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_comment(const_cast(gobj()), 0, 0, &(error))); - if(error) ::Glib::Error::throw_exception(error); - return retvalue; -} - -Glib::ustring KeyFile::get_comment(const Glib::ustring& group_name) const -{ - GError *error = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_key_file_get_comment(const_cast(gobj()), group_name.c_str(), 0, &(error))); - if(error) ::Glib::Error::throw_exception(error); - return retvalue; -} - -void KeyFile::set_comment(const Glib::ustring& comment) -{ - GError *error = 0; - g_key_file_set_comment(gobj(), 0, 0, comment.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); -} - -void KeyFile::set_comment(const Glib::ustring& group_name, const Glib::ustring& comment) -{ - GError *error = 0; - g_key_file_set_comment(gobj(), group_name.c_str(), 0, comment.c_str(), &(error)); - if(error) ::Glib::Error::throw_exception(error); -} - -} diff --git a/libs/glibmm2/glib/src/keyfile.hg b/libs/glibmm2/glib/src/keyfile.hg deleted file mode 100644 index 9fdd4918e5..0000000000 --- a/libs/glibmm2/glib/src/keyfile.hg +++ /dev/null @@ -1,387 +0,0 @@ -/* Copyright(C) 2006 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include -#include -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GKeyFile GKeyFile; } -#endif - -namespace Glib -{ - - _WRAP_ENUM(KeyFileFlags, GKeyFileFlags, NO_GTYPE) - -/** Exception class for KeyFile errors. - */ -_WRAP_GERROR(KeyFileError, GKeyFileError, G_KEY_FILE_ERROR, NO_GTYPE) - -/** This class lets you parse, edit or create files containing groups of key-value pairs, which we call key files - * for lack of a better name. Several freedesktop.org specifications use key files now, e.g the Desktop Entry - * Specification and the Icon Theme Specification. - * - * The syntax of key files is described in detail in the Desktop Entry Specification, here is a quick summary: Key - * files consists of groups of key-value pairs, interspersed with comments. - * - * @code - * # this is just an example - * # there can be comments before the first group - * - * [First Group] - * - * Name=Key File Example\tthis value shows\nescaping - * - * # localized strings are stored in multiple key-value pairs - * Welcome=Hello - * Welcome[de]=Hallo - * Welcome[fr]=Bonjour - * Welcome[it]=Ciao - * - * [Another Group] - * - * Numbers=2;20;-200;0 - * - * Booleans=true;false;true;true - * @endcode - * - * Lines beginning with a '#' and blank lines are considered comments. - * - * Groups are started by a header line containing the group name enclosed in '[' and ']', and ended implicitly by - * the start of the next group or the end of the file. Each key-value pair must be contained in a group. - * - * Key-value pairs generally have the form key=value, with the exception of localized strings, which have the form - * key[locale]=value. Space before and after the '=' character are ignored. Newline, tab, carriage return and - * backslash characters in value are escaped as \n, \t, \r, and \\, respectively. To preserve leading spaces in - * values, these can also be escaped as \s. - * - * Key files can store strings (possibly with localized variants), integers, booleans and lists of these. Lists are - * separated by a separator character, typically ';' or ','. To use the list separator character in a value in a - * list, it has to be escaped by prefixing it with a backslash. - * - * This syntax is obviously inspired by the .ini files commonly met on Windows, but there are some important - * differences: - * - .ini files use the ';' character to begin comments, key files use the '#' character. - * - Key files allow only comments before the first group. - * - Key files are always encoded in UTF-8. - * - Key and Group names are case-sensitive, for example a group called [GROUP] is a different group from [group]. - * - * Note that in contrast to the Desktop Entry Specification, groups in key files may contain the same key multiple - * times; the last entry wins. Key files may also contain multiple groups with the same name; they are merged - * together. Another difference is that keys and group names in key files are not restricted to ASCII characters. - * - * @newin2p14 - */ -class KeyFile -{ - _CLASS_GENERIC(KeyFile, GKeyFile) -public: - - /** Creates a new, empty KeyFile object. - */ - KeyFile(); - - /** Destructor - */ - ~KeyFile(); - _IGNORE(g_key_file_free) - - /** Creates a glibmm KeyFile wrapper for a GKeyFile object. - * Note, when using this that when the wrapper is deleted, - * it will not automatically deleted the GKeyFile unless you - * set the delete_c_instance boolean to true. - * @param castitem The C instance to wrap - * @param delete_c_instance If the C instance should be deleted when - * the wrapper is deleted. - */ - KeyFile(GKeyFile* castitem, bool takes_ownership = false); - -public: - - _WRAP_METHOD(bool load_from_file(const std::string& filename, KeyFileFlags flags = Glib::KEY_FILE_NONE), g_key_file_load_from_file, errthrow) - - /** Loads a KeyFile from memory - * @param data The data to use as a KeyFile - * @param flags Bitwise combination of the flags to use for the KeyFile - * @return true if the KeyFile was successfully loaded, false otherwise - * @throw Glib::KeyFileError - */ - - bool load_from_data(const Glib::ustring& data, KeyFileFlags flags = Glib::KEY_FILE_NONE); - _IGNORE(g_key_file_load_from_data) - - //TODO: - /* - gboolean g_key_file_load_from_dirs (GKeyFile *key_file, - const gchar *file, - const gchar **search_dirs, - gchar **full_path, - GKeyFileFlags flags, - GError **error); - */ - - /** Looks for a KeyFile named @a file in the paths returned from - * g_get_user_data_dir() and g_get_system_data_dirs() and loads them - * into the keyfile object, placing the full path to the file in - * @a full_path. - * @param file The file to search for - * @param full_path Return location for a string containing the full path of the file - * @param flags Bitwise combination of the flags to use for the KeyFile - * @return true if the KeyFile was successfully loaded, false otherwise - * @throw Glib::KeyFileError - * @throw Glib::FileError - */ - bool load_from_data_dirs(const std::string& file, std::string& full_path, KeyFileFlags flags = Glib::KEY_FILE_NONE); - _IGNORE(g_key_file_load_from_data_dirs) - - /** Outputs the KeyFile as a string - * @return A string object holding the contents of KeyFile - */ - Glib::ustring to_data(); - _IGNORE(g_key_file_to_data) - - _WRAP_METHOD(Glib::ustring get_start_group() const, g_key_file_get_start_group) - - /** Gets a list of all groups in the KeyFile - * @returns A list containing the names of the groups - */ - Glib::ArrayHandle get_groups() const; - _IGNORE(g_key_file_get_groups) - - /** Gets a list of all keys from the group @a group_name. - * @param group_name The name of a group - * @returns A list containing the names of the keys in @a group_name - */ - Glib::ArrayHandle get_keys(const Glib::ustring& group_name) const; - _IGNORE(g_key_file_get_keys) - - _WRAP_METHOD(bool has_group(const Glib::ustring& group_name) const, g_key_file_has_group) - _WRAP_METHOD(bool has_key(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_has_key, errthrow) - - _WRAP_METHOD(Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_value, errthrow) - _WRAP_METHOD(Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_string, errthrow) - - /** Gets the value associated with @a key under @a group_name translated - * into the current locale. - */ - Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key) const; - - _WRAP_METHOD(Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const, g_key_file_get_locale_string, errthrow) - _WRAP_METHOD(bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_boolean, errthrow) - - /** Gets the value in the first group, under @a key, interpreting it as - * an integer. - * @param key The name of the key - * @return The value of @a key as an integer - * @throws Glib::KeyFileError - */ - int get_integer(const Glib::ustring& key) const; - - _WRAP_METHOD(int get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_integer, errthrow) - - /** Gets the value in the first group, under @a key, interpreting it as - * a double. - * @param key The name of the key - * @return The value of @a key as an double - * @throws Glib::KeyFileError - * - * @newin2p14 - */ - double get_double(const Glib::ustring& key) const; - - _WRAP_METHOD(double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_double, errthrow) - - _WRAP_METHOD(void set_double(const Glib::ustring& group_name, const Glib::ustring& key, double value), g_key_file_set_double) - - /** Associates a new double value with @a key under the start group. - * If @a key cannot be found then it is created. - * - * @newin2p12 - * @param key A key. - * @param value An double value. - */ - void set_double(const Glib::ustring& key, double value); - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list containing the values requested - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - _IGNORE(g_key_file_get_string_list) - - /** Returns the values associated with @a key under @a group_name - * translated into the current locale, if available. - * @param group_name The name of a group - * @param key The name of a key - * @return A list containing the values requested - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - - /** Returns the values associated with @a key under @a group_name - * translated into @a locale, if available. - * @param group_name The name of a group - * @param key The name of a key - * @param locale The name of a locale - * @return A list containing the values requested - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const; - _IGNORE(g_key_file_get_locale_string_list) - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list of booleans - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - _IGNORE(g_key_file_get_boolean_list) - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list of integers - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_integer_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - _IGNORE(g_key_file_get_integer_list) - - /** Returns the values associated with @a key under @a group_name - * @param group_name The name of a group - * @param key The name of a key - * @return A list of doubles - * @throws Glib::KeyFileError - */ - Glib::ArrayHandle get_double_list(const Glib::ustring& group_name, const Glib::ustring& key) const; - _IGNORE(g_key_file_get_double_list) - - /** Get comment from top of file - * @return The comment - */ - Glib::ustring get_comment() const; - - /** Get comment from above a group - * @param group_name The group - * @return The comment - */ - Glib::ustring get_comment(const Glib::ustring& group_name) const; - - _WRAP_METHOD(Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_comment, errthrow) - - _WRAP_METHOD(void set_list_separator(gchar separator), g_key_file_set_list_separator) - _WRAP_METHOD(void set_value(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value), g_key_file_set_value) - _WRAP_METHOD(void set_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& string), g_key_file_set_string) - _WRAP_METHOD(void set_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ustring& string), g_key_file_set_locale_string) - _WRAP_METHOD(void set_boolean(const Glib::ustring& group_name, const Glib::ustring& key, bool value), g_key_file_set_boolean) - _WRAP_METHOD(void set_integer(const Glib::ustring& group_name, const Glib::ustring& key, int value), g_key_file_set_integer) - - /** Sets a list of string values for @a key under @a group_name. If - * key cannot be found it is created. If @a group_name cannot be found - * it is created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding objects of type Glib::ustring - */ - void set_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ArrayHandle& list); - _IGNORE(g_key_file_set_string_list) - - /** Sets a list of string values for the @a key under @a group_name and marks - * them as being for @a locale. If the @a key or @a group_name cannot be - * found, they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param locale A locale - * @param list A list holding objects of type Glib::ustring - */ - void set_locale_string_list(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale, const Glib::ArrayHandle& list); - _IGNORE(g_key_file_set_locale_string_list) - - /** Sets a list of booleans for the @a key under @a group_name. - * If either the @a key or @a group_name cannot be found they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding object of type bool - */ - void set_boolean_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list); - _IGNORE(g_key_file_set_boolean_list) - - /** Sets a list of integers for the @a key under @a group_name. - * If either the @a key or @a group_name cannot be found they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding object of type int - */ - void set_integer_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list); - _IGNORE(g_key_file_set_integer_list) - - /** Sets a list of doubles for the @a key under @a group_name. - * If either the @a key or @a group_name cannot be found they are created. - * @param group_name The name of a group - * @param key The name of a key - * @param list A list holding object of type int - * - * @newin2p14 - */ - void set_double_list(const Glib::ustring& group_name, const Glib::ustring& key, Glib::ArrayHandle& list); - _IGNORE(g_key_file_set_double_list) - - - /** Places @a comment at the start of the file, before the first group. - * @param comment The Comment - */ - void set_comment(const Glib::ustring& comment); - - /** Places @a comment above @a group_name. - * @param group_name The Group the comment should be above - * @param comment The comment - */ - void set_comment(const Glib::ustring& group_name, const Glib::ustring& comment); - - /** Places a comment above @a key from @a group_name. - * @param key Key comment should be above - * @param group_name Group comment is in - * @param comment The comment - */ - _WRAP_METHOD(void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment), g_key_file_set_comment, errthrow) - - _WRAP_METHOD(void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key), g_key_file_remove_comment, errthrow) - _WRAP_METHOD(void remove_key(const Glib::ustring& group_name, const Glib::ustring& key), g_key_file_remove_key, errthrow) - _WRAP_METHOD(void remove_group(const Glib::ustring& group_name), g_key_file_remove_group, errthrow) - - GKeyFile* gobj() { return gobject_; } - const GKeyFile* gobj() const { return gobject_; } - -protected: - GKeyFile* gobject_; - bool owns_gobject_; - -private: - // noncopyable - KeyFile(const KeyFile&); - KeyFile& operator=(const KeyFile&); -}; - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/markup.ccg b/libs/glibmm2/glib/src/markup.ccg deleted file mode 100644 index 8e9103b7a5..0000000000 --- a/libs/glibmm2/glib/src/markup.ccg +++ /dev/null @@ -1,346 +0,0 @@ -// -*- c++ -*- -/* $Id: markup.ccg,v 1.5 2006/10/04 12:04:09 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - - -namespace Glib -{ - -namespace Markup -{ - -Glib::ustring escape_text(const Glib::ustring& text) -{ - const Glib::ScopedPtr buf (g_markup_escape_text(text.data(), text.bytes())); - return Glib::ustring(buf.get()); -} - - -/**** Glib::Markup::AttributeKeyLess ***************************************/ - -bool AttributeKeyLess::operator()(const Glib::ustring& lhs, const Glib::ustring& rhs) const -{ - return (lhs.raw() < rhs.raw()); -} - - -/**** Glib::Markup::ParserCallbacks ****************************************/ - -class ParserCallbacks -{ -public: - static const GMarkupParser vfunc_table; - - static void start_element(GMarkupParseContext* context, - const char* element_name, - const char** attribute_names, - const char** attribute_values, - void* user_data, - GError** error); - - static void end_element(GMarkupParseContext* context, - const char* element_name, - void* user_data, - GError** error); - - static void text(GMarkupParseContext* context, - const char* text, - gsize text_len, - void* user_data, - GError** error); - - static void passthrough(GMarkupParseContext* context, - const char* passthrough_text, - gsize text_len, - void* user_data, - GError** error); - - static void error(GMarkupParseContext* context, - GError* error, - void* user_data); -}; - - -const GMarkupParser ParserCallbacks::vfunc_table = -{ - &ParserCallbacks::start_element, - &ParserCallbacks::end_element, - &ParserCallbacks::text, - &ParserCallbacks::passthrough, - &ParserCallbacks::error, -}; - -void ParserCallbacks::start_element(GMarkupParseContext* context, - const char* element_name, - const char** attribute_names, - const char** attribute_values, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - Parser::AttributeMap attributes; - - if(attribute_names && attribute_values) - { - const char *const * pname = attribute_names; - const char *const * pvalue = attribute_values; - - for(; *pname && *pvalue; ++pname, ++pvalue) - attributes.insert(Parser::AttributeMap::value_type(*pname, *pvalue)); - - g_return_if_fail(*pname == 0 && *pvalue == 0); - } - - cpp_context.get_parser()->on_start_element(cpp_context, element_name, attributes); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::end_element(GMarkupParseContext* context, - const char* element_name, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_end_element(cpp_context, element_name); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::text(GMarkupParseContext* context, - const char* text, - gsize text_len, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_text(cpp_context, Glib::ustring(text, text + text_len)); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::passthrough(GMarkupParseContext* context, - const char* passthrough_text, - gsize text_len, - void* user_data, - GError** error) -{ - if(!&error) error = error; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used. - - ParseContext& cpp_context = *static_cast(user_data); - g_return_if_fail(context == cpp_context.gobj()); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_passthrough( - cpp_context, Glib::ustring(passthrough_text, passthrough_text + text_len)); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(MarkupError& err) - { - err.propagate(error); - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -void ParserCallbacks::error(GMarkupParseContext* context, - GError* error, - void* user_data) -{ - ParseContext& cpp_context = *static_cast(user_data); - - g_return_if_fail(context == cpp_context.gobj()); - g_return_if_fail(error->domain == G_MARKUP_ERROR); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - cpp_context.get_parser()->on_error(cpp_context, MarkupError(g_error_copy(error))); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - - -/**** Glib::Markup::Parser *************************************************/ - -Parser::Parser() -{} - -Parser::~Parser() -{} - -void Parser::on_start_element(ParseContext&, const Glib::ustring&, const Parser::AttributeMap&) -{} - -void Parser::on_end_element(ParseContext&, const Glib::ustring&) -{} - -void Parser::on_text(ParseContext&, const Glib::ustring&) -{} - -void Parser::on_passthrough(ParseContext&, const Glib::ustring&) -{} - -void Parser::on_error(ParseContext&, const MarkupError&) -{} - - -/**** Glib::Markup::ParseContext *******************************************/ - -ParseContext::ParseContext(Parser& parser, ParseFlags flags) -: - parser_ (&parser), - gobject_ (g_markup_parse_context_new(&ParserCallbacks::vfunc_table, (GMarkupParseFlags) flags, - this, &ParseContext::destroy_notify_callback)) -{} - -ParseContext::~ParseContext() -{ - parser_ = 0; - g_markup_parse_context_free(gobject_); -} - -void ParseContext::parse(const Glib::ustring& text) -{ - GError* error = 0; - g_markup_parse_context_parse(gobject_, text.data(), text.bytes(), &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void ParseContext::parse(const char* text_begin, const char* text_end) -{ - GError* error = 0; - g_markup_parse_context_parse(gobject_, text_begin, text_end - text_begin, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void ParseContext::end_parse() -{ - GError* error = 0; - g_markup_parse_context_end_parse(gobject_, &error); - - if(error) - Glib::Error::throw_exception(error); -} - -Glib::ustring ParseContext::get_element() const -{ - const char *const element_name = g_markup_parse_context_get_element(gobject_); - return (element_name) ? Glib::ustring(element_name) : Glib::ustring(); -} - -int ParseContext::get_line_number() const -{ - int line_number = 0; - g_markup_parse_context_get_position(gobject_, &line_number, 0); - return line_number; -} - -int ParseContext::get_char_number() const -{ - int char_number = 0; - g_markup_parse_context_get_position(gobject_, 0, &char_number); - return char_number; -} - -// static -void ParseContext::destroy_notify_callback(void* data) -{ - ParseContext *const self = static_cast(data); - - // Detect premature destruction. - g_return_if_fail(self->parser_ == 0); -} - -} // namespace Markup - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/markup.hg b/libs/glibmm2/glib/src/markup.hg deleted file mode 100644 index d43bd1442d..0000000000 --- a/libs/glibmm2/glib/src/markup.hg +++ /dev/null @@ -1,346 +0,0 @@ -/* $Id: markup.hg,v 1.5 2005/01/21 12:48:05 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include - -#include -#include - -GLIBMM_USING_STD(map) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GMarkupParseContext GMarkupParseContext; } -#endif - - -namespace Glib -{ - -/** @defgroup Markup Simple XML Subset Parser - * - * The Glib::Markup parser is intended to parse a simple markup format that's a - * subset of XML. This is a small, efficient, easy-to-use parser. It should not - * be used if you expect to interoperate with other applications generating - * full-scale XML. However, it's very useful for application data files, config - * files, etc. where you know your application will be the only one writing the - * file. Full-scale XML parsers should be able to parse the subset used by - * Glib::Markup parser, so you can easily migrate to full-scale XML at a later - * time if the need arises. - * - * Glib::Markup is not guaranteed to signal an error on all invalid XML; - * the parser may accept documents that an XML parser would not. However, - * invalid XML documents are not considered valid Glib::Markup documents. - * - * @par Simplifications to XML include: - * - * - Only UTF-8 encoding is allowed. - * - No user-defined entities. - * - Processing instructions, comments and the doctype declaration are "passed - * through" but are not interpreted in any way. - * - No DTD or validation. - * - * @par The markup format does support: - * - * - Elements - * - Attributes - * - 5 standard entities: \& \< \> \" \' - * - Character references - * - Sections marked as CDATA - * - * @{ - */ - -/** %Exception class for markup parsing errors. - */ -_WRAP_GERROR(MarkupError, GMarkupError, G_MARKUP_ERROR, NO_GTYPE) - -/*! @var MarkupError::Code MarkupError::BAD_UTF8 - * Text being parsed was not valid UTF-8. - */ -/*! @var MarkupError::Code MarkupError::EMPTY - * Document contained nothing, or only whitespace. - */ -/*! @var MarkupError::Code MarkupError::PARSE - * Document was ill-formed. - */ -/*! @var MarkupError::Code MarkupError::UNKNOWN_ELEMENT - * This error should be set by Glib::Markup::Parser virtual methods; - * element wasn't known. - */ -/*! @var MarkupError::Code MarkupError::UNKNOWN_ATTRIBUTE - * This error should be set by Glib::Markup::Parser virtual methods; - * attribute wasn't known. - */ -/*! @var MarkupError::Code MarkupError::INVALID_CONTENT - * This error should be set by Glib::Markup::Parser virtual methods; - * something was wrong with contents of the document, e.g. invalid attribute value. - */ - -/** @} group Markup */ - - -namespace Markup -{ - -class ParseContext; - -/** @ingroup Markup */ -typedef Glib::MarkupError Error; - - -/** Escapes text so that the markup parser will parse it verbatim. - * Less than, greater than, ampersand, etc. are replaced with the corresponding - * entities. This function would typically be used when writing out a file to - * be parsed with the markup parser. - * @ingroup Markup - * @param text Some valid UTF-8 text. - * @return Escaped text. - */ -Glib::ustring escape_text(const Glib::ustring& text); - - -/** There are no flags right now. Pass Glib::Markup::ParseFlags(0) for - * the flags argument to all functions (this should be the default argument - * anyway). - */ -_WRAP_ENUM(ParseFlags, GMarkupParseFlags, NO_GTYPE, s#^MARKUP_##) - -/*! @var Markup::ParseFlags DO_NOT_USE_THIS_UNSUPPORTED_FLAG - * Flag you should not use. - */ - - -/** Binary predicate used by Markup::Parser::AttributeMap. - * @ingroup Markup - * Unlike operator<(const ustring& lhs, const ustring& rhs) - * which would be used by the default std::less<> predicate, - * the AttributeKeyLess predicate is locale-independent. This is both - * more correct and much more efficient. - */ -class AttributeKeyLess -{ -public: - typedef Glib::ustring first_argument_type; - typedef Glib::ustring second_argument_type; - typedef bool result_type; - - bool operator()(const Glib::ustring& lhs, const Glib::ustring& rhs) const; -}; - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class ParserCallbacks; -#endif - -/** The abstract markup parser base class. - * @ingroup Markup - * To implement a parser for your markup format, derive from - * Glib::Markup::Parser and implement the virtual methods. - * - * You don't have to override all of the virtual methods. If a particular - * method is not implement the data passed to it will be ignored. Except for - * the error method, any of these callbacks can throw an error exception; in - * particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT errors - * are intended to be thrown from these overridden methods. If you throw an - * error from a method, Glib::Markup::ParseContext::parse() will report that - * error back to its caller. - */ -class Parser : public sigc::trackable -{ -public: - typedef std::map AttributeMap; - - virtual ~Parser() = 0; - -protected: - /** Constructs a Parser object. - * Note that Markup::Parser is an abstract class which can't be instantiated - * directly. To implement the parser for your markup format, derive from - * Markup::Parser and implement the virtual methods. - */ - Parser(); - - /** Called for open tags \. - * This virtual method is invoked when the opening tag of an element is seen. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param element_name The name of the element. - * @param attributes A map of attribute name/value pairs. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_start_element(ParseContext& context, - const Glib::ustring& element_name, - const AttributeMap& attributes); - - /** Called for close tags \. - * This virtual method is invoked when the closing tag of an element is seen. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param element_name The name of the element. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_end_element(ParseContext& context, const Glib::ustring& element_name); - - /** Called for character data. - * This virtual method is invoked when some text is seen (text is always - * inside an element). - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param text The parsed text in UTF-8 encoding. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_text(ParseContext& context, const Glib::ustring& text); - - /** Called for strings that should be re-saved verbatim in this same - * position, but are not otherwise interpretable. - * This virtual method is invoked for comments, processing instructions and - * doctype declarations; if you're re-writing the parsed document, write the - * passthrough text back out in the same position. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param passthrough_text The text that should be passed through. - * @throw Glib::MarkupError An exception you should throw if - * something went wrong, for instance if an unknown attribute name was - * encountered. In particular the MarkupError::UNKNOWN_ELEMENT, - * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT - * errors are intended to be thrown from user-implemented methods. - */ - virtual void on_passthrough(ParseContext& context, const Glib::ustring& passthrough_text); - - /** Called on error, including one thrown by an overridden virtual method. - * @param context The Markup::ParseContext object the parsed data belongs to. - * @param error A MarkupError object with detailed information about the error. - */ - virtual void on_error(ParseContext& context, const MarkupError& error); - -private: - // noncopyable - Parser(const Parser&); - Parser& operator=(const Parser&); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - friend class Glib::Markup::ParserCallbacks; -#endif -}; - - -/** A parse context is used to parse marked-up documents. - * @ingroup Markup - * You can feed any number of documents into a context, as long as no errors - * occur; once an error occurs, the parse context can't continue to parse text - * (you have to destroy it and create a new parse context). - */ -class ParseContext : public sigc::trackable -{ -public: - /** Creates a new parse context. - * @param parser A Markup::Parser instance. - * @param flags Bitwise combination of Markup::ParseFlags. - */ - explicit ParseContext(Parser& parser, ParseFlags flags = ParseFlags(0)); - virtual ~ParseContext(); - - /** Feed some data to the ParseContext. - * The data need not be valid UTF-8; an error will be signalled if it's - * invalid. The data need not be an entire document; you can feed a document - * into the parser incrementally, via multiple calls to this function. - * Typically, as you receive data from a network connection or file, you feed - * each received chunk of data into this function, aborting the process if an - * error occurs. Once an error is reported, no further data may be fed to the - * ParseContext; all errors are fatal. - * @param text Chunk of text to parse. - * @throw Glib::MarkupError - */ - void parse(const Glib::ustring& text); - - /** Feed some data to the ParseContext. - * The data need not be valid UTF-8; an error will be signalled if it's - * invalid. The data need not be an entire document; you can feed a document - * into the parser incrementally, via multiple calls to this function. - * Typically, as you receive data from a network connection or file, you feed - * each received chunk of data into this function, aborting the process if an - * error occurs. Once an error is reported, no further data may be fed to the - * ParseContext; all errors are fatal. - * @param text_begin Begin of chunk of text to parse. - * @param text_end End of chunk of text to parse. - * @throw Glib::MarkupError - */ - void parse(const char* text_begin, const char* text_end); - - /** Signals to the ParseContext that all data has been fed into the parse - * context with parse(). This method reports an error if the document isn't - * complete, for example if elements are still open. - * @throw Glib::MarkupError - */ - void end_parse(); - - /** Retrieves the name of the currently open element. - * @return The name of the currently open element, or "". - */ - Glib::ustring get_element() const; - - /** Retrieves the current line number. - * Intended for use in error messages; there are no strict semantics for what - * constitutes the "current" line number other than "the best number we could - * come up with for error messages." - */ - int get_line_number() const; - - /** Retrieves the number of the current character on the current line. - * Intended for use in error messages; there are no strict semantics for what - * constitutes the "current" character number other than "the best number we - * could come up with for error messages." - */ - int get_char_number() const; - - Parser* get_parser() { return parser_; } - const Parser* get_parser() const { return parser_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GMarkupParseContext* gobj() { return gobject_; } - const GMarkupParseContext* gobj() const { return gobject_; } -#endif - -private: - Markup::Parser* parser_; - GMarkupParseContext* gobject_; - - // noncopyable - ParseContext(const ParseContext&); - ParseContext& operator=(const ParseContext&); - - static void destroy_notify_callback(void* data); -}; - -} // namespace Markup - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/module.ccg b/libs/glibmm2/glib/src/module.ccg deleted file mode 100644 index a57217ea92..0000000000 --- a/libs/glibmm2/glib/src/module.ccg +++ /dev/null @@ -1,44 +0,0 @@ -// -*- c++ -*- -/* $Id: module.ccg,v 1.2 2004/04/09 14:49:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -namespace Glib -{ - -Module::Module(const std::string& file_name, ModuleFlags flags) -: - gobject_ (g_module_open(file_name.c_str(), (GModuleFlags) flags)) -{} - -Module::~Module() -{ - if(gobject_) - g_module_close(gobject_); -} - -Module::operator bool() const -{ - return (gobject_ != 0); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/module.hg b/libs/glibmm2/glib/src/module.hg deleted file mode 100644 index cace12a728..0000000000 --- a/libs/glibmm2/glib/src/module.hg +++ /dev/null @@ -1,153 +0,0 @@ -/* $Id: module.hg,v 1.5 2004/04/09 14:49:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include - -GLIBMM_USING_STD(string) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GModule GModule; } -#endif - - -namespace Glib -{ - -_WRAP_ENUM(ModuleFlags, GModuleFlags, NO_GTYPE) - -//TODO: Replace get_last_error() with exceptions? -//Provide operator()? - -/** Dynamic Loading of Modules - * These functions provide a portable way to dynamically load object - * files (commonly known as 'plug-ins'). The current implementation - * supports all systems that provide an implementation of dlopen() - * (e.g. Linux/Sun), as well as HP-UX via its shl_load() mechanism, - * and Windows platforms via DLLs. - */ -class Module -{ - _CLASS_GENERIC(Module, GModule) - _IGNORE(g_module_open, g_module_close) - -public: - - /** Opens a module. - * - * First of all it tries to open file_name as a module. If that - * fails and file_name has the ".la"-suffix (and is a libtool - * archive) it tries to open the corresponding module. If that fails - * and it doesn't have the proper module suffix for the platform - * (G_MODULE_SUFFIX), this suffix will be appended and the - * corresponding module will be opended. If that fails and file_name - * doesn't have the ".la"-suffix, this suffix is appended and - * it tries to open the corresponding module. - * - * Use operator bool() to see whether the operation succeeded. For instance, - * @code - * Glib::Module module("plugins/helloworld"); - * if(module) - * { - * void* func = 0; - * bool found = get_symbol("some_function", func); - * } - * @endcode - * - * @param file_name The library filename to open - * @param flags Flags to configure the load process - */ - explicit Module(const std::string& file_name, ModuleFlags flags = ModuleFlags(0)); - - /** Close a module. The module will be removed from memory, unless - * make_resident has been called. - */ - virtual ~Module(); - - /** Check whether the module was found. - */ - operator bool() const; - - /** Checks if modules are supported on the current platform. - * @returns true if available, false otherwise - */ - _WRAP_METHOD(static bool get_supported(), g_module_supported) - - /** Ensures that a module will never be unloaded. Any calls to the - * Glib::Module destructor will not unload the module. - */ - _WRAP_METHOD(void make_resident(), g_module_make_resident) - - /** Gets a string describing the last module error. - * @returns The error string - */ - _WRAP_METHOD(static std::string get_last_error(), g_module_error) - - /** Gets a symbol pointer from the module. - * @param symbol_name The name of the symbol to lookup - * @param symbol A pointer to set to the symbol - * @returns True if the symbol was found, false otherwise. - */ - _WRAP_METHOD(bool get_symbol(const std::string& symbol_name, void*& symbol) const, g_module_symbol) - - /** Get the name of the module. - * @returns The name of the module - */ - _WRAP_METHOD(std::string get_name() const, g_module_name) - - /** A portable way to build the filename of a module. The - * platform-specific prefix and suffix are added to the filename, if - * needed, and the result is added to the directory, using the - * correct separator character. - * - * The directory should specify the directory where the module can - * be found. It can be an empty string to indicate that the - * module is in a standard platform-specific directory, though this - * is not recommended since the wrong module may be found. - * - * For example, calling g_module_build_path() on a Linux - * system with a directory of /lib and a module_name of - * "mylibrary" will return /lib/libmylibrary.so. On a - * Windows system, using \\Windows as the directory it will - * return \\Windows\\mylibrary.dll. - * - * @param directory The directory the module is in - * @param module_name The name of the module - * @returns The system-specific filename of the module - */ - // TODO: add an override which doesn't take a directory - // TODO: check what happens when directory is "" - _WRAP_METHOD(static std::string build_path(const std::string& directory, const std::string& module_name), g_module_build_path) - - GModule* gobj() { return gobject_; } - const GModule* gobj() const { return gobject_; } - -protected: - GModule* gobject_; - -private: - // noncopyable - Module(const Module&); - Module& operator=(const Module&); -}; - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/optioncontext.ccg b/libs/glibmm2/glib/src/optioncontext.ccg deleted file mode 100644 index 494e4f39e3..0000000000 --- a/libs/glibmm2/glib/src/optioncontext.ccg +++ /dev/null @@ -1,112 +0,0 @@ -// -*- c++ -*- -/* $Id: optioncontext.ccg,v 1.4 2004/10/30 14:25:45 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -namespace Glib -{ - - namespace Private - { - static const gchar* SignalProxy_translate_gtk_callback (const gchar* str, gpointer data) - { - Glib::ustring translated_str; - Glib::OptionContext::SlotTranslate* the_slot = - static_cast(data); - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { -#endif //GLIBMM_EXCEPTIONS_ENABLED - translated_str = (*the_slot)(str); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } -#endif //GLIBMM_EXCEPTIONS_ENABLED - return translated_str.c_str (); - } - - static void SignalProxy_translate_gtk_callback_destroy (gpointer data) - { - delete static_cast(data); - } - - } //namespace Private - -OptionContext::OptionContext(const Glib::ustring& parameter_string) -: gobject_( g_option_context_new(parameter_string.c_str()) ), - has_ownership_(true) -{ -} - -OptionContext::OptionContext(GOptionContext* castitem, bool take_ownership) -: gobject_(castitem), - has_ownership_(take_ownership) -{ -} - -OptionContext::~OptionContext() -{ - if(has_ownership_) - g_option_context_free(gobj()); - - gobject_ = 0; -} - -void OptionContext::add_group(OptionGroup& group) -{ - //Strangely, GObjectContext actually takes ownership of the GOptionGroup, deleting it later. - g_option_context_add_group(gobj(), (group).gobj_give_ownership()); -} - -void OptionContext::set_main_group(OptionGroup& group) -{ - //Strangely, GObjectContext actually takes ownership of the GOptionGroup, deleting it later. - g_option_context_set_main_group(gobj(), (group).gobj_give_ownership()); -} - - -/* -OptionGroup OptionContext::get_main_group() const -{ - const GOptionGroup* cobj = g_option_context_get_main_group(const_cast( gobj()) ); - OptionGroup cppObj(const_cast(cobj), true); // take_copy - return cppObj; -} - -*/ - -void OptionContext::set_translate_func (const SlotTranslate& slot) -{ - //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter. - //It will be deleted when SignalProxy_translate_gtk_callback_destroy() is called. - SlotTranslate* slot_copy = new SlotTranslate(slot); - - g_option_context_set_translate_func( - gobj(), &Private::SignalProxy_translate_gtk_callback, slot_copy, - &Private::SignalProxy_translate_gtk_callback_destroy); -} - -} // namespace Glib diff --git a/libs/glibmm2/glib/src/optioncontext.hg b/libs/glibmm2/glib/src/optioncontext.hg deleted file mode 100644 index 1d71ddb4d5..0000000000 --- a/libs/glibmm2/glib/src/optioncontext.hg +++ /dev/null @@ -1,127 +0,0 @@ -/* $Id: optioncontext.hg,v 1.6 2005/01/10 17:42:17 murrayc Exp $ */ - -/* Copyright (C) 2004 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GOptionContext GOptionContext; } -#endif - - -namespace Glib -{ - -/** Exception class for options. - */ -_WRAP_GERROR(OptionError, GOptionError, G_OPTION_ERROR, NO_GTYPE) - -/** An OptionContext defines which options are accepted by the commandline option parser. - */ -class OptionContext -{ - _CLASS_GENERIC(OptionContext, GOptionContext) -public: - - /** Creates a new option context. - * @param parameter_string A string which is displayed in the first line of --help output, after programname [OPTION...] - */ - explicit OptionContext(const Glib::ustring& parameter_string = Glib::ustring()); - - //Note that, unlike Glib::Wrap(), this would create a second C++ instance for the same C instance, - //so it should be used carefully. For instance you could not access data in a derived class via this second instance. - explicit OptionContext(GOptionContext* castitem, bool take_ownership = false); - virtual ~OptionContext(); - - _WRAP_METHOD(void set_help_enabled(bool help_enabled = true), g_option_context_set_help_enabled) - _WRAP_METHOD(bool get_help_enabled() const, g_option_context_get_help_enabled) - _WRAP_METHOD(void set_ignore_unknown_options(bool ignore_unknown = true), g_option_context_set_ignore_unknown_options) - _WRAP_METHOD(bool get_ignore_unknown_options() const, g_option_context_get_ignore_unknown_options) - -#m4 _CONVERSION(`char**&',`gchar***',`&($3)') - _WRAP_METHOD(bool parse(int& argc, char**& argv), g_option_context_parse, errthrow) - - //g_option_context_add_main_entries(), just creates a group internally, adds them to it, and does a set_main_group() - //- a group without callbacks seems to do some simple default parsing. - _IGNORE(g_option_context_add_main_entries) - - /** Adds an OptionGroup to the context, so that parsing with context will recognize the options in the group. - * Note that the group will not be copied, so it should exist for as long as the context exists. - * - * @param group The group to add. - */ - void add_group(OptionGroup& group); - _IGNORE(g_option_context_add_group) - - /** Sets an OptionGroup as the main group of the context. This has the same effect as calling add_group(), the only - * difference is that the options in the main group are treated differently when generating --help output. - * Note that the group will not be copied, so it should exist for as long as the context exists. - * - * @param group The group to add. - */ - void set_main_group(OptionGroup& group); - _IGNORE(g_option_context_set_main_group) - - //We don't need this (hopefully), and the memory management would be really awkward. - //OptionGroup& get_main_group(); - //const OptionGroup& get_main_group() const; - _IGNORE(g_option_context_get_main_group) - - - GOptionContext* gobj() { return gobject_; } - const GOptionContext* gobj() const { return gobject_; } - - _WRAP_METHOD(void set_summary(const Glib::ustring& summary), g_option_context_set_summary) - _WRAP_METHOD(Glib::ustring get_summary() const, g_option_context_get_summary) - _WRAP_METHOD(void set_description(const Glib::ustring& description), g_option_context_set_description) - _WRAP_METHOD(Glib::ustring get_description() const, g_option_context_get_description) - - _WRAP_METHOD(void set_translation_domain(const Glib::ustring& domain), g_option_context_set_translation_domain) - - /** - * This function is used to translate user-visible strings, for --help output. - * The function takes an untranslated string and returns a translated string - */ - typedef sigc::slot SlotTranslate; - - /** - * Sets the function which is used to translate user-visible - * strings, for --help output. Different groups can use different functions. - * - * If you are using gettext(), you only need to set the translation domain, - * see set_translation_domain(). - * - * @newin2p14 - */ - void set_translate_func (const SlotTranslate& slot); - _IGNORE(g_option_context_set_translate_func) - -protected: - - GOptionContext* gobject_; - bool has_ownership_; -}; - - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/optionentry.ccg b/libs/glibmm2/glib/src/optionentry.ccg deleted file mode 100644 index cd35a96e88..0000000000 --- a/libs/glibmm2/glib/src/optionentry.ccg +++ /dev/null @@ -1,79 +0,0 @@ -// -*- c++ -*- -/* $Id: optionentry.ccg,v 1.8 2006/03/08 12:23:03 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - -namespace Glib -{ - -OptionEntry::OptionEntry() -{ - gobject_ = g_new0(GOptionEntry, 1); -} - -OptionEntry::~OptionEntry() -{ - g_free(const_cast(gobject_->long_name)); - g_free(const_cast(gobject_->description)); - g_free(const_cast(gobject_->arg_description)); - g_free(gobject_); -} - -OptionEntry::OptionEntry(const OptionEntry& src) -{ - gobject_ = g_new0(GOptionEntry, 1); - - operator=(src); -} - -OptionEntry& OptionEntry::operator=(const OptionEntry& src) -{ - if(this != &src) - { - if(gobject_->long_name) - g_free(const_cast(gobject_->long_name)); - - gobject_->long_name = g_strdup(src.gobject_->long_name); - - gobject_->short_name = src.gobject_->short_name; //It's just one char. - - gobject_->flags = src.gobject_->flags; - gobject_->arg = src.gobject_->arg; - gobject_->arg_data = src.gobject_->arg_data; //Shared, because it's not owned by any instance of this class anyway. - - if(gobject_->description) - g_free(const_cast(gobject_->description)); - - gobject_->description = g_strdup(src.gobject_->description); - - if(gobject_->arg_description) - g_free(const_cast(gobject_->arg_description)); - - gobject_->arg_description = g_strdup(src.gobject_->arg_description); - } - - return *this; -} - - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/optionentry.hg b/libs/glibmm2/glib/src/optionentry.hg deleted file mode 100644 index 8944898a82..0000000000 --- a/libs/glibmm2/glib/src/optionentry.hg +++ /dev/null @@ -1,96 +0,0 @@ -/* $Id: optionentry.hg,v 1.11 2005/07/31 13:11:05 murrayc Exp $ */ - -/* Copyright (C) 2004 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GOptionEntry GOptionEntry; } -#endif - - -namespace Glib -{ - -/** An OptionEntry defines a single option. To have an effect, it must be added to an OptionGroup with - * OptionGroup::add_entry(). - * - * The long name of an option can be used to specify it in a commandline as --long_name. - * Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also - * possible to specify the option as --groupname-long_name. - * - * If an option has a short name, it can be specified as -short_name in a commandline. - * - * The description for the option is shown in the --help output. - * - * The arg_descripton is the placeholder to use for the extra argument parsed by the option in --help output. - */ -class OptionEntry -{ - _CLASS_GENERIC(OptionEntry, GOptionEntry) -public: - - //Copied from goption.h, instead of generated, so that we can put it inside the class. - enum Flags - { - FLAG_HIDDEN = 1 << 0, - FLAG_IN_MAIN = 1 << 1, - FLAG_REVERSE = 1 << 2, - FLAG_NO_ARG = 1 << 3, - FLAG_FILENAME = 1 << 4, - FLAG_OPTIONAL_ARG = 1 << 5, - FLAG_NOALIAS = 1 << 6 - } GOptionFlags; - - OptionEntry(); - OptionEntry(const OptionEntry& src); - virtual ~OptionEntry(); - - OptionEntry& operator=(const OptionEntry& src); - -#m4 _CONVERSION(`Glib::ustring',`const gchar*',`g_strdup(($3).c_str())') - - _MEMBER_GET(long_name, long_name, Glib::ustring, const char*) - _MEMBER_SET(long_name, long_name, Glib::ustring, const char*) - - _MEMBER_GET(short_name, short_name, gchar, gchar) - _MEMBER_SET(short_name, short_name, gchar, gchar) - - _MEMBER_GET(flags, flags, int, int) - _MEMBER_SET(flags, flags, int, int) - - //TODO: G_OPTION_ARG_CALLBACK, - - _MEMBER_GET(description, description, Glib::ustring, const char*) - _MEMBER_SET(description, description, Glib::ustring, const char*) - - _MEMBER_GET(arg_description, arg_description, Glib::ustring, const char*) - _MEMBER_SET(arg_description, arg_description, Glib::ustring, const char*) - - GOptionEntry* gobj() { return gobject_; } - const GOptionEntry* gobj() const { return gobject_; } - -protected: - - GOptionEntry* gobject_; -}; - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/optiongroup.ccg b/libs/glibmm2/glib/src/optiongroup.ccg deleted file mode 100644 index c08c79a212..0000000000 --- a/libs/glibmm2/glib/src/optiongroup.ccg +++ /dev/null @@ -1,518 +0,0 @@ -// -*- c++ -*- -/* $Id: optiongroup.ccg,v 1.15.4.3 2006/03/30 12:19:58 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -//#include -#include // g_malloc -#include - -namespace Glib -{ - -namespace //anonymous -{ - -extern "C" -{ - -static gboolean g_callback_pre_parse(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error */) -{ - OptionContext cppContext(context, false /* take_ownership */); - //OptionGroup cppGroup(group, true /* take_copy */); //Maybe this should be option_group. - - OptionGroup* option_group = static_cast(data); - if(option_group) - return option_group->on_pre_parse(cppContext, *option_group); - else - return false; -} - -static gboolean g_callback_post_parse(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error */) -{ - OptionContext cppContext(context, false /* take_ownership */); - //OptionGroup cppGroup(group, true /* take_copy */); //Maybe this should be option_group. - - OptionGroup* option_group = static_cast(data); - if(option_group) - { - return option_group->on_post_parse(cppContext, *option_group); - } - else - return false; -} - -static void g_callback_error(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error*/) -{ - OptionContext cppContext(context, false /* take_ownership */); - //OptionGroup cppGroup(group); //Maybe this should be option_group. - - OptionGroup* option_group = static_cast(data); - if(option_group) - return option_group->on_error(cppContext, *option_group); -} - -} /* extern "C" */ - -} //anonymous namespace - - -OptionGroup::OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description) -: gobject_( g_option_group_new(name.c_str(), description.c_str(), help_description.c_str(), this, 0 /* destroy_func */) ), - has_ownership_(true) -{ - //Connect callbacks, so that derived classes can override the virtual methods: - g_option_group_set_parse_hooks(gobj(), &g_callback_pre_parse, &g_callback_post_parse); - g_option_group_set_error_hook(gobj(), &g_callback_error); -} - -OptionGroup::OptionGroup(GOptionGroup* castitem) -: gobject_(castitem), - has_ownership_(true) -{ - //Always takes ownership - never takes copy. -} - - -OptionGroup::~OptionGroup() -{ - //Free any C types that were allocated during add_entry(): - for(type_map_entries::iterator iter = map_entries_.begin(); iter != map_entries_.end(); ++iter) - { - CppOptionEntry& cpp_entry = iter->second; - cpp_entry.release_c_arg(); - } - - if(has_ownership_) - { - g_option_group_free(gobj()); - gobject_ = 0; - } -} - -void OptionGroup::add_entry(const OptionEntry& entry) -{ - //It does not copy the entry, so it needs to live as long as the group. - - //g_option_group_add_entries takes an array, with the last item in the array having a null long_name. - //Hopefully this will be properly documented eventually - see bug # - - //Create a temporary array, just so we can give the correct thing to g_option_group_add_entries: - GOptionEntry array[2]; - array[0] = *(entry.gobj()); //Copy contents. - GLIBMM_INITIALIZE_STRUCT(array[1], GOptionEntry); - - g_option_group_add_entries(gobj(), array); -} - -void OptionGroup::add_entry(const OptionEntry& entry, bool& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_NONE /* Actually a boolean on/off, depending on whether the argument name was given, without argument parameters. */, &arg); -} - -void OptionGroup::add_entry(const OptionEntry& entry, int& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_INT, &arg); -} - -void OptionGroup::add_entry(const OptionEntry& entry, Glib::ustring& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_STRING, &arg); -} - -void OptionGroup::add_entry(const OptionEntry& entry, vecustrings& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_STRING_ARRAY, &arg); -} - -void OptionGroup::add_entry_filename(const OptionEntry& entry, std::string& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_FILENAME, &arg); -} - -void OptionGroup::add_entry_filename(const OptionEntry& entry, vecstrings& arg) -{ - add_entry_with_wrapper(entry, G_OPTION_ARG_FILENAME_ARRAY, &arg); -} - -void OptionGroup::add_entry_with_wrapper(const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg) -{ - const Glib::ustring name = entry.get_long_name(); - type_map_entries::iterator iterFind = map_entries_.find(name); - if( iterFind == map_entries_.end() ) //If we have not added this entry already - { - CppOptionEntry cppEntry; - cppEntry.carg_type_ = arg_type; - cppEntry.allocate_c_arg(); - cppEntry.set_c_arg_default(cpp_arg); - - cppEntry.cpparg_ = cpp_arg; - - //Give the information to the C API: - - cppEntry.entry_ = new OptionEntry(entry); //g_option_group_add_entry() does not take its own copy, so we must keep the instance alive. */ - //cppEntry.entry_ is deleted in release_c_arg(), via the destructor. - - cppEntry.entry_->gobj()->arg = arg_type; - cppEntry.entry_->gobj()->arg_data = cppEntry.carg_; - - //Remember the C++/C mapping so that we can use it later: - map_entries_[name] = cppEntry; - - add_entry(*(cppEntry.entry_)); - } -} - - -bool OptionGroup::on_pre_parse(OptionContext& /* context */, OptionGroup& /* group */) -{ - return true; -} - -bool OptionGroup::on_post_parse(OptionContext& /* context */, OptionGroup& /* group */) -{ - //Call this at the start of overrides. - - //TODO: Maybe put this in the C callback: - - //The C args have now been given values by GOption. - //Convert C values to C++ values: - - for(type_map_entries::iterator iter = map_entries_.begin(); iter != map_entries_.end(); ++iter) - { - CppOptionEntry& cpp_entry = iter->second; - cpp_entry.convert_c_to_cpp(); - } - - return true; -} - -void OptionGroup::on_error(OptionContext& /* context */, OptionGroup& /* group */) -{ -} - - -OptionGroup::CppOptionEntry::CppOptionEntry() -: carg_type_(G_OPTION_ARG_NONE), carg_(0), cpparg_(0), entry_(0) -{} - -void OptionGroup::CppOptionEntry::allocate_c_arg() -{ - //Create an instance of the appropriate C type. - //This will be destroyed in the OptionGroup destructor. - // - //We must also call set_c_arg_default() to give these C types the specified defaults based on the C++-typed arguments. - switch(carg_type_) - { - case G_OPTION_ARG_STRING: //The char* will be for UTF8 strins. - case G_OPTION_ARG_FILENAME: //The char* will be for strings in the current locale's encoding. - { - char** typed_arg = new char*; - //The C code will allocate a char* and put it here, for us to g_free() later. - //Alternatively, set_c_arg_default() might allocate a char*, and the C code might or might not free and replace that. - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - case G_OPTION_ARG_INT: - { - int* typed_arg = new int; - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - case G_OPTION_ARG_STRING_ARRAY: - case G_OPTION_ARG_FILENAME_ARRAY: - { - char*** typed_arg = new char**; - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - case G_OPTION_ARG_NONE: /* Actually a boolean. */ - { - gboolean* typed_arg = new gboolean; - *typed_arg = 0; - carg_ = typed_arg; - - break; - } - default: - { - break; - } - } -} - -void OptionGroup::CppOptionEntry::set_c_arg_default(void* cpp_arg) -{ - switch(carg_type_) - { - case G_OPTION_ARG_INT: - { - *static_cast(carg_) = *static_cast(cpp_arg); - break; - } - case G_OPTION_ARG_NONE: - { - *static_cast(carg_) = *static_cast(cpp_arg); - break; - } - case G_OPTION_ARG_STRING: - { - Glib::ustring* typed_cpp_arg = static_cast(cpp_arg); - if(typed_cpp_arg && !typed_cpp_arg->empty()) - { - const char** typed_c_arg = static_cast(carg_); - *typed_c_arg = g_strdup(typed_cpp_arg->c_str()); //Freed in release_c_arg(). - } - break; - } - case G_OPTION_ARG_FILENAME: - { - std::string* typed_cpp_arg = static_cast(cpp_arg); - if(typed_cpp_arg && !typed_cpp_arg->empty()) - { - const char** typed_c_arg = static_cast(carg_); - *typed_c_arg = g_strdup(typed_cpp_arg->c_str()); //Freed in release_c_arg(). - } - break; - } - case G_OPTION_ARG_STRING_ARRAY: - { - std::vector* typed_cpp_arg = static_cast*>(cpp_arg); - if(typed_cpp_arg) - { - std::vector& vec = *typed_cpp_arg; - const char** array = static_cast( g_malloc(sizeof(gchar*) * (vec.size() + 1)) ); - - for(std::vector::size_type i = 0; i < vec.size(); ++i) - { - array[i] = g_strdup( vec[i].c_str() ); - } - - array[vec.size()] = 0; - - const char*** typed_c_arg = static_cast(carg_); - *typed_c_arg = array; - } - break; - } - case G_OPTION_ARG_FILENAME_ARRAY: - { - std::vector* typed_cpp_arg = static_cast*>(cpp_arg); - if(typed_cpp_arg) - { - std::vector& vec = *typed_cpp_arg; - const char** array = static_cast( g_malloc(sizeof(gchar*) * (vec.size() + 1)) ); - - for(std::vector::size_type i = 0; i < vec.size(); ++i) - { - array[i] = g_strdup( vec[i].c_str() ); - } - - array[vec.size()] = 0; - - const char*** typed_c_arg = static_cast(carg_); - *typed_c_arg = array; - } - break; - } - default: - { - break; - } - } -} - -void OptionGroup::CppOptionEntry::release_c_arg() -{ - //Delete the instances that we created in allocate_c_arg(). - //Notice that we delete the type that we created, but not the value to which it points. - if(carg_) - { - switch(carg_type_) - { - case G_OPTION_ARG_STRING: - case G_OPTION_ARG_FILENAME: - { - char** typed_arg = static_cast(carg_); - g_free(*typed_arg); //Free the char* string at type_arg, which was allocated by the C code. - delete typed_arg; //Delete the char** that we allocated in allocate_c_arg; - - break; - } - case G_OPTION_ARG_INT: - { - int* typed_arg = static_cast(carg_); - delete typed_arg; - - break; - } - case G_OPTION_ARG_STRING_ARRAY: - case G_OPTION_ARG_FILENAME_ARRAY: - { - delete (char**)carg_; - break; - } - case G_OPTION_ARG_NONE: /* Actually a boolean. */ - { - gboolean* typed_arg = static_cast(carg_); - delete typed_arg; - - break; - } - default: - { - /* TODO: - G_OPTION_ARG_CALLBACK, - */ - break; - } - } - - carg_ = 0; - } - - if(entry_) - delete entry_; -} - -void OptionGroup::CppOptionEntry::convert_c_to_cpp() -{ - switch(carg_type_) - { - case G_OPTION_ARG_STRING: - { - char** typed_arg = static_cast(carg_); - Glib::ustring* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - char* pch = *typed_arg; - (*typed_cpp_arg) = Glib::convert_const_gchar_ptr_to_ustring(pch); - - break; - } - } - case G_OPTION_ARG_FILENAME: - { - char** typed_arg = static_cast(carg_); - std::string* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - char* pch = *typed_arg; - (*typed_cpp_arg) = Glib::convert_const_gchar_ptr_to_stdstring(pch); - - break; - } - } - case G_OPTION_ARG_INT: - { - *((int*)cpparg_) = *(static_cast(carg_)); - break; - } - case G_OPTION_ARG_STRING_ARRAY: - { - char*** typed_arg = static_cast(carg_); - vecustrings* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - typed_cpp_arg->clear(); - - //The C array seems to be null-terminated. - //Glib::StringArrayHandle array_handle(*typed_arg, Glib::OWNERSHIP_NONE); - - //The SUN Forte compiler complains about this: - // "optiongroup.cc", line 354: Error: Cannot assign Glib::ArrayHandle> to std::vector without - // "std::vector::operator=(const std::vector&)";. - // - //(*typed_cpp_arg) = array_handle; - // - //And the Tru64 compiler does not even like us to instantiate the StringArrayHandle: - // - // cxx: Error: ../../glib/glibmm/containerhandle_shared.h, line 149: the operand - // of a pointer dynamic_cast must be a pointer to a complete class type - // return dynamic_cast(Glib::wrap_auto(cobj, false /* take_copy */)); - - //for(Glib::StringArrayHandle::iterator iter = array_handle.begin(); iter != array_handle.end(); ++iter) - //{ - // typed_cpp_arg->push_back(*iter); - //} - - //So we do this: - - char** char_array_next = *typed_arg; - while(char_array_next && *char_array_next) - { - typed_cpp_arg->push_back(*char_array_next); - ++char_array_next; - } - } - - break; - } - case G_OPTION_ARG_FILENAME_ARRAY: - { - char*** typed_arg = static_cast(carg_); - vecustrings* typed_cpp_arg = static_cast(cpparg_); - if(typed_arg && typed_cpp_arg) - { - typed_cpp_arg->clear(); - - //See comments above about the SUN Forte and Tru64 compilers. - - char** char_array_next = *typed_arg; - while(char_array_next && *char_array_next) - { - typed_cpp_arg->push_back(*char_array_next); - ++char_array_next; - } - } - - break; - } - case G_OPTION_ARG_NONE: /* Actually a boolean. */ - { - *(static_cast(cpparg_)) = *(static_cast(carg_)); - break; - } - default: - { - /* TODO: - G_OPTION_ARG_CALLBACK, - */ - break; - } - } -} - -GOptionGroup* OptionGroup::gobj_give_ownership() -{ - has_ownership_ = false; - return gobj(); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/optiongroup.hg b/libs/glibmm2/glib/src/optiongroup.hg deleted file mode 100644 index c15b80d950..0000000000 --- a/libs/glibmm2/glib/src/optiongroup.hg +++ /dev/null @@ -1,124 +0,0 @@ -/* $Id: optiongroup.hg,v 1.10.4.1 2006/03/30 12:19:58 murrayc Exp $ */ - -/* Copyright (C) 2004 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include -#include -#include //TODO: Try to hide this. - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _GOptionGroup GOptionGroup; } -#endif //DOXYGEN_SHOULD_SKIP_THIS - - -namespace Glib -{ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -class OptionEntry; -class OptionContext; -#endif //DOXYGEN_SHOULD_SKIP_THIS - -/** An OptionGroup defines the options in a single group. - * Libraries which need to parse commandline options are expected to provide a function that allows their OptionGroups to - * be added to the application's OptionContext. - */ -class OptionGroup -{ - _CLASS_GENERIC(OptionGroup, GOptionGroup) -public: - OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description = Glib::ustring()); - - /** This always takes ownership of the underlying GOptionGroup, - * so it is only useful with C functions that return newly-allocated GOptionGroups. - */ - explicit OptionGroup(GOptionGroup* castitem); - _IGNORE(g_option_group_new) - virtual ~OptionGroup(); - _IGNORE(g_option_group_free) - - - virtual bool on_pre_parse(OptionContext& context, OptionGroup& group); - virtual bool on_post_parse(OptionContext& context, OptionGroup& group); - virtual void on_error(OptionContext& context, OptionGroup& group); - _IGNORE(g_option_group_set_parse_hooks, g_option_group_set_error_hook) - - void add_entry(const OptionEntry& entry); - _IGNORE(g_option_group_add_entries) - - - typedef std::vector vecustrings; - typedef std::vector vecstrings; - - void add_entry(const OptionEntry& entry, bool& arg); - void add_entry(const OptionEntry& entry, int& arg); - void add_entry(const OptionEntry& entry, Glib::ustring& arg); - void add_entry_filename(const OptionEntry& entry, std::string& arg); - void add_entry(const OptionEntry& entry, vecustrings& arg); - void add_entry_filename(const OptionEntry& entry, vecstrings& arg); - -/* TODO: -void g_option_group_set_translate_func (GOptionGroup *group, - GTranslateFunc func, - gpointer data, - GDestroyNotify destroy_notify); -*/ - _WRAP_METHOD(void set_translation_domain(const Glib::ustring& domain), g_option_group_set_translation_domain) - - GOptionGroup* gobj() { return gobject_; } - const GOptionGroup* gobj() const { return gobject_; } - GOptionGroup* gobj_give_ownership(); - -protected: - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - /** This is not public API. It is an implementation detail. - */ - class CppOptionEntry - { - public: - CppOptionEntry(); - - void allocate_c_arg(); - void set_c_arg_default(void* cpp_arg); - void convert_c_to_cpp(); - void release_c_arg(); - - GOptionArg carg_type_; - void* carg_; - void* cpparg_; - OptionEntry* entry_; - }; - - void add_entry_with_wrapper(const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg); - - //Map of entry names to CppOptionEntry: - typedef std::map type_map_entries; - type_map_entries map_entries_; - - GOptionGroup* gobject_; - bool has_ownership_; //Whether the gobject_ belongs to this C++ instance. -#endif //DOXYGEN_SHOULD_SKIP_THIS -}; - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/regex.ccg b/libs/glibmm2/glib/src/regex.ccg deleted file mode 100644 index e087365ed6..0000000000 --- a/libs/glibmm2/glib/src/regex.ccg +++ /dev/null @@ -1,204 +0,0 @@ -/* Copyright (C) 2007 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -namespace Glib -{ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::RefPtr Regex::create(const Glib::ustring& pattern, - RegexCompileFlags compile_options, - RegexMatchFlags match_options) -#else -Glib::RefPtr Regex::create(const Glib::ustring& pattern, - RegexCompileFlags compile_options, - RegexMatchFlags match_options, - std::auto_ptr& error) -#endif /* GLIBMM_EXCEPTIONS_ENABLED */ -{ - GError* gerror = 0; - GRegex* regex = g_regex_new(pattern.c_str(), (GRegexCompileFlags)compile_options, - (GRegexMatchFlags)match_options, &gerror); - - if(gerror) -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::Error::throw_exception(gerror); -#else - error = Glib::Error::throw_exception(gerror); -#endif - return Glib::wrap(regex); -} - -// static -Glib::ustring Regex::escape_string(const Glib::ustring& string) -{ - const Glib::ScopedPtr buf (g_regex_escape_string(string.raw().c_str(), - string.raw().size())); - return Glib::ustring(buf.get()); -} - -bool Regex::match(const Glib::ustring& string, RegexMatchFlags match_options) -{ - return g_regex_match(gobj(), string.c_str(), (GRegexMatchFlags)(match_options), 0); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_full(gobj(), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_full(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -bool Regex::match_all(const Glib::ustring& string, RegexMatchFlags match_options) -{ - return g_regex_match_all(gobj(), string.c_str(), ((GRegexMatchFlags)(match_options)), 0); -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_all_full(gobj(), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -bool Regex::match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options) -#else -bool Regex::match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - bool retvalue = g_regex_match_all_full(gobj(), string.c_str(), string_len, start_position, ((GRegexMatchFlags)(match_options)), 0, &(gerror)); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options) -#else -Glib::ustring Regex::replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace(gobj(), string.c_str(), -1, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::ustring Regex::replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options) -#else -Glib::ustring Regex::replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::ustring retvalue = Glib::convert_return_gchar_ptr_to_ustring(g_regex_replace_literal(gobj(), string.c_str(), -1, start_position, replacement.c_str(), ((GRegexMatchFlags)(match_options)), &(gerror))); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -#ifdef GLIBMM_EXCEPTIONS_ENABLED -Glib::StringArrayHandle Regex::split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens) const -#else -Glib::StringArrayHandle Regex::split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens, std::auto_ptr& error) const -#endif //GLIBMM_EXCEPTIONS_ENABLED -{ - GError* gerror = 0; - Glib::StringArrayHandle retvalue = Glib::StringArrayHandle(g_regex_split_full(const_cast(gobj()), string.c_str(), -1, start_position, ((GRegexMatchFlags)(match_options)), max_tokens, &(gerror)), Glib::OWNERSHIP_DEEP); -#ifdef GLIBMM_EXCEPTIONS_ENABLED - if(gerror) - ::Glib::Error::throw_exception(gerror); -#else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); -#endif //GLIBMM_EXCEPTIONS_ENABLED - - return retvalue; -} - -} // namespace Glib diff --git a/libs/glibmm2/glib/src/regex.hg b/libs/glibmm2/glib/src/regex.hg deleted file mode 100644 index 5b029a8f28..0000000000 --- a/libs/glibmm2/glib/src/regex.hg +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (C) 2007 The glibmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include -#include -#include -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -typedef struct _GRegex GRegex; -#endif - -namespace Glib -{ - -_WRAP_ENUM(RegexCompileFlags, GRegexCompileFlags, NO_GTYPE) -_WRAP_ENUM(RegexMatchFlags, GRegexMatchFlags, NO_GTYPE) - -/** Exception class for Regex - */ -_WRAP_GERROR(RegexError, GRegexError, G_REGEX_ERROR, NO_GTYPE) - - -/** Perl-compatible regular expressions - matches strings against regular expressions. - * - * The Glib::Regex functions implement regular expression pattern matching using - * syntax and semantics similar to Perl regular expression. - * - * Some functions accept a start_position argument, setting it differs from just - * passing over a shortened string and setting REGEX_MATCH_NOTBOL in the case - * of a pattern that begins with any kind of lookbehind assertion. For example, - * consider the pattern "\Biss\B" which finds occurrences of "iss" in the middle - * of words. ("\B" matches only if the current position in the subject is not a - * word boundary.) When applied to the string "Mississipi" from the fourth byte, - * namely "issipi", it does not match, because "\B" is always false at the - * start of the subject, which is deemed to be a word boundary. However, if - * the entire string is passed , but with start_position set to 4, it finds the - * second occurrence of "iss" because it is able to look behind the starting point - * to discover that it is preceded by a letter. - * - * Note that, unless you set the REGEX_RAW flag, all the strings passed to these - * functions must be encoded in UTF-8. The lengths and the positions inside the - * strings are in bytes and not in characters, so, for instance, - * "\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a single - * character. If you set REGEX_RAW the strings can be non-valid UTF-8 strings - * and a byte is treated as a character, so "\xc3\xa0" is two bytes and - * two characters long. - * - * When matching a pattern, "\n" matches only against a "\n" character in the - * string, and "\r" matches only a "\r" character. To match any newline sequence - * use "\R". This particular group matches either the two-character sequence - * CR + LF ("\r\n"), or one of the single characters LF (linefeed, U+000A, "\n"), - * VT (vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"), CR (carriage - * return, U+000D, "\r"), NEL (next line, U+0085), LS (line separator, U+2028), - * or PS (paragraph separator, U+2029). - * - * The behaviour of the dot, circumflex, and dollar metacharacters are affected - * by newline characters, the default is to recognize any newline character (the - * same characters recognized by "\R"). This can be changed with REGEX_NEWLINE_CR, - * REGEX_NEWLINE_LF and REGEX_NEWLINE_CRLF compile options, and with - * REGEX_MATCH_NEWLINE_ANY, REGEX_MATCH_NEWLINE_CR, REGEX_MATCH_NEWLINE_LF - * and REGEX_MATCH_NEWLINE_CRLF match options. These settings are also - * relevant when compiling a pattern if REGEX_EXTENDED is set, and an unescaped - * "#" outside a character class is encountered. This indicates a comment that - * lasts until after the next newline. - * - * Creating and manipulating the same Glib::Regex class from different threads is - * not a problem as Glib::Regex does not modify its internal state between creation and - * destruction, on the other hand Glib::MatchInfo is not threadsafe. - * - * The regular expressions low level functionalities are obtained through the - * excellent PCRE library written by Philip Hazel. - * - * @newin2p14 - */ -class Regex -{ - _CLASS_OPAQUE_REFCOUNTED(Regex, GRegex, NONE, g_regex_ref, g_regex_unref) - _IGNORE(g_regex_ref, g_regex_unref) -public: - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - static Glib::RefPtr create(const Glib::ustring& pattern, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0)); -#else - static Glib::RefPtr create(const Glib::ustring& pattern, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0), std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - _WRAP_METHOD(Glib::ustring get_pattern() const, g_regex_get_pattern) - _WRAP_METHOD(int get_max_backref() const, g_regex_get_max_backref) - _WRAP_METHOD(int get_capture_count() const, g_regex_get_capture_count) - _WRAP_METHOD(int get_string_number(const Glib::ustring& name) const, g_regex_get_string_number) - - static Glib::ustring escape_string(const Glib::ustring& string); - - _WRAP_METHOD(static bool match_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0)), g_regex_match_simple) - - //TODO: _WRAP_METHOD(bool match(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo **match_info = 0), g_regex_match) - bool match(const Glib::ustring& string, RegexMatchFlags match_options = static_cast(0)); - - //TODO: Wrap GMatchInfo as an iterator: - //_WRAP_METHOD(bool match_full(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo** match_info = 0), g_regex_match_full, errthrow) - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options); -#else - bool match(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options); -#else - bool match(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - //TODO: _WRAP_METHOD(bool match_all(const Glib::ustring& string, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo ** match_info = 0), g_regex_match_all) - bool match_all(const Glib::ustring& string, RegexMatchFlags match_options = static_cast(0)); - - //TODO: _WRAP_METHOD(bool match_all_full(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = (RegexMatchFlags)0, GMatchInfo** match_info = 0), g_regex_match_all_full, errthrow) - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options); -#else - bool match_all(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - bool match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options); -#else - bool match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - -#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)') - - _WRAP_METHOD(static Glib::StringArrayHandle split_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = static_cast(0), RegexMatchFlags match_options = static_cast(0)), g_regex_split_simple) - _WRAP_METHOD(Glib::StringArrayHandle split(const Glib::ustring& string, RegexMatchFlags match_options = static_cast(0)), g_regex_split) - - _WRAP_METHOD(Glib::StringArrayHandle split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = static_cast(0), int max_tokens = 0) const, g_regex_split_full, errthrow) - -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::StringArrayHandle split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens) const; -#else - Glib::StringArrayHandle split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens, std::auto_ptr& error) const; -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - _WRAP_METHOD(Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast(0)), g_regex_replace, errthrow) -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options); -#else - Glib::ustring replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - _WRAP_METHOD(Glib::ustring replace_literal(const gchar *string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast(0)), g_regex_replace_literal, errthrow) -#ifdef GLIBMM_EXCEPTIONS_ENABLED - Glib::ustring replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options); -#else - Glib::ustring replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options, std::auto_ptr& error); -#endif /* !GLIBMM_EXCEPTIONS_ENABLED */ - - _WRAP_METHOD(Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval, gpointer user_data), g_regex_replace_eval, errthrow) - _WRAP_METHOD(static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references), g_regex_check_replacement, errthrow) - -/* Match info */ -/* -GRegex *g_match_info_get_regex (const GMatchInfo *match_info); -const gchar *g_match_info_get_string (const GMatchInfo *match_info); - -void g_match_info_free (GMatchInfo *match_info); - _WRAP_METHOD(bool g_match_info_next (GMatchInfo *match_info, - GError **error); - _WRAP_METHOD(bool g_match_info_matches (const GMatchInfo *match_info); - _WRAP_METHOD(int g_match_info_get_match_count (const GMatchInfo *match_info); - _WRAP_METHOD(bool g_match_info_is_partial_match (const GMatchInfo *match_info); -Glib::ustring g_match_info_expand_references(const GMatchInfo *match_info, - Glib::ustring& string_to_expand, - GError **error); -Glib::ustring g_match_info_fetch (const GMatchInfo *match_info, - int match_num); - _WRAP_METHOD(bool g_match_info_fetch_pos (const GMatchInfo *match_info, - int match_num, - int *start_pos, - int *end_pos); -Glib::ustring g_match_info_fetch_named (const GMatchInfo *match_info, - Glib::ustring& name); - _WRAP_METHOD(bool g_match_info_fetch_named_pos (const GMatchInfo *match_info, - Glib::ustring& name, - int *start_pos, - int *end_pos); -gchar **g_match_info_fetch_all (const GMatchInfo *match_info); -*/ -}; - -} // namespace Glib diff --git a/libs/glibmm2/glib/src/shell.ccg b/libs/glibmm2/glib/src/shell.ccg deleted file mode 100644 index eae98ef7d8..0000000000 --- a/libs/glibmm2/glib/src/shell.ccg +++ /dev/null @@ -1,61 +0,0 @@ -// -*- c++ -*- -/* $Id: shell.ccg,v 1.1 2003/01/07 16:58:38 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - - -namespace Glib -{ - -/**** shell utility functions **********************************************/ - -Glib::ArrayHandle shell_parse_argv(const std::string& command_line) -{ - char** argv = 0; - int argc = 0; - GError* error = 0; - - g_shell_parse_argv(command_line.c_str(), &argc, &argv, &error); - - if(error) - Glib::Error::throw_exception(error); - - return Glib::ArrayHandle(argv, argc, Glib::OWNERSHIP_DEEP); -} - -std::string shell_quote(const std::string& unquoted_string) -{ - const ScopedPtr buf (g_shell_quote(unquoted_string.c_str())); - return std::string(buf.get()); -} - -std::string shell_unquote(const std::string& quoted_string) -{ - GError* error = 0; - char *const buf = g_shell_unquote(quoted_string.c_str(), &error); - - if(error) - Glib::Error::throw_exception(error); - - return std::string(ScopedPtr(buf).get()); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/shell.hg b/libs/glibmm2/glib/src/shell.hg deleted file mode 100644 index 7c6edf2a2a..0000000000 --- a/libs/glibmm2/glib/src/shell.hg +++ /dev/null @@ -1,96 +0,0 @@ -/* $Id: shell.hg,v 1.2 2003/01/22 21:38:35 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include - -#include -#include - -#include -GLIBMM_USING_STD(string) - - -namespace Glib -{ - -/** @defgroup ShellUtils Shell-related Utilities - * Shell-like command line handling. - * @{ - */ - -/** Exception class for shell utility errors. - */ -_WRAP_GERROR(ShellError, GShellError, G_SHELL_ERROR, NO_GTYPE) - - -/** Parses a command line into an argument vector, in much the same way the - * shell would, but without many of the expansions the shell would perform - * (variable expansion, globs, operators, filename expansion, etc.\ are not - * supported). The results are defined to be the same as those you would - * get from a UNIX98 /bin/sh, as long as the input contains none of the - * unsupported shell expansions. If the input does contain such expansions, - * they are passed through literally. - * @param command_line Command line to parse. - * @return Array of args (The generic ArrayHandle will be implicitly - * converted to any STL compatible container type). - * @throw Glib::ShellError - */ -Glib::ArrayHandle shell_parse_argv(const std::string& command_line); - -/** Quotes a string so that the shell (/bin/sh) will interpret the quoted - * string to mean @a unquoted_string. If you pass a filename to the shell, - * for example, you should first quote it with this function. The quoting - * style used is undefined (single or double quotes may be used). - * @param unquoted_string A literal string. - * @return A quoted string. - */ -std::string shell_quote(const std::string& unquoted_string); - -/** Unquotes a string as the shell (/bin/sh) would. Only handles quotes; if - * a string contains file globs, arithmetic operators, variables, backticks, - * redirections, or other special-to-the-shell features, the result will be - * different from the result a real shell would produce (the variables, - * backticks, etc. will be passed through literally instead of being expanded). - * This function is guaranteed to succeed if applied to the result of - * shell_quote(). If it fails, it throws a Glib::ShellError exception. The - * @a quoted_string need not actually contain quoted or escaped text; - * shell_unquote() simply goes through the string and unquotes/unescapes - * anything that the shell would. Both single and double quotes are handled, - * as are escapes including escaped newlines. - * - * Shell quoting rules are a bit strange. Single quotes preserve the literal - * string exactly. Escape sequences are not allowed; not even \\' -- - * if you want a ' in the quoted text, you have to do something like - * 'foo'\\''bar'. Double quotes allow $, `, - * ", \\, and newline to be escaped with backslash. - * Otherwise double quotes preserve things literally. - * - * @param quoted_string Shell-quoted string. - * @return An unquoted string. - * @throw Glib::ShellError - */ -std::string shell_unquote(const std::string& quoted_string); - -/** @} group ShellUtils */ - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/signalproxy.h.m4 b/libs/glibmm2/glib/src/signalproxy.h.m4 deleted file mode 100644 index bf3d55baf9..0000000000 --- a/libs/glibmm2/glib/src/signalproxy.h.m4 +++ /dev/null @@ -1,200 +0,0 @@ -// -*- c++ -*- -dnl -dnl Glib SignalProxy Templates -dnl -dnl Copyright 2001 Free Software Foundation -dnl Copyright 1999 Karl Nelson -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Library General Public -dnl License as published by the Free Software Foundation; either -dnl version 2 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Library General Public License for more details. -dnl -dnl You should have received a copy of the GNU Library General Public -dnl License along with this library; if not, write to the Free -dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -dnl -dnl Ignore the next line -/* This is a generated file, do not edit. Generated from __file__ */ -include(template.macros.m4) -#ifndef __header__ -#define __header__ - -extern "C" -{ - typedef void (*GCallback) (void); - typedef struct _GObject GObject; -} - -#include -#include - - -namespace Glib -{ - -// Forward declarations -class ObjectBase; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -struct SignalProxyInfo -{ - const char* signal_name; - GCallback callback; - GCallback notify_callback; -}; - -#endif //DOXYGEN_SHOULD_SKIP_THIS - -// This base class is used by SignalProxyNormal and SignalProxyProperty. -class SignalProxyBase -{ -public: - SignalProxyBase(Glib::ObjectBase* obj); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static inline sigc::slot_base* data_to_slot(void* data) - { - SignalProxyConnectionNode *const pConnectionNode = static_cast(data); - - // Return 0 if the connection is blocked. - return (!pConnectionNode->slot_.blocked()) ? &pConnectionNode->slot_ : 0; - } -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -protected: - ObjectBase* obj_; - -private: - SignalProxyBase& operator=(const SignalProxyBase&); // not implemented -}; - - -// shared portion of a Signal -/** The SignalProxy provides an API similar to sigc::signal that can be used to - * connect sigc::slots to glib signals. - * - * This holds the name of the glib signal and the object - * which might emit it. Actually, proxies are controlled by - * the template derivatives, which serve as gatekeepers for the - * types allowed on a particular signal. - * - */ -class SignalProxyNormal : public SignalProxyBase -{ -public: - ~SignalProxyNormal(); - - /// stops the current signal emmision (not in libsigc++) - void emission_stop(); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // This callback for SignalProxy0 - // is defined here to avoid code duplication. - static void slot0_void_callback(GObject*, void* data); -#endif - -protected: - - /** Create a proxy for a signal that can be emitted by @a obj. - * @param obj The object that can emit the signal. - * @param info Information about the signal, including its name, and the C callbacks that should be called by glib. - */ - SignalProxyNormal(Glib::ObjectBase* obj, const SignalProxyInfo* info); - - /** Connects a signal to a generic signal handler. This is called by connect() in derived SignalProxy classes. - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::slot_base& connect_(const sigc::slot_base& slot, bool after); - - /** Connects a signal to a signal handler without a return value. - * This is called by connect() in derived SignalProxy classes. - * - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::slot_base& connect_notify_(const sigc::slot_base& slot, bool after); - -private: - const SignalProxyInfo* info_; - - //TODO: We could maybe replace both connect_ and connect_notify_ with this in future, because they don't do anything extra. - /** This is called by connect_ and connect_impl_. - */ - sigc::slot_base& connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after); - - // no copy assignment - SignalProxyNormal& operator=(const SignalProxyNormal&); -}; - - -dnl -dnl GLIB_SIGNAL_PROXY([P1, P2, ...],return type) -dnl -define([GLIB_SIGNAL_PROXY],[dnl -LINE(]__line__[)dnl - -/**** Glib::[SignalProxy]NUM($1) ***************************************************/ - -/** Proxy for signals with NUM($1) arguments. - * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers. - */ -template -class [SignalProxy]NUM($1) : public SignalProxyNormal -{ -public: - typedef sigc::slot SlotType; - typedef sigc::slot VoidSlotType; - - [SignalProxy]NUM($1)(ObjectBase* obj, const SignalProxyInfo* info) - : SignalProxyNormal(obj, info) {} - - /** Connects a signal to a signal handler. - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect(const SlotType& slot, bool after = true) - { return sigc::connection(connect_(slot, after)); } - - /** Connects a signal to a signal handler without a return value. - * By default, the signal handler will be called before the default signal handler, - * in which case any return value would be replaced anyway by that of the later signal handler. - * - * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) ); - * - * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun(). - * @param after Whether this signal handler should be called before or after the default signal handler. - */ - sigc::connection connect_notify(const VoidSlotType& slot, bool after = false) - { return sigc::connection(connect_notify_(slot, after)); } -}; -])dnl - -dnl Template forms of SignalProxy - -GLIB_SIGNAL_PROXY(ARGS(P,0)) -GLIB_SIGNAL_PROXY(ARGS(P,1)) -GLIB_SIGNAL_PROXY(ARGS(P,2)) -GLIB_SIGNAL_PROXY(ARGS(P,3)) -GLIB_SIGNAL_PROXY(ARGS(P,4)) -GLIB_SIGNAL_PROXY(ARGS(P,5)) -GLIB_SIGNAL_PROXY(ARGS(P,6)) - -} // namespace Glib - - -#endif /* __header__ */ - diff --git a/libs/glibmm2/glib/src/spawn.ccg b/libs/glibmm2/glib/src/spawn.ccg deleted file mode 100644 index 62655ec597..0000000000 --- a/libs/glibmm2/glib/src/spawn.ccg +++ /dev/null @@ -1,283 +0,0 @@ -// -*- c++ -*- -/* $Id: spawn.ccg,v 1.8 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include - - -namespace -{ - -extern "C" -{ - -/* Helper callback to invoke the actual sigc++ slot. - * We don't need to worry about (un)referencing, since the - * child process gets its own copy of the parent's memory anyway. - */ -static void child_setup_callback(void* user_data) -{ - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - (*reinterpret_cast*>(user_data))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED -} - -static void copy_output_buf(std::string* dest, const char* buf) -{ - if(dest) - { - if(buf) - *dest = buf; - else - dest->erase(); - } -} - -} //extern "C" - -} //anonymous namespace - - -namespace Glib -{ - -/**** process spawning functions *******************************************/ - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid, - int* standard_input, - int* standard_output, - int* standard_error) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async_with_pipes( - working_directory.c_str(), - const_cast(argv.data()), - const_cast(envp.data()), - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - standard_input, standard_output, standard_error, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid, - int* standard_input, - int* standard_output, - int* standard_error) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async_with_pipes( - working_directory.c_str(), - const_cast(argv.data()), 0, - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - standard_input, standard_output, standard_error, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async( - working_directory.c_str(), - const_cast(argv.data()), - const_cast(envp.data()), - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags, - const sigc::slot& child_setup, - Pid* child_pid) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - GError* error = 0; - - g_spawn_async( - working_directory.c_str(), - const_cast(argv.data()), 0, - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - child_pid, - &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags, - const sigc::slot& child_setup, - std::string* standard_output, - std::string* standard_error, - int* exit_status) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - - Glib::ScopedPtr buf_standard_output; - Glib::ScopedPtr buf_standard_error; - GError* error = 0; - - g_spawn_sync( - working_directory.c_str(), - const_cast(argv.data()), - const_cast(envp.data()), - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - (standard_output) ? buf_standard_output.addr() : 0, - (standard_error) ? buf_standard_error.addr() : 0, - exit_status, - &error); - - if(error) - Glib::Error::throw_exception(error); - - copy_output_buf(standard_output, buf_standard_output.get()); - copy_output_buf(standard_error, buf_standard_error.get()); -} - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags, - const sigc::slot& child_setup, - std::string* standard_output, - std::string* standard_error, - int* exit_status) -{ - const bool setup_slot = !child_setup.empty(); - sigc::slot child_setup_ = child_setup; - - Glib::ScopedPtr buf_standard_output; - Glib::ScopedPtr buf_standard_error; - GError* error = 0; - - g_spawn_sync( - working_directory.c_str(), - const_cast(argv.data()), 0, - static_cast(unsigned(flags)), - (setup_slot) ? &child_setup_callback : 0, - (setup_slot) ? &child_setup_ : 0, - (standard_output) ? buf_standard_output.addr() : 0, - (standard_error) ? buf_standard_error.addr() : 0, - exit_status, - &error); - - if(error) - Glib::Error::throw_exception(error); - - copy_output_buf(standard_output, buf_standard_output.get()); - copy_output_buf(standard_error, buf_standard_error.get()); -} - -void spawn_command_line_async(const std::string& command_line) -{ - GError* error = 0; - g_spawn_command_line_async(command_line.c_str(), &error); - - if(error) - Glib::Error::throw_exception(error); -} - -void spawn_command_line_sync(const std::string& command_line, - std::string* standard_output, - std::string* standard_error, - int* exit_status) -{ - Glib::ScopedPtr buf_standard_output; - Glib::ScopedPtr buf_standard_error; - GError* error = 0; - - g_spawn_command_line_sync( - command_line.c_str(), - (standard_output) ? buf_standard_output.addr() : 0, - (standard_error) ? buf_standard_error.addr() : 0, - exit_status, - &error); - - if(error) - Glib::Error::throw_exception(error); - - copy_output_buf(standard_output, buf_standard_output.get()); - copy_output_buf(standard_error, buf_standard_error.get()); -} - -void spawn_close_pid(Pid pid) -{ - g_spawn_close_pid(pid); -} - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/spawn.hg b/libs/glibmm2/glib/src/spawn.hg deleted file mode 100644 index 89b08d0fe0..0000000000 --- a/libs/glibmm2/glib/src/spawn.hg +++ /dev/null @@ -1,109 +0,0 @@ -/* $Id: spawn.hg,v 1.4 2004/03/02 23:29:57 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include -#include -#include - -#include -GLIBMM_USING_STD(string) - - -namespace Glib -{ - -typedef GPid Pid; - -_WRAP_ENUM(SpawnFlags, GSpawnFlags, NO_GTYPE) - -/** @defgroup Spawn Spawning Processes - * Process launching with fork()/exec(). - * @{ - */ - -/** Exception class for errors occuring when spawning processes. - */ -_WRAP_GERROR(SpawnError, GSpawnError, G_SPAWN_ERROR, NO_GTYPE, s#^2BIG$#TOOBIG#) - - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0, - int* standard_input = 0, - int* standard_output = 0, - int* standard_error = 0); - -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0, - int* standard_input = 0, - int* standard_output = 0, - int* standard_error = 0); - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0); - -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - Pid* child_pid = 0); - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - const Glib::ArrayHandle& envp, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - std::string* standard_output = 0, - std::string* standard_error = 0, - int* exit_status = 0); - -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle& argv, - SpawnFlags flags = SpawnFlags(0), - const sigc::slot& child_setup = sigc::slot(), - std::string* standard_output = 0, - std::string* standard_error = 0, - int* exit_status = 0); - -void spawn_command_line_async(const std::string& command_line); - -void spawn_command_line_sync(const std::string& command_line, - std::string* standard_output = 0, - std::string* standard_error = 0, - int* exit_status = 0); - -void spawn_close_pid(Pid pid); - -/** @} group Spawn */ - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/template.macros.m4 b/libs/glibmm2/glib/src/template.macros.m4 deleted file mode 100644 index 38e7927bfc..0000000000 --- a/libs/glibmm2/glib/src/template.macros.m4 +++ /dev/null @@ -1,229 +0,0 @@ -dnl----------------------------------------------------------------------- -dnl -dnl Karls M4 macros for the signal system used by gtk-- -dnl -dnl Copyright (C) 1998-2002 The gtkmm Development Team -dnl -dnl Currently maintained by Tero Pulkkinen. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Library General Public -dnl License as published by the Free Software Foundation; either -dnl version 2 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Library General Public License for more details. -dnl -dnl You should have received a copy of the GNU Library General Public -dnl License along with this library; if not, write to the Free -dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -dnl -dnl----------------------------------------------------------------------- -dnl Recursion prevention. (Don't attempt to understand why this works!) -changequote(, )dnl -changequote([, ])dnl -pushdef([DIVERSION],divnum)dnl -divert(-1)dnl - -ifdef([__template_macros__],[],[ -define(__template_macros__) -dnl----------------------------------------------------------------------- - - -dnl -dnl M4 macros for general sanity -dnl - -dnl M4 Quotas are hard to work with, so use braces like autoconf -dnl (which are matched by vi, emacs) -changequote(, ) -changequote([, ]) - -dnl -dnl M4 comments conflict with compiler directives -changecom(, ) - -dnl BRACE(text) => [text] -dnl When we want something to appear with braces -define([BRACE],[[[$*]]]) - -dnl -dnl PROT(macro) -dnl If a macro generates an output with commas we need to protect it -dnl from being broken down and interpreted -define([PROT],[[$*]]) - -dnl -dnl LOWER(string) -dnl lowercase a string -define([LOWER],[translit([$*],[ABCDEFGHIJKLMNOPQRSTUVWXYZ],[abcdefghijklmnopqrstuvwxyz])]) - -dnl -dnl UPPER(string) -dnl uppercase a string -define([UPPER],[translit([$*],[abcdefghijklmnopqrstuvwxyz],[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) -define([UPPER_SAFE],[translit([$*],[abcdefghijklmnopqrstuvwxyz.-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ__])]) - -dnl -dnl BASENAME(string) -dnl extract the basename of a string -define([BASENAME],[patsubst([$*],[^.*/],[])]) - -dnl -dnl M4NAME(string) -dnl extract the basename of a string -define([M4NAME],[patsubst(BASENAME([$*]),[\.m4$],[])]) - -dnl NUM(arg,arg,...) -dnl M4 defines $# very badly (empty list=1). So we need a better one -define([NUM],[ifelse(len([$*]),0,0,[$#])]) - -dnl -dnl IF(cond,string1,string2) -dnl places string1 if length (without spaces) of cond is zero, -dnl else string2 -define([IF],[ifelse(len(PROT(translit([$1],[ ]))),0,[$3],[$2])]) -dnl define([IF],[ifelse(len(PROT(patsubst([$1],[ ]))),0,[$3],[$2])]) - -dnl -dnl minclude(filename) -dnl This includes only the macros from a file but throws away the output. -dnl Used to take the macros from a file without getting it extra output. -define([minclude],[IF([$1],[dnl -pushdef([CURRENT_DIVERSION],divnum)dnl -divert(-1) -include($1) -divert(CURRENT_DIVERSION)dnl -popdef([CURRENT_DIVERSION])dnl],[[minclude]])]) - -dnl -dnl makes the current filename into a string approprate for use as -dnl C identified define. (Defaults to this library name) -dnl -dnl example: (filename test.hh.m4) -dnl __header__ => SIGCXX_TEST_H -dnl __header__(MYHEAD) => MYHEAD_TEST_H -dnl define([__header__],[ifelse($1,,[SIGCXX],UPPER($1))[_]UPPER(patsubst(translit(BASENAME(__file__),[.-],[__]),[_m4],[]))]) -define([__header__],[ifelse($1,,[_GLIBMM],UPPER($1))[_]UPPER_SAFE(M4NAME(__file__))]) - -dnl -dnl Set of M4 macros for variable argument template building -dnl - -dnl ARGS(name,number) -dnl Builds a comma seperated protected list of numbered names -dnl Use this as short hand to specify arguement names -dnl -dnl ARGS(arg,3) => ARG1,ARG2,ARG3 -define([_ARGS],[ifelse(eval($2<$3),0,[$1$2],[$1$2,_ARGS($1,eval($2+1),$3)])]) -define([ARGS],[ifelse(eval($2>0),1,[PROT(_ARGS(UPPER([$1]),1,$2))],[PROT])]) - -dnl -dnl LIST(string1,string2,...) -dnl These are intended for making extended argument lists -dnl parameters are in pairs, the first is output if the -dnl 2nd is nonzero length, the process is then repeated -dnl with the next set of arguments. -dnl -dnl Macro expansions that expand to result in commas must call -dnl PROT to prevent permature expansion. ARG* macros do -dnl this automatically. (If unsure, add braces until it stops -dnl interpreting inter macros, remove one set of braces, if -dnl still not right use PROT) -dnl -dnl (LIST is probably the most useful macro in the set.) -define([LIST],[ifelse($#,0,,$#,1,[$1],[$1],,[LIST(shift($@))],[__LIST($@)])]) -define([__LIST],[ifelse($#,0,,$#,1,[$1],[$1[]ifelse([$2],,,[[,]])__LIST(shift($@))])]) - -dnl -dnl ARG_LOOP(macro_name,seperator,argument_list) -dnl Very powerful macro for construction of list of variables -dnl formated in specify ways. To use define a macro taking -dnl one variable which is called the format. The second argument -dnl is a seperator which will appear between each argument. -dnl The rest is then interpreted as arguments to form the list. -dnl -dnl Example: -dnl define([FOO],[foo([$1])]) -dnl ARG_LOOP([FOO],[[, ]],A,B,C) -dnl -dnl Gives: foo(A), foo(B), foo(C) -dnl -define([_ARG_LOOP],[dnl -ifelse(NUM($*),0,,NUM($*),1,[dnl -indir(LOOP_FORMAT,[$1])],[dnl -indir(LOOP_FORMAT,[$1])[]LOOP_SEPERATOR[]_ARG_LOOP(shift($*))])]) - -define([ARG_LOOP],[dnl -pushdef([LOOP_FORMAT],[[$1]])dnl -pushdef([LOOP_SEPERATOR],[$2])dnl -_ARG_LOOP(shift(shift($*)))[]dnl -popdef([LOOP_FORMAT])dnl -popdef([LOOP_SEPERATOR])dnl -]) - - -dnl -dnl Define some useful formats for use with ARG_LOOP. -define([FORMAT_ARG_CLASS],[class [$1]]) -define([FORMAT_ARG_BOTH],[[$1] LOWER([$1])]) -define([FORMAT_ARG_REF],[Type<[$1]>::ref LOWER([$1])]) -define([FORMAT_ARG_TYPE],[[$1]]) -define([FORMAT_ARG_NAME],[LOWER($1)]) -define([FORMAT_ARG_CBNAME],[LOWER($1)_]) -define([FORMAT_ARG_CBDECL],[[$1] LOWER([$1])_;]) -define([FORMAT_ARG_CBINIT],[LOWER([$1])_(LOWER([$1]))]) - - -dnl -dnl The following functions generate various types of parameter lists -dnl For parameter lists -dnl ARG_CLASS([P1,P2]) -> class P1,class P2 -dnl ARG_BOTH([P1,P2]) -> P1 p1,P2 p2 -dnl ARG_TYPE([P1,P2]) -> P1,P2 -dnl ARG_NAME([P1,P2]) -> p1,p2 -dnl For callback lists -dnl ARG_CBNAME([C1,C2]) -> c1_,c2_ -dnl ARG_CBINIT([C1,C2]) -> c1_(c1),c2_(c2) -dnl ARG_CBDECL([C1,C2]) -> C1 c1_; C2 c2_; -dnl -define([ARG_CLASS],[PROT(ARG_LOOP([FORMAT_ARG_CLASS],[[,]],$*))]) -define([ARG_BOTH],[PROT(ARG_LOOP([FORMAT_ARG_BOTH],[[,]],$*))]) -define([ARG_REF],[PROT(ARG_LOOP([FORMAT_ARG_REF],[[,]],$*))]) -define([ARG_TYPE],[PROT([$*])]) -define([ARG_NAME],[PROT(LOWER($*))]) -define([ARG_CBNAME],[PROT(ARG_LOOP([FORMAT_ARG_CBNAME],[[,]],$*))]) -define([ARG_CBDECL],[PROT(ARG_LOOP([FORMAT_ARG_CBDECL],[ ],$*))]) -define([ARG_CBINIT],[PROT(ARG_LOOP([FORMAT_ARG_CBINIT],[[,]],$*))]) - - -dnl -dnl T_DROP(string) -dnl Removes unnecessary <> with empty templates -dnl (occasionally useful) -define([T_DROP],[ifelse([$1],<>,,[$*])]) - -dnl -dnl DROP(string,drop) -dnl Removes unnecessary strings if they match drop -dnl (occasionally useful) -define([DROP],[ifelse([$1],[$2],,[$*])]) - -dnl -dnl LINE(linenum) -dnl places a #line statement if __debug__ set -dnl Use this at top of macro template and following -dnl macros that contain newlines. -dnl -dnl example: -dnl LINE(]__line__[)dnl -define([LINE],[ifdef([__debug__],[#line $1 "]__file__[" -])]) - -dnl----------------------------------------------------------------------- -dnl End of recursion protection. Do not put anything below this line. -]) -divert(DIVERSION)dnl -popdef([DIVERSION])dnl diff --git a/libs/glibmm2/glib/src/thread.ccg b/libs/glibmm2/glib/src/thread.ccg deleted file mode 100644 index 5e3ff52d0d..0000000000 --- a/libs/glibmm2/glib/src/thread.ccg +++ /dev/null @@ -1,371 +0,0 @@ -// -*- c++ -*- -/* $Id: thread.ccg,v 1.9 2006/05/12 08:08:44 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - - -namespace -{ - -extern "C" -{ - -static void* call_thread_entry_slot(void* data) -{ - sigc::slot_base *const slot = reinterpret_cast(data); - - #ifdef GLIBMM_EXCEPTIONS_ENABLED - try - { - #endif //GLIBMM_EXCEPTIONS_ENABLED - // Recreate the specific slot, and drop the reference obtained by create(). - (*static_cast*>(slot))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED - } - catch(Glib::Thread::Exit&) - { - // Just exit from the thread. The Thread::Exit exception - // is our sane C++ replacement of g_thread_exit(). - } - catch(...) - { - Glib::exception_handlers_invoke(); - } - #endif //GLIBMM_EXCEPTIONS_ENABLED - - delete slot; - return 0; -} - -} //extern "C" - -} // anonymous namespace - - -namespace Glib -{ - -// internal -void thread_init_impl() -{ - // Make sure the exception map is initialized before creating any thread. - Glib::Error::register_init(); -} - - -/**** Glib::Thread *********************************************************/ - -// static -Thread* Thread::create(const sigc::slot& slot, bool joinable) -{ - // Make a copy of slot on the heap - sigc::slot_base *const slot_copy = new sigc::slot(slot); - - GError* error = 0; - - GThread *const thread = g_thread_create( - &call_thread_entry_slot, slot_copy, joinable, &error); - - if(error) - { - delete slot_copy; - Glib::Error::throw_exception(error); - } - - return reinterpret_cast(thread); -} - -// static -Thread* Thread::create(const sigc::slot& slot, unsigned long stack_size, - bool joinable, bool bound, ThreadPriority priority) -{ - // Make a copy of slot on the heap - sigc::slot_base *const slot_copy = new sigc::slot(slot); - - GError* error = 0; - - GThread *const thread = g_thread_create_full( - &call_thread_entry_slot, slot_copy, stack_size, joinable, - bound, (GThreadPriority) priority, &error); - - if(error) - { - delete slot_copy; - Glib::Error::throw_exception(error); - } - - return reinterpret_cast(thread); -} - -// static -Thread* Thread::self() -{ - return reinterpret_cast(g_thread_self()); -} - -bool Thread::joinable() const -{ - return gobject_.joinable; -} - -void Thread::join() -{ - g_thread_join(&gobject_); -} - -void Thread::set_priority(ThreadPriority priority) -{ - g_thread_set_priority(&gobject_, (GThreadPriority) priority); -} - -ThreadPriority Thread::get_priority() const -{ - return (ThreadPriority) gobject_.priority; -} - -// static -void Thread::yield() -{ - g_thread_yield(); -} - -Thread* wrap(GThread* gobject) -{ - return reinterpret_cast(gobject); -} - - -/**** Glib::StaticMutex ****************************************************/ - -void StaticMutex::lock() -{ - g_static_mutex_lock(&gobject_); -} - -bool StaticMutex::trylock() -{ - return g_static_mutex_trylock(&gobject_); -} - -void StaticMutex::unlock() -{ - g_static_mutex_unlock(&gobject_); -} - -StaticMutex::operator Mutex&() -{ - // If GStaticMutex is implemented as struct (e.g. on Linux), its first struct - // member (runtime_mutex) is a GMutex pointer. If the gthread implementation - // is native (i.e. the vtable pointer passed to g_thread_init() was 0), then - // the runtime_mutex pointer is unused, and the rest of the GStaticMutex - // struct resembles the mutex data. - // - // On Win32, GStaticMutex is just a typedef to struct _GMutex*. Either way, - // the first sizeof(GMutex*) bytes of GStaticMutex always resemble a GMutex - // pointer. The gthread implementation relies on that, and we'll also do so. - - GMutex*& runtime_mutex = reinterpret_cast(gobject_); - - // Fortunately, it cannot hurt if we set this to the GMutex pointer returned - // by g_static_mutex_get_mutex(). Either we just overwrite it with the same - // value, or it was unused anyway. Doing that allows casting the pointer - // location to a Glib::Mutex reference (its only data member is a GMutex*). - - runtime_mutex = g_static_mutex_get_mutex(&gobject_); - - return reinterpret_cast(runtime_mutex); -} - - -/**** Glib::Mutex **********************************************************/ - -Mutex::Mutex() -: - gobject_ (g_mutex_new()) -{} - -Mutex::~Mutex() -{ - g_mutex_free(gobject_); -} - -void Mutex::lock() -{ - g_mutex_lock(gobject_); -} - -bool Mutex::trylock() -{ - return g_mutex_trylock(gobject_); -} - -void Mutex::unlock() -{ - g_mutex_unlock(gobject_); -} - - -/**** Glib::StaticRecMutex *************************************************/ - -void StaticRecMutex::lock() -{ - g_static_rec_mutex_lock(&gobject_); -} - -bool StaticRecMutex::trylock() -{ - return g_static_rec_mutex_trylock(&gobject_); -} - -void StaticRecMutex::unlock() -{ - g_static_rec_mutex_unlock(&gobject_); -} - -void StaticRecMutex::lock_full(unsigned int depth) -{ - g_static_rec_mutex_lock_full(&gobject_, depth); -} - -unsigned int StaticRecMutex::unlock_full() -{ - return g_static_rec_mutex_unlock_full(&gobject_); -} - -StaticRecMutex::operator RecMutex&() -{ - return static_cast(*this); -} - - -/**** Glib::RecMutex *******************************************************/ - -RecMutex::RecMutex() -{ - g_static_rec_mutex_init(&gobject_); - - // GLib doesn't have GRecMutex, only GStaticRecMutex. Force initialization - // of the mutex now, to mimic the behaviour of a (hypothetical) GRecMutex. - g_static_mutex_get_mutex(&gobject_.mutex); -} - -RecMutex::~RecMutex() -{ - g_static_rec_mutex_free(&gobject_); -} - - -/**** Glib::StaticRWLock ***************************************************/ - -void StaticRWLock::reader_lock() -{ - g_static_rw_lock_reader_lock(&gobject_); -} - -bool StaticRWLock::reader_trylock() -{ - return g_static_rw_lock_reader_trylock(&gobject_); -} - -void StaticRWLock::reader_unlock() -{ - g_static_rw_lock_reader_unlock(&gobject_); -} - -void StaticRWLock::writer_lock() -{ - g_static_rw_lock_writer_lock(&gobject_); -} - -bool StaticRWLock::writer_trylock() -{ - return g_static_rw_lock_writer_trylock(&gobject_); -} - -void StaticRWLock::writer_unlock() -{ - g_static_rw_lock_writer_unlock(&gobject_); -} - -StaticRWLock::operator RWLock&() -{ - return static_cast(*this); -} - - -/**** Glib::RWLock *********************************************************/ - -RWLock::RWLock() -{ - g_static_rw_lock_init(&gobject_); - - // GLib doesn't have GRWLock, only GStaticRWLock. Force initialization - // of the mutex and the condition variables now, to mimic the behaviour - // of a (hypothetical) GRWLock. - - if(g_static_mutex_get_mutex(&gobject_.mutex)) - { - gobject_.read_cond = g_cond_new(); - gobject_.write_cond = g_cond_new(); - } -} - -RWLock::~RWLock() -{ - g_static_rw_lock_free(&gobject_); -} - - -/**** Glib::Cond ***********************************************************/ - -Cond::Cond() -: - gobject_ (g_cond_new()) -{} - -Cond::~Cond() -{ - g_cond_free(gobject_); -} - -void Cond::signal() -{ - g_cond_signal(gobject_); -} - -void Cond::broadcast() -{ - g_cond_broadcast(gobject_); -} - -void Cond::wait(Mutex& mutex) -{ - g_cond_wait(gobject_, mutex.gobj()); -} - -bool Cond::timed_wait(Mutex& mutex, const Glib::TimeVal& abs_time) -{ - return g_cond_timed_wait(gobject_, mutex.gobj(), const_cast(&abs_time)); -} - - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/thread.hg b/libs/glibmm2/glib/src/thread.hg deleted file mode 100644 index 4289bdf8f8..0000000000 --- a/libs/glibmm2/glib/src/thread.hg +++ /dev/null @@ -1,1047 +0,0 @@ -/* $Id: thread.hg,v 1.13 2005/01/21 12:48:05 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#include -#include - -#include -#include -#include - -/* Shadow THREAD_PRIORITY_NORMAL macro (from winbase.h). - */ -#if defined(THREAD_PRIORITY_NORMAL) && !defined(GLIBMM_MACRO_SHADOW_THREAD_PRIORITY_NORMAL) -enum { GLIBMM_MACRO_DEFINITION_THREAD_PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL }; -#undef THREAD_PRIORITY_NORMAL -enum { THREAD_PRIORITY_NORMAL = GLIBMM_MACRO_DEFINITION_THREAD_PRIORITY_NORMAL }; -#define THREAD_PRIORITY_NORMAL THREAD_PRIORITY_NORMAL -#define GLIBMM_MACRO_SHADOW_THREAD_PRIORITY_NORMAL 1 -#endif - - -/** Initializer macro for Glib::StaticMutex. - * @relates Glib::StaticMutex - * @hideinitializer - */ -#define GLIBMM_STATIC_MUTEX_INIT { G_STATIC_MUTEX_INIT } - -/** Initializer macro for Glib::StaticRecMutex. - * @relates Glib::StaticRecMutex - * @hideinitializer - */ -#define GLIBMM_STATIC_REC_MUTEX_INIT { G_STATIC_REC_MUTEX_INIT } - -/** Initializer macro for Glib::StaticRWLock. - * @relates Glib::StaticRWLock - * @hideinitializer - */ -#define GLIBMM_STATIC_RW_LOCK_INIT { G_STATIC_RW_LOCK_INIT } - -/** Initializer macro for Glib::StaticPrivate. - * @relates Glib::StaticPrivate - * @hideinitializer - */ -#define GLIBMM_STATIC_PRIVATE_INIT { G_STATIC_PRIVATE_INIT } - - -namespace Glib -{ - -/** Specifies the priority of a thread. - * @note It is not guaranteed, that threads with different priorities really - * behave accordingly. On some systems (e.g. Linux) only root can - * increase priorities. On other systems (e.g. Solaris) there doesn't seem to - * be different scheduling for different priorities. All in all try to avoid - * being dependent on priorities. - */ -_WRAP_ENUM(ThreadPriority, GThreadPriority, NO_GTYPE) - -/*! @var ThreadPriority THREAD_PRIORITY_LOW - * A priority lower than normal. - */ -/*! @var ThreadPriority THREAD_PRIORITY_NORMAL - * The default priority. - */ -/*! @var ThreadPriority THREAD_PRIORITY_HIGH - * A priority higher than normal. - */ -/*! @var ThreadPriority THREAD_PRIORITY_URGENT - * The highest priority. - */ - - -/** @defgroup Threads Threads - * Thread abstraction; including threads, different mutexes, - * conditions and thread private data. - * @{ - */ - -enum NotLock { NOT_LOCK }; -enum TryLock { TRY_LOCK }; - -/** Initializes the GLib thread system. - * Before you use a thread related function in glibmm, you should initialize - * the thread system. This is done by calling Glib::thread_init(). - * - * @note You should only call thread_init() with a non-0 parameter - * if you really know what you are doing. - * - * @note thread_init() must not be called directly or indirectly as - * a callback from glibmm. Also no mutexes may be currently locked while - * calling thread_init(). - * - * thread_init() might only be called once. On the second call it will - * abort with an error. If you want to make sure that the thread system - * is initialized, you can do that too: - * @code - * if(!Glib::thread_supported()) Glib::thread_init(); - * @endcode - * After that line either the thread system is initialized, or the program - * will abort if no thread system is available in GLib, i.e. either - * @c G_THREADS_ENABLED is not defined or @c G_THREADS_IMPL_NONE is defined. - * - * If no thread system is available and @a vtable is 0 or if not all - * elements of @a vtable are non-0, then thread_init() will abort. - * - * @note To use thread_init() in your program, you have to link with the - * libraries that the command pkg-config --libs gthread-2.0 - * outputs. This is not the case for all the other thread related functions - * of glibmm. Those can be used without having to link with the thread - * libraries. (You @em have to link with gthread-2.0 if you actually - * want to use threads in your application, though.) - * - * @param vtable A function table of type @c GThreadFunctions, that provides - * the entry points to the thread system to be used. - */ -inline void thread_init(GThreadFunctions* vtable = 0); - -/** Returns whether the thread system is initialized. - * @return @c true, if the thread system is initialized. - */ -inline bool thread_supported(); - - -class Mutex; -class RecMutex; -class RWLock; -struct StaticMutex; -struct StaticRecMutex; -struct StaticRWLock; - - -/** Exception class for thread-related errors. - */ -_WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE) - - -/** Represents a running thread. - * An instance of this class can only be obtained with create(), self(), - * or wrap(GThread*). It's not possible to delete a Thread object. If the - * thread is @em not joinable, its resources will be freed automatically - * when it exits. Otherwise, if the thread @em is joinable, you must call - * join() to avoid a memory leak. - * - * @note g_thread_exit() is not wrapped, because that function exits a thread - * without any cleanup. That's especially dangerous in C++ code, since the - * destructors of automatic objects won't be invoked. Instead, you can throw - * a Thread::Exit exception, which will be caught by the internal thread - * entry function. - * - * @note You might have noticed that the thread entry slot doesn't have the - * usual void* return value. If you want to return any data from your thread - * you can pass an additional output argument to the thread's entry slot. - */ -class Thread -{ -public: - class Exit; - - /** Creates a new thread with the priority THREAD_PRIORITY_NORMAL. - * If @a joinable is @c true, you can wait for this thread's termination by - * calling join(). Otherwise the thread will just disappear, when ready. - * - * The new thread executes the function or method @a slot points to. You can - * pass additional arguments using sigc::bind(). If the thread was created - * successfully, it is returned, otherwise a ThreadError exception is thrown. - * - * @param slot A slot to execute in the new thread. - * @param joinable Should this thread be joinable? - * @return The new Thread* on success. - * @throw Glib::ThreadError - */ - static Thread* create(const sigc::slot& slot, bool joinable); - - /** Creates a new thread with the priority @a priority. The stack gets the - * size @a stack_size or the default value for the current platform, if - * @a stack_size is 0. - * - * If @a joinable is @c true, you can wait for this thread's termination by - * calling join(). Otherwise the thread will just disappear, when ready. - * If @a bound is @c true, this thread will be scheduled in the system scope, - * otherwise the implementation is free to do scheduling in the process - * scope. The first variant is more expensive resource-wise, but generally - * faster. On some systems (e.g. Linux) all threads are bound. - * - * The new thread executes the function or method @a slot points to. You can - * pass additional arguments using sigc::bind(). If the thread was created - * successfully, it is returned. - * - * @note It is not guaranteed, that threads with different priorities really - * behave accordingly. On some systems (e.g. Linux) only root can increase - * priorities. On other systems (e.g. Solaris) there doesn't seem to be - * different scheduling for different priorities. All in all try to avoid - * being dependent on priorities. Use Glib::THREAD_PRIORITY_NORMAL - * here as a default. - * - * @note Only use the extended - * create(const sigc::slot&, unsigned long, bool, bool, ThreadPriority) - * function, when you really can't use the simple - * create(const sigc::slot&, bool) - * instead. The latter overload does not take @a stack_size, @a bound and - * @a priority as arguments, as they should only be used for cases, where - * it is inevitable. - * - * @param slot A slot to execute in the new thread. - * @param stack_size A stack size for the new thread, or 0. - * @param joinable Should this thread be joinable? - * @param bound Should this thread be bound to a system thread? - * @param priority A priority for the thread. - * @return The new Thread* on success. - * @throw Glib::ThreadError - */ - static Thread* create(const sigc::slot& slot, unsigned long stack_size, - bool joinable, bool bound, ThreadPriority priority); - - /** Returns the Thread* corresponding to the calling thread. - * @return The current thread. - */ - static Thread* self(); - - /** Returns whether the thread is joinable. - * @return Whether the thread is joinable. - */ - bool joinable() const; - - /** Waits until the thread finishes. - * Waits until the thread finishes, i.e. the slot, as given to create(), - * returns or g_thread_exit() is called by the thread. (Calling - * g_thread_exit() in a C++ program should be avoided.) All resources of - * the thread including the Glib::Thread object are released. The thread - * must have been created with joinable = true. - */ - void join(); - - /** Changes the priority of the thread to @a priority. - * @note It is not guaranteed, that threads with different priorities really - * behave accordingly. On some systems (e.g. Linux) only @c root can - * increase priorities. On other systems (e.g. Solaris) there doesn't seem - * to be different scheduling for different priorities. All in all try to - * avoid being dependent on priorities. - * @param priority A new priority for the thread. - */ - void set_priority(ThreadPriority priority); - - /** Returns the priority of the thread. - * @return The thread's priority. - */ - ThreadPriority get_priority() const; - - /** Gives way to other threads waiting to be scheduled. - * This function is often used as a method to make busy wait less evil. But - * in most cases, you will encounter, there are better methods to do that. - * So in general you shouldn't use this function. - */ - static void yield(); - - GThread* gobj() { return &gobject_; } - const GThread* gobj() const { return &gobject_; } - -private: - GThread gobject_; - - // Glib::Thread can neither be constructed nor deleted. - Thread(); - void operator delete(void*, size_t); - - // noncopyable - Thread(const Thread&); - Thread& operator=(const Thread&); -}; - -/** %Exception class used to exit from a thread. - * @code - * throw Glib::Thread::Exit(); - * @endcode - * Write this if you want to exit from a thread created by Thread::create(). - * Of course you must make sure not to catch Thread::Exit by accident, i.e. - * when using catch(...) somewhere in your code. - */ -class Thread::Exit -{}; - -/** @relates Glib::Thread */ -Thread* wrap(GThread* gobject); - - -/** Like Glib::Mutex, but can be defined at compile time. - * Use @c GLIBMM_STATIC_MUTEX_INIT to initialize a StaticMutex: - * @code - * Glib::StaticMutex mutex = GLIBMM_STATIC_MUTEX_INIT; - * @endcode - * A StaticMutex can be used without calling Glib::thread_init(), it will - * silently do nothing then. That will also work when using the implicit - * conversion to Mutex&, thus you can safely use Mutex::Lock with a - * StaticMutex. - */ -struct StaticMutex -{ - void lock(); - bool trylock(); - void unlock(); - - operator Mutex&(); - - GStaticMutex* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticMutex gobject_; -#endif -}; - -/** Represents a mutex (mutual exclusion). - * It can be used to protect data against shared access. Try to use - * Mutex::Lock instead of calling lock() and unlock() directly -- - * it will make your life much easier. - * - * @note Before creating a Glib::Mutex, Glib::thread_init() has to be called. - * - * @note Glib::Mutex is not recursive, i.e. a thread will deadlock, if it - * already has locked the mutex while calling lock(). Use Glib::RecMutex - * instead, if you need recursive mutexes. - */ -class Mutex -{ -public: - class Lock; - - Mutex(); - ~Mutex(); - - /** Locks the mutex. - * If mutex is already locked by another thread, the current thread will - * block until mutex is unlocked by the other thread. - * @see Mutex::Lock - */ - void lock(); - - /** Tries to lock the mutex. - * If the mutex is already locked by another thread, it immediately returns - * @c false. Otherwise it locks the mutex and returns @c true. - * @return Whether the mutex could be locked. - * @see Mutex::Lock - */ - bool trylock(); - - /** Unlocks the mutex. - * If another thread is blocked in a lock() call for this mutex, it will be - * woken and can lock the mutex itself. - * @see Mutex::Lock - */ - void unlock(); - - GMutex* gobj() { return gobject_; } - -private: - GMutex* gobject_; - - // noncopyable - Mutex(const Mutex&); - Mutex& operator=(const Mutex&); -}; - -/** Utility class for exception-safe mutex locking. - * @par Usage example: - * @code - * { - * Glib::Mutex::Lock lock (mutex); // calls mutex.lock() - * do_something(); - * } // the destructor calls mutex.unlock() - * @endcode - * As you can see, the compiler takes care of the unlocking. This is not - * only exception safe but also much less error-prone. You could even - * return while still holding the lock and it will be released - * properly. - */ -class Mutex::Lock -{ -public: - explicit inline Lock(Mutex& mutex); - inline Lock(Mutex& mutex, NotLock); - inline Lock(Mutex& mutex, TryLock); - inline ~Lock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - Mutex& mutex_; - bool locked_; - - // noncopyable - Lock(const Mutex::Lock&); - Mutex::Lock& operator=(const Mutex::Lock&); -}; - - -/** Like Glib::RecMutex, but can be defined at compile time. - * Use @c GLIBMM_STATIC_REC_MUTEX_INIT to initialize a StaticRecMutex: - * @code - * Glib::StaticRecMutex mutex = GLIBMM_STATIC_REC_MUTEX_INIT; - * @endcode - * A StaticRecMutex can be used without calling Glib::thread_init(), it will - * silently do nothing then. That will also work when using the implicit - * conversion to RecMutex&, thus you can safely use RecMutex::Lock with a - * StaticRecMutex. - */ -struct StaticRecMutex -{ - void lock(); - bool trylock(); - void unlock(); - - void lock_full(unsigned int depth); - unsigned int unlock_full(); - - operator RecMutex&(); - - GStaticRecMutex* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticRecMutex gobject_; -#endif -}; - -class RecMutex : public StaticRecMutex -{ -public: - class Lock; - - RecMutex(); - ~RecMutex(); - -private: - // noncopyable - RecMutex(const RecMutex&); - RecMutex& operator=(const RecMutex&); -}; - -/** Utility class for exception-safe locking of recursive mutexes. - */ -class RecMutex::Lock -{ -public: - explicit inline Lock(RecMutex& mutex); - inline Lock(RecMutex& mutex, NotLock); - inline Lock(RecMutex& mutex, TryLock); - inline ~Lock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - RecMutex& mutex_; - bool locked_; - - // noncopyable - Lock(const RecMutex::Lock&); - RecMutex::Lock& operator=(const RecMutex::Lock&); -}; - - -/** Like Glib::RWLock, but can be defined at compile time. - * Use @c GLIBMM_STATIC_RW_LOCK_INIT to initialize a StaticRWLock: - * @code - * Glib::StaticRWLock rw_lock = GLIBMM_STATIC_RW_LOCK_INIT; - * @endcode - * A StaticRWLock can be used without calling Glib::thread_init(), it will - * silently do nothing then. That will also work when using the implicit - * conversion to RWLock&, thus you can safely use RWLock::ReaderLock and - * RWLock::WriterLock with a StaticRWLock. - */ -struct StaticRWLock -{ - void reader_lock(); - bool reader_trylock(); - void reader_unlock(); - - void writer_lock(); - bool writer_trylock(); - void writer_unlock(); - - operator RWLock&(); - - GStaticRWLock* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticRWLock gobject_; -#endif -}; - -class RWLock : public StaticRWLock -{ -public: - class ReaderLock; - class WriterLock; - - RWLock(); - ~RWLock(); - -private: - // noncopyable - RWLock(const RWLock&); - RWLock& operator=(const RWLock&); -}; - -/** Utility class for exception-safe locking of read/write locks. - */ -class RWLock::ReaderLock -{ -public: - explicit inline ReaderLock(RWLock& rwlock); - inline ReaderLock(RWLock& rwlock, NotLock); - inline ReaderLock(RWLock& rwlock, TryLock); - inline ~ReaderLock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - RWLock& rwlock_; - bool locked_; - - // noncopyable - ReaderLock(const RWLock::ReaderLock&); - RWLock::ReaderLock& operator=(const RWLock::ReaderLock&); -}; - -/** Utility class for exception-safe locking of read/write locks. - */ -class RWLock::WriterLock -{ -public: - explicit inline WriterLock(RWLock& rwlock); - inline WriterLock(RWLock& rwlock, NotLock); - inline WriterLock(RWLock& rwlock, TryLock); - inline ~WriterLock(); - - inline void acquire(); - inline bool try_acquire(); - inline void release(); - inline bool locked() const; - -private: - RWLock& rwlock_; - bool locked_; - - // noncopyable - WriterLock(const RWLock::WriterLock&); - RWLock::WriterLock& operator=(const RWLock::WriterLock&); -}; - -/** An opaque data structure to represent a condition. - * A @a Cond is an object that threads can block on, if they find a certain - * condition to be false. If other threads change the state of this condition - * they can signal the @a Cond, such that the waiting thread is woken up. - * @par Usage example: - * @code - * Glib::Cond data_cond; - * Glib::Mutex data_mutex; - * void* current_data = NULL; - * - * void push_data (void* data) - * { - * data_mutex.lock(); - * current_data = data; - * data_cond.signal(); - * data_mutex.unlock(); - * } - * - * void* pop_data () - * { - * void* data; - * - * data_mutex.lock(); - * while (!current_data) - * data_cond.wait(data_mutex); - * data = current_data; - * current_data = NULL; - * data_mutex.unlock(); - * return data; - * } - * @endcode -*/ -class Cond -{ -public: - Cond(); - ~Cond(); - - /** If threads are waiting for this @a Cond, exactly one of them is woken up. - * It is good practice to hold the same lock as the waiting thread, while calling - * this method, though not required. - * - * @note This method can also be used if @a Glib::thread_init() has not yet been - * called and will do nothing then. - */ - void signal(); - - /** If threads are waiting for this @a Cond, all of them are woken up. - * It is good practice to hold the same lock as the waiting thread, while calling - * this method, though not required. - * - * @note This method can also be used if @a Glib::thread_init() has not yet been - * called and will do nothing then. - */ - void broadcast(); - - /** Waits until this thread is woken up on this @a Cond. - * The mutex is unlocked before falling asleep and locked again before resuming. - * - * This method can also be used if @a Glib::thread_init() has not yet been - * called and will immediately return then. - * - * @param mutex a @a Mutex that is currently locked. - * - * @note It is important to use the @a wait() and @a timed_wait() methods - * only inside a loop, which checks for the condition to be true as it is not - * guaranteed that the waiting thread will find it fulfilled, even if the signaling - * thread left the condition in that state. This is because another thread can have - * altered the condition, before the waiting thread got the chance to be woken up, - * even if the condition itself is protected by a @a Mutex. - */ - void wait(Mutex& mutex); - - /** Waits until this thread is woken up on this @a Cond, but not longer than until the time, that is specified by @a abs_time. - * The mutex is unlocked before falling asleep and locked again before resuming. - * - * This function can also be used, if @a Glib::thread_init() has not yet been - * called and will immediately return @c true then. - * - * @param mutex a @a Mutex that is currently locked. - * @param abs_time a max time to wait. - * - * @note It is important to use the @a wait() and @a timed_wait() methods - * only inside a loop, which checks for the condition to be true as it is not - * guaranteed that the waiting thread will find it fulfilled, even if the signaling - * thread left the condition in that state. This is because another thread can have - * altered the condition, before the waiting thread got the chance to be woken up, - * even if the condition itself is protected by a @a Mutex. - */ - bool timed_wait(Mutex& mutex, const Glib::TimeVal& abs_time); - - GCond* gobj() { return gobject_; } - -private: - GCond* gobject_; - - // noncopyable - Cond(const Cond&); - Cond& operator=(const Cond&); -}; - - -template -struct StaticPrivate -{ - typedef void (*DestroyNotifyFunc) (void*); - - static void delete_ptr(void* data); - - inline T* get(); - inline void set(T* data, DestroyNotifyFunc notify_func = &StaticPrivate::delete_ptr); - - GStaticPrivate* gobj() { return &gobject_; } - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - // Must be public to allow initialization at compile time. - GStaticPrivate gobject_; -#endif -}; - -template -class Private -{ -public: - typedef void (*DestructorFunc) (void*); - - static void delete_ptr(void* data); - - explicit inline Private(DestructorFunc destructor_func = &Private::delete_ptr); - inline T* get(); - inline void set(T* data); - - GPrivate* gobj() { return gobject_; } - -private: - GPrivate* gobject_; - - // noncopyable - Private(const Private&); - Private& operator=(const Private&); -}; - -/** @} group Threads */ - -/*! A glibmm thread example. - * @example thread/thread.cc - */ - - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -/***************************************************************************/ -/* inline implementation */ -/***************************************************************************/ - -// internal -void thread_init_impl(); - -/* This function must be inline, to avoid an unnecessary dependency on - * libgthread even if the thread system is not used. libgthread might - * not even be available if GLib was compiled without thread support. - */ -inline -void thread_init(GThreadFunctions* vtable) -{ - g_thread_init(vtable); - Glib::thread_init_impl(); -} - -inline -bool thread_supported() -{ - //MSVC++ needs the != 0 to avoid an int -> bool cast warning. - return (g_thread_supported() != 0); -} - - -/**** Glib::Mutex::Lock ****************************************************/ - -inline -Mutex::Lock::Lock(Mutex& mutex) -: - mutex_ (mutex), - locked_ (true) -{ - mutex_.lock(); -} - -inline -Mutex::Lock::Lock(Mutex& mutex, NotLock) -: - mutex_ (mutex), - locked_ (false) -{} - -inline -Mutex::Lock::Lock(Mutex& mutex, TryLock) -: - mutex_ (mutex), - locked_ (mutex.trylock()) -{} - -inline -Mutex::Lock::~Lock() -{ - if(locked_) - mutex_.unlock(); -} - -inline -void Mutex::Lock::acquire() -{ - mutex_.lock(); - locked_ = true; -} - -inline -bool Mutex::Lock::try_acquire() -{ - locked_ = mutex_.trylock(); - return locked_; -} - -inline -void Mutex::Lock::release() -{ - mutex_.unlock(); - locked_ = false; -} - -inline -bool Mutex::Lock::locked() const -{ - return locked_; -} - - -/**** Glib::RecMutex::Lock *************************************************/ - -inline -RecMutex::Lock::Lock(RecMutex& mutex) -: - mutex_ (mutex), - locked_ (true) -{ - mutex_.lock(); -} - -inline -RecMutex::Lock::Lock(RecMutex& mutex, NotLock) -: - mutex_ (mutex), - locked_ (false) -{} - -inline -RecMutex::Lock::Lock(RecMutex& mutex, TryLock) -: - mutex_ (mutex), - locked_ (mutex.trylock()) -{} - -inline -RecMutex::Lock::~Lock() -{ - if(locked_) - mutex_.unlock(); -} - -inline -void RecMutex::Lock::acquire() -{ - mutex_.lock(); - locked_ = true; -} - -inline -bool RecMutex::Lock::try_acquire() -{ - locked_ = mutex_.trylock(); - return locked_; -} - -inline -void RecMutex::Lock::release() -{ - mutex_.unlock(); - locked_ = false; -} - -inline -bool RecMutex::Lock::locked() const -{ - return locked_; -} - - -/**** Glib::RWLock::ReaderLock *********************************************/ - -inline -RWLock::ReaderLock::ReaderLock(RWLock& rwlock) -: - rwlock_ (rwlock), - locked_ (true) -{ - rwlock_.reader_lock(); -} - -inline -RWLock::ReaderLock::ReaderLock(RWLock& rwlock, NotLock) -: - rwlock_ (rwlock), - locked_ (false) -{} - -inline -RWLock::ReaderLock::ReaderLock(RWLock& rwlock, TryLock) -: - rwlock_ (rwlock), - locked_ (rwlock.reader_trylock()) -{} - -inline -RWLock::ReaderLock::~ReaderLock() -{ - if(locked_) - rwlock_.reader_unlock(); -} - -inline -void RWLock::ReaderLock::acquire() -{ - rwlock_.reader_lock(); - locked_ = true; -} - -inline -bool RWLock::ReaderLock::try_acquire() -{ - locked_ = rwlock_.reader_trylock(); - return locked_; -} - -inline -void RWLock::ReaderLock::release() -{ - rwlock_.reader_unlock(); - locked_ = false; -} - -inline -bool RWLock::ReaderLock::locked() const -{ - return locked_; -} - - -/**** Glib::RWLock::WriterLock *********************************************/ - -inline -RWLock::WriterLock::WriterLock(RWLock& rwlock) -: - rwlock_ (rwlock), - locked_ (true) -{ - rwlock_.writer_lock(); -} - -inline -RWLock::WriterLock::WriterLock(RWLock& rwlock, NotLock) -: - rwlock_ (rwlock), - locked_ (false) -{} - -inline -RWLock::WriterLock::WriterLock(RWLock& rwlock, TryLock) -: - rwlock_ (rwlock), - locked_ (rwlock.writer_trylock()) -{} - -inline -RWLock::WriterLock::~WriterLock() -{ - if(locked_) - rwlock_.writer_unlock(); -} - -inline -void RWLock::WriterLock::acquire() -{ - rwlock_.writer_lock(); - locked_ = true; -} - -inline -bool RWLock::WriterLock::try_acquire() -{ - locked_ = rwlock_.writer_trylock(); - return locked_; -} - -inline -void RWLock::WriterLock::release() -{ - rwlock_.writer_unlock(); - locked_ = false; -} - -inline -bool RWLock::WriterLock::locked() const -{ - return locked_; -} - - -/**** Glib::StaticPrivate **************************************************/ - -// static -template -void StaticPrivate::delete_ptr(void* data) -{ - delete static_cast(data); -} - -template inline -T* StaticPrivate::get() -{ - return static_cast(g_static_private_get(&gobject_)); -} - -template inline -void StaticPrivate::set(T* data, typename StaticPrivate::DestroyNotifyFunc notify_func) -{ - g_static_private_set(&gobject_, data, notify_func); -} - - -/**** Glib::Private ********************************************************/ - -// static -template -void Private::delete_ptr(void* data) -{ - delete static_cast(data); -} - -template inline -Private::Private(typename Private::DestructorFunc destructor_func) -: - gobject_ (g_private_new(destructor_func)) -{} - -template inline -T* Private::get() -{ - return static_cast(g_private_get(gobject_)); -} - -template inline -void Private::set(T* data) -{ - g_private_set(gobject_, data); -} - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/unicode.ccg b/libs/glibmm2/glib/src/unicode.ccg deleted file mode 100644 index 7d994ef05b..0000000000 --- a/libs/glibmm2/glib/src/unicode.ccg +++ /dev/null @@ -1,22 +0,0 @@ -// -*- c++ -*- -/* $Id: unicode.ccg,v 1.1 2003/01/07 16:58:42 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - diff --git a/libs/glibmm2/glib/src/unicode.hg b/libs/glibmm2/glib/src/unicode.hg deleted file mode 100644 index 27424331c3..0000000000 --- a/libs/glibmm2/glib/src/unicode.hg +++ /dev/null @@ -1,147 +0,0 @@ -/* $Id: unicode.hg,v 1.2 2003/08/20 10:31:23 murrayc Exp $ */ - -/* Copyright (C) 2002 The gtkmm Development Team - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -_DEFS(glibmm,glib) - -#m4begin -_PUSH() - -// m4 helper macros to generate the character-class inline functions. - -m4_define(`_UNICHAR_FUNC',`dnl -inline $1 $2(gunichar uc) - { return g_unichar_$2(uc); } -`'dnl`'') - -//MSVC++ needs the != 0 to avoid an int -> bool cast warning. -m4_define(`_UNICHAR_FUNC_BOOL',`dnl -inline $1 $2(gunichar uc) - { return (g_unichar_$2(uc) != 0); } -`'dnl`'') - -m4_define(`_ASCII_FUNC',`dnl -inline $1 $2(char c) - { return g_ascii_$2(c); } -`'dnl`'') - -_POP() -#m4end - -#include -#include -#include - -// Not used, but we want to get rid of possible macros. -#include - -#undef isalnum -#undef isalpha -#undef iscntrl -#undef isdigit -#undef isgraph -#undef islower -#undef isprint -#undef ispunct -#undef isspace -#undef isupper -#undef isxdigit -#undef istitle -#undef isdefined -#undef iswide -#undef toupper -#undef tolower -#undef totitle - - -namespace Glib -{ - -_WRAP_ENUM(UnicodeType, GUnicodeType, NO_GTYPE) -_WRAP_ENUM(UnicodeBreakType, GUnicodeBreakType, NO_GTYPE) -_WRAP_ENUM(AsciiType, GAsciiType, NO_GTYPE) -_WRAP_ENUM(NormalizeMode, GNormalizeMode, NO_GTYPE) - -/** @defgroup Unicode Unicode Manipulation - * Functions operating on Unicode characters and UTF-8 strings. - * @{ - */ - -namespace Unicode -{ - -_UNICHAR_FUNC_BOOL(bool, validate) -_UNICHAR_FUNC_BOOL(bool, isalnum) -_UNICHAR_FUNC_BOOL(bool, isalpha) -_UNICHAR_FUNC_BOOL(bool, iscntrl) -_UNICHAR_FUNC_BOOL(bool, isdigit) -_UNICHAR_FUNC_BOOL(bool, isgraph) -_UNICHAR_FUNC_BOOL(bool, islower) -_UNICHAR_FUNC_BOOL(bool, isprint) -_UNICHAR_FUNC_BOOL(bool, ispunct) -_UNICHAR_FUNC_BOOL(bool, isspace) -_UNICHAR_FUNC_BOOL(bool, isupper) -_UNICHAR_FUNC_BOOL(bool, isxdigit) -_UNICHAR_FUNC_BOOL(bool, istitle) -_UNICHAR_FUNC_BOOL(bool, isdefined) -_UNICHAR_FUNC_BOOL(bool, iswide) - -_UNICHAR_FUNC(gunichar, toupper) -_UNICHAR_FUNC(gunichar, tolower) -_UNICHAR_FUNC(gunichar, totitle) - -_UNICHAR_FUNC(int, digit_value) -_UNICHAR_FUNC(int, xdigit_value) - -inline Glib::UnicodeType type(gunichar uc) - { return static_cast(static_cast(g_unichar_type(uc))); } - -inline Glib::UnicodeBreakType break_type(gunichar uc) - { return static_cast(static_cast(g_unichar_break_type(uc))); } - -} // namespace Unicode - - -namespace Ascii -{ - -_ASCII_FUNC(bool, isalnum) -_ASCII_FUNC(bool, isalpha) -_ASCII_FUNC(bool, iscntrl) -_ASCII_FUNC(bool, isdigit) -_ASCII_FUNC(bool, isgraph) -_ASCII_FUNC(bool, islower) -_ASCII_FUNC(bool, isprint) -_ASCII_FUNC(bool, ispunct) -_ASCII_FUNC(bool, isspace) -_ASCII_FUNC(bool, isupper) -_ASCII_FUNC(bool, isxdigit) - -_ASCII_FUNC(char, tolower) -_ASCII_FUNC(char, toupper) - -_ASCII_FUNC(int, digit_value) -_ASCII_FUNC(int, xdigit_value) - -} // namespace Ascii - - -/** @} group Unicode */ - -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/value_basictypes.cc.m4 b/libs/glibmm2/glib/src/value_basictypes.cc.m4 deleted file mode 100644 index f87461aaf1..0000000000 --- a/libs/glibmm2/glib/src/value_basictypes.cc.m4 +++ /dev/null @@ -1,84 +0,0 @@ -divert(-1) - -dnl $Id: value_basictypes.cc.m4 348 2006-11-22 11:14:43Z murrayc $ - -dnl Glib::Value specializations for fundamental types -dnl -dnl Copyright 2002 The gtkmm Development Team -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Library General Public -dnl License as published by the Free Software Foundation; either -dnl version 2 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Library General Public License for more details. -dnl -dnl You should have received a copy of the GNU Library General Public -dnl License along with this library; if not, write to the Free -dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -include(template.macros.m4) - -dnl -dnl GLIB_VALUE_BASIC(bool, boolean) -dnl -define([GLIB_VALUE_BASIC],[dnl -LINE(]__line__[)dnl - -dnl Please ignore the format stuff. I was just tired and played a little. -/**** Glib::Value<$1> translit(format([%]eval(57-len([$1]))[s],[****/]),[ ],[*]) - -// static -GType Value<$1>::value_type() -{ - return G_TYPE_[]UPPER($2); -} - -void Value<$1>::set($1 data) -{ - g_value_set_$2(&gobject_, data); -} - -$1 Value<$1>::get() const -{ - return g_value_get_$2(&gobject_); -} - -GParamSpec* Value<$1>::create_param_spec(const Glib::ustring& name) const -{ - return g_param_spec_$2( - name.c_str(), 0, 0,ifelse($2,pointer,,[ - ifelse($3,,,[$3, $4, ])[]g_value_get_$2(&gobject_),]) - GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE)); -} -]) - -divert[]dnl -// -*- c++ -*- -// This is a generated file, do not edit. Generated from __file__ - -#include - -namespace Glib -{ - -G_GNUC_EXTENSION typedef long long long_long; -G_GNUC_EXTENSION typedef unsigned long long unsigned_long_long; - -GLIB_VALUE_BASIC(bool, boolean) -GLIB_VALUE_BASIC(char, char, -128, 127) -GLIB_VALUE_BASIC(unsigned char, uchar, 0, 255) -GLIB_VALUE_BASIC(int, int, G_MININT, G_MAXINT) -GLIB_VALUE_BASIC(unsigned int, uint, 0, G_MAXUINT) -GLIB_VALUE_BASIC(long, long, G_MINLONG, G_MAXLONG) -GLIB_VALUE_BASIC(unsigned long, ulong, 0, G_MAXULONG) -GLIB_VALUE_BASIC(long_long, int64, G_GINT64_CONSTANT[](0x8000000000000000), G_GINT64_CONSTANT[](0x7fffffffffffffff)) -GLIB_VALUE_BASIC(unsigned_long_long, uint64, G_GINT64_CONSTANT[](0U), G_GINT64_CONSTANT[](0xffffffffffffffffU)) -GLIB_VALUE_BASIC(float, float, -G_MAXFLOAT, G_MAXFLOAT) -GLIB_VALUE_BASIC(double, double, -G_MAXDOUBLE, G_MAXDOUBLE) -GLIB_VALUE_BASIC(void*, pointer) -} // namespace Glib - diff --git a/libs/glibmm2/glib/src/value_basictypes.h.m4 b/libs/glibmm2/glib/src/value_basictypes.h.m4 deleted file mode 100644 index 08c4a90998..0000000000 --- a/libs/glibmm2/glib/src/value_basictypes.h.m4 +++ /dev/null @@ -1,83 +0,0 @@ -divert(-1) - -dnl $Id: value_basictypes.h.m4 2 2003-01-07 16:59:16Z murrayc $ - -dnl Glib::Value specializations for fundamental types -dnl -dnl Copyright 2002 The gtkmm Development Team -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Library General Public -dnl License as published by the Free Software Foundation; either -dnl version 2 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Library General Public License for more details. -dnl -dnl You should have received a copy of the GNU Library General Public -dnl License along with this library; if not, write to the Free -dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -include(template.macros.m4) - -dnl -dnl GLIB_VALUE_BASIC(bool, boolean) -dnl -define([GLIB_VALUE_BASIC],[dnl -LINE(]__line__[)dnl - -/** - * @ingroup glibmmValue - */ -template <> -class Value<$1> : public ValueBase -{ -public: - typedef $1 CppType; - typedef g$2 CType; - - static GType value_type() G_GNUC_CONST; - - void set($1 data); - $1 get() const; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - GParamSpec* create_param_spec(const Glib::ustring& name) const; -#endif -}; -]) - -divert[]dnl -// -*- c++ -*- -// This is a generated file, do not edit. Generated from __file__ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -#ifndef _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H -#error "glibmm/value_basictypes.h cannot be included directly" -#endif -#endif - -/* Suppress warnings about `long long' when GCC is in -pedantic mode. - */ -#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) -#pragma GCC system_header -#endif - -namespace Glib -{ -GLIB_VALUE_BASIC(bool, boolean) -GLIB_VALUE_BASIC(char, char) -GLIB_VALUE_BASIC(unsigned char, uchar) -GLIB_VALUE_BASIC(int, int) -GLIB_VALUE_BASIC(unsigned int, uint) -GLIB_VALUE_BASIC(long, long) -GLIB_VALUE_BASIC(unsigned long, ulong) -GLIB_VALUE_BASIC(long long, int64) -GLIB_VALUE_BASIC(unsigned long long, uint64) -GLIB_VALUE_BASIC(float, float) -GLIB_VALUE_BASIC(double, double) -GLIB_VALUE_BASIC(void*, pointer) -} // namespace Glib - diff --git a/libs/glibmm2/scripts/Makefile.am b/libs/glibmm2/scripts/Makefile.am deleted file mode 100644 index 6a38790971..0000000000 --- a/libs/glibmm2/scripts/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# Install m4 macros needed by other *mm packages: -m4dir = $(datadir)/aclocal -m4_DATA = glibmm_check_perl.m4 - -EXTRA_DIST = README config.sub missing config.guess install-sh \ - ltmain.sh cxx.m4 cxx_std.m4 c_std.m4 docgen.m4 macros.m4 reduced.m4 \ - $(m4_DATA) - diff --git a/libs/glibmm2/scripts/Makefile.in b/libs/glibmm2/scripts/Makefile.in deleted file mode 100644 index 29f82d0e6a..0000000000 --- a/libs/glibmm2/scripts/Makefile.in +++ /dev/null @@ -1,387 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = scripts -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \ - $(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \ - $(top_srcdir)/scripts/docgen.m4 \ - $(top_srcdir)/scripts/glibmm_check_perl.m4 \ - $(top_srcdir)/scripts/macros.m4 \ - $(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/glib/glibmmconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(m4dir)" -m4DATA_INSTALL = $(INSTALL_DATA) -DATA = $(m4_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@ -GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -M4 = @M4@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL_PATH = @PERL_PATH@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Install m4 macros needed by other *mm packages: -m4dir = $(datadir)/aclocal -m4_DATA = glibmm_check_perl.m4 -EXTRA_DIST = README config.sub missing config.guess install-sh \ - ltmain.sh cxx.m4 cxx_std.m4 c_std.m4 docgen.m4 macros.m4 reduced.m4 \ - $(m4_DATA) - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-m4DATA: $(m4_DATA) - @$(NORMAL_INSTALL) - test -z "$(m4dir)" || $(MKDIR_P) "$(DESTDIR)$(m4dir)" - @list='$(m4_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(m4DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4dir)/$$f'"; \ - $(m4DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4dir)/$$f"; \ - done - -uninstall-m4DATA: - @$(NORMAL_UNINSTALL) - @list='$(m4_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(m4dir)/$$f'"; \ - rm -f "$(DESTDIR)$(m4dir)/$$f"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(m4dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-m4DATA - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-m4DATA - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-m4DATA install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-m4DATA - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/scripts/README b/libs/glibmm2/scripts/README deleted file mode 100644 index 8b13789179..0000000000 --- a/libs/glibmm2/scripts/README +++ /dev/null @@ -1 +0,0 @@ - diff --git a/libs/glibmm2/scripts/c_std.m4 b/libs/glibmm2/scripts/c_std.m4 deleted file mode 100644 index f4a8b56f8e..0000000000 --- a/libs/glibmm2/scripts/c_std.m4 +++ /dev/null @@ -1,43 +0,0 @@ -cv_c_std_time_t_is_not_int32 -## GLIBMM_CXX_HAS_NAMESPACE_STD() -## -## Test whether libstdc++ declares namespace std. For safety, -## also check whether several randomly selected STL symbols -## are available in namespace std. -## -## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1. -## -AC_DEFUN([GLIBMM_C_STD_TIME_T_IS_NOT_INT32], -[ - AC_CACHE_CHECK( - [whether time_t is not equivalent to gint32, meaning that it can be used for a method overload], - [gtkmm_cv_c_std_time_t_is_not_int32], - [ - AC_TRY_COMPILE( - [ - #include - ],[ - typedef signed int gint32; - class Test - { - void something(gint32 val) - {} - - void something(time_t val) - {} - }; - ], - [gtkmm_cv_c_std_time_t_is_not_int32="yes"], - [gtkmm_cv_c_std_time_t_is_not_int32="no"] - ) - ]) - - if test "x${gtkmm_cv_c_std_time_t_is_not_int32}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32],[1], [Defined when time_t is not equivalent to gint32, meaning that it can be used for a method overload]) - } - fi -]) - - - diff --git a/libs/glibmm2/scripts/config.guess b/libs/glibmm2/scripts/config.guess deleted file mode 100755 index e3ef63f6cb..0000000000 --- a/libs/glibmm2/scripts/config.guess +++ /dev/null @@ -1,1471 +0,0 @@ -#! /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 Free Software Foundation, Inc. - -timestamp='2005-12-13' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/libs/glibmm2/scripts/config.sub b/libs/glibmm2/scripts/config.sub deleted file mode 100755 index 285164700d..0000000000 --- a/libs/glibmm2/scripts/config.sub +++ /dev/null @@ -1,1599 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - -timestamp='2005-12-11' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m32c) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - m32c-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/libs/glibmm2/scripts/cxx.m4 b/libs/glibmm2/scripts/cxx.m4 deleted file mode 100644 index 8dce019940..0000000000 --- a/libs/glibmm2/scripts/cxx.m4 +++ /dev/null @@ -1,364 +0,0 @@ - -dnl -dnl AC_CXX_NAMESPACES(ACTION_FOUND,ACTION_NOT_FOUND) -dnl -AC_DEFUN([AC_CXX_NAMESPACES],[ -AC_MSG_CHECKING(if C++ compiler supports namespaces) -AC_TRY_COMPILE( -[ -namespace Foo { struct A {}; } -using namespace Foo; -],[ -A a; -(void)a; -],[ - ac_cxx_namespaces=yes - AC_MSG_RESULT([$ac_cxx_namespaces]) - $1 -],[ - ac_cxx_namespaces=no - AC_MSG_RESULT([$ac_cxx_namespaces]) - $2 -]) -]) - -dnl -dnl AC_CXX_NAMESPACES(ACTION_FOUND,ACTION_NOT_FOUND) -dnl -AC_DEFUN([AC_CXX_BOOL],[ -AC_MSG_CHECKING(if C++ compiler supports bool) -AC_TRY_COMPILE( -[ -],[ - bool b=true; - bool b1=false; - (void)b; - (void)b1; -],[ - ac_cxx_bool=yes - AC_MSG_RESULT([$ac_cxx_bool]) - $1 -],[ - ac_cxx_bool=no - AC_MSG_RESULT([$ac_cxx_bool]) - $2 -]) -]) - -dnl -dnl AC_CXX_MUTABLE(ACTION_FOUND,ACTION_NOT_FOUND) -dnl -AC_DEFUN([AC_CXX_MUTABLE],[ -AC_MSG_CHECKING(if C++ compiler supports mutable) -AC_TRY_COMPILE( -[ -class k { - mutable char *c; -public: - void foo() const { c=0; } -}; -],[ -],[ - ac_cxx_mutable=yes - AC_MSG_RESULT([$ac_cxx_mutable]) - $1 -],[ - ac_cxx_mutable=no - AC_MSG_RESULT([$ac_cxx_mutable]) - $2 -]) -]) - - -dnl -dnl AC_CXX_CONST_CAST(ACTION_FOUND,ACTION_NOT_FOUND) -dnl -AC_DEFUN([AC_CXX_CONST_CAST],[ -AC_MSG_CHECKING([if C++ compiler supports const_cast<>]) -AC_TRY_COMPILE( -[ - class foo; -],[ - const foo *c=0; - foo *c1=const_cast(c); - (void)c1; -],[ - ac_cxx_const_cast=yes - AC_MSG_RESULT([$ac_cxx_const_cast]) -],[ - ac_cxx_const_cast=no - AC_MSG_RESULT([$ac_cxx_const_cast]) -]) -]) - - -dnl -dnl GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES(ACTION_FOUND,ACTION_NOT_FOUND) -dnl -dnl Test whether the compiler allows member functions to refer to spezialized member function templates. -dnl Some compilers have problems with this. gcc 2.95.3 aborts with an internal compiler error. -dnl -AC_DEFUN([GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[ -AC_MSG_CHECKING([if C++ compiler allows member functions to refer to member templates]) -AC_TRY_COMPILE( -[ - struct foo { - template inline - void doit(); - void thebug(); - }; - - template inline - void foo::doit() { - } - - struct bar { - void neitherabug(); - }; - - void notabug() { - void (foo::*func)(); - func = &foo::doit; - (void)func; - } - - void bar::neitherabug() { - void (foo::*func)(); - func = &foo::doit; - (void)func; - } - - void foo::thebug() { - void (foo::*func)(); - func = &foo::doit; //Compiler bugs usually show here. - (void)func; - } -],[],[ - glibmm_cxx_member_functions_member_templates=yes - AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[1],[does the C++ compiler allow member functions to refer to member templates]) - AC_MSG_RESULT([$glibmm_cxx_member_functions_member_templates]) -],[ - glibmm_cxx_member_functions_member_templates=no - AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[0]) - AC_MSG_RESULT([$glibmm_cxx_member_functions_member_templates]) -]) -]) - -## GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS() -## -## Check whether the compiler finds it ambiguous to have both -## const and non-const template specializations, -## The SUN Forte compiler has this problem, though we are -## not 100% sure that it's a C++ standards violation. -## -AC_DEFUN([GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS], -[ - AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD]) - - AC_CACHE_CHECK( - [whether the compiler finds it ambiguous to have both const and non-const template specializations], - [glibmm_cv_cxx_can_disambiguate_const_template_specializations], - [ - AC_TRY_COMPILE( - [ - #include - - template class Foo {}; - - template class Traits { - public: - const char* whoami() { - return "generic template"; - } - }; - - template class Traits > { - public: - const char* whoami() { - return "partial specialization for Foo"; - } - }; - - template class Traits > { - public: - const char* whoami() { - return "partial specialization for Foo"; - } - }; - - ],[ - Traits it; - Traits > fit; - Traits > cfit; - - std::cout << "Traits --> " - << it.whoami() << std::endl; - std::cout << "Traits> --> " - << fit.whoami() << std::endl; - std::cout << "Traits> --> " - << cfit.whoami() << std::endl; - ], - [glibmm_cv_cxx_can_disambiguate_const_template_specializations="yes"], - [glibmm_cv_cxx_can_disambiguate_const_template_specializations="no"] - ) - ]) - - if test "x${glibmm_cv_cxx_can_disambiguate_const_template_specializations}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS],[1], [Defined if the compiler does not find it ambiguous to have both const and non-const template specializations]) - } - fi -]) - - - -## GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION() -## -## Check whether the compiler allows us to define a template that uses -## dynamic_cast<> with an object whose type is not defined, -## even if we do not use that template before we have defined the type. -## This should probably not be allowed anyway. -## -AC_DEFUN([GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION], -[ - AC_CACHE_CHECK( - [whether the compiler allows us to define a template that uses dynamic_cast<> with an object whose type is not yet defined], - [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition], - [ - AC_TRY_COMPILE( - [ - class SomeClass; - - SomeClass* some_function(); - - template - class SomeTemplate - { - static bool do_something() - { - //This does not compile, with the MipsPro (IRIX) compiler - //even if we don't use this template at all. - //(We would use it later, after we have defined the type). - return dynamic_cast(some_function()); - } - }; - - ],[ - - ], - [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition="yes"], - [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition="no"] - ) - ]) - - if test "x${glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition}" = "xyes"; then - { - AC_DEFINE([GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION],[1], [Defined if the compiler allows us to define a template that uses dynamic_cast<> with an object whose type is not yet defined.]) - } - fi -]) - - -## GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS() -## -## Check whether the compiler allows us to use a non-extern "C" function, -## such as a static member function, to an extern "C" function pointer, -## such as a GTK+ callback. -## This should not be allowed anyway. -## -AC_DEFUN([GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS], -[ - AC_CACHE_CHECK( - [whether the the compilerallows us to use a non-extern "C" function for an extern "C" function pointer.], - [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks], - [ - AC_TRY_COMPILE( - [ - extern "C" - { - struct somestruct - { - void (*callback) (int); - }; - - } // extern "C" - - void somefunction(int) - { - } - - ],[ - somestruct something; - something.callback = &somefunction; - ], - [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks="yes"], - [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks="no"] - ) - ]) - - if test "x${glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks}" = "xyes"; then - { - AC_DEFINE([GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS],[1], [Defined if the compiler allows us to use a non-extern "C" function for an extern "C" function pointer.]) - } - fi -]) - -## GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC() -## -## Check whether the compiler puts extern "C" functions in the global namespace, -## even inside a namespace declaration. The AIX xlC compiler does this, and also -## gets confused if we declare the namespace again inside the extern "C" block. -## This seems like a compiler bug, but not a serious one. -## -AC_DEFUN([GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC], -[ - AC_CACHE_CHECK( - [whether the compiler uses namespace declarations inside extern "C" blocks.], - [glibmm_cv_cxx_can_use_namespaces_inside_externc], - [ - AC_TRY_COMPILE( - [ - namespace test - { - - extern "C" - { - - void do_something(); - - } //extern C - - - class Something - { - protected: - int i; - - friend void do_something(); - }; - - void do_something() - { - Something something; - something.i = 1; - } - - } //namespace - - - ],[ - - ], - [glibmm_cv_cxx_can_use_namespaces_inside_externc="yes"], - [glibmm_cv_cxx_can_use_namespaces_inside_externc="no"] - ) - ]) - - if test "x${glibmm_cv_cxx_can_use_namespaces_inside_externc}" = "xyes"; then - { - AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC],[1], [Defined if the compiler whether the compiler uses namespace declarations inside extern "C" blocks.]) - } - fi -]) - - diff --git a/libs/glibmm2/scripts/cxx_std.m4 b/libs/glibmm2/scripts/cxx_std.m4 deleted file mode 100644 index cb64fd4afe..0000000000 --- a/libs/glibmm2/scripts/cxx_std.m4 +++ /dev/null @@ -1,195 +0,0 @@ -cv_cxx_has_namespace_std -## GLIBMM_CXX_HAS_NAMESPACE_STD() -## -## Test whether libstdc++ declares namespace std. For safety, -## also check whether several randomly selected STL symbols -## are available in namespace std. -## -## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1. -## -AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD], -[ - AC_CACHE_CHECK( - [whether C++ library symbols are declared in namespace std], - [gtkmm_cv_cxx_has_namespace_std], - [ - AC_TRY_COMPILE( - [ - #include - #include - #include - #include - ],[ - using std::min; - using std::find; - using std::copy; - using std::bidirectional_iterator_tag; - using std::string; - using std::istream; - using std::cout; - ], - [gtkmm_cv_cxx_has_namespace_std="yes"], - [gtkmm_cv_cxx_has_namespace_std="no"] - ) - ]) - - if test "x${gtkmm_cv_cxx_has_namespace_std}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_NAMESPACE_STD],[1], [Defined when the libstdc++ declares the std-namespace]) - } - fi -]) - - -## GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS() -## -## Check for standard-conform std::iterator_traits<>, and -## #define GLIBMM_HAVE_STD_ITERATOR_TRAITS on success. -## -AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS], -[ - AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD]) - - AC_CACHE_CHECK( - [whether the C++ library supports std::iterator_traits], - [gtkmm_cv_cxx_has_std_iterator_traits], - [ - AC_TRY_COMPILE( - [ - #include - #ifdef GLIBMM_HAVE_NAMESPACE_STD - using namespace std; - #endif - ],[ - typedef iterator_traits::value_type ValueType; - ], - [gtkmm_cv_cxx_has_std_iterator_traits="yes"], - [gtkmm_cv_cxx_has_std_iterator_traits="no"] - ) - ]) - - if test "x${gtkmm_cv_cxx_has_std_iterator_traits}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_STD_ITERATOR_TRAITS],[1], [Defined if std::iterator_traits<> is standard-conforming]) - } - fi -]) - - -## GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR() -## -## Check for Sun libCstd style std::reverse_iterator, -## and #define GLIBMM_HAVE_SUN_REVERSE_ITERATOR if found. -## -AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR], -[ - AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD]) - - AC_CACHE_CHECK( - [for non-standard Sun libCstd reverse_iterator], - [gtkmm_cv_cxx_has_sun_reverse_iterator], - [ - AC_TRY_COMPILE( - [ - #include - #ifdef GLIBMM_HAVE_NAMESPACE_STD - using namespace std; - #endif - ],[ - typedef reverse_iterator ReverseIter; - ], - [gtkmm_cv_cxx_has_sun_reverse_iterator="yes"], - [gtkmm_cv_cxx_has_sun_reverse_iterator="no"] - ) - ]) - - if test "x${gtkmm_cv_cxx_has_sun_reverse_iterator}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_SUN_REVERSE_ITERATOR],[1], [Defined if std::reverse_iterator is in Sun libCstd style]) - } - fi -]) - - -## GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS() -## -## Check whether the STL containers have templated sequence ctors, -## and #define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS on success. -## -AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS], -[ - AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD]) - - AC_CACHE_CHECK( - [whether STL containers have templated sequence constructors], - [gtkmm_cv_cxx_has_template_sequence_ctors], - [ - AC_TRY_COMPILE( - [ - #include - #include - #include - #ifdef GLIBMM_HAVE_NAMESPACE_STD - using namespace std; - #endif - ],[ - const int array[8] = { 0, }; - vector test_vector (&array[0], &array[8]); - deque test_deque (test_vector.begin(), test_vector.end()); - list test_list (test_deque.begin(), test_deque.end()); - test_vector.assign(test_list.begin(), test_list.end()); - ], - [gtkmm_cv_cxx_has_template_sequence_ctors="yes"], - [gtkmm_cv_cxx_has_template_sequence_ctors="no"] - ) - ]) - - if test "x${gtkmm_cv_cxx_has_template_sequence_ctors}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS],[1], [Defined if the STL containers have templated sequence ctors]) - } - fi -]) - -## GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS() -## -## Check whether the a static member variable may be initialized inline to std::string::npos. -## The MipsPro (IRIX) compiler does not like this. -## and #define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS on success. -## -AC_DEFUN([GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS], -[ - AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD]) - - AC_CACHE_CHECK( - [whether the compiler allows a static member variable to be initialized inline to std::string::npos], - [gtkmm_cv_cxx_has_allows_static_inline_npos], - [ - AC_TRY_COMPILE( - [ - #include - #include - - class ustringtest - { - public: - //The MipsPro compiler (IRIX) says "The indicated constant value is not known", - //so we need to initalize the static member data elsewhere. - static const std::string::size_type ustringnpos = std::string::npos; - }; - ],[ - std::cout << "npos=" << ustringtest::ustringnpos << std::endl; - ], - [gtkmm_cv_cxx_has_allows_static_inline_npos="yes"], - [gtkmm_cv_cxx_has_allows_static_inline_npos="no"] - ) - ]) - - if test "x${gtkmm_cv_cxx_has_allows_static_inline_npos}" = "xyes"; then - { - AC_DEFINE([GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS],[1], [Defined if a static member variable may be initialized inline to std::string::npos]) - } - fi -]) - - diff --git a/libs/glibmm2/scripts/depcomp b/libs/glibmm2/scripts/depcomp deleted file mode 100755 index ca5ea4e1ef..0000000000 --- a/libs/glibmm2/scripts/depcomp +++ /dev/null @@ -1,584 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2006-10-15.18 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -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 . -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 - -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. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$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 $1 != '--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 $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - 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. - -*|$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 $1 != '--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, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -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-end: "$" -# End: diff --git a/libs/glibmm2/scripts/docgen.m4 b/libs/glibmm2/scripts/docgen.m4 deleted file mode 100644 index 8a04aaaab7..0000000000 --- a/libs/glibmm2/scripts/docgen.m4 +++ /dev/null @@ -1,75 +0,0 @@ - -## GTKMM_DOXYGEN_INPUT_SUBDIRS(subdirectory list) -## -AC_DEFUN([GTKMM_DOXYGEN_INPUT_SUBDIRS], -[ -GTKMM_DOXYGEN_INPUT= -gtkmm_srcdir=`cd "$srcdir" >/dev/null && pwd` - -gtkmm_list="$@" -for gtkmm_sublib in $gtkmm_list -do - GTKMM_DOXYGEN_INPUT="$GTKMM_DOXYGEN_INPUT ${gtkmm_srcdir}/${gtkmm_sublib}/${gtkmm_sublib}mm/" -done - -AC_SUBST(GTKMM_DOXYGEN_INPUT) -]) - - -## GTKMM_ARG_ENABLE_FULLDOCS() -## -## Check whether to build the full docs into the generated source. If yes, -## set GTKMMPROC_MERGECDOCS='--mergecdocs', which will be passed to gtkmmproc -## (in build_shared/Makefile_gensrc.am_fragment). This will be much slower. -## -AC_DEFUN([GTKMM_ARG_ENABLE_FULLDOCS], -[ -AC_REQUIRE([GLIBMM_CHECK_PERL]) - -AC_MSG_CHECKING([[whether to merge C reference docs into generated headers]]) - -AC_ARG_ENABLE([fulldocs], - [ --enable-fulldocs Generate fully-documented reference docs, takes - longer to build. [[default=enabled for CVS builds]]], - [gtkmm_enable_fulldocs=$enableval], - [gtkmm_enable_fulldocs=$USE_MAINTAINER_MODE]) - -AC_MSG_RESULT([${gtkmm_enable_fulldocs}]) - -GTKMMPROC_MERGECDOCS= - -if test "x$gtkmm_enable_fulldocs" = xyes; then -{ - GTKMMPROC_MERGECDOCS='--mergecdocs' - - if test "x$USE_MAINTAINER_MODE" != xyes; then - { - AC_MSG_WARN([[ -*** --enable-fulldocs only works if --enable-maintainer-mode is also set. -*** gtkmm source tarballs should be packaged with --enable-fulldocs, so -*** usually you don't need this option unless you got gtkmm from CVS. -]]) - } - fi - - AC_CACHE_CHECK( - [whether the XML::Parser module is available], - [gtkmm_cv_have_xml_parser], - [ - gtkmm_cv_have_xml_parser=no - "$PERL_PATH" -e 'use strict; use XML::Parser; exit 0;' >&5 2>&5 && gtkmm_cv_have_xml_parser=yes - ]) - - if test "x$gtkmm_cv_have_xml_parser" = xno; then - { - AC_MSG_ERROR([[ -*** The Perl module XML::Parser is required to build $PACKAGE from CVS. -]]) - } - fi -} -fi - -AC_SUBST(GTKMMPROC_MERGECDOCS) -]) - diff --git a/libs/glibmm2/scripts/glibmm_check_perl.m4 b/libs/glibmm2/scripts/glibmm_check_perl.m4 deleted file mode 100644 index 62519e5c43..0000000000 --- a/libs/glibmm2/scripts/glibmm_check_perl.m4 +++ /dev/null @@ -1,54 +0,0 @@ -dnl -dnl Some macros needed for autoconf -dnl - - -## GLIBMM_CV_PERL_VERSION(version) -## -## Helper macro of GLIBMM_CHECK_PERL(). It generates a cache variable -## name that includes the version number, in order to avoid clashes. -## -AC_DEFUN([GLIBMM_CV_PERL_VERSION],[glibmm_cv_perl_version_[]m4_translit([$1],[.${}],[____])]) - - -## GLIBMM_CHECK_PERL(version) -## -## Check for Perl >= version and set PERL_PATH. If Perl is not found -## and maintainer-mode is enabled, abort with an error message. If not -## in maintainer-mode, set PERL_PATH=perl on failure. -## -AC_DEFUN([GLIBMM_CHECK_PERL], -[ - glibmm_perl_result=no - - AC_PATH_PROGS([PERL_PATH], [perl perl5], [not found]) - - if test "x$PERL_PATH" != "xnot found"; then - { - AC_CACHE_CHECK( - [whether Perl is new enough], - GLIBMM_CV_PERL_VERSION([$1]), - [ - ]GLIBMM_CV_PERL_VERSION([$1])[=no - "$PERL_PATH" -e "require v$1; exit 0;" >/dev/null 2>&1 && ]GLIBMM_CV_PERL_VERSION([$1])[=yes - ]) - test "x${GLIBMM_CV_PERL_VERSION([$1])}" = xyes && glibmm_perl_result=yes - } - else - { - # Make sure we have something sensible, even if it doesn't work. - PERL_PATH=perl - } - fi - - if test "x$glibmm_perl_result" = xno && test "x$USE_MAINTAINER_MODE" = xyes; then - { - AC_MSG_ERROR([[ -*** Perl >= ]$1[ is required for building $PACKAGE in maintainer-mode. -]]) - } - fi - - AC_SUBST([PERL_PATH]) -]) - diff --git a/libs/glibmm2/scripts/install-sh b/libs/glibmm2/scripts/install-sh deleted file mode 100755 index 4fbbae7b7f..0000000000 --- a/libs/glibmm2/scripts/install-sh +++ /dev/null @@ -1,507 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-10-14.15 - -# 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. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -posix_glob= -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chmodcmd=$chmodprog -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -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: --c (ignored) --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. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - shift - shift - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac -done - -if test $# -ne 0 && test -z "$dir_arg$dstarg"; 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 "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$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 "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # 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: $dstarg: 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 - - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac - - 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"; } && - - # Now 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. - { - if test -f "$dst"; then - $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 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || 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-end: "$" -# End: diff --git a/libs/glibmm2/scripts/ltmain.sh b/libs/glibmm2/scripts/ltmain.sh deleted file mode 100644 index 06823e057a..0000000000 --- a/libs/glibmm2/scripts/ltmain.sh +++ /dev/null @@ -1,6863 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# 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: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# 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 - -# 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 <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# 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 "$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" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# 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 () -{ - 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 -e '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_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 () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - 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. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - 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 - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run 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 - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - 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 - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - 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 have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - 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}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $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" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - 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) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -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,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - 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. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # 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 - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $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 - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - fi - 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 - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - 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. - libobjs="$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 - non_pic_objects="$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" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - 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*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$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*) - # 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 -framework System" - 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 - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -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* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg 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*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -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*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - 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. - libobjs="$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 - non_pic_objects="$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" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_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. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$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 "$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) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - 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 (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - 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 - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - 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 - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 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 used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = 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 - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - 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 - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - 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 - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - 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 - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; 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 -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 - *" $dir "*) ;; - *" $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 - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if 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 - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - 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 module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; 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 - 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; 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 - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; 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) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - 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 "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - 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" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # 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 - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # 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="$2" - number_minor="$3" - number_revision="$4" - # - # 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) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor - 1` - age="$number_minor" - revision="$number_minor" - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - 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]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - 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]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - 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]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - major=`expr $current - $age + 1` - - 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 - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - 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 - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, 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) - ;; - $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 - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-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. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - 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 - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - 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 \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - 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 - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - 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" | ${SED} -e "1s,^X,," -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 is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # 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 - realname="$2" - shift; 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` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "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"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - 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"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$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:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # 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= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$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\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - 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 ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "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" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - 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\" - 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 - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(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 - $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 - $show "${rm}r $gentop" - $run ${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 - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - 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" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $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" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - 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*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$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 - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /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/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $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" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $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 our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - 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 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#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 -# 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 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#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); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -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; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -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; - - DEBUG("(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 * -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); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(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 variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit $EXIT_FAILURE - 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 $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - 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" - 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" - 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 - # 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 - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$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 - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_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 - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$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= - 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 - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $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. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - 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) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# 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 - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - 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. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "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. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # 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 - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # 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 - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$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) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $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" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - 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. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $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) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # 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 - $show "$rm $rmfiles" - $run $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 - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -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 - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# 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 -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/libs/glibmm2/scripts/macros.m4 b/libs/glibmm2/scripts/macros.m4 deleted file mode 100644 index abc7f8ae2d..0000000000 --- a/libs/glibmm2/scripts/macros.m4 +++ /dev/null @@ -1,134 +0,0 @@ -dnl -dnl Some macros needed for autoconf -dnl - -dnl AL_PROG_GNU_M4(ACTION_NOT_FOUND) -dnl Check for GNU m4. (sun won't do.) -dnl -AC_DEFUN([AL_PROG_GNU_M4],[ -AC_CHECK_PROGS(M4, gm4 m4, m4) - -if test "$M4" = "m4"; then - AC_MSG_CHECKING(whether m4 is GNU m4) - if $M4 --version /dev/null | grep '^GNU [Mm]4 ' >/dev/null ; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - if test "$host_vendor" = "sun"; then - $1 - fi - fi -fi -]) - - -dnl AL_PROG_GNU_MAKE(ACTION_NOT_FOUND) -dnl Check for GNU make (no sun make) -dnl -AC_DEFUN([AL_PROG_GNU_MAKE],[ -dnl -dnl Check for GNU make (stolen from gtk+/configure.in) -AC_MSG_CHECKING(whether make is GNU Make) -if ${MAKE-make} --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) - if test "$host_vendor" = "sun" ; then - $1 - fi -fi -]) - -dnl AL_ACLOCAL_INCLUDE(macrodir) -dnl Add a directory to macro search (from gnome) -AC_DEFUN([AL_ACLOCAL_INCLUDE], -[ - test "x$ACLOCAL_FLAGS" = "x" || ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - for dir in $1 - do - ACLOCAL="$ACLOCAL -I $srcdir/$dir" - done -]) - - -## GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING() -## -## Provide the --enable-debug-refcounting configure argument, disabled -## by default. If enabled, #define GTKMM_DEBUG_REFCOUNTING. -## -AC_DEFUN([GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING], -[ - AC_ARG_ENABLE([debug-refcounting], - [ --enable-debug-refcounting Print a debug message on every ref/unref. - [[default=disabled]]], - [glibmm_debug_refcounting="$enableval"], - [glibmm_debug_refcounting='no']) - - if test "x$glibmm_debug_refcounting" = "xyes"; then - { - AC_DEFINE([GLIBMM_DEBUG_REFCOUNTING],[1], [Defined when the --enable-debug-refcounting configure argument was given]) - } - fi -]) - - -## GTKMM_ARG_ENABLE_WARNINGS() -## -## Provide the --enable-warnings configure argument, set to 'minimum' -## by default. -## -AC_DEFUN([GTKMM_ARG_ENABLE_WARNINGS], -[ - AC_ARG_ENABLE([warnings], - [ --enable-warnings=[[none|minimum|maximum|hardcore]] - Control compiler pickyness. [[default=minimum]]], - [gtkmm_enable_warnings="$enableval"], - [gtkmm_enable_warnings='minimum']) - - AC_MSG_CHECKING([for compiler warning flags to use]) - - gtkmm_warning_flags='' - - case "$gtkmm_enable_warnings" in - minimum|yes) gtkmm_warning_flags='-Wall -Wno-long-long';; - maximum) gtkmm_warning_flags='-pedantic -W -Wall -Wno-long-long';; - hardcore) gtkmm_warning_flags='-pedantic -W -Wall -Wno-long-long -Werror';; - esac - - gtkmm_use_flags='' - - if test "x$gtkmm_warning_flags" != "x" - then - echo 'int foo() { return 0; }' > conftest.cc - - for flag in $gtkmm_warning_flags - do - # Test whether the compiler accepts the flag. GCC doesn't bail - # out when given an unsupported flag but prints a warning, so - # check the compiler output instead. - gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`" - rm -f conftest.$OBJEXT - test "x${gtkmm_cxx_out}" = "x" && \ - gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag" - done - - rm -f conftest.cc - gtkmm_cxx_out='' - fi - - if test "x$gtkmm_use_flags" != "x" - then - for flag in $gtkmm_use_flags - do - case " $CXXFLAGS " in - *" $flag "*) ;; # don't add flags twice - *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";; - esac - done - else - gtkmm_use_flags='none' - fi - - AC_MSG_RESULT([$gtkmm_use_flags]) -]) - diff --git a/libs/glibmm2/scripts/missing b/libs/glibmm2/scripts/missing deleted file mode 100755 index 1c8ff7049d..0000000000 --- a/libs/glibmm2/scripts/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -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] - -Send bug reports to ." - 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 - -# 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). -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 $1 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 1 - 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-end: "$" -# End: diff --git a/libs/glibmm2/scripts/reduced.m4 b/libs/glibmm2/scripts/reduced.m4 deleted file mode 100644 index 9411a57824..0000000000 --- a/libs/glibmm2/scripts/reduced.m4 +++ /dev/null @@ -1,106 +0,0 @@ -## GLIBMM_ARG_ENABLE_API_PROPERTIES() -## -## Provide the --enable-api-properties configure argument, enabled -## by default. -## -AC_DEFUN([GLIBMM_ARG_ENABLE_API_PROPERTIES], -[ - AC_ARG_ENABLE([api-properties], - [ --enable-api-properties Build properties API. - [[default=yes]]], - [glibmm_enable_api_properties="$enableval"], - [glibmm_enable_api_properties='yes']) - - if test "x$glibmm_enable_api_properties" = "xyes"; then - { - AC_DEFINE([GLIBMM_PROPERTIES_ENABLED],[1], [Defined when the --enable-api-properties configure argument was given]) - } - fi -]) - -## GLIBMM_ARG_ENABLE_API_VFUNCS() -## -## Provide the --enable-api-vfuncs configure argument, enabled -## by default. -## -AC_DEFUN([GLIBMM_ARG_ENABLE_API_VFUNCS], -[ - AC_ARG_ENABLE([api-vfuncs], - [ --enable-api-vfuncs Build vfuncs API. - [[default=yes]]], - [glibmm_enable_api_vfuncs="$enableval"], - [glibmm_enable_api_vfuncs='yes']) - - if test "x$glibmm_enable_api_vfuncs" = "xyes"; then - { - AC_DEFINE([GLIBMM_VFUNCS_ENABLED],[1], [Defined when the --enable-api-vfuncs configure argument was given]) - } - fi -]) - -## GLIBMM_ARG_ENABLE_API_EXCEPTIONS() -## -## Provide the --enable-api-exceptions configure argument, enabled -## by default. -## -AC_DEFUN([GLIBMM_ARG_ENABLE_API_EXCEPTIONS], -[ - AC_ARG_ENABLE([api-exceptions], - [ --enable-api-exceptions Build exceptions API. - [[default=yes]]], - [glibmm_enable_api_exceptions="$enableval"], - [glibmm_enable_api_exceptions='yes']) - - if test "x$glibmm_enable_api_exceptions" = "xyes"; then - { - AC_DEFINE([GLIBMM_EXCEPTIONS_ENABLED],[1], [Defined when the --enable-api-exceptions configure argument was given]) - } - fi -]) - -## GLIBMM_ARG_ENABLE_API_DEPRECATED() -## -## Provide the --enable-deprecated-api configure argument, enabled -## by default. -## -AC_DEFUN([GLIBMM_ARG_ENABLE_API_DEPRECATED], -[ - AC_ARG_ENABLE(deprecated-api, - [ --enable-deprecated-api Include (build) deprecated API in the libraries. - [[default=yes]]], - [glibmm_enable_api_deprecated="$enableval"], - [glibmm_enable_api_deprecated='yes']) - - if test "x$glibmm_enable_api_deprecated" = "xyes"; then - { - AC_MSG_WARN([Deprecated API will be built, for backwards-compatibility.]) - } - else - { - AC_MSG_WARN([Deprecated API will not be built, breaking backwards-compatibility. Do not use this build for distribution packages.]) - DISABLE_DEPRECATED_API_CFLAGS="-DGLIBMM_DISABLE_DEPRECATED" - AC_SUBST(DISABLE_DEPRECATED_API_CFLAGS) - } - fi -]) - - -## GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS() -## -## Provide the --enable-api-default-signal-handlers configure argument, enabled -## by default. -## -AC_DEFUN([GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS], -[ - AC_ARG_ENABLE([api-default-signal-handlers], - [ --enable-api-default-signal-handlers Build default signal handlers API. - [[default=yes]]], - [glibmm_enable_api_default_signal_handlers="$enableval"], - [glibmm_enable_api_default_signal_handlers='yes']) - - if test "x$glibmm_enable_api_default_signal_handlers" = "xyes"; then - { - AC_DEFINE([GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED],[1], [Defined when the --enable-api-default-signal-handlers configure argument was given]) - } - fi -]) diff --git a/libs/glibmm2/scripts/sun.m4 b/libs/glibmm2/scripts/sun.m4 deleted file mode 100644 index 6b8950f798..0000000000 --- a/libs/glibmm2/scripts/sun.m4 +++ /dev/null @@ -1,15 +0,0 @@ -AC_DEFUN([GLIBMM_PROG_CXX_SUN], - [AC_CACHE_CHECK(whether we are using SUN CC compiler, ac_cv_prog_sun_cxx, - [if AC_TRY_COMMAND(${CXX-g++} -V 2>&1) | egrep "Sun WorkShop" >/dev/null 2>&1; then - ac_cv_prog_sun_cxx=yes - else - ac_cv_prog_sun_cxx=no - fi] - )] - - if test "x${ac_cv_prog_sun_cxx}" = "xyes"; then - { - AC_DEFINE([GLIBMM_COMPILER_SUN_FORTE],[1], [Defined when the SUN Forte C++ compiler is being used.]) - } - fi -) diff --git a/libs/glibmm2/tools/Makefile.am b/libs/glibmm2/tools/Makefile.am deleted file mode 100644 index cbe60fe9b0..0000000000 --- a/libs/glibmm2/tools/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - -include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment - -SUBDIRS = m4 pm extra_defs_gen - -EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_perl) README TODO enum.pl - -gmmproc_bin_SCRIPTS = gmmproc $(files_tools_genwrap) -gmmproc_bindir = $(libdir)/glibmm-2.4/proc - - diff --git a/libs/glibmm2/tools/Makefile.in b/libs/glibmm2/tools/Makefile.in deleted file mode 100644 index 09b6c6ca31..0000000000 --- a/libs/glibmm2/tools/Makefile.in +++ /dev/null @@ -1,551 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/generate_wrap_init.pl.in $(srcdir)/gmmproc.in \ - $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment \ - $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment \ - $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment \ - TODO -subdir = tools -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/glib/glibmmconfig.h \ - $(top_builddir)/gio/giommconfig.h -CONFIG_CLEAN_FILES = gmmproc generate_wrap_init.pl -am__installdirs = "$(DESTDIR)$(gmmproc_bindir)" -gmmproc_binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(gmmproc_bin_SCRIPTS) -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GIOMM_CFLAGS = @GIOMM_CFLAGS@ -GIOMM_LIBS = @GIOMM_LIBS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GMMPROC_DIR = @GMMPROC_DIR@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \ - class_generic.m4 class_gobject.m4 class_gtkobject.m4 \ - class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \ - gerror.m4 \ - compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \ - convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \ - method.m4 property.m4 signal.m4 vfunc.m4 - -files_tools_pm = DocsParser.pm GtkDefs.pm Enum.pm Function.pm FunctionBase.pm Object.pm Output.pm Property.pm Util.pm WrapParser.pm -files_tools_genwrap = generate_wrap_init.pl -files_tools_perl = $(files_tools_genwrap) gmmproc.in -SUBDIRS = m4 pm extra_defs_gen -EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_perl) README TODO enum.pl -gmmproc_bin_SCRIPTS = gmmproc $(files_tools_genwrap) -gmmproc_bindir = $(libdir)/glibmm-2.4/proc -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tools/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -gmmproc: $(top_builddir)/config.status $(srcdir)/gmmproc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -generate_wrap_init.pl: $(top_builddir)/config.status $(srcdir)/generate_wrap_init.pl.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-gmmproc_binSCRIPTS: $(gmmproc_bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(gmmproc_bindir)" || $(MKDIR_P) "$(DESTDIR)$(gmmproc_bindir)" - @list='$(gmmproc_bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(gmmproc_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(gmmproc_bindir)/$$f'"; \ - $(gmmproc_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(gmmproc_bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-gmmproc_binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(gmmproc_bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(gmmproc_bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(gmmproc_bindir)/$$f"; \ - done - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(SCRIPTS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(gmmproc_bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-gmmproc_binSCRIPTS - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-gmmproc_binSCRIPTS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-gmmproc_binSCRIPTS install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-gmmproc_binSCRIPTS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/tools/Makefile_list_of_sources.am_fragment b/libs/glibmm2/tools/Makefile_list_of_sources.am_fragment deleted file mode 100644 index dcdc9ab416..0000000000 --- a/libs/glibmm2/tools/Makefile_list_of_sources.am_fragment +++ /dev/null @@ -1,5 +0,0 @@ -include $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment -include $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment - -files_tools_genwrap = generate_wrap_init.pl -files_tools_perl = $(files_tools_genwrap) gmmproc.in diff --git a/libs/glibmm2/tools/README b/libs/glibmm2/tools/README deleted file mode 100644 index ae015279d7..0000000000 --- a/libs/glibmm2/tools/README +++ /dev/null @@ -1,4 +0,0 @@ -This directory contains the gtkmm preprocessor used for wrapping -gtk+ objects. - -See docs/internal/ for some gtkmmproc documentation. diff --git a/libs/glibmm2/tools/TODO b/libs/glibmm2/tools/TODO deleted file mode 100644 index 75598b9523..0000000000 --- a/libs/glibmm2/tools/TODO +++ /dev/null @@ -1,12 +0,0 @@ -* streams - - Please give more information. murrayc - -* Incorporate new GtkDefs parser. - What does this mean? murrayc. - -* Get gtkmmproc to run outside install directory. - What does this mean? It runs for gtkmm and it runs installed for libgnome*mm. - - - - diff --git a/libs/glibmm2/tools/enum.pl b/libs/glibmm2/tools/enum.pl deleted file mode 100644 index 8cc6ff9011..0000000000 --- a/libs/glibmm2/tools/enum.pl +++ /dev/null @@ -1,233 +0,0 @@ -#! /usr/bin/perl - -# The lisp definitions for flags does not include order. -# thus we must extract it ourselves. -# Usage: ./enum.pl /gnome/head/cvs/gconf/gconf/*.h > gconf_enums.defs - -use warnings; - -my %token; -$module="none"; - -while ($ARGV[0] =~ /^--(\S+)/) -{ - shift @ARGV; - $module=shift @ARGV if ($1 eq "module"); - if ($1 eq "help") - { - print "enum.pl [--module modname] header_files ....\n"; - exit 0; - } -} - -foreach $file (@ARGV) -{ - &parse($file); -} - -exit; - - - -# parse enums from C -sub parse -{ - my ($file)=@_; - - $from=0; - open(FILE,$file); - - $enum=0; - $deprecated=0; - $comment=0; - - while() - { - if($comment) - { - # end of multiline comment - $comment = 0 if(/\*\//); - next; - } - - $deprecated = 1 if(s/^#ifndef [A-Z_]+_DISABLE_DEPRECATED//); - - ++$deprecated if($deprecated > 0 && /^#\s*if/); - --$deprecated if($deprecated > 0 && /^#\s*endif/); - - next if($deprecated > 0); - - # filter single-line comments - s/\/\*.*\*\///g; - - # begin of multiline comment - if(/\/\*/) - { - $comment = 1; - next; - } - - s/','/\%\%COMMA\%\%/; - s/'}'/\%\%RBRACE\%\%/; - if (/^\s*typedef enum/ ) - { - print ";; From $file\n\n" if (!$from); - $from=1; - $enum=1; - next; - } - - if ($enum && /\}/) - { - $enum=0; - &process($line,$_); - $line=""; - } - $line.=$_ if ($enum); - } -} - - -# convert enums to lisp -sub process -{ - my ($line,$def)=@_; - - $def=~s/\s*\}\s*//g; - $def=~s/\s*;\s*$//; - my $c_name=$def; - - $line=~s/\s+/ /g; - $line=~s/\/\*.*\*\///g; - $line=~s/\s*{\s*//; - - my $entity = "enum"; - $c_name =~ /^([A-Z][a-z]*)/; - $module = $1; - $def =~ s/$module//; - - @c_name=(); - @name=(); - @number=(); - - $val=0; - foreach $i (split(/,/,$line)) - { - $i=~s/^\s+//; - $i=~s/\s+$//; - if ($i =~ /^\S+$/) - { - push(@c_name,$i); - push(@number,sprintf("%d",$val)); - $token{$i}=$val; - } - elsif ($i =~ /^(\S+)\s*=\s*(0x[0-9a-fA-F]+)$/ || - $i =~ /^(\S+)\s*=\s*(-?[0-9]+)$/ || - $i =~ /^(\S+)\s*=\s*(1\s*<<\s*[0-9]+)$/ - ) - { - my ($tmp1, $tmp2) = ($1, $2); - push(@c_name, $tmp1); - eval("\$val = $tmp2;"); - $entity = "flags" if($tmp2 =~ /^1\s*< - -int main (int, char**) -{ - //glib_init(&argc, &argv); - - //std::cout << get_defs( ATK_TYPE_HYPERLINK ) - - std::cout << "No glib types were examined."; - - return 0; -} diff --git a/libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.cc b/libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.cc deleted file mode 100644 index 81a8776955..0000000000 --- a/libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.cc +++ /dev/null @@ -1,217 +0,0 @@ -/* $Id: generate_extra_defs.cc 204 2005-02-13 14:30:19Z murrayc $ */ - -/* generate_extra_defs.cc - * - * Copyright (C) 2001 The Free Software Foundation - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include "generate_extra_defs.h" - -std::string get_properties(GType gtype) -{ - std::string strResult; - std::string strObjectName = g_type_name(gtype); - - //Get the list of properties: - GObjectClass* pGClass = G_OBJECT_CLASS(g_type_class_ref(gtype)); - - guint iCount = 0; - GParamSpec** ppParamSpec = g_object_class_list_properties (pGClass, &iCount); - - for(guint i = 0; i < iCount; i++) - { - GParamSpec* pParamSpec = ppParamSpec[i]; - if(pParamSpec) - { - //Name and type: - std::string strName = g_param_spec_get_name(pParamSpec); - std::string strTypeName = G_PARAM_SPEC_TYPE_NAME(pParamSpec); - - const gchar* pchBlurb = g_param_spec_get_blurb(pParamSpec); - std::string strDocs = (pchBlurb ? pchBlurb : std::string()); - - strResult += "(define-property " + strName + "\n"; - strResult += " (of-object \"" + strObjectName + "\")\n"; - strResult += " (prop-type \"" + strTypeName + "\")\n"; - strResult += " (docs \"" + strDocs + "\")\n"; - - //Flags: - GParamFlags flags = pParamSpec->flags; - bool bReadable = (flags & G_PARAM_READABLE) == G_PARAM_READABLE; - bool bWritable = (flags & G_PARAM_WRITABLE) == G_PARAM_WRITABLE; - bool bConstructOnly = (flags & G_PARAM_CONSTRUCT_ONLY) == G_PARAM_CONSTRUCT_ONLY; - - //#t and #f aren't documented, but I guess that it's correct based on the example in the .defs spec. - const std::string strTrue = "#t"; - const std::string strFalse = "#f"; - - strResult += " (readable " + (bReadable ? strTrue : strFalse) + ")\n"; - strResult += " (writable " + (bWritable ? strTrue : strFalse) + ")\n"; - strResult += " (construct-only " + (bConstructOnly ? strTrue : strFalse) + ")\n"; - - strResult += ")\n\n"; //close (define-property - } - } - - g_free(ppParamSpec); - g_type_class_unref(pGClass); //to match the g_type_class_ref() above. - - return strResult; -} - -std::string get_type_name(GType gtype) //Adds a * if necessary. -{ - std::string strTypeName = g_type_name(gtype); - - if( g_type_is_a(gtype, G_TYPE_OBJECT) || g_type_is_a(gtype, G_TYPE_BOXED) ) - strTypeName += "*"; //Add * to show that it's a pointer. - else if( g_type_is_a(gtype, G_TYPE_STRING) ) - strTypeName = "gchar*"; //g_type_name() returns "gchararray". - - return strTypeName; -} - -std::string get_type_name_parameter(GType gtype) -{ - std::string strTypeName = get_type_name(gtype); - - //All signal parameters that are registered as GTK_TYPE_STRING are actually const gchar*. - if(strTypeName == "gchar*") - strTypeName = "const-gchar*"; - - return strTypeName; -} - -std::string get_type_name_signal(GType gtype) -{ - return get_type_name_parameter(gtype); //At the moment, it needs the same stuff. -} - - -std::string get_signals(GType gtype) -{ - std::string strResult; - std::string strObjectName = g_type_name(gtype); - - gpointer gclass_ref = 0; - - if(G_TYPE_IS_OBJECT(gtype)) - gclass_ref = g_type_class_ref(gtype); //Ensures that class_init() is called. - - //Get the list of signals: - guint iCount = 0; - guint* pIDs = g_signal_list_ids (gtype, &iCount); - - //Loop through the list of signals: - if(pIDs) - { - for(guint i = 0; i < iCount; i++) - { - guint signal_id = pIDs[i]; - - //Name: - std::string strName = g_signal_name(signal_id); - strResult += "(define-signal " + strName + "\n"; - strResult += " (of-object \"" + strObjectName + "\")\n"; - - - - //Other information about the signal: - GSignalQuery signalQuery = { 0, 0, 0, GSignalFlags(0), 0, 0, 0, }; - g_signal_query(signal_id, &signalQuery); - - //Return type: - std::string strReturnTypeName = get_type_name_signal( signalQuery.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE ); //The type is mangled with a flag. Hacky. - //bool bReturnTypeHasStaticScope = (signalQuery.return_type & G_SIGNAL_TYPE_STATIC_SCOPE) == G_SIGNAL_TYPE_STATIC_SCOPE; - strResult += " (return-type \"" + strReturnTypeName + "\")\n"; - - - //When: - { - bool bWhenFirst = (signalQuery.signal_flags & G_SIGNAL_RUN_FIRST) == G_SIGNAL_RUN_FIRST; - bool bWhenLast = (signalQuery.signal_flags & G_SIGNAL_RUN_LAST) == G_SIGNAL_RUN_LAST; - - std::string strWhen = "unknown"; - - if(bWhenFirst && bWhenLast) - strWhen = "both"; - else if(bWhenFirst) - strWhen = "first"; - else if(bWhenLast) - strWhen = "last"; - - strResult += " (when \"" + strWhen + "\")\n"; - } - - - //Loop through the list of parameters: - const GType* pParameters = signalQuery.param_types; - if(pParameters) - { - strResult += " (parameters\n"; - - for(unsigned i = 0; i < signalQuery.n_params; i++) - { - GType typeParamMangled = pParameters[i]; - - //Parameter name: - //TODO: How can we get the real parameter name? - gchar* pchNum = g_strdup_printf("%d", i); - std::string strParamName = "p" + std::string(pchNum); - g_free(pchNum); - pchNum = 0; - - //Just like above, for the return type: - std::string strTypeName = get_type_name_signal( typeParamMangled & ~G_SIGNAL_TYPE_STATIC_SCOPE ); //The type is mangled with a flag. Hacky. - //bool bReturnTypeHasStaticScope = (typeParamMangled & G_SIGNAL_TYPE_STATIC_SCOPE) == G_SIGNAL_TYPE_STATIC_SCOPE; - - strResult += " '(\"" + strTypeName + "\" \"" + strParamName + "\")\n"; - } - - strResult += " )\n"; //close (properties - } - - strResult += ")\n\n"; //close (define=signal - } - } - - g_free(pIDs); - - if(gclass_ref) - g_type_class_unref(gclass_ref); //to match the g_type_class_ref() above. - - return strResult; -} - - - -std::string get_defs(GType gtype) -{ - std::string strObjectName = g_type_name(gtype); - std::string strDefs = ";; From " + strObjectName + "\n\n"; - - strDefs += get_signals(gtype); - - if(G_TYPE_IS_OBJECT(gtype)) - strDefs += get_properties(gtype); - - return strDefs; -} - - - diff --git a/libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.h b/libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.h deleted file mode 100644 index af90b0cf30..0000000000 --- a/libs/glibmm2/tools/extra_defs_gen/generate_extra_defs.h +++ /dev/null @@ -1,33 +0,0 @@ -/* $Id: generate_extra_defs.h 2 2003-01-07 16:59:16Z murrayc $ */ - -/* generate_extra_defs.h - * - * Copyright (C) 2001 The Free Software Foundation - * - * 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; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include -#include -#include - -std::string get_defs(GType gtype); - -std::string get_properties(GType gtype); -std::string get_type_name(GType gtype); -std::string get_type_name_parameter(GType gtype); -std::string get_type_name_signal(GType gtype); -std::string get_signals(GType gtype); diff --git a/libs/glibmm2/tools/generate_wrap_init.pl b/libs/glibmm2/tools/generate_wrap_init.pl deleted file mode 100644 index 88220e23af..0000000000 --- a/libs/glibmm2/tools/generate_wrap_init.pl +++ /dev/null @@ -1,392 +0,0 @@ -#! /usr/bin/perl -# -# tools/generate_wrap_init.pl. Generated from generate_wrap_init.pl.in by configure. -# - -use strict; - -my @namespace_whole = (); # list of strings. -my $function_prefix = ""; -my $parent_dir = ""; # e.g. gtkmm -my $path = "gtk--"; -my $debug = 0; -my @filenames_headers = (); -my %objects = (); -my %exceptions = (); -my %namespaces = (); # hashmap of lists of strings. -my %basenames = (); -my %win32_nowrap = (); -my %deprecated = (); - -# Loop through command line arguments, setting variables: -while ($ARGV[0] =~ /^-/) -{ - if ($ARGV[0] =~ /--namespace=(\S+)/) - { - push(@namespace_whole, $1); - - if($parent_dir eq "") - { $parent_dir = lc($1) . "mm"; } - } - elsif ($ARGV[0] =~ /--function_prefix=(\S+)/) - { - $function_prefix = "$1"; - } - elsif ($ARGV[0] =~ /--parent_dir=(\S+)/) - { - $parent_dir = "$1"; - } - elsif - ( - $ARGV[0] =~ /--debug/) {$debug = 1; - } - elsif ($ARGV[0] =~ /--path=(\S+)/) - { - $path = "$1"; - } - else - { - print "Error: unknown option $ARGV[0]\n"; - exit; - } - - shift @ARGV; -} - - - -while ($ARGV[0]) -{ - if ($debug) {warn "Processing file : $ARGV[0]\n";} - - my $filename = $ARGV[0]; - open FILE, $filename or die "Couldn't open file $ARGV[0] : $!\n"; - - # my $file = $ARGV[0]; - # $file =~ s/.*\/([^\/]+)$/$1/; - # $file =~ s/\.hg//; - my @tmpnamespace = @namespace_whole; - my $cppname = ""; - my $cname = ""; - my $ccast = ""; - while () - { - if (/CLASS_START\((\w+)\)/) #We need a new way to get the namespace. - { - print "generate_wrap_init: namespace found: $1\n"; - push(@tmpnamespace, $1); - } - elsif (/_CLASS_GOBJECT\s*\(/) #TODO: There is duplication of code here. - { - my $line = $_; - while ($line !~ /\)/ && ($_ = )) - { - $line .= $_; - } - - $line =~ s/^.*_CLASS_GOBJECT\s*\(//; - $line =~ s/\s+//g; - ($cppname, $cname, $ccast) = split(/,/, $line); - - $objects{$cppname} = $cname; - @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); - } - elsif (/_CLASS_GTKOBJECT\s*\(/) - { - my $line = $_; - while ($line !~ /\)/ && ($_ = )) - { - $line .= $_; - } - - $line =~ s/^.*_CLASS_GTKOBJECT\s*\(//; - $line =~ s/\s+//g; - ($cppname, $cname, $ccast) = split(/,/, $line); - - #TODO: Remove this hack eventually. - if( ($cname ne "GtkTree") && ($cname ne "GtkTreeItem") && ($cname ne "GtkText") ) - { - $objects{$cppname} = $cname; - @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); - } - } - elsif (/_WRAP_GERROR\s*\(/) #TODO: There is duplication of code here. - { - my $line = $_; - while ($line !~ /\)/ && ($_ = )) - { - $line .= $_; - } - - $line =~ s/^.*_WRAP_GERROR\s*\(//; - $line =~ s/\s+//g; - $line =~ s/\)//; - ($cppname, $cname, $ccast) = split(/,/, $line); - - $exceptions{$cppname} = $cname; - @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); - } - elsif (/_GTKMMPROC_WIN32_NO_WRAP/) - { - $win32_nowrap{$cppname} = 1; - } - elsif (/_IS_DEPRECATED/) - { - $deprecated{$cppname} = 1; - } - } - - # Store header filename so that we can #include it later: - my $filename_header = $filename; - $filename_header =~ s/.*\/([^\/]+)\.hg/$1.h/; - push(@filenames_headers, $filename_header); - - shift @ARGV; - close(FILE); -} - -# my $namespace_whole_lower = lc($namespace_whole); - -print << "EOF"; - -#include - -// Disable the 'const' function attribute of the get_type() functions. -// GCC would optimize them out because we don't use the return value. -#undef G_GNUC_CONST -#define G_GNUC_CONST /* empty */ - -#include <${parent_dir}/wrap_init.h> -#include -#include - -// #include the widget headers so that we can call the get_type() static methods: - -EOF - -foreach( @filenames_headers ) -{ - print "#include \"" . $_ . "\"\n"; -} - -print "\n"; - -# Here we have to be subtle. The gtkmm objects are easy, they all go -# into the Gtk namespace. But in gnomemm, some go into the Gnome -# namespace (most of them), and some into the Gtk one (because the -# corresponding widget is Gtk-prefixed, e.g. GtkTed, GtkDial, etc... - -# First, the Gtk namespace - -print "extern \"C\"\n"; -print "{\n"; -print "\n//Declarations of the *_get_type() functions:\n\n"; - -my $i = 0; -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - print "GType $basenames{$i}_get_type(void);\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -print "\n//Declarations of the *_error_quark() functions:\n\n"; - -my $i = 0; -foreach $i (sort keys %exceptions) -{ - print "GQuark $basenames{$i}_quark(void);\n"; -} - -print "} // extern \"C\"\n"; -print "\n"; - -print "\n//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:\n\n"; - -my $i = 0; -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - my $namespace_declarations = ""; - my $namespace_close = ""; - foreach ( @{$namespaces{$i}} ) - { - $namespace_declarations .= "namespace $_ { "; - $namespace_close .= " }"; - } - - print "${namespace_declarations} class ${i}_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; ${namespace_close}\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -# print "\n//Declarations of the *Error::throw_func() methods:\n\n"; -# -# my $i = 0; -# foreach $i (sort keys %exceptions) -# { -# my $namespace_declarations = ""; -# my $namespace_close = ""; -# foreach ( @{$namespaces{$i}} ) -# { -# $namespace_declarations .= "namespace $_ { "; -# $namespace_close .= " }"; -# } -# -# print "${namespace_declarations} class ${i} { public: static void throw_func(GError*); }; ${namespace_close}\n"; -# } - -my $namespace_whole_declarations = ""; -my $namespace_whole_close = ""; -foreach( @namespace_whole ) -{ - $namespace_whole_declarations .= "namespace " . $_ ." { "; - $namespace_whole_close = "} //" . $_ . "\n" . $namespace_whole_close; -} - -print "\n"; -print "$namespace_whole_declarations\n"; -print "\n"; -print "void " .$function_prefix . "wrap_init()\n{\n"; - - -# Generate namespace::wrap_init() body -# - -print " // Register Error domains:\n"; - -foreach $i (sort keys %exceptions) -{ - my $namespace_prefix = ""; - foreach( @{$namespaces{$i}} ) - { - $namespace_prefix .= $_ ."::"; - } - - print " Glib::Error::register_domain($basenames{$i}_quark(), &", "${namespace_prefix}${i}::throw_func);\n"; -} - -print "\n"; -print "// Map gtypes to gtkmm wrapper-creation functions:\n"; - -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - my $namespace_prefix = ""; - foreach( @{$namespaces{$i}} ) - { - $namespace_prefix .= $_ ."::"; - } - - print " Glib::wrap_register($basenames{$i}_get_type(), &", "${namespace_prefix}${i}_Class::wrap_new);\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -print "\n"; -print " // Register the gtkmm gtypes:\n"; - -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - my $namespace_prefix = ""; - foreach( @{$namespaces{$i}} ) - { - $namespace_prefix .= $_ ."::"; - } - - print " ${namespace_prefix}${i}::get_type();\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -print << "EOF"; - -} // wrap_init() - -$namespace_whole_close - -EOF - -exit 0; - diff --git a/libs/glibmm2/tools/generate_wrap_init.pl.in b/libs/glibmm2/tools/generate_wrap_init.pl.in deleted file mode 100644 index 57a9cff578..0000000000 --- a/libs/glibmm2/tools/generate_wrap_init.pl.in +++ /dev/null @@ -1,392 +0,0 @@ -#! @PERL_PATH@ -# -# @configure_input@ -# - -use strict; - -my @namespace_whole = (); # list of strings. -my $function_prefix = ""; -my $parent_dir = ""; # e.g. gtkmm -my $path = "gtk--"; -my $debug = 0; -my @filenames_headers = (); -my %objects = (); -my %exceptions = (); -my %namespaces = (); # hashmap of lists of strings. -my %basenames = (); -my %win32_nowrap = (); -my %deprecated = (); - -# Loop through command line arguments, setting variables: -while ($ARGV[0] =~ /^-/) -{ - if ($ARGV[0] =~ /--namespace=(\S+)/) - { - push(@namespace_whole, $1); - - if($parent_dir eq "") - { $parent_dir = lc($1) . "mm"; } - } - elsif ($ARGV[0] =~ /--function_prefix=(\S+)/) - { - $function_prefix = "$1"; - } - elsif ($ARGV[0] =~ /--parent_dir=(\S+)/) - { - $parent_dir = "$1"; - } - elsif - ( - $ARGV[0] =~ /--debug/) {$debug = 1; - } - elsif ($ARGV[0] =~ /--path=(\S+)/) - { - $path = "$1"; - } - else - { - print "Error: unknown option $ARGV[0]\n"; - exit; - } - - shift @ARGV; -} - - - -while ($ARGV[0]) -{ - if ($debug) {warn "Processing file : $ARGV[0]\n";} - - my $filename = $ARGV[0]; - open FILE, $filename or die "Couldn't open file $ARGV[0] : $!\n"; - - # my $file = $ARGV[0]; - # $file =~ s/.*\/([^\/]+)$/$1/; - # $file =~ s/\.hg//; - my @tmpnamespace = @namespace_whole; - my $cppname = ""; - my $cname = ""; - my $ccast = ""; - while () - { - if (/CLASS_START\((\w+)\)/) #We need a new way to get the namespace. - { - print "generate_wrap_init: namespace found: $1\n"; - push(@tmpnamespace, $1); - } - elsif (/_CLASS_GOBJECT\s*\(/) #TODO: There is duplication of code here. - { - my $line = $_; - while ($line !~ /\)/ && ($_ = )) - { - $line .= $_; - } - - $line =~ s/^.*_CLASS_GOBJECT\s*\(//; - $line =~ s/\s+//g; - ($cppname, $cname, $ccast) = split(/,/, $line); - - $objects{$cppname} = $cname; - @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); - } - elsif (/_CLASS_GTKOBJECT\s*\(/) - { - my $line = $_; - while ($line !~ /\)/ && ($_ = )) - { - $line .= $_; - } - - $line =~ s/^.*_CLASS_GTKOBJECT\s*\(//; - $line =~ s/\s+//g; - ($cppname, $cname, $ccast) = split(/,/, $line); - - #TODO: Remove this hack eventually. - if( ($cname ne "GtkTree") && ($cname ne "GtkTreeItem") && ($cname ne "GtkText") ) - { - $objects{$cppname} = $cname; - @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); - } - } - elsif (/_WRAP_GERROR\s*\(/) #TODO: There is duplication of code here. - { - my $line = $_; - while ($line !~ /\)/ && ($_ = )) - { - $line .= $_; - } - - $line =~ s/^.*_WRAP_GERROR\s*\(//; - $line =~ s/\s+//g; - $line =~ s/\)//; - ($cppname, $cname, $ccast) = split(/,/, $line); - - $exceptions{$cppname} = $cname; - @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); - } - elsif (/_GTKMMPROC_WIN32_NO_WRAP/) - { - $win32_nowrap{$cppname} = 1; - } - elsif (/_IS_DEPRECATED/) - { - $deprecated{$cppname} = 1; - } - } - - # Store header filename so that we can #include it later: - my $filename_header = $filename; - $filename_header =~ s/.*\/([^\/]+)\.hg/$1.h/; - push(@filenames_headers, $filename_header); - - shift @ARGV; - close(FILE); -} - -# my $namespace_whole_lower = lc($namespace_whole); - -print << "EOF"; - -#include - -// Disable the 'const' function attribute of the get_type() functions. -// GCC would optimize them out because we don't use the return value. -#undef G_GNUC_CONST -#define G_GNUC_CONST /* empty */ - -#include <${parent_dir}/wrap_init.h> -#include -#include - -// #include the widget headers so that we can call the get_type() static methods: - -EOF - -foreach( @filenames_headers ) -{ - print "#include \"" . $_ . "\"\n"; -} - -print "\n"; - -# Here we have to be subtle. The gtkmm objects are easy, they all go -# into the Gtk namespace. But in gnomemm, some go into the Gnome -# namespace (most of them), and some into the Gtk one (because the -# corresponding widget is Gtk-prefixed, e.g. GtkTed, GtkDial, etc... - -# First, the Gtk namespace - -print "extern \"C\"\n"; -print "{\n"; -print "\n//Declarations of the *_get_type() functions:\n\n"; - -my $i = 0; -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - print "GType $basenames{$i}_get_type(void);\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -print "\n//Declarations of the *_error_quark() functions:\n\n"; - -my $i = 0; -foreach $i (sort keys %exceptions) -{ - print "GQuark $basenames{$i}_quark(void);\n"; -} - -print "} // extern \"C\"\n"; -print "\n"; - -print "\n//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:\n\n"; - -my $i = 0; -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - my $namespace_declarations = ""; - my $namespace_close = ""; - foreach ( @{$namespaces{$i}} ) - { - $namespace_declarations .= "namespace $_ { "; - $namespace_close .= " }"; - } - - print "${namespace_declarations} class ${i}_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; ${namespace_close}\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -# print "\n//Declarations of the *Error::throw_func() methods:\n\n"; -# -# my $i = 0; -# foreach $i (sort keys %exceptions) -# { -# my $namespace_declarations = ""; -# my $namespace_close = ""; -# foreach ( @{$namespaces{$i}} ) -# { -# $namespace_declarations .= "namespace $_ { "; -# $namespace_close .= " }"; -# } -# -# print "${namespace_declarations} class ${i} { public: static void throw_func(GError*); }; ${namespace_close}\n"; -# } - -my $namespace_whole_declarations = ""; -my $namespace_whole_close = ""; -foreach( @namespace_whole ) -{ - $namespace_whole_declarations .= "namespace " . $_ ." { "; - $namespace_whole_close = "} //" . $_ . "\n" . $namespace_whole_close; -} - -print "\n"; -print "$namespace_whole_declarations\n"; -print "\n"; -print "void " .$function_prefix . "wrap_init()\n{\n"; - - -# Generate namespace::wrap_init() body -# - -print " // Register Error domains:\n"; - -foreach $i (sort keys %exceptions) -{ - my $namespace_prefix = ""; - foreach( @{$namespaces{$i}} ) - { - $namespace_prefix .= $_ ."::"; - } - - print " Glib::Error::register_domain($basenames{$i}_quark(), &", "${namespace_prefix}${i}::throw_func);\n"; -} - -print "\n"; -print "// Map gtypes to gtkmm wrapper-creation functions:\n"; - -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - my $namespace_prefix = ""; - foreach( @{$namespaces{$i}} ) - { - $namespace_prefix .= $_ ."::"; - } - - print " Glib::wrap_register($basenames{$i}_get_type(), &", "${namespace_prefix}${i}_Class::wrap_new);\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -print "\n"; -print " // Register the gtkmm gtypes:\n"; - -foreach $i (sort keys %objects) -{ - if( $deprecated{$i} eq 1 ) - { - # The uc(parent_dir) is a bit of a hack. One day it will get it wrong. - print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n" - } - - #On Win32, these classes are not compiled: - if( $win32_nowrap{$i} eq 1 ) - { - print "#ifndef G_OS_WIN32\n" - } - - my $namespace_prefix = ""; - foreach( @{$namespaces{$i}} ) - { - $namespace_prefix .= $_ ."::"; - } - - print " ${namespace_prefix}${i}::get_type();\n"; - - if( $win32_nowrap{$i} eq 1 ) - { - print "#endif //G_OS_WIN32\n" - } - - if( $deprecated{$i} eq 1 ) - { - print "#endif // *_DISABLE_DEPRECATED\n" - } -} - -print << "EOF"; - -} // wrap_init() - -$namespace_whole_close - -EOF - -exit 0; - diff --git a/libs/glibmm2/tools/gmmproc.in b/libs/glibmm2/tools/gmmproc.in deleted file mode 100644 index f809817371..0000000000 --- a/libs/glibmm2/tools/gmmproc.in +++ /dev/null @@ -1,239 +0,0 @@ -#! @PERL_PATH@ -# -# @configure_input@ -# -###################################################################### -# gmmproc (version 4) -###################################################################### -# -# *** WARNING: Only modify gmmproc.in. gmmproc is built. *** -# -# Copyright 2001, Karl Einar Nelson, Murray Cumming -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. -# -# -# 'classes': -# WrapParser: steps through .hg and .ccg files, outputting appropriate m4 code with Outputter. -# Outputter: Used by WrapParser to ouput wrapper code. Ouputs *.g1 temp file and uses m4 to generate *.g2 from it. Then outputs .h and .cc files. -# Function: Contains information about C and C++ functions and signals. -# -###################################################################### - -########################## 'main()' ################################## - -$main::procdir; -$main::m4path; - -BEGIN { - # get prefix info from configure - my $prefix = "@prefix@"; - my $exec_prefix = "@exec_prefix@"; - my $libdir = "@libdir@"; - - # This line must match the install directory in m4/Makefile.am - $main::procdir = "$libdir/glibmm-2.4/proc"; - $main::m4path = "@M4@"; - - # This line must match install dir from pm/Makefile.am - push @INC,"$main::procdir/pm"; -} - -use strict; -use warnings; - -use Output; -use WrapParser; - -# initialize globals -@main::macrodirs = (); -$main::srcdir = "."; -$main::defsdir = "."; -$main::source = ""; -$main::debug = 0; -$main::unwrapped = 1; - -{ # checking the environment for a set variable can trigger a warning - no warnings; - $main::debug = 1 if ($ENV{'GMMPROC_DEBUG'} eq 1); -} - -# prototypes -sub parse_command_line_args(); - - -#main() -parse_command_line_args(); - -my $objOutputter = &Output::new($main::m4path, \@main::macrodirs); -my $objWrapParser = &WrapParser::new($objOutputter); - -$$objWrapParser{srcdir} = $main::srcdir; -$$objWrapParser{defsdir} = $main::defsdir; -$$objWrapParser{source} = $main::source; -$$objOutputter{source} = $main::source; -$$objOutputter{destdir} = $ARGV[1]; - -# Merge the C docs, e.g. gtk_docs.xml - -# Suck the whole file into one big string, breaking it into tokens: -$objWrapParser->read_file($main::srcdir, $main::source); - -# Parse output -$objWrapParser->parse_and_build_output(); - -# Write out *.g1 temporary file: -$objOutputter->output_temp_g1($$objWrapParser{module}); # e.g. "gtk" - -# Execute m4 to get *.g2 file: -{ - my $exitcode = $objOutputter->make_g2_from_g1(); - if ($exitcode != 0) - { - if (!$main::debug) - { - $objOutputter->remove_temp_files(); - } - print STDERR "m4 failed with exit code $exitcode. Aborting...\n"; - exit ($exitcode); - } -} - -# Section out the resulting output -$objOutputter->write_sections_to_files(); - -# Remove temp files. -if (!$main::debug) -{ - $objOutputter->remove_temp_files(); -} - -#Warn about any unwrapped function/signals: -if ($main::unwrapped) -{ - my @unwrapped = GtkDefs::get_unwrapped(); - if (@unwrapped) - { - no warnings; - - my @methods = - grep {$$_{entity_type} eq "method" & $$_{c_name}!~/^_/ } @unwrapped; - my @signals = - grep {$$_{entity_type} eq "signal"} @unwrapped; - my @properties = - grep {$$_{entity_type} eq "property"} @unwrapped; - - if (@methods) - { - print "Unwrapped functions:\n"; - map { print " $$_{c_name}\n"} @methods; - } - if (@properties) - { - print "Unwrapped properties:\n"; - map { print " $$_{class}::$$_{name}\n"} @properties; - } - if (@signals) - { - print "Unwrapped signals:\n"; - map { print " $$_{class}::$$_{name}\n"} @signals; - } - } -} - -# end of program -exit(); - - -#################################################################### - - -sub print_usage() -{ - print -'Usage: gmmproc [options] name srcdir destdir - -h - --help This usage message. - - --doc Produces a header file for documentation. (FIXME) - - --debug Leave intermediate output arround for analysis. - Alternatively, set GMMPROC_DEBUG=1 in the environment. - - --unwrapped Warn about possible unwrapped functions. - - --defs dir Change the directory to seach for defs. - - -I dir Specify the directory with m4 files. - - -Note: This will read srcdir/name.{hg,ccg} file and generates destdir/name.cc -'; - exit (1); -} - -# void parse_command_line_args() -sub parse_command_line_args() -{ - print_usage() if ($#ARGV == -1); - - while ($#ARGV != -1) - { - $_ = shift @ARGV; - - if (/^-/) - { - print_usage() if ( /^--help/); - print_usage() if ( /^-h/); - if (/^-I/) - { - push @main::macrodirs, shift @ARGV; - } - elsif (/^--unwrapped/) - { - $main::unwrapped = 1; - } - elsif (/^--defs/) - { - $main::defsdir = shift @ARGV; - } - elsif (/^--debug/) - { - $main::debug = 1; - } - else - { - print "unknown parameter $_\n"; - } - next; - } - - last; - } - - # we already have one argument - - if ($#ARGV != 1) - { - print STDERR "Invalid number of arguments (", $#ARGV+2, ")\n"; - print_usage(); - } - - $main::srcdir = $ARGV[0]; - $main::source = $_; - - push @main::macrodirs,"$main::procdir/m4"; -} - diff --git a/libs/glibmm2/tools/m4/Makefile.am b/libs/glibmm2/tools/m4/Makefile.am deleted file mode 100644 index d3ec8fba7d..0000000000 --- a/libs/glibmm2/tools/m4/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -include $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment - -EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_m4) - -# Install the .m4, files: - -tools_m4_includedir = $(libdir)/glibmm-2.4/proc/m4 -tools_m4_include_HEADERS = $(files_tools_m4) - diff --git a/libs/glibmm2/tools/m4/Makefile.in b/libs/glibmm2/tools/m4/Makefile.in deleted file mode 100644 index 41677371e8..0000000000 --- a/libs/glibmm2/tools/m4/Makefile.in +++ /dev/null @@ -1,433 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(tools_m4_include_HEADERS) \ - $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment -subdir = tools/m4 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/glib/glibmmconfig.h \ - $(top_builddir)/gio/giommconfig.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(tools_m4_includedir)" -tools_m4_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(tools_m4_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GIOMM_CFLAGS = @GIOMM_CFLAGS@ -GIOMM_LIBS = @GIOMM_LIBS@ -GLIBMM_CFLAGS = @GLIBMM_CFLAGS@ -GLIBMM_LIBS = @GLIBMM_LIBS@ -GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@ -GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@ -GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@ -GLIBMM_RELEASE = @GLIBMM_RELEASE@ -GLIBMM_VERSION = @GLIBMM_VERSION@ -GMMPROC_DIR = @GMMPROC_DIR@ -GREP = @GREP@ -GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \ - class_generic.m4 class_gobject.m4 class_gtkobject.m4 \ - class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \ - gerror.m4 \ - compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \ - convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \ - method.m4 property.m4 signal.m4 vfunc.m4 - -EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_m4) - -# Install the .m4, files: -tools_m4_includedir = $(libdir)/glibmm-2.4/proc/m4 -tools_m4_include_HEADERS = $(files_tools_m4) -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/m4/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tools/m4/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-tools_m4_includeHEADERS: $(tools_m4_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(tools_m4_includedir)" || $(MKDIR_P) "$(DESTDIR)$(tools_m4_includedir)" - @list='$(tools_m4_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(tools_m4_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(tools_m4_includedir)/$$f'"; \ - $(tools_m4_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(tools_m4_includedir)/$$f"; \ - done - -uninstall-tools_m4_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(tools_m4_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(tools_m4_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(tools_m4_includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(tools_m4_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-tools_m4_includeHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-tools_m4_includeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip \ - install-tools_m4_includeHEADERS installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am \ - uninstall-tools_m4_includeHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libs/glibmm2/tools/m4/Makefile_list_of_sources.am_fragment b/libs/glibmm2/tools/m4/Makefile_list_of_sources.am_fragment deleted file mode 100644 index ab2e9c1a3c..0000000000 --- a/libs/glibmm2/tools/m4/Makefile_list_of_sources.am_fragment +++ /dev/null @@ -1,8 +0,0 @@ -files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \ - class_generic.m4 class_gobject.m4 class_gtkobject.m4 \ - class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \ - gerror.m4 \ - compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \ - convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \ - method.m4 property.m4 signal.m4 vfunc.m4 - diff --git a/libs/glibmm2/tools/m4/base.m4 b/libs/glibmm2/tools/m4/base.m4 deleted file mode 100644 index 459ef89769..0000000000 --- a/libs/glibmm2/tools/m4/base.m4 +++ /dev/null @@ -1,436 +0,0 @@ -dnl $Id: base.m4 454 2007-10-12 19:58:00Z arminb $ -divert(-1) - -dnl -dnl The general convention is -dnl _* are macros -dnl __*__ are variables - -dnl -dnl rename several m4 builtins to avoid name clashes -dnl - -define(`_PREFIX_BUILTIN_ALIAS', `define(`m4_$1', defn(`$1'))') -define(`_PREFIX_BUILTIN', `_PREFIX_BUILTIN_ALIAS(`$1')`'undefine(`$1')') - -_PREFIX_BUILTIN(`builtin') -_PREFIX_BUILTIN(`decr') -_PREFIX_BUILTIN(`errprint') -_PREFIX_BUILTIN(`esyscmd') -_PREFIX_BUILTIN(`eval') -_PREFIX_BUILTIN(`format') -_PREFIX_BUILTIN(`incr') -_PREFIX_BUILTIN(`index') -_PREFIX_BUILTIN(`indir') -_PREFIX_BUILTIN(`len') -_PREFIX_BUILTIN(`maketemp') -_PREFIX_BUILTIN(`syscmd') -_PREFIX_BUILTIN(`substr') -_PREFIX_BUILTIN(`sysval') -_PREFIX_BUILTIN(`mkstemp') - -dnl -dnl More alternative names for m4 macros, not undefined (yet!). -dnl - -_PREFIX_BUILTIN_ALIAS(`changecom') -_PREFIX_BUILTIN_ALIAS(`changequote') -_PREFIX_BUILTIN_ALIAS(`define') -_PREFIX_BUILTIN_ALIAS(`divert') -_PREFIX_BUILTIN_ALIAS(`divnum') -_PREFIX_BUILTIN_ALIAS(`ifdef') -_PREFIX_BUILTIN_ALIAS(`ifelse') -_PREFIX_BUILTIN_ALIAS(`include') -_PREFIX_BUILTIN_ALIAS(`m4exit') -_PREFIX_BUILTIN_ALIAS(`m4wrap') -_PREFIX_BUILTIN_ALIAS(`patsubst') -_PREFIX_BUILTIN_ALIAS(`popdef') -_PREFIX_BUILTIN_ALIAS(`pushdef') -_PREFIX_BUILTIN_ALIAS(`shift') -_PREFIX_BUILTIN_ALIAS(`undefine') -_PREFIX_BUILTIN_ALIAS(`undivert') -_PREFIX_BUILTIN_ALIAS(`regexp') -_PREFIX_BUILTIN_ALIAS(`translit') - -dnl -dnl Type Conversion Macros -dnl - -m4_include(convert.m4) - -dnl -dnl ----------------------- Utility Macros ------------------------- -dnl - -dnl -dnl Add a comma before the arg if any, do nothing otherwise -dnl _COMMA_PREFIX(a) -> ,a -dnl _COMMA_PREFIX() -> `' -dnl -define(`_COMMA_PREFIX', `m4_ifelse(m4_eval(m4_len(`$*') >= 1), 1, `,$*')')dnl - -dnl -dnl Add a comma after the arg if any, do nothing otherwise -dnl _COMMA_SUFFIX(a) -> a, -dnl _COMMA_SUFFIX() -> `' -dnl -define(`_COMMA_SUFFIX', `m4_ifelse(m4_eval(m4_len(`$*') >= 1), 1, `$*,')')dnl - - -dnl -dnl _UPPER(string) -dnl uppercase a string -define(`_UPPER',`m4_translit(`$*',`abcdefghijklmnopqrstuvwxyz',`ABCDEFGHIJKLMNOPQRSTUVWXYZ')') - -dnl -dnl _LOWER(string) -dnl lower a string -define(`_LOWER',`m4_translit(`$*',`ABCDEFGHIJKLMNOPQRSTUVWXYZ',`abcdefghijklmnopqrstuvwxyz')') - -dnl -dnl _QUOTE(macro) -dnl If a macro generates an output with commas we need to protect it -dnl from being broken down and interpreted -define(`_QUOTE',``$*'') - -dnl -dnl _NUM(arglist) -dnl count number of arguments -define(`_NUM',`m4_ifelse(m4_len(`$*'),0,0,`$#')') - -dnl -dnl For handling of included macro files. -dnl - -dnl _PUSH(section_name) -dnl Uses pushdef() to redefine the __DIV__ macro -dnl so that it diverts ouput to the section_name, -dnl or discards it (-1) if no section_name is given. -dnl TODO: However, as far as I can tell, __DIV__ is not used anywhere. murrayc. -define(`_PUSH',`pushdef(`__DIV__',divnum)m4_divert(m4_ifelse($1,,-1,__SEC_$1))dnl`'') - -dnl _POP(section_name) -dnl Uses popdef() to go back to the previous definition of the __DIV__ macro. -define(`_POP',`m4_divert(__DIV__)popdef(`__DIV__')dnl`'') - -dnl _SECTION(section_name): -dnl m4_divert() sends subsequent output to the specified file: -define(`_SECTION',`m4_divert(__SEC_$1)dnl') - -dnl _IMPORT(section_name): -define(`_IMPORT',`m4_undivert(__SEC_$1)dnl') - -dnl _GET_TYPE_FUNC(GtkWidget) -> gtk_widget_get_type() -dnl The funny `[A-Z]?' part of the regexp is to catch things like GdkGCFooBar. -define(`_GET_TYPE_FUNC',`dnl -m4_translit(m4_substr(m4_patsubst(`$1',`[A-Z]?[A-Z]',`_\&'),1),`[A-Z]',`[a-z]')_get_type()`'dnl -') - -dnl Define a new diversion -dnl In m4, m4_divert() selects the output file to be used for subsequent text output. -dnl 0 is the normal output. We define extra output files with _NEW_SECTION(). -dnl This macro seems to redefine __SEC_COUNT as __SEC_COUNT+1, and also -dnl define __SEC_ as __SEC_COUNT. -dnl So it just sets that section identifier to the next number. - -define(`__SEC_COUNT__',0) - -define(`_NEW_SECTION',`dnl -define(`__SEC_COUNT__',m4_eval(__SEC_COUNT__+1))dnl -define(`__SEC_$1',__SEC_COUNT__)dnl -') - - -changequote([,]) -define([__BT__],[changequote(,)`changequote(`,')]) -define([__FT__],[changequote(,)'changequote(`,')]) -changequote(`,') - -changecom() - -dnl -dnl ----------------------- Main Headers ------------------------- -dnl - -_NEW_SECTION(SECTION_HEADER_FIRST)dnl Before any generated code -_NEW_SECTION(SECTION_HEADER1) dnl header up to the first namespace -_NEW_SECTION(SECTION_HEADER2) dnl header after the first namespace -_NEW_SECTION(SECTION_HEADER3) dnl header after the first namespace -_NEW_SECTION(SECTION_PHEADER) dnl private header -_NEW_SECTION(SECTION_CC_INCLUDES) dnl section for additional includes -_NEW_SECTION(SECTION_SRC_CUSTOM) dnl user supplied implementation -_NEW_SECTION(SECTION_ANONYMOUS_NAMESPACE) dnl built implementation in anonymous namespace -_NEW_SECTION(SECTION_SRC_GENERATED) dnl built implementation -_NEW_SECTION(SECTION_CLASS1) dnl decl to _CLASS -_NEW_SECTION(SECTION_CLASS2) dnl _CLASS to end of class -_NEW_SECTION(SECTION_CC) dnl section for methods (in current namespace) - -_NEW_SECTION(SECTION_CC_IMPLEMENTS_INTERFACES) dnl Calls SomeBaseInterface::add_interface(get_type()). - -dnl Virtual Functions and Default Signal Handlers (Very similar) -_NEW_SECTION(SECTION_H_VFUNCS) dnl Declaration of vfunc hooks. -_NEW_SECTION(SECTION_H_VFUNCS_CPPWRAPPER) dnl Convenience method, using C++ types, that just calls the vfunc. -_NEW_SECTION(SECTION_H_DEFAULT_SIGNAL_HANDLERS) dnl Declaration of default signal handler' hooks. - -_NEW_SECTION(SECTION_CC_DEFAULT_SIGNAL_HANDLERS) -_NEW_SECTION(SECTION_CC_VFUNCS) -_NEW_SECTION(SECTION_CC_VFUNCS_CPPWRAPPER) dnl Convenience method, using C++ types, that just calls the vfunc. - -_NEW_SECTION(SECTION_PH_DEFAULT_SIGNAL_HANDLERS) dnl private class declaration -_NEW_SECTION(SECTION_PH_VFUNCS) dnl private class declaration - -_NEW_SECTION(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS) dnl private class implementation -_NEW_SECTION(SECTION_PCC_VFUNCS) dnl private class implementation - -_NEW_SECTION(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS) dnl gtk+ class_init function -_NEW_SECTION(SECTION_PCC_CLASS_INIT_VFUNCS) dnl gtk+ class_init function - - -dnl Signal Proxies: -dnl _NEW_SECTION(SECTION_H_SIGNALPROXIES) dnl signal member objects -_NEW_SECTION(SECTION_CC_SIGNALPROXIES) dnl signal member objects - -dnl Property Proxies: -dnl _NEW_SECTION(SECTION_H_PROPERTYPROXIES) -_NEW_SECTION(SECTION_CC_PROPERTYPROXIES) - -_NEW_SECTION(SECTION_CC_INITIALIZE_CLASS_EXTRA) dnl For instance, to initialize special member data from all constructors. Not commonly used. - -dnl _NEW_SECTION(PROXY) -dnl _NEW_SECTION(SECTION_PCC_OBJECT_INIT) dnl gtk+ object_init function - - -_NEW_SECTION(SECTION_CHECK) -_NEW_SECTION(SECTION_USR) - -define(`_CHECK',`dnl -_PUSH(SECTION_CHECK) - $* -_POP() -') - -dnl This macro is for including the config header before any code (such as -dnl the #ifndef *_DISABLE_DEPRECATED in deprecated classes) is generated. -define(`_CONFIGINCLUDE',`dnl -_PUSH(SECTION_HEADER_FIRST) -#include <$1> -_POP() -') - -dnl Start of processing -dnl -dnl _START(filname, module,modulecanonical) .e.g _START(button, gtkmm, gtkmm) -define(`_START',`dnl -define(`__MODULE__',$2)dnl -define(`__MODULE_CANONICAL__',$3)dnl -define(`__HEADER_GUARD__',`_`'_UPPER(m4_translit(`$3`'_`'$1', `-', `_'))')dnl -define(`__FILE__',$1)dnl -define(`__DEPRECATION_GUARD__',`_UPPER($3)'`_DISABLE_DEPRECATED')dnl -_SECTION(SECTION_HEADER1) -') - -dnl Start deprecation of individual methods: -define(`_DEPRECATE_IFDEF_START',`dnl -#ifndef __DEPRECATION_GUARD__' -) - -dnl end deprecation of individual methods: -define(`_DEPRECATE_IFDEF_END',`dnl -#endif // __DEPRECATION_GUARD__' -) - -dnl begin optional deprecation of whole class -define(`_DEPRECATE_IFDEF_CLASS_START',`dnl -ifdef(`__BOOL_DEPRECATED__',`dnl -_DEPRECATE_IFDEF_START',`dnl -') -') - -dnl end optional deprecation of whole class -define(`_DEPRECATE_IFDEF_CLASS_END',`dnl -ifdef(`__BOOL_DEPRECATED__',`dnl -_DEPRECATE_IFDEF_END',`dnl -') -') - -dnl This does all the work of assembling the final output -dnl -dnl _END() -dnl -define(`_END',`dnl -m4_divert(0)dnl -#S 0 dnl Marks the beginning of the header file. - -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef __HEADER_GUARD__`'_H -#define __HEADER_GUARD__`'_H - -_IMPORT(SECTION_HEADER_FIRST) - -_DEPRECATE_IFDEF_CLASS_START - -m4_ifelse(__MODULE__,glibmm,,`dnl else -#include -')dnl -_IMPORT(SECTION_HEADER1) -_IMPORT(SECTION_HEADER2) -_IMPORT(SECTION_HEADER3) - -_DEPRECATE_IFDEF_CLASS_END - -#endif /* __HEADER_GUARD__`'_H */ - -#S 1 dnl Marks the beginning of the private header file. - -// -*- c++ -*- -// Generated by gtkmmproc -- DO NOT MODIFY! -#ifndef __HEADER_GUARD__`'_P_H -#define __HEADER_GUARD__`'_P_H -_DEPRECATE_IFDEF_CLASS_START -_IMPORT(SECTION_PHEADER) -_DEPRECATE_IFDEF_CLASS_END -#endif /* __HEADER_GUARD__`'_P_H */ - -#S 2 dnl Marks the beginning of the source file. - -// Generated by gtkmmproc -- DO NOT MODIFY! - -_DEPRECATE_IFDEF_CLASS_START - -#include <__MODULE__/__FILE__.h> -#include <__MODULE__/private/__FILE__`'_p.h> - -_IMPORT(SECTION_CC_INCLUDES) -_IMPORT(SECTION_SRC_CUSTOM) - -namespace -{ -_IMPORT(SECTION_ANONYMOUS_NAMESPACE) -} // anonymous namespace - -_IMPORT(SECTION_SRC_GENERATED) -_DEPRECATE_IFDEF_CLASS_END - -m4_divert(-1) -m4_undivert() -') - -define(`_NAMESPACE',`dnl -_PUSH() -m4_ifdef(`__NAMESPACE__',`dnl -pushdef(`__NAMESPACE__',__NAMESPACE__`::'$1) -pushdef(`__NAMESPACE_BEGIN__',__NAMESPACE_BEGIN__` - -namespace '$1` -{') -pushdef(`__NAMESPACE_END__',`} // namespace '$1` - -'__NAMESPACE_END__) -',`dnl else -pushdef(`__NAMESPACE__',$1) -pushdef(`__NAMESPACE_BEGIN__',`namespace '$1` -{') -pushdef(`__NAMESPACE_END__',`} // namespace '$1) -')dnl endif __NAMESPACE__ -_POP() -')dnl enddef _NAMESPACE - -define(`_END_NAMESPACE',`dnl -_PUSH() -popdef(`__NAMESPACE__') -popdef(`__NAMESPACE_BEGIN__') -popdef(`__NAMESPACE_END__') -_POP() -')dnl enddef _END_NAMESPACE - -define(`_INCLUDE_FLAG',`__FLAG_$1_INCLUDE_`'_UPPER(m4_translit(`$2',`/.-',`___'))__')dnl - -define(`_PH_INCLUDE',`dnl -m4_ifdef(_INCLUDE_FLAG(PH,`$*'),,`dnl else -define(_INCLUDE_FLAG(PH,`$*'))dnl -_PUSH(SECTION_PHEADER) -#include <$*> -_POP() -')dnl endif -')dnl - -define(`_CC_INCLUDE',`dnl -m4_ifdef(_INCLUDE_FLAG(CC,`$*'),,`dnl else -define(_INCLUDE_FLAG(CC,`$*'))dnl -_PUSH(SECTION_CC_INCLUDES) -#include <$*> -_POP() -')dnl endif -')dnl - -define(`_PINCLUDE', defn(`_PH_INCLUDE')) - -# Put these, for instance, around gtkmmproc macros (_WRAP_SIGNAL) -# to make the #ifndef appear around the generated code in both the .h -# and .cc files. -# e.g. _GTKMMPROC_H_AND_CC(#ifndef _SUN_CC_) -# e.g. _GTKMMPROC_H_AND_CC(#endif //_SUN_CC_) -# _GTKMMPROC_H_AND_CC(code) -define(`_GTKMMPROC_H_AND_CC',`dnl -$1 -_PUSH(SECTION_CC) -$1 - -_POP() -')dnl - -# Same thing as _GTKMMPROC_H_AND_CC but for signals (_WRAP_SIGNAL) -define(`_GTKMMPROC_SIGNAL_H_AND_CC',`dnl -$1 -_PUSH(SECTION_ANONYMOUS_NAMESPACE) -$1 -_POP() - -$1 -_PUSH(SECTION_H_DEFAULT_SIGNAL_HANDLERS) -$1 -_POP() - -$1 -_PUSH(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS) -$1 -_POP() - -$1 -_PUSH(SECTION_CC_DEFAULT_SIGNAL_HANDLERS) -$1 -_POP() - -$1 -_PUSH(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS) -$1 -_POP() - -$1 -_PUSH(SECTION_CC_SIGNALPROXIES) -$1 -_POP() -')dnl - -m4_include(class_shared.m4) -m4_include(class_generic.m4) -m4_include(class_gobject.m4) -m4_include(class_gtkobject.m4) -m4_include(class_boxedtype.m4) -m4_include(class_boxedtype_static.m4) -m4_include(class_interface.m4) -m4_include(class_opaque_copyable.m4) -m4_include(class_opaque_refcounted.m4) -m4_include(gerror.m4) -m4_include(signal.m4) -m4_include(vfunc.m4) -m4_include(method.m4) -m4_include(member.m4) -m4_include(compare.m4) -m4_include(ctor.m4) -m4_include(property.m4) -m4_include(enum.m4) - -_SECTION(SECTION_HEADER1) - diff --git a/libs/glibmm2/tools/m4/class_boxedtype.m4 b/libs/glibmm2/tools/m4/class_boxedtype.m4 deleted file mode 100644 index 228183def6..0000000000 --- a/libs/glibmm2/tools/m4/class_boxedtype.m4 +++ /dev/null @@ -1,218 +0,0 @@ -dnl $Id: class_boxedtype.m4 413 2007-05-14 19:28:31Z murrayc $ - -dnl -dnl _CLASS_BOXEDTYPE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy) -dnl - -define(`_CLASS_BOXEDTYPE',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') -define(`__BOXEDTYPE_FUNC_NEW',`$3') -define(`__BOXEDTYPE_FUNC_COPY',`$4') -define(`__BOXEDTYPE_FUNC_FREE',`$5') - -define(`_CUSTOM_DEFAULT_CTOR',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1') -_POP() -') - - -_POP() -_SECTION(SECTION_CLASS2) -') dnl End of _CLASS_BOXEDTYPE. - -dnl Some of the Gdk types are unions - e.g. GdkEvent. -define(`_CUSTOM_STRUCT_PROTOTYPE',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_STRUCT_PROTOTYPE__',`$1') -_POP() -') - -dnl -dnl _END_CLASS_BOXEDTYPE() -dnl denotes the end of a class -dnl -define(`_END_CLASS_BOXEDTYPE',` -_SECTION(SECTION_HEADER1) -ifdef(`__BOOL_CUSTOM_STRUCT_PROTOTYPE__',`dnl -',`dnl -#ifndef DOXYGEN_SHOULD_SKIP_THIS -extern "C" { typedef struct _`'__CNAME__ __CNAME__; } -#endif -')dnl - -_SECTION(SECTION_HEADER3) - -__NAMESPACE_BEGIN__ - -/** @relates __NAMESPACE__::__CPPNAME__ - * @param lhs The left-hand side - * @param rhs The right-hand side - */ -inline void swap(__CPPNAME__& lhs, __CPPNAME__& rhs) - { lhs.swap(rhs); } - -__NAMESPACE_END__ - -namespace Glib -{ -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else - -/** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates __NAMESPACE__::__CPPNAME__ - */ -__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false); -')dnl endif __BOOL_NO_WRAP_FUNCTION__ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -template <> -class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__> -{}; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - -_SECTION(SECTION_SRC_GENERATED) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else -namespace Glib -{ - -__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy) -{ - return __NAMESPACE__::__CPPNAME__`'(object, take_copy); -} - -} // namespace Glib -')dnl endif - - -__NAMESPACE_BEGIN__ - -dnl -dnl The implementation: -dnl - -// static -GType __CPPNAME__::get_type() -{ - return _GET_TYPE_FUNC(__CNAME__); -} - -ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl -',`dnl else -__CPPNAME__::__CPPNAME__`'() -: -ifelse(__BOXEDTYPE_FUNC_NEW,NONE,`dnl - gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods. -',`dnl else - gobject_ (__BOXEDTYPE_FUNC_NEW`'()) -')dnl -{} -')dnl endif __BOOL_CUSTOM_DEFAULT_CTOR__ - -__CPPNAME__::__CPPNAME__`'(const __CPPNAME__& other) -: - gobject_ ((other.gobject_) ? __BOXEDTYPE_FUNC_COPY`'(other.gobject_) : 0) -{} - -__CPPNAME__::__CPPNAME__`'(__CNAME__* gobject, bool make_a_copy) -: - // For BoxedType wrappers, make_a_copy is true by default. The static - // BoxedType wrappers must always take a copy, thus make_a_copy = true - // ensures identical behaviour if the default argument is used. - gobject_ ((make_a_copy && gobject) ? __BOXEDTYPE_FUNC_COPY`'(gobject) : gobject) -{} - -__CPPNAME__& __CPPNAME__::operator=(const __CPPNAME__`'& other) -{ - __CPPNAME__ temp (other); - swap(temp); - return *this; -} - -__CPPNAME__::~__CPPNAME__`'() -{ -dnl This could be a free or an unref, we do not need to know. - if(gobject_) - __BOXEDTYPE_FUNC_FREE`'(gobject_); -} - -void __CPPNAME__::swap(__CPPNAME__& other) -{ - __CNAME__ *const temp = gobject_; - gobject_ = other.gobject_; - other.gobject_ = temp; -} - -__CNAME__* __CPPNAME__::gobj_copy() const -{ - return __BOXEDTYPE_FUNC_COPY`'(gobject_); -} - -_IMPORT(SECTION_CC) - -__NAMESPACE_END__ - - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl -dnl The actual class, e.g. Pango::FontDescription, declaration: -dnl -_IMPORT(SECTION_CLASS1) -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __CNAME__ BaseObjectType; - - static GType get_type() G_GNUC_CONST; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl -',`dnl else - __CPPNAME__`'(); -')dnl - - explicit __CPPNAME__`'(__CNAME__* gobject, bool make_a_copy = true); - - __CPPNAME__`'(const __CPPNAME__& other); - __CPPNAME__& operator=(const __CPPNAME__& other); - - ~__CPPNAME__`'(); - - void swap(__CPPNAME__& other); - - ///Provides access to the underlying C instance. - __CNAME__* gobj() { return gobject_; } - - ///Provides access to the underlying C instance. - const __CNAME__* gobj() const { return gobject_; } - - ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. - __CNAME__* gobj_copy() const; - -protected: - __CNAME__* gobject_; - -private: -_IMPORT(SECTION_CLASS2) -') - diff --git a/libs/glibmm2/tools/m4/class_boxedtype_static.m4 b/libs/glibmm2/tools/m4/class_boxedtype_static.m4 deleted file mode 100644 index ede3fd06ed..0000000000 --- a/libs/glibmm2/tools/m4/class_boxedtype_static.m4 +++ /dev/null @@ -1,169 +0,0 @@ -dnl $Id: class_boxedtype_static.m4 58 2003-12-14 11:53:04Z murrayc $ - -dnl -dnl _CLASS_BOXEDTYPE_STATIC(TreeIter, GtkTreeIter) -dnl -define(`_CLASS_BOXEDTYPE_STATIC',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') - -define(`_CUSTOM_DEFAULT_CTOR',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1') -_POP() -') - -define(`_CUSTOM_CTOR_CAST',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_CTOR_CAST__',`$1') -_POP() -') - -_POP() -_SECTION(SECTION_CLASS2) -') dnl End of _CLASS_BOXEDTYPE_STATIC. - -dnl TreeIterBase shouldn't have a wrap() method - we'll custom implement them for TreeIter and TreeRow: -define(`_NO_WRAP_FUNCTION',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_NO_WRAP_FUNCTION__',`$1') -_POP() -') - -dnl -dnl _END_CLASS_BOXEDTYPE_STATIC() -dnl denotes the end of a class -dnl -define(`_END_CLASS_BOXEDTYPE_STATIC',` - -_SECTION(SECTION_HEADER3) - -namespace Glib -{ -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else - -/** @relates __NAMESPACE__::__CPPNAME__ - * @param object The C instance - * @result A C++ instance that wraps this C instance. - */ -__NAMESPACE__::__CPPNAME__& wrap(__CNAME__* object); - -/** @relates __NAMESPACE__::__CPPNAME__ - * @param object The C instance - * @result A C++ instance that wraps this C instance. - */ -const __NAMESPACE__::__CPPNAME__& wrap(const __CNAME__* object); -')dnl endif __BOOL_NO_WRAP_FUNCTION__ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -template <> -class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__> -{}; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -} // namespace Glib - -_SECTION(SECTION_SRC_GENERATED) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else -namespace Glib -{ - -__NAMESPACE__::__CPPNAME__& wrap(__CNAME__* object) -{ - return *reinterpret_cast<__NAMESPACE__::__CPPNAME__*>(object); -} - -const __NAMESPACE__::__CPPNAME__& wrap(const __CNAME__* object) -{ - return *reinterpret_cast(object); -} - -} // namespace Glib -')dnl endif __BOOL_NO_WRAP_FUNCTION__ - - -__NAMESPACE_BEGIN__ - -dnl -dnl The implementation: -dnl - -dnl // static -dnl const __CNAME__ __CPPNAME__::gobject_initializer_ = { 0, }; -dnl -// static -GType __CPPNAME__::get_type() -{ - return _GET_TYPE_FUNC(__CNAME__); -} - -ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',,`dnl else -__CPPNAME__::__CPPNAME__`'() -{ - GLIBMM_INITIALIZE_STRUCT`'(gobject_, __CNAME__); -} -')dnl - -ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else -__CPPNAME__::__CPPNAME__`'(const __CNAME__* gobject) -{ - if(gobject) - gobject_ = *gobject; - else - GLIBMM_INITIALIZE_STRUCT`'(gobject_, __CNAME__); -} -')dnl - -_IMPORT(SECTION_CC) - -__NAMESPACE_END__ - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl -dnl The actual class, e.g. Gtk::TreeIter, declaration: -dnl -_IMPORT(SECTION_CLASS1) -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __CNAME__ BaseObjectType; - - static GType get_type() G_GNUC_CONST; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',,`dnl else - __CPPNAME__`'(); -')dnl - -ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else - explicit __CPPNAME__`'(const __CNAME__* gobject); // always takes a copy -')dnl - - ///Provides access to the underlying C instance. - __CNAME__* gobj() { return &gobject_; } - - ///Provides access to the underlying C instance. - const __CNAME__* gobj() const { return &gobject_; } - -protected: - __CNAME__ gobject_; -dnl static const __CNAME__ gobject_initializer_; - -private: - _IMPORT(SECTION_CLASS2) -') - diff --git a/libs/glibmm2/tools/m4/class_generic.m4 b/libs/glibmm2/tools/m4/class_generic.m4 deleted file mode 100644 index 78f809afe2..0000000000 --- a/libs/glibmm2/tools/m4/class_generic.m4 +++ /dev/null @@ -1,54 +0,0 @@ -dnl $Id: class_generic.m4 2 2003-01-07 16:59:16Z murrayc $ - -dnl -dnl _CLASS_GENERIC(LayoutIter, PangoLayoutIter) -dnl - -define(`_CLASS_GENERIC',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') - -_POP() -_SECTION(SECTION_CLASS2) -') dnl End of _CLASS_GENERIC. - - -dnl -dnl _END_CLASS_GENERIC() -dnl denotes the end of a class -dnl -define(`_END_CLASS_GENERIC',` - -_SECTION(SECTION_SRC_GENERATED) - -__NAMESPACE_BEGIN__ - -dnl The implementation: - -_IMPORT(SECTION_CC) - -__NAMESPACE_END__ - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl -dnl The actual class, e.g. Pango::FontDescription, declaration: -dnl -_IMPORT(SECTION_CLASS1) -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __CNAME__ BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -private: -_IMPORT(SECTION_CLASS2) -') - diff --git a/libs/glibmm2/tools/m4/class_gobject.m4 b/libs/glibmm2/tools/m4/class_gobject.m4 deleted file mode 100644 index 32992bdef2..0000000000 --- a/libs/glibmm2/tools/m4/class_gobject.m4 +++ /dev/null @@ -1,243 +0,0 @@ -dnl $Id: class_gobject.m4 413 2007-05-14 19:28:31Z murrayc $ - - -define(`_CLASS_GOBJECT',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') -define(`__CCAST__',`$3') -define(`__BASE__',_LOWER(__CPPNAME__)) -define(`__CPPPARENT__',`$4') -define(`__CPARENT__',`$5') -define(`__PCAST__',`($5*)') - -dnl Some C types, e.g. GdkWindow or GdkPixmap, are a typedef to their base type, -dnl rather than the real instance type. That is really ugly, yes. We get around -dnl the problem by supporting optional __REAL_* arguments to this macro. -define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6')) -define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7')) - - -_POP() -_SECTION(SECTION_CLASS2) -') dnl end of _CLASS_GOBJECT - -dnl Widget and Object, and some others, have custom-written destructor implementations: -define(`_CUSTOM_DTOR',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_DTOR__',`$1') -_POP() -') - -dnl Gdk::Pixmap_Class::wrap_new() needs a custom implementation, in order -dnl to create a Gdk::Bitmap object if appropriate. See comments there. -define(`_CUSTOM_WRAP_NEW',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_WRAP_NEW__',`1') -_POP() -') - -dnl Gnome::Canvas::CanvasAA::CanvasAA() needs access to the -dnl normally-private canvas_class_ member variable. See comments there. -define(`_GMMPROC_PROTECTED_GCLASS',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_PROTECTED_GCLASS__',`1') -_POP() -') - -dnl Some of the Gdk types are actually direct typedefs of their base type. -dnl This means that 2 wrap functions would have the same argument. -dnl define(`_NO_WRAP_FUNCTION',`dnl -dnl _PUSH() -dnl Define this macro to be tested for later. -dnl define(`__BOOL_NO_WRAP_FUNCTION__',`$1') -dnl _POP() -dnl ') - -dnl -dnl _CREATE_METHOD(args_type_and_name_hpp, args_type_and_name_cpp,args_name_only); -dnl -define(`_CREATE_METHOD',` - static Glib::RefPtr<`'__CPPNAME__`'> create(`'$1`'); -_PUSH(SECTION_CC) -Glib::RefPtr<`'__CPPNAME__`'> __CPPNAME__`'::create(`'$2`') -{ - return Glib::RefPtr<`'__CPPNAME__`'>( new __CPPNAME__`'(`'$3`') ); -} -_POP() -') - - -dnl -dnl _END_CLASS_GOBJECT() -dnl denotes the end of a class -dnl -define(`_END_CLASS_GOBJECT',` -_SECTION(SECTION_HEADER1) -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl -_STRUCT_PROTOTYPE() -')dnl - -__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__ -_SECTION(SECTION_HEADER3) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl -namespace Glib -{ - /** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates __NAMESPACE__::__CPPNAME__ - */ - Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy = false); -} -')dnl - - -dnl -dnl -_SECTION(SECTION_PHEADER) - -#include - -__NAMESPACE_BEGIN__ - -_PH_CLASS_DECLARATION() - -__NAMESPACE_END__ - -_SECTION(SECTION_SRC_GENERATED) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else -namespace Glib -{ - -Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy) -{ - return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>( dynamic_cast<__NAMESPACE__::__CPPNAME__*> (Glib::wrap_auto ((GObject*)(object), take_copy)) ); - //We use dynamic_cast<> in case of multiple inheritance. -} - -} /* namespace Glib */ -')dnl endif - - - - -__NAMESPACE_BEGIN__ - - -/* The *_Class implementation: */ - -_PCC_CLASS_IMPLEMENTATION() - -m4_ifdef(`__BOOL_CUSTOM_WRAP_NEW__',,`dnl else -Glib::ObjectBase* __CPPNAME__`'_Class::wrap_new(GObject* object) -{ - return new __CPPNAME__`'((__CNAME__*)`'object); -} - -')dnl endif - -/* The implementation: */ - -__CNAME__* __CPPNAME__::gobj_copy() -{ - reference(); - return gobj(); -} - -__CPPNAME__::__CPPNAME__`'(const Glib::ConstructParams& construct_params) -: - __CPPPARENT__`'(construct_params) -{} - -__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem) -: - __CPPPARENT__`'(__PCAST__`'(castitem)) -{} - -ifdef(`__BOOL_CUSTOM_DTOR__',`dnl -',`dnl -__CPPNAME__::~__CPPNAME__`'() -{} - -')dnl - - -_CC_CLASS_IMPLEMENTATION() - -__NAMESPACE_END__ - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl The actual class, e.g. Gtk::Widget, declaration: -dnl _IMPORT(SECTION_H_SIGNALPROXIES_CUSTOM) - -_IMPORT(SECTION_CLASS1) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -public: - typedef __CPPNAME__ CppObjectType; - typedef __CPPNAME__`'_Class CppClassType; - typedef __CNAME__ BaseObjectType; - typedef __REAL_CNAME__`'Class BaseClassType; - -m4_ifdef(`__BOOL_PROTECTED_GCLASS__', -`protected:',`dnl else -private:')dnl endif - friend class __CPPNAME__`'_Class; - static CppClassType `'__BASE__`'_class_; - -private: - // noncopyable - __CPPNAME__`'(const __CPPNAME__&); - __CPPNAME__& operator=(const __CPPNAME__&); - -protected: - explicit __CPPNAME__`'(const Glib::ConstructParams& construct_params); - explicit __CPPNAME__`'(__CNAME__* castitem); - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -public: - virtual ~__CPPNAME__`'(); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static GType get_type() G_GNUC_CONST; - static GType get_base_type() G_GNUC_CONST; -#endif - - ///Provides access to the underlying C GObject. - __CNAME__* gobj() { return reinterpret_cast<__CNAME__*>(gobject_); } - - ///Provides access to the underlying C GObject. - const __CNAME__* gobj() const { return reinterpret_cast<__CNAME__*>(gobject_); } - - ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. - __CNAME__* gobj_copy(); - -private: -_IMPORT(SECTION_CLASS2) - -public: -_H_VFUNCS_AND_SIGNALS() - -') - diff --git a/libs/glibmm2/tools/m4/class_gtkobject.m4 b/libs/glibmm2/tools/m4/class_gtkobject.m4 deleted file mode 100644 index 2e85daaae1..0000000000 --- a/libs/glibmm2/tools/m4/class_gtkobject.m4 +++ /dev/null @@ -1,228 +0,0 @@ -dnl $Id: class_gtkobject.m4 413 2007-05-14 19:28:31Z murrayc $ - - - -define(`_CLASS_GTKOBJECT',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') -define(`__CCAST__',`$3') -define(`__BASE__',_LOWER(__CPPNAME__)) -define(`__CPPPARENT__',`$4') -define(`__CPARENT__',`$5') -define(`__PCAST__',`($5*)') - -dnl Some C types, e.g. GdkWindow or GdkPixmap, are a typedef to their base type, -dnl rather than the real instance type. That is really ugly, yes. We get around -dnl the problem by supporting optional __REAL_* arguments to this macro. -define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6')) -define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7')) - - -dnl -dnl ----------------------- Constructors ------------------------- -dnl - - -_POP() -_SECTION(SECTION_CLASS2) -')dnl end of _CLASS_GTKOBJECT - -dnl Widget and Object, and some others, have custom-written destructor implementations: -define(`_CUSTOM_DTOR',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_DTOR__',`$1') -_POP() -') - -dnl Gtk::Object has a custom-written cast implementation: -define(`_CUSTOM_CTOR_CAST',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_CTOR_CAST__',`$1') -_POP() -') - -dnl Top-level windows can not be manage()ed, so we should not use manage() in wrap_new(). -define(`_UNMANAGEABLE',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_UNMANAGEABLE__',`$1') -_POP() -') - -dnl Optionally ifdef-out the whole .h and .cc files: -define(`_IS_DEPRECATED',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_DEPRECATED__',`$1') -_POP() -') - -dnl Gnome::Canvas::CanvasAA::CanvasAA() needs access to the -dnl normally-private canvas_class_ member variable. See comments there. -define(`_GMMPROC_PROTECTED_GCLASS',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_PROTECTED_GCLASS__',`1') -_POP() -') - - -dnl -dnl _END_CLASS_GTKOBJECT() -dnl denotes the end of a class -dnl -define(`_END_CLASS_GTKOBJECT',` - -_SECTION(SECTION_HEADER1) -_STRUCT_PROTOTYPE() - -__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__ -_SECTION(SECTION_HEADER3) - -namespace Glib -{ - /** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates __NAMESPACE__::__CPPNAME__ - */ - __NAMESPACE__::__CPPNAME__`'* wrap(__CNAME__`'* object, bool take_copy = false); -} //namespace Glib - -dnl -dnl -_SECTION(SECTION_PHEADER) - -#include - -__NAMESPACE_BEGIN__ - -_PH_CLASS_DECLARATION() - -__NAMESPACE_END__ - -_SECTION(SECTION_SRC_GENERATED) - -namespace Glib -{ - -__NAMESPACE__::__CPPNAME__`'* wrap(__CNAME__`'* object, bool take_copy) -{ - return dynamic_cast<__NAMESPACE__::__CPPNAME__ *> (Glib::wrap_auto ((GObject*)(object), take_copy)); -} - -} /* namespace Glib */ - -__NAMESPACE_BEGIN__ - - -/* The *_Class implementation: */ - -_PCC_CLASS_IMPLEMENTATION() - -Glib::ObjectBase* __CPPNAME__`'_Class::wrap_new(GObject* o) -{ -ifdef(`__BOOL_UNMANAGEABLE__',`dnl - return new __CPPNAME__`'((__CNAME__*)`'(o)); //top-level windows can not be manage()ed. -',`dnl - return manage(new __CPPNAME__`'((__CNAME__*)`'(o))); -') -} - - -/* The implementation: */ - -ifdef(`__BOOL_CUSTOM_CTOR_CAST__',`dnl necessary for Gtk::Object implementation -',`dnl -__CPPNAME__::__CPPNAME__`'(const Glib::ConstructParams& construct_params) -: - __CPPPARENT__`'(construct_params) -{ - _IMPORT(SECTION_CC_INITIALIZE_CLASS_EXTRA) dnl Does not seem to work - custom implement it instead. -} - -__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem) -: - __CPPPARENT__`'(__PCAST__`'(castitem)) -{ - _IMPORT(SECTION_CC_INITIALIZE_CLASS_EXTRA) dnl Does not seem to work - custom implement it instead. -} - -')dnl -ifdef(`__BOOL_CUSTOM_DTOR__',`dnl -',`dnl -__CPPNAME__::~__CPPNAME__`'() -{ - destroy_(); -} - -')dnl -_CC_CLASS_IMPLEMENTATION() - -__NAMESPACE_END__ - -dnl -dnl -dnl -dnl -_POP() -dnl The actual class, e.g. Gtk::Widget, declaration: -dnl _IMPORT(SECTION_H_SIGNALPROXIES_CUSTOM) - -_IMPORT(SECTION_CLASS1) -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __CPPNAME__`'_Class CppClassType; - typedef __CNAME__ BaseObjectType; - typedef __REAL_CNAME__`'Class BaseClassType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - virtual ~__CPPNAME__`'(); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -m4_ifdef(`__BOOL_PROTECTED_GCLASS__', -`protected:',`dnl else -private:')dnl endif - - friend class __CPPNAME__`'_Class; - static CppClassType `'__BASE__`'_class_; - - // noncopyable - __CPPNAME__`'(const __CPPNAME__&); - __CPPNAME__& operator=(const __CPPNAME__&); - -protected: - explicit __CPPNAME__`'(const Glib::ConstructParams& construct_params); - explicit __CPPNAME__`'(__CNAME__* castitem); - -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static GType get_type() G_GNUC_CONST; - static GType get_base_type() G_GNUC_CONST; -#endif - - ///Provides access to the underlying C GtkObject. - __CNAME__* gobj() { return reinterpret_cast<__CNAME__*>(gobject_); } - - ///Provides access to the underlying C GtkObject. - const __CNAME__* gobj() const { return reinterpret_cast<__CNAME__*>(gobject_); } - -_H_VFUNCS_AND_SIGNALS() - -private: -_IMPORT(SECTION_CLASS2) - -') - diff --git a/libs/glibmm2/tools/m4/class_interface.m4 b/libs/glibmm2/tools/m4/class_interface.m4 deleted file mode 100644 index e34366371d..0000000000 --- a/libs/glibmm2/tools/m4/class_interface.m4 +++ /dev/null @@ -1,273 +0,0 @@ -dnl $Id: class_interface.m4 446 2007-09-26 15:10:44Z murrayc $ - - -define(`_CLASS_INTERFACE',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') -define(`__CCAST__',`$3') -define(`__CCLASS__',`$4') dnl SomethingIface or SomethingClass, both suffixes are used. -define(`__BASE__',_LOWER(__CPPNAME__)) -define(`__CPPPARENT__',`Glib::Interface') -dnl define(`__CPARENT__',`GObject') -define(`__PCAST__',`(GObject*)') -define(`__BOOL_IS_INTERFACE__',`1') - - -_POP() -_SECTION(SECTION_CLASS2) -') dnl end of _CLASS_INTERFACE - - -dnl Some of the Gdk types are actually direct typedefs of their base type. -dnl This means that 2 wrap functions would have the same argument. -dnl define(`_NO_WRAP_FUNCTION',`dnl -dnl _PUSH() -dnl Define this macro to be tested for later. -dnl define(`__BOOL_NO_WRAP_FUNCTION__',`$1') -dnl _POP() -dnl ') - -dnl -dnl -dnl -define(`_PH_CLASS_DECLARATION_INTERFACE',`dnl -class __CPPNAME__`'_Class : public Glib::Interface_Class -{ -public: - typedef __CPPNAME__ CppObjectType; - typedef __CNAME__ BaseObjectType; - typedef __CCLASS__ BaseClassType; - typedef __CPPPARENT__`'_Class CppClassParent; - - friend class __CPPNAME__; - - const Glib::Interface_Class& init(); - - static void iface_init_function(void* g_iface, void* iface_data); - - static Glib::ObjectBase* wrap_new(GObject*); - -protected: - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - //Callbacks (default signal handlers): - //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any. - //You could prevent the original default signal handlers being called by overriding the *_impl method. -_IMPORT(SECTION_PH_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - - //Callbacks (virtual functions): -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_PH_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED -}; -') - - -dnl -dnl -dnl -define(`_PCC_CLASS_IMPLEMENTATION_INTERFACE',`dnl -const Glib::Interface_Class& __CPPNAME__`'_Class::init() -{ - if(!gtype_) // create the GType if necessary - { - // Glib::Interface_Class has to know the interface init function - // in order to add interfaces to implementing types. - class_init_func_ = &__CPPNAME__`'_Class::iface_init_function; - - // We can not derive from another interface, and it is not necessary anyway. - gtype_ = _LOWER(__CCAST__)_get_type(); - } - - return *this; -} - -void __CPPNAME__`'_Class::iface_init_function(void* g_iface, void*) -{ - BaseClassType *const klass = static_cast(g_iface); - - //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect. - //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc - g_assert(klass != 0); - -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_PCC_CLASS_INIT_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -_IMPORT(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -} - -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_PCC_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -_IMPORT(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -') - - -dnl -dnl _END_CLASS_INTERFACE() -dnl denotes the end of a class -dnl -define(`_END_CLASS_INTERFACE',` -_SECTION(SECTION_HEADER1) -_STRUCT_PROTOTYPE() - -__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__ -_SECTION(SECTION_HEADER3) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl -namespace Glib -{ - /** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates __NAMESPACE__::__CPPNAME__ - */ - Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy = false); - -} // namespace Glib - -')dnl -dnl -dnl -_SECTION(SECTION_PHEADER) - -#include - -__NAMESPACE_BEGIN__ - -_PH_CLASS_DECLARATION_INTERFACE() - -__NAMESPACE_END__ - -_SECTION(SECTION_SRC_GENERATED) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else -namespace Glib -{ - -Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy) -{ - return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>( dynamic_cast<__NAMESPACE__::__CPPNAME__*> (Glib::wrap_auto_interface<__NAMESPACE__::__CPPNAME__> ((GObject*)(object), take_copy)) ); - //We use dynamic_cast<> in case of multiple inheritance. -} - -} // namespace Glib -')dnl endif - - -__NAMESPACE_BEGIN__ - - -/* The *_Class implementation: */ - -_PCC_CLASS_IMPLEMENTATION_INTERFACE() - -Glib::ObjectBase* __CPPNAME__`'_Class::wrap_new(GObject* object) -{ - return new __CPPNAME__`'((__CNAME__*)`'(object)); -} - - -/* The implementation: */ - -__CPPNAME__::__CPPNAME__`'() -: - Glib::Interface(__BASE__`'_class_.init()) -{} - -__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem) -: - __CPPPARENT__`'(__PCAST__`'(castitem)) -{} - -__CPPNAME__::~__CPPNAME__`'() -{} - -// static -void __CPPNAME__`'::add_interface(GType gtype_implementer) -{ - __BASE__`'_class_.init().add_interface(gtype_implementer); -} - -_CC_CLASS_IMPLEMENTATION() - -__NAMESPACE_END__ - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl The actual class, e.g. Gtk::Widget, declaration: -dnl _IMPORT(SECTION_H_SIGNALPROXIES_CUSTOM) - -_IMPORT(SECTION_CLASS1) - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - -public: - typedef __CPPNAME__ CppObjectType; - typedef __CPPNAME__`'_Class CppClassType; - typedef __CNAME__ BaseObjectType; - typedef __CCLASS__ BaseClassType; - -private: - friend class __CPPNAME__`'_Class; - static CppClassType `'__BASE__`'_class_; - - // noncopyable - __CPPNAME__`'(const __CPPNAME__&); - __CPPNAME__& operator=(const __CPPNAME__&); - -protected: - __CPPNAME__`'(); // you must derive from this class - -public: - // This is public so that C++ wrapper instances can be - // created for C instances of unwrapped types. - // For instance, if an unexpected C type implements the C interface. - explicit __CPPNAME__`'(__CNAME__* castitem); - -protected: -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -public: - virtual ~__CPPNAME__`'(); - - static void add_interface(GType gtype_implementer); - -#ifndef DOXYGEN_SHOULD_SKIP_THIS - static GType get_type() G_GNUC_CONST; - static GType get_base_type() G_GNUC_CONST; -#endif - - ///Provides access to the underlying C GObject. - __CNAME__* gobj() { return reinterpret_cast<__CNAME__*>(gobject_); } - - ///Provides access to the underlying C GObject. - const __CNAME__* gobj() const { return reinterpret_cast<__CNAME__*>(gobject_); } - -private: -_IMPORT(SECTION_CLASS2) - -public: -_H_VFUNCS_AND_SIGNALS() - -') - diff --git a/libs/glibmm2/tools/m4/class_opaque_copyable.m4 b/libs/glibmm2/tools/m4/class_opaque_copyable.m4 deleted file mode 100644 index c4930c9d1d..0000000000 --- a/libs/glibmm2/tools/m4/class_opaque_copyable.m4 +++ /dev/null @@ -1,184 +0,0 @@ -dnl $Id: class_opaque_copyable.m4 413 2007-05-14 19:28:31Z murrayc $ - -dnl -dnl _CLASS_OPAQUE_COPYABLE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy) -dnl - -define(`_CLASS_OPAQUE_COPYABLE',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') -define(`__OPAQUE_FUNC_NEW',`$3') -define(`__OPAQUE_FUNC_COPY',`$4') -define(`__OPAQUE_FUNC_FREE',`$5') - -define(`_CUSTOM_DEFAULT_CTOR',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1') -_POP() -') - -_POP() -_SECTION(SECTION_CLASS2) -') dnl End of _CLASS_OPAQUE_COPYABLE. - - -dnl -dnl _END_CLASS_OPAQUE_COPYABLE() -dnl denotes the end of a class -dnl -define(`_END_CLASS_OPAQUE_COPYABLE',` - -_SECTION(SECTION_HEADER3) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else -namespace Glib -{ - - /** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates __NAMESPACE__::__CPPNAME__ - */ -__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false); - -} // namespace Glib -')dnl endif __BOOL_NO_WRAP_FUNCTION__ - -_SECTION(SECTION_SRC_GENERATED) - -ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl -',`dnl else -namespace Glib -{ - -__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy /* = false */) -{ - return __NAMESPACE__::__CPPNAME__`'(object, take_copy); -} - -} // namespace Glib -')dnl endif - - -__NAMESPACE_BEGIN__ - -dnl -dnl The implementation: -dnl - -ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl -',`dnl else -__CPPNAME__::__CPPNAME__`'() -: -ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl - gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods. -',`dnl else - gobject_ (__OPAQUE_FUNC_NEW`'()) -')dnl -{} -')dnl endif __BOOL_CUSTOM_DEFAULT_CTOR__ - -__CPPNAME__::__CPPNAME__`'(const __CPPNAME__& src) -: - gobject_ ((src.gobject_) ? __OPAQUE_FUNC_COPY`'(src.gobject_) : 0) -{} - -__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem, bool make_a_copy /* = false */) -{ - if(!make_a_copy) - { - // It was given to us by a function which has already made a copy for us to keep. - gobject_ = castitem; - } - else - { - // We are probably getting it via direct access to a struct, - // so we can not just take it - we have to take a copy of it. - if(castitem) - gobject_ = __OPAQUE_FUNC_COPY`'(castitem); - else - gobject_ = 0; - } -} - -ifelse(__OPAQUE_FUNC_COPY,NONE,`dnl -',`dnl else -__CPPNAME__& __CPPNAME__::operator=(const __CPPNAME__`'& src) -{ - __CNAME__ *const new_gobject = (src.gobject_) ? __OPAQUE_FUNC_COPY`'(src.gobject_) : 0; - - if(gobject_) - __OPAQUE_FUNC_FREE`'(gobject_); - - gobject_ = new_gobject; - - return *this; -} -')dnl - -__CPPNAME__::~__CPPNAME__`'() -{ - if(gobject_) - __OPAQUE_FUNC_FREE`'(gobject_); -} - -__CNAME__* __CPPNAME__::gobj_copy() const -{ - return __OPAQUE_FUNC_COPY`'(gobject_); -} - -_IMPORT(SECTION_CC) - -__NAMESPACE_END__ - - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl -dnl The actual class, e.g. Pango::FontDescription, declaration: -dnl -_IMPORT(SECTION_CLASS1) -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __CNAME__ BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl -',`dnl else - __CPPNAME__`'(); -')dnl - - // Use make_a_copy=true when getting it directly from a struct. - explicit __CPPNAME__`'(__CNAME__* castitem, bool make_a_copy = false); - - __CPPNAME__`'(const __CPPNAME__& src); - __CPPNAME__& operator=(const __CPPNAME__& src); - - ~__CPPNAME__`'(); - - __CNAME__* gobj() { return gobject_; } - const __CNAME__* gobj() const { return gobject_; } - - ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. - __CNAME__* gobj_copy() const; - -protected: - __CNAME__* gobject_; - -private: -_IMPORT(SECTION_CLASS2) -') - diff --git a/libs/glibmm2/tools/m4/class_opaque_refcounted.m4 b/libs/glibmm2/tools/m4/class_opaque_refcounted.m4 deleted file mode 100644 index 31311aa5b6..0000000000 --- a/libs/glibmm2/tools/m4/class_opaque_refcounted.m4 +++ /dev/null @@ -1,175 +0,0 @@ -dnl $Id: class_opaque_refcounted.m4 413 2007-05-14 19:28:31Z murrayc $ - -dnl -dnl _CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref, pango_coverage_unref) -dnl - -define(`_CLASS_OPAQUE_REFCOUNTED',`dnl -_PUSH() -dnl -dnl Define the args for later macros -define(`__CPPNAME__',`$1') -define(`__CNAME__',`$2') -define(`__OPAQUE_FUNC_NEW',`$3') -define(`__OPAQUE_FUNC_REF',`$4') -define(`__OPAQUE_FUNC_UNREF',`$5') - -_POP() -_SECTION(SECTION_CLASS2) -')dnl End of _CLASS_OPAQUE_REFCOUNTED. - - -dnl -dnl _END_CLASS_OPAQUE_REFCOUNTED() -dnl denotes the end of a class -dnl -define(`_END_CLASS_OPAQUE_REFCOUNTED',` - -_SECTION(SECTION_HEADER3) - -namespace Glib -{ - - /** A Glib::wrap() method for this object. - * - * @param object The C instance. - * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. - * @result A C++ instance that wraps this C instance. - * - * @relates __NAMESPACE__::__CPPNAME__ - */ - Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__* object, bool take_copy = false); - -} // namespace Glib - -_SECTION(SECTION_SRC_GENERATED) - -/* Why reinterpret_cast<__CPPNAME__*>(gobject) is needed: - * - * A __CPPNAME__ instance is in fact always a __CNAME__ instance. - * Unfortunately, __CNAME__ cannot be a member of __CPPNAME__, - * because it is an opaque struct. Also, the C interface does not provide - * any hooks to install a destroy notification handler, thus we cannot - * wrap it dynamically either. - * - * The cast works because __CPPNAME__ does not have any member data, and - * it is impossible to derive from it. This is ensured by not implementing - * the (protected) default constructor. The ctor is protected rather than - * private just to avoid a compile warning. - */ - -namespace Glib -{ - -Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__* object, bool take_copy) -{ - if(take_copy && object) - __OPAQUE_FUNC_REF`'(object); - - // See the comment at the top of this file, if you want to know why the cast works. - return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>(reinterpret_cast<__NAMESPACE__::__CPPNAME__*>(object)); -} - -} // namespace Glib - - -__NAMESPACE_BEGIN__ - -dnl -dnl The implementation: -dnl - -ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl -',`dnl else -// static -Glib::RefPtr<__CPPNAME__> __CPPNAME__::create() -{ - // See the comment at the top of this file, if you want to know why the cast works. - return Glib::RefPtr<__CPPNAME__>(reinterpret_cast<__CPPNAME__*>(__OPAQUE_FUNC_NEW`'())); -} -')dnl endif __OPAQUE_FUNC_NEW - -void __CPPNAME__::reference() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - __OPAQUE_FUNC_REF`'(reinterpret_cast<__CNAME__*>(const_cast<__CPPNAME__*>(this))); -} - -void __CPPNAME__::unreference() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - __OPAQUE_FUNC_UNREF`'(reinterpret_cast<__CNAME__*>(const_cast<__CPPNAME__*>(this))); -} - -__CNAME__* __CPPNAME__::gobj() -{ - // See the comment at the top of this file, if you want to know why the cast works. - return reinterpret_cast<__CNAME__*>(this); -} - -const __CNAME__* __CPPNAME__::gobj() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - return reinterpret_cast(this); -} - -__CNAME__* __CPPNAME__::gobj_copy() const -{ - // See the comment at the top of this file, if you want to know why the cast works. - __CNAME__ *const gobject = reinterpret_cast<__CNAME__*>(const_cast<__CPPNAME__*>(this)); - __OPAQUE_FUNC_REF`'(gobject); - return gobject; -} - -_IMPORT(SECTION_CC) - -__NAMESPACE_END__ - - -dnl -dnl -dnl -dnl -_POP() -dnl -dnl -dnl The actual class, e.g. Pango::FontDescription, declaration: -dnl -_IMPORT(SECTION_CLASS1) -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __CNAME__ BaseObjectType; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - -ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl -',`dnl else - static Glib::RefPtr<__CPPNAME__> create(); -')dnl endif __OPAQUE_FUNC_NEW - - // For use with Glib::RefPtr<> only. - void reference() const; - void unreference() const; - - ///Provides access to the underlying C instance. - __CNAME__* gobj(); - - ///Provides access to the underlying C instance. - const __CNAME__* gobj() const; - - ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. - __CNAME__* gobj_copy() const; - -protected: - // Do not derive this. __NAMESPACE__::__CPPNAME__ can neither be constructed nor deleted. - __CPPNAME__`'(); - void operator delete(void*, size_t); - -private: - // noncopyable - __CPPNAME__`'(const __CPPNAME__&); - __CPPNAME__& operator=(const __CPPNAME__&); - -_IMPORT(SECTION_CLASS2) -') - diff --git a/libs/glibmm2/tools/m4/class_shared.m4 b/libs/glibmm2/tools/m4/class_shared.m4 deleted file mode 100644 index fa5d302b8c..0000000000 --- a/libs/glibmm2/tools/m4/class_shared.m4 +++ /dev/null @@ -1,221 +0,0 @@ -dnl $Id: class_shared.m4 320 2006-09-19 20:07:31Z murrayc $ - -define(`_CLASS_START',`dnl -_PUSH(SECTION_CLASS1) -') - -dnl -dnl -dnl -define(`_H_VFUNCS_AND_SIGNALS',`dnl - -public: - //C++ methods used to invoke GTK+ virtual functions: -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_H_VFUNCS_CPPWRAPPER) -#endif //GLIBMM_VFUNCS_ENABLED - -protected: - //GTK+ Virtual Functions (override these to change behaviour): -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_H_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED - - //Default Signal Handlers:: -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -_IMPORT(SECTION_H_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -') - - -dnl -dnl -dnl -define(`_IMPLEMENTS_INTERFACE_CC',`dnl -_PUSH(SECTION_CC_IMPLEMENTS_INTERFACES) -ifelse(`$2',,,`#ifdef $2' -)dnl - $1`'::add_interface(get_type()); -ifelse(`$2',,,` -#endif // $2 -')dnl -_POP() -') - - - -dnl -dnl -dnl -define(`_PH_CLASS_DECLARATION',`dnl -class __CPPNAME__`'_Class : public Glib::Class -{ -public: -#ifndef DOXYGEN_SHOULD_SKIP_THIS - typedef __CPPNAME__ CppObjectType; - typedef __REAL_CNAME__ BaseObjectType; -ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl -',`dnl - typedef __REAL_CNAME__`'Class BaseClassType; - typedef __CPPPARENT__`'_Class CppClassParent; - typedef __REAL_CPARENT__`'Class BaseClassParent; -')dnl - - friend class __CPPNAME__; -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - const Glib::Class& init(); - -ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl -',`dnl - static void class_init_function(void* g_class, void* class_data); -')dnl - - static Glib::ObjectBase* wrap_new(GObject*); - -protected: - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - //Callbacks (default signal handlers): - //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any. - //You could prevent the original default signal handlers being called by overriding the *_impl method. -_IMPORT(SECTION_PH_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - - //Callbacks (virtual functions): -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_PH_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED -}; -') - - -dnl -dnl -dnl -define(`_PCC_CLASS_IMPLEMENTATION',`dnl -const Glib::Class& __CPPNAME__`'_Class::init() -{ - if(!gtype_) // create the GType if necessary - { - // Glib::Class has to know the class init function to clone custom types. - class_init_func_ = &__CPPNAME__`'_Class::class_init_function; - - // This is actually just optimized away, apparently with no harm. - // Make sure that the parent type has been created. - //CppClassParent::CppObjectType::get_type(); - - // Create the wrapper type, with the same class/instance size as the base type. - register_derived_type(_LOWER(__CCAST__)_get_type()); - - // Add derived versions of interfaces, if the C type implements any interfaces: -_IMPORT(SECTION_CC_IMPLEMENTS_INTERFACES) - } - - return *this; -} -ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl -',`dnl - -void __CPPNAME__`'_Class::class_init_function(void* g_class, void* class_data) -{ - BaseClassType *const klass = static_cast(g_class); - CppClassParent::class_init_function(klass, class_data); - -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_PCC_CLASS_INIT_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -_IMPORT(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -} -')dnl - -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_PCC_VFUNCS) -#endif //GLIBMM_VFUNCS_ENABLED - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -_IMPORT(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -') - - - -dnl -dnl -dnl -define(`_CC_CLASS_IMPLEMENTATION',`dnl -__CPPNAME__::CppClassType __CPPNAME__::`'__BASE__`'_class_; // initialize static member - -GType __CPPNAME__::get_type() -{ - return __BASE__`'_class_.init().get_type(); -} - -GType __CPPNAME__::get_base_type() -{ - return _LOWER(__CCAST__)_get_type(); -} - -_IMPORT(SECTION_CC) - -dnl _IMPORT(SECTION_CC_SIGNALPROXIES_CUSTOM) - -_IMPORT(SECTION_CC_SIGNALPROXIES) - -_IMPORT(SECTION_CC_PROPERTYPROXIES) - -#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED -_IMPORT(SECTION_CC_DEFAULT_SIGNAL_HANDLERS) -#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED - -#ifdef GLIBMM_VFUNCS_ENABLED -_IMPORT(SECTION_CC_VFUNCS) -_IMPORT(SECTION_CC_VFUNCS_CPPWRAPPER) -#endif //GLIBMM_VFUNCS_ENABLED -') - -dnl _PARENT_GCLASS_FROM_OBJECT(object_instance_name) -define(`_PARENT_GCLASS_FROM_OBJECT',`dnl -g_type_class_peek_parent`'(G_OBJECT_GET_CLASS`'($1)) // Get the parent class of the object class (The original underlying C class). -') - -dnl _IFACE_PARENT_FROM_OBJECT(object_instance_name) -define(`_IFACE_PARENT_FROM_OBJECT',`dnl -g_type_interface_peek_parent`'( // Get the parent interface of the interface (The original underlying C interface). -g_type_interface_peek`'(G_OBJECT_GET_CLASS`'($1), CppObjectType::get_type`'()) // Get the interface. -)dnl -') - -dnl Bonobo doesn't use the "typedef struct _somestruct struct" system. -define(`_STRUCT_NOT_HIDDEN',`dnl -_PUSH() -dnl Define this macro to be tested for later. -define(`__BOOL_STRUCT_NOT_HIDDEN__',`$1') -_POP() -') - -dnl _STRUCT_PROTOTYPE() -define(`_STRUCT_PROTOTYPE',`dnl -#ifndef DOXYGEN_SHOULD_SKIP_THIS -ifdef(`__BOOL_STRUCT_NOT_HIDDEN__',`dnl -',`dnl -typedef struct _`'__CNAME__ __CNAME__; -typedef struct _`'__CNAME__`'Class __CNAME__`'Class; -')dnl -#endif /* DOXYGEN_SHOULD_SKIP_THIS */ -') - -dnl _GTKMMPROC_WIN32_NO_WRAP -dnl Just process it to remove it from the generated file. -dnl generate_wrap_init.pl will look for this in the original .hg file. -dnl -define(`_GTKMMPROC_WIN32_NO_WRAP', dnl -`//This is not available in on Win32. -//This source file will not be compiled, -//and the class will not be registered in wrap_init.h or wrap_init.cc -')dnl - - diff --git a/libs/glibmm2/tools/m4/compare.m4 b/libs/glibmm2/tools/m4/compare.m4 deleted file mode 100644 index 549dc908c2..0000000000 --- a/libs/glibmm2/tools/m4/compare.m4 +++ /dev/null @@ -1,118 +0,0 @@ -dnl $Id: compare.m4 58 2003-12-14 11:53:04Z murrayc $ - -define(`__OPERATOR_DECL',`dnl -/** @relates __NAMESPACE__::__CPPNAME__ - * @param lhs The left-hand side - * @param rhs The right-hand side - * @result The result - */ -bool operator`'$1`'(const __CPPNAME__& lhs, const __CPPNAME__& rhs); -') - -define(`__OPERATOR_IMPL',`dnl -bool operator`'$1`'(const __CPPNAME__& lhs, const __CPPNAME__& rhs) -{' -ifelse`'(`__UNCONST__',`unconst',`dnl - return ($2`'(const_cast<__CNAME__*>(lhs.gobj()), const_cast<__CNAME__*>(rhs.gobj())) $3); -',`dnl else - return ($2`'(lhs.gobj(), rhs.gobj()) $3); -')`dnl endif -} -') - - -dnl -dnl _WRAP_EQUAL(gdk_region_equal, unconst) -dnl -define(`_WRAP_EQUAL',`dnl -pushdef(`__FUNC_EQUAL__',$1)dnl -pushdef(`__UNCONST__',$2)dnl -_PUSH(SECTION_HEADER3) - -__NAMESPACE_BEGIN__ - -__OPERATOR_DECL(`==') -__OPERATOR_DECL(`!=') - -__NAMESPACE_END__ - -_SECTION(SECTION_CC) - -__OPERATOR_IMPL(`==', __FUNC_EQUAL__, `!= 0') -__OPERATOR_IMPL(`!=', __FUNC_EQUAL__, `== 0') - -_POP() -popdef(`__UNCONST__')dnl -popdef(`__FUNC_EQUAL__')dnl -')dnl enddef _WRAP_EQUAL - - -dnl -dnl _WRAP_COMPARE(gtk_tree_path_compare) -dnl -define(`_WRAP_COMPARE',`dnl -pushdef(`__FUNC_COMPARE__',$1)dnl -pushdef(`__UNCONST__',$2)dnl -_PUSH(SECTION_HEADER3) - -__NAMESPACE_BEGIN__ - -__OPERATOR_DECL(`==') -__OPERATOR_DECL(`!=') -__OPERATOR_DECL(`<') -__OPERATOR_DECL(`>') -__OPERATOR_DECL(`<=') -__OPERATOR_DECL(`>=') - -__NAMESPACE_END__ - -_SECTION(SECTION_CC) - -__OPERATOR_IMPL(`==', __FUNC_COMPARE__, `== 0') -__OPERATOR_IMPL(`!=', __FUNC_COMPARE__, `!= 0') -__OPERATOR_IMPL(`<', __FUNC_COMPARE__, `< 0') -__OPERATOR_IMPL(`>', __FUNC_COMPARE__, `> 0') -__OPERATOR_IMPL(`<=', __FUNC_COMPARE__, `<= 0') -__OPERATOR_IMPL(`>=', __FUNC_COMPARE__, `>= 0') - -_POP() -popdef(`__UNCONST__')dnl -popdef(`__FUNC_COMPARE__')dnl -')dnl enddef _WRAP_COMPARE - - -dnl -dnl _WRAP_EQUAL_AND_COMPARE(gtk_text_iter_equal, gtk_text_iter_compare) -dnl -define(`_WRAP_EQUAL_AND_COMPARE',`dnl -pushdef(`__FUNC_EQUAL__',$1)dnl -pushdef(`__FUNC_COMPARE__',$2)dnl -pushdef(`__UNCONST__',$3)dnl -_PUSH(SECTION_HEADER3) - -__NAMESPACE_BEGIN__ - -__OPERATOR_DECL(`==') -__OPERATOR_DECL(`!=') -__OPERATOR_DECL(`<') -__OPERATOR_DECL(`>') -__OPERATOR_DECL(`<=') -__OPERATOR_DECL(`>=') - -__NAMESPACE_END__ - -_SECTION(SECTION_CC) - -__OPERATOR_IMPL(`==', __FUNC_EQUAL__, `!= 0') -__OPERATOR_IMPL(`!=', __FUNC_EQUAL__, `== 0') -__OPERATOR_IMPL(`<', __FUNC_COMPARE__, `< 0') -__OPERATOR_IMPL(`>', __FUNC_COMPARE__, `> 0') -__OPERATOR_IMPL(`<=', __FUNC_COMPARE__, `<= 0') -__OPERATOR_IMPL(`>=', __FUNC_COMPARE__, `>= 0') - -_POP() -popdef(`__UNCONST__')dnl -popdef(`__FUNC_COMPARE__')dnl -popdef(`__FUNC_EQUAL__')dnl -')dnl enddef _WRAP_EQUAL_AND_COMPARE - diff --git a/libs/glibmm2/tools/m4/convert.m4 b/libs/glibmm2/tools/m4/convert.m4 deleted file mode 100644 index 06b6c581bc..0000000000 --- a/libs/glibmm2/tools/m4/convert.m4 +++ /dev/null @@ -1,6 +0,0 @@ -dnl $Id: convert.m4 2 2003-01-07 16:59:16Z murrayc $ - -# Other libraries, such as libgnomeuimm, can provide their own convert.m4 files, -# Maybe choosing to include the same files as this one. - -include(convert_gtkmm.m4) diff --git a/libs/glibmm2/tools/m4/convert_atk.m4 b/libs/glibmm2/tools/m4/convert_atk.m4 deleted file mode 100644 index caea521396..0000000000 --- a/libs/glibmm2/tools/m4/convert_atk.m4 +++ /dev/null @@ -1,34 +0,0 @@ -include(convert_glib.m4) - -_EQUAL(State,AtkState) - -_CONV_ENUM(Atk,Role) -_CONV_ENUM(Atk,Layer) -_CONV_ENUM(Atk,RelationType) -_CONV_ENUM(Atk,StateType) -_CONV_ENUM(Atk,CoordType) -_CONV_ENUM(Atk,TextBoundary) - - -_CONVERSION(`AtkObject*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkObject*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkObject*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkObject*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkObject*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkObject*',`const Glib::RefPtr&',`Glib::wrap($3, true)') -_CONVERSION(`const Glib::RefPtr&',`AtkObject*',`Glib::unwrap($3)') -_CONVERSION(`const Glib::RefPtr&',`AtkObject*',`Glib::unwrap($3)') -_CONVERSION(`Glib::RefPtr',`AtkObject*',`Glib::unwrap($3)') -_CONVERSION(`Glib::RefPtr',`AtkObject*',`Glib::unwrap($3)') -_CONVERSION(`AtkRelationSet*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`const Glib::RefPtr&',`AtkRelation*',`Glib::unwrap($3)') -_CONVERSION(`AtkRelation*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkStateSet*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`const Glib::RefPtr&',`AtkStateSet*',`Glib::unwrap($3)') - -_CONVERSION(`AtkGObjectAccessible*',`Glib::RefPtr',Glib::wrap($3)) -_CONVERSION(`AtkGObjectAccessible*',`Glib::RefPtr',Glib::wrap($3)) - -_CONVERSION(`AtkAttributeSet*', `AttributeSet', `AttributeSet($3, Glib::OWNERSHIP_DEEP)') -_CONVERSION(`const AttributeSet&', `AtkAttributeSet*', `($3).data()') - diff --git a/libs/glibmm2/tools/m4/convert_base.m4 b/libs/glibmm2/tools/m4/convert_base.m4 deleted file mode 100644 index 3636b47d31..0000000000 --- a/libs/glibmm2/tools/m4/convert_base.m4 +++ /dev/null @@ -1,71 +0,0 @@ -dnl $Id: convert_base.m4 293 2006-05-16 19:49:07Z murrayc $ - -# -# Define a hashing for names -# -define(`__HASH',`__`'m4_translit(`$*',`ABCDEFGHIJKLMNOPQRSTUVWXYZ<>[]&*, ',`abcdefghijklmnopqrstuvwxyzVBNMRSC_')`'') -define(`__EQUIV',`m4_ifdef(EV`'__HASH(`$1'),EV`'__HASH(`$1'),`$1')') - -define(`__HASH2',`dnl -pushdef(`__E1',__EQUIV(`$1'))pushdef(`__E2',__EQUIV(`$2'))dnl -m4_ifelse(__E1,__E2,`__EQ',__HASH(__E1)`'__HASH(__E2))`'dnl -popdef(`__E1')popdef(`__E2')`'') - -define(`CF__EQ',`$3') - -# -# _CONVERT(fromtype, totype, name, wrap_line) -# Print the conversion from ctype to cpptype -define(`_CONVERT',`dnl -m4_ifelse(`$2',void,`$3',`dnl -pushdef(`__COV',`CF`'__HASH2(`$1',`$2')')dnl -m4_ifdef(__COV,`m4_indir(__COV,`$1',`$2',`$3')',` -m4_errprint(`No conversion from $1 to $2 defined (line: $4, parameter name: $3) -') -m4_m4exit(1) -')`'dnl -')`'dnl -') - - -# -# Functions for populating the tables. -# -define(`_CONVERSION',` -m4_ifelse(`$3',,,`define(CF`'__HASH2(`$1',`$2'),`$3')') -') - -define(`_EQUAL',`define(EV`'__HASH(`$1'),`$2')') - -/*******************************************************************/ - - -define(`__ARG3__',`$`'3') -define(`_CONV_ENUM',`dnl -_CONVERSION(`$1$2', `$2', (($2)(__ARG3__))) -_CONVERSION(`$1$2', `$1::$2', (($1::$2)(__ARG3__))) -_CONVERSION(`$2', `$1$2', (($1$2)(__ARG3__))) -_CONVERSION(`$1::$2', `$1$2', (($1$2)(__ARG3__))) -')dnl - -# e.g. Glib::RefPtr to GdkSomething* -define(`__CONVERT_REFPTR_TO_P',`Glib::unwrap($`'3)') - -# e.g. Glib::RefPtr to GdkSomething* -#define(`__CONVERT_CONST_REFPTR_TO_P',`const_cast<$`'2>($`'3->gobj())') -define(`__CONVERT_CONST_REFPTR_TO_P',`const_cast<$`'2>(Glib::unwrap($`'3))') - -# The Sun Forte compiler doesn't seem to be able to handle these, so we are using the altlernative, __CONVERT_CONST_REFPTR_TO_P_SUN. -# The Sun compiler gives this error, for instance: -#  "widget.cc", line 4463: Error: Overloading ambiguity between "Glib::unwrap(const Glib::RefPtr&)" and -# "Glib::unwrap(const Glib::RefPtr&)". -# -define(`__CONVERT_CONST_REFPTR_TO_P_SUN',`const_cast<$`'2>(Glib::unwrap<$1>($`'3))') - - -include(convert_gtk.m4) -include(convert_pango.m4) -include(convert_gdk.m4) -include(convert_atk.m4) -include(convert_glib.m4) - diff --git a/libs/glibmm2/tools/m4/convert_gdk.m4 b/libs/glibmm2/tools/m4/convert_gdk.m4 deleted file mode 100644 index 30bbb829f5..0000000000 --- a/libs/glibmm2/tools/m4/convert_gdk.m4 +++ /dev/null @@ -1,231 +0,0 @@ -include(convert_glib.m4) - -_EQUAL(gint8[],gint8*) -_EQUAL(guchar,guint8) -_EQUAL(guchar*,guint8*) -_EQUAL(gfloat,float) - -# Enums -_CONV_ENUM(Gdk,AxisUse) -_CONV_ENUM(Gdk,ByteOrder) -_CONV_ENUM(Gdk,CapStyle) -_CONV_ENUM(Gdk,Colorspace) -_CONV_ENUM(Gdk,CursorType) -_CONV_ENUM(Gdk,DragAction) -_CONV_ENUM(Gdk,DragProtocol) -_CONV_ENUM(Gdk,EventMask) -_CONV_ENUM(Gdk,EventType) -_CONV_ENUM(Gdk,ExtensionMode) -_CONV_ENUM(Gdk,Fill) -_CONV_ENUM(Gdk,FillRule) -_CONV_ENUM(Gdk,Function) -_CONV_ENUM(Gdk,GCValuesMask) -_CONV_ENUM(Gdk,Gravity) -_CONV_ENUM(Gdk,ImageType) -_CONV_ENUM(Gdk,InputCondition) -_CONV_ENUM(Gdk,InputMode) -_CONV_ENUM(Gdk,InterpType) -_CONV_ENUM(Gdk,JoinStyle) -_CONV_ENUM(Gdk,LineStyle) -_CONV_ENUM(Gdk,ModifierType) -_CONV_ENUM(Gdk,OverlapType) -_CONV_ENUM(Gdk,PixbufAlphaMode) -_CONV_ENUM(Gdk,RgbDither) -_CONV_ENUM(Gdk,Status) -_CONV_ENUM(Gdk,SubwindowMode) -_CONV_ENUM(Gdk,VisualType) -_CONV_ENUM(Gdk,WindowAttributesType) -_CONV_ENUM(Gdk,WindowEdge) -_CONV_ENUM(Gdk,WindowHints) -_CONV_ENUM(Gdk,WindowState) -_CONV_ENUM(Gdk,WindowType) -_CONV_ENUM(Gdk,WindowTypeHint) -_CONV_ENUM(Gdk,WMDecoration) -_CONV_ENUM(Gdk,WMFunction) -_CONV_ENUM(Gdk,GrabStatus) - - -_CONVERSION(`Gdk::EventMask',`gint',`$3') -_CONVERSION(`gint',`Gdk::EventMask',`static_cast($3)') -_CONVERSION(`ModifierType&',`GdkModifierType*',`(($2) &($3))') -_CONVERSION(`WMDecoration&',`GdkWMDecoration*',`(($2) &($3))') -_CONVERSION(`GdkDragProtocol&',`GdkDragProtocol*',`&($3)') - -_CONVERSION(`GdkRectangle&',`GdkRectangle*',`&$3',`*$3') -_CONVERSION(`GdkRgbCmap&',`GdkRgbCmap*',`&$3',`*$3') - -# TODO: Remove this, and use Gdk::Device: -_CONVERSION(`GdkDevice*',`const GdkDevice*',`$3') - -_CONVERSION(`GdkKeymap*',`const GdkKeymap*',`$3') - - - - -# for GtkStyle public struct members -_CONVERSION(`Gdk::Color',`GdkColor', `(*($3).gobj())') -_CONVERSION(`GdkColor',`Gdk::Color', `Gdk::Color(const_cast(&($3)), true)') - -# Ref (gdkmm) -> Ptr (gtk+) -_CONVERSION(`Color&',`GdkColor*',($3).gobj()) -_CONVERSION(`Rectangle&',`GdkRectangle*',($3).gobj()) -_CONVERSION(`Gdk::Rectangle&',`GdkRectangle*',($3).gobj()) -_CONVERSION(`Font&',`GdkFont*',($3).gobj()) -_CONVERSION(`Region&',`GdkRegion*',($3).gobj()) - -_CONVERSION(`const Glib::RefPtr&',`GdkColormap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixmap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkWindow*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkWindow*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixmap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixmap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkBitmap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkBitmap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkColormap*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkColormap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Colormap)) -_CONVERSION(`const Glib::RefPtr&',`GdkGC*',`Glib::unwrap($3)') -_CONVERSION(`const Glib::RefPtr&',`GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(GC)) -_CONVERSION(`const Glib::RefPtr&',`GdkGC*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkDrawable*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable)) -_CONVERSION(`const Glib::RefPtr&',`GdkImage*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image)) -_CONVERSION(`const Glib::RefPtr&',`GdkImage*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixbuf*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pixbuf)) -_CONVERSION(`const Glib::RefPtr&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`Glib::RefPtr',`GdkPixbuf*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixbufAnimation*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkPixbufAnimationIter*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkDragContext*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkDisplay*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkScreen*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkDisplay*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GdkScreen*',__CONVERT_REFPTR_TO_P) - - - -define(`__CFR2P',`const_cast<$`'2>($`'3.gobj())') -_CONVERSION(const Font&,GdkFont*,__CFR2P) -_CONVERSION(const Gdk::Color&,GdkColor*,__CFR2P) -_CONVERSION(const Color&,GdkColor*,__CFR2P) -_CONVERSION(const Gdk::Rectangle&,GdkRectangle*,__CFR2P) -_CONVERSION(const Rectangle&,GdkRectangle*,__CFR2P) -_CONVERSION(const Gdk::Geometry&,GdkGeometry*,const_cast<$2>(&($3))) -_CONVERSION(const Geometry&,GdkGeometry*,const_cast<$2>(&($3))) -_CONVERSION(const RgbCmap&,GdkRgbCmap*,__CFR2P) - -_CONVERSION(`Gdk::Rectangle*',`GdkRectangle*',`Glib::unwrap($3)') -_CONVERSION(`const Gdk::Rectangle*',`GdkRectangle*',`Glib::unwrap(const_cast($3))') -_CONVERSION(`GdkRectangle*',`Gdk::Rectangle*',`&Glib::wrap($3)') -_CONVERSION(`GdkRectangle*',`const Gdk::Rectangle*',`&Glib::wrap($3)') -_CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)') - - -dnl TODO: Should this always be a copy? -_CONVERSION(const Cursor&,GdkCursor*,($3).gobj_copy()) - -# Special treatment for the Sun Forte compiler -#_CONVERSION(const Glib::RefPtr&,GdkPixmap*,__CONVERT_CONST_REFPTR_TO_P) -#_CONVERSION(const Glib::RefPtr&,GdkWindow*,__CONVERT_CONST_REFPTR_TO_P) -#_CONVERSION(const Glib::RefPtr&,GdkColormap*,__CONVERT_CONST_REFPTR_TO_P) -#_CONVERSION(const Glib::RefPtr&,GdkVisual*,__CONVERT_CONST_REFPTR_TO_P) -#_CONVERSION(const Glib::RefPtr&,GdkBitmap*,__CONVERT_CONST_REFPTR_TO_P) -#_CONVERSION(const Glib::RefPtr&,GdkImage*,__CONVERT_CONST_REFPTR_TO_P) -#_CONVERSION(const Glib::RefPtr&,GdkGC*,__CONVERT_CONST_REFPTR_TO_P) - -_CONVERSION(`const Glib::RefPtr&', `GdkPixmap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Pixmap)) -_CONVERSION(`const Glib::RefPtr&', `GdkWindow*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Window)) -_CONVERSION(`const Glib::RefPtr&', `GdkWindow*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Window)) -_CONVERSION(`const Glib::RefPtr&', `GdkColormap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Colormap)) -_CONVERSION(`const Glib::RefPtr&', `GdkVisual*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Visual)) -_CONVERSION(`const Glib::RefPtr&', `GdkBitmap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Bitmap)) -_CONVERSION(`const Glib::RefPtr&', `GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Image)) -_CONVERSION(`const Glib::RefPtr&', `GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image)) -_CONVERSION(`const Glib::RefPtr&', `GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::GC)) -_CONVERSION(`const Glib::RefPtr&', `GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(GC)) -#_CONVERSION(`const Glib::RefPtr&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Drawable)) -#_CONVERSION(`const Glib::RefPtr&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable)) -#_CONVERSION(`const Glib::RefPtr&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable)) - - -_CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') -_CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') -_CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') -_CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') -_CONVERSION(`GdkWindow*',`const Glib::RefPtr&', `Glib::wrap((GdkWindowObject*)($3), true)') -_CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') -_CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') -_CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') -_CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') -_CONVERSION(`GdkColormap*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkColormap*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkColormap*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkVisual*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkVisual*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkVisual*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkImage*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkPixbuf*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkPixbuf*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkPixbufAnimationIter*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkPixbuf*',`Glib::RefPtr', Glib::wrap($3)) -_CONVERSION(`GdkPixbufAnimation*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkGC*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkGC*',`Glib::RefPtr', `Glib::wrap($3)') - -_CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') - -_CONVERSION(`GdkDisplayManager*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkDisplayManager*',`Glib::RefPtr', `Glib::wrap($3)') - -_CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') - -_CONVERSION(`GdkDevice*',`Glib::RefPtr', `Glib::wrap($3)') -_CONVERSION(`GdkDevice*',`Glib::RefPtr', `Glib::wrap($3)') - - - - - - - -# Glib::ListHandle<> (gdkmm) -> GList (gdk) -_CONVERSION(`const Glib::ListHandle< Glib::RefPtr >&',`GList*',`$3.data()') - -# GList (gdk) -> Glib::ListHandle<> (gdkmm) -_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') -_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_DEEP)') -_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') -_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') -_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') - - - - -# XPM data -_CONVERSION(`const char*const*',`const char**',`const_cast($3)',`$3') - - -_CONVERSION(GdkFont*, Gdk::Font, `Gdk::Font($3)') -_CONVERSION(GdkEvent*, Event, `Event($3)') -_CONVERSION(GdkRegion*, Region, `Region($3)') - -_CONVERSION(`GdkTimeCoord**&',`GdkTimeCoord***',`&($3)') - -dnl _CONVERSION(GdkPixmap*,Gdk::Pixmap&,`Glib::unwrap_boxed($3)',`$3') -dnl _CONVERSION(GdkBitmap*,Gdk::Bitmap&,`Glib::unwrap_boxed($3)',`$3') - - - -# Used by signals: -_CONVERSION(`GdkDragContext*',`const Glib::RefPtr&',Glib::wrap($3, true)) -_CONVERSION(`GdkPixbuf*',`const Glib::RefPtr&', Glib::wrap($3, true)) -_CONVERSION(`GdkDragContext*',`Glib::RefPtr',Glib::wrap($3, true)) -_CONVERSION(`GdkDisplay*',`const Glib::RefPtr&', Glib::wrap($3, true)) - diff --git a/libs/glibmm2/tools/m4/convert_glib.m4 b/libs/glibmm2/tools/m4/convert_glib.m4 deleted file mode 100644 index 20d29095be..0000000000 --- a/libs/glibmm2/tools/m4/convert_glib.m4 +++ /dev/null @@ -1,69 +0,0 @@ -dnl -dnl Glib C names have prefix 'G' but C++ namespace Glib -dnl -define(`_CONV_GLIB_ENUM',`dnl -_CONVERSION(`G$1', `$1', (($1)(__ARG3__))) -_CONVERSION(`G$1', `Glib::$1', ((Glib::$1)(__ARG3__))) -_CONVERSION(`$1', `G$1', ((G$1)(__ARG3__))) -_CONVERSION(`Glib::$1', `G$1', ((G$1)(__ARG3__))) -')dnl - -_EQUAL(gchar,char) -_EQUAL(gchar*,char*) -_EQUAL(gchar**,char**) -_EQUAL(gint**,int**) -_EQUAL(gchar**,char*[]) -_EQUAL(const gchar*,const char*) -_EQUAL(const-gchar*,const char*) -_EQUAL(gpointer*,void**) - -_CONV_GLIB_ENUM(IOStatus) -_CONV_GLIB_ENUM(IOFlags) -_CONV_GLIB_ENUM(IOCondition) -_CONV_GLIB_ENUM(SeekType) -_CONV_GLIB_ENUM(OptionArg) -_CONV_GLIB_ENUM(KeyFileFlags) -_CONV_GLIB_ENUM(RegexCompileFlags) -_CONV_GLIB_ENUM(RegexMatchFlags) - -_CONVERSION(`gunichar&',`gunichar*',`&($3)') -_CONVERSION(`gsize&',`gsize*',`&($3)') - - -# Strings: -define(`__GCHARP_TO_USTRING',`Glib::convert_const_gchar_ptr_to_ustring($`'3)') -define(`__GCHARP_TO_STDSTRING',`Glib::convert_const_gchar_ptr_to_stdstring($`'3)') - -_CONVERSION(`const Glib::ustring&',`const char*',`$3.c_str()') -_CONVERSION(`const std::string&',`const char*',`$3.c_str()') -_CONVERSION(`const Glib::ustring&',`gchar*',`const_cast($3.c_str())') -_CONVERSION(`gchar*',`Glib::ustring',__GCHARP_TO_USTRING) -_CONVERSION(`const-gchar*',`Glib::ustring',__GCHARP_TO_USTRING) -_CONVERSION(`const gchar*',`Glib::ustring',__GCHARP_TO_USTRING) -_CONVERSION(`const char*',`Glib::ustring',__GCHARP_TO_USTRING) -_CONVERSION(`const char*',`std::string',__GCHARP_TO_STDSTRING) -_CONVERSION(`const gchar*',`const Glib::ustring&',__GCHARP_TO_USTRING) -_CONVERSION(`const char*',`const-gchar*',`$3') -_CONVERSION(`const-gchar*',`const char*',`$3') - -_CONVERSION(`return-gchar*',`Glib::ustring',`Glib::convert_return_gchar_ptr_to_ustring($3)') -_CONVERSION(`return-gchar*',`std::string',`Glib::convert_return_gchar_ptr_to_stdstring($3)') -_CONVERSION(`return-char*',`Glib::ustring',`Glib::convert_return_gchar_ptr_to_ustring($3)') - -_CONVERSION(`const Glib::RefPtr&',`GObject*',__CONVERT_REFPTR_TO_P) -_CONVERSION(`const Glib::RefPtr&',`GObject*',__CONVERT_CONST_REFPTR_TO_P_SUN(Glib::Object)) -_CONVERSION(`GObject*',`Glib::RefPtr',`Glib::wrap($3)') -_CONVERSION(`GObject*',`Glib::RefPtr',`Glib::wrap($3)') - -_CONVERSION(`GRegex*',`Glib::RefPtr',`Glib::wrap($3)') -_CONVERSION(`GRegex*',`Glib::RefPtr',`Glib::wrap($3)') - -_CONVERSION(`Glib::ValueBase&',`GValue*',`($3).gobj()') -_CONVERSION(`const Glib::ValueBase&',`const GValue*',`($3).gobj()') -_CONVERSION(`const Glib::ValueBase&',`GValue*',`const_cast(($3).gobj())') -_CONVERSION(`GValue*', `Glib::ValueBase&', `*reinterpret_cast($3)') -_CONVERSION(`const GValue*', `const Glib::ValueBase&', `*reinterpret_cast($3)') - -_CONVERSION(`OptionGroup&',`GOptionGroup*',`($3).gobj()') -#_CONVERSION(`GOptionGroup*',`OptionGroup',`Glib::wrap(($3), true /* take_copy */)') - diff --git a/libs/glibmm2/tools/m4/convert_gtk.m4 b/libs/glibmm2/tools/m4/convert_gtk.m4 deleted file mode 100644 index 7e6347c291..0000000000 --- a/libs/glibmm2/tools/m4/convert_gtk.m4 +++ /dev/null @@ -1,394 +0,0 @@ -dnl $Id: convert_gtk.m4 35 2003-05-02 16:07:24Z murrayc $ - -include(convert_glib.m4) - -# -# Table of widgets -# - -_EQUAL(gboolean,int) -_EQUAL(gint,int) -_EQUAL(gint*,int*) -_EQUAL(gint&,int&) -_EQUAL(guint,unsigned int) -_EQUAL(guint*,unsigned int*) -_EQUAL(guint&,unsigned int&) -_EQUAL(gdouble,double) -_EQUAL(gdouble*,double*) -_EQUAL(gfloat, float) -_EQUAL(float*,gfloat[]) - -_EQUAL(GdkAtom,Gdk::Atom) -_EQUAL(const-char*,const-gchar*) -_EQUAL(return-char*,return-gchar*) -_EQUAL(gpointer,void*) -_EQUAL(gconstpointer,const void*) -# -# Basic Types -_CONVERSION(`int',`bool',`$3') -_CONVERSION(`bool',`int',`static_cast($3)') -_CONVERSION(`unsigned int',`bool',`$3') -_CONVERSION(`bool',`unsigned int',`static_cast($3)') -_CONVERSION(`int&',`gint*',`&($3)') -_CONVERSION(`gint*',`int&',`*($3)') -_CONVERSION(`guint&',`guint*',`&($3)') -_CONVERSION(`double&',`gdouble*',`&($3)') -_CONVERSION(`float&',`gfloat*',`&($3)') -_CONVERSION(`gchar**',`char**',`$3') -_CONVERSION(`char**',`gchar**',`$3') -_CONVERSION(`gpointer&',`gpointer*',`&($3)') -_CONVERSION(`void*&',`gpointer*',`&($3)') - -_CONVERSION(`GError*&',`GError**',`&($3)') - - - -# Enums: -_CONV_ENUM(Gtk,AccelFlags) -_CONV_ENUM(Gtk,ArrowType) -_CONV_ENUM(Gtk,AttachOptions) -_CONV_ENUM(Gtk,ButtonBoxStyle) -_CONV_ENUM(Gtk,ButtonsType) -_CONV_ENUM(Gtk,CalendarDisplayOptions) -_CONV_ENUM(Gtk,CellRendererMode) -_CONV_ENUM(Gtk,CellRendererState) -_CONV_ENUM(Gtk,CornerType) -_CONV_ENUM(Gtk,CurveType) -_CONV_ENUM(Gtk,DeleteType) -_CONV_ENUM(Gtk,DestDefaults) -_CONV_ENUM(Gtk,DirectionType) -_CONV_ENUM(Gtk,ExpanderStyle) -_CONV_ENUM(Gtk,ImageType) -_CONV_ENUM(Gtk,Justification) -_CONV_ENUM(Gtk,MenuDirectionType) -_CONV_ENUM(Gtk,MessageType) -_CONV_ENUM(Gtk,MetricType) -_CONV_ENUM(Gtk,MovementStep) -_CONV_ENUM(Gtk,NotebookTab) -_CONV_ENUM(Gtk,Orientation) -_CONV_ENUM(Gtk,PackType) -_CONV_ENUM(Gtk,PolicyType) -_CONV_ENUM(Gtk,PositionType) -_CONV_ENUM(Gtk,PreviewType) -_CONV_ENUM(Gtk,ProgressBarOrientation) -_CONV_ENUM(Gtk,ProgressBarStyle) -_CONV_ENUM(Gtk,ReliefStyle) -_CONV_ENUM(Gtk,ResizeMode) -_CONV_ENUM(Gtk,ScrollType) -_CONV_ENUM(Gtk,SelectionMode) -_CONV_ENUM(Gtk,ShadowType) -_CONV_ENUM(Gtk,SizeGroupMode) -_CONV_ENUM(Gtk,SortType) -_CONV_ENUM(Gtk,SpinButtonUpdatePolicy) -_CONV_ENUM(Gtk,SpinType) -_CONV_ENUM(Gtk,StateType) -_CONV_ENUM(Gtk,TextDirection) -_CONV_ENUM(Gtk,TextSearchFlags) -_CONV_ENUM(Gtk,TextWindowType) -_CONV_ENUM(Gtk,ToolbarChildType) -_CONV_ENUM(Gtk,ToolbarStyle) -_CONV_ENUM(Gtk,TreeModelFlags) -_CONV_ENUM(Gtk,TreeViewColumnSizing) -_CONV_ENUM(Gtk,TreeViewDropPosition) -_CONV_ENUM(Gtk,UpdateType) -_CONV_ENUM(Gtk,Visibility) -_CONV_ENUM(Gtk,WidgetHelpType) -_CONV_ENUM(Gtk,WindowPosition) -_CONV_ENUM(Gtk,WindowType) -_CONV_ENUM(Gtk,WrapMode) - -_CONVERSION(`GtkIconSize',`IconSize',`IconSize(static_cast($3))') -_CONVERSION(`GtkIconSize',`Gtk::IconSize',`Gtk::IconSize(static_cast($3))') -_CONVERSION(`IconSize',`GtkIconSize',`static_cast(int($3))') -_CONVERSION(`Gtk::IconSize',`GtkIconSize',`static_cast(int($3))') -include(convert_atk.m4) -include(convert_pango.m4) -include(convert_gdk.m4) - -_CONVERSION(`guint',`WindowType',`static_cast($3)') -_CONVERSION(`PolicyType&',`GtkPolicyType*',`(($2) &($3))') -_CONVERSION(`SortType&',`GtkSortType*',`(($2) &($3))') -_CONVERSION(`SortType*',`GtkSortType*',`(($2) ($3))') -_CONVERSION(`GtkSortType*',`SortType*',`(($2) ($3))') -_CONVERSION(`guint8',`Gtk::StateType',`static_cast($3)') - - - -# StockID: -_CONVERSION(`const Gtk::StockID&',`const char*',`($3).get_c_str()') -_CONVERSION(`char*',`StockID',`StockID($3)') # the StockID ctor handles 0 - -# -# Ptr (gtk+) -> Ptr (gtkmm) -define(`__FP2P',`($`'2)Glib::unwrap($`'3)') -define(`__RP2P',`Glib::wrap($`'3)') -define(`__RP2PD',`Glib::wrap((tran`'slit($`'2,:,))($`'3))') -define(`__RP2CPD',`Glib::wrap((tran`'slit(pat`'subst($`'2,^const ,),:,))($`'3))') - -_CONVERSION(`GtkAdjustment*',`Gtk::Adjustment*',__RP2P) -_CONVERSION(`GtkAdjustment*',`Adjustment*',__RP2P) -_CONVERSION(`GtkWidget*',`Gtk::Widget*',__RP2P) -_CONVERSION(`GtkWidget*',`Widget*',__RP2P) -_CONVERSION(`GtkWindow*',`Window*',__RP2P) -_CONVERSION(`GtkMenu*',`Menu*',__RP2P) - -# Ptr (gtk+) -> const Ptr (gtkmm) -_CONVERSION(`GtkAdjustment*',`const Gtk::Adjustment*',__RP2P) -_CONVERSION(`GtkAdjustment*',`const Adjustment*',__RP2P) -_CONVERSION(`GtkWidget*',`const Gtk::Widget*',__RP2P) -_CONVERSION(`GtkWidget*',`const Widget*',__RP2P) -_CONVERSION(`GtkWindow*',`const Window*',__RP2P) - -# Style: -_CONVERSION(`GtkStyle*',`Glib::RefPtr