glib2 3.1.8-x86-mingw32 → 3.1.9-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -4
- data/ext/glib2/rbglib.h +1 -1
- data/lib/2.2/glib2.so +0 -0
- data/lib/2.3/glib2.so +0 -0
- data/lib/2.4/glib2.so +0 -0
- data/lib/gnome2/rake/external-package.rb +5 -0
- data/lib/gnome2/rake/windows-binary-build-task.rb +82 -12
- data/test/run-test.rb +1 -1
- data/vendor/local/bin/asn1Coding.exe +0 -0
- data/vendor/local/bin/asn1Decoding.exe +0 -0
- data/vendor/local/bin/asn1Parser.exe +0 -0
- data/vendor/local/bin/envsubst.exe +0 -0
- data/vendor/local/bin/gdbus-codegen +10 -6
- data/vendor/local/bin/gdbus.exe +0 -0
- data/vendor/local/bin/gettext.exe +0 -0
- data/vendor/local/bin/gio-querymodules.exe +0 -0
- data/vendor/local/bin/gio.exe +0 -0
- data/vendor/local/bin/glib-compile-resources.exe +0 -0
- data/vendor/local/bin/glib-compile-schemas.exe +0 -0
- data/vendor/local/bin/glib-genmarshal +1056 -0
- data/vendor/local/bin/glib-gettextize +1 -1
- data/vendor/local/bin/glib-mkenums +694 -579
- data/vendor/local/bin/gobject-query.exe +0 -0
- data/vendor/local/bin/gresource.exe +0 -0
- data/vendor/local/bin/gsettings.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/iconv.exe +0 -0
- data/vendor/local/bin/idn.exe +0 -0
- data/vendor/local/bin/libasprintf-0.dll +0 -0
- data/vendor/local/bin/libcharset-1.dll +0 -0
- data/vendor/local/bin/libffi-6.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/libgmp-10.dll +0 -0
- data/vendor/local/bin/libgnutls-30.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/libhogweed-4-2.dll +0 -0
- data/vendor/local/bin/libiconv-2.dll +0 -0
- data/vendor/local/bin/libidn-11.dll +0 -0
- data/vendor/local/bin/libintl-8.dll +0 -0
- data/vendor/local/bin/libnettle-6-2.dll +0 -0
- data/vendor/local/bin/libp11-kit-0.dll +0 -0
- data/vendor/local/bin/libpcre-1.dll +0 -0
- data/vendor/local/bin/libpcrecpp-0.dll +0 -0
- data/vendor/local/bin/libpcreposix-0.dll +0 -0
- data/vendor/local/bin/libtasn1-6.dll +0 -0
- data/vendor/local/bin/nettle-hash.exe +0 -0
- data/vendor/local/bin/nettle-lfib-stream.exe +0 -0
- data/vendor/local/bin/nettle-pbkdf2.exe +0 -0
- data/vendor/local/bin/ngettext.exe +0 -0
- data/vendor/local/bin/p11-kit.exe +0 -0
- data/vendor/local/bin/pcregrep.exe +0 -0
- data/vendor/local/bin/pcretest.exe +0 -0
- data/vendor/local/bin/pkcs1-conv.exe +0 -0
- data/vendor/local/bin/sexp-conv.exe +0 -0
- data/vendor/local/bin/trust.exe +0 -0
- data/vendor/local/include/gio-win32-2.0/gio/gwin32inputstream.h +1 -1
- data/vendor/local/include/gio-win32-2.0/gio/gwin32outputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gaction.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gactiongroup.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gactiongroupexporter.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gactionmap.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gappinfo.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gapplication.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gapplicationcommandline.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gasyncinitable.h +2 -2
- data/vendor/local/include/glib-2.0/gio/gasyncresult.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gbufferedinputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gbufferedoutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gbytesicon.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gcancellable.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gcharsetconverter.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gcontenttype.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gconverter.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gconverterinputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gconverteroutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gcredentials.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdatagrambased.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdatainputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdataoutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusactiongroup.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gdbusaddress.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusauthobserver.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbuserror.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusinterface.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusinterfaceskeleton.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusintrospection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusmenumodel.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gdbusmessage.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusmethodinvocation.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusnameowning.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusnamewatching.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusobject.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusobjectmanager.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusobjectmanagerclient.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusobjectmanagerserver.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusobjectproxy.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusobjectskeleton.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusproxy.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusserver.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdbusutils.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdrive.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdtlsclientconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdtlsconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gdtlsserverconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gemblem.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gemblemedicon.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfile.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileattribute.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileenumerator.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileicon.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileinfo.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileinputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileiostream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfilemonitor.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfilenamecompleter.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfileoutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfilterinputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gfilteroutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gicon.h +1 -1
- data/vendor/local/include/glib-2.0/gio/ginetaddress.h +1 -1
- data/vendor/local/include/glib-2.0/gio/ginetaddressmask.h +1 -1
- data/vendor/local/include/glib-2.0/gio/ginetsocketaddress.h +1 -1
- data/vendor/local/include/glib-2.0/gio/ginitable.h +3 -2
- data/vendor/local/include/glib-2.0/gio/ginputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gio-autocleanups.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gio.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gioenums.h +7 -2
- data/vendor/local/include/glib-2.0/gio/gioerror.h +1 -1
- data/vendor/local/include/glib-2.0/gio/giomodule.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gioscheduler.h +1 -1
- data/vendor/local/include/glib-2.0/gio/giostream.h +4 -4
- data/vendor/local/include/glib-2.0/gio/giotypes.h +1 -1
- data/vendor/local/include/glib-2.0/gio/glistmodel.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gliststore.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gloadableicon.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gmemoryinputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gmemoryoutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gmenu.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gmenuexporter.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gmenumodel.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gmount.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gmountoperation.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gnativevolumemonitor.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gnetworkaddress.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gnetworking.h +3 -3
- data/vendor/local/include/glib-2.0/gio/gnetworkmonitor.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gnetworkservice.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gnotification.h +1 -1
- data/vendor/local/include/glib-2.0/gio/goutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gpermission.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gpollableinputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gpollableoutputstream.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gpollableutils.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gpropertyaction.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gproxy.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gproxyaddress.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gproxyaddressenumerator.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gproxyresolver.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gremoteactiongroup.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gresolver.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gresource.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gseekable.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsettings.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsettingsbackend.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsettingsschema.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsimpleaction.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsimpleactiongroup.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsimpleasyncresult.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsimpleiostream.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsimplepermission.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsimpleproxyresolver.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsocket.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsocketaddress.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsocketaddressenumerator.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsocketclient.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsocketconnectable.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsocketconnection.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsocketcontrolmessage.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsocketlistener.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsocketservice.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gsrvtarget.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsubprocess.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gsubprocesslauncher.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtask.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtcpconnection.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gtcpwrapperconnection.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gtestdbus.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gthemedicon.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gthreadedsocketservice.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gtlsbackend.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlscertificate.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlsclientconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlsconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlsdatabase.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlsfiledatabase.h +4 -4
- data/vendor/local/include/glib-2.0/gio/gtlsinteraction.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlspassword.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gtlsserverconnection.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gvfs.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gvolume.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gvolumemonitor.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gzlibcompressor.h +1 -1
- data/vendor/local/include/glib-2.0/gio/gzlibdecompressor.h +1 -1
- data/vendor/local/include/glib-2.0/glib-object.h +1 -1
- data/vendor/local/include/glib-2.0/glib-unix.h +5 -5
- data/vendor/local/include/glib-2.0/glib.h +1 -1
- data/vendor/local/include/glib-2.0/glib/deprecated/gallocator.h +1 -1
- data/vendor/local/include/glib-2.0/glib/deprecated/gcache.h +1 -1
- data/vendor/local/include/glib-2.0/glib/deprecated/gcompletion.h +1 -1
- data/vendor/local/include/glib-2.0/glib/deprecated/gmain.h +1 -1
- data/vendor/local/include/glib-2.0/glib/deprecated/grel.h +1 -1
- data/vendor/local/include/glib-2.0/glib/deprecated/gthread.h +1 -1
- data/vendor/local/include/glib-2.0/glib/galloca.h +1 -1
- data/vendor/local/include/glib-2.0/glib/garray.h +10 -1
- data/vendor/local/include/glib-2.0/glib/gasyncqueue.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gatomic.h +4 -4
- data/vendor/local/include/glib-2.0/glib/gbacktrace.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gbase64.h +5 -5
- data/vendor/local/include/glib-2.0/glib/gbitlock.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gbookmarkfile.h +4 -4
- data/vendor/local/include/glib-2.0/glib/gbytes.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gcharset.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gchecksum.h +5 -5
- data/vendor/local/include/glib-2.0/glib/gconvert.h +1 -31
- data/vendor/local/include/glib-2.0/glib/gdataset.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gdate.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gdir.h +1 -15
- data/vendor/local/include/glib-2.0/glib/genviron.h +1 -17
- data/vendor/local/include/glib-2.0/glib/gerror.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gfileutils.h +1 -28
- data/vendor/local/include/glib-2.0/glib/ggettext.h +1 -1
- data/vendor/local/include/glib-2.0/glib/ghash.h +1 -1
- data/vendor/local/include/glib-2.0/glib/ghmac.h +5 -5
- data/vendor/local/include/glib-2.0/glib/ghook.h +1 -1
- data/vendor/local/include/glib-2.0/glib/ghostutils.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gi18n-lib.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gi18n.h +1 -1
- data/vendor/local/include/glib-2.0/glib/giochannel.h +1 -12
- data/vendor/local/include/glib-2.0/glib/gkeyfile.h +1 -1
- data/vendor/local/include/glib-2.0/glib/glib-autocleanups.h +1 -1
- data/vendor/local/include/glib-2.0/glib/glist.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gmacros.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gmain.h +5 -5
- data/vendor/local/include/glib-2.0/glib/gmappedfile.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gmarkup.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gmem.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gmessages.h +8 -1
- data/vendor/local/include/glib-2.0/glib/gnode.h +1 -1
- data/vendor/local/include/glib-2.0/glib/goption.h +6 -6
- data/vendor/local/include/glib-2.0/glib/gpattern.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gpoll.h +6 -6
- data/vendor/local/include/glib-2.0/glib/gprimes.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gprintf.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gqsort.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gquark.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gqueue.h +1 -1
- data/vendor/local/include/glib-2.0/glib/grand.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gscanner.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gsequence.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gshell.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gslice.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gslist.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gspawn.h +1 -54
- data/vendor/local/include/glib-2.0/glib/gstdio.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gstrfuncs.h +48 -1
- data/vendor/local/include/glib-2.0/glib/gstring.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gstringchunk.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gtestutils.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gthread.h +4 -4
- data/vendor/local/include/glib-2.0/glib/gthreadpool.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gtimer.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gtimezone.h +4 -4
- data/vendor/local/include/glib-2.0/glib/gtrashstack.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gtree.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gtypes.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gunicode.h +12 -2
- data/vendor/local/include/glib-2.0/glib/gurifuncs.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gutils.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gvariant.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gvarianttype.h +5 -4
- data/vendor/local/include/glib-2.0/glib/gversion.h +1 -1
- data/vendor/local/include/glib-2.0/glib/gversionmacros.h +25 -1
- data/vendor/local/include/glib-2.0/glib/gwin32.h +1 -20
- data/vendor/local/include/glib-2.0/gmodule.h +15 -15
- data/vendor/local/include/glib-2.0/gobject/gbinding.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gboxed.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gclosure.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/genums.h +7 -1
- data/vendor/local/include/glib-2.0/gobject/glib-types.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gobject-autocleanups.h +2 -1
- data/vendor/local/include/glib-2.0/gobject/gobject.h +17 -2
- data/vendor/local/include/glib-2.0/gobject/gobjectnotifyqueue.c +1 -1
- data/vendor/local/include/glib-2.0/gobject/gparam.h +3 -1
- data/vendor/local/include/glib-2.0/gobject/gparamspecs.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gsignal.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gsourceclosure.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gtype.h +15 -3
- data/vendor/local/include/glib-2.0/gobject/gtypemodule.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gtypeplugin.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gvalue.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gvaluearray.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gvaluecollector.h +1 -1
- data/vendor/local/include/glib-2.0/gobject/gvaluetypes.h +1 -1
- data/vendor/local/lib/gio/modules/libgiognutls.a +0 -0
- data/vendor/local/lib/gio/modules/libgiognutls.dll +0 -0
- data/vendor/local/lib/gio/modules/libgiognutls.dll.a +0 -0
- data/vendor/local/lib/glib-2.0/include/glibconfig.h +2 -2
- data/vendor/local/lib/libasprintf.dll.a +0 -0
- data/vendor/local/lib/libcharset.dll.a +0 -0
- data/vendor/local/lib/libffi.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.la +3 -3
- data/vendor/local/lib/libglib-2.0.dll.a +0 -0
- data/vendor/local/lib/libglib-2.0.la +3 -3
- data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmodule-2.0.la +3 -3
- data/vendor/local/lib/libgmp.dll.a +0 -0
- data/vendor/local/lib/libgnutls.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.la +3 -3
- data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
- data/vendor/local/lib/libgthread-2.0.la +3 -3
- data/vendor/local/lib/libhogweed.dll.a +0 -0
- data/vendor/local/lib/libiconv.dll.a +0 -0
- data/vendor/local/lib/libidn.dll.a +0 -0
- data/vendor/local/lib/libintl.dll.a +0 -0
- data/vendor/local/lib/libnettle.dll.a +0 -0
- data/vendor/local/lib/libp11-kit.dll.a +0 -0
- data/vendor/local/lib/libpcre.dll.a +0 -0
- data/vendor/local/lib/libpcrecpp.dll.a +0 -0
- data/vendor/local/lib/libpcreposix.dll.a +0 -0
- data/vendor/local/lib/libtasn1.dll.a +0 -0
- data/vendor/local/lib/p11-kit/p11-kit-remote.exe +0 -0
- data/vendor/local/lib/pkcs11/p11-kit-trust.dll +0 -0
- data/vendor/local/lib/pkcs11/p11-kit-trust.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gio-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gio-windows-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/glib-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gobject-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gthread-2.0.pc +1 -1
- data/vendor/local/share/gdb/auto-load/home/vagrant/ruby-gnome2.win32/glib2/vendor/local/lib/{libglib-2.0.so.0.5200.3-gdb.py → libglib-2.0.so.0.5400.1-gdb.py} +0 -0
- data/vendor/local/share/gdb/auto-load/home/vagrant/ruby-gnome2.win32/glib2/vendor/local/lib/{libgobject-2.0.so.0.5200.3-gdb.py → libgobject-2.0.so.0.5400.1-gdb.py} +0 -0
- data/vendor/local/share/glib-2.0/codegen/__init__.py +1 -1
- data/vendor/local/share/glib-2.0/codegen/__init__.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/__init__.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen.py +11 -11
- data/vendor/local/share/glib-2.0/codegen/codegen.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_docbook.py +1 -1
- data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_main.py +1 -1
- data/vendor/local/share/glib-2.0/codegen/codegen_main.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/codegen_main.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/config.py +2 -5
- data/vendor/local/share/glib-2.0/codegen/config.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/config.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/dbustypes.py +1 -1
- data/vendor/local/share/glib-2.0/codegen/dbustypes.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/dbustypes.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/parser.py +1 -1
- data/vendor/local/share/glib-2.0/codegen/parser.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/parser.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/utils.py +1 -1
- data/vendor/local/share/glib-2.0/codegen/utils.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/utils.pyo +0 -0
- data/vendor/local/share/glib-2.0/schemas/gschemas.compiled +0 -0
- data/vendor/local/share/glib-2.0/valgrind/glib.supp +10 -0
- data/vendor/local/share/gtk-doc/html/gio/GApplication.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +12 -5
- data/vendor/local/share/gtk-doc/html/gio/GDBusInterfaceSkeleton.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GDBusObject.html +3 -2
- data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +8 -8
- data/vendor/local/share/gtk-doc/html/gio/GFile.html +9 -7
- data/vendor/local/share/gtk-doc/html/gio/GInitable.html +23 -5
- data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +6 -4
- data/vendor/local/share/gtk-doc/html/gio/GMount.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GNetworkMonitor.html +4 -2
- data/vendor/local/share/gtk-doc/html/gio/GProxyResolver.html +3 -0
- data/vendor/local/share/gtk-doc/html/gio/GResource.html +23 -11
- data/vendor/local/share/gtk-doc/html/gio/GSettings.html +1 -2
- data/vendor/local/share/gtk-doc/html/gio/GSocket.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/GSubprocessLauncher.html +6 -2
- data/vendor/local/share/gtk-doc/html/gio/GTlsInteraction.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +10 -2
- data/vendor/local/share/gtk-doc/html/gio/gdbus.html +38 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Introspection-Data.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Utilities.html +5 -1
- data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +2 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-GWin32RegistryKey.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/gio-Owning-Bus-Names.html +8 -0
- data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +138 -64
- data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +3 -1
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +7 -4
- data/vendor/local/share/gtk-doc/html/gio/gresource-tool.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/annotation-glossary.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +24 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +5 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +10 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +7 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +11 -10
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +5 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +5 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +9 -7
- data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +30 -5
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +43 -29
- data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +146 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +38 -19
- data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +4 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +103 -13
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +254 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-UNIX-specific-utilities-and-integration.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +34 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-running.html +6 -7
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +13 -0
- data/vendor/local/share/gtk-doc/html/glib/glib.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +94 -39
- data/vendor/local/share/gtk-doc/html/glib/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +20 -0
- data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +81 -14
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +95 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +191 -3
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +7 -2
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-prerequisite.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/signal.html +1 -1
- data/vendor/local/share/license/glib/COPYING +118 -98
- data/vendor/local/share/locale/be/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fur/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/fur/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/kk/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/kk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/man/man1/gapplication.1 +1 -1
- data/vendor/local/share/man/man1/gdbus-codegen.1 +1 -1
- data/vendor/local/share/man/man1/gdbus.1 +66 -1
- data/vendor/local/share/man/man1/gio-querymodules.1 +1 -1
- data/vendor/local/share/man/man1/gio.1 +1 -1
- data/vendor/local/share/man/man1/glib-compile-resources.1 +1 -1
- data/vendor/local/share/man/man1/glib-compile-schemas.1 +1 -1
- data/vendor/local/share/man/man1/glib-genmarshal.1 +99 -19
- data/vendor/local/share/man/man1/glib-gettextize.1 +1 -1
- data/vendor/local/share/man/man1/glib-mkenums.1 +1 -1
- data/vendor/local/share/man/man1/gobject-query.1 +1 -1
- data/vendor/local/share/man/man1/gresource.1 +2 -2
- data/vendor/local/share/man/man1/gsettings.1 +1 -1
- data/vendor/local/share/man/man1/gtester-report.1 +1 -1
- data/vendor/local/share/man/man1/gtester.1 +1 -1
- metadata +9 -7
- data/vendor/local/bin/glib-genmarshal.exe +0 -0
@@ -37,7 +37,7 @@ Usage: glib-gettextize [OPTION]... [package-dir]
|
|
37
37
|
-f, --force force writing of new files even if old exist
|
38
38
|
Report bugs to http://bugzilla.gnome.org/."
|
39
39
|
package=glib
|
40
|
-
version=2.
|
40
|
+
version=2.54.1
|
41
41
|
try_ln_s=:
|
42
42
|
|
43
43
|
# Directory where the sources are stored.
|
@@ -1,593 +1,708 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
#!/usr/bin/env /usr/bin/python
|
2
|
+
|
3
|
+
# If the code below looks horrible and unpythonic, do not panic.
|
4
|
+
#
|
5
|
+
# It is.
|
6
|
+
#
|
7
|
+
# This is a manual conversion from the original Perl script to
|
8
|
+
# Python. Improvements are welcome.
|
9
|
+
#
|
10
|
+
from __future__ import print_function, unicode_literals
|
11
|
+
|
12
|
+
import argparse
|
13
|
+
import os
|
14
|
+
import re
|
15
|
+
import sys
|
16
|
+
import tempfile
|
17
|
+
import io
|
18
|
+
import errno
|
19
|
+
import codecs
|
20
|
+
import locale
|
21
|
+
|
22
|
+
VERSION_STR = '''glib-mkenums version 2.54.1
|
23
|
+
glib-genmarshal comes with ABSOLUTELY NO WARRANTY.
|
24
|
+
You may redistribute copies of glib-genmarshal under the terms of
|
25
|
+
the GNU General Public License which can be found in the
|
26
|
+
GLib source package. Sources, examples and contact
|
27
|
+
information are available at http://www.gtk.org'''
|
28
|
+
|
29
|
+
# Python 2 defaults to ASCII in case stdout is redirected.
|
30
|
+
# This should make it match Python 3, which uses the locale encoding.
|
31
|
+
if sys.stdout.encoding is None:
|
32
|
+
output_stream = codecs.getwriter(
|
33
|
+
locale.getpreferredencoding())(sys.stdout)
|
34
|
+
else:
|
35
|
+
output_stream = sys.stdout
|
36
|
+
|
37
|
+
# pylint: disable=too-few-public-methods
|
38
|
+
class Color:
|
39
|
+
'''ANSI Terminal colors'''
|
40
|
+
GREEN = '\033[1;32m'
|
41
|
+
BLUE = '\033[1;34m'
|
42
|
+
YELLOW = '\033[1;33m'
|
43
|
+
RED = '\033[1;31m'
|
44
|
+
END = '\033[0m'
|
45
|
+
|
46
|
+
|
47
|
+
def print_color(msg, color=Color.END, prefix='MESSAGE'):
|
48
|
+
'''Print a string with a color prefix'''
|
49
|
+
if os.isatty(sys.stderr.fileno()):
|
50
|
+
real_prefix = '{start}{prefix}{end}'.format(start=color, prefix=prefix, end=Color.END)
|
51
|
+
else:
|
52
|
+
real_prefix = prefix
|
53
|
+
print('{prefix}: {msg}'.format(prefix=real_prefix, msg=msg), file=sys.stderr)
|
54
|
+
|
55
|
+
|
56
|
+
def print_error(msg):
|
57
|
+
'''Print an error, and terminate'''
|
58
|
+
print_color(msg, color=Color.RED, prefix='ERROR')
|
59
|
+
sys.exit(1)
|
60
|
+
|
61
|
+
|
62
|
+
def print_warning(msg, fatal=False):
|
63
|
+
'''Print a warning, and optionally terminate'''
|
64
|
+
if fatal:
|
65
|
+
color = Color.RED
|
66
|
+
prefix = 'ERROR'
|
67
|
+
else:
|
68
|
+
color = Color.YELLOW
|
69
|
+
prefix = 'WARNING'
|
70
|
+
print_color(msg, color, prefix)
|
71
|
+
if fatal:
|
72
|
+
sys.exit(1)
|
73
|
+
|
74
|
+
|
75
|
+
def print_info(msg):
|
76
|
+
'''Print a message'''
|
77
|
+
print_color(msg, color=Color.GREEN, prefix='INFO')
|
78
|
+
|
79
|
+
|
80
|
+
def write_output(output):
|
81
|
+
global output_stream
|
82
|
+
print(output, file=output_stream)
|
83
|
+
|
84
|
+
# glib-mkenums.py
|
11
85
|
# Information about the current enumeration
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
if
|
86
|
+
flags = None # Is enumeration a bitmask?
|
87
|
+
option_underscore_name = '' # Overriden underscore variant of the enum name
|
88
|
+
# for example to fix the cases we don't get the
|
89
|
+
# mixed-case -> underscorized transform right.
|
90
|
+
option_lowercase_name = '' # DEPRECATED. A lower case name to use as part
|
91
|
+
# of the *_get_type() function, instead of the
|
92
|
+
# one that we guess. For instance, when an enum
|
93
|
+
# uses abnormal capitalization and we can not
|
94
|
+
# guess where to put the underscores.
|
95
|
+
seenbitshift = 0 # Have we seen bitshift operators?
|
96
|
+
enum_prefix = None # Prefix for this enumeration
|
97
|
+
enumname = '' # Name for this enumeration
|
98
|
+
enumshort = '' # $enumname without prefix
|
99
|
+
enumname_prefix = '' # prefix of $enumname
|
100
|
+
enumindex = 0 # Global enum counter
|
101
|
+
firstenum = 1 # Is this the first enumeration per file?
|
102
|
+
entries = [] # [ name, val ] for each entry
|
103
|
+
sandbox = None # sandbox for safe evaluation of expressions
|
104
|
+
|
105
|
+
output = '' # Filename to write result into
|
106
|
+
|
107
|
+
def parse_trigraph(opts):
|
108
|
+
result = {}
|
109
|
+
|
110
|
+
for opt in re.split(r'\s*,\s*', opts):
|
111
|
+
opt = re.sub(r'^\s*', '', opt)
|
112
|
+
opt = re.sub(r'\s*$', '', opt)
|
113
|
+
m = re.search(r'(\w+)(?:=(.+))?', opt)
|
114
|
+
assert m is not None
|
115
|
+
groups = m.groups()
|
116
|
+
key = groups[0]
|
117
|
+
if len(groups) > 1:
|
118
|
+
val = groups[1]
|
119
|
+
else:
|
120
|
+
val = 1
|
121
|
+
result[key] = val
|
122
|
+
return result
|
123
|
+
|
124
|
+
def parse_entries(file, file_name):
|
125
|
+
global entries, enumindex, enumname, seenbitshift, flags
|
126
|
+
looking_for_name = False
|
127
|
+
|
128
|
+
while True:
|
129
|
+
line = file.readline()
|
130
|
+
if not line:
|
131
|
+
break
|
132
|
+
|
133
|
+
line = line.strip()
|
134
|
+
|
135
|
+
# read lines until we have no open comments
|
136
|
+
while re.search(r'/\*([^*]|\*(?!/))*$', line):
|
137
|
+
line += file.readline()
|
138
|
+
|
139
|
+
# strip comments w/o options
|
140
|
+
line = re.sub(r'''/\*(?!<)
|
141
|
+
([^*]+|\*(?!/))*
|
142
|
+
\*/''', '', line, flags=re.X)
|
143
|
+
|
144
|
+
line = line.rstrip()
|
145
|
+
|
146
|
+
# skip empty lines
|
147
|
+
if len(line.strip()) == 0:
|
148
|
+
continue
|
149
|
+
|
150
|
+
if looking_for_name:
|
151
|
+
m = re.match(r'\s*(\w+)', line)
|
152
|
+
if m:
|
153
|
+
enumname = m.group(1)
|
154
|
+
return True
|
155
|
+
|
156
|
+
# Handle include files
|
157
|
+
m = re.match(r'\#include\s*<([^>]*)>', line)
|
158
|
+
if m:
|
159
|
+
newfilename = os.path.join("..", m.group(1))
|
160
|
+
newfile = io.open(newfilename, encoding="utf-8")
|
161
|
+
|
162
|
+
if not parse_entries(newfile, newfilename):
|
163
|
+
return False
|
164
|
+
else:
|
165
|
+
continue
|
166
|
+
|
167
|
+
m = re.match(r'\s*\}\s*(\w+)', line)
|
168
|
+
if m:
|
169
|
+
enumname = m.group(1)
|
170
|
+
enumindex += 1
|
171
|
+
return 1
|
172
|
+
|
173
|
+
m = re.match(r'\s*\}', line)
|
174
|
+
if m:
|
175
|
+
enumindex += 1
|
176
|
+
looking_for_name = True
|
177
|
+
continue
|
178
|
+
|
179
|
+
m = re.match(r'''\s*
|
101
180
|
(\w+)\s* # name
|
102
181
|
(?:=( # value
|
103
|
-
|
104
|
-
|
182
|
+
\s*\w+\s*\(.*\)\s* # macro with multiple args
|
183
|
+
| # OR
|
105
184
|
(?:[^,/]|/(?!\*))* # anything but a comma or comment
|
106
185
|
))?,?\s*
|
107
186
|
(?:/\*< # options
|
108
187
|
(([^*]|\*(?!/))*)
|
109
188
|
>\s*\*/)?,?
|
110
|
-
\s*$
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
return
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
print " --identifier-prefix <text> Identifier prefix\n";
|
152
|
-
print " --symbol-prefix <text> Symbol prefix\n";
|
153
|
-
print " --fhead <text> Output file header\n";
|
154
|
-
print " --fprod <text> Per input file production\n";
|
155
|
-
print " --ftail <text> Output file trailer\n";
|
156
|
-
print " --eprod <text> Per enum text (produced prior to value iterations)\n";
|
157
|
-
print " --vhead <text> Value header, produced before iterating over enum values\n";
|
158
|
-
print " --vprod <text> Value text, produced for each enum value\n";
|
159
|
-
print " --vtail <text> Value tail, produced after iterating over enum values\n";
|
160
|
-
print " --comments <text> Comment structure\n";
|
161
|
-
print " --template file Template file\n";
|
162
|
-
print " --output file Output file\n";
|
163
|
-
print " -v, --version Print version informations\n\n";
|
164
|
-
print "Production text substitutions:\n";
|
165
|
-
print " \@EnumName\@ PrefixTheXEnum\n";
|
166
|
-
print " \@enum_name\@ prefix_the_xenum\n";
|
167
|
-
print " \@ENUMNAME\@ PREFIX_THE_XENUM\n";
|
168
|
-
print " \@ENUMSHORT\@ THE_XENUM\n";
|
169
|
-
print " \@ENUMPREFIX\@ PREFIX\n";
|
170
|
-
print " \@VALUENAME\@ PREFIX_THE_XVALUE\n";
|
171
|
-
print " \@valuenick\@ the-xvalue\n";
|
172
|
-
print " \@valuenum\@ the integer value (limited support, Since: 2.26)\n";
|
173
|
-
print " \@type\@ either enum or flags\n";
|
174
|
-
print " \@Type\@ either Enum or Flags\n";
|
175
|
-
print " \@TYPE\@ either ENUM or FLAGS\n";
|
176
|
-
print " \@filename\@ name of current input file\n";
|
177
|
-
print " \@basename\@ base name of the current input file (Since: 2.22)\n";
|
178
|
-
exit 0;
|
179
|
-
}
|
189
|
+
\s*$''', line, flags=re.X)
|
190
|
+
if m:
|
191
|
+
groups = m.groups()
|
192
|
+
name = groups[0]
|
193
|
+
value = None
|
194
|
+
options = None
|
195
|
+
if len(groups) > 1:
|
196
|
+
value = groups[1]
|
197
|
+
if len(groups) > 2:
|
198
|
+
options = groups[2]
|
199
|
+
if flags is None and value is not None and '<<' in value:
|
200
|
+
seenbitshift = 1
|
201
|
+
|
202
|
+
if options is not None:
|
203
|
+
options = parse_trigraph(options)
|
204
|
+
if 'skip' not in options:
|
205
|
+
entries.append((name, value, options['nick']))
|
206
|
+
else:
|
207
|
+
entries.append((name, value))
|
208
|
+
elif re.match(r's*\#', line):
|
209
|
+
pass
|
210
|
+
else:
|
211
|
+
print_warning('Failed to parse "{}" in {}'.format(line, file_name))
|
212
|
+
return False
|
213
|
+
|
214
|
+
help_epilog = '''Production text substitutions:
|
215
|
+
\u0040EnumName\u0040 PrefixTheXEnum
|
216
|
+
\u0040enum_name\u0040 prefix_the_xenum
|
217
|
+
\u0040ENUMNAME\u0040 PREFIX_THE_XENUM
|
218
|
+
\u0040ENUMSHORT\u0040 THE_XENUM
|
219
|
+
\u0040ENUMPREFIX\u0040 PREFIX
|
220
|
+
\u0040VALUENAME\u0040 PREFIX_THE_XVALUE
|
221
|
+
\u0040valuenick\u0040 the-xvalue
|
222
|
+
\u0040valuenum\u0040 the integer value (limited support, Since: 2.26)
|
223
|
+
\u0040type\u0040 either enum or flags
|
224
|
+
\u0040Type\u0040 either Enum or Flags
|
225
|
+
\u0040TYPE\u0040 either ENUM or FLAGS
|
226
|
+
\u0040filename\u0040 name of current input file
|
227
|
+
\u0040basename\u0040 base name of the current input file (Since: 2.22)
|
228
|
+
'''
|
229
|
+
|
180
230
|
|
181
231
|
# production variables:
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
232
|
+
idprefix = "" # "G", "Gtk", etc
|
233
|
+
symprefix = "" # "g", "gtk", etc, if not just lc($idprefix)
|
234
|
+
fhead = "" # output file header
|
235
|
+
fprod = "" # per input file production
|
236
|
+
ftail = "" # output file trailer
|
237
|
+
eprod = "" # per enum text (produced prior to value itarations)
|
238
|
+
vhead = "" # value header, produced before iterating over enum values
|
239
|
+
vprod = "" # value text, produced for each enum value
|
240
|
+
vtail = "" # value tail, produced after iterating over enum values
|
241
|
+
comment_tmpl = "" # comment template
|
242
|
+
|
243
|
+
def read_template_file(file):
|
244
|
+
global idprefix, symprefix, fhead, fprod, ftail, eprod, vhead, vprod, vtail, comment_tmpl
|
245
|
+
tmpl = {'file-header': fhead,
|
246
|
+
'file-production': fprod,
|
247
|
+
'file-tail': ftail,
|
248
|
+
'enumeration-production': eprod,
|
249
|
+
'value-header': vhead,
|
250
|
+
'value-production': vprod,
|
251
|
+
'value-tail': vtail,
|
252
|
+
'comment': comment_tmpl,
|
253
|
+
}
|
254
|
+
in_ = 'junk'
|
255
|
+
|
256
|
+
ifile = io.open(file, encoding="utf-8")
|
257
|
+
for line in ifile:
|
258
|
+
m = re.match(r'\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\/', line)
|
259
|
+
if m:
|
260
|
+
if in_ == 'junk' and m.group(1) == 'BEGIN' and m.group(2) in tmpl:
|
261
|
+
in_ = m.group(2)
|
262
|
+
continue
|
263
|
+
elif in_ == m.group(2) and m.group(1) == 'END' and m.group(2) in tmpl:
|
264
|
+
in_ = 'junk'
|
265
|
+
continue
|
266
|
+
else:
|
267
|
+
sys.exit("Malformed template file " + file)
|
268
|
+
|
269
|
+
if in_ != 'junk':
|
270
|
+
tmpl[in_] += line
|
271
|
+
|
272
|
+
if in_ != 'junk':
|
273
|
+
sys.exit("Malformed template file " + file)
|
274
|
+
|
275
|
+
fhead = tmpl['file-header']
|
276
|
+
fprod = tmpl['file-production']
|
277
|
+
ftail = tmpl['file-tail']
|
278
|
+
eprod = tmpl['enumeration-production']
|
279
|
+
vhead = tmpl['value-header']
|
280
|
+
vprod = tmpl['value-production']
|
281
|
+
vtail = tmpl['value-tail']
|
282
|
+
comment_tmpl = tmpl['comment']
|
283
|
+
|
284
|
+
# default to C-style comments
|
285
|
+
if comment_tmpl == "":
|
286
|
+
comment_tmpl = "/* \u0040comment\u0040 */"
|
287
|
+
|
288
|
+
parser = argparse.ArgumentParser(epilog=help_epilog,
|
289
|
+
formatter_class=argparse.RawDescriptionHelpFormatter)
|
290
|
+
|
291
|
+
parser.add_argument('--identifier-prefix', default='', dest='idprefix',
|
292
|
+
help='Identifier prefix')
|
293
|
+
parser.add_argument('--symbol-prefix', default='', dest='symprefix',
|
294
|
+
help='symbol-prefix')
|
295
|
+
parser.add_argument('--fhead', default=[], dest='fhead', action='append',
|
296
|
+
help='Output file header')
|
297
|
+
parser.add_argument('--ftail', default=[], dest='ftail', action='append',
|
298
|
+
help='Per input file production')
|
299
|
+
parser.add_argument('--fprod', default=[], dest='fprod', action='append',
|
300
|
+
help='Put out TEXT everytime a new input file is being processed.')
|
301
|
+
parser.add_argument('--eprod', default=[], dest='eprod', action='append',
|
302
|
+
help='Per enum text (produced prior to value iterations)')
|
303
|
+
parser.add_argument('--vhead', default=[], dest='vhead', action='append',
|
304
|
+
help='Value header, produced before iterating over enum values')
|
305
|
+
parser.add_argument('--vprod', default=[], dest='vprod', action='append',
|
306
|
+
help='Value text, produced for each enum value.')
|
307
|
+
parser.add_argument('--vtail', default=[], dest='vtail', action='append',
|
308
|
+
help='Value tail, produced after iterating over enum values')
|
309
|
+
parser.add_argument('--comments', default='', dest='comment_tmpl',
|
310
|
+
help='Comment structure')
|
311
|
+
parser.add_argument('--template', default='', dest='template',
|
312
|
+
help='Template file')
|
313
|
+
parser.add_argument('--output', default=None, dest='output')
|
314
|
+
parser.add_argument('--version', '-v', default=False, action='store_true', dest='version',
|
315
|
+
help='Print version informations')
|
316
|
+
parser.add_argument('args', nargs='*')
|
317
|
+
|
318
|
+
options = parser.parse_args()
|
319
|
+
|
320
|
+
if options.version:
|
321
|
+
print(VERSION_STR)
|
322
|
+
sys.exit(0)
|
323
|
+
|
324
|
+
def unescape_cmdline_args(arg):
|
325
|
+
arg = arg.replace('\\n', '\n')
|
326
|
+
arg = arg.replace('\\r', '\r')
|
327
|
+
return arg.replace('\\t', '\t')
|
328
|
+
|
329
|
+
if options.template != '':
|
330
|
+
read_template_file(options.template)
|
331
|
+
|
332
|
+
idprefix += options.idprefix
|
333
|
+
symprefix += options.symprefix
|
334
|
+
|
335
|
+
# This is a hack to maintain some semblance of backward compatibility with
|
336
|
+
# the old, Perl-based glib-mkenums. The old tool had an implicit ordering
|
337
|
+
# on the arguments and templates; each argument was parsed in order, and
|
338
|
+
# all the strings appended. This allowed developers to write:
|
339
|
+
#
|
340
|
+
# glib-mkenums \
|
341
|
+
# --fhead ... \
|
342
|
+
# --template a-template-file.c.in \
|
343
|
+
# --ftail ...
|
344
|
+
#
|
345
|
+
# And have the fhead be prepended to the file-head stanza in the template,
|
346
|
+
# as well as the ftail be appended to the file-tail stanza in the template.
|
347
|
+
# Short of throwing away ArgumentParser and going over sys.argv[] element
|
348
|
+
# by element, we can simulate that behaviour by ensuring some ordering in
|
349
|
+
# how we build the template strings:
|
350
|
+
#
|
351
|
+
# - the head stanzas are always prepended to the template
|
352
|
+
# - the prod stanzas are always appended to the template
|
353
|
+
# - the tail stanzas are always appended to the template
|
354
|
+
#
|
355
|
+
# Within each instance of the command line argument, we append each value
|
356
|
+
# to the array in the order in which it appears on the command line.
|
357
|
+
fhead = ''.join([unescape_cmdline_args(x) for x in options.fhead]) + fhead
|
358
|
+
vhead = ''.join([unescape_cmdline_args(x) for x in options.vhead]) + vhead
|
359
|
+
|
360
|
+
fprod += ''.join([unescape_cmdline_args(x) for x in options.fprod])
|
361
|
+
eprod += ''.join([unescape_cmdline_args(x) for x in options.eprod])
|
362
|
+
vprod += ''.join([unescape_cmdline_args(x) for x in options.vprod])
|
363
|
+
|
364
|
+
ftail = ftail + ''.join([unescape_cmdline_args(x) for x in options.ftail])
|
365
|
+
vtail = vtail + ''.join([unescape_cmdline_args(x) for x in options.vtail])
|
366
|
+
|
367
|
+
if options.comment_tmpl != '':
|
368
|
+
comment_tmpl = unescape_cmdline_args(options.comment_tmpl)
|
369
|
+
|
370
|
+
output = options.output
|
371
|
+
|
372
|
+
if output is not None:
|
373
|
+
(out_dir, out_fn) = os.path.split(options.output)
|
374
|
+
out_suffix = '_' + os.path.splitext(out_fn)[1]
|
375
|
+
if out_dir == '':
|
376
|
+
out_dir = '.'
|
377
|
+
fd, filename = tempfile.mkstemp(dir=out_dir)
|
378
|
+
os.close(fd)
|
379
|
+
tmpfile = io.open(filename, "w", encoding="utf-8")
|
380
|
+
output_stream = tmpfile
|
381
|
+
else:
|
382
|
+
tmpfile = None
|
272
383
|
|
273
384
|
# put auto-generation comment
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
if
|
519
|
-
#
|
520
|
-
#
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
385
|
+
comment = comment_tmpl.replace('\u0040comment\u0040', 'Generated data (by glib-mkenums)')
|
386
|
+
write_output("\n" + comment + '\n')
|
387
|
+
|
388
|
+
def replace_specials(prod):
|
389
|
+
prod = prod.replace(r'\\a', r'\a')
|
390
|
+
prod = prod.replace(r'\\b', r'\b')
|
391
|
+
prod = prod.replace(r'\\t', r'\t')
|
392
|
+
prod = prod.replace(r'\\n', r'\n')
|
393
|
+
prod = prod.replace(r'\\f', r'\f')
|
394
|
+
prod = prod.replace(r'\\r', r'\r')
|
395
|
+
prod = prod.rstrip()
|
396
|
+
return prod
|
397
|
+
|
398
|
+
if len(fhead) > 0:
|
399
|
+
prod = fhead
|
400
|
+
base = os.path.basename(options.args[0])
|
401
|
+
|
402
|
+
prod = prod.replace('\u0040filename\u0040', options.args[0])
|
403
|
+
prod = prod.replace('\u0040basename\u0040', base)
|
404
|
+
prod = replace_specials(prod)
|
405
|
+
write_output(prod)
|
406
|
+
|
407
|
+
def process_file(curfilename):
|
408
|
+
global entries, flags, seenbitshift, enum_prefix
|
409
|
+
firstenum = True
|
410
|
+
|
411
|
+
try:
|
412
|
+
curfile = io.open(curfilename, encoding="utf-8")
|
413
|
+
except IOError as e:
|
414
|
+
if e.errno == errno.ENOENT:
|
415
|
+
print_warning('No file "{}" found.'.format(curfilename))
|
416
|
+
return
|
417
|
+
raise
|
418
|
+
|
419
|
+
while True:
|
420
|
+
line = curfile.readline()
|
421
|
+
if not line:
|
422
|
+
break
|
423
|
+
|
424
|
+
line = line.strip()
|
425
|
+
|
426
|
+
# read lines until we have no open comments
|
427
|
+
while re.search(r'/\*([^*]|\*(?!/))*$', line):
|
428
|
+
line += curfile.readline()
|
429
|
+
|
430
|
+
# strip comments w/o options
|
431
|
+
line = re.sub(r'''/\*(?!<)
|
432
|
+
([^*]+|\*(?!/))*
|
433
|
+
\*/''', '', line)
|
434
|
+
|
435
|
+
# ignore forward declarations
|
436
|
+
if re.match(r'\s*typedef\s+enum.*;', line):
|
437
|
+
continue
|
438
|
+
|
439
|
+
m = re.match(r'''\s*typedef\s+enum\s*
|
440
|
+
({)?\s*
|
441
|
+
(?:/\*<
|
442
|
+
(([^*]|\*(?!/))*)
|
443
|
+
>\s*\*/)?
|
444
|
+
\s*({)?''', line, flags=re.X)
|
445
|
+
if m:
|
446
|
+
groups = m.groups()
|
447
|
+
if len(groups) >= 2 and groups[1] is not None:
|
448
|
+
options = parse_trigraph(groups[1])
|
449
|
+
if 'skip' in options:
|
450
|
+
continue
|
451
|
+
enum_prefix = options.get('prefix', None)
|
452
|
+
flags = options.get('flags', None)
|
453
|
+
if 'flags' in options:
|
454
|
+
if flags is None:
|
455
|
+
flags = 1
|
456
|
+
else:
|
457
|
+
flags = int(flags)
|
458
|
+
option_lowercase_name = options.get('lowercase_name', None)
|
459
|
+
option_underscore_name = options.get('underscore_name', None)
|
460
|
+
else:
|
461
|
+
enum_prefix = None
|
462
|
+
flags = None
|
463
|
+
option_lowercase_name = None
|
464
|
+
option_underscore_name = None
|
465
|
+
|
466
|
+
if option_lowercase_name is not None:
|
467
|
+
if option_underscore_name is not None:
|
468
|
+
print_warning("lowercase_name overriden with underscore_name")
|
469
|
+
option_lowercase_name = None
|
470
|
+
else:
|
471
|
+
print_warning("lowercase_name is deprecated, use underscore_name")
|
472
|
+
|
473
|
+
# Didn't have trailing '{' look on next lines
|
474
|
+
if groups[0] is None and (len(groups) < 4 or groups[3] is None):
|
475
|
+
while True:
|
476
|
+
line = curfile.readline()
|
477
|
+
if re.match(r'\s*\{', line):
|
478
|
+
break
|
479
|
+
|
480
|
+
seenbitshift = 0
|
481
|
+
entries = []
|
482
|
+
|
483
|
+
# Now parse the entries
|
484
|
+
parse_entries(curfile, curfilename)
|
485
|
+
|
486
|
+
# figure out if this was a flags or enums enumeration
|
487
|
+
if flags is None:
|
488
|
+
flags = seenbitshift
|
489
|
+
|
490
|
+
# Autogenerate a prefix
|
491
|
+
if enum_prefix is None:
|
492
|
+
for entry in entries:
|
493
|
+
if len(entry) < 3 or entry[2] is None:
|
494
|
+
name = entry[0]
|
495
|
+
if enum_prefix is not None:
|
496
|
+
enum_prefix = os.path.commonprefix([name, enum_prefix])
|
497
|
+
else:
|
498
|
+
enum_prefix = name
|
499
|
+
if enum_prefix is None:
|
500
|
+
enum_prefix = ""
|
501
|
+
else:
|
502
|
+
# Trim so that it ends in an underscore
|
503
|
+
enum_prefix = re.sub(r'_[^_]*$', '_', enum_prefix)
|
504
|
+
else:
|
505
|
+
# canonicalize user defined prefixes
|
506
|
+
enum_prefix = enum_prefix.upper()
|
507
|
+
enum_prefix = enum_prefix.replace('-', '_')
|
508
|
+
enum_prefix = re.sub(r'(.*)([^_])$', r'\1\2_', enum_prefix)
|
509
|
+
|
510
|
+
fixed_entries = []
|
511
|
+
for e in entries:
|
512
|
+
name = e[0]
|
513
|
+
num = e[1]
|
514
|
+
if len(e) < 3 or e[2] is None:
|
515
|
+
nick = re.sub(r'^' + enum_prefix, '', name)
|
516
|
+
nick = nick.replace('_', '-').lower()
|
517
|
+
e = (name, num, nick)
|
518
|
+
fixed_entries.append(e)
|
519
|
+
entries = fixed_entries
|
520
|
+
|
521
|
+
# Spit out the output
|
522
|
+
if option_underscore_name is not None:
|
523
|
+
enumlong = option_underscore_name.upper()
|
524
|
+
enumsym = option_underscore_name.lower()
|
525
|
+
enumshort = re.sub(r'^[A-Z][A-Z0-9]*_', '', enumlong)
|
526
|
+
|
527
|
+
enumname_prefix = re.sub('_' + enumshort + '$', '', enumlong)
|
528
|
+
elif symprefix == '' and idprefix == '':
|
529
|
+
# enumname is e.g. GMatchType
|
530
|
+
enspace = re.sub(r'^([A-Z][a-z]*).*$', r'\1', enumname)
|
531
|
+
|
532
|
+
enumshort = re.sub(r'^[A-Z][a-z]*', '', enumname)
|
533
|
+
enumshort = re.sub(r'([^A-Z])([A-Z])', r'\1_\2', enumshort)
|
534
|
+
enumshort = re.sub(r'([A-Z][A-Z])([A-Z][0-9a-z])', r'\1_\2', enumshort)
|
535
|
+
enumshort = enumshort.upper()
|
536
|
+
|
537
|
+
enumname_prefix = re.sub(r'^([A-Z][a-z]*).*$', r'\1', enumname).upper()
|
538
|
+
|
539
|
+
enumlong = enspace.upper() + "_" + enumshort
|
540
|
+
enumsym = enspace.lower() + "_" + enumshort.lower()
|
541
|
+
|
542
|
+
if option_lowercase_name is not None:
|
543
|
+
enumsym = option_lowercase_name
|
544
|
+
else:
|
545
|
+
enumshort = enumname
|
546
|
+
if idprefix:
|
547
|
+
enumshort = re.sub(r'^' + idprefix, '', enumshort)
|
548
|
+
else:
|
549
|
+
enumshort = re.sub(r'/^[A-Z][a-z]*', '', enumshort)
|
550
|
+
|
551
|
+
enumshort = re.sub(r'([^A-Z])([A-Z])', r'\1_\2', enumshort)
|
552
|
+
enumshort = re.sub(r'([A-Z][A-Z])([A-Z][0-9a-z])', r'\1_\2', enumshort)
|
553
|
+
enumshort = enumshort.upper()
|
554
|
+
|
555
|
+
if symprefix:
|
556
|
+
enumname_prefix = symprefix.upper()
|
557
|
+
else:
|
558
|
+
enumname_prefix = idprefix.upper()
|
559
|
+
|
560
|
+
enumlong = enumname_prefix + "_" + enumshort
|
561
|
+
enumsym = enumlong.lower()
|
562
|
+
|
563
|
+
if firstenum:
|
564
|
+
firstenum = False
|
565
|
+
|
566
|
+
if len(fprod) > 0:
|
567
|
+
prod = fprod
|
568
|
+
base = os.path.basename(curfilename)
|
569
|
+
|
570
|
+
prod = prod.replace('\u0040filename\u0040', curfilename)
|
571
|
+
prod = prod.replace('\u0040basename\u0040', base)
|
572
|
+
prod = replace_specials(prod)
|
573
|
+
|
574
|
+
write_output(prod)
|
575
|
+
|
576
|
+
if len(eprod) > 0:
|
577
|
+
prod = eprod
|
578
|
+
|
579
|
+
prod = prod.replace('\u0040enum_name\u0040', enumsym)
|
580
|
+
prod = prod.replace('\u0040EnumName\u0040', enumname)
|
581
|
+
prod = prod.replace('\u0040ENUMSHORT\u0040', enumshort)
|
582
|
+
prod = prod.replace('\u0040ENUMNAME\u0040', enumlong)
|
583
|
+
prod = prod.replace('\u0040ENUMPREFIX\u0040', enumname_prefix)
|
584
|
+
if flags:
|
585
|
+
prod = prod.replace('\u0040type\u0040', 'flags')
|
586
|
+
else:
|
587
|
+
prod = prod.replace('\u0040type\u0040', 'enum')
|
588
|
+
if flags:
|
589
|
+
prod = prod.replace('\u0040Type\u0040', 'Flags')
|
590
|
+
else:
|
591
|
+
prod = prod.replace('\u0040Type\u0040', 'Enum')
|
592
|
+
if flags:
|
593
|
+
prod = prod.replace('\u0040TYPE\u0040', 'FLAGS')
|
594
|
+
else:
|
595
|
+
prod = prod.replace('\u0040TYPE\u0040', 'ENUM')
|
596
|
+
prod = replace_specials(prod)
|
597
|
+
write_output(prod)
|
598
|
+
|
599
|
+
if len(vhead) > 0:
|
600
|
+
prod = vhead
|
601
|
+
prod = prod.replace('\u0040enum_name\u0040', enumsym)
|
602
|
+
prod = prod.replace('\u0040EnumName\u0040', enumname)
|
603
|
+
prod = prod.replace('\u0040ENUMSHORT\u0040', enumshort)
|
604
|
+
prod = prod.replace('\u0040ENUMNAME\u0040', enumlong)
|
605
|
+
prod = prod.replace('\u0040ENUMPREFIX\u0040', enumname_prefix)
|
606
|
+
if flags:
|
607
|
+
prod = prod.replace('\u0040type\u0040', 'flags')
|
608
|
+
else:
|
609
|
+
prod = prod.replace('\u0040type\u0040', 'enum')
|
610
|
+
if flags:
|
611
|
+
prod = prod.replace('\u0040Type\u0040', 'Flags')
|
612
|
+
else:
|
613
|
+
prod = prod.replace('\u0040Type\u0040', 'Enum')
|
614
|
+
if flags:
|
615
|
+
prod = prod.replace('\u0040TYPE\u0040', 'FLAGS')
|
616
|
+
else:
|
617
|
+
prod = prod.replace('\u0040TYPE\u0040', 'ENUM')
|
618
|
+
prod = replace_specials(prod)
|
619
|
+
write_output(prod)
|
620
|
+
|
621
|
+
if len(vprod) > 0:
|
622
|
+
prod = vprod
|
623
|
+
next_num = 0
|
624
|
+
|
625
|
+
prod = replace_specials(prod)
|
626
|
+
for name, num, nick in entries:
|
627
|
+
tmp_prod = prod
|
628
|
+
|
629
|
+
if '\u0040valuenum\u0040' in prod:
|
630
|
+
# only attempt to eval the value if it is requested
|
631
|
+
# this prevents us from throwing errors otherwise
|
632
|
+
if num is not None:
|
633
|
+
# use sandboxed evaluation as a reasonable
|
634
|
+
# approximation to C constant folding
|
635
|
+
inum = eval(num, {}, {})
|
636
|
+
|
637
|
+
# make sure it parsed to an integer
|
638
|
+
if not isinstance(inum, int):
|
639
|
+
sys.exit("Unable to parse enum value '%s'" % num)
|
640
|
+
num = inum
|
641
|
+
else:
|
642
|
+
num = next_num
|
643
|
+
|
644
|
+
tmp_prod = tmp_prod.replace('\u0040valuenum\u0040', str(num))
|
645
|
+
next_num = int(num) + 1
|
646
|
+
|
647
|
+
tmp_prod = tmp_prod.replace('\u0040VALUENAME\u0040', name)
|
648
|
+
tmp_prod = tmp_prod.replace('\u0040valuenick\u0040', nick)
|
649
|
+
if flags:
|
650
|
+
tmp_prod = tmp_prod.replace('\u0040type\u0040', 'flags')
|
651
|
+
else:
|
652
|
+
tmp_prod = tmp_prod.replace('\u0040type\u0040', 'enum')
|
653
|
+
if flags:
|
654
|
+
tmp_prod = tmp_prod.replace('\u0040Type\u0040', 'Flags')
|
655
|
+
else:
|
656
|
+
tmp_prod = tmp_prod.replace('\u0040Type\u0040', 'Enum')
|
657
|
+
if flags:
|
658
|
+
tmp_prod = tmp_prod.replace('\u0040TYPE\u0040', 'FLAGS')
|
659
|
+
else:
|
660
|
+
tmp_prod = tmp_prod.replace('\u0040TYPE\u0040', 'ENUM')
|
661
|
+
tmp_prod = tmp_prod.rstrip()
|
662
|
+
|
663
|
+
write_output(tmp_prod)
|
664
|
+
|
665
|
+
if len(vtail) > 0:
|
666
|
+
prod = vtail
|
667
|
+
prod = prod.replace('\u0040enum_name\u0040', enumsym)
|
668
|
+
prod = prod.replace('\u0040EnumName\u0040', enumname)
|
669
|
+
prod = prod.replace('\u0040ENUMSHORT\u0040', enumshort)
|
670
|
+
prod = prod.replace('\u0040ENUMNAME\u0040', enumlong)
|
671
|
+
prod = prod.replace('\u0040ENUMPREFIX\u0040', enumname_prefix)
|
672
|
+
if flags:
|
673
|
+
prod = prod.replace('\u0040type\u0040', 'flags')
|
674
|
+
else:
|
675
|
+
prod = prod.replace('\u0040type\u0040', 'enum')
|
676
|
+
if flags:
|
677
|
+
prod = prod.replace('\u0040Type\u0040', 'Flags')
|
678
|
+
else:
|
679
|
+
prod = prod.replace('\u0040Type\u0040', 'Enum')
|
680
|
+
if flags:
|
681
|
+
prod = prod.replace('\u0040TYPE\u0040', 'FLAGS')
|
682
|
+
else:
|
683
|
+
prod = prod.replace('\u0040TYPE\u0040', 'ENUM')
|
684
|
+
prod = replace_specials(prod)
|
685
|
+
write_output(prod)
|
686
|
+
|
687
|
+
for fname in options.args:
|
688
|
+
process_file(fname)
|
689
|
+
|
690
|
+
if len(ftail) > 0:
|
691
|
+
prod = ftail
|
692
|
+
base = os.path.basename(options.args[-1]) # FIXME, wrong
|
693
|
+
|
694
|
+
prod = prod.replace('\u0040filename\u0040', 'ARGV') # wrong too
|
695
|
+
prod = prod.replace('\u0040basename\u0040', base)
|
696
|
+
prod = replace_specials(prod)
|
697
|
+
write_output(prod)
|
578
698
|
|
579
699
|
# put auto-generation comment
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
close ($OUTPUT)
|
590
|
-
|| warn "Closing output file $tmpfilename failed: $!";
|
591
|
-
move ($tmpfilename, $output)
|
592
|
-
|| die "Could not rename $tmpfilename to $output: $!";
|
593
|
-
}
|
700
|
+
comment = comment_tmpl
|
701
|
+
comment = comment.replace('\u0040comment\u0040', 'Generated data ends here')
|
702
|
+
write_output("\n" + comment + "\n")
|
703
|
+
|
704
|
+
if tmpfile is not None:
|
705
|
+
tmpfilename = tmpfile.name
|
706
|
+
tmpfile.close()
|
707
|
+
os.unlink(options.output)
|
708
|
+
os.rename(tmpfilename, options.output)
|