glib2 0.90.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3115 -0
- data/README +40 -0
- data/Rakefile +69 -0
- data/ext/glib2/depend +10 -0
- data/ext/glib2/extconf.rb +61 -0
- data/ext/glib2/glib2.def +89 -0
- data/ext/glib2/rbgcompat.h +30 -0
- data/ext/glib2/rbglib.c +330 -0
- data/ext/glib2/rbglib.h +96 -0
- data/ext/glib2/rbglib_bookmarkfile.c +595 -0
- data/ext/glib2/rbglib_completion.c +192 -0
- data/ext/glib2/rbglib_convert.c +195 -0
- data/ext/glib2/rbglib_error.c +95 -0
- data/ext/glib2/rbglib_fileutils.c +83 -0
- data/ext/glib2/rbglib_i18n.c +44 -0
- data/ext/glib2/rbglib_int64.c +157 -0
- data/ext/glib2/rbglib_iochannel.c +883 -0
- data/ext/glib2/rbglib_keyfile.c +846 -0
- data/ext/glib2/rbglib_maincontext.c +915 -0
- data/ext/glib2/rbglib_mainloop.c +87 -0
- data/ext/glib2/rbglib_messages.c +150 -0
- data/ext/glib2/rbglib_pollfd.c +111 -0
- data/ext/glib2/rbglib_shell.c +68 -0
- data/ext/glib2/rbglib_source.c +190 -0
- data/ext/glib2/rbglib_spawn.c +345 -0
- data/ext/glib2/rbglib_threads.c +51 -0
- data/ext/glib2/rbglib_timer.c +127 -0
- data/ext/glib2/rbglib_unicode.c +611 -0
- data/ext/glib2/rbglib_utils.c +386 -0
- data/ext/glib2/rbglib_win32.c +136 -0
- data/ext/glib2/rbgobj_boxed.c +251 -0
- data/ext/glib2/rbgobj_closure.c +337 -0
- data/ext/glib2/rbgobj_convert.c +167 -0
- data/ext/glib2/rbgobj_enums.c +961 -0
- data/ext/glib2/rbgobj_fundamental.c +30 -0
- data/ext/glib2/rbgobj_object.c +892 -0
- data/ext/glib2/rbgobj_param.c +390 -0
- data/ext/glib2/rbgobj_paramspecs.c +305 -0
- data/ext/glib2/rbgobj_signal.c +963 -0
- data/ext/glib2/rbgobj_strv.c +61 -0
- data/ext/glib2/rbgobj_type.c +851 -0
- data/ext/glib2/rbgobj_typeinstance.c +121 -0
- data/ext/glib2/rbgobj_typeinterface.c +148 -0
- data/ext/glib2/rbgobj_typemodule.c +66 -0
- data/ext/glib2/rbgobj_typeplugin.c +49 -0
- data/ext/glib2/rbgobj_value.c +313 -0
- data/ext/glib2/rbgobj_valuearray.c +59 -0
- data/ext/glib2/rbgobj_valuetypes.c +298 -0
- data/ext/glib2/rbgobject.c +406 -0
- data/ext/glib2/rbgobject.h +265 -0
- data/ext/glib2/rbgprivate.h +88 -0
- data/ext/glib2/rbgutil.c +316 -0
- data/ext/glib2/rbgutil.h +82 -0
- data/ext/glib2/rbgutil_callback.c +231 -0
- data/extconf.rb +49 -0
- data/lib/1.8/glib2.so +0 -0
- data/lib/1.9/glib2.so +0 -0
- data/lib/glib-mkenums.rb +199 -0
- data/lib/glib2.rb +239 -0
- data/lib/gnome2-win32-binary-downloader.rb +92 -0
- data/lib/mkmf-gnome2.rb +377 -0
- data/sample/bookmarkfile.rb +66 -0
- data/sample/completion.rb +45 -0
- data/sample/idle.rb +41 -0
- data/sample/iochannel.rb +44 -0
- data/sample/keyfile.rb +62 -0
- data/sample/shell.rb +36 -0
- data/sample/spawn.rb +25 -0
- data/sample/timeout.rb +28 -0
- data/sample/timeout2.rb +35 -0
- data/sample/timer.rb +40 -0
- data/sample/type-register.rb +103 -0
- data/sample/type-register2.rb +104 -0
- data/sample/utils.rb +54 -0
- data/test/glib-test-init.rb +6 -0
- data/test/glib-test-utils.rb +12 -0
- data/test/run-test.rb +21 -0
- data/test/test_enum.rb +99 -0
- data/test/test_file_utils.rb +15 -0
- data/test/test_glib2.rb +120 -0
- data/test/test_iochannel.rb +275 -0
- data/test/test_key_file.rb +38 -0
- data/test/test_mkenums.rb +25 -0
- data/test/test_signal.rb +20 -0
- data/test/test_timeout.rb +28 -0
- data/test/test_unicode.rb +369 -0
- data/test/test_utils.rb +37 -0
- data/test/test_win32.rb +13 -0
- data/test-unit/COPYING +56 -0
- data/test-unit/GPL +340 -0
- data/test-unit/History.txt +232 -0
- data/test-unit/Manifest.txt +110 -0
- data/test-unit/PSFL +271 -0
- data/test-unit/README.txt +75 -0
- data/test-unit/Rakefile +53 -0
- data/test-unit/TODO +5 -0
- data/test-unit/bin/testrb +5 -0
- data/test-unit/html/bar.png +0 -0
- data/test-unit/html/bar.svg +153 -0
- data/test-unit/html/developer.png +0 -0
- data/test-unit/html/developer.svg +469 -0
- data/test-unit/html/famfamfam-logo.png +0 -0
- data/test-unit/html/favicon.ico +0 -0
- data/test-unit/html/favicon.png +0 -0
- data/test-unit/html/favicon.svg +82 -0
- data/test-unit/html/heading-mark.png +0 -0
- data/test-unit/html/heading-mark.svg +393 -0
- data/test-unit/html/index.html +247 -0
- data/test-unit/html/index.html.ja +270 -0
- data/test-unit/html/install.png +0 -0
- data/test-unit/html/install.svg +636 -0
- data/test-unit/html/jp.png +0 -0
- data/test-unit/html/kinotan-failure.png +0 -0
- data/test-unit/html/kinotan-pass.png +0 -0
- data/test-unit/html/logo.png +0 -0
- data/test-unit/html/logo.svg +483 -0
- data/test-unit/html/reference.png +0 -0
- data/test-unit/html/rubyforge.png +0 -0
- data/test-unit/html/tango-logo.png +0 -0
- data/test-unit/html/test-unit.css +339 -0
- data/test-unit/html/tutorial.png +0 -0
- data/test-unit/html/tutorial.svg +559 -0
- data/test-unit/html/us.png +0 -0
- data/test-unit/images/color-diff.png +0 -0
- data/test-unit/lib/test/unit/assertionfailederror.rb +25 -0
- data/test-unit/lib/test/unit/assertions.rb +1334 -0
- data/test-unit/lib/test/unit/attribute.rb +125 -0
- data/test-unit/lib/test/unit/autorunner.rb +363 -0
- data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
- data/test-unit/lib/test/unit/collector/dir.rb +108 -0
- data/test-unit/lib/test/unit/collector/load.rb +144 -0
- data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
- data/test-unit/lib/test/unit/collector.rb +36 -0
- data/test-unit/lib/test/unit/color-scheme.rb +106 -0
- data/test-unit/lib/test/unit/color.rb +96 -0
- data/test-unit/lib/test/unit/diff.rb +740 -0
- data/test-unit/lib/test/unit/error.rb +130 -0
- data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
- data/test-unit/lib/test/unit/failure.rb +136 -0
- data/test-unit/lib/test/unit/fixture.rb +176 -0
- data/test-unit/lib/test/unit/notification.rb +129 -0
- data/test-unit/lib/test/unit/omission.rb +191 -0
- data/test-unit/lib/test/unit/pending.rb +150 -0
- data/test-unit/lib/test/unit/priority.rb +180 -0
- data/test-unit/lib/test/unit/runner/console.rb +52 -0
- data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
- data/test-unit/lib/test/unit/runner/tap.rb +8 -0
- data/test-unit/lib/test/unit/testcase.rb +483 -0
- data/test-unit/lib/test/unit/testresult.rb +121 -0
- data/test-unit/lib/test/unit/testsuite.rb +110 -0
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +430 -0
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +63 -0
- data/test-unit/lib/test/unit/ui/tap/testrunner.rb +82 -0
- data/test-unit/lib/test/unit/ui/testrunner.rb +53 -0
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/test-unit/lib/test/unit/util/backtracefilter.rb +42 -0
- data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/test-unit/lib/test/unit/util/observable.rb +90 -0
- data/test-unit/lib/test/unit/util/output.rb +31 -0
- data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
- data/test-unit/lib/test/unit/version.rb +7 -0
- data/test-unit/lib/test/unit.rb +328 -0
- data/test-unit/sample/adder.rb +13 -0
- data/test-unit/sample/subtracter.rb +12 -0
- data/test-unit/sample/test_adder.rb +20 -0
- data/test-unit/sample/test_subtracter.rb +20 -0
- data/test-unit/sample/test_user.rb +23 -0
- data/test-unit/test/collector/test-descendant.rb +133 -0
- data/test-unit/test/collector/test-load.rb +442 -0
- data/test-unit/test/collector/test_dir.rb +406 -0
- data/test-unit/test/collector/test_objectspace.rb +100 -0
- data/test-unit/test/run-test.rb +15 -0
- data/test-unit/test/test-attribute.rb +86 -0
- data/test-unit/test/test-color-scheme.rb +69 -0
- data/test-unit/test/test-color.rb +47 -0
- data/test-unit/test/test-diff.rb +518 -0
- data/test-unit/test/test-emacs-runner.rb +60 -0
- data/test-unit/test/test-fixture.rb +287 -0
- data/test-unit/test/test-notification.rb +33 -0
- data/test-unit/test/test-omission.rb +81 -0
- data/test-unit/test/test-pending.rb +70 -0
- data/test-unit/test/test-priority.rb +119 -0
- data/test-unit/test/test-testcase.rb +544 -0
- data/test-unit/test/test_assertions.rb +1197 -0
- data/test-unit/test/test_error.rb +26 -0
- data/test-unit/test/test_failure.rb +33 -0
- data/test-unit/test/test_testresult.rb +113 -0
- data/test-unit/test/test_testsuite.rb +129 -0
- data/test-unit/test/testunit-test-util.rb +14 -0
- data/test-unit/test/ui/test_tap.rb +33 -0
- data/test-unit/test/ui/test_testrunmediator.rb +20 -0
- data/test-unit/test/util/test-method-owner-finder.rb +38 -0
- data/test-unit/test/util/test-output.rb +11 -0
- data/test-unit/test/util/test_backtracefilter.rb +41 -0
- data/test-unit/test/util/test_observable.rb +102 -0
- data/test-unit/test/util/test_procwrapper.rb +36 -0
- data/vendor/local/bin/envsubst.exe +0 -0
- data/vendor/local/bin/gettext.exe +0 -0
- data/vendor/local/bin/gettext.sh +123 -0
- data/vendor/local/bin/glib-genmarshal.exe +0 -0
- data/vendor/local/bin/glib-gettextize +188 -0
- data/vendor/local/bin/glib-mkenums +511 -0
- data/vendor/local/bin/gobject-query.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
- data/vendor/local/bin/intl.dll +0 -0
- data/vendor/local/bin/libasprintf-0.dll +0 -0
- data/vendor/local/bin/libgcc_s_dw2-1.dll +0 -0
- data/vendor/local/bin/libgio-2.0-0.dll +0 -0
- data/vendor/local/bin/libglib-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
- data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
- data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
- data/vendor/local/bin/ngettext.exe +0 -0
- data/vendor/local/include/autosprintf.h +66 -0
- data/vendor/local/include/glib-2.0/gio/gappinfo.h +237 -0
- data/vendor/local/include/glib-2.0/gio/gasyncinitable.h +119 -0
- data/vendor/local/include/glib-2.0/gio/gasyncresult.h +73 -0
- data/vendor/local/include/glib-2.0/gio/gbufferedinputstream.h +123 -0
- data/vendor/local/include/glib-2.0/gio/gbufferedoutputstream.h +82 -0
- data/vendor/local/include/glib-2.0/gio/gcancellable.h +103 -0
- data/vendor/local/include/glib-2.0/gio/gcharsetconverter.h +60 -0
- data/vendor/local/include/glib-2.0/gio/gcontenttype.h +57 -0
- data/vendor/local/include/glib-2.0/gio/gconverter.h +95 -0
- data/vendor/local/include/glib-2.0/gio/gconverterinputstream.h +80 -0
- data/vendor/local/include/glib-2.0/gio/gconverteroutputstream.h +80 -0
- data/vendor/local/include/glib-2.0/gio/gdatainputstream.h +133 -0
- data/vendor/local/include/glib-2.0/gio/gdataoutputstream.h +116 -0
- data/vendor/local/include/glib-2.0/gio/gdrive.h +225 -0
- data/vendor/local/include/glib-2.0/gio/gemblem.h +58 -0
- data/vendor/local/include/glib-2.0/gio/gemblemedicon.h +62 -0
- data/vendor/local/include/glib-2.0/gio/gfile.h +1017 -0
- data/vendor/local/include/glib-2.0/gio/gfileattribute.h +77 -0
- data/vendor/local/include/glib-2.0/gio/gfileenumerator.h +133 -0
- data/vendor/local/include/glib-2.0/gio/gfileicon.h +56 -0
- data/vendor/local/include/glib-2.0/gio/gfileinfo.h +951 -0
- data/vendor/local/include/glib-2.0/gio/gfileinputstream.h +112 -0
- data/vendor/local/include/glib-2.0/gio/gfileiostream.h +118 -0
- data/vendor/local/include/glib-2.0/gio/gfilemonitor.h +95 -0
- data/vendor/local/include/glib-2.0/gio/gfilenamecompleter.h +76 -0
- data/vendor/local/include/glib-2.0/gio/gfileoutputstream.h +119 -0
- data/vendor/local/include/glib-2.0/gio/gfilterinputstream.h +76 -0
- data/vendor/local/include/glib-2.0/gio/gfilteroutputstream.h +76 -0
- data/vendor/local/include/glib-2.0/gio/gicon.h +91 -0
- data/vendor/local/include/glib-2.0/gio/ginetaddress.h +103 -0
- data/vendor/local/include/glib-2.0/gio/ginetsocketaddress.h +69 -0
- data/vendor/local/include/glib-2.0/gio/ginitable.h +96 -0
- data/vendor/local/include/glib-2.0/gio/ginputstream.h +172 -0
- data/vendor/local/include/glib-2.0/gio/gio.h +101 -0
- data/vendor/local/include/glib-2.0/gio/gioenums.h +703 -0
- data/vendor/local/include/glib-2.0/gio/gioenumtypes.h +79 -0
- data/vendor/local/include/glib-2.0/gio/gioerror.h +48 -0
- data/vendor/local/include/glib-2.0/gio/giomodule.h +132 -0
- data/vendor/local/include/glib-2.0/gio/gioscheduler.h +52 -0
- data/vendor/local/include/glib-2.0/gio/giostream.h +112 -0
- data/vendor/local/include/glib-2.0/gio/giotypes.h +339 -0
- data/vendor/local/include/glib-2.0/gio/gloadableicon.h +97 -0
- data/vendor/local/include/glib-2.0/gio/gmemoryinputstream.h +82 -0
- data/vendor/local/include/glib-2.0/gio/gmemoryoutputstream.h +97 -0
- data/vendor/local/include/glib-2.0/gio/gmount.h +242 -0
- data/vendor/local/include/glib-2.0/gio/gmountoperation.h +123 -0
- data/vendor/local/include/glib-2.0/gio/gnativevolumemonitor.h +62 -0
- data/vendor/local/include/glib-2.0/gio/gnetworkaddress.h +69 -0
- data/vendor/local/include/glib-2.0/gio/gnetworkservice.h +69 -0
- data/vendor/local/include/glib-2.0/gio/goutputstream.h +207 -0
- data/vendor/local/include/glib-2.0/gio/gresolver.h +167 -0
- data/vendor/local/include/glib-2.0/gio/gseekable.h +99 -0
- data/vendor/local/include/glib-2.0/gio/gsimpleasyncresult.h +125 -0
- data/vendor/local/include/glib-2.0/gio/gsocket.h +176 -0
- data/vendor/local/include/glib-2.0/gio/gsocketaddress.h +79 -0
- data/vendor/local/include/glib-2.0/gio/gsocketaddressenumerator.h +89 -0
- data/vendor/local/include/glib-2.0/gio/gsocketclient.h +130 -0
- data/vendor/local/include/glib-2.0/gio/gsocketconnectable.h +68 -0
- data/vendor/local/include/glib-2.0/gio/gsocketconnection.h +91 -0
- data/vendor/local/include/glib-2.0/gio/gsocketcontrolmessage.h +105 -0
- data/vendor/local/include/glib-2.0/gio/gsocketlistener.h +138 -0
- data/vendor/local/include/glib-2.0/gio/gsocketservice.h +88 -0
- data/vendor/local/include/glib-2.0/gio/gsrvtarget.h +52 -0
- data/vendor/local/include/glib-2.0/gio/gtcpconnection.h +68 -0
- data/vendor/local/include/glib-2.0/gio/gthemedicon.h +63 -0
- data/vendor/local/include/glib-2.0/gio/gthreadedsocketservice.h +81 -0
- data/vendor/local/include/glib-2.0/gio/gvfs.h +125 -0
- data/vendor/local/include/glib-2.0/gio/gvolume.h +211 -0
- data/vendor/local/include/glib-2.0/gio/gvolumemonitor.h +151 -0
- data/vendor/local/include/glib-2.0/gio/gzlibcompressor.h +55 -0
- data/vendor/local/include/glib-2.0/gio/gzlibdecompressor.h +54 -0
- data/vendor/local/include/glib-2.0/glib/galloca.h +63 -0
- data/vendor/local/include/glib-2.0/glib/garray.h +179 -0
- data/vendor/local/include/glib-2.0/glib/gasyncqueue.h +120 -0
- data/vendor/local/include/glib-2.0/glib/gatomic.h +85 -0
- data/vendor/local/include/glib-2.0/glib/gbacktrace.h +68 -0
- data/vendor/local/include/glib-2.0/glib/gbase64.h +57 -0
- data/vendor/local/include/glib-2.0/glib/gbitlock.h +43 -0
- data/vendor/local/include/glib-2.0/glib/gbookmarkfile.h +191 -0
- data/vendor/local/include/glib-2.0/glib/gcache.h +69 -0
- data/vendor/local/include/glib-2.0/glib/gchecksum.h +86 -0
- data/vendor/local/include/glib-2.0/glib/gcompletion.h +77 -0
- data/vendor/local/include/glib-2.0/glib/gconvert.h +138 -0
- data/vendor/local/include/glib-2.0/glib/gdataset.h +122 -0
- data/vendor/local/include/glib-2.0/glib/gdate.h +263 -0
- data/vendor/local/include/glib-2.0/glib/gdir.h +52 -0
- data/vendor/local/include/glib-2.0/glib/gerror.h +98 -0
- data/vendor/local/include/glib-2.0/glib/gfileutils.h +128 -0
- data/vendor/local/include/glib-2.0/glib/ghash.h +166 -0
- data/vendor/local/include/glib-2.0/glib/ghook.h +181 -0
- data/vendor/local/include/glib-2.0/glib/ghostutils.h +40 -0
- data/vendor/local/include/glib-2.0/glib/gi18n-lib.h +38 -0
- data/vendor/local/include/glib-2.0/glib/gi18n.h +34 -0
- data/vendor/local/include/glib-2.0/glib/giochannel.h +366 -0
- data/vendor/local/include/glib-2.0/glib/gkeyfile.h +250 -0
- data/vendor/local/include/glib-2.0/glib/glist.h +120 -0
- data/vendor/local/include/glib-2.0/glib/gmacros.h +277 -0
- data/vendor/local/include/glib-2.0/glib/gmain.h +304 -0
- data/vendor/local/include/glib-2.0/glib/gmappedfile.h +49 -0
- data/vendor/local/include/glib-2.0/glib/gmarkup.h +163 -0
- data/vendor/local/include/glib-2.0/glib/gmem.h +203 -0
- data/vendor/local/include/glib-2.0/glib/gmessages.h +343 -0
- data/vendor/local/include/glib-2.0/glib/gnode.h +288 -0
- data/vendor/local/include/glib-2.0/glib/goption.h +370 -0
- data/vendor/local/include/glib-2.0/glib/gpattern.h +49 -0
- data/vendor/local/include/glib-2.0/glib/gpoll.h +93 -0
- data/vendor/local/include/glib-2.0/glib/gprimes.h +51 -0
- data/vendor/local/include/glib-2.0/glib/gprintf.h +52 -0
- data/vendor/local/include/glib-2.0/glib/gqsort.h +46 -0
- data/vendor/local/include/glib-2.0/glib/gquark.h +52 -0
- data/vendor/local/include/glib-2.0/glib/gqueue.h +127 -0
- data/vendor/local/include/glib-2.0/glib/grand.h +85 -0
- data/vendor/local/include/glib-2.0/glib/gregex.h +243 -0
- data/vendor/local/include/glib-2.0/glib/grel.h +97 -0
- data/vendor/local/include/glib-2.0/glib/gscanner.h +278 -0
- data/vendor/local/include/glib-2.0/glib/gsequence.h +128 -0
- data/vendor/local/include/glib-2.0/glib/gshell.h +55 -0
- data/vendor/local/include/glib-2.0/glib/gslice.h +86 -0
- data/vendor/local/include/glib-2.0/glib/gslist.h +114 -0
- data/vendor/local/include/glib-2.0/glib/gspawn.h +139 -0
- data/vendor/local/include/glib-2.0/glib/gstdio.h +159 -0
- data/vendor/local/include/glib-2.0/glib/gstrfuncs.h +267 -0
- data/vendor/local/include/glib-2.0/glib/gstring.h +178 -0
- data/vendor/local/include/glib-2.0/glib/gtestutils.h +292 -0
- data/vendor/local/include/glib-2.0/glib/gthread.h +408 -0
- data/vendor/local/include/glib-2.0/glib/gthreadpool.h +114 -0
- data/vendor/local/include/glib-2.0/glib/gtimer.h +65 -0
- data/vendor/local/include/glib-2.0/glib/gtree.h +91 -0
- data/vendor/local/include/glib-2.0/glib/gtypes.h +451 -0
- data/vendor/local/include/glib-2.0/glib/gunicode.h +404 -0
- data/vendor/local/include/glib-2.0/glib/gurifuncs.h +81 -0
- data/vendor/local/include/glib-2.0/glib/gutils.h +490 -0
- data/vendor/local/include/glib-2.0/glib/gvariant.h +224 -0
- data/vendor/local/include/glib-2.0/glib/gvarianttype.h +305 -0
- data/vendor/local/include/glib-2.0/glib/gwin32.h +114 -0
- data/vendor/local/include/glib-2.0/glib-object.h +41 -0
- data/vendor/local/include/glib-2.0/glib.h +97 -0
- data/vendor/local/include/glib-2.0/gmodule.h +101 -0
- data/vendor/local/include/glib-2.0/gobject/gboxed.h +236 -0
- data/vendor/local/include/glib-2.0/gobject/gclosure.h +251 -0
- data/vendor/local/include/glib-2.0/gobject/genums.h +261 -0
- data/vendor/local/include/glib-2.0/gobject/gmarshal.h +169 -0
- data/vendor/local/include/glib-2.0/gobject/gobject.h +562 -0
- data/vendor/local/include/glib-2.0/gobject/gobjectnotifyqueue.c +166 -0
- data/vendor/local/include/glib-2.0/gobject/gparam.h +410 -0
- data/vendor/local/include/glib-2.0/gobject/gparamspecs.h +1083 -0
- data/vendor/local/include/glib-2.0/gobject/gsignal.h +509 -0
- data/vendor/local/include/glib-2.0/gobject/gsourceclosure.h +51 -0
- data/vendor/local/include/glib-2.0/gobject/gtype.h +1608 -0
- data/vendor/local/include/glib-2.0/gobject/gtypemodule.h +263 -0
- data/vendor/local/include/glib-2.0/gobject/gtypeplugin.h +134 -0
- data/vendor/local/include/glib-2.0/gobject/gvalue.h +159 -0
- data/vendor/local/include/glib-2.0/gobject/gvaluearray.h +77 -0
- data/vendor/local/include/glib-2.0/gobject/gvaluecollector.h +222 -0
- data/vendor/local/include/glib-2.0/gobject/gvaluetypes.h +243 -0
- data/vendor/local/include/libintl.h +464 -0
- data/vendor/local/lib/GNU.Gettext.dll +0 -0
- data/vendor/local/lib/gio-2.0.def +800 -0
- data/vendor/local/lib/gio-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0/include/glibconfig.h +284 -0
- data/vendor/local/lib/glib-2.0.def +1381 -0
- data/vendor/local/lib/glib-2.0.lib +0 -0
- data/vendor/local/lib/gmodule-2.0.def +11 -0
- data/vendor/local/lib/gmodule-2.0.lib +0 -0
- data/vendor/local/lib/gobject-2.0.def +349 -0
- data/vendor/local/lib/gobject-2.0.lib +0 -0
- data/vendor/local/lib/gthread-2.0.def +3 -0
- data/vendor/local/lib/gthread-2.0.lib +0 -0
- data/vendor/local/lib/intl.lib +0 -0
- data/vendor/local/lib/libasprintf.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.dll.a +0 -0
- data/vendor/local/lib/libglib-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
- data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
- data/vendor/local/lib/libintl.def +31 -0
- data/vendor/local/lib/libintl.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gio-2.0.pc +14 -0
- data/vendor/local/lib/pkgconfig/glib-2.0.pc +15 -0
- data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +14 -0
- data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +14 -0
- data/vendor/local/lib/pkgconfig/gobject-2.0.pc +11 -0
- data/vendor/local/lib/pkgconfig/gthread-2.0.pc +11 -0
- data/vendor/local/manifest/gettext-runtime-dev_0.18.1.1-2_win32.mft +81 -0
- data/vendor/local/manifest/gettext-runtime_0.18.1.1-2_win32.mft +3 -0
- data/vendor/local/manifest/glib-dev_2.24.2-2_win32.mft +491 -0
- data/vendor/local/manifest/glib_2.24.2-2_win32.mft +101 -0
- data/vendor/local/share/aclocal/glib-2.0.m4 +211 -0
- data/vendor/local/share/aclocal/glib-gettext.m4 +432 -0
- data/vendor/local/share/doc/gettext/bind_textdomain_codeset.3.html +165 -0
- data/vendor/local/share/doc/gettext/bindtextdomain.3.html +160 -0
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext.html +8 -0
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceManager.html +305 -0
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceSet.html +356 -0
- data/vendor/local/share/doc/gettext/csharpdoc/begin.html +11 -0
- data/vendor/local/share/doc/gettext/csharpdoc/index.html +10 -0
- data/vendor/local/share/doc/gettext/csharpdoc/namespaces.html +6 -0
- data/vendor/local/share/doc/gettext/envsubst.1.html +213 -0
- data/vendor/local/share/doc/gettext/gettext.1.html +266 -0
- data/vendor/local/share/doc/gettext/gettext.3.html +186 -0
- data/vendor/local/share/doc/gettext/ngettext.1.html +280 -0
- data/vendor/local/share/doc/gettext/ngettext.3.html +143 -0
- data/vendor/local/share/doc/gettext/textdomain.3.html +150 -0
- data/vendor/local/share/doc/glib-2.24.2/COPYING +482 -0
- data/vendor/local/share/doc/glib-dev-2.24.2/COPYING +482 -0
- data/vendor/local/share/doc/libasprintf/autosprintf_all.html +174 -0
- data/vendor/local/share/glib-2.0/gdb/glib.py +252 -0
- data/vendor/local/share/glib-2.0/gdb/gobject.py +305 -0
- data/vendor/local/share/glib-2.0/gettext/mkinstalldirs +111 -0
- data/vendor/local/share/glib-2.0/gettext/po/Makefile.in.in +277 -0
- data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +1390 -0
- data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +531 -0
- data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +343 -0
- data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +568 -0
- data/vendor/local/share/gtk-doc/html/gio/GBufferedOutputStream.html +295 -0
- data/vendor/local/share/gtk-doc/html/gio/GCancellable.html +620 -0
- data/vendor/local/share/gtk-doc/html/gio/GCharsetConverter.html +245 -0
- data/vendor/local/share/gtk-doc/html/gio/GConverter.html +388 -0
- data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +993 -0
- data/vendor/local/share/gtk-doc/html/gio/GDataOutputStream.html +544 -0
- data/vendor/local/share/gtk-doc/html/gio/GDrive.html +1416 -0
- data/vendor/local/share/gtk-doc/html/gio/GEmblem.html +272 -0
- data/vendor/local/share/gtk-doc/html/gio/GEmblemedIcon.html +206 -0
- data/vendor/local/share/gtk-doc/html/gio/GFile.html +7450 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileDescriptorBased.html +115 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +520 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileIOStream.html +312 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileIcon.html +155 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +3116 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +262 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileMonitor.html +353 -0
- data/vendor/local/share/gtk-doc/html/gio/GFileOutputStream.html +301 -0
- data/vendor/local/share/gtk-doc/html/gio/GFilenameCompleter.html +217 -0
- data/vendor/local/share/gtk-doc/html/gio/GFilterInputStream.html +182 -0
- data/vendor/local/share/gtk-doc/html/gio/GFilterOutputStream.html +183 -0
- data/vendor/local/share/gtk-doc/html/gio/GIOModule.html +261 -0
- data/vendor/local/share/gtk-doc/html/gio/GIOStream.html +479 -0
- data/vendor/local/share/gtk-doc/html/gio/GIcon.html +331 -0
- data/vendor/local/share/gtk-doc/html/gio/GInetAddress.html +717 -0
- data/vendor/local/share/gtk-doc/html/gio/GInetSocketAddress.html +195 -0
- data/vendor/local/share/gtk-doc/html/gio/GInitable.html +388 -0
- data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +808 -0
- data/vendor/local/share/gtk-doc/html/gio/GLoadableIcon.html +301 -0
- data/vendor/local/share/gtk-doc/html/gio/GMemoryInputStream.html +185 -0
- data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +362 -0
- data/vendor/local/share/gtk-doc/html/gio/GMount.html +1465 -0
- data/vendor/local/share/gtk-doc/html/gio/GMountOperation.html +848 -0
- data/vendor/local/share/gtk-doc/html/gio/GNetworkAddress.html +263 -0
- data/vendor/local/share/gtk-doc/html/gio/GNetworkService.html +248 -0
- data/vendor/local/share/gtk-doc/html/gio/GOutputStream.html +1006 -0
- data/vendor/local/share/gtk-doc/html/gio/GResolver.html +787 -0
- data/vendor/local/share/gtk-doc/html/gio/GSeekable.html +350 -0
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +979 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocket.html +2152 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketAddress.html +297 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketClient.html +930 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnectable.html +428 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnection.html +548 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketControlMessage.html +274 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +741 -0
- data/vendor/local/share/gtk-doc/html/gio/GSocketService.html +258 -0
- data/vendor/local/share/gtk-doc/html/gio/GThemedIcon.html +377 -0
- data/vendor/local/share/gtk-doc/html/gio/GThreadedSocketService.html +197 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDList.html +381 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDMessage.html +280 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixInputStream.html +237 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixOutputStream.html +237 -0
- data/vendor/local/share/gtk-doc/html/gio/GUnixSocketAddress.html +306 -0
- data/vendor/local/share/gtk-doc/html/gio/GVfs.html +274 -0
- data/vendor/local/share/gtk-doc/html/gio/GVolume.html +1028 -0
- data/vendor/local/share/gtk-doc/html/gio/GVolumeMonitor.html +709 -0
- data/vendor/local/share/gtk-doc/html/gio/GZlibCompressor.html +180 -0
- data/vendor/local/share/gtk-doc/html/gio/GZlibDecompressor.html +128 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-18.html +153 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-20.html +155 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-22.html +1088 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-24.html +206 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +97 -0
- data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +4499 -0
- data/vendor/local/share/gtk-doc/html/gio/async.html +44 -0
- data/vendor/local/share/gtk-doc/html/gio/ch01.html +171 -0
- data/vendor/local/share/gtk-doc/html/gio/ch02.html +45 -0
- data/vendor/local/share/gtk-doc/html/gio/ch03.html +80 -0
- data/vendor/local/share/gtk-doc/html/gio/ch19.html +75 -0
- data/vendor/local/share/gtk-doc/html/gio/ch20.html +217 -0
- data/vendor/local/share/gtk-doc/html/gio/ch20s02.html +41 -0
- data/vendor/local/share/gtk-doc/html/gio/ch20s03.html +39 -0
- data/vendor/local/share/gtk-doc/html/gio/conversion.html +44 -0
- data/vendor/local/share/gtk-doc/html/gio/extending-gio.html +96 -0
- data/vendor/local/share/gtk-doc/html/gio/extending.html +41 -0
- data/vendor/local/share/gtk-doc/html/gio/failable_initialization.html +38 -0
- data/vendor/local/share/gtk-doc/html/gio/file_mon.html +33 -0
- data/vendor/local/share/gtk-doc/html/gio/file_ops.html +50 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +339 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +465 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GContentType.html +381 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterInputstream.html +163 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterOutputstream.html +163 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +927 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +328 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +297 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GSrvTarget.html +313 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +918 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +107 -0
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp +1235 -0
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +1384 -0
- data/vendor/local/share/gtk-doc/html/gio/gvfs-overview.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +47 -0
- data/vendor/local/share/gtk-doc/html/gio/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/icons.html +50 -0
- data/vendor/local/share/gtk-doc/html/gio/index.html +318 -0
- data/vendor/local/share/gtk-doc/html/gio/index.sgml +1795 -0
- data/vendor/local/share/gtk-doc/html/gio/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/migrating.html +42 -0
- data/vendor/local/share/gtk-doc/html/gio/networking.html +57 -0
- data/vendor/local/share/gtk-doc/html/gio/pt01.html +39 -0
- data/vendor/local/share/gtk-doc/html/gio/pt02.html +293 -0
- data/vendor/local/share/gtk-doc/html/gio/resolver.html +47 -0
- data/vendor/local/share/gtk-doc/html/gio/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/streaming.html +92 -0
- data/vendor/local/share/gtk-doc/html/gio/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/gio/types.html +41 -0
- data/vendor/local/share/gtk-doc/html/gio/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/utils.html +33 -0
- data/vendor/local/share/gtk-doc/html/gio/volume_mon.html +47 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-10.html +180 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-12.html +312 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-14.html +563 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-16.html +362 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-18.html +102 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-2.html +124 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-20.html +83 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-22.html +194 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-24.html +419 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-4.html +389 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-6.html +413 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-8.html +158 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-deprecated.html +340 -0
- data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +7835 -0
- data/vendor/local/share/gtk-doc/html/glib/file-name-encodings.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +893 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Asynchronous-Queues.html +818 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Atomic-Operations.html +413 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Automatic-String-Completion.html +430 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html +802 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Base64-Encoding.html +372 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html +500 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html +2054 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +560 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html +1686 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Caches.html +398 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html +1187 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Commandline-option-parser.html +1665 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +460 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Datasets.html +528 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +2042 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Double-ended-Queues.html +1278 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +1406 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +548 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +1023 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-File-Utilities.html +1810 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +3798 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +1815 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Glob-style-pattern-matching.html +295 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +1512 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Hook-Functions.html +1367 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Hostname-Utilities.html +229 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-I18N.html +629 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +2196 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Key-value-file-parser.html +2556 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +612 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Lexical-Scanner.html +1451 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html +389 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocation.html +1029 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocators.html +141 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Chunks.html +706 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +510 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +703 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html +1045 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +1523 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-N-ary-Trees.html +1466 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Numerical-Definitions.html +204 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html +2648 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +752 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Quarks.html +269 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Random-Numbers.html +578 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Relations-and-Tuples.html +483 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +1353 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Shell-related-Utilities.html +238 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html +1283 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +1212 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +924 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html +466 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Chunks.html +301 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +2947 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Strings.html +1290 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +1719 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +3379 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Thread-Pools.html +606 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +3411 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Timers.html +245 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Trash-Stacks.html +188 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html +263 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +314 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +3356 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +150 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +438 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Windows-Compatibility-Functions.html +476 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-building.html +438 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +159 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +118 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-core.html +64 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-cross-compiling.html +160 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-data-types.html +120 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-fundamentals.html +59 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +93 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +2395 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +121 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-running.html +302 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-utilities.html +112 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp +2084 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +2556 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.html +80 -0
- data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +72 -0
- data/vendor/local/share/gtk-doc/html/glib/gtester.html +131 -0
- data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +1171 -0
- data/vendor/local/share/gtk-doc/html/glib/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/index.html +336 -0
- data/vendor/local/share/gtk-doc/html/glib/index.sgml +2717 -0
- data/vendor/local/share/gtk-doc/html/glib/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/mainloop-states.gif +0 -0
- data/vendor/local/share/gtk-doc/html/glib/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/glib/tools.html +41 -0
- data/vendor/local/share/gtk-doc/html/glib/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/GTypeModule.html +710 -0
- data/vendor/local/share/gtk-doc/html/gobject/GTypePlugin.html +453 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-10.html +85 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-12.html +55 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-14.html +51 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-18.html +46 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-2.html +38 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-22.html +46 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-24.html +72 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-4.html +178 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-6.html +42 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-8.html +42 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +50 -0
- data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +2577 -0
- data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +136 -0
- data/vendor/local/share/gtk-doc/html/gobject/ch06s03.html +113 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gobject.html +293 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +263 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +92 -0
- data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +214 -0
- data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +355 -0
- data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +295 -0
- data/vendor/local/share/gtk-doc/html/gobject/glue.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +406 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Closures.html +2355 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +847 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-GParamSpec.html +1423 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +776 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +2741 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html +5242 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +2609 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +4227 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Value-arrays.html +413 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Varargs-Value-Collection.html +230 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-memory.html +234 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +270 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +117 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp +723 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +757 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +143 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-instantiable-classed.html +287 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +316 -0
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable.html +76 -0
- data/vendor/local/share/gtk-doc/html/gobject/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +100 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-code.html +86 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-construction.html +113 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-destruction.html +122 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +257 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +283 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-implement.html +125 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +167 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +160 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +121 -0
- data/vendor/local/share/gtk-doc/html/gobject/index.html +187 -0
- data/vendor/local/share/gtk-doc/html/gobject/index.sgml +734 -0
- data/vendor/local/share/gtk-doc/html/gobject/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/pr01.html +72 -0
- data/vendor/local/share/gtk-doc/html/gobject/pt01.html +80 -0
- data/vendor/local/share/gtk-doc/html/gobject/pt02.html +66 -0
- data/vendor/local/share/gtk-doc/html/gobject/pt03.html +55 -0
- data/vendor/local/share/gtk-doc/html/gobject/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/rn01.html +82 -0
- data/vendor/local/share/gtk-doc/html/gobject/rn02.html +47 -0
- data/vendor/local/share/gtk-doc/html/gobject/signal.html +377 -0
- data/vendor/local/share/gtk-doc/html/gobject/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-ginspector.html +35 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-gob.html +40 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-gtkdoc.html +63 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-refdb.html +55 -0
- data/vendor/local/share/gtk-doc/html/gobject/tools-vala.html +43 -0
- data/vendor/local/share/gtk-doc/html/gobject/up.png +0 -0
- data/vendor/local/share/locale/af/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/am/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/locale.alias +77 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mg/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nds/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/rw/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/man/man1/envsubst.1 +54 -0
- data/vendor/local/share/man/man1/gettext.1 +69 -0
- data/vendor/local/share/man/man1/glib-genmarshal.1 +307 -0
- data/vendor/local/share/man/man1/glib-mkenums.1 +234 -0
- data/vendor/local/share/man/man1/gobject-query.1 +83 -0
- data/vendor/local/share/man/man1/ngettext.1 +68 -0
- data/vendor/local/share/man/man3/bind_textdomain_codeset.3 +72 -0
- data/vendor/local/share/man/man3/bindtextdomain.3 +69 -0
- data/vendor/local/share/man/man3/dcgettext.3 +1 -0
- data/vendor/local/share/man/man3/dcngettext.3 +1 -0
- data/vendor/local/share/man/man3/dgettext.3 +1 -0
- data/vendor/local/share/man/man3/dngettext.3 +1 -0
- data/vendor/local/share/man/man3/gettext.3 +99 -0
- data/vendor/local/share/man/man3/ngettext.3 +60 -0
- data/vendor/local/share/man/man3/textdomain.3 +57 -0
- data/vendor/local/src/tml/packaging/gettext_0.18.1.1-2_win32.log +10423 -0
- data/vendor/local/src/tml/packaging/gettext_0.18.1.1-2_win32.sh +457 -0
- data/vendor/local/src/tml/packaging/glib_2.24.2-2_win32.log +2602 -0
- data/vendor/local/src/tml/packaging/glib_2.24.2-2_win32.sh +290 -0
- metadata +940 -0
@@ -0,0 +1,740 @@
|
|
1
|
+
# port of Python's difflib.
|
2
|
+
#
|
3
|
+
# Copyright (c) 2001-2008 Python Software Foundation; All Rights Reserved
|
4
|
+
# Copyright (c) 2008-2010 Kouhei Sutou; All Rights Reserved
|
5
|
+
#
|
6
|
+
# It is free software, and is distributed under the Ruby
|
7
|
+
# license and/or the PSF license. See the COPYING file and
|
8
|
+
# PSFL file.
|
9
|
+
|
10
|
+
module Test
|
11
|
+
module Unit
|
12
|
+
module Diff
|
13
|
+
class SequenceMatcher
|
14
|
+
def initialize(from, to, &junk_predicate)
|
15
|
+
@from = from
|
16
|
+
@to = to
|
17
|
+
@junk_predicate = junk_predicate
|
18
|
+
update_to_indexes
|
19
|
+
end
|
20
|
+
|
21
|
+
def longest_match(from_start, from_end, to_start, to_end)
|
22
|
+
best_info = find_best_match_position(from_start, from_end,
|
23
|
+
to_start, to_end)
|
24
|
+
unless @junks.empty?
|
25
|
+
args = [from_start, from_end, to_start, to_end]
|
26
|
+
best_info = adjust_best_info_with_junk_predicate(false, best_info,
|
27
|
+
*args)
|
28
|
+
best_info = adjust_best_info_with_junk_predicate(true, best_info,
|
29
|
+
*args)
|
30
|
+
end
|
31
|
+
|
32
|
+
best_info
|
33
|
+
end
|
34
|
+
|
35
|
+
def blocks
|
36
|
+
@blocks ||= compute_blocks
|
37
|
+
end
|
38
|
+
|
39
|
+
def operations
|
40
|
+
@operations ||= compute_operations
|
41
|
+
end
|
42
|
+
|
43
|
+
def grouped_operations(context_size=nil)
|
44
|
+
context_size ||= 3
|
45
|
+
_operations = operations.dup
|
46
|
+
_operations = [[:equal, 0, 0, 0, 0]] if _operations.empty?
|
47
|
+
expand_edge_equal_operations!(_operations, context_size)
|
48
|
+
|
49
|
+
group_window = context_size * 2
|
50
|
+
groups = []
|
51
|
+
group = []
|
52
|
+
_operations.each do |tag, from_start, from_end, to_start, to_end|
|
53
|
+
if tag == :equal and from_end - from_start > group_window
|
54
|
+
group << [tag,
|
55
|
+
from_start,
|
56
|
+
[from_end, from_start + context_size].min,
|
57
|
+
to_start,
|
58
|
+
[to_end, to_start + context_size].min]
|
59
|
+
groups << group
|
60
|
+
group = []
|
61
|
+
from_start = [from_start, from_end - context_size].max
|
62
|
+
to_start = [to_start, to_end - context_size].max
|
63
|
+
end
|
64
|
+
group << [tag, from_start, from_end, to_start, to_end]
|
65
|
+
end
|
66
|
+
groups << group unless group.empty?
|
67
|
+
groups
|
68
|
+
end
|
69
|
+
|
70
|
+
def ratio
|
71
|
+
@ratio ||= compute_ratio
|
72
|
+
end
|
73
|
+
|
74
|
+
private
|
75
|
+
def update_to_indexes
|
76
|
+
@to_indexes = {}
|
77
|
+
@junks = {}
|
78
|
+
if @to.is_a?(String)
|
79
|
+
each = " "[0].is_a?(Integer) ? :each_byte : :each_char
|
80
|
+
else
|
81
|
+
each = :each
|
82
|
+
end
|
83
|
+
i = 0
|
84
|
+
@to.send(each) do |item|
|
85
|
+
@to_indexes[item] ||= []
|
86
|
+
@to_indexes[item] << i
|
87
|
+
i += 1
|
88
|
+
end
|
89
|
+
|
90
|
+
return if @junk_predicate.nil?
|
91
|
+
@to_indexes = @to_indexes.reject do |key, value|
|
92
|
+
junk = @junk_predicate.call(key)
|
93
|
+
@junks[key] = true if junk
|
94
|
+
junk
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def find_best_match_position(from_start, from_end, to_start, to_end)
|
99
|
+
best_from, best_to, best_size = from_start, to_start, 0
|
100
|
+
sizes = {}
|
101
|
+
from_start.upto(from_end) do |from_index|
|
102
|
+
_sizes = {}
|
103
|
+
(@to_indexes[@from[from_index]] || []).each do |to_index|
|
104
|
+
next if to_index < to_start
|
105
|
+
break if to_index > to_end
|
106
|
+
size = _sizes[to_index] = (sizes[to_index - 1] || 0) + 1
|
107
|
+
if size > best_size
|
108
|
+
best_from = from_index - size + 1
|
109
|
+
best_to = to_index - size + 1
|
110
|
+
best_size = size
|
111
|
+
end
|
112
|
+
end
|
113
|
+
sizes = _sizes
|
114
|
+
end
|
115
|
+
[best_from, best_to, best_size]
|
116
|
+
end
|
117
|
+
|
118
|
+
def adjust_best_info_with_junk_predicate(should_junk, best_info,
|
119
|
+
from_start, from_end,
|
120
|
+
to_start, to_end)
|
121
|
+
best_from, best_to, best_size = best_info
|
122
|
+
while best_from > from_start and best_to > to_start and
|
123
|
+
(should_junk ?
|
124
|
+
@junks.has_key?(@to[best_to - 1]) :
|
125
|
+
!@junks.has_key?(@to[best_to - 1])) and
|
126
|
+
@from[best_from - 1] == @to[best_to - 1]
|
127
|
+
best_from -= 1
|
128
|
+
best_to -= 1
|
129
|
+
best_size += 1
|
130
|
+
end
|
131
|
+
|
132
|
+
while best_from + best_size < from_end and
|
133
|
+
best_to + best_size < to_end and
|
134
|
+
(should_junk ?
|
135
|
+
@junks.has_key?(@to[best_to + best_size]) :
|
136
|
+
!@junks.has_key?(@to[best_to + best_size])) and
|
137
|
+
@from[best_from + best_size] == @to[best_to + best_size]
|
138
|
+
best_size += 1
|
139
|
+
end
|
140
|
+
|
141
|
+
[best_from, best_to, best_size]
|
142
|
+
end
|
143
|
+
|
144
|
+
def matches
|
145
|
+
@matches ||= compute_matches
|
146
|
+
end
|
147
|
+
|
148
|
+
def compute_matches
|
149
|
+
matches = []
|
150
|
+
queue = [[0, @from.size, 0, @to.size]]
|
151
|
+
until queue.empty?
|
152
|
+
from_start, from_end, to_start, to_end = queue.pop
|
153
|
+
match = longest_match(from_start, from_end - 1, to_start, to_end - 1)
|
154
|
+
match_from_index, match_to_index, size = match
|
155
|
+
unless size.zero?
|
156
|
+
if from_start < match_from_index and
|
157
|
+
to_start < match_to_index
|
158
|
+
queue.push([from_start, match_from_index,
|
159
|
+
to_start, match_to_index])
|
160
|
+
end
|
161
|
+
matches << match
|
162
|
+
if match_from_index + size < from_end and
|
163
|
+
match_to_index + size < to_end
|
164
|
+
queue.push([match_from_index + size, from_end,
|
165
|
+
match_to_index + size, to_end])
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
matches.sort_by do |(from_index, to_index, match_size)|
|
170
|
+
from_index
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
def compute_blocks
|
175
|
+
blocks = []
|
176
|
+
current_from_index = current_to_index = current_size = 0
|
177
|
+
matches.each do |from_index, to_index, size|
|
178
|
+
if current_from_index + current_size == from_index and
|
179
|
+
current_to_index + current_size == to_index
|
180
|
+
current_size += size
|
181
|
+
else
|
182
|
+
unless current_size.zero?
|
183
|
+
blocks << [current_from_index, current_to_index, current_size]
|
184
|
+
end
|
185
|
+
current_from_index = from_index
|
186
|
+
current_to_index = to_index
|
187
|
+
current_size = size
|
188
|
+
end
|
189
|
+
end
|
190
|
+
unless current_size.zero?
|
191
|
+
blocks << [current_from_index, current_to_index, current_size]
|
192
|
+
end
|
193
|
+
|
194
|
+
blocks << [@from.size, @to.size, 0]
|
195
|
+
blocks
|
196
|
+
end
|
197
|
+
|
198
|
+
def compute_operations
|
199
|
+
from_index = to_index = 0
|
200
|
+
operations = []
|
201
|
+
blocks.each do |match_from_index, match_to_index, size|
|
202
|
+
tag = determine_tag(from_index, to_index,
|
203
|
+
match_from_index, match_to_index)
|
204
|
+
if tag != :equal
|
205
|
+
operations << [tag,
|
206
|
+
from_index, match_from_index,
|
207
|
+
to_index, match_to_index]
|
208
|
+
end
|
209
|
+
|
210
|
+
from_index, to_index = match_from_index + size, match_to_index + size
|
211
|
+
if size > 0
|
212
|
+
operations << [:equal,
|
213
|
+
match_from_index, from_index,
|
214
|
+
match_to_index, to_index]
|
215
|
+
end
|
216
|
+
end
|
217
|
+
operations
|
218
|
+
end
|
219
|
+
|
220
|
+
def compute_ratio
|
221
|
+
matches = blocks.inject(0) {|result, block| result + block[-1]}
|
222
|
+
length = @from.length + @to.length
|
223
|
+
if length.zero?
|
224
|
+
1.0
|
225
|
+
else
|
226
|
+
2.0 * matches / length
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
def determine_tag(from_index, to_index,
|
231
|
+
match_from_index, match_to_index)
|
232
|
+
if from_index < match_from_index and to_index < match_to_index
|
233
|
+
:replace
|
234
|
+
elsif from_index < match_from_index
|
235
|
+
:delete
|
236
|
+
elsif to_index < match_to_index
|
237
|
+
:insert
|
238
|
+
else
|
239
|
+
:equal
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
def expand_edge_equal_operations!(_operations, context_size)
|
244
|
+
tag, from_start, from_end, to_start, to_end = _operations[0]
|
245
|
+
if tag == :equal
|
246
|
+
_operations[0] = [tag,
|
247
|
+
[from_start, from_end - context_size].max,
|
248
|
+
from_end,
|
249
|
+
[to_start, to_end - context_size].max,
|
250
|
+
to_end]
|
251
|
+
end
|
252
|
+
|
253
|
+
tag, from_start, from_end, to_start, to_end = _operations[-1]
|
254
|
+
if tag == :equal
|
255
|
+
_operations[-1] = [tag,
|
256
|
+
from_start,
|
257
|
+
[from_end, from_start + context_size].min,
|
258
|
+
to_start,
|
259
|
+
[to_end, to_start + context_size].min]
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class Differ
|
265
|
+
def initialize(from, to)
|
266
|
+
@from = from
|
267
|
+
@to = to
|
268
|
+
end
|
269
|
+
|
270
|
+
private
|
271
|
+
def tag(mark, contents)
|
272
|
+
contents.collect {|content| "#{mark}#{content}"}
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
class UTF8Line
|
277
|
+
class << self
|
278
|
+
# from http://unicode.org/reports/tr11/
|
279
|
+
WIDE_CHARACTERS =
|
280
|
+
[0x1100..0x1159, 0x115F..0x115F, 0x2329..0x232A,
|
281
|
+
0x2E80..0x2E99, 0x2E9B..0x2EF3, 0x2F00..0x2FD5,
|
282
|
+
0x2FF0..0x2FFB, 0x3000..0x303E, 0x3041..0x3096,
|
283
|
+
0x3099..0x30FF, 0x3105..0x312D, 0x3131..0x318E,
|
284
|
+
0x3190..0x31B7, 0x31C0..0x31E3, 0x31F0..0x321E,
|
285
|
+
0x3220..0x3243, 0x3250..0x32FE, 0x3300..0x4DB5,
|
286
|
+
0x4E00..0x9FC3, 0xA000..0xA48C, 0xA490..0xA4C6,
|
287
|
+
0xAC00..0xD7A3, 0xF900..0xFA2D, 0xFA30..0xFA6A,
|
288
|
+
0xFA70..0xFAD9, 0xFE10..0xFE19, 0xFE30..0xFE52,
|
289
|
+
0xFE54..0xFE66, 0xFE68..0xFE6B, 0xFF01..0xFF60,
|
290
|
+
0xFFE0..0xFFE6, 0x20000..0x2FFFD, 0x30000..0x3FFFD,
|
291
|
+
]
|
292
|
+
|
293
|
+
AMBIGUOUS =
|
294
|
+
[0x00A1..0x00A1, 0x00A4..0x00A4, 0x00A7..0x00A8,
|
295
|
+
0x00AA..0x00AA, 0x00AD..0x00AE, 0x00B0..0x00B4,
|
296
|
+
0x00B6..0x00BA, 0x00BC..0x00BF, 0x00C6..0x00C6,
|
297
|
+
0x00D0..0x00D0, 0x00D7..0x00D8, 0x00DE..0x00E1,
|
298
|
+
0x00E6..0x00E6, 0x00E8..0x00EA, 0x00EC..0x00ED,
|
299
|
+
0x00F0..0x00F0, 0x00F2..0x00F3, 0x00F7..0x00FA,
|
300
|
+
0x00FC..0x00FC, 0x00FE..0x00FE, 0x0101..0x0101,
|
301
|
+
0x0111..0x0111, 0x0113..0x0113, 0x011B..0x011B,
|
302
|
+
0x0126..0x0127, 0x012B..0x012B, 0x0131..0x0133,
|
303
|
+
0x0138..0x0138, 0x013F..0x0142, 0x0144..0x0144,
|
304
|
+
0x0148..0x014B, 0x014D..0x014D, 0x0152..0x0153,
|
305
|
+
0x0166..0x0167, 0x016B..0x016B, 0x01CE..0x01CE,
|
306
|
+
0x01D0..0x01D0, 0x01D2..0x01D2, 0x01D4..0x01D4,
|
307
|
+
0x01D6..0x01D6, 0x01D8..0x01D8, 0x01DA..0x01DA,
|
308
|
+
0x01DC..0x01DC, 0x0251..0x0251, 0x0261..0x0261,
|
309
|
+
0x02C4..0x02C4, 0x02C7..0x02C7, 0x02C9..0x02CB,
|
310
|
+
0x02CD..0x02CD, 0x02D0..0x02D0, 0x02D8..0x02DB,
|
311
|
+
0x02DD..0x02DD, 0x02DF..0x02DF, 0x0300..0x036F,
|
312
|
+
0x0391..0x03A1, 0x03A3..0x03A9, 0x03B1..0x03C1,
|
313
|
+
0x03C3..0x03C9, 0x0401..0x0401, 0x0410..0x044F,
|
314
|
+
0x0451..0x0451, 0x2010..0x2010, 0x2013..0x2016,
|
315
|
+
0x2018..0x2019, 0x201C..0x201D, 0x2020..0x2022,
|
316
|
+
0x2024..0x2027, 0x2030..0x2030, 0x2032..0x2033,
|
317
|
+
0x2035..0x2035, 0x203B..0x203B, 0x203E..0x203E,
|
318
|
+
0x2074..0x2074, 0x207F..0x207F, 0x2081..0x2084,
|
319
|
+
0x20AC..0x20AC, 0x2103..0x2103, 0x2105..0x2105,
|
320
|
+
0x2109..0x2109, 0x2113..0x2113, 0x2116..0x2116,
|
321
|
+
0x2121..0x2122, 0x2126..0x2126, 0x212B..0x212B,
|
322
|
+
0x2153..0x2154, 0x215B..0x215E, 0x2160..0x216B,
|
323
|
+
0x2170..0x2179, 0x2190..0x2199, 0x21B8..0x21B9,
|
324
|
+
0x21D2..0x21D2, 0x21D4..0x21D4, 0x21E7..0x21E7,
|
325
|
+
0x2200..0x2200, 0x2202..0x2203, 0x2207..0x2208,
|
326
|
+
0x220B..0x220B, 0x220F..0x220F, 0x2211..0x2211,
|
327
|
+
0x2215..0x2215, 0x221A..0x221A, 0x221D..0x2220,
|
328
|
+
0x2223..0x2223, 0x2225..0x2225, 0x2227..0x222C,
|
329
|
+
0x222E..0x222E, 0x2234..0x2237, 0x223C..0x223D,
|
330
|
+
0x2248..0x2248, 0x224C..0x224C, 0x2252..0x2252,
|
331
|
+
0x2260..0x2261, 0x2264..0x2267, 0x226A..0x226B,
|
332
|
+
0x226E..0x226F, 0x2282..0x2283, 0x2286..0x2287,
|
333
|
+
0x2295..0x2295, 0x2299..0x2299, 0x22A5..0x22A5,
|
334
|
+
0x22BF..0x22BF, 0x2312..0x2312, 0x2460..0x24E9,
|
335
|
+
0x24EB..0x254B, 0x2550..0x2573, 0x2580..0x258F,
|
336
|
+
0x2592..0x2595, 0x25A0..0x25A1, 0x25A3..0x25A9,
|
337
|
+
0x25B2..0x25B3, 0x25B6..0x25B7, 0x25BC..0x25BD,
|
338
|
+
0x25C0..0x25C1, 0x25C6..0x25C8, 0x25CB..0x25CB,
|
339
|
+
0x25CE..0x25D1, 0x25E2..0x25E5, 0x25EF..0x25EF,
|
340
|
+
0x2605..0x2606, 0x2609..0x2609, 0x260E..0x260F,
|
341
|
+
0x2614..0x2615, 0x261C..0x261C, 0x261E..0x261E,
|
342
|
+
0x2640..0x2640, 0x2642..0x2642, 0x2660..0x2661,
|
343
|
+
0x2663..0x2665, 0x2667..0x266A, 0x266C..0x266D,
|
344
|
+
0x266F..0x266F, 0x273D..0x273D, 0x2776..0x277F,
|
345
|
+
0xE000..0xF8FF, 0xFE00..0xFE0F, 0xFFFD..0xFFFD,
|
346
|
+
0xE0100..0xE01EF, 0xF0000..0xFFFFD, 0x100000..0x10FFFD,
|
347
|
+
]
|
348
|
+
|
349
|
+
def wide_character?(character)
|
350
|
+
binary_search_ranges(character, WIDE_CHARACTERS) or
|
351
|
+
binary_search_ranges(character, AMBIGUOUS)
|
352
|
+
end
|
353
|
+
|
354
|
+
private
|
355
|
+
def binary_search_ranges(character, ranges)
|
356
|
+
if ranges.size.zero?
|
357
|
+
false
|
358
|
+
elsif ranges.size == 1
|
359
|
+
ranges[0].include?(character)
|
360
|
+
else
|
361
|
+
half = ranges.size / 2
|
362
|
+
range = ranges[half]
|
363
|
+
if range.include?(character)
|
364
|
+
true
|
365
|
+
elsif character < range.begin
|
366
|
+
binary_search_ranges(character, ranges[0...half])
|
367
|
+
else
|
368
|
+
binary_search_ranges(character, ranges[(half + 1)..-1])
|
369
|
+
end
|
370
|
+
end
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
def initialize(line)
|
375
|
+
@line = line
|
376
|
+
@characters = @line.unpack("U*")
|
377
|
+
end
|
378
|
+
|
379
|
+
def [](*args)
|
380
|
+
result = @characters[*args]
|
381
|
+
if result.respond_to?(:pack)
|
382
|
+
result.pack("U*")
|
383
|
+
else
|
384
|
+
result
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
def each(&block)
|
389
|
+
@characters.each(&block)
|
390
|
+
end
|
391
|
+
|
392
|
+
def size
|
393
|
+
@characters.size
|
394
|
+
end
|
395
|
+
|
396
|
+
def to_s
|
397
|
+
@line
|
398
|
+
end
|
399
|
+
|
400
|
+
def compute_width(start, _end)
|
401
|
+
width = 0
|
402
|
+
start.upto(_end - 1) do |i|
|
403
|
+
if self.class.wide_character?(@characters[i])
|
404
|
+
width += 2
|
405
|
+
else
|
406
|
+
width += 1
|
407
|
+
end
|
408
|
+
end
|
409
|
+
width
|
410
|
+
end
|
411
|
+
end
|
412
|
+
|
413
|
+
class ReadableDiffer < Differ
|
414
|
+
def diff(options={})
|
415
|
+
@result = []
|
416
|
+
operations.each do |tag, from_start, from_end, to_start, to_end|
|
417
|
+
case tag
|
418
|
+
when :replace
|
419
|
+
diff_lines(from_start, from_end, to_start, to_end)
|
420
|
+
when :delete
|
421
|
+
tag_deleted(@from[from_start...from_end])
|
422
|
+
when :insert
|
423
|
+
tag_inserted(@to[to_start...to_end])
|
424
|
+
when :equal
|
425
|
+
tag_equal(@from[from_start...from_end])
|
426
|
+
else
|
427
|
+
raise "unknown tag: #{tag}"
|
428
|
+
end
|
429
|
+
end
|
430
|
+
@result
|
431
|
+
end
|
432
|
+
|
433
|
+
private
|
434
|
+
def operations
|
435
|
+
@operations ||= nil
|
436
|
+
if @operations.nil?
|
437
|
+
matcher = SequenceMatcher.new(@from, @to)
|
438
|
+
@operations = matcher.operations
|
439
|
+
end
|
440
|
+
@operations
|
441
|
+
end
|
442
|
+
|
443
|
+
def default_ratio
|
444
|
+
0.74
|
445
|
+
end
|
446
|
+
|
447
|
+
def cut_off_ratio
|
448
|
+
0.75
|
449
|
+
end
|
450
|
+
|
451
|
+
def tag(mark, contents)
|
452
|
+
contents.each do |content|
|
453
|
+
@result << "#{mark}#{content}"
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
def tag_deleted(contents)
|
458
|
+
tag("- ", contents)
|
459
|
+
end
|
460
|
+
|
461
|
+
def tag_inserted(contents)
|
462
|
+
tag("+ ", contents)
|
463
|
+
end
|
464
|
+
|
465
|
+
def tag_equal(contents)
|
466
|
+
tag(" ", contents)
|
467
|
+
end
|
468
|
+
|
469
|
+
def tag_difference(contents)
|
470
|
+
tag("? ", contents)
|
471
|
+
end
|
472
|
+
|
473
|
+
def find_diff_line_info(from_start, from_end, to_start, to_end)
|
474
|
+
best_ratio = default_ratio
|
475
|
+
from_equal_index = to_equal_index = nil
|
476
|
+
from_best_index = to_best_index = nil
|
477
|
+
|
478
|
+
to_start.upto(to_end - 1) do |to_index|
|
479
|
+
from_start.upto(from_end - 1) do |from_index|
|
480
|
+
if @from[from_index] == @to[to_index]
|
481
|
+
from_equal_index ||= from_index
|
482
|
+
to_equal_index ||= to_index
|
483
|
+
next
|
484
|
+
end
|
485
|
+
|
486
|
+
matcher = SequenceMatcher.new(@from[from_index], @to[to_index],
|
487
|
+
&method(:space_character?))
|
488
|
+
if matcher.ratio > best_ratio
|
489
|
+
best_ratio = matcher.ratio
|
490
|
+
from_best_index = from_index
|
491
|
+
to_best_index = to_index
|
492
|
+
end
|
493
|
+
end
|
494
|
+
end
|
495
|
+
|
496
|
+
[best_ratio,
|
497
|
+
from_equal_index, to_equal_index,
|
498
|
+
from_best_index, to_best_index]
|
499
|
+
end
|
500
|
+
|
501
|
+
def diff_lines(from_start, from_end, to_start, to_end)
|
502
|
+
info = find_diff_line_info(from_start, from_end, to_start, to_end)
|
503
|
+
best_ratio, from_equal_index, to_equal_index, *info = info
|
504
|
+
from_best_index, to_best_index = info
|
505
|
+
from_best_index ||= from_start
|
506
|
+
to_best_index ||= to_start
|
507
|
+
|
508
|
+
if best_ratio < cut_off_ratio
|
509
|
+
if from_equal_index.nil?
|
510
|
+
if to_end - to_start < from_end - from_start
|
511
|
+
tag_inserted(@to[to_start...to_end])
|
512
|
+
tag_deleted(@from[from_start...from_end])
|
513
|
+
else
|
514
|
+
tag_deleted(@from[from_start...from_end])
|
515
|
+
tag_inserted(@to[to_start...to_end])
|
516
|
+
end
|
517
|
+
return
|
518
|
+
end
|
519
|
+
from_best_index = from_equal_index
|
520
|
+
to_best_index = to_equal_index
|
521
|
+
best_ratio = 1.0
|
522
|
+
end
|
523
|
+
|
524
|
+
_diff_lines(from_start, from_best_index, to_start, to_best_index)
|
525
|
+
diff_line(@from[from_best_index], @to[to_best_index])
|
526
|
+
_diff_lines(from_best_index + 1, from_end, to_best_index + 1, to_end)
|
527
|
+
end
|
528
|
+
|
529
|
+
def _diff_lines(from_start, from_end, to_start, to_end)
|
530
|
+
if from_start < from_end
|
531
|
+
if to_start < to_end
|
532
|
+
diff_lines(from_start, from_end, to_start, to_end)
|
533
|
+
else
|
534
|
+
tag_deleted(@from[from_start...from_end])
|
535
|
+
end
|
536
|
+
else
|
537
|
+
tag_inserted(@to[to_start...to_end])
|
538
|
+
end
|
539
|
+
end
|
540
|
+
|
541
|
+
def line_operations(from_line, to_line)
|
542
|
+
if !from_line.respond_to?(:force_encoding) and $KCODE == "UTF8"
|
543
|
+
from_line = UTF8Line.new(from_line)
|
544
|
+
to_line = UTF8Line.new(to_line)
|
545
|
+
end
|
546
|
+
matcher = SequenceMatcher.new(from_line, to_line,
|
547
|
+
&method(:space_character?))
|
548
|
+
[from_line, to_line, matcher.operations]
|
549
|
+
end
|
550
|
+
|
551
|
+
def compute_width(line, start, _end)
|
552
|
+
if line.respond_to?(:encoding) and
|
553
|
+
Encoding.compatible?(Encoding::UTF_8, line.encoding)
|
554
|
+
utf8_line = line[start..._end].encode(Encoding::UTF_8)
|
555
|
+
width = 0
|
556
|
+
utf8_line.each_codepoint do |unicode_codepoint|
|
557
|
+
if UTF8Line.wide_character?(unicode_codepoint)
|
558
|
+
width += 2
|
559
|
+
else
|
560
|
+
width += 1
|
561
|
+
end
|
562
|
+
end
|
563
|
+
width
|
564
|
+
elsif line.is_a?(UTF8Line)
|
565
|
+
line.compute_width(start, _end)
|
566
|
+
else
|
567
|
+
_end - start
|
568
|
+
end
|
569
|
+
end
|
570
|
+
|
571
|
+
def diff_line(from_line, to_line)
|
572
|
+
from_tags = ""
|
573
|
+
to_tags = ""
|
574
|
+
from_line, to_line, _operations = line_operations(from_line, to_line)
|
575
|
+
_operations.each do |tag, from_start, from_end, to_start, to_end|
|
576
|
+
from_width = compute_width(from_line, from_start, from_end)
|
577
|
+
to_width = compute_width(to_line, to_start, to_end)
|
578
|
+
case tag
|
579
|
+
when :replace
|
580
|
+
from_tags << "^" * from_width
|
581
|
+
to_tags << "^" * to_width
|
582
|
+
when :delete
|
583
|
+
from_tags << "-" * from_width
|
584
|
+
when :insert
|
585
|
+
to_tags << "+" * to_width
|
586
|
+
when :equal
|
587
|
+
from_tags << " " * from_width
|
588
|
+
to_tags << " " * to_width
|
589
|
+
else
|
590
|
+
raise "unknown tag: #{tag}"
|
591
|
+
end
|
592
|
+
end
|
593
|
+
format_diff_point(from_line, to_line, from_tags, to_tags)
|
594
|
+
end
|
595
|
+
|
596
|
+
def format_diff_point(from_line, to_line, from_tags, to_tags)
|
597
|
+
common = [n_leading_characters(from_line, ?\t),
|
598
|
+
n_leading_characters(to_line, ?\t)].min
|
599
|
+
common = [common,
|
600
|
+
n_leading_characters(from_tags[0, common], " "[0])].min
|
601
|
+
from_tags = from_tags[common..-1].rstrip
|
602
|
+
to_tags = to_tags[common..-1].rstrip
|
603
|
+
|
604
|
+
result = tag_deleted([from_line])
|
605
|
+
unless from_tags.empty?
|
606
|
+
tag_difference(["#{"\t" * common}#{from_tags}"])
|
607
|
+
end
|
608
|
+
tag_inserted([to_line])
|
609
|
+
unless to_tags.empty?
|
610
|
+
tag_difference(["#{"\t" * common}#{to_tags}"])
|
611
|
+
end
|
612
|
+
end
|
613
|
+
|
614
|
+
def n_leading_characters(string, character)
|
615
|
+
n = 0
|
616
|
+
while string[n] == character
|
617
|
+
n += 1
|
618
|
+
end
|
619
|
+
n
|
620
|
+
end
|
621
|
+
|
622
|
+
def space_character?(character)
|
623
|
+
[" "[0], "\t"[0]].include?(character)
|
624
|
+
end
|
625
|
+
end
|
626
|
+
|
627
|
+
class UnifiedDiffer < Differ
|
628
|
+
def diff(options={})
|
629
|
+
groups = SequenceMatcher.new(@from, @to).grouped_operations
|
630
|
+
return [] if groups.empty?
|
631
|
+
return [] if same_content?(groups)
|
632
|
+
|
633
|
+
show_context = options[:show_context]
|
634
|
+
show_context = true if show_context.nil?
|
635
|
+
result = ["--- #{options[:from_label]}".rstrip,
|
636
|
+
"+++ #{options[:to_label]}".rstrip]
|
637
|
+
groups.each do |operations|
|
638
|
+
result << format_summary(operations, show_context)
|
639
|
+
operations.each do |args|
|
640
|
+
operation_tag, from_start, from_end, to_start, to_end = args
|
641
|
+
case operation_tag
|
642
|
+
when :replace
|
643
|
+
result.concat(tag("-", @from[from_start...from_end]))
|
644
|
+
result.concat(tag("+", @to[to_start...to_end]))
|
645
|
+
when :delete
|
646
|
+
result.concat(tag("-", @from[from_start...from_end]))
|
647
|
+
when :insert
|
648
|
+
result.concat(tag("+", @to[to_start...to_end]))
|
649
|
+
when :equal
|
650
|
+
result.concat(tag(" ", @from[from_start...from_end]))
|
651
|
+
end
|
652
|
+
end
|
653
|
+
end
|
654
|
+
result
|
655
|
+
end
|
656
|
+
|
657
|
+
private
|
658
|
+
def same_content?(groups)
|
659
|
+
return false if groups.size != 1
|
660
|
+
group = groups[0]
|
661
|
+
return false if group.size != 1
|
662
|
+
tag, from_start, from_end, to_start, to_end = group[0]
|
663
|
+
|
664
|
+
tag == :equal and [from_start, from_end] == [to_start, to_end]
|
665
|
+
end
|
666
|
+
|
667
|
+
def format_summary(operations, show_context)
|
668
|
+
_, first_from_start, _, first_to_start, _ = operations[0]
|
669
|
+
_, _, last_from_end, _, last_to_end = operations[-1]
|
670
|
+
summary = "@@ -%d,%d +%d,%d @@" % [first_from_start + 1,
|
671
|
+
last_from_end - first_from_start,
|
672
|
+
first_to_start + 1,
|
673
|
+
last_to_end - first_to_start,]
|
674
|
+
if show_context
|
675
|
+
interesting_line = find_interesting_line(first_from_start,
|
676
|
+
first_to_start,
|
677
|
+
:define_line?)
|
678
|
+
summary << " #{interesting_line}" if interesting_line
|
679
|
+
end
|
680
|
+
summary
|
681
|
+
end
|
682
|
+
|
683
|
+
def find_interesting_line(from_start, to_start, predicate)
|
684
|
+
from_index = from_start
|
685
|
+
to_index = to_start
|
686
|
+
while from_index >= 0 or to_index >= 0
|
687
|
+
[@from[from_index], @to[to_index]].each do |line|
|
688
|
+
return line if line and send(predicate, line)
|
689
|
+
end
|
690
|
+
|
691
|
+
from_index -= 1
|
692
|
+
to_index -= 1
|
693
|
+
end
|
694
|
+
nil
|
695
|
+
end
|
696
|
+
|
697
|
+
def define_line?(line)
|
698
|
+
/\A(?:[_a-zA-Z$]|\s*(?:class|module|def)\b)/ =~ line
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
module_function
|
703
|
+
def need_fold?(diff)
|
704
|
+
/^[-+].{79}/ =~ diff
|
705
|
+
end
|
706
|
+
|
707
|
+
def fold(string)
|
708
|
+
string.split(/\r?\n/).collect do |line|
|
709
|
+
line.gsub(/(.{78})/, "\\1\n")
|
710
|
+
end.join("\n")
|
711
|
+
end
|
712
|
+
|
713
|
+
def folded_readable(from, to, options={})
|
714
|
+
readable(fold(from), fold(to), options)
|
715
|
+
end
|
716
|
+
|
717
|
+
def readable(from, to, options={})
|
718
|
+
diff(ReadableDiffer, from, to, options)
|
719
|
+
end
|
720
|
+
|
721
|
+
def unified(from, to, options={})
|
722
|
+
diff(UnifiedDiffer, from, to, options)
|
723
|
+
end
|
724
|
+
|
725
|
+
def diff(differ_class, from, to, options={})
|
726
|
+
differ = differ_class.new(from.split(/\r?\n/), to.split(/\r?\n/))
|
727
|
+
lines = differ.diff(options)
|
728
|
+
if Object.const_defined?(:EncodingError)
|
729
|
+
begin
|
730
|
+
lines.join("\n")
|
731
|
+
rescue EncodingError
|
732
|
+
lines.collect {|line| line.force_encoding("ASCII-8BIT")}.join("\n")
|
733
|
+
end
|
734
|
+
else
|
735
|
+
lines.join("\n")
|
736
|
+
end
|
737
|
+
end
|
738
|
+
end
|
739
|
+
end
|
740
|
+
end
|