APT

Merge lp:~brian-murray/apt/history-log into lp:~ubuntu-core-dev/apt/ubuntu

Proposed by Brian Murray
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~brian-murray/apt/history-log
Merge into: lp:~ubuntu-core-dev/apt/ubuntu
Diff against target: 389383 lines (+386902/-0) (has conflicts)
480 files modified
.bzr-builddeb/default.conf (+2/-0)
AUTHORS (+64/-0)
BUGS (+9/-0)
COMPILING (+85/-0)
COPYING (+23/-0)
COPYING.GPL (+340/-0)
Makefile (+34/-0)
README.MultiArch (+63/-0)
README.ddtp (+74/-0)
README.make (+112/-0)
README.progress-reporting (+69/-0)
abicheck/abi-compliance-checker.pl (+7325/-0)
abicheck/apt_build.xml.in (+11/-0)
abicheck/apt_installed.xml.in (+11/-0)
abicheck/run_abi_test (+14/-0)
aclocal.m4 (+2378/-0)
apt-inst/contrib/arfile.cc (+152/-0)
apt-inst/contrib/arfile.h (+66/-0)
apt-inst/contrib/extracttar.cc (+349/-0)
apt-inst/contrib/extracttar.h (+55/-0)
apt-inst/database.cc (+26/-0)
apt-inst/database.h (+52/-0)
apt-inst/deb/debfile.cc (+294/-0)
apt-inst/deb/debfile.h (+89/-0)
apt-inst/deb/dpkgdb.cc (+490/-0)
apt-inst/deb/dpkgdb.h (+50/-0)
apt-inst/dirstream.cc (+116/-0)
apt-inst/dirstream.h (+58/-0)
apt-inst/dpkg-diffs.txt (+5/-0)
apt-inst/extract.cc (+507/-0)
apt-inst/extract.h (+50/-0)
apt-inst/filelist.cc (+587/-0)
apt-inst/filelist.h (+312/-0)
apt-inst/makefile (+34/-0)
apt-pkg/acquire-item.cc (+2077/-0)
apt-pkg/acquire-item.h (+1023/-0)
apt-pkg/acquire-method.cc (+511/-0)
apt-pkg/acquire-method.h (+102/-0)
apt-pkg/acquire-worker.cc (+611/-0)
apt-pkg/acquire-worker.h (+322/-0)
apt-pkg/acquire.cc (+919/-0)
apt-pkg/acquire.h (+782/-0)
apt-pkg/algorithms.cc (+1466/-0)
apt-pkg/algorithms.h (+138/-0)
apt-pkg/aptconfiguration.cc (+459/-0)
apt-pkg/aptconfiguration.h (+118/-0)
apt-pkg/cachefile.cc (+184/-0)
apt-pkg/cachefile.h (+76/-0)
apt-pkg/cachefilter.cc (+54/-0)
apt-pkg/cachefilter.h (+29/-0)
apt-pkg/cacheiterators.h (+441/-0)
apt-pkg/cacheset.cc (+511/-0)
apt-pkg/cacheset.h (+389/-0)
apt-pkg/cdrom.cc (+948/-0)
apt-pkg/cdrom.h (+115/-0)
apt-pkg/clean.cc (+119/-0)
apt-pkg/clean.h (+28/-0)
apt-pkg/contrib/cdromutl.cc (+267/-0)
apt-pkg/contrib/cdromutl.h (+24/-0)
apt-pkg/contrib/cmndline.cc (+393/-0)
apt-pkg/contrib/cmndline.h (+105/-0)
apt-pkg/contrib/configuration.cc (+896/-0)
apt-pkg/contrib/configuration.h (+137/-0)
apt-pkg/contrib/crc-16.cc (+72/-0)
apt-pkg/contrib/crc-16.h (+17/-0)
apt-pkg/contrib/error.cc (+262/-0)
apt-pkg/contrib/error.h (+322/-0)
apt-pkg/contrib/fileutl.cc (+1046/-0)
apt-pkg/contrib/fileutl.h (+127/-0)
apt-pkg/contrib/hashes.cc (+126/-0)
apt-pkg/contrib/hashes.h (+74/-0)
apt-pkg/contrib/macros.h (+90/-0)
apt-pkg/contrib/md5.cc (+359/-0)
apt-pkg/contrib/md5.h (+77/-0)
apt-pkg/contrib/mmap.cc (+444/-0)
apt-pkg/contrib/mmap.h (+115/-0)
apt-pkg/contrib/netrc.cc (+211/-0)
apt-pkg/contrib/netrc.h (+29/-0)
apt-pkg/contrib/progress.cc (+219/-0)
apt-pkg/contrib/progress.h (+89/-0)
apt-pkg/contrib/sha1.cc (+357/-0)
apt-pkg/contrib/sha1.h (+67/-0)
apt-pkg/contrib/sha256.cc (+424/-0)
apt-pkg/contrib/sha256.h (+72/-0)
apt-pkg/contrib/sptr.h (+66/-0)
apt-pkg/contrib/strutl.cc (+1431/-0)
apt-pkg/contrib/strutl.h (+145/-0)
apt-pkg/contrib/weakptr.h (+64/-0)
apt-pkg/deb/debindexfile.cc (+717/-0)
apt-pkg/deb/debindexfile.h (+141/-0)
apt-pkg/deb/deblistparser.cc (+867/-0)
apt-pkg/deb/deblistparser.h (+79/-0)
apt-pkg/deb/debmetaindex.cc (+429/-0)
apt-pkg/deb/debmetaindex.h (+51/-0)
apt-pkg/deb/debrecords.cc (+179/-0)
apt-pkg/deb/debrecords.h (+54/-0)
apt-pkg/deb/debsrcrecords.cc (+173/-0)
apt-pkg/deb/debsrcrecords.h (+56/-0)
apt-pkg/deb/debsystem.cc (+233/-0)
apt-pkg/deb/debsystem.h (+43/-0)
apt-pkg/deb/debversion.cc (+282/-0)
apt-pkg/deb/debversion.h (+70/-0)
apt-pkg/deb/dpkgpm.cc (+1507/-0)
apt-pkg/deb/dpkgpm.h (+116/-0)
apt-pkg/depcache.cc (+1800/-0)
apt-pkg/depcache.h (+496/-0)
apt-pkg/indexcopy.cc (+929/-0)
apt-pkg/indexcopy.h (+104/-0)
apt-pkg/indexfile.cc (+103/-0)
apt-pkg/indexfile.h (+95/-0)
apt-pkg/indexrecords.cc (+212/-0)
apt-pkg/indexrecords.h (+59/-0)
apt-pkg/init.cc (+170/-0)
apt-pkg/init.h (+45/-0)
apt-pkg/makefile (+58/-0)
apt-pkg/metaindex.h (+51/-0)
apt-pkg/orderlist.cc (+1117/-0)
apt-pkg/orderlist.h (+117/-0)
apt-pkg/packagemanager.cc (+714/-0)
apt-pkg/packagemanager.h (+113/-0)
apt-pkg/pkgcache.cc (+900/-0)
apt-pkg/pkgcache.h (+693/-0)
apt-pkg/pkgcachegen.cc (+1321/-0)
apt-pkg/pkgcachegen.h (+181/-0)
apt-pkg/pkgrecords.cc (+72/-0)
apt-pkg/pkgrecords.h (+77/-0)
apt-pkg/pkgsystem.cc (+44/-0)
apt-pkg/pkgsystem.h (+94/-0)
apt-pkg/policy.cc (+400/-0)
apt-pkg/policy.h (+89/-0)
apt-pkg/sourcelist.cc (+344/-0)
apt-pkg/sourcelist.h (+100/-0)
apt-pkg/srcrecords.cc (+132/-0)
apt-pkg/srcrecords.h (+99/-0)
apt-pkg/tagfile.cc (+609/-0)
apt-pkg/tagfile.h (+124/-0)
apt-pkg/vendor.cc (+35/-0)
apt-pkg/vendor.h (+35/-0)
apt-pkg/vendorlist.cc (+154/-0)
apt-pkg/vendorlist.h (+50/-0)
apt-pkg/version.cc (+40/-0)
apt-pkg/version.h (+64/-0)
apt-pkg/versionmatch.cc (+275/-0)
apt-pkg/versionmatch.h (+78/-0)
autom4te.cache/output.0 (+9260/-0)
autom4te.cache/output.1 (+9260/-0)
autom4te.cache/requests (+196/-0)
autom4te.cache/traces.0 (+3504/-0)
autom4te.cache/traces.1 (+624/-0)
buildlib/apti18n.h.in (+28/-0)
buildlib/config.h.in (+43/-0)
buildlib/configure.mak (+35/-0)
buildlib/copy.mak (+31/-0)
buildlib/debiandoc.mak (+58/-0)
buildlib/defaults.mak (+183/-0)
buildlib/environment.mak.in (+69/-0)
buildlib/fail.mak (+20/-0)
buildlib/install-sh (+250/-0)
buildlib/inttypes.h.in (+50/-0)
buildlib/library.mak (+73/-0)
buildlib/libversion.mak (+14/-0)
buildlib/makefile.in (+51/-0)
buildlib/manpage.mak (+29/-0)
buildlib/mkChangeLog (+14/-0)
buildlib/netdb.h.in (+6/-0)
buildlib/po4a_manpage.mak (+64/-0)
buildlib/podomain.mak (+22/-0)
buildlib/program.mak (+60/-0)
buildlib/python.mak (+68/-0)
buildlib/sizetable (+25/-0)
buildlib/staticlibrary.mak (+60/-0)
buildlib/statvfs.h.in (+13/-0)
buildlib/tools.m4 (+110/-0)
cmdline/acqprogress.cc (+301/-0)
cmdline/acqprogress.h (+37/-0)
cmdline/apt-cache.cc (+1812/-0)
cmdline/apt-cdrom.cc (+283/-0)
cmdline/apt-config.cc (+135/-0)
cmdline/apt-extracttemplates.cc (+392/-0)
cmdline/apt-extracttemplates.h (+48/-0)
cmdline/apt-get.cc (+3356/-0)
cmdline/apt-key (+223/-0)
cmdline/apt-mark (+101/-0)
cmdline/apt-report-mirror-failure (+29/-0)
cmdline/apt-sortpkgs.cc (+208/-0)
cmdline/makefile (+68/-0)
configure (+9260/-0)
configure.in (+217/-0)
debian/NEWS (+59/-0)
debian/README.source (+6/-0)
debian/apt-doc.doc-base.guide (+13/-0)
debian/apt-doc.doc-base.offline (+13/-0)
debian/apt-doc.docs (+2/-0)
debian/apt-transport-https.README (+2/-0)
debian/apt-transport-https.dirs (+1/-0)
debian/apt-transport-https.install (+1/-0)
debian/apt-utils.dirs (+2/-0)
debian/apt-utils.examples (+1/-0)
debian/apt-utils.install (+1/-0)
debian/apt-utils.symbols (+121/-0)
debian/apt.bug-script (+33/-0)
debian/apt.conf.autoremove (+26/-0)
debian/apt.conf.changelog (+6/-0)
debian/apt.cron.daily (+517/-0)
debian/apt.dirs (+16/-0)
debian/apt.install (+5/-0)
debian/apt.lintian-overrides (+3/-0)
debian/apt.logrotate (+16/-0)
debian/apt.postinst (+41/-0)
debian/apt.symbols (+1303/-0)
debian/changelog (+7357/-0)
debian/compat (+1/-0)
debian/control (+80/-0)
debian/copyright (+23/-0)
debian/libapt-pkg-dev.dirs (+2/-0)
debian/libapt-pkg-dev.install (+3/-0)
debian/libapt-pkg-doc.doc-base.design (+14/-0)
debian/libapt-pkg-doc.doc-base.dpkg-tech (+13/-0)
debian/libapt-pkg-doc.doc-base.files (+14/-0)
debian/libapt-pkg-doc.doc-base.method (+14/-0)
debian/postinst (+39/-0)
debian/postrm (+22/-0)
debian/preinst (+32/-0)
debian/rules (+295/-0)
debian/source/format (+1/-0)
doc/Bugs (+174/-0)
doc/Doxyfile.in (+1515/-0)
doc/apt-cache.8.xml (+391/-0)
doc/apt-cdrom.8.xml (+171/-0)
doc/apt-config.8.xml (+119/-0)
doc/apt-extracttemplates.1.xml (+87/-0)
doc/apt-ftparchive.1.xml (+637/-0)
doc/apt-get.8.xml (+606/-0)
doc/apt-key.8.xml (+203/-0)
doc/apt-mark.8.xml (+141/-0)
doc/apt-secure.8.xml (+214/-0)
doc/apt-sortpkgs.1.xml (+82/-0)
doc/apt-verbatim.ent (+188/-0)
doc/apt.8 (+52/-0)
doc/apt.conf.5.xml (+1106/-0)
doc/apt.ent (+210/-0)
doc/apt_preferences.5.xml (+711/-0)
doc/design.sgml (+411/-0)
doc/dpkg-tech.sgml (+511/-0)
doc/examples/apt-ftparchive.conf (+46/-0)
doc/examples/apt-https-method-example.conf (+186/-0)
doc/examples/apt.conf (+32/-0)
doc/examples/configure-index (+458/-0)
doc/examples/ftp-archive.conf (+81/-0)
doc/examples/preferences (+11/-0)
doc/examples/sources.list (+11/-0)
doc/files.sgml (+345/-0)
doc/guide.sgml (+547/-0)
doc/lang.makefile (+11/-0)
doc/libapt-pkg2_to_3.txt (+89/-0)
doc/makefile (+108/-0)
doc/manpage-style.xsl (+9/-0)
doc/method.sgml (+354/-0)
doc/offline.sgml (+236/-0)
doc/po/apt-doc.pot (+8195/-0)
doc/po/de.po (+11359/-0)
doc/po/es.po (+11338/-0)
doc/po/fr.po (+11330/-0)
doc/po/it.po (+8559/-0)
doc/po/ja.po (+10956/-0)
doc/po/pl.po (+10219/-0)
doc/po/pt.po (+11220/-0)
doc/po/pt_BR.po (+8748/-0)
doc/po4a.conf (+38/-0)
doc/sources.list.5.xml (+242/-0)
doc/style.txt (+75/-0)
doc/xml.add (+5/-0)
dselect/desc.apt (+9/-0)
dselect/install (+110/-0)
dselect/makefile (+17/-0)
dselect/names (+1/-0)
dselect/setup (+286/-0)
dselect/update (+48/-0)
ftparchive/apt-ftparchive.cc (+1012/-0)
ftparchive/apt-ftparchive.h (+28/-0)
ftparchive/cachedb.cc (+474/-0)
ftparchive/cachedb.h (+137/-0)
ftparchive/contents.cc (+394/-0)
ftparchive/contents.h (+89/-0)
ftparchive/makefile (+20/-0)
ftparchive/multicompress.cc (+493/-0)
ftparchive/multicompress.h (+67/-0)
ftparchive/override.cc (+289/-0)
ftparchive/override.h (+51/-0)
ftparchive/writer.cc (+1095/-0)
ftparchive/writer.h (+205/-0)
methods/bzip2.cc (+172/-0)
methods/cdrom.cc (+281/-0)
methods/connect.cc (+245/-0)
methods/connect.h (+20/-0)
methods/copy.cc (+99/-0)
methods/file.cc (+96/-0)
methods/ftp.cc (+1124/-0)
methods/ftp.h (+82/-0)
methods/gpgv.cc (+262/-0)
methods/gzip.cc (+120/-0)
methods/http.cc (+1387/-0)
methods/http.h (+199/-0)
methods/http_main.cc (+20/-0)
methods/https.cc (+336/-0)
methods/https.h (+50/-0)
methods/makefile (+116/-0)
methods/mirror.cc (+436/-0)
methods/mirror.h (+56/-0)
methods/rfc2553emu.cc (+245/-0)
methods/rfc2553emu.h (+113/-0)
methods/rred.cc (+583/-0)
methods/rsh.cc (+520/-0)
methods/rsh.h (+70/-0)
mirror-failure.py (+23/-0)
po/ChangeLog (+1077/-0)
po/LINGUAS (+1/-0)
po/apt-all.pot (+3146/-0)
po/ar.po (+3219/-0)
po/ast.po (+3472/-0)
po/bg.po (+3513/-0)
po/bs.po (+3184/-0)
po/ca.po (+3551/-0)
po/cs.po (+3483/-0)
po/cy.po (+3552/-0)
po/da.po (+3430/-0)
po/de.po (+3524/-0)
po/dz.po (+3468/-0)
po/el.po (+3468/-0)
po/es.po (+4060/-0)
po/eu.po (+3421/-0)
po/fi.po (+3419/-0)
po/fr.po (+3586/-0)
po/gl.po (+3440/-0)
po/he.po (+2840/-0)
po/hu.po (+3458/-0)
po/it.po (+3520/-0)
po/ja.po (+3464/-0)
po/km.po (+3423/-0)
po/ko.po (+3400/-0)
po/ku.po (+3193/-0)
po/lt.po (+3309/-0)
po/makefile (+94/-0)
po/mr.po (+3439/-0)
po/nb.po (+3511/-0)
po/ne.po (+3430/-0)
po/nl.po (+3481/-0)
po/nn.po (+3459/-0)
po/pl.po (+3467/-0)
po/pt.po (+3648/-0)
po/pt_BR.po (+3567/-0)
po/ro.po (+3504/-0)
po/ru.po (+3510/-0)
po/sk.po (+3429/-0)
po/sl.po (+3626/-0)
po/sv.po (+3485/-0)
po/th.po (+3408/-0)
po/tl.po (+3505/-0)
po/uk.po (+3498/-0)
po/vi.po (+3475/-0)
po/zh_CN.po (+3451/-0)
po/zh_TW.po (+3365/-0)
share/apt-auth-failure.note (+11/-0)
test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Packages (+25/-0)
test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release (+13/-0)
test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-broken_Release.gpg (+7/-0)
test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Packages (+25/-0)
test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release (+13/-0)
test/authReliability/lists/people.ubuntu.com_%7emvo_apt_auth-test-suit_gpg-package-ok_Release.gpg (+7/-0)
test/authReliability/sources.list.failure (+2/-0)
test/authReliability/sources.list.good (+2/-0)
test/conf.cc (+37/-0)
test/conf_clear.cc (+23/-0)
test/extract-control.cc (+42/-0)
test/fake-status (+16/-0)
test/hash.cc (+70/-0)
test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order (+67/-0)
test/integration/Packages-bug-591882-conkeror (+1787/-0)
test/integration/Packages-bug-593360-modifiers-in-names (+42/-0)
test/integration/Packages-bug-598669-install-postfix-gets-exim-heavy (+30/-0)
test/integration/Packages-bug-604222-new-and-autoremove (+68/-0)
test/integration/Packages-bug-605394-versioned-or-groups (+71/-0)
test/integration/Packages-bug-64141-install-dependencies-for-on-hold (+42/-0)
test/integration/Packages-pdiff-usage (+34/-0)
test/integration/Packages-pdiff-usage-new (+37/-0)
test/integration/Packages-policy-pinning (+12/-0)
test/integration/Packages-releasefile-verification (+18/-0)
test/integration/Packages-releasefile-verification-new (+21/-0)
test/integration/Packages-ubuntu-bug-614993 (+1819/-0)
test/integration/Packages-xorg-break-providers (+52/-0)
test/integration/create-test-data (+47/-0)
test/integration/framework (+691/-0)
test/integration/run-tests (+27/-0)
test/integration/status-bug-590438-broken-provides-thanks-to-remove-order (+97/-0)
test/integration/status-bug-591882-conkeror (+1357/-0)
test/integration/status-bug-598669-install-postfix-gets-exim-heavy (+30/-0)
test/integration/status-bug-601961-install-info (+42/-0)
test/integration/status-bug-604222-new-and-autoremove (+10/-0)
test/integration/status-bug-605394-versioned-or-groups (+34/-0)
test/integration/status-bug-612557-garbage-upgrade (+34/-0)
test/integration/status-bug-613420-new-garbage-dependency (+22/-0)
test/integration/status-bug-64141-install-dependencies-for-on-hold (+33/-0)
test/integration/status-ubuntu-bug-614993 (+5894/-0)
test/integration/status-xorg-break-providers (+22/-0)
test/integration/test-apt-get-autoremove (+51/-0)
test/integration/test-apt-get-changelog (+36/-0)
test/integration/test-apt-get-download (+29/-0)
test/integration/test-bug-254770-segfault-if-cache-not-buildable (+57/-0)
test/integration/test-bug-330162-encoded-tar-header (+11/-0)
test/integration/test-bug-549968-install-depends-of-not-installed (+26/-0)
test/integration/test-bug-590041-prefer-non-virtual-packages (+51/-0)
test/integration/test-bug-590438-broken-provides-thanks-to-remove-order (+98/-0)
test/integration/test-bug-591882-conkeror (+75/-0)
test/integration/test-bug-593360-modifiers-in-names (+64/-0)
test/integration/test-bug-595691-empty-and-broken-archive-files (+144/-0)
test/integration/test-bug-598669-install-postfix-gets-exim-heavy (+19/-0)
test/integration/test-bug-601016-description-translation (+92/-0)
test/integration/test-bug-601961-install-info (+38/-0)
test/integration/test-bug-604222-new-and-autoremove (+66/-0)
test/integration/test-bug-604401-files-are-directories (+66/-0)
test/integration/test-bug-605394-versioned-or-groups (+25/-0)
test/integration/test-bug-611729-mark-as-manual (+84/-0)
test/integration/test-bug-612099-multiarch-conflicts (+212/-0)
test/integration/test-bug-612557-garbage-upgrade (+60/-0)
test/integration/test-bug-612958-use-dpkg-multiarch-config (+59/-0)
test/integration/test-bug-613420-new-garbage-dependency (+37/-0)
test/integration/test-bug-618848-always-respect-user-requests (+32/-0)
test/integration/test-bug-64141-install-dependencies-for-on-hold (+34/-0)
test/integration/test-compressed-indexes (+132/-0)
test/integration/test-disappearing-packages (+54/-0)
test/integration/test-pdiff-usage (+45/-0)
test/integration/test-policy-pinning (+228/-0)
test/integration/test-release-candidate-switching (+419/-0)
test/integration/test-releasefile-verification (+160/-0)
test/integration/test-ubuntu-bug-365611-long-package-names (+11/-0)
test/integration/test-ubuntu-bug-614993 (+59/-0)
test/integration/test-xorg-break-providers (+43/-0)
test/libapt/assert.h (+21/-0)
test/libapt/commandlineasstring_test.cc (+39/-0)
test/libapt/compareversion_test.cc (+123/-0)
test/libapt/getarchitectures_test.cc (+61/-0)
test/libapt/getlanguages_test.cc (+182/-0)
test/libapt/getlistoffilesindir_test.cc (+82/-0)
test/libapt/globalerror_test.cc (+109/-0)
test/libapt/makefile (+48/-0)
test/libapt/parsedepends_test.cc (+196/-0)
test/libapt/run-tests (+66/-0)
test/local-repo/Packages (+11/-0)
test/local-repo/Release (+13/-0)
test/local-repo/Release.gpg (+7/-0)
test/makefile (+74/-0)
test/mthdcat.cc (+20/-0)
test/networkless-install-fixes/README (+5/-0)
test/networkless-install-fixes/sources.test.list (+25/-0)
test/networkless-install-fixes/test.sh (+25/-0)
test/pre-upload-check.py (+266/-0)
test/rpmver.cc (+117/-0)
test/scratch.cc (+105/-0)
test/test-indexes.sh (+235/-0)
test/test_udevcdrom.cc (+19/-0)
test/testdeb.cc (+39/-0)
test/testextract.cc (+98/-0)
test/testkeys/mvo.key (+1182/-0)
test/testsources.list/sources.list.all-gpg-broken (+2/-0)
test/testsources.list/sources.list.all-gpg-ok (+2/-0)
test/testsources.list/sources.list.all-release-broken (+1/-0)
test/testsources.list/sources.list.all-release-ok (+1/-0)
test/testsources.list/sources.list.all-validuntil-broken (+1/-0)
test/testsources.list/sources.list.md5-package-broken (+2/-0)
test/testsources.list/sources.list.md5-package-ok (+2/-0)
test/testsources.list/sources.list.md5-release-broken (+1/-0)
test/testsources.list/sources.list.md5-release-ok (+1/-0)
test/testsources.list/sources.list.sha1-release-broken (+1/-0)
test/testsources.list/sources.list.sha1-release-ok (+1/-0)
test/testsources.list/sources.list.sha256-package-broken (+2/-0)
test/testsources.list/sources.list.sha256-package-ok (+2/-0)
test/testsources.list/sources.list.sha256-release-broken (+1/-0)
test/testsources.list/sources.list.sha256-release-ok (+1/-0)
test/uri.cc (+34/-0)
test/versions.lst (+106/-0)
Conflict adding file .bzr-builddeb.  Moved existing file to .bzr-builddeb.moved.
Conflict adding file AUTHORS.  Moved existing file to AUTHORS.moved.
Conflict adding file BUGS.  Moved existing file to BUGS.moved.
Conflict adding file COMPILING.  Moved existing file to COMPILING.moved.
Conflict adding file COPYING.GPL.  Moved existing file to COPYING.GPL.moved.
Conflict adding file COPYING.  Moved existing file to COPYING.moved.
Conflict adding file Makefile.  Moved existing file to Makefile.moved.
Conflict adding file README.MultiArch.  Moved existing file to README.MultiArch.moved.
Conflict adding file README.ddtp.  Moved existing file to README.ddtp.moved.
Conflict adding file README.make.  Moved existing file to README.make.moved.
Conflict adding file README.progress-reporting.  Moved existing file to README.progress-reporting.moved.
Conflict adding file abicheck.  Moved existing file to abicheck.moved.
Conflict adding file apt-inst.  Moved existing file to apt-inst.moved.
Conflict adding file apt-pkg.  Moved existing file to apt-pkg.moved.
Conflict adding file buildlib.  Moved existing file to buildlib.moved.
Conflict adding file cmdline.  Moved existing file to cmdline.moved.
Conflict adding file configure.in.  Moved existing file to configure.in.moved.
Conflict adding file debian.  Moved existing file to debian.moved.
Conflict adding file doc.  Moved existing file to doc.moved.
Conflict adding file dselect.  Moved existing file to dselect.moved.
Conflict adding file ftparchive.  Moved existing file to ftparchive.moved.
Conflict adding file methods.  Moved existing file to methods.moved.
Conflict adding file mirror-failure.py.  Moved existing file to mirror-failure.py.moved.
Conflict adding file po.  Moved existing file to po.moved.
Conflict adding file share.  Moved existing file to share.moved.
Conflict adding file test.  Moved existing file to test.moved.
To merge this branch: bzr merge lp:~brian-murray/apt/history-log
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Ubuntu Core Development Team Pending
Review via email: mp+63163@code.launchpad.net

Description of the change

This branch adds in /var/log/apt/history.log to apport-package bug reports. Additionally, it prevents writing of apport reports in the event that dpkg returns an ENOENT error.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a bunch! I fixed a small typo and merged it. Please note that I couldn't merge directly as lp:ubuntu/apt does not point to lp:~ubuntu-core-dev/apt/ubuntu I need to figure out how to fix this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory '.bzr-builddeb'
=== renamed directory '.bzr-builddeb' => '.bzr-builddeb.moved'
=== added file '.bzr-builddeb/default.conf'
--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
+++ .bzr-builddeb/default.conf 2011-06-01 19:45:47 +0000
@@ -0,0 +1,2 @@
1[BUILDDEB]
2native = True
03
=== added file 'AUTHORS'
--- AUTHORS 1970-01-01 00:00:00 +0000
+++ AUTHORS 2011-06-01 19:45:47 +0000
@@ -0,0 +1,64 @@
1The project contributors:
2
3Michael Vogt <mvo@debian.org>
4- Development, bug fixes
5
6David Kalnischkies <kalnischkies+debian@gmail.com>
7- Development, bug fixes
8
9Christian Perrier <bubulle@debian.org>
10- Translations hero/coordinator
11
12
13Past Contributors:
14
15Robert Collins <robert.collins@canonical.com>
16- Change the package index Info methods to allow apt-cache policy to be useful
17 when using several different archives on the same host.
18
19Julian Andres Klode
20- Development, bug fixes
21
22Eugene V. Lyubimkin
23- Development, bug fixes
24
25Otavio Salvador
26- Development, bug fixes
27
28Luca Bruno
29- Development, bug fixes
30
31CVS:jgg Jason Gunthorpe <jgg@debian.org>
32- The Mad Cow incarnate
33
34CVS:mdz Matt Zimmerman <mdz@debian.org>
35- Ongoing maintenance and coordination of development
36
37CVS:piefel Michael Piefel <piefel@debian.org>
38- i18n and l10n
39
40CVS:che Ben Gertzfield <che@debian.org>
41- Packaging and Releases
42
43CVS:bod Brendan O'Dea <bod@debian.org>
44- Perl Bindings
45
46CVS:tausq Randolph Chung <tausq@debian.org>
47- Patches, Fixes, Debugging, GUIs and Releases
48
49Isaac Jones <ijones@syntaxpolice.org> and Colin Walters <walters@debian.org>
50 Initial implementation of authentication support (Release.gpg)
51
52Brian White <bcwhite@verisim.com> - Project originator
53Tom Lees <tom@lpsg.demon.co.uk> - DPKG documentation and ideas
54Behan Webster <behanw@verisim.com> - Original GUI design
55Scott Ellis <storm@gate.net> - Original packaging and beta releases
56Branden Robinson <branden@purdue.edu> - Man Page Documentation
57Manoj Srivastava <srivasta@datasync.com> - 1st Generation FTP method and
58 dselect setup script
59Adam Heath <doogie@debian.org> - 2nd Generation FTP method author
60Ben Collins <bcollins@debian.org> - Initial RSH method
61Many other bug reports through the Debian Bug system
62
63NOTE: The ChangeLog generator will parse for names and email addresses. The
64'CVS:<name>' tag should indicate who this pair refers to.
065
=== renamed file 'AUTHORS' => 'AUTHORS.moved'
=== added file 'BUGS'
--- BUGS 1970-01-01 00:00:00 +0000
+++ BUGS 2011-06-01 19:45:47 +0000
@@ -0,0 +1,9 @@
1
2DDTP problems:
3--------------
4- apt-get update clean the /var/lib/apt/lists dir
5 from all Translation-$index that are not in the current
6 enviroment or Translations apt variable
7- there needs to be a list of locales (pt, sv, en) that need
8 both language and country code to get the right file
9 (is in the code in indexfile::LanguageCode(), just a bit ugly
010
=== renamed file 'BUGS' => 'BUGS.moved'
=== added file 'COMPILING'
--- COMPILING 1970-01-01 00:00:00 +0000
+++ COMPILING 2011-06-01 19:45:47 +0000
@@ -0,0 +1,85 @@
1General Information
2~~~~~~~~~~~~~~~~~~~
3To compile this you need a couple things
4 - A working POSIX system with working POSIX gcc, g++, make (GNU),
5 ar, sh, awk and sed in the path
6 - GNU Make 3.74 or so, -- normal UNIX make will NOT work
7 * Note 3.77 is broken.
8 - A working ANSI C++ compiler, this is not g++ 2.7.*
9 g++ 2.8 works OK and newer egcs work well also. Nobody has tried it
10 on other compilers :< You will need a properly working STL as well.
11 - A C library with the usual POSIX functions and a BSD socket layer.
12 If your OS conforms to the Single Unix Spec then you are fine:
13 http://www.opengroup.org/onlinepubs/7908799/index.html
14 - Refer to the Build-Depends information in debian/control for
15 additional requirements (some of which are Debian-specific)
16
17** NOTICE **
18The C++ global constructors do not link correctly when using non-shared
19libraries. This is probably the correct behavior of the linker, but I have
20not yet had time to devise a work around for it. The correct thing to
21do is add a reference to debSystem in apt-pkg/init.cc,
22assert(&debSystem == 0) would be fine for instance.
23
24Guidelines
25~~~~~~~~~~
26I am not interested in making 'ultra portable code'. I will accept patches
27to make the code that already exists conform more to SUS or POSIX, but
28I don't really care if your not-SUS OS doesn't work. It is simply too
29much work to maintain patches for dysfunctional OSs. I highly suggest you
30contact your vendor and express intrest in a conforming C library.
31
32That said, there are lots of finicky problems that must be dealt with even
33between the supported OS's. Primarily the path I choose to take is to put
34a shim header file in build/include that transparently adds the required
35functionality. Patches to make autoconf detect these cases and generate the
36required shims are OK.
37
38Current shims:
39 * C99 integer types 'inttypes.h'
40 * sys/statvfs.h to convert from BSD/old-glibc statfs to SUS statvfs
41 * rfc2553 hostname resolution (methods/rfc*), shims to normal gethostbyname.
42 The more adventurous could steal the KAME IPv6 enabled resolvers for those
43 OS's with IPv6 support but no rfc2553 (why?)
44 * define _XOPEN_EXTENDED_SOURCE to bring in h_errno on HP-UX
45 * socklen_t shim in netdb.h if the OS does not have socklen_t
46
47The only completely non-shimmed OS is Linux with glibc2.1, glibc2.0 requires
48the first three shims.
49
50Platform Notes
51~~~~~~~~~~~~~~
52Debian GNU Linux 2.1 'slink'
53Debian GNU Linux 'potato'
54Debian GNU Linux 'woody'
55 * All Archs
56 - Works flawlessly
57 - You will want to have debiandoc-sgml and docbook2man installed to get
58 best results.
59 - No IPv6 Support in glibc's < 2.1.
60
61Sun Solaris
62 SunOS cab101 5.7 Generic_106541-04 sun4u sparc
63 SunOS csu201 5.8 Generic_108528-04 sun4u sparc
64 - Works fine
65 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
66
67OpenBSD
68 OpenBSD gsb086 2.5 CMPUT#0 i386 unknown
69 OpenBSD csu101 2.7 CMPUT#1 i386 unknown
70 - OS needs 'ranlib' to generate the symbol table after 'ar'.. (not using
71 GNU ar with the gnu tool chain :<)
72 - '2.5' does not have RFC 2553 hostname resolution, but '2.7' does
73 - Testing on '2.7' suggests the OS has a bug in its handling of
74 ftruncate on files that have been written via mmap. It fills the page
75 that crosses the truncation boundary with 0's.
76
77HP-UX
78 HP-UX nyquist B.10.20 C 9000/780 2016574337 32-user license
79 - Evil OS, does not conform very well to SUS
80 1) snprintf exists but is not prototyped, ignore spurious warnings
81 2) No socklen_t
82 3) Requires -D_XOPEN_SOURCE_EXTENDED for h_errno
83 configure should fix the last two (see above)
84 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
85
086
=== renamed file 'COMPILING' => 'COMPILING.moved'
=== added file 'COPYING'
--- COPYING 1970-01-01 00:00:00 +0000
+++ COPYING 2011-06-01 19:45:47 +0000
@@ -0,0 +1,23 @@
1Apt is copyright 1997, 1998, 1999 Jason Gunthorpe and others.
2Apt is currently developed by APT Development Team <deity@lists.debian.org>.
3
4License: GPLv2+
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19
20See /usr/share/common-licenses/GPL-2, or
21<http://www.gnu.org/copyleft/gpl.txt> for the terms of the latest version
22of the GNU General Public License.
23
024
=== added file 'COPYING.GPL'
--- COPYING.GPL 1970-01-01 00:00:00 +0000
+++ COPYING.GPL 2011-06-01 19:45:47 +0000
@@ -0,0 +1,340 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Library General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
059
60 GNU GENERAL PUBLIC LICENSE
61 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62
63 0. This License applies to any program or other work which contains
64a notice placed by the copyright holder saying it may be distributed
65under the terms of this General Public License. The "Program", below,
66refers to any such program or work, and a "work based on the Program"
67means either the Program or any derivative work under copyright law:
68that is to say, a work containing the Program or a portion of it,
69either verbatim or with modifications and/or translated into another
70language. (Hereinafter, translation is included without limitation in
71the term "modification".) Each licensee is addressed as "you".
72
73Activities other than copying, distribution and modification are not
74covered by this License; they are outside its scope. The act of
75running the Program is not restricted, and the output from the Program
76is covered only if its contents constitute a work based on the
77Program (independent of having been made by running the Program).
78Whether that is true depends on what the Program does.
79
80 1. You may copy and distribute verbatim copies of the Program's
81source code as you receive it, in any medium, provided that you
82conspicuously and appropriately publish on each copy an appropriate
83copyright notice and disclaimer of warranty; keep intact all the
84notices that refer to this License and to the absence of any warranty;
85and give any other recipients of the Program a copy of this License
86along with the Program.
87
88You may charge a fee for the physical act of transferring a copy, and
89you may at your option offer warranty protection in exchange for a fee.
90
91 2. You may modify your copy or copies of the Program or any portion
92of it, thus forming a work based on the Program, and copy and
93distribute such modifications or work under the terms of Section 1
94above, provided that you also meet all of these conditions:
95
96 a) You must cause the modified files to carry prominent notices
97 stating that you changed the files and the date of any change.
98
99 b) You must cause any work that you distribute or publish, that in
100 whole or in part contains or is derived from the Program or any
101 part thereof, to be licensed as a whole at no charge to all third
102 parties under the terms of this License.
103
104 c) If the modified program normally reads commands interactively
105 when run, you must cause it, when started running for such
106 interactive use in the most ordinary way, to print or display an
107 announcement including an appropriate copyright notice and a
108 notice that there is no warranty (or else, saying that you provide
109 a warranty) and that users may redistribute the program under
110 these conditions, and telling the user how to view a copy of this
111 License. (Exception: if the Program itself is interactive but
112 does not normally print such an announcement, your work based on
113 the Program is not required to print an announcement.)
114
1115
116These requirements apply to the modified work as a whole. If
117identifiable sections of that work are not derived from the Program,
118and can be reasonably considered independent and separate works in
119themselves, then this License, and its terms, do not apply to those
120sections when you distribute them as separate works. But when you
121distribute the same sections as part of a whole which is a work based
122on the Program, the distribution of the whole must be on the terms of
123this License, whose permissions for other licensees extend to the
124entire whole, and thus to each and every part regardless of who wrote it.
125
126Thus, it is not the intent of this section to claim rights or contest
127your rights to work written entirely by you; rather, the intent is to
128exercise the right to control the distribution of derivative or
129collective works based on the Program.
130
131In addition, mere aggregation of another work not based on the Program
132with the Program (or with a work based on the Program) on a volume of
133a storage or distribution medium does not bring the other work under
134the scope of this License.
135
136 3. You may copy and distribute the Program (or a work based on it,
137under Section 2) in object code or executable form under the terms of
138Sections 1 and 2 above provided that you also do one of the following:
139
140 a) Accompany it with the complete corresponding machine-readable
141 source code, which must be distributed under the terms of Sections
142 1 and 2 above on a medium customarily used for software interchange; or,
143
144 b) Accompany it with a written offer, valid for at least three
145 years, to give any third party, for a charge no more than your
146 cost of physically performing source distribution, a complete
147 machine-readable copy of the corresponding source code, to be
148 distributed under the terms of Sections 1 and 2 above on a medium
149 customarily used for software interchange; or,
150
151 c) Accompany it with the information you received as to the offer
152 to distribute corresponding source code. (This alternative is
153 allowed only for noncommercial distribution and only if you
154 received the program in object code or executable form with such
155 an offer, in accord with Subsection b above.)
156
157The source code for a work means the preferred form of the work for
158making modifications to it. For an executable work, complete source
159code means all the source code for all modules it contains, plus any
160associated interface definition files, plus the scripts used to
161control compilation and installation of the executable. However, as a
162special exception, the source code distributed need not include
163anything that is normally distributed (in either source or binary
164form) with the major components (compiler, kernel, and so on) of the
165operating system on which the executable runs, unless that component
166itself accompanies the executable.
167
168If distribution of executable or object code is made by offering
169access to copy from a designated place, then offering equivalent
170access to copy the source code from the same place counts as
171distribution of the source code, even though third parties are not
172compelled to copy the source along with the object code.
173
2174
175 4. You may not copy, modify, sublicense, or distribute the Program
176except as expressly provided under this License. Any attempt
177otherwise to copy, modify, sublicense or distribute the Program is
178void, and will automatically terminate your rights under this License.
179However, parties who have received copies, or rights, from you under
180this License will not have their licenses terminated so long as such
181parties remain in full compliance.
182
183 5. You are not required to accept this License, since you have not
184signed it. However, nothing else grants you permission to modify or
185distribute the Program or its derivative works. These actions are
186prohibited by law if you do not accept this License. Therefore, by
187modifying or distributing the Program (or any work based on the
188Program), you indicate your acceptance of this License to do so, and
189all its terms and conditions for copying, distributing or modifying
190the Program or works based on it.
191
192 6. Each time you redistribute the Program (or any work based on the
193Program), the recipient automatically receives a license from the
194original licensor to copy, distribute or modify the Program subject to
195these terms and conditions. You may not impose any further
196restrictions on the recipients' exercise of the rights granted herein.
197You are not responsible for enforcing compliance by third parties to
198this License.
199
200 7. If, as a consequence of a court judgment or allegation of patent
201infringement or for any other reason (not limited to patent issues),
202conditions are imposed on you (whether by court order, agreement or
203otherwise) that contradict the conditions of this License, they do not
204excuse you from the conditions of this License. If you cannot
205distribute so as to satisfy simultaneously your obligations under this
206License and any other pertinent obligations, then as a consequence you
207may not distribute the Program at all. For example, if a patent
208license would not permit royalty-free redistribution of the Program by
209all those who receive copies directly or indirectly through you, then
210the only way you could satisfy both it and this License would be to
211refrain entirely from distribution of the Program.
212
213If any portion of this section is held invalid or unenforceable under
214any particular circumstance, the balance of the section is intended to
215apply and the section as a whole is intended to apply in other
216circumstances.
217
218It is not the purpose of this section to induce you to infringe any
219patents or other property right claims or to contest validity of any
220such claims; this section has the sole purpose of protecting the
221integrity of the free software distribution system, which is
222implemented by public license practices. Many people have made
223generous contributions to the wide range of software distributed
224through that system in reliance on consistent application of that
225system; it is up to the author/donor to decide if he or she is willing
226to distribute software through any other system and a licensee cannot
227impose that choice.
228
229This section is intended to make thoroughly clear what is believed to
230be a consequence of the rest of this License.
231
3232
233 8. If the distribution and/or use of the Program is restricted in
234certain countries either by patents or by copyrighted interfaces, the
235original copyright holder who places the Program under this License
236may add an explicit geographical distribution limitation excluding
237those countries, so that distribution is permitted only in or among
238countries not thus excluded. In such case, this License incorporates
239the limitation as if written in the body of this License.
240
241 9. The Free Software Foundation may publish revised and/or new versions
242of the General Public License from time to time. Such new versions will
243be similar in spirit to the present version, but may differ in detail to
244address new problems or concerns.
245
246Each version is given a distinguishing version number. If the Program
247specifies a version number of this License which applies to it and "any
248later version", you have the option of following the terms and conditions
249either of that version or of any later version published by the Free
250Software Foundation. If the Program does not specify a version number of
251this License, you may choose any version ever published by the Free Software
252Foundation.
253
254 10. If you wish to incorporate parts of the Program into other free
255programs whose distribution conditions are different, write to the author
256to ask for permission. For software which is copyrighted by the Free
257Software Foundation, write to the Free Software Foundation; we sometimes
258make exceptions for this. Our decision will be guided by the two goals
259of preserving the free status of all derivatives of our free software and
260of promoting the sharing and reuse of software generally.
261
262 NO WARRANTY
263
264 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
265FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
266OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
267PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
268OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
269MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
270TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
271PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
272REPAIR OR CORRECTION.
273
274 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
275WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
276REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
277INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
278OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
279TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
280YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
281PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
282POSSIBILITY OF SUCH DAMAGES.
283
284 END OF TERMS AND CONDITIONS
285
4286
287 How to Apply These Terms to Your New Programs
288
289 If you develop a new program, and you want it to be of the greatest
290possible use to the public, the best way to achieve this is to make it
291free software which everyone can redistribute and change under these terms.
292
293 To do so, attach the following notices to the program. It is safest
294to attach them to the start of each source file to most effectively
295convey the exclusion of warranty; and each file should have at least
296the "copyright" line and a pointer to where the full notice is found.
297
298 <one line to give the program's name and a brief idea of what it does.>
299 Copyright (C) 19yy <name of author>
300
301 This program is free software; you can redistribute it and/or modify
302 it under the terms of the GNU General Public License as published by
303 the Free Software Foundation; either version 2 of the License, or
304 (at your option) any later version.
305
306 This program is distributed in the hope that it will be useful,
307 but WITHOUT ANY WARRANTY; without even the implied warranty of
308 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
309 GNU General Public License for more details.
310
311 You should have received a copy of the GNU General Public License
312 along with this program; if not, write to the Free Software
313 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
314
315
316Also add information on how to contact you by electronic and paper mail.
317
318If the program is interactive, make it output a short notice like this
319when it starts in an interactive mode:
320
321 Gnomovision version 69, Copyright (C) 19yy name of author
322 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
323 This is free software, and you are welcome to redistribute it
324 under certain conditions; type `show c' for details.
325
326The hypothetical commands `show w' and `show c' should show the appropriate
327parts of the General Public License. Of course, the commands you use may
328be called something other than `show w' and `show c'; they could even be
329mouse-clicks or menu items--whatever suits your program.
330
331You should also get your employer (if you work as a programmer) or your
332school, if any, to sign a "copyright disclaimer" for the program, if
333necessary. Here is a sample; alter the names:
334
335 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
336 `Gnomovision' (which makes passes at compilers) written by James Hacker.
337
338 <signature of Ty Coon>, 1 April 1989
339 Ty Coon, President of Vice
340
341This General Public License does not permit incorporating your program into
342proprietary programs. If your program is a subroutine library, you may
343consider it more useful to permit linking proprietary applications with the
344library. If this is what you want to do, use the GNU Library General
345Public License instead of this License.
5346
=== renamed file 'COPYING.GPL' => 'COPYING.GPL.moved'
=== renamed file 'COPYING' => 'COPYING.moved'
=== added file 'Makefile'
--- Makefile 1970-01-01 00:00:00 +0000
+++ Makefile 2011-06-01 19:45:47 +0000
@@ -0,0 +1,34 @@
1# -*- make -*-
2
3# This is the top level make file for APT, it recurses to each lower
4# level make file and runs it with the proper target
5ifndef NOISY
6.SILENT:
7endif
8
9.PHONY: default
10default: startup all
11
12.PHONY: headers library clean veryclean all binary program doc
13all headers library clean veryclean binary program doc dirs:
14 $(MAKE) -C apt-pkg $@
15 $(MAKE) -C apt-inst $@
16 $(MAKE) -C methods $@
17 $(MAKE) -C cmdline $@
18 $(MAKE) -C ftparchive $@
19 $(MAKE) -C dselect $@
20 $(MAKE) -C doc $@
21 $(MAKE) -C po $@
22
23# Some very common aliases
24.PHONY: maintainer-clean dist-clean distclean pristine sanity
25maintainer-clean dist-clean distclean pristine sanity: veryclean
26
27# The startup target builds the necessary configure scripts. It should
28# be used after a CVS checkout.
29CONVERTED=environment.mak include/config.h include/apti18n.h build/doc/Doxyfile makefile
30include buildlib/configure.mak
31$(BUILDDIR)/include/config.h: buildlib/config.h.in
32$(BUILDDIR)/include/apti18n.h: buildlib/apti18n.h.in
33$(BUILDDIR)/environment.mak: buildlib/environment.mak.in
34$(BUILDDIR)/makefile: buildlib/makefile.in
035
=== renamed file 'Makefile' => 'Makefile.moved'
=== added file 'README.MultiArch'
--- README.MultiArch 1970-01-01 00:00:00 +0000
+++ README.MultiArch 2011-06-01 19:45:47 +0000
@@ -0,0 +1,63 @@
1Before we start with this topic: Note that MultiArch is not yet ready for
2prime time and/or for the casual user. The implementation is so far widely
3untested and only useful for developers of packagemanagment tools which
4use APT and his friends and maintainers of (upcoming) MultiArch packages.
5This README is especially NOT written for the casual user and is NOT a
6usage guide - you have been warned. It is assumed that the reader has
7at least a bit of knowledge about APT internals, dependency relations
8and the MultiArch spec [0].
9
10Note also that the toolchain isn't ready yet, e.g. while you can simulate
11the installation of MultiArch packages they will more sooner than later
12cause enormous problems if really installed as dpkg can't handle MultiArch
13yet (no, --force-{overwrite,architecture} aren't good options here).
14Other parts of the big picture are missing and/or untested too.
15You have been warned!
16
17
18The implementation is focused on NOT breaking existing singleArch-only
19applications and/or systems as this is the current status-quo for all
20systems. Also, many systems don't need (or can't make use of) MultiArch,
21so APT will proceed in thinking SingleArch as long as it is not explicitly
22told to handle MultiArch:
23To activate MultiArch handling you need to specify architectures you
24want to be considered by APT with the config list APT::Architectures
25(Insert architectures in order of preference).
26APT will download Packages files for all these architectures in the
27update step. Exception: In the sourcelist is the optionfield used:
28deb [ arch=amd64,i386 ] http://example.org/ experimental main
29(This optionfield is a NOP in previous apt versions)
30
31Internally in APT a package is represented as a PkgIterator -
32before MultiArch this PkgIterator was architecture unaware,
33only VerIterators include the architecture they came from.
34This is/was a big problem as all versions in a package are
35considered for dependency resolution, so pinning will not work in all cases.
36
37The problem is solved by a conceptional change:
38A PkgIterator is now architecture aware, so the packages
39of foobar for amd64 and for i386 are now for apt internal totally
40different packages. That is a good thing for e.g. pinning, but
41sometimes you need the information that such packages are belonging together:
42All these foobar packages therefore form a Group accessible with GrpIterators.
43Note that the GrpIterator has the same name as all the packages in this group,
44so e.g. apt-cache pkgnames iterates over GrpIterator to get the package names:
45This is compatible to SingleArch as a Group consists only of a single package
46and also to MultiArch as a Group consists of possible many packages which
47all have the same name and are therefore out of interest for pkgnames.
48
49
50Given all these internal changes it is quite interesting that the actual
51implementation of MultiArch is trivial: Some implicit dependencies and a few
52more provides are all changes needed to get it working. Especially noteworthy
53is that it wasn't needed to change the resolver in any way and other parts only
54need to be told about using GrpIterator instead of PkgIterator, so chances are
55good that libapt-applications will proceed to work without or at least only
56require minor changes, but your mileage may vary…
57
58
59Known Issues and/or noteworthy stuff:
60* The implementation is mostly untested, so it is very likely that APT will
61 eat your kids if you aren't as lucky as the author of these patches.
62
63[0] https://wiki.ubuntu.com/MultiarchSpec
064
=== renamed file 'README.MultiArch' => 'README.MultiArch.moved'
=== added file 'README.ddtp'
--- README.ddtp 1970-01-01 00:00:00 +0000
+++ README.ddtp 2011-06-01 19:45:47 +0000
@@ -0,0 +1,74 @@
1TODO:
2- URL-Remap for the translation files (to hack around the problem that
3 they are not on any ftp server yet but only on http://ddtp.debian.org/)
4
5Here is the original announcement of the ddtp support:
6
7* To: debian-devel-announce@lists.debian.org
8* Subject: Translate files
9* From: Michael Bramer <grisu@debian.org>
10* Date: Sun, 6 Oct 2002 21:56:06 +0200
11* Mail-followup-to: debian-devel@lists.debian.org
12* Message-id: <20021006195605.GA30516@home.debsupport.de>
13* Old-return-path: <michael@home.debsupport.de>
14* User-agent: Mutt/1.3.28i
15
16Hello all
17
18After some discussion between Anthony Towns (a ftpmaster), Jason
19Gunthorpe (APT Developer) and some DDTP Coordinators we find a way to
20transfer the translated package descriptions from the archive to the
21user.
22
23The translated descriptions need to be downloadable befor any
24installation process, like the other package meta information. We
25choose a new file per languages with all translated package
26descriptions. The package system can download one or more of this
27files at 'apt-get update' time and know the translations.
28
29The new files are names 'Translate-$lang' and the file have this
30rfc822-format:
31 Package: &lt;package-name&gt;
32 Description-md5: &lt;the md5 checksum of the english description&gt;
33 Description-$lang.$encoding: &lt;translated headline&gt;
34 &lt;translated section&gt;
35
36The encoding of the Description is 'UTF-8' in all languages normal.
37The files will be located at 'debian/dists/sid/main/i18n/' on the ftp
38server (for all architecture). In addition of the plain
39'Translate-$lang' file, there will be a 'gz' and a 'bz2' version and
40in future also the new incremental format version.
41
42The &lt;the md5 checksum of the english description&gt; is the md5 checksum
43of the full english description, without the 'Description: '-tag and
44with all spaces and newlines. Look at this example:
45 Description: XXX
46 YYY
47 .
48 ZZZ
49is md5(&quot;XXX\n YYY\n .\n ZZZ\n&quot;) (perl-syntax).
50
51
52A future APT version will download one or some 'Translate-$lang'
53file(s) at 'update'-time. After this download it show a translated
54description instead of the english form, if it found a translated
55description of the package with the right md5 chechsum. The enviroment
56of the user will controlled this process (LANG, LANGUAGE, LC_MESSAGES,
57etc). With this the package system will never show a outdated
58translation.
59
60The translations come all from the DDTP. A daily process on
61ddtp.debian.org make new 'Translated-$lang' files and a script on
62ftp-master request this files and move this to the debian archive.
63Now the first files are accessable at
64 <a href="http://ddtp.debian.org/pdesc/translatefiles/">http://ddtp.debian.org/pdesc/translatefiles/</a>
65
66If you found wrong translations, please read the guides on
67ddtp.debian.org, make a better translation and send this per mail to
68the DDTP server. Don't bug the package maintainer!
69
70Thanks
71Grisu
72--
73Michael Bramer - a Debian Linux Developer <a href="http://www.debsupport.de">http://www.debsupport.de</a>
74PGP: finger grisu@db.debian.org -- Linux Sysadmin -- Use Debian Linux
075
=== renamed file 'README.ddtp' => 'README.ddtp.moved'
=== added file 'README.make'
--- README.make 1970-01-01 00:00:00 +0000
+++ README.make 2011-06-01 19:45:47 +0000
@@ -0,0 +1,112 @@
1The Make System
2~~~ ~~~~ ~~~~~~
3To compile this program you require GNU Make. In fact you probably need
4GNU Make 3.76.1 or newer. The makefiles contained make use of many
5GNU Make specific features and will not run on other makes.
6
7The make system has a number of interesting properties that are not found
8in other systems such as automake or the GNU makefile standards. In
9general some semblance of expectedness is kept so as not to be too
10surprising. Basically the following will work as expected:
11
12 ./configure
13 make
14 or
15 cd build
16 ../configure
17 make
18
19There are a number of other things that are possible that may make software
20development and software packaging simpler. The first of these is the
21environment.mak file. When configure is run it creates an environment.mak
22file in the build directory. This contains -all- configurable parameters
23for all of the make files in all of the subdirectories. Changing one
24of these parameters will have an immediate effect. The use of makefile.in
25and configure substitutions across build makefiles is not used at all.
26
27Furthermore, the make system runs with a current directory equal to the
28source directory irregardless of the destination directory. This means
29#include "" and #include <> work as expected and more importantly
30running 'make' in the source directory will work as expected. The
31environment variable or make parameter 'BUILD' sets the build directory.
32It may be an absolute path or a path relative to the top level directory.
33By default build-arch/ then build/ will be used with a fall back to ./ This
34means you can get all the advantages of a build directory without having to
35cd into it to edit your source code!
36
37The make system also performs dependency generation on the fly as the
38compiler runs. This is extremely fast and accurate. There is however
39one failure condition that occurs when a header file is erased. In
40this case you should run make clean to purge the .o and .d files to
41rebuild.
42
43The final significant deviation from normal make practices is
44in how the build directory is managed. It is not nearly a mirror of
45the source directory but is logically divided in the following manner
46 bin/
47 methods/
48 doc/
49 examples/
50 include/
51 apt-pkg/
52 obj/
53 apt-pkg/
54 cmdline/
55 [...]
56Only .o and .d files are placed in the obj/ subdirectory. The final compiled
57binaries are placed in bin, published headers for inter-component linking
58are placed in include/ and documentation is generated into doc/. This means
59all runnable programs are within the bin/ directory, a huge benefit for
60debugging inter-program relationships. The .so files are also placed in
61bin/ for simplicity.
62
63By default make is put into silent mode. During operation there should be
64no shell or compiler messages only status messages from the makefiles,
65if any pop up that indicates there may be a problem with your environment.
66For debugging you can disable this by setting NOISY=1, ala
67 make NOISY=1
68
69Using the makefiles
70~~~~~ ~~~ ~~~~~~~~~
71The makefiles for the components are really simple. The complexity is hidden
72within the buildlib/ directory. Each makefile defines a set of make variables
73for the bit it is going to make then includes a makefile fragment from
74the buildlib/. This fragment generates the necessary rules based on the
75originally defined variables. This process can be repeated as many times as
76necessary for as many programs or libraries as are in the directory.
77
78Many of the make fragments have some useful properties involving sub
79directories and other interesting features. They are more completely
80described in the fragment code in buildlib. Some tips on writing fragments
81are included in buildlib/defaults.mak
82
83The fragments are NEVER processed by configure, so if you make changes to
84them they will have an immediate effect.
85
86Autoconf
87~~~~~~~~
88Straight out of CVS you have to initialize autoconf. This requires
89automake (I really don't know why) and autoconf and requires doing
90 aclocal -I buildlib
91 autoconf
92[Alternatively you can run make startup in the top level build dir]
93
94Autoconf is configured to do some basic system probes for optional and
95required functionality and generate an environment.mak and include/config.h
96from it's findings. It will then write a 'makefile' and run make dirs to
97create the output directory tree.
98
99It is not my belief that autoconf should be used to generate substantial
100source code markup to escape OS problems. If an OS problem does crop up
101it can likely be corrected by installing the correct files into the
102build include/ dir and perhaps writing some replacement code and
103linking it in. To the fullest extent possible the source code should conform
104to standards and not cater to broken systems.
105
106Autoconf will also write a makefile into the top level of the build dir,
107this simply acts as a wrapper to the main top level make in the source tree.
108There is one big warning, you can't use both this make file and the
109ones in the top level tree. Make is not able to resolve rules that
110go to the same file through different paths and this will confuse the
111depends mechanism. I recommend always using the makefiles in the
112source directory and exporting BUILD.
0113
=== renamed file 'README.make' => 'README.make.moved'
=== added file 'README.progress-reporting'
--- README.progress-reporting 1970-01-01 00:00:00 +0000
+++ README.progress-reporting 2011-06-01 19:45:47 +0000
@@ -0,0 +1,69 @@
1Install-progress reporting
2--------------------------
3
4If the apt options: "APT::Status-Fd" is set, apt will send status
5reports to that fd. The status information is seperated with a ':',
6there are the following status conditions:
7
8status = {"pmstatus", "dlstatus", "conffile-prompt", "error", "media-change" }
9
10The reason for using a fd instead of a OpProgress class is that many
11apt frontend fork a (vte) terminal for the actual installation.
12
13The reason to do the mapping and l10n of the dpkg states to human
14readable (and translatable) strings is that this way the translation
15needs to be done only once for all frontends.
16
17
18pmstatus
19--------
20Status of the package manager (dpkg). This is send when packages
21are installed/removed.
22pmstatus:pkgname:TotalPercentage:action-description
23
24PkgName = the name of the package
25TotalPercentage = the total progress between [0..100]
26description = a i18ned human readable decription of the current action
27
28
29Example:
30# ./apt-get install -o APT::Status-Fd=2 3dchess >/dev/null
31pmstatus:3dchess:20:Preparing 3dchess
32pmstatus:3dchess:40:Unpacking 3dchess
33pmstatus:3dchess:60:Preparing to configure 3dchess
34pmstatus:3dchess:80:Configuring 3dchess
35pmstatus:3dchess:100:Installed 3dchess
36
37pmerror
38-------
39pmerror:deb:TotalPercentage:error string
40
41Example:
42pmerror: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : 75% : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data
43
44
45pmconffile
46----------
47pmconffile:conffile:percent:'current-conffile' 'new-conffile' useredited distedited
48
49
50media-change
51------------
52media-change:medium:drive:human-readable string
53
54example:
55media-change: Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830):/cdrom/:Please insert the disc labeled: 'Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830)' in the drive '/cdrom/' and press enter.
56
57
58dlstatus
59--------
60dlstatus:AlreadDownloaded:TotalPercentage:action-description
61
62AlreadyDownloaded = the number of already downloaded packages
63TotalPercentage = the total progress between [0..100]
64description = a i18ned human readable decription of the current action
65
66Example:
67dlstatus:1:9.05654:Downloading file 1 of 3 (4m40s remaining)
68dlstatus:1:9.46357:Downloading file 1 of 3 (4m39s remaining)
69dlstatus:1:9.61022:Downloading file 1 of 3 (4m38s remaining)
0\ No newline at end of file70\ No newline at end of file
171
=== renamed file 'README.progress-reporting' => 'README.progress-reporting.moved'
=== added directory 'abicheck'
=== renamed directory 'abicheck' => 'abicheck.moved'
=== added file 'abicheck/abi-compliance-checker.pl'
--- abicheck/abi-compliance-checker.pl 1970-01-01 00:00:00 +0000
+++ abicheck/abi-compliance-checker.pl 2011-06-01 19:45:47 +0000
@@ -0,0 +1,7325 @@
1#!/usr/bin/perl
2###########################################################################
3# ABI-compliance-checker v1.13, lightweight tool for statically checking
4# backward binary compatibility of shared C/C++ libraries in Linux.
5# Copyright (C) The Linux Foundation
6# Copyright (C) Institute for System Programming, RAS
7# Author: Andrey Ponomarenko
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21###########################################################################
22use Getopt::Long;
23Getopt::Long::Configure ("posix_default", "no_ignore_case");
24use Data::Dumper;
25
26my $ABI_COMPLIANCE_CHECKER_VERSION = "1.13";
27my ($Help, $ShowVersion, %Descriptor, $TargetLibraryName, $HeaderCheckingMode_Separately, $GenerateDescriptor, $TestSystem, $DumpInfo_DescriptorPath, $CheckHeadersOnly, $InterfacesListPath, $AppPath, $ShowExpendTime);
28
29my $CmdName = get_FileName($0);
30GetOptions("h|help!" => \$Help,
31 "v|version!" => \$ShowVersion,
32#general options
33 "l|library=s" => \$TargetLibraryName,
34 "d1|descriptor1=s" => \$Descriptor{1}{"Path"},
35 "d2|descriptor2=s" => \$Descriptor{2}{"Path"},
36#extra options
37 "app|application=s" => \$AppPath,
38 "symbols_list|int_list=s" => \$InterfacesListPath,
39 "dump_abi|dump_info=s" => \$DumpInfo_DescriptorPath,
40 "headers_only!" => \$CheckHeadersOnly,
41#other options
42 "d|descriptor_template!" => \$GenerateDescriptor,
43 "separately!" => \$HeaderCheckingMode_Separately,
44 "test!" => \$TestSystem,
45 "time!" => \$ShowExpendTime
46) or exit(1);
47
48sub HELP_MESSAGE()
49{
50 print STDERR <<"EOM"
51
52NAME:
53 $CmdName - check ABI compatibility of shared C/C++ library versions
54
55DESCRIPTION:
56 Lightweight tool for statically checking backward binary compatibility of shared C/C++ libraries
57 in Linux. It checks header files along with shared objects in two library versions and searches
58 for ABI changes that may lead to incompatibility. Breakage of the binary compatibility may result
59 in crashing or incorrect behavior of applications built with an old version of a library when
60 it is running with a new one.
61
62 ABI Compliance Checker was intended for library developers that are interested in ensuring
63 backward binary compatibility. Also it can be used for checking forward binary compatibility
64 and checking applications portability to the new library version.
65
66 This tool is free software: you can redistribute it and/or modify it under the terms of the GNU GPL.
67
68USAGE:
69 $CmdName [options]
70
71EXAMPLE OF USE:
72 $CmdName -l <library_name> -d1 <1st_version_descriptor> -d2 <2nd_version_descriptor>
73
74GENERAL OPTIONS:
75 -h|-help
76 Print this help.
77
78 -v|-version
79 Print version.
80
81 -l|-library <name>
82 Library name (without version).
83 It affects only on the path and the title of the report.
84
85 -d1|-descriptor1 <path>
86 Path to descriptor of 1st library version.
87
88 -d2|-descriptor2 <path>
89 Path to descriptor of 2nd library version.
90
91EXTRA OPTIONS:
92 -app|-application <path>
93 This option allow to specify the application that should be tested for portability
94 to the new library version.
95
96 -dump_abi|-dump_info <descriptor_path>
97 Dump library ABI information using specified descriptor.
98 This command will create '<library>_<ver1>.abi.tar.gz' file in the directory 'abi_dumps/<library>/'.
99 You can transfer it anywhere and pass instead of library descriptor.
100
101 -headers_only
102 Check header files without shared objects. It is easy to run, but may provide
103 a low quality ABI compliance report with false positives and without
104 detecting of added/withdrawn interfaces.
105
106 -symbols_list|-int_list <path>
107 This option allow to specify a file with a list of interfaces (mangled names in C++)
108 that should be checked, other library interfaces will not be checked.
109
110OTHER OPTIONS:
111 -d|-descriptor_template
112 Create library descriptor template 'library-descriptor.xml' in the current directory.
113
114 -separately
115 Check headers individually. This mode requires more time for checking ABI compliance,
116 but possible compiler errors in one header can't affect others.
117
118 -test
119 Run internal tests (create two binary-incompatible versions of an artificial library
120 and run ABI-Compliance-Checker on it).
121
122DESCRIPTOR EXAMPLE:
123 <version>
124 1.28.0
125 </version>
126
127 <headers>
128 /usr/local/atk/atk-1.28.0/include/
129 </headers>
130
131 <libs>
132 /usr/local/atk/atk-1.28.0/lib/libatk-1.0.so
133 </libs>
134
135 <include_paths>
136 /usr/include/glib-2.0/
137 /usr/lib/glib-2.0/include/
138 </include_paths>
139
140
141Report bugs to <abi-compliance-checker\@linuxtesting.org>
142For more information, please see: http://ispras.linux-foundation.org/index.php/ABI_compliance_checker
143EOM
144 ;
145}
146
147my $Descriptor_Template = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
148<descriptor>
149
150<!-- Template for the library version descriptor -->
151
152<!--
153 Necessary sections
154 -->
155
156<version>
157 <!-- Version of the library -->
158</version>
159
160<headers>
161 <!-- The list of paths to header files and/or
162 directories with header files, one per line -->
163</headers>
164
165<libs>
166 <!-- The list of paths to shared objects and/or
167 directories with shared objects, one per line -->
168</libs>
169
170<!--
171 Additional sections
172 -->
173
174<include_paths>
175 <!-- The list of paths to be searched for header files
176 needed for compiling of library headers, one per line -->
177</include_paths>
178
179<gcc_options>
180 <!-- Additional gcc options, one per line -->
181</gcc_options>
182
183<opaque_types>
184 <!-- The list of opaque types, one per line -->
185</opaque_types>
186
187<skip_interfaces>
188 <!-- The list of functions (mangled/symbol names in C++)
189 that should be skipped while testing, one per line -->
190</skip_interfaces>
191
192<include_preamble>
193 <!-- The list of header files that should be included before other headers, one per line.
194 For example, it is a tree.h for libxml2 and ft2build.h for freetype2 -->
195</include_preamble>
196
197</descriptor>";
198
199my %Operator_Indication = (
200"not" => "~",
201"assign" => "=",
202"andassign" => "&=",
203"orassign" => "|=",
204"xorassign" => "^=",
205"or" => "|",
206"xor" => "^",
207"addr" => "&",
208"and" => "&",
209"lnot" => "!",
210"eq" => "==",
211"ne" => "!=",
212"lt" => "<",
213"lshift" => "<<",
214"lshiftassign" => "<<=",
215"rshiftassign" => ">>=",
216"call" => "()",
217"mod" => "%",
218"modassign" => "%=",
219"subs" => "[]",
220"land" => "&&",
221"lor" => "||",
222"rshift" => ">>",
223"ref" => "->",
224"le" => "<=",
225"deref" => "*",
226"mult" => "*",
227"preinc" => "++",
228"delete" => " delete",
229"vecnew" => " new[]",
230"vecdelete" => " delete[]",
231"predec" => "--",
232"postinc" => "++",
233"postdec" => "--",
234"plusassign" => "+=",
235"plus" => "+",
236"minus" => "-",
237"minusassign" => "-=",
238"gt" => ">",
239"ge" => ">=",
240"new" => " new",
241"multassign" => "*=",
242"divassign" => "/=",
243"div" => "/",
244"neg" => "-",
245"pos" => "+",
246"memref" => "->*",
247"compound" => ","
248);
249
250sub num_to_str($)
251{
252 my $Number = $_[0];
253 if(int($Number)>3)
254 {
255 return $Number."th";
256 }
257 elsif(int($Number)==1)
258 {
259 return "1st";
260 }
261 elsif(int($Number)==2)
262 {
263 return "2nd";
264 }
265 elsif(int($Number)==3)
266 {
267 return "3rd";
268 }
269 else
270 {
271 return "";
272 }
273}
274
275#Global variables
276my $REPORT_PATH;
277my %ERR_PATH;
278my $POINTER_SIZE;
279my $MAX_COMMAND_LINE_ARGUMENTS = 4096;
280my %Cache;
281my %FuncAttr;
282my %LibInfo;
283my %HeaderCompileError;
284my $StartTime;
285my %CompilerOptions;
286my %AddedInt;
287my %WithdrawnInt;
288my @RecurLib;
289my %CheckedSoLib;
290
291#Constants checking
292my %ConstantsSrc;
293my %Constants;
294
295#Types
296my %TypeDescr;
297my %TemplateInstance_Func;
298my %TemplateInstance;
299my %OpaqueTypes;
300my %Tid_TDid;
301my %CheckedTypes;
302my %Typedef_BaseName;
303my %StdCxxTypedef;
304my %TName_Tid;
305my %EnumMembName_Id;
306
307#Interfaces
308my %FuncDescr;
309my %ClassFunc;
310my %ClassVirtFunc;
311my %ClassIdVirtFunc;
312my %ClassId;
313my %tr_name;
314my %mangled_name;
315my %InternalInterfaces;
316my %InterfacesList;
317my %InterfacesList_App;
318my %CheckedInterfaces;
319my %DepInterfaces;
320
321#Headers
322my %Include_Preamble;
323my %Headers;
324my %HeaderName_Destinations;
325my %Header_Dependency;
326
327#Shared objects
328my %SoLib_DefaultPath;
329
330#Merging
331my %CompleteSignature;
332my @RecurTypes;
333my %Interface_Library;
334my %Library_Interface;
335my %Language;
336my %SoNames_All;
337my $Version;
338
339#Symbols versioning
340my %SymVer;
341
342#Problem descriptions
343my %CompatProblems;
344my %ConstantProblems;
345
346#Rerorts
347my $ContentID = 1;
348my $ContentSpanStart = "<span class=\"section\" onclick=\"javascript:showContent(this, 'CONTENT_ID')\">\n";
349my $ContentSpanEnd = "</span>\n";
350my $ContentDivStart = "<div id=\"CONTENT_ID\" style=\"display:none;\">\n";
351my $ContentDivEnd = "</div>\n";
352my $Content_Counter = 0;
353
354sub readDescriptor($)
355{
356 my $LibVersion = $_[0];
357 if(not -e $Descriptor{$LibVersion}{"Path"})
358 {
359 return;
360 }
361 my $Descriptor_File = readFile($Descriptor{$LibVersion}{"Path"});
362 $Descriptor_File =~ s/\/\*(.|\n)+?\*\///g;
363 $Descriptor_File =~ s/<\!--(.|\n)+?-->//g;
364 if(not $Descriptor_File)
365 {
366 print "ERROR: descriptor d$LibVersion is empty\n";
367 exit(1);
368 }
369 $Descriptor{$LibVersion}{"Version"} = parseTag(\$Descriptor_File, "version");
370 if(not $Descriptor{$LibVersion}{"Version"})
371 {
372 print "ERROR: version in the descriptor d$LibVersion was not specified (section <version>)\n\n";
373 exit(1);
374 }
375 $Descriptor{$LibVersion}{"Headers"} = parseTag(\$Descriptor_File, "headers");
376 if(not $Descriptor{$LibVersion}{"Headers"})
377 {
378 print "ERROR: header files in the descriptor d$LibVersion were not specified (section <headers>)\n";
379 exit(1);
380 }
381 if(not $CheckHeadersOnly)
382 {
383 $Descriptor{$LibVersion}{"Libs"} = parseTag(\$Descriptor_File, "libs");
384 if(not $Descriptor{$LibVersion}{"Libs"})
385 {
386 print "ERROR: shared objects in the descriptor d$LibVersion were not specified (section <libs>)\n";
387 exit(1);
388 }
389 }
390 $Descriptor{$LibVersion}{"Include_Paths"} = parseTag(\$Descriptor_File, "include_paths");
391 $Descriptor{$LibVersion}{"Gcc_Options"} = parseTag(\$Descriptor_File, "gcc_options");
392 foreach my $Option (split("\n", $Descriptor{$LibVersion}{"Gcc_Options"}))
393 {
394 $Option =~ s/\A\s+|\s+\Z//g;
395 next if(not $Option);
396 $CompilerOptions{$LibVersion} .= " ".$Option;
397 }
398 $Descriptor{$LibVersion}{"Opaque_Types"} = parseTag(\$Descriptor_File, "opaque_types");
399 foreach my $Type_Name (split("\n", $Descriptor{$LibVersion}{"Opaque_Types"}))
400 {
401 $Type_Name =~ s/\A\s+|\s+\Z//g;
402 next if(not $Type_Name);
403 $OpaqueTypes{$LibVersion}{$Type_Name} = 1;
404 }
405 $Descriptor{$LibVersion}{"Skip_interfaces"} = parseTag(\$Descriptor_File, "skip_interfaces");
406 foreach my $Interface_Name (split("\n", $Descriptor{$LibVersion}{"Skip_interfaces"}))
407 {
408 $Interface_Name =~ s/\A\s+|\s+\Z//g;
409 next if(not $Interface_Name);
410 $InternalInterfaces{$LibVersion}{$Interface_Name} = 1;
411 }
412 $Descriptor{$LibVersion}{"Include_Preamble"} = parseTag(\$Descriptor_File, "include_preamble");
413 my $Position = 0;
414 foreach my $Header_Name (split("\n", $Descriptor{$LibVersion}{"Include_Preamble"}))
415 {
416 $Header_Name =~ s/\A\s+|\s+\Z//g;
417 next if(not $Header_Name);
418 $Include_Preamble{$LibVersion}{$Header_Name}{"Position"} = $Position;
419 $Position+=1;
420 }
421 my $Descriptors_Dir = "descriptors_storage/$TargetLibraryName";
422 system("mkdir", "-p", $Descriptors_Dir);
423 my $Descriptor_Name = $TargetLibraryName."_".$Descriptor{$LibVersion}{"Version"}.".desc";
424 if($Descriptor{$LibVersion}{"Path"} ne $Descriptors_Dir."/".$Descriptor_Name)
425 {
426 system("cp", "-f", $Descriptor{$LibVersion}{"Path"}, $Descriptors_Dir."/".$Descriptor_Name);
427 }
428 $ERR_PATH{$LibVersion} = "header_compile_errors/$TargetLibraryName/".$Descriptor{$LibVersion}{"Version"};
429}
430
431sub parseTag($$)
432{
433 my ($CodeRef, $Tag) = @_;
434 return "" if(not $CodeRef or not ${$CodeRef} or not $Tag);
435 if(${$CodeRef} =~ s/\<$Tag\>((.|\n)+?)\<\/$Tag\>//)
436 {
437 my $Content = $1;
438 $Content=~s/(\A\s+|\s+\Z)//g;
439 return $Content;
440 }
441 else
442 {
443 return "";
444 }
445}
446
447my %check_node=(
448"array_type"=>1,
449"binfo"=>1,
450"boolean_type"=>1,
451"complex_type"=>1,
452"const_decl"=>1,
453"enumeral_type"=>1,
454"field_decl"=>1,
455"function_decl"=>1,
456"function_type"=>1,
457"identifier_node"=>1,
458"integer_cst"=>1,
459"integer_type"=>1,
460"method_type"=>1,
461"namespace_decl"=>1,
462"parm_decl"=>1,
463"pointer_type"=>1,
464"real_cst"=>1,
465"real_type"=>1,
466"record_type"=>1,
467"reference_type"=>1,
468"string_cst"=>1,
469"template_decl"=>1,
470"template_type_parm"=>1,
471"tree_list"=>1,
472"tree_vec"=>1,
473"type_decl"=>1,
474"union_type"=>1,
475"var_decl"=>1,
476"void_type"=>1);
477
478sub getInfo($)
479{
480 my $InfoPath = $_[0];
481 return if(not $InfoPath or not -f $InfoPath);
482 my $InfoPath_New = $InfoPath.".1";
483 #my $Keywords = join("\\|", keys(%check_node));#|grep "$Keywords"
484 system("sed ':a;N;\$!ba;s/\\n[^\@]//g' ".esc($InfoPath)."|sed 's/ [ ]\\+/ /g' > ".esc($InfoPath_New));
485 system("rm", "-fr", $InfoPath);
486 #getting info
487 open(INFO, $InfoPath_New) || die ("can't open file '\$InfoPath_New\': $!\n");
488 while(<INFO>)
489 {
490 chomp;
491 if(/\A@([0-9]+)[ ]+([a-zA-Z_]+)[ ]+(.*)\Z/)
492 {
493 next if(not $check_node{$2});
494 $LibInfo{$Version}{$1}{"info_type"}=$2;
495 $LibInfo{$Version}{$1}{"info"}=$3;
496 }
497 }
498 close(INFO);
499 system("rm", "-fr", $InfoPath_New);
500 #processing info
501 setTemplateParams_All();
502 getTypeDescr_All();
503 getFuncDescr_All();
504 getVarDescr_All();
505 %LibInfo = ();
506 %TemplateInstance = ();
507}
508
509sub setTemplateParams_All()
510{
511 foreach (keys(%{$LibInfo{$Version}}))
512 {
513 if($LibInfo{$Version}{$_}{"info_type"} eq "template_decl")
514 {
515 setTemplateParams($_);
516 }
517 }
518}
519
520sub setTemplateParams($)
521{
522 my $TypeInfoId = $_[0];
523 my $Info = $LibInfo{$Version}{$TypeInfoId}{"info"};
524 if($Info =~ /(inst|spcs)[ ]*:[ ]*@([0-9]+) /)
525 {
526 my $TmplInst_InfoId = $2;
527 setTemplateInstParams($TmplInst_InfoId);
528 my $TmplInst_Info = $LibInfo{$Version}{$TmplInst_InfoId}{"info"};
529 while($TmplInst_Info =~ /chan[ ]*:[ ]*@([0-9]+) /)
530 {
531 $TmplInst_InfoId = $1;
532 $TmplInst_Info = $LibInfo{$Version}{$TmplInst_InfoId}{"info"};
533 setTemplateInstParams($TmplInst_InfoId);
534 }
535 }
536}
537
538sub setTemplateInstParams($)
539{
540 my $TmplInst_Id = $_[0];
541 my $Info = $LibInfo{$Version}{$TmplInst_Id}{"info"};
542 my ($Params_InfoId, $ElemId) = ();
543 if($Info =~ /purp[ ]*:[ ]*@([0-9]+) /)
544 {
545 $Params_InfoId = $1;
546 }
547 if($Info =~ /valu[ ]*:[ ]*@([0-9]+) /)
548 {
549 $ElemId = $1;
550 }
551 if($Params_InfoId and $ElemId)
552 {
553 my $Params_Info = $LibInfo{$Version}{$Params_InfoId}{"info"};
554 while($Params_Info =~ s/ ([0-9]+)[ ]*:[ ]*@([0-9]+) //)
555 {
556 my ($Param_Pos, $Param_TypeId) = ($1, $2);
557 return if($LibInfo{$Version}{$Param_TypeId}{"info_type"} eq "template_type_parm");
558 if($LibInfo{$ElemId}{"info_type"} eq "function_decl")
559 {
560 $TemplateInstance_Func{$Version}{$ElemId}{$Param_Pos} = $Param_TypeId;
561 }
562 else
563 {
564 $TemplateInstance{$Version}{getTypeDeclId($ElemId)}{$ElemId}{$Param_Pos} = $Param_TypeId;
565 }
566 }
567 }
568}
569
570sub getTypeDeclId($)
571{
572 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
573 if($TypeInfo =~ /name[ ]*:[ ]*@([0-9]+)/)
574 {
575 return $1;
576 }
577 else
578 {
579 return "";
580 }
581}
582
583sub isFuncPtr($)
584{
585 my $Ptd = pointTo($_[0]);
586 if($Ptd)
587 {
588 if(($LibInfo{$Version}{$_[0]}{"info"} =~ m/unql[ ]*:/) and not ($LibInfo{$Version}{$_[0]}{"info"} =~ m/qual[ ]*:/))
589 {
590 return 0;
591 }
592 elsif(($LibInfo{$Version}{$_[0]}{"info_type"} eq "pointer_type") and ($LibInfo{$Version}{$Ptd}{"info_type"} eq "function_type" or $LibInfo{$Version}{$Ptd}{"info_type"} eq "method_type"))
593 {
594 return 1;
595 }
596 else
597 {
598 return 0;
599 }
600 }
601 else
602 {
603 return 0;
604 }
605}
606
607sub pointTo($)
608{
609 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
610 if($TypeInfo =~ /ptd[ ]*:[ ]*@([0-9]+)/)
611 {
612 return $1;
613 }
614 else
615 {
616 return "";
617 }
618}
619
620sub getTypeDescr_All()
621{
622 foreach (sort {int($a)<=>int($b)} keys(%{$LibInfo{$Version}}))
623 {
624 if($LibInfo{$Version}{$_}{"info_type"}=~/_type\Z/ and $LibInfo{$Version}{$_}{"info_type"}!~/function_type|method_type/)
625 {
626 getTypeDescr(getTypeDeclId($_), $_);
627 }
628 }
629 $TypeDescr{$Version}{""}{-1}{"Name"} = "...";
630 $TypeDescr{$Version}{""}{-1}{"Type"} = "Intrinsic";
631 $TypeDescr{$Version}{""}{-1}{"Tid"} = -1;
632}
633
634sub getTypeDescr($$)
635{
636 my ($TypeDeclId, $TypeId) = @_;
637 $Tid_TDid{$Version}{$TypeId} = $TypeDeclId;
638 %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}} = getTypeAttr($TypeDeclId, $TypeId);
639 if(not $TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"})
640 {
641 delete($TypeDescr{$Version}{$TypeDeclId}{$TypeId});
642 return;
643 }
644 if(not $TName_Tid{$Version}{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}})
645 {
646 $TName_Tid{$Version}{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}} = $TypeId;
647 }
648}
649
650sub getTypeAttr($$)
651{
652 my ($TypeDeclId, $TypeId) = @_;
653 my ($BaseTypeSpec, %TypeAttr) = ();
654 if($TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"})
655 {
656 return %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}};
657 }
658 $TypeAttr{"Tid"} = $TypeId;
659 $TypeAttr{"TDid"} = $TypeDeclId;
660 $TypeAttr{"Type"} = getTypeType($TypeDeclId, $TypeId);
661 if($TypeAttr{"Type"} eq "Unknown")
662 {
663 return ();
664 }
665 elsif($TypeAttr{"Type"} eq "FuncPtr")
666 {
667 %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}} = getFuncPtrAttr(pointTo($TypeId), $TypeDeclId, $TypeId);
668 $TName_Tid{$Version}{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}} = $TypeId;
669 return %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}};
670 }
671 elsif($TypeAttr{"Type"} eq "Array")
672 {
673 ($TypeAttr{"BaseType"}{"Tid"}, $TypeAttr{"BaseType"}{"TDid"}, $BaseTypeSpec) = selectBaseType($TypeDeclId, $TypeId);
674 my %BaseTypeAttr = getTypeAttr($TypeAttr{"BaseType"}{"TDid"}, $TypeAttr{"BaseType"}{"Tid"});
675 my $ArrayElemNum = getSize($TypeId)/8;
676 $ArrayElemNum = $ArrayElemNum/$BaseTypeAttr{"Size"} if($BaseTypeAttr{"Size"});
677 $TypeAttr{"Size"} = $ArrayElemNum;
678 if($ArrayElemNum)
679 {
680 $TypeAttr{"Name"} = $BaseTypeAttr{"Name"}."[".$ArrayElemNum."]";
681 }
682 else
683 {
684 $TypeAttr{"Name"} = $BaseTypeAttr{"Name"}."[]";
685 }
686 $TypeAttr{"Name"} = correctName($TypeAttr{"Name"});
687 $TypeAttr{"Library"} = $BaseTypeAttr{"Library"};
688 $TypeAttr{"Header"} = $BaseTypeAttr{"Header"};
689 %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}} = %TypeAttr;
690 $TName_Tid{$Version}{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}} = $TypeId;
691 return %TypeAttr;
692 }
693 elsif($TypeAttr{"Type"} =~ /Intrinsic|Union|Struct|Enum|Class/)
694 {
695 if($TemplateInstance{$Version}{$TypeDeclId}{$TypeId})
696 {
697 my @Template_Params = ();
698 foreach my $Param_Pos (sort {int($a)<=>int($b)} keys(%{$TemplateInstance{$Version}{$TypeDeclId}{$TypeId}}))
699 {
700 my $Type_Id = $TemplateInstance{$Version}{$TypeDeclId}{$TypeId}{$Param_Pos};
701 my $Param = get_TemplateParam($Type_Id);
702 if($Param eq "")
703 {
704 return ();
705 }
706 @Template_Params = (@Template_Params, $Param);
707 }
708 %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}} = getTrivialTypeAttr($TypeDeclId, $TypeId);
709 $TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"} = $TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}."< ".join(", ", @Template_Params)." >";
710 $TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"} = correctName($TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"});
711 $TName_Tid{$Version}{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}} = $TypeId;
712 return %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}};
713 }
714 else
715 {
716 %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}} = getTrivialTypeAttr($TypeDeclId, $TypeId);
717 return %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}};
718 }
719 }
720 else
721 {
722 ($TypeAttr{"BaseType"}{"Tid"}, $TypeAttr{"BaseType"}{"TDid"}, $BaseTypeSpec) = selectBaseType($TypeDeclId, $TypeId);
723 my %BaseTypeAttr = getTypeAttr($TypeAttr{"BaseType"}{"TDid"}, $TypeAttr{"BaseType"}{"Tid"});
724 if($BaseTypeSpec and $BaseTypeAttr{"Name"})
725 {
726 if(($TypeAttr{"Type"} eq "Pointer") and $BaseTypeAttr{"Name"}=~/\([\*]+\)/)
727 {
728 $TypeAttr{"Name"} = $BaseTypeAttr{"Name"};
729 $TypeAttr{"Name"} =~ s/\(([*]+)\)/($1*)/g;
730 }
731 else
732 {
733 $TypeAttr{"Name"} = $BaseTypeAttr{"Name"}." ".$BaseTypeSpec;
734 }
735 }
736 elsif($BaseTypeAttr{"Name"})
737 {
738 $TypeAttr{"Name"} = $BaseTypeAttr{"Name"};
739 }
740 if($TypeAttr{"Type"} eq "Typedef")
741 {
742 $TypeAttr{"Name"} = getNameByInfo($TypeDeclId);
743 $TypeAttr{"NameSpace"} = getNameSpace($TypeDeclId);
744 if($TypeAttr{"NameSpace"})
745 {
746 $TypeAttr{"Name"} = $TypeAttr{"NameSpace"}."::".$TypeAttr{"Name"};
747 }
748 ($TypeAttr{"Header"}, $TypeAttr{"Line"}) = getLocation($TypeDeclId);
749 if($TypeAttr{"NameSpace"}=~/\Astd(::|\Z)/ and $BaseTypeAttr{"NameSpace"}=~/\Astd(::|\Z)/)
750 {
751 $StdCxxTypedef{$Version}{$BaseTypeAttr{"Name"}} = $TypeAttr{"Name"};
752 }
753 $Typedef_BaseName{$Version}{$TypeAttr{"Name"}} = $BaseTypeAttr{"Name"};
754 }
755 if(not $TypeAttr{"Size"})
756 {
757 if($TypeAttr{"Type"} eq "Pointer")
758 {
759 $TypeAttr{"Size"} = $POINTER_SIZE;
760 }
761 else
762 {
763 $TypeAttr{"Size"} = $BaseTypeAttr{"Size"};
764 }
765 }
766 $TypeAttr{"Name"} = correctName($TypeAttr{"Name"});
767 $TypeAttr{"Library"} = $BaseTypeAttr{"Library"};
768 $TypeAttr{"Header"} = $BaseTypeAttr{"Header"} if(not $TypeAttr{"Header"});
769 %{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}} = %TypeAttr;
770 $TName_Tid{$Version}{$TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"Name"}} = $TypeId;
771 return %TypeAttr;
772 }
773}
774
775sub get_TemplateParam($)
776{
777 my $Type_Id = $_[0];
778 if(getNodeType($Type_Id) eq "integer_cst")
779 {
780 return getNodeIntCst($Type_Id);
781 }
782 elsif(getNodeType($Type_Id) eq "string_cst")
783 {
784 return getNodeStrCst($Type_Id);
785 }
786 else
787 {
788 my $Type_DId = getTypeDeclId($Type_Id);
789 my %ParamAttr = getTypeAttr($Type_DId, $Type_Id);
790 if(not $ParamAttr{"Name"})
791 {
792 return "";
793 }
794 if($ParamAttr{"Name"}=~/\>/)
795 {
796 if($StdCxxTypedef{$Version}{$ParamAttr{"Name"}})
797 {
798 return $StdCxxTypedef{$Version}{$ParamAttr{"Name"}};
799 }
800 elsif(my $Covered = cover_stdcxx_typedef($ParamAttr{"Name"}))
801 {
802 return $Covered;
803 }
804 else
805 {
806 return $ParamAttr{"Name"};
807 }
808 }
809 else
810 {
811 return $ParamAttr{"Name"};
812 }
813 }
814}
815
816sub cover_stdcxx_typedef($)
817{
818 my $TypeName = $_[0];
819 my $TypeName_Covered = $TypeName;
820 while($TypeName=~s/>[ ]*(const|volatile|restrict| |\*|\&)\Z/>/g){};
821 if(my $Cover = $StdCxxTypedef{$Version}{$TypeName})
822 {
823 $TypeName = esc_l($TypeName);
824 $TypeName_Covered=~s/$TypeName/$Cover /g;
825 }
826 return correctName($TypeName_Covered);
827}
828
829sub getNodeType($)
830{
831 return $LibInfo{$Version}{$_[0]}{"info_type"};
832}
833
834sub getNodeIntCst($)
835{
836 my $CstId = $_[0];
837 my $CstTypeId = getTreeAttr($CstId, "type");
838 if($EnumMembName_Id{$Version}{$CstId})
839 {
840 return $EnumMembName_Id{$Version}{$CstId};
841 }
842 elsif($LibInfo{$Version}{$_[0]}{"info"} =~ /low[ ]*:[ ]*([^ ]+) /)
843 {
844 if($1 eq "0")
845 {
846 if(getNodeType($CstTypeId) eq "boolean_type")
847 {
848 return "false";
849 }
850 else
851 {
852 return "0";
853 }
854 }
855 elsif($1 eq "1")
856 {
857 if(getNodeType($CstTypeId) eq "boolean_type")
858 {
859 return "true";
860 }
861 else
862 {
863 return "1";
864 }
865 }
866 else
867 {
868 return $1;
869 }
870 }
871 else
872 {
873 return "";
874 }
875}
876
877sub getNodeStrCst($)
878{
879 if($LibInfo{$Version}{$_[0]}{"info"} =~ /low[ ]*:[ ]*(.+)[ ]+lngt/)
880 {
881 return $1;
882 }
883 else
884 {
885 return "";
886 }
887}
888
889sub esc_l($)
890{
891 my $String = $_[0];
892 $String=~s/([()*])/\\$1/g;
893 return $String;
894}
895
896sub getFuncPtrAttr($$$)
897{
898 my ($FuncTypeId, $TypeDeclId, $TypeId) = @_;
899 my $FuncInfo = $LibInfo{$Version}{$FuncTypeId}{"info"};
900 my $FuncInfo_Type = $LibInfo{$Version}{$FuncTypeId}{"info_type"};
901 my $FuncPtrCorrectName = "";
902 my %TypeAttr = ("Size"=>$POINTER_SIZE, "Type"=>"FuncPtr", "TDid"=>$TypeDeclId, "Tid"=>$TypeId);
903 my @ParamTypeName;
904 if($FuncInfo =~ /retn[ ]*:[ ]*\@([0-9]+) /)
905 {
906 my $ReturnTypeId = $1;
907 my %ReturnAttr = getTypeAttr(getTypeDeclId($ReturnTypeId), $ReturnTypeId);
908 $FuncPtrCorrectName .= $ReturnAttr{"Name"};
909 $TypeAttr{"Return"} = $ReturnTypeId;
910 }
911 if($FuncInfo =~ /prms[ ]*:[ ]*@([0-9]+) /)
912 {
913 my $ParamTypeInfoId = $1;
914 my $Position = 0;
915 while($ParamTypeInfoId)
916 {
917 my $ParamTypeInfo = $LibInfo{$Version}{$ParamTypeInfoId}{"info"};
918 last if($ParamTypeInfo !~ /valu[ ]*:[ ]*@([0-9]+) /);
919 my $ParamTypeId = $1;
920 my %ParamAttr = getTypeAttr(getTypeDeclId($ParamTypeId), $ParamTypeId);
921 last if($ParamAttr{"Name"} eq "void");
922 $TypeAttr{"Memb"}{$Position}{"type"} = $ParamTypeId;
923 push(@ParamTypeName, $ParamAttr{"Name"});
924 last if($ParamTypeInfo !~ /chan[ ]*:[ ]*@([0-9]+) /);
925 $ParamTypeInfoId = $1;
926 $Position+=1;
927 }
928 }
929 if($FuncInfo_Type eq "function_type")
930 {
931 $FuncPtrCorrectName .= " (*) (".join(", ", @ParamTypeName).")";
932 }
933 elsif($FuncInfo_Type eq "method_type")
934 {
935 if($FuncInfo =~ /clas[ ]*:[ ]*@([0-9]+) /)
936 {
937 my $ClassId = $1;
938 my $ClassName = $TypeDescr{$Version}{getTypeDeclId($ClassId)}{$ClassId}{"Name"};
939 if($ClassName)
940 {
941 $FuncPtrCorrectName .= " ($ClassName\:\:*) (".join(", ", @ParamTypeName).")";
942 }
943 else
944 {
945 $FuncPtrCorrectName .= " (*) (".join(", ", @ParamTypeName).")";
946 }
947 }
948 else
949 {
950 $FuncPtrCorrectName .= " (*) (".join(", ", @ParamTypeName).")";
951 }
952 }
953 $TypeAttr{"Name"} = correctName($FuncPtrCorrectName);
954 return %TypeAttr;
955}
956
957sub getTypeName($)
958{
959 my $Info = $LibInfo{$Version}{$_[0]}{"info"};
960 if($Info =~ /name[ ]*:[ ]*@([0-9]+) /)
961 {
962 return getNameByInfo($1);
963 }
964 else
965 {
966 if($LibInfo{$Version}{$_[0]}{"info_type"} eq "integer_type")
967 {
968 if($LibInfo{$Version}{$_[0]}{"info"} =~ /unsigned/)
969 {
970 return "unsigned int";
971 }
972 else
973 {
974 return "int";
975 }
976 }
977 else
978 {
979 return "";
980 }
981 }
982}
983
984sub selectBaseType($$)
985{
986 my ($TypeDeclId, $TypeId) = @_;
987 my $TypeInfo = $LibInfo{$Version}{$TypeId}{"info"};
988 my $BaseTypeDeclId;
989 my $Type_Type = getTypeType($TypeDeclId, $TypeId);
990 #qualifications
991 if(($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:[ ]*c /) and ($LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@([0-9]+) /))
992 {
993 return ($1, getTypeDeclId($1), "const");
994 }
995 elsif(($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:[ ]*r /) and ($LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@([0-9]+) /))
996 {
997 return ($1, getTypeDeclId($1), "restrict");
998 }
999 elsif(($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:[ ]*v /) and ($LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@([0-9]+) /))
1000 {
1001 return ($1, getTypeDeclId($1), "volatile");
1002 }
1003 elsif((not ($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:/)) and ($LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@([0-9]+) /))
1004 {#typedefs
1005 return ($1, getTypeDeclId($1), "");
1006 }
1007 elsif($LibInfo{$Version}{$TypeId}{"info_type"} eq "reference_type")
1008 {
1009 if($TypeInfo =~ /refd[ ]*:[ ]*@([0-9]+) /)
1010 {
1011 return ($1, getTypeDeclId($1), "&");
1012 }
1013 else
1014 {
1015 return (0, 0, "");
1016 }
1017 }
1018 elsif($LibInfo{$Version}{$TypeId}{"info_type"} eq "array_type")
1019 {
1020 if($TypeInfo =~ /elts[ ]*:[ ]*@([0-9]+) /)
1021 {
1022 return ($1, getTypeDeclId($1), "");
1023 }
1024 else
1025 {
1026 return (0, 0, "");
1027 }
1028 }
1029 elsif($LibInfo{$Version}{$TypeId}{"info_type"} eq "pointer_type")
1030 {
1031 if($TypeInfo =~ /ptd[ ]*:[ ]*@([0-9]+) /)
1032 {
1033 return ($1, getTypeDeclId($1), "*");
1034 }
1035 else
1036 {
1037 return (0, 0, "");
1038 }
1039 }
1040 else
1041 {
1042 return (0, 0, "");
1043 }
1044}
1045
1046sub getFuncDescr_All()
1047{
1048 foreach (sort {int($b)<=>int($a)} keys(%{$LibInfo{$Version}}))
1049 {
1050 if($LibInfo{$Version}{$_}{"info_type"} eq "function_decl")
1051 {
1052 getFuncDescr($_);
1053 }
1054 }
1055}
1056
1057sub getVarDescr_All()
1058{
1059 foreach (sort {int($b)<=>int($a)} keys(%{$LibInfo{$Version}}))
1060 {
1061 if($LibInfo{$Version}{$_}{"info_type"} eq "var_decl")
1062 {
1063 getVarDescr($_);
1064 }
1065 }
1066}
1067
1068sub getVarDescr($)
1069{
1070 my $FuncInfoId = $_[0];
1071 if($LibInfo{$Version}{getNameSpaceId($FuncInfoId)}{"info_type"} eq "function_decl")
1072 {
1073 return;
1074 }
1075 ($FuncDescr{$Version}{$FuncInfoId}{"Header"}, $FuncDescr{$Version}{$FuncInfoId}{"Line"}) = getLocation($FuncInfoId);
1076 if((not $FuncDescr{$Version}{$FuncInfoId}{"Header"}) or ($FuncDescr{$Version}{$FuncInfoId}{"Header"}=~/\<built\-in\>|\<internal\>/))
1077 {
1078 delete($FuncDescr{$Version}{$FuncInfoId});
1079 return;
1080 }
1081 $FuncDescr{$Version}{$FuncInfoId}{"ShortName"} = getNameByInfo($FuncInfoId);
1082 $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} = getFuncMnglName($FuncInfoId);
1083 if($FuncDescr{$Version}{$FuncInfoId}{"MnglName"} and $FuncDescr{$Version}{$FuncInfoId}{"MnglName"}!~/\A_Z/)
1084 {
1085 delete($FuncDescr{$Version}{$FuncInfoId});
1086 return;
1087 }
1088 if(not $FuncDescr{$Version}{$FuncInfoId}{"MnglName"})
1089 {
1090 $FuncDescr{$Version}{$FuncInfoId}{"Name"} = $FuncDescr{$Version}{$FuncInfoId}{"ShortName"};
1091 $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} = $FuncDescr{$Version}{$FuncInfoId}{"ShortName"};
1092 }
1093 if(not is_in_library($FuncDescr{$Version}{$FuncInfoId}{"MnglName"}, $Version) and not $CheckHeadersOnly)
1094 {
1095 delete $FuncDescr{$Version}{$FuncInfoId};
1096 return;
1097 }
1098 $FuncDescr{$Version}{$FuncInfoId}{"Return"} = getTypeId($FuncInfoId);
1099 delete($FuncDescr{$Version}{$FuncInfoId}{"Return"}) if(not $FuncDescr{$Version}{$FuncInfoId}{"Return"});
1100 $FuncDescr{$Version}{$FuncInfoId}{"Data"} = 1;
1101 set_Class_And_Namespace($FuncInfoId);
1102 setFuncAccess($FuncInfoId);
1103 if($FuncDescr{$Version}{$FuncInfoId}{"MnglName"} =~ /\A_ZTV/)
1104 {
1105 delete($FuncDescr{$Version}{$FuncInfoId}{"Return"});
1106 }
1107 if($FuncDescr{$Version}{$FuncInfoId}{"ShortName"} =~ /\A_Z/)
1108 {
1109 delete($FuncDescr{$Version}{$FuncInfoId}{"ShortName"});
1110 }
1111}
1112
1113sub getTrivialTypeAttr($$)
1114{
1115 my ($TypeInfoId, $TypeId) = @_;
1116 my %TypeAttr = ();
1117 return if(getTypeTypeByTypeId($TypeId)!~/Intrinsic|Union|Struct|Enum/);
1118 setTypeAccess($TypeId, \%TypeAttr);
1119 ($TypeAttr{"Header"}, $TypeAttr{"Line"}) = getLocation($TypeInfoId);
1120 if(($TypeAttr{"Header"} eq "<built-in>") or ($TypeAttr{"Header"} eq "<internal>"))
1121 {
1122 delete($TypeAttr{"Header"});
1123 }
1124 $TypeAttr{"Name"} = getNameByInfo($TypeInfoId);
1125 $TypeAttr{"Name"} = getTypeName($TypeId) if(not $TypeAttr{"Name"});
1126 my $NameSpaceId = getNameSpaceId($TypeInfoId);
1127 if($NameSpaceId ne $TypeId)
1128 {
1129 $TypeAttr{"NameSpace"} = getNameSpace($TypeInfoId);
1130 }
1131 if($TypeAttr{"NameSpace"} and isNotAnon($TypeAttr{"Name"}))
1132 {
1133 $TypeAttr{"Name"} = $TypeAttr{"NameSpace"}."::".$TypeAttr{"Name"};
1134 }
1135 $TypeAttr{"Name"} = correctName($TypeAttr{"Name"});
1136 if(isAnon($TypeAttr{"Name"}))
1137 {
1138 $TypeAttr{"Name"} = "anon-";
1139 $TypeAttr{"Name"} .= $TypeAttr{"Header"}."-".$TypeAttr{"Line"};
1140 }
1141 $TypeAttr{"Size"} = getSize($TypeId)/8;
1142 $TypeAttr{"Type"} = getTypeType($TypeInfoId, $TypeId);
1143 if($TypeAttr{"Type"} eq "Struct" and has_methods($TypeId))
1144 {
1145 $TypeAttr{"Type"} = "Class";
1146 }
1147 if(($TypeAttr{"Type"} eq "Struct") or ($TypeAttr{"Type"} eq "Class"))
1148 {
1149 setBaseClasses($TypeInfoId, $TypeId, \%TypeAttr);
1150 }
1151 setTypeMemb($TypeInfoId, $TypeId, \%TypeAttr);
1152 $TypeAttr{"Tid"} = $TypeId;
1153 $TypeAttr{"TDid"} = $TypeInfoId;
1154 $Tid_TDid{$Version}{$TypeId} = $TypeInfoId;
1155 if(not $TName_Tid{$Version}{$TypeAttr{"Name"}})
1156 {
1157 $TName_Tid{$Version}{$TypeAttr{"Name"}} = $TypeId;
1158 }
1159 return %TypeAttr;
1160}
1161
1162sub has_methods($)
1163{
1164 my $TypeId = $_[0];
1165 my $Info = $LibInfo{$Version}{$TypeId}{"info"};
1166 return ($Info=~/(fncs)[ ]*:[ ]*@([0-9]+) /);
1167}
1168
1169sub setBaseClasses($$$)
1170{
1171 my ($TypeInfoId, $TypeId, $TypeAttr) = @_;
1172 my $Info = $LibInfo{$Version}{$TypeId}{"info"};
1173 if($Info =~ /binf[ ]*:[ ]*@([0-9]+) /)
1174 {
1175 $Info = $LibInfo{$Version}{$1}{"info"};
1176 while($Info =~ /accs[ ]*:[ ]*([a-z]+) /)
1177 {
1178 last if($Info !~ s/accs[ ]*:[ ]*([a-z]+) //);
1179 my $Access = $1;
1180 last if($Info !~ s/binf[ ]*:[ ]*@([0-9]+) //);
1181 my $BInfoId = $1;
1182 my $ClassId = getBinfClassId($BInfoId);
1183 if($Access eq "pub")
1184 {
1185 $TypeAttr->{"BaseClass"}{$ClassId} = "public";
1186 }
1187 elsif($Access eq "prot")
1188 {
1189 $TypeAttr->{"BaseClass"}{$ClassId} = "protected";
1190 }
1191 elsif($Access eq "priv")
1192 {
1193 $TypeAttr->{"BaseClass"}{$ClassId} = "private";
1194 }
1195 else
1196 {
1197 $TypeAttr->{"BaseClass"}{$ClassId} = "private";
1198 }
1199 }
1200 }
1201}
1202
1203sub getBinfClassId($)
1204{
1205 my $Info = $LibInfo{$Version}{$_[0]}{"info"};
1206 $Info =~ /type[ ]*:[ ]*@([0-9]+) /;
1207 return $1;
1208}
1209
1210sub get_func_signature($)
1211{
1212 my $FuncInfoId = $_[0];
1213 my $PureSignature = $FuncDescr{$Version}{$FuncInfoId}{"ShortName"};
1214 my @ParamTypes = ();
1215 foreach my $ParamPos (sort {int($a) <=> int($b)} keys(%{$FuncDescr{$Version}{$FuncInfoId}{"Param"}}))
1216 {#checking parameters
1217 my $ParamType_Id = $FuncDescr{$Version}{$FuncInfoId}{"Param"}{$ParamPos}{"type"};
1218 my $ParamType_Name = uncover_typedefs($TypeDescr{$Version}{getTypeDeclId($ParamType_Id)}{$ParamType_Id}{"Name"});
1219 @ParamTypes = (@ParamTypes, $ParamType_Name);
1220 }
1221 $PureSignature = $PureSignature."(".join(", ", @ParamTypes).")";
1222 $PureSignature = delete_keywords($PureSignature);
1223 return correctName($PureSignature);
1224}
1225
1226sub delete_keywords($)
1227{
1228 my $TypeName = $_[0];
1229 $TypeName =~ s/(\W|\A)(enum |struct |union |class )/$1/g;
1230 return $TypeName;
1231}
1232
1233sub uncover_typedefs($)
1234{
1235 my $TypeName = $_[0];
1236 return "" if(not $TypeName);
1237 return $Cache{"uncover_typedefs"}{$Version}{$TypeName} if(defined $Cache{"uncover_typedefs"}{$Version}{$TypeName});
1238 my ($TypeName_New, $TypeName_Pre) = (correctName($TypeName), "");
1239 while($TypeName_New ne $TypeName_Pre)
1240 {
1241 $TypeName_Pre = $TypeName_New;
1242 my $TypeName_Copy = $TypeName_New;
1243 my %Words = ();
1244 while($TypeName_Copy=~s/(\W|\A)([a-z_][\w:]*)(\W|\Z)//io)
1245 {
1246 my $Word = $2;
1247 next if(not $Word or $Word=~/\A(true|false|const|int|long|void|short|float|unsigned|char|double|class|struct|union|enum)\Z/);
1248 $Words{$Word} = 1;
1249 }
1250 foreach my $Word (keys(%Words))
1251 {
1252 my $BaseType_Name = $Typedef_BaseName{$Version}{$Word};
1253 next if($TypeName_New=~/(\W|\A)(struct $Word|union $Word|enum $Word)(\W|\Z)/);
1254 next if(not $BaseType_Name);
1255 if($BaseType_Name=~/\([*]+\)/)
1256 {
1257 $TypeName_New =~ /$Word(.*)\Z/;
1258 my $Type_Suffix = $1;
1259 $TypeName_New = $BaseType_Name;
1260 if($TypeName_New =~ s/\(([*]+)\)/($1 $Type_Suffix)/)
1261 {
1262 $TypeName_New = correctName($TypeName_New);
1263 }
1264 }
1265 else
1266 {
1267 if($TypeName_New =~ s/(\W|\A)$Word(\W|\Z)/$1$BaseType_Name$2/g)
1268 {
1269 $TypeName_New = correctName($TypeName_New);
1270 }
1271 }
1272 }
1273 }
1274 $Cache{"uncover_typedefs"}{$Version}{$TypeName} = $TypeName_New;
1275 return $TypeName_New;
1276}
1277
1278sub isInternal($)
1279{
1280 my $FuncInfoId = $_[0];
1281 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
1282 return 0 if($FuncInfo !~ /mngl[ ]*:[ ]*@([0-9]+) /);
1283 my $FuncMnglNameInfoId = $1;
1284 return ($LibInfo{$Version}{$FuncMnglNameInfoId}{"info"} =~ /\*[ ]*INTERNAL[ ]*\*/);
1285}
1286
1287sub set_Class_And_Namespace($)
1288{
1289 my $FuncInfoId = $_[0];
1290 my $FuncInfo = $LibInfo{$Version}{$FuncInfoId}{"info"};
1291 if($FuncInfo =~ /scpe[ ]*:[ ]*@([0-9]+) /)
1292 {
1293 my $NameSpaceInfoId = $1;
1294 if($LibInfo{$Version}{$NameSpaceInfoId}{"info_type"} eq "namespace_decl")
1295 {
1296 my $NameSpaceInfo = $LibInfo{$Version}{$NameSpaceInfoId}{"info"};
1297 if($NameSpaceInfo =~ /name[ ]*:[ ]*@([0-9]+) /)
1298 {
1299 my $NameSpaceId = $1;
1300 my $NameSpaceIdentifier = $LibInfo{$Version}{$NameSpaceId}{"info"};
1301 if($NameSpaceIdentifier =~ /strg[ ]*:[ ]*(.*)[ ]+lngt/)
1302 {
1303 my $NameSpace = $1;
1304 $NameSpace =~ s/[ ]+\Z//g;
1305 $FuncDescr{$Version}{$FuncInfoId}{"NameSpace"} = $NameSpace;
1306 }
1307 }
1308 }
1309 elsif($LibInfo{$Version}{$NameSpaceInfoId}{"info_type"} eq "record_type")
1310 {
1311 $FuncDescr{$Version}{$FuncInfoId}{"Class"} = $NameSpaceInfoId;
1312 }
1313 }
1314}
1315
1316sub getFuncDescr($)
1317{
1318 my $FuncInfoId = $_[0];
1319 return if(isInternal($FuncInfoId));
1320 ($FuncDescr{$Version}{$FuncInfoId}{"Header"}, $FuncDescr{$Version}{$FuncInfoId}{"Line"}) = getLocation($FuncInfoId);
1321 if(not $FuncDescr{$Version}{$FuncInfoId}{"Header"} or $FuncDescr{$Version}{$FuncInfoId}{"Header"}=~/\<built\-in\>|\<internal\>/)
1322 {
1323 delete($FuncDescr{$Version}{$FuncInfoId});
1324 return;
1325 }
1326 setFuncAccess($FuncInfoId);
1327 setFuncKind($FuncInfoId);
1328 if($FuncDescr{$Version}{$FuncInfoId}{"PseudoTemplate"})
1329 {
1330 delete($FuncDescr{$Version}{$FuncInfoId});
1331 return;
1332 }
1333 $FuncDescr{$Version}{$FuncInfoId}{"Type"} = getFuncType($FuncInfoId);
1334 $FuncDescr{$Version}{$FuncInfoId}{"Return"} = getFuncReturn($FuncInfoId);
1335 delete($FuncDescr{$Version}{$FuncInfoId}{"Return"}) if(not $FuncDescr{$Version}{$FuncInfoId}{"Return"});
1336 $FuncDescr{$Version}{$FuncInfoId}{"ShortName"} = getFuncShortName(getFuncOrig($FuncInfoId));
1337 if($FuncDescr{$Version}{$FuncInfoId}{"ShortName"} =~ /\._/)
1338 {
1339 delete($FuncDescr{$Version}{$FuncInfoId});
1340 return;
1341 }
1342 if(defined $TemplateInstance_Func{$Version}{$FuncInfoId})
1343 {
1344 my @TmplParams = ();
1345 foreach my $ParamPos (sort {int($a) <=> int($b)} keys(%{$TemplateInstance_Func{$Version}{$FuncInfoId}}))
1346 {
1347 my $Param = get_TemplateParam($TemplateInstance_Func{$Version}{$FuncInfoId}{$ParamPos});
1348 if($Param eq "")
1349 {
1350 delete($FuncDescr{$Version}{$FuncInfoId});
1351 return;
1352 }
1353 push(@TmplParams, $Param);
1354 }
1355 $FuncDescr{$Version}{$FuncInfoId}{"ShortName"} .= "<".join(", ", @TmplParams).">";
1356 }
1357 setFuncParams($FuncInfoId);
1358 $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} = getFuncMnglName($FuncInfoId);
1359 if($FuncDescr{$Version}{$FuncInfoId}{"MnglName"} and $FuncDescr{$Version}{$FuncInfoId}{"MnglName"}!~/\A_Z/)
1360 {
1361 delete($FuncDescr{$Version}{$FuncInfoId});
1362 return;
1363 }
1364
1365 if((is_in_library($FuncDescr{$Version}{$FuncInfoId}{"ShortName"}, $Version) or $CheckHeadersOnly) and not $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} and ($FuncDescr{$Version}{$FuncInfoId}{"Type"} eq "Function"))
1366 {
1367 $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} = $FuncDescr{$Version}{$FuncInfoId}{"ShortName"};
1368 }
1369 set_Class_And_Namespace($FuncInfoId);
1370 if(not $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} and not $FuncDescr{$Version}{$FuncInfoId}{"Class"})
1371 {#this section only for c++ functions without class that have not been mangled in the tree
1372 $FuncDescr{$Version}{$FuncInfoId}{"MnglName"} = $mangled_name{get_func_signature($FuncInfoId)};
1373 }
1374 if(not is_in_library($FuncDescr{$Version}{$FuncInfoId}{"MnglName"}, $Version) and not $CheckHeadersOnly)
1375 {#src only
1376 delete($FuncDescr{$Version}{$FuncInfoId});
1377 return;
1378 }
1379 if($FuncDescr{$Version}{$FuncInfoId}{"Constructor"} or $FuncDescr{$Version}{$FuncInfoId}{"Destructor"})
1380 {
1381 delete($FuncDescr{$Version}{$FuncInfoId}{"Return"});
1382 }
1383 my $FuncBody = getFuncBody($FuncInfoId);
1384 if($FuncBody eq "defined")
1385 {
1386 $FuncDescr{$Version}{$FuncInfoId}{"InLine"} = 1;
1387 }
1388 if($CheckHeadersOnly and $FuncDescr{$Version}{$FuncInfoId}{"InLine"})
1389 {
1390 delete($FuncDescr{$Version}{$FuncInfoId});
1391 return;
1392 }
1393 if(($FuncDescr{$Version}{$FuncInfoId}{"Type"} eq "Method") or $FuncDescr{$Version}{$FuncInfoId}{"Constructor"} or $FuncDescr{$Version}{$FuncInfoId}{"Destructor"})
1394 {
1395 if($FuncDescr{$Version}{$FuncInfoId}{"MnglName"}!~/\A_Z/)
1396 {
1397 delete($FuncDescr{$Version}{$FuncInfoId});
1398 return;
1399 }
1400 }
1401 if(getFuncSpec($FuncInfoId) eq "Virt")
1402 {#virtual methods
1403 $FuncDescr{$Version}{$FuncInfoId}{"Virt"} = 1;
1404 }
1405 if(getFuncSpec($FuncInfoId) eq "PureVirt")
1406 {#pure virtual methods
1407 $FuncDescr{$Version}{$FuncInfoId}{"PureVirt"} = 1;
1408 }
1409 if($FuncDescr{$Version}{$FuncInfoId}{"MnglName"} =~ /\A_Z/ and $FuncDescr{$Version}{$FuncInfoId}{"Class"})
1410 {
1411 if($FuncDescr{$Version}{$FuncInfoId}{"Type"} eq "Function")
1412 {#static methods
1413 $FuncDescr{$Version}{$FuncInfoId}{"Static"} = 1;
1414 }
1415 }
1416 if(getFuncLink($FuncInfoId) eq "Static")
1417 {
1418 $FuncDescr{$Version}{$FuncInfoId}{"Static"} = 1;
1419 }
1420 delete($FuncDescr{$Version}{$FuncInfoId}{"Type"});
1421}
1422
1423sub getFuncBody($)
1424{
1425 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
1426 if($FuncInfo =~ /body[ ]*:[ ]*undefined(\ |\Z)/i)
1427 {
1428 return "undefined";
1429 }
1430 elsif($FuncInfo =~ /body[ ]*:[ ]*@([0-9]+)(\ |\Z)/i)
1431 {
1432 return "defined";
1433 }
1434 else
1435 {
1436 return "";
1437 }
1438}
1439
1440sub getTypeShortName($)
1441{
1442 my $TypeName = $_[0];
1443 $TypeName =~ s/\<.*\>//g;
1444 $TypeName =~ s/.*\:\://g;
1445 return $TypeName;
1446}
1447
1448sub getBackRef($)
1449{
1450 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
1451 if($TypeInfo =~ /name[ ]*:[ ]*@([0-9]+) /)
1452 {
1453 return $1;
1454 }
1455 else
1456 {
1457 return "";
1458 }
1459}
1460
1461sub getTypeId($)
1462{
1463 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
1464 if($TypeInfo =~ /type[ ]*:[ ]*@([0-9]+) /)
1465 {
1466 return $1;
1467 }
1468 else
1469 {
1470 return "";
1471 }
1472}
1473
1474sub getFuncId($)
1475{
1476 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
1477 if($FuncInfo =~ /type[ ]*:[ ]*@([0-9]+) /)
1478 {
1479 return $1;
1480 }
1481 else
1482 {
1483 return "";
1484 }
1485}
1486
1487sub setTypeMemb($$)
1488{
1489 my ($TypeDeclId, $TypeId, $TypeAttr) = @_;
1490 my $TypeInfo = $LibInfo{$Version}{$TypeId}{"info"};
1491 my $TypeMembInfoId;
1492 my $TypeType = $TypeAttr->{"Type"};
1493 my $Position = 0;
1494 my $BasePosition = 0;
1495 my $TypeTypeInfoId;
1496 my $StructMembName;
1497 if($TypeType eq "Enum")
1498 {
1499 $TypeMembInfoId = getEnumMembInfoId($TypeId);
1500 while($TypeMembInfoId)
1501 {
1502 $TypeAttr->{"Memb"}{$Position}{"value"} = getEnumMembVal($TypeMembInfoId);
1503 my $MembName = getEnumMembName($TypeMembInfoId);
1504 $TypeAttr->{"Memb"}{$Position}{"name"} = getEnumMembName($TypeMembInfoId);
1505 $EnumMembName_Id{$Version}{getTreeAttr($TypeMembInfoId, "valu")} = ($TypeAttr->{"NameSpace"})?$TypeAttr->{"NameSpace"}."::".$MembName:$MembName;
1506 $TypeMembInfoId = getNextMembInfoId($TypeMembInfoId);
1507 $Position += 1;
1508 }
1509 }
1510 elsif(($TypeType eq "Struct") or ($TypeType eq "Class") or ($TypeType eq "Union"))
1511 {
1512 $TypeMembInfoId = getStructMembInfoId($TypeId);
1513 while($TypeMembInfoId)
1514 {
1515 if($LibInfo{$Version}{$TypeMembInfoId}{"info_type"} ne "field_decl")
1516 {
1517 $TypeMembInfoId = getNextStructMembInfoId($TypeMembInfoId);
1518 next;
1519 }
1520 $StructMembName = getStructMembName($TypeMembInfoId);
1521 if($StructMembName =~ /_vptr\./)
1522 {#virtual tables
1523 $TypeMembInfoId = getNextStructMembInfoId($TypeMembInfoId);
1524 next;
1525 }
1526 if(not $StructMembName)
1527 {#base classes
1528 #$TypeAttr->{"Base"}{$BasePosition}{"type"} = getStructMembType($TypeMembInfoId);
1529 #$TypeAttr->{"Base"}{$BasePosition}{"access"} = getStructMembAccess($TypeMembInfoId);
1530 $BasePosition += 1;
1531 $TypeMembInfoId = getNextStructMembInfoId($TypeMembInfoId);
1532 next;
1533 }
1534 $TypeAttr->{"Memb"}{$Position}{"type"} = getStructMembType($TypeMembInfoId);
1535 $TypeAttr->{"Memb"}{$Position}{"name"} = $StructMembName;
1536 $TypeAttr->{"Memb"}{$Position}{"access"} = getStructMembAccess($TypeMembInfoId);
1537 $TypeAttr->{"Memb"}{$Position}{"bitfield"} = getStructMembBitFieldSize($TypeMembInfoId);
1538
1539 $TypeMembInfoId = getNextStructMembInfoId($TypeMembInfoId);
1540 $Position += 1;
1541 }
1542 }
1543}
1544
1545sub setFuncParams($)
1546{
1547 my $FuncInfoId = $_[0];
1548 my $ParamInfoId = getFuncParamInfoId($FuncInfoId);
1549 my $FunctionType = getFuncType($FuncInfoId);
1550 if($FunctionType eq "Method")
1551 {
1552 $ParamInfoId = getNextElem($ParamInfoId);
1553 }
1554 my $Position = 0;
1555 while($ParamInfoId)
1556 {
1557 my $ParamTypeId = getFuncParamType($ParamInfoId);
1558 last if($TypeDescr{$Version}{getTypeDeclId($ParamTypeId)}{$ParamTypeId}{"Name"} eq "void");
1559 if($TypeDescr{$Version}{getTypeDeclId($ParamTypeId)}{$ParamTypeId}{"Type"} eq "Restrict")
1560 {#delete restrict spec
1561 $ParamTypeId = getRestrictBase($ParamTypeId);
1562 }
1563 $FuncDescr{$Version}{$FuncInfoId}{"Param"}{$Position}{"type"} = $ParamTypeId;
1564 $FuncDescr{$Version}{$FuncInfoId}{"Param"}{$Position}{"name"} = getFuncParamName($ParamInfoId);
1565 if(not $FuncDescr{$Version}{$FuncInfoId}{"Param"}{$Position}{"name"})
1566 {
1567 $FuncDescr{$Version}{$FuncInfoId}{"Param"}{$Position}{"name"} = "p".($Position+1);
1568 }
1569 $ParamInfoId = getNextElem($ParamInfoId);
1570 $Position += 1;
1571 }
1572 if(detect_nolimit_args($FuncInfoId))
1573 {
1574 $FuncDescr{$Version}{$FuncInfoId}{"Param"}{$Position}{"type"} = -1;
1575 }
1576}
1577
1578sub detect_nolimit_args($)
1579{
1580 my $FuncInfoId = $_[0];
1581 my $FuncTypeId = getFuncTypeId($FuncInfoId);
1582 my $ParamListElemId = getFuncParamTreeListId($FuncTypeId);
1583 my $HaveVoid = 0;
1584 my $Position = 0;
1585 while($ParamListElemId)
1586 {
1587 my $ParamTypeId = getTreeAttr($ParamListElemId, "valu");
1588 if($TypeDescr{$Version}{getTypeDeclId($ParamTypeId)}{$ParamTypeId}{"Name"} eq "void")
1589 {
1590 $HaveVoid = 1;
1591 last;
1592 }
1593 $ParamListElemId = getNextElem($ParamListElemId);
1594 $Position += 1;
1595 }
1596 return ($Position>=1 and not $HaveVoid);
1597}
1598
1599sub getFuncParamTreeListId($)
1600{
1601 my $FuncTypeId = $_[0];
1602 if($LibInfo{$Version}{$FuncTypeId}{"info"} =~ /prms[ ]*:[ ]*@([0-9]+) /)
1603 {
1604 return $1;
1605 }
1606 else
1607 {
1608 return "";
1609 }
1610}
1611
1612sub getTreeAttr($$)
1613{
1614 my ($Id, $Attr) = @_;
1615 if($LibInfo{$Version}{$Id}{"info"} =~ /$Attr[ ]*:[ ]*@([0-9]+) /)
1616 {
1617 return $1;
1618 }
1619 else
1620 {
1621 return "";
1622 }
1623}
1624
1625sub getRestrictBase($)
1626{
1627 my $TypeId = $_[0];
1628 my $TypeDeclId = getTypeDeclId($TypeId);
1629 my $BaseTypeId = $TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"BaseType"}{"Tid"};
1630 my $BaseTypeDeclId = $TypeDescr{$Version}{$TypeDeclId}{$TypeId}{"BaseType"}{"TDid"};
1631 return $BaseTypeId;
1632}
1633
1634sub setFuncAccess($)
1635{
1636 my $FuncInfoId = $_[0];
1637 if($LibInfo{$Version}{$FuncInfoId}{"info"} =~ /accs[ ]*:[ ]*([a-zA-Z]+) /)
1638 {
1639 my $Access = $1;
1640 if($Access eq "prot")
1641 {
1642 $FuncDescr{$Version}{$FuncInfoId}{"Protected"} = 1;
1643 }
1644 elsif($Access eq "priv")
1645 {
1646 $FuncDescr{$Version}{$FuncInfoId}{"Private"} = 1;
1647 }
1648 }
1649}
1650
1651sub setTypeAccess($$)
1652{
1653 my ($TypeId, $TypeAttr) = @_;
1654 my $TypeInfo = $LibInfo{$Version}{$TypeId}{"info"};
1655 if($TypeInfo =~ /accs[ ]*:[ ]*([a-zA-Z]+) /)
1656 {
1657 my $Access = $1;
1658 if($Access eq "prot")
1659 {
1660 $TypeAttr->{"Protected"} = 1;
1661 }
1662 elsif($Access eq "priv")
1663 {
1664 $TypeAttr->{"Private"} = 1;
1665 }
1666 }
1667}
1668
1669sub setFuncKind($)
1670{
1671 my $FuncInfoId = $_[0];
1672 if($LibInfo{$Version}{$FuncInfoId}{"info"} =~ /pseudo tmpl/)
1673 {
1674 $FuncDescr{$Version}{$FuncInfoId}{"PseudoTemplate"} = 1;
1675 }
1676 elsif($LibInfo{$Version}{$FuncInfoId}{"info"} =~ /note[ ]*:[ ]*constructor /)
1677 {
1678 $FuncDescr{$Version}{$FuncInfoId}{"Constructor"} = 1;
1679 }
1680 elsif($LibInfo{$Version}{$FuncInfoId}{"info"} =~ /note[ ]*:[ ]*destructor /)
1681 {
1682 $FuncDescr{$Version}{$FuncInfoId}{"Destructor"} = 1;
1683 }
1684}
1685
1686sub getFuncSpec($)
1687{
1688 my $FuncInfoId = $_[0];
1689 my $FuncInfo = $LibInfo{$Version}{$FuncInfoId}{"info"};
1690 if($FuncInfo =~ m/spec[ ]*:[ ]*pure /)
1691 {
1692 return "PureVirt";
1693 }
1694 elsif($FuncInfo =~ m/spec[ ]*:[ ]*virt /)
1695 {
1696 return "Virt";
1697 }
1698 else
1699 {
1700 if($FuncInfo =~ /spec[ ]*:[ ]*([a-zA-Z]+) /)
1701 {
1702 return $1;
1703 }
1704 else
1705 {
1706 return "";
1707 }
1708 }
1709}
1710
1711sub getFuncClass($)
1712{
1713 my $FuncInfoId = $_[0];
1714 my $FuncInfo = $LibInfo{$Version}{$FuncInfoId}{"info"};
1715 if($FuncInfo =~ /scpe[ ]*:[ ]*@([0-9]+) /)
1716 {
1717 return $1;
1718 }
1719 else
1720 {
1721 return "";
1722 }
1723}
1724
1725sub getFuncLink($)
1726{
1727 my $FuncInfoId = $_[0];
1728 my $FuncInfo = $LibInfo{$Version}{$FuncInfoId}{"info"};
1729 if($FuncInfo =~ /link[ ]*:[ ]*static /)
1730 {
1731 return "Static";
1732 }
1733 else
1734 {
1735 if($FuncInfo =~ /link[ ]*:[ ]*([a-zA-Z]+) /)
1736 {
1737 return $1;
1738 }
1739 else
1740 {
1741 return "";
1742 }
1743 }
1744}
1745
1746sub getNextElem($)
1747{
1748 my $FuncInfoId = $_[0];
1749 my $FuncInfo = $LibInfo{$Version}{$FuncInfoId}{"info"};
1750 if($FuncInfo =~ /chan[ ]*:[ ]*@([0-9]+) /)
1751 {
1752 return $1;
1753 }
1754 else
1755 {
1756 return "";
1757 }
1758}
1759
1760sub getFuncParamInfoId($)
1761{
1762 my $FuncInfoId = $_[0];
1763 my $FuncInfo = $LibInfo{$Version}{$FuncInfoId}{"info"};
1764 if($FuncInfo =~ /args[ ]*:[ ]*@([0-9]+) /)
1765 {
1766 return $1;
1767 }
1768 else
1769 {
1770 return "";
1771 }
1772}
1773
1774sub getFuncParamType($)
1775{
1776 my $ParamInfoId = $_[0];
1777 my $ParamInfo = $LibInfo{$Version}{$ParamInfoId}{"info"};
1778 if($ParamInfo =~ /type[ ]*:[ ]*@([0-9]+) /)
1779 {
1780 return $1;
1781 }
1782 else
1783 {
1784 return "";
1785 }
1786}
1787
1788sub getFuncParamName($)
1789{
1790 my $ParamInfoId = $_[0];
1791 my $ParamInfo = $LibInfo{$Version}{$ParamInfoId}{"info"};
1792 return "" if($ParamInfo !~ /name[ ]*:[ ]*@([0-9]+) /);
1793 my $NameInfoId = $1;
1794 return "" if($LibInfo{$Version}{$NameInfoId}{"info"} !~ /strg[ ]*:[ ]*(.*)[ ]+lngt/);
1795 my $FuncParamName = $1;
1796 $FuncParamName =~ s/[ ]+\Z//g;
1797 return $FuncParamName;
1798}
1799
1800sub getEnumMembInfoId($)
1801{
1802 my $TypeInfoId = $_[0];
1803 my $TypeInfo = $LibInfo{$Version}{$TypeInfoId}{"info"};
1804 if($TypeInfo =~ /csts[ ]*:[ ]*@([0-9]+) /)
1805 {
1806 return $1;
1807 }
1808 else
1809 {
1810 return "";
1811 }
1812}
1813
1814sub getStructMembInfoId($)
1815{
1816 my $TypeInfoId = $_[0];
1817 my $TypeInfo = $LibInfo{$Version}{$TypeInfoId}{"info"};
1818 if($TypeInfo =~ /flds[ ]*:[ ]*@([0-9]+) /)
1819 {
1820 return $1;
1821 }
1822 else
1823 {
1824 return "";
1825 }
1826}
1827
1828sub getNameSpace($)
1829{
1830 my $TypeInfoId = $_[0];
1831 my $TypeInfo = $LibInfo{$Version}{$TypeInfoId}{"info"};
1832 return "" if($TypeInfo !~ /scpe[ ]*:[ ]*@([0-9]+) /);
1833 my $NameSpaceInfoId = $1;
1834 if($LibInfo{$Version}{$NameSpaceInfoId}{"info_type"} eq "namespace_decl")
1835 {
1836 my $NameSpaceInfo = $LibInfo{$Version}{$NameSpaceInfoId}{"info"};
1837 if($NameSpaceInfo =~ /name[ ]*:[ ]*@([0-9]+) /)
1838 {
1839 my $NameSpaceId = $1;
1840 my $NameSpaceIdentifier = $LibInfo{$Version}{$NameSpaceId}{"info"};
1841 return "" if($NameSpaceIdentifier !~ /strg[ ]*:[ ]*(.*)[ ]+lngt/);
1842 my $NameSpace = $1;
1843 $NameSpace =~ s/[ ]+\Z//g;
1844 my $BaseNameSpace = getNameSpace($NameSpaceInfoId);
1845 $NameSpace = $BaseNameSpace."::".$NameSpace if($BaseNameSpace);
1846 return $NameSpace;
1847 }
1848 else
1849 {
1850 return "";
1851 }
1852 }
1853 elsif($LibInfo{$Version}{$NameSpaceInfoId}{"info_type"} eq "record_type")
1854 {
1855 my %NameSpaceAttr = getTypeAttr(getTypeDeclId($NameSpaceInfoId), $NameSpaceInfoId);
1856 return $NameSpaceAttr{"Name"};
1857 }
1858 else
1859 {
1860 return "";
1861 }
1862}
1863
1864sub getNameSpaceId($)
1865{
1866 my $TypeInfoId = $_[0];
1867 my $TypeInfo = $LibInfo{$Version}{$TypeInfoId}{"info"};
1868 if($TypeInfo =~ /scpe[ ]*:[ ]*@([0-9]+) /)
1869 {
1870 return $1;
1871 }
1872 else
1873 {
1874 return "";
1875 }
1876}
1877
1878sub getEnumMembName($)
1879{
1880 my $TypeMembInfoId = $_[0];
1881 return "" if($LibInfo{$Version}{$TypeMembInfoId}{"info"} !~ /purp[ ]*:[ ]*@([0-9]+)/);
1882 my $Purp = $1;
1883 return "" if($LibInfo{$Version}{$Purp}{"info"} !~ /strg[ ]*:[ ]*(.*)[ ]+lngt/);
1884 my $EnumMembName = $1;
1885 $EnumMembName =~ s/[ ]+\Z//g;
1886 return $EnumMembName;
1887}
1888
1889sub getStructMembName($)
1890{
1891 my $TypeMembInfoId = $_[0];
1892 return "" if($LibInfo{$Version}{$TypeMembInfoId}{"info"} !~ /name[ ]*:[ ]*@([0-9]+) /);
1893 my $NameInfoId = $1;
1894 return "" if($LibInfo{$Version}{$NameInfoId}{"info"} !~ /strg[ ]*:[ ]*(.*)[ ]+lngt/);
1895 my $StructMembName = $1;
1896 $StructMembName =~ s/[ ]+\Z//g;
1897 return $StructMembName;
1898}
1899
1900sub getEnumMembVal($)
1901{
1902 my $TypeMembInfoId = $_[0];
1903 return "" if($LibInfo{$Version}{$TypeMembInfoId}{"info"} !~ /valu[ ]*:[ ]*@([0-9]+) /);
1904 my $Valu = $1;
1905 if($LibInfo{$Version}{$Valu}{"info"} =~ /low[ ]*:[ ]*(-?[0-9]+) /)
1906 {
1907 return $1;
1908 }
1909 else
1910 {
1911 return "";
1912 }
1913}
1914
1915sub getSize($)
1916{
1917 my $Info = $LibInfo{$Version}{$_[0]}{"info"};
1918 if($Info =~ /size[ ]*:[ ]*@([0-9]+) /)
1919 {
1920 my $SizeInfoId = $1;
1921 if($LibInfo{$Version}{$SizeInfoId}{"info"} =~ /low[ ]*:[ ]*(-?[0-9]+) /)
1922 {
1923 return $1;
1924 }
1925 else
1926 {
1927 return "";
1928 }
1929 }
1930 else
1931 {
1932 return 0;
1933 }
1934}
1935
1936sub getStructMembType($)
1937{
1938 my $TypeMembInfoId = $_[0];
1939 if($LibInfo{$Version}{$TypeMembInfoId}{"info"} =~ /type[ ]*:[ ]*@([0-9]+) /)
1940 {
1941 return $1;
1942 }
1943 else
1944 {
1945 return "";
1946 }
1947}
1948
1949sub getStructMembBitFieldSize($)
1950{
1951 my $TypeMembInfoId = $_[0];
1952 if($LibInfo{$Version}{$TypeMembInfoId}{"info"} =~ / bitfield /)
1953 {
1954 return getSize($TypeMembInfoId);
1955 }
1956 else
1957 {
1958 return 0;
1959 }
1960}
1961
1962sub getStructMembAccess($)
1963{
1964 my $MembInfo = $LibInfo{$Version}{$_[0]}{"info"};
1965 if($MembInfo =~ /accs[ ]*:[ ]*([a-zA-Z]+) /)
1966 {
1967 my $Access = $1;
1968 if($Access eq "prot")
1969 {
1970 return "protected";
1971 }
1972 elsif($Access eq "priv")
1973 {
1974 return "private";
1975 }
1976 else
1977 {
1978 return "public";
1979 }
1980 }
1981 else
1982 {
1983 return "public";
1984 }
1985}
1986
1987sub getNextMembInfoId($)
1988{
1989 my $TypeMembInfoId = $_[0];
1990 if($LibInfo{$Version}{$TypeMembInfoId}{"info"} =~ /chan[ ]*:[ ]*@([0-9]+) /)
1991 {
1992 return $1;
1993 }
1994 else
1995 {
1996 return "";
1997 }
1998}
1999
2000sub getNextStructMembInfoId($)
2001{
2002 my $TypeMembInfoId = $_[0];
2003 if($LibInfo{$Version}{$TypeMembInfoId}{"info"} =~ /chan[ ]*:[ ]*@([0-9]+) /)
2004 {
2005 return $1;
2006 }
2007 else
2008 {
2009 return "";
2010 }
2011}
2012
2013sub fieldHasName($)
2014{
2015 my $TypeMembInfoId = $_[0];
2016 if($LibInfo{$Version}{$TypeMembInfoId}{"info_type"} eq "field_decl")
2017 {
2018 if($LibInfo{$Version}{$TypeMembInfoId}{"info"} =~ /name[ ]*:[ ]*@([0-9]+) /)
2019 {
2020 return $1;
2021 }
2022 else
2023 {
2024 return "";
2025 }
2026 }
2027 else
2028 {
2029 return 0;
2030 }
2031}
2032
2033sub getTypeHeader($)
2034{
2035 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
2036 if($TypeInfo =~ /srcp[ ]*:[ ]*([0-9a-zA-Z\_\-\<\>\.\+]+):([0-9]+) /)
2037 {
2038 return ($1, $2);
2039 }
2040 else
2041 {
2042 return ();
2043 }
2044}
2045
2046sub register_header($$$)
2047{
2048 my ($Destination, $Position, $LibVersion) = @_;
2049 return if(not $Destination);
2050 if($Destination=~/\A\// and not -f $Destination)
2051 {
2052 print "\nERROR: specified header \'$Destination\' does not exist\n";
2053 return;
2054 }
2055 my $Header_Name = get_FileName($Destination);
2056 $Headers{$LibVersion}{$Destination}{"Name"} = $Header_Name;
2057 $Headers{$LibVersion}{$Destination}{"Position"} = $Position;
2058 $Headers{$LibVersion}{$Destination}{"Identity"} = $Destination;
2059 $HeaderName_Destinations{$LibVersion}{$Header_Name}{$Destination} = 1;
2060}
2061
2062sub headerSearch($)
2063{
2064 my $LibVersion = $_[0];
2065 foreach my $Dest (split("\n", $Descriptor{$LibVersion}{"Include_Paths"}))
2066 {
2067 $Dest =~ s/\A\s+|\s+\Z//g;
2068 next if(not $Dest);
2069 if(not -e $Dest)
2070 {
2071 print "ERROR: can't access \'$Dest\'\n";
2072 }
2073 $Header_Dependency{$LibVersion}{$Dest} = 1;
2074 }
2075 foreach my $Dest (split("\n", $Descriptor{$LibVersion}{"Headers"}))
2076 {#fill %Header_Dependency
2077 if(-d $Dest)
2078 {
2079 foreach my $Dir (cmd_find($Dest,"d",""))
2080 {
2081 chomp($Dir);
2082 $Header_Dependency{$LibVersion}{$Dir} = 1;
2083 }
2084 }
2085 elsif(-f $Dest)
2086 {
2087 $Header_Dependency{$LibVersion}{get_Dir($Dest)} = 1;
2088 }
2089 }
2090 my $Position = 0;
2091 foreach my $Dest (split("\n", $Descriptor{$LibVersion}{"Headers"}))
2092 {
2093 $Dest =~ s/\A\s+|\s+\Z//g;
2094 next if(not $Dest);
2095 if(is_header($Dest, $LibVersion))
2096 {
2097 register_header($Dest, $Position, $LibVersion);
2098 $Position += 1;
2099 }
2100 elsif(-d $Dest)
2101 {
2102 foreach my $Destination (sort {lc($a) cmp lc($b)} (cmd_find($Dest,"f","")))
2103 {
2104 chomp($Destination);
2105 next if(not is_header($Destination, $LibVersion));
2106 register_header($Destination, $Position, $LibVersion);
2107 $Position += 1;
2108 }
2109 }
2110 else
2111 {
2112 print "WARNING: \'$Dest\' was not found in the specified include paths\n";
2113 register_header($Dest, $Position, $LibVersion);
2114 $Position += 1;
2115 }
2116 }
2117 if(keys(%{$Headers{$LibVersion}})==1)
2118 {
2119 my $Destination = (keys(%{$Headers{$LibVersion}}))[0];
2120 $Headers{$LibVersion}{$Destination}{"Identity"} = $Headers{$LibVersion}{$Destination}{"Name"};
2121 }
2122 foreach my $Header_Name (keys(%{$HeaderName_Destinations{$LibVersion}}))
2123 {#set relative paths (for dublicates)
2124 if(keys(%{$HeaderName_Destinations{$LibVersion}{$Header_Name}})>1)
2125 {
2126 my $FirstDest = (keys(%{$HeaderName_Destinations{$LibVersion}{$Header_Name}}))[0];
2127 my $Prefix = get_Dir($FirstDest);
2128 while($Prefix =~ /\A(.+)\/[^\/]+\Z/)
2129 {
2130 my $NewPrefix = $1;
2131 my $Changes_Number = 0;
2132 my %Identity = ();
2133 foreach my $Dest (keys(%{$HeaderName_Destinations{$LibVersion}{$Header_Name}}))
2134 {
2135 if($Dest =~ /\A$Prefix\/(.*)\Z/)
2136 {
2137 $Identity{$Dest} = $1;
2138 $Changes_Number+=1;
2139 }
2140 }
2141 if($Changes_Number eq keys(%{$HeaderName_Destinations{$LibVersion}{$Header_Name}}))
2142 {
2143 foreach my $Dest (keys(%{$HeaderName_Destinations{$LibVersion}{$Header_Name}}))
2144 {
2145 $Headers{$LibVersion}{$Dest}{"Identity"} = $Identity{$Dest};
2146 }
2147 last;
2148 }
2149 $Prefix = $NewPrefix;
2150 }
2151 }
2152 }
2153 if(not keys(%{$Headers{$LibVersion}}))
2154 {
2155 print "ERROR: header files were not found\n";
2156 exit(1);
2157 }
2158}
2159
2160sub get_FileName($)
2161{
2162 my $Path = $_[0];
2163 if($Path =~ /\A(.*\/)([^\/]*)\Z/)
2164 {
2165 return $2;
2166 }
2167 else
2168 {
2169 return $Path;
2170 }
2171}
2172
2173sub get_Dir($)
2174{
2175 my $Path = $_[0];
2176 return "" if($Path =~ m*\A\./*);
2177 if($Path =~ /\A(.*)\/([^\/]*)\Z/)
2178 {
2179 return $1;
2180 }
2181 else
2182 {
2183 return "";
2184 }
2185}
2186
2187sub esc($)
2188{
2189 my $Str = $_[0];
2190 $Str =~ s/([()\[\]{}$ &'"`;,<>])/\\$1/g;
2191 return $Str;
2192}
2193
2194sub getLocation($)
2195{
2196 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
2197 if($TypeInfo =~ /srcp[ ]*:[ ]*([0-9a-zA-Z\_\-\<\>\.\+]+):([0-9]+) /)
2198 {
2199 return ($1, $2);
2200 }
2201 else
2202 {
2203 return ();
2204 }
2205}
2206
2207sub getHeader($)
2208{
2209 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
2210 if($TypeInfo =~ /srcp[ ]*:[ ]*([0-9a-zA-Z\_\-\<\>\.\+]+):([0-9]+) /)
2211 {
2212 return $1;
2213 }
2214 else
2215 {
2216 return "";
2217 }
2218}
2219
2220sub getLine($)
2221{
2222 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
2223 if($TypeInfo =~ /srcp[ ]*:[ ]*([0-9a-zA-Z\_\-\<\>\.\+]+):([0-9]+) /)
2224 {
2225 return $2;
2226 }
2227 else
2228 {
2229 return "";
2230 }
2231}
2232
2233sub getTypeType($$)
2234{
2235 my ($TypeDeclId, $TypeId) = @_;
2236 return "Const" if($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:[ ]*c / and $LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@/);
2237 return "Typedef" if($LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:/ and $LibInfo{$Version}{$TypeId}{"info"} !~ /qual[ ]*:/);
2238 return "Volatile" if($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:[ ]*v / and $LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@/);
2239 return "Restrict" if($LibInfo{$Version}{$TypeId}{"info"} =~ /qual[ ]*:[ ]*r / and $LibInfo{$Version}{$TypeId}{"info"} =~ /unql[ ]*:[ ]*\@/);
2240 my $TypeType = getTypeTypeByTypeId($TypeId);
2241 if($TypeType eq "Struct")
2242 {
2243 if($TypeDeclId and $LibInfo{$Version}{$TypeDeclId}{"info_type"} eq "template_decl")
2244 {
2245 return "Template";
2246 }
2247 else
2248 {
2249 return "Struct";
2250 }
2251 }
2252 else
2253 {
2254 return $TypeType;
2255 }
2256
2257}
2258
2259sub getTypeTypeByTypeId($)
2260{
2261 my $TypeId = $_[0];
2262 my $TypeType = $LibInfo{$Version}{$TypeId}{"info_type"};
2263 if($TypeType =~ /integer_type|real_type|boolean_type|void_type|complex_type/)
2264 {
2265 return "Intrinsic";
2266 }
2267 elsif(isFuncPtr($TypeId))
2268 {
2269 return "FuncPtr";
2270 }
2271 elsif($TypeType eq "pointer_type")
2272 {
2273 return "Pointer";
2274 }
2275 elsif($TypeType eq "reference_type")
2276 {
2277 return "Ref";
2278 }
2279 elsif($TypeType eq "union_type")
2280 {
2281 return "Union";
2282 }
2283 elsif($TypeType eq "enumeral_type")
2284 {
2285 return "Enum";
2286 }
2287 elsif($TypeType eq "record_type")
2288 {
2289 return "Struct";
2290 }
2291 elsif($TypeType eq "array_type")
2292 {
2293 return "Array";
2294 }
2295 elsif($TypeType eq "complex_type")
2296 {
2297 return "Intrinsic";
2298 }
2299 elsif($TypeType eq "function_type")
2300 {
2301 return "FunctionType";
2302 }
2303 elsif($TypeType eq "method_type")
2304 {
2305 return "MethodType";
2306 }
2307 else
2308 {
2309 return "Unknown";
2310 }
2311}
2312
2313sub getNameByInfo($)
2314{
2315 my $TypeInfo = $LibInfo{$Version}{$_[0]}{"info"};
2316 return "" if($TypeInfo !~ /name[ ]*:[ ]*@([0-9]+) /);
2317 my $TypeNameInfoId = $1;
2318 return "" if($LibInfo{$Version}{$TypeNameInfoId}{"info"} !~ /strg[ ]*:[ ]*(.*)[ ]+lngt/);
2319 my $TypeName = $1;
2320 $TypeName =~ s/[ ]+\Z//g;
2321 return $TypeName;
2322}
2323
2324sub getFuncShortName($)
2325{
2326 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
2327 if($FuncInfo =~ / operator /)
2328 {
2329 if($FuncInfo =~ /note[ ]*:[ ]*conversion /)
2330 {
2331 return "operator ".get_TypeName($FuncDescr{$Version}{$_[0]}{"Return"});
2332 }
2333 else
2334 {
2335 return "" if($FuncInfo !~ / operator[ ]+([a-zA-Z]+) /);
2336 return "operator".$Operator_Indication{$1};
2337 }
2338 }
2339 else
2340 {
2341 return "" if($FuncInfo !~ /name[ ]*:[ ]*@([0-9]+) /);
2342 my $FuncNameInfoId = $1;
2343 return "" if($LibInfo{$Version}{$FuncNameInfoId}{"info"} !~ /strg[ ]*:[ ]*([^ ]*)[ ]+lngt/);
2344 return $1;
2345 }
2346}
2347
2348sub getFuncMnglName($)
2349{
2350 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
2351 return "" if($FuncInfo !~ /mngl[ ]*:[ ]*@([0-9]+) /);
2352 my $FuncMnglNameInfoId = $1;
2353 return "" if($LibInfo{$Version}{$FuncMnglNameInfoId}{"info"} !~ /strg[ ]*:[ ]*([^ ]*)[ ]+/);
2354 my $FuncMnglName = $1;
2355 $FuncMnglName =~ s/[ ]+\Z//g;
2356 return $FuncMnglName;
2357}
2358
2359sub getFuncReturn($)
2360{
2361 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
2362 return "" if($FuncInfo !~ /type[ ]*:[ ]*@([0-9]+) /);
2363 my $FuncTypeInfoId = $1;
2364 return "" if($LibInfo{$Version}{$FuncTypeInfoId}{"info"} !~ /retn[ ]*:[ ]*@([0-9]+) /);
2365 my $FuncReturnTypeId = $1;
2366 if($TypeDescr{$Version}{getTypeDeclId($FuncReturnTypeId)}{$FuncReturnTypeId}{"Type"} eq "Restrict")
2367 {#delete restrict spec
2368 $FuncReturnTypeId = getRestrictBase($FuncReturnTypeId);
2369 }
2370 return $FuncReturnTypeId;
2371}
2372
2373sub getFuncOrig($)
2374{
2375 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
2376 if($FuncInfo =~ /orig[ ]*:[ ]*@([0-9]+) /)
2377 {
2378 return $1;
2379 }
2380 else
2381 {
2382 return $_[0];
2383 }
2384}
2385
2386sub unmangleArray(@)
2387{
2388 if($#_>$MAX_COMMAND_LINE_ARGUMENTS)
2389 {
2390 my @Half = splice(@_, 0, ($#_+1)/2);
2391 return (unmangleArray(@Half), unmangleArray(@_))
2392 }
2393 else
2394 {
2395 my $UnmangleCommand = "c++filt ".join(" ", @_);
2396 return split("\n", `$UnmangleCommand`);
2397 }
2398}
2399
2400sub get_Signature($$)
2401{
2402 my ($Interface, $LibVersion) = @_;
2403 return $Cache{"get_Signature"}{$Interface}{$LibVersion} if($Cache{"get_Signature"}{$Interface}{$LibVersion});
2404 my ($MnglName, $SymbolVersion) = ($Interface, "");
2405 if($Interface =~ /\A([^@]+)[\@]+([^@]+)\Z/)
2406 {
2407 ($MnglName, $SymbolVersion) = ($1, $2);
2408 }
2409 if($MnglName =~ /\A(_ZGV|_ZTI|_ZTS|_ZTT|_ZTV|_ZThn|_ZTv0_n)/)
2410 {
2411 $Cache{"get_Signature"}{$Interface}{$LibVersion} = $tr_name{$MnglName}.(($SymbolVersion)?"\@".$SymbolVersion:"");
2412 return $Cache{"get_Signature"}{$Interface}{$LibVersion};
2413 }
2414 if(not $CompleteSignature{$LibVersion}{$Interface})
2415 {
2416 if($Interface =~ /\A_Z/)
2417 {
2418 $Cache{"get_Signature"}{$Interface}{$LibVersion} = $tr_name{$MnglName}.(($SymbolVersion)?"\@".$SymbolVersion:"");
2419 return $Cache{"get_Signature"}{$Interface}{$LibVersion};
2420 }
2421 else
2422 {
2423 $Cache{"get_Signature"}{$Interface}{$LibVersion} = $Interface;
2424 return $Interface;
2425 }
2426 }
2427 my ($Func_Signature, @Param_Types_FromUnmangledName) = ();
2428 my $ShortName = $CompleteSignature{$LibVersion}{$Interface}{"ShortName"};
2429 if($Interface =~ /\A_Z/)
2430 {
2431 if($CompleteSignature{$LibVersion}{$Interface}{"Class"})
2432 {
2433 $Func_Signature = get_TypeName($CompleteSignature{$LibVersion}{$Interface}{"Class"}, $LibVersion)."::".(($CompleteSignature{$LibVersion}{$Interface}{"Destructor"})?"~":"").$ShortName;
2434 }
2435 else
2436 {
2437 $Func_Signature = $ShortName;
2438 }
2439 @Param_Types_FromUnmangledName = get_Signature_Parts($tr_name{$MnglName}, 0);
2440 }
2441 else
2442 {
2443 $Func_Signature = $MnglName;
2444 }
2445 my @ParamArray = ();
2446 foreach my $Pos (sort {int($a) <=> int($b)} keys(%{$CompleteSignature{$LibVersion}{$Interface}{"Param"}}))
2447 {
2448 next if($Pos eq "");
2449 my $ParamTypeId = $CompleteSignature{$LibVersion}{$Interface}{"Param"}{$Pos}{"type"};
2450 my $ParamTypeName = $TypeDescr{$LibVersion}{$Tid_TDid{$LibVersion}{$ParamTypeId}}{$ParamTypeId}{"Name"};
2451 $ParamTypeName = $Param_Types_FromUnmangledName[$Pos] if(not $ParamTypeName);
2452 if(my $ParamName = $CompleteSignature{$LibVersion}{$Interface}{"Param"}{$Pos}{"name"})
2453 {
2454 if($ParamTypeName=~/\([*]+\)/)
2455 {
2456 $ParamTypeName=~s/\(([*]+)\)/\($1$ParamName\)/;
2457 push(@ParamArray, $ParamTypeName);
2458 }
2459 else
2460 {
2461 push(@ParamArray, $ParamTypeName." ".$ParamName);
2462 }
2463 }
2464 else
2465 {
2466 push(@ParamArray, $ParamTypeName);
2467 }
2468 }
2469 if(not $CompleteSignature{$LibVersion}{$Interface}{"Data"})
2470 {
2471 if($Interface=~/\A_Z/)
2472 {
2473 if($CompleteSignature{$LibVersion}{$Interface}{"Constructor"})
2474 {
2475 if($Interface=~/C1/)
2476 {
2477 $Func_Signature .= " [in-charge]";
2478 }
2479 elsif($Interface=~/C2/)
2480 {
2481 $Func_Signature .= " [not-in-charge]";
2482 }
2483 }
2484 elsif($CompleteSignature{$LibVersion}{$Interface}{"Destructor"})
2485 {
2486 if($Interface=~/D1/)
2487 {
2488 $Func_Signature .= " [in-charge]";
2489 }
2490 elsif($Interface=~/D2/)
2491 {
2492 $Func_Signature .= " [not-in-charge]";
2493 }
2494 elsif($Interface=~/D0/)
2495 {
2496 $Func_Signature .= " [in-charge-deleting]";
2497 }
2498 }
2499 }
2500 $Func_Signature .= " (".join(", ", @ParamArray).")";
2501 }
2502 if($Interface=~/\A_ZNK/)
2503 {
2504 $Func_Signature .= " const";
2505 }
2506 $Func_Signature .= "\@".$SymbolVersion if($SymbolVersion);
2507 $Cache{"get_Signature"}{$Interface}{$LibVersion} = $Func_Signature;
2508 return $Func_Signature;
2509}
2510
2511sub getVarNameByAttr($)
2512{
2513 my $FuncInfoId = $_[0];
2514 my $VarName;
2515 return "" if(not $FuncDescr{$Version}{$FuncInfoId}{"ShortName"});
2516 if($FuncDescr{$Version}{$FuncInfoId}{"Class"})
2517 {
2518 $VarName .= $TypeDescr{$Version}{getTypeDeclId($FuncDescr{$Version}{$FuncInfoId}{"Class"})}{$FuncDescr{$Version}{$FuncInfoId}{"Class"}}{"Name"};
2519 $VarName .= "::";
2520 }
2521 $VarName .= $FuncDescr{$Version}{$FuncInfoId}{"ShortName"};
2522 return $VarName;
2523}
2524
2525sub mangleFuncName($)
2526{
2527 my $FuncId = $_[0];
2528}
2529
2530sub getFuncType($)
2531{
2532 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
2533 return "" if($FuncInfo !~ /type[ ]*:[ ]*@([0-9]+) /);
2534 my $FuncTypeInfoId = $1;
2535 my $FunctionType = $LibInfo{$Version}{$FuncTypeInfoId}{"info_type"};
2536 if($FunctionType eq "method_type")
2537 {
2538 return "Method";
2539 }
2540 elsif($FunctionType eq "function_type")
2541 {
2542 return "Function";
2543 }
2544 else
2545 {
2546 return $FunctionType;
2547 }
2548}
2549
2550sub getFuncTypeId($)
2551{
2552 my $FuncInfo = $LibInfo{$Version}{$_[0]}{"info"};
2553 if($FuncInfo =~ /type[ ]*:[ ]*@([0-9]+)( |\Z)/)
2554 {
2555 return $1;
2556 }
2557 else
2558 {
2559 return 0;
2560 }
2561}
2562
2563sub isNotAnon($)
2564{
2565 return (not isAnon($_[0]));
2566}
2567
2568sub isAnon($)
2569{
2570 return (($_[0] =~ m/\.\_[0-9]+/) or ($_[0] =~ m/anon-/));
2571}
2572
2573sub unmangled_Compact($$)
2574#Removes all non-essential (for C++ language) whitespace from a string. If
2575#the whitespace is essential it will be replaced with exactly one ' '
2576#character. Works correctly only for unmangled names.
2577#If level > 1 is supplied, can relax its intent to compact the string.
2578{
2579 my $result=$_[0];
2580 my $level = $_[1] || 1;
2581 my $o1 = ($level>1)?' ':'';
2582 #First, we reduce all spaces that we can
2583 my $coms='[-()<>:*&~!|+=%@~"?.,/[^'."']";
2584 my $coms_nobr='[-()<:*&~!|+=%@~"?.,'."']";
2585 my $clos='[),;:\]]';
2586 $result=~s/^\s+//gm;
2587 $result=~s/\s+$//gm;
2588 $result=~s/((?!\n)\s)+/ /g;
2589 $result=~s/(\w+)\s+($coms+)/$1$o1$2/gm;
2590 #$result=~s/(\w)(\()/$1$o1$2/gm if $o1;
2591 $result=~s/($coms+)\s+(\w+)/$1$o1$2/gm;
2592 $result=~s/(\()\s+(\w)/$1$2/gm if $o1;
2593 $result=~s/(\w)\s+($clos)/$1$2/gm;
2594 $result=~s/($coms+)\s+($coms+)/$1 $2/gm;
2595 $result=~s/($coms_nobr+)\s+($coms+)/$1$o1$2/gm;
2596 $result=~s/($coms+)\s+($coms_nobr+)/$1$o1$2/gm;
2597 #don't forget about >> and <:. In unmangled names global-scope modifier
2598 #is not used, so <: will always be a digraph and requires no special treatment.
2599 #We also try to remove other parts that are better to be removed here than in other places
2600 #double-cv
2601 $result=~s/\bconst\s+const\b/const/gm;
2602 $result=~s/\bvolatile\s+volatile\b/volatile/gm;
2603 $result=~s/\bconst\s+volatile\b\s+const\b/const volatile/gm;
2604 $result=~s/\bvolatile\s+const\b\s+volatile\b/const volatile/gm;
2605 #Place cv in proper order
2606 $result=~s/\bvolatile\s+const\b/const volatile/gm;
2607 return $result;
2608}
2609
2610sub unmangled_PostProcess($)
2611{
2612 my $result = $_[0];
2613 #s/\bunsigned int\b/unsigned/g;
2614 $result =~ s/\bshort unsigned int\b/unsigned short/g;
2615 $result =~ s/\bshort int\b/short/g;
2616 $result =~ s/\blong long unsigned int\b/unsigned long long/g;
2617 $result =~ s/\blong unsigned int\b/unsigned long/g;
2618 $result =~ s/\blong long int\b/long long/g;
2619 $result =~ s/\blong int\b/long/g;
2620 $result =~ s/\)const\b/\) const/g;
2621 $result =~ s/\blong long unsigned\b/unsigned long long/g;
2622 $result =~ s/\blong unsigned\b/unsigned long/g;
2623 return $result;
2624}
2625
2626# From libtodb2/libtodb.pm
2627# Trim string spaces.
2628sub trim($)
2629{
2630 my $string = shift;
2631 $string =~ s/^\s+//;
2632 $string =~ s/\s+$//;
2633 return $string;
2634}
2635
2636sub correctName($)
2637{#type name correction
2638 my $CorrectName = $_[0];
2639 $CorrectName = unmangled_Compact($CorrectName, 1);
2640 $CorrectName = unmangled_PostProcess($CorrectName);
2641 return $CorrectName;
2642}
2643
2644sub getDump_AllInOne()
2645{
2646 return if(not keys(%Headers));
2647 `mkdir -p temp && rm -f temp/*`;
2648 my $Header_Depend = "";
2649 foreach my $Dep (sort {length($a) <=> length($b)} keys(%{$Header_Dependency{$Version}}))
2650 {
2651 $Header_Depend .= " -I".esc($Dep);
2652 }
2653 my $Lib_VersionName = esc($TargetLibraryName)."_v".$Version;
2654 open(LIB_HEADER, ">temp/$TargetLibraryName"."_v$Version.h");
2655 foreach my $Preamble_Header (sort {int($Include_Preamble{$Version}{$a}{"Position"})<=>int($Include_Preamble{$Version}{$b}{"Position"})} keys(%{$Include_Preamble{$Version}}))
2656 {
2657 print LIB_HEADER "#include <$Preamble_Header>\n";
2658 }
2659 foreach my $Destination (sort {int($Headers{$Version}{$a}{"Position"})<=>int($Headers{$Version}{$b}{"Position"})} keys(%{$Headers{$Version}}))
2660 {
2661 my $HName = get_FileName($Destination);
2662 next if($Include_Preamble{$Version}{$Destination} or ($Include_Preamble{$Version}{$HName} and $HeaderName_Destinations{$Version}{$HName} and keys(%{$HeaderName_Destinations{$Version}{$HName}})==1));
2663 print LIB_HEADER "#include <$Destination>\n";
2664 }
2665 close(LIB_HEADER);
2666 system("g++ >".esc($ERR_PATH{$Version})." 2>&1 -fdump-translation-unit temp/$Lib_VersionName.h $CompilerOptions{$Version} $Header_Depend");
2667 if($?)
2668 {
2669 print "WARNING: some errors have occured while compiling header(s), fix it first!\nyou can see compilation errors in the file \'$ERR_PATH{$Version}\'\n";
2670 }
2671 $ConstantsSrc{$Version} = cmd_preprocessor("temp/$Lib_VersionName.h", $CompilerOptions{$Version}." ".$Header_Depend, "define\\ \\|undef\\ \\|#[ ]\\+[0-9]\\+ \".*\"");
2672 system("mkdir", "-p", "header_compile_errors/$TargetLibraryName/temp/");
2673 system("cp", "-f", "temp/$TargetLibraryName"."_v$Version.h", "header_compile_errors/$TargetLibraryName/temp/");
2674 return (split("\n", `find . -maxdepth 1 -name "$Lib_VersionName\.h*\.tu"`))[0];
2675}
2676
2677sub getDump_Separately($)
2678{
2679 `mkdir -p temp`;
2680 `rm -f temp/*`;
2681 my $Destination = $_[0];
2682 my $Header_Depend = "";
2683 foreach my $Dep (sort {length($a) <=> length($b)} keys(%{$Header_Dependency{$Version}}))
2684 {
2685 $Header_Depend .= " -I".esc($Dep);
2686 }
2687 my $Lib_VersionName = esc($TargetLibraryName)."_v".$Version;
2688 open(LIB_HEADER, ">temp/$TargetLibraryName"."_v$Version.h");
2689 foreach my $Preamble_Header (sort {int($Include_Preamble{$Version}{$a}{"Position"})<=>int($Include_Preamble{$Version}{$b}{"Position"})} keys(%{$Include_Preamble{$Version}}))
2690 {
2691 print LIB_HEADER "#include <$Preamble_Header>\n";
2692 }
2693 my $Destination_HName = get_FileName($Destination);
2694 if(not ( $Include_Preamble{$Version}{$Destination} or ($Include_Preamble{$Version}{$Destination_HName} and $HeaderName_Destinations{$Version}{$Destination_HName} and keys(%{$HeaderName_Destinations{$Version}{$Destination_HName}})==1) ))
2695 {
2696 print LIB_HEADER "#include <$Destination>\n";
2697 }
2698 close(LIB_HEADER);
2699 system("g++ >>".esc($ERR_PATH{$Version})." 2>&1 -fdump-translation-unit temp/$Lib_VersionName.h $CompilerOptions{$Version} $Header_Depend");
2700 if($?)
2701 {
2702 $HeaderCompileError{get_FileName($Destination)} = 1;
2703 }
2704 $ConstantsSrc{$Version} .= cmd_preprocessor("temp/$Lib_VersionName.h", $CompilerOptions{$Version}." ".$Header_Depend, "define\\ \\|undef\\ \\|#[ ]\\+[0-9]\\+ \".*\"");
2705 return (split("\n", `find . -maxdepth 1 -name "$Lib_VersionName\.h*\.tu"`))[0];
2706}
2707
2708sub cmd_file($)
2709{
2710 my $Path = $_[0];
2711 return "" if(not $Path or not -e $Path);
2712 my $Cmd = "file ".esc($Path);
2713 my $Cmd_Out = `$Cmd`;
2714 return $Cmd_Out;
2715}
2716
2717sub cmd_preprocessor($$$)
2718{
2719 my ($Path, $AddOpt, $Grep) = @_;
2720 return "" if(not $Path or not -f $Path);
2721 my $Cmd = "g++ -dD -E -x c++-header ".esc($Path)." 2>/dev/null $AddOpt";
2722 if($Grep)
2723 {
2724 $Cmd .= " | grep \"$Grep\"";
2725 }
2726 my $Cmd_Out = `$Cmd`;
2727 return $Cmd_Out;
2728}
2729
2730sub cmd_cat($$)
2731{
2732 my ($Path, $Grep) = @_;
2733 return "" if(not $Path or not -e $Path);
2734 my $Cmd = "cat ".esc($Path);
2735 if($Grep)
2736 {
2737 $Cmd .= " | grep \"$Grep\"";
2738 }
2739 my $Cmd_Out = `$Cmd`;
2740 return $Cmd_Out;
2741}
2742
2743sub cmd_find($$$)
2744{
2745 my ($Path, $Type, $Name) = @_;
2746 return () if(not $Path or not -e $Path);
2747 my $Cmd = "find ".esc($Path);
2748 if($Type)
2749 {
2750 $Cmd .= " -type $Type";
2751 }
2752 if($Name)
2753 {
2754 $Cmd .= " -name \"$Name\"";
2755 }
2756 return split("\n", `$Cmd`);
2757}
2758
2759sub cmd_tar($)
2760{
2761 my $Path = $_[0];
2762 return "" if(not $Path or not -e $Path);
2763 my $Cmd = "tar -xvzf ".esc($Path);
2764 my $Cmd_Out = `$Cmd`;
2765 return $Cmd_Out;
2766}
2767
2768sub is_header($$)
2769{
2770 my ($Destination, $LibVersion) = @_;
2771 return 0 if(-d $Destination);
2772 return 1 if($Destination =~ /\.(h|hh|hhh|hpp|tcc)\Z/i);
2773 return 0 if($Destination =~ /\.\w+\Z/i);#cpp|c|gch|tu|fs|pas
2774 if($Destination =~ /\A\//)
2775 {
2776 return (cmd_file($Destination) =~ /:[ ]*ASCII C[\+]* program text/);
2777 }
2778 else
2779 {
2780 foreach my $Prefix (keys(%{$Header_Dependency{$LibVersion}}))
2781 {
2782 my $Path = $Prefix."/".$Destination;
2783 if(-f $Path)
2784 {
2785 if(cmd_file($Path) =~ /:[ ]*ASCII C[\+]* program text/)
2786 {
2787 return 1;
2788 }
2789 }
2790 }
2791 return 0;
2792 }
2793}
2794
2795sub parseHeaders_AllInOne($)
2796{
2797 $Version = $_[0];
2798 print "checking header(s) ".$Descriptor{$Version}{"Version"}." ...\n";
2799 system("mkdir", "-p", "header_compile_errors/".$TargetLibraryName);
2800 system("rm", "-fr", $ERR_PATH{$Version});
2801 my $DumpPath = getDump_AllInOne();
2802 if(not $DumpPath)
2803 {
2804 print "\nERROR: can't create gcc syntax tree for header(s)\nyou can see compilation errors in the file '$ERR_PATH{$Version}'\n";
2805 exit(1);
2806 }
2807 getInfo($DumpPath);
2808 parse_constants();
2809 system("rm", "-fr", "temp");
2810}
2811
2812sub parseHeader($)
2813{
2814 my $Destination = $_[0];
2815 my $DumpPath = getDump_Separately($Destination);
2816 if(not $DumpPath)
2817 {
2818 print "ERROR: can't create gcc syntax tree for header\nyou can see compilation errors in the file '$ERR_PATH{$Version}'\n";
2819 exit(1);
2820 }
2821 getInfo($DumpPath);
2822 parse_constants();
2823 system("rm", "-fr", "temp");
2824}
2825
2826sub is_in_library($$)
2827{
2828 my ($MnglName, $LibVersion) = @_;
2829 return ($Interface_Library{$LibVersion}{$MnglName} or ($SymVer{$LibVersion}{$MnglName} and $Interface_Library{$LibVersion}{$SymVer{$LibVersion}{$MnglName}}));
2830}
2831
2832sub prepareInterfaces($)
2833{
2834 my $LibVersion = $_[0];
2835 my (@MnglNames, @UnMnglNames) = ();
2836 if($CheckHeadersOnly)
2837 {
2838 foreach my $FuncInfoId (sort keys(%{$FuncDescr{$LibVersion}}))
2839 {
2840 if($FuncDescr{$LibVersion}{$FuncInfoId}{"MnglName"} =~ /\A_Z/)
2841 {
2842 push(@MnglNames, $FuncDescr{$LibVersion}{$FuncInfoId}{"MnglName"});
2843 }
2844 }
2845 if($#MnglNames > -1)
2846 {
2847 @UnMnglNames = reverse(unmangleArray(@MnglNames));
2848 foreach my $FuncInfoId (sort keys(%{$FuncDescr{$LibVersion}}))
2849 {
2850 if($FuncDescr{$LibVersion}{$FuncInfoId}{"MnglName"} =~ /\A_Z/)
2851 {
2852 my $UnmangledName = pop(@UnMnglNames);
2853 $tr_name{$FuncDescr{$LibVersion}{$FuncInfoId}{"MnglName"}} = $UnmangledName;
2854 }
2855 }
2856 }
2857 }
2858 my (%NotMangled_Int, %Mangled_Int) = ();
2859 foreach my $FuncInfoId (keys(%{$FuncDescr{$LibVersion}}))
2860 {
2861 my $MnglName = $FuncDescr{$LibVersion}{$FuncInfoId}{"MnglName"};
2862 if($MnglName=~/\A_Z/)
2863 {
2864 $Mangled_Int{$FuncInfoId} = $MnglName;
2865 }
2866 else
2867 {
2868 $NotMangled_Int{$FuncInfoId} = $MnglName;
2869 }
2870 next if(not $MnglName or not is_in_library($MnglName, $LibVersion) and not $CheckHeadersOnly);
2871 next if($MnglName =~ /\A_Z/ and $tr_name{$MnglName} =~ /\.\_[0-9]/);
2872 next if(not $FuncDescr{$LibVersion}{$FuncInfoId}{"Header"});
2873 %{$CompleteSignature{$LibVersion}{$MnglName}} = %{$FuncDescr{$LibVersion}{$FuncInfoId}};
2874 #interface and its symlink have same signatures
2875 if($SymVer{$LibVersion}{$MnglName})
2876 {
2877 %{$CompleteSignature{$LibVersion}{$SymVer{$LibVersion}{$MnglName}}} = %{$FuncDescr{$LibVersion}{$FuncInfoId}};
2878 }
2879 delete($FuncDescr{$LibVersion}{$FuncInfoId});
2880 }
2881 if(keys(%Mangled_Int))
2882 {
2883 foreach my $Interface_Id (keys(%NotMangled_Int))
2884 {
2885 delete($CompleteSignature{$LibVersion}{$NotMangled_Int{$Interface_Id}});
2886 }
2887 }
2888}
2889
2890my %UsedType;
2891sub cleanData($)
2892{
2893 my $LibVersion = $_[0];
2894 foreach my $FuncInfoId (keys(%{$FuncDescr{$LibVersion}}))
2895 {
2896 my $MnglName = $FuncDescr{$LibVersion}{$FuncInfoId}{"MnglName"};
2897 if(not $MnglName or not is_in_library($MnglName, $LibVersion) and not $CheckHeadersOnly)
2898 {
2899 delete($FuncDescr{$LibVersion}{$FuncInfoId});
2900 next;
2901 }
2902 if(defined $InterfacesListPath and not $InterfacesList{$MnglName})
2903 {
2904 delete($FuncDescr{$LibVersion}{$FuncInfoId});
2905 next;
2906 }
2907 if(defined $AppPath and not $InterfacesList_App{$MnglName})
2908 {
2909 delete($FuncDescr{$LibVersion}{$FuncInfoId});
2910 next;
2911 }
2912 my %FuncInfo = %{$FuncDescr{$LibVersion}{$FuncInfoId}};
2913 detect_TypeUsing($Tid_TDid{$LibVersion}{$FuncInfo{"Return"}}, $FuncInfo{"Return"}, $LibVersion);
2914 detect_TypeUsing($Tid_TDid{$LibVersion}{$FuncInfo{"Class"}}, $FuncInfo{"Class"}, $LibVersion);
2915 foreach my $Param_Pos (keys(%{$FuncInfo{"Param"}}))
2916 {
2917 my $Param_TypeId = $FuncInfo{"Param"}{$Param_Pos}{"type"};
2918 detect_TypeUsing($Tid_TDid{$LibVersion}{$Param_TypeId}, $Param_TypeId, $LibVersion);
2919 }
2920 }
2921 foreach my $TDid (keys(%{$TypeDescr{$LibVersion}}))
2922 {
2923 foreach my $Tid (keys(%{$TypeDescr{$LibVersion}{$TDid}}))
2924 {
2925 if(not $UsedType{$LibVersion}{$TDid}{$Tid})
2926 {
2927 delete($TypeDescr{$LibVersion}{$TDid}{$Tid});
2928 if(not keys(%{$TypeDescr{$LibVersion}{$TDid}}))
2929 {
2930 delete($TypeDescr{$LibVersion}{$TDid});
2931 }
2932 delete($Tid_TDid{$LibVersion}{$Tid}) if($Tid_TDid{$LibVersion}{$Tid} eq $TDid);
2933 }
2934 }
2935 }
2936}
2937
2938sub detect_TypeUsing($$$)
2939{
2940 my ($TypeDeclId, $TypeId, $LibVersion) = @_;
2941 return if($UsedType{$LibVersion}{$TypeDeclId}{$TypeId});
2942 my %Type = get_Type($TypeDeclId, $TypeId, $LibVersion);
2943 if($Type{"Type"} =~ /Struct|Union|Class|FuncPtr|Enum/)
2944 {
2945 $UsedType{$LibVersion}{$TypeDeclId}{$TypeId} = 1;
2946 foreach my $Memb_Pos (keys(%{$Type{"Memb"}}))
2947 {
2948 my $Member_TypeId = $Type{"Memb"}{$Memb_Pos}{"type"};
2949 detect_TypeUsing($Tid_TDid{$LibVersion}{$Member_TypeId}, $Member_TypeId, $LibVersion);
2950 }
2951 if($Type{"Type"} eq "FuncPtr")
2952 {
2953 my $ReturnType = $Type{"Return"};
2954 detect_TypeUsing($Tid_TDid{$LibVersion}{$ReturnType}, $ReturnType, $LibVersion);
2955 }
2956 }
2957 elsif($Type{"Type"} =~ /Const|Pointer|Ref|Volatile|Restrict|Array|/)
2958 {
2959 $UsedType{$LibVersion}{$TypeDeclId}{$TypeId} = 1;
2960 detect_TypeUsing($Type{"BaseType"}{"TDid"}, $Type{"BaseType"}{"Tid"}, $LibVersion);
2961 }
2962 elsif($Type{"Type"} eq "Intrinsic")
2963 {
2964 $UsedType{$LibVersion}{$TypeDeclId}{$TypeId} = 1;
2965 }
2966 else
2967 {
2968 delete($TypeDescr{$LibVersion}{$TypeDeclId}{$TypeId});
2969 if(not keys(%{$TypeDescr{$LibVersion}{$TypeDeclId}}))
2970 {
2971 delete($TypeDescr{$LibVersion}{$TypeDeclId});
2972 }
2973 delete($Tid_TDid{$LibVersion}{$TypeId}) if($Tid_TDid{$LibVersion}{$TypeId} eq $TypeDeclId);
2974 }
2975}
2976
2977sub initializeClassVirtFunc($)
2978{
2979 my $LibVersion = $_[0];
2980 foreach my $Interface (keys(%{$CompleteSignature{$LibVersion}}))
2981 {
2982 if($CompleteSignature{$LibVersion}{$Interface}{"Virt"})
2983 {
2984 my $ClassName = $TypeDescr{$LibVersion}{$Tid_TDid{$LibVersion}{$CompleteSignature{$LibVersion}{$Interface}{"Class"}}}{$CompleteSignature{$LibVersion}{$Interface}{"Class"}}{"Name"};
2985 $ClassVirtFunc{$LibVersion}{$ClassName}{$Interface} = 1;
2986 $ClassIdVirtFunc{$LibVersion}{$CompleteSignature{$LibVersion}{$Interface}{"Class"}}{$Interface} = 1;
2987 $ClassId{$LibVersion}{$ClassName} = $CompleteSignature{$LibVersion}{$Interface}{"Class"};
2988 }
2989 }
2990}
2991
2992sub checkVirtFuncRedefinitions($)
2993{
2994 my $LibVersion = $_[0];
2995 foreach my $Class_Name (keys(%{$ClassVirtFunc{$LibVersion}}))
2996 {
2997 $CheckedTypes{$Class_Name} = 1;
2998 foreach my $VirtFuncName (keys(%{$ClassVirtFunc{$LibVersion}{$Class_Name}}))
2999 {
3000 $CompleteSignature{$LibVersion}{$VirtFuncName}{"VirtualRedefine"} = find_virtual_method_in_base_classes($VirtFuncName, $ClassId{$LibVersion}{$Class_Name}, $LibVersion);
3001 }
3002 }
3003}
3004
3005sub setVirtFuncPositions($)
3006{
3007 my $LibVersion = $_[0];
3008 foreach my $Class_Name (keys(%{$ClassVirtFunc{$LibVersion}}))
3009 {
3010 $CheckedTypes{$Class_Name} = 1;
3011 my $Position = 0;
3012 foreach my $VirtFuncName (sort {int($CompleteSignature{$LibVersion}{$a}{"Line"}) <=> int($CompleteSignature{$LibVersion}{$b}{"Line"})} keys(%{$ClassVirtFunc{$LibVersion}{$Class_Name}}))
3013 {
3014 if($ClassVirtFunc{1}{$Class_Name}{$VirtFuncName} and $ClassVirtFunc{2}{$Class_Name}{$VirtFuncName} and not $CompleteSignature{1}{$VirtFuncName}{"VirtualRedefine"} and not $CompleteSignature{2}{$VirtFuncName}{"VirtualRedefine"})
3015 {
3016 $CompleteSignature{$LibVersion}{$VirtFuncName}{"Position"} = $Position;
3017 $Position += 1;
3018 }
3019 }
3020 }
3021}
3022
3023sub check_VirtualTable($$)
3024{
3025 my ($TargetFunction, $LibVersion) = @_;
3026 my $Class_Id = $CompleteSignature{$LibVersion}{$TargetFunction}{"Class"};
3027 my $Class_DId = $Tid_TDid{$LibVersion}{$Class_Id};
3028 my %Class_Type = get_Type($Class_DId, $Class_Id, $LibVersion);
3029 $CheckedTypes{$Class_Type{"Name"}} = 1;
3030 foreach my $VirtFuncName (keys(%{$ClassVirtFunc{2}{$Class_Type{"Name"}}}))
3031 {#Added
3032 if($ClassId{1}{$Class_Type{"Name"}} and not $ClassVirtFunc{1}{$Class_Type{"Name"}}{$VirtFuncName} and $AddedInt{$VirtFuncName})
3033 {
3034 if($CompleteSignature{2}{$VirtFuncName}{"VirtualRedefine"})
3035 {
3036 if($TargetFunction eq $VirtFuncName)
3037 {
3038 my $BaseClass_Id = $CompleteSignature{2}{$CompleteSignature{2}{$VirtFuncName}{"VirtualRedefine"}}{"Class"};
3039 my %BaseClass_Type = get_Type($Tid_TDid{2}{$BaseClass_Id}, $BaseClass_Id, 2);
3040 my $BaseClass_Name = $BaseClass_Type{"Name"};
3041 %{$CompatProblems{$TargetFunction}{"Virtual_Function_Redefinition"}{$tr_name{$CompleteSignature{2}{$VirtFuncName}{"VirtualRedefine"}}}}=(
3042 "Type_Name"=>$Class_Type{"Name"},
3043 "Type_Type"=>$Class_Type{"Type"},
3044 "Header"=>$CompleteSignature{2}{$TargetFunction}{"Header"},
3045 "Line"=>$CompleteSignature{2}{$TargetFunction}{"Line"},
3046 "Target"=>$tr_name{$CompleteSignature{2}{$VirtFuncName}{"VirtualRedefine"}},
3047 "Signature"=>$tr_name{$TargetFunction},
3048 "Old_Value"=>$tr_name{$CompleteSignature{2}{$VirtFuncName}{"VirtualRedefine"}},
3049 "New_Value"=>$tr_name{$TargetFunction},
3050 "Old_SoName"=>$Interface_Library{1}{$TargetFunction},
3051 "New_SoName"=>$Interface_Library{2}{$TargetFunction} );
3052 }
3053 }
3054 elsif($TargetFunction ne $VirtFuncName)
3055 {
3056 %{$CompatProblems{$TargetFunction}{"Added_Virtual_Function"}{$tr_name{$VirtFuncName}}}=(
3057 "Type_Name"=>$Class_Type{"Name"},
3058 "Type_Type"=>$Class_Type{"Type"},
3059 "Header"=>$Class_Type{"Header"},
3060 "Line"=>$Class_Type{"Line"},
3061 "Target"=>$tr_name{$VirtFuncName},
3062 "Signature"=>$tr_name{$TargetFunction},
3063 "Old_SoName"=>$Interface_Library{1}{$TargetFunction},
3064 "New_SoName"=>$Interface_Library{2}{$TargetFunction} );
3065 }
3066 }
3067 }
3068 foreach my $VirtFuncName (keys(%{$ClassVirtFunc{1}{$Class_Type{"Name"}}}))
3069 {#Withdrawn
3070 if($ClassId{2}{$Class_Type{"Name"}} and not $ClassVirtFunc{2}{$Class_Type{"Name"}}{$VirtFuncName} and $WithdrawnInt{$VirtFuncName})
3071 {
3072 if($CompleteSignature{1}{$VirtFuncName}{"VirtualRedefine"})
3073 {
3074 if($TargetFunction eq $VirtFuncName)
3075 {
3076 my $BaseClass_Id = $CompleteSignature{1}{$CompleteSignature{1}{$VirtFuncName}{"VirtualRedefine"}}{"Class"};
3077 my $BaseClass_Name = $TypeDescr{1}{$Tid_TDid{1}{$BaseClass_Id}}{$BaseClass_Id}{"Name"};
3078 %{$CompatProblems{$TargetFunction}{"Virtual_Function_Redefinition_B"}{$tr_name{$CompleteSignature{1}{$VirtFuncName}{"VirtualRedefine"}}}}=(
3079 "Type_Name"=>$Class_Type{"Name"},
3080 "Type_Type"=>$Class_Type{"Type"},
3081 "Header"=>$CompleteSignature{2}{$TargetFunction}{"Header"},
3082 "Line"=>$CompleteSignature{2}{$TargetFunction}{"Line"},
3083 "Target"=>$tr_name{$CompleteSignature{1}{$VirtFuncName}{"VirtualRedefine"}},
3084 "Signature"=>$tr_name{$TargetFunction},
3085 "Old_Value"=>$tr_name{$TargetFunction},
3086 "New_Value"=>$tr_name{$CompleteSignature{1}{$VirtFuncName}{"VirtualRedefine"}},
3087 "Old_SoName"=>$Interface_Library{1}{$TargetFunction},
3088 "New_SoName"=>$Interface_Library{2}{$TargetFunction} );
3089 }
3090 }
3091 else
3092 {
3093 %{$CompatProblems{$TargetFunction}{"Withdrawn_Virtual_Function"}{$tr_name{$VirtFuncName}}}=(
3094 "Type_Name"=>$Class_Type{"Name"},
3095 "Type_Type"=>$Class_Type{"Type"},
3096 "Header"=>$Class_Type{"Header"},
3097 "Line"=>$Class_Type{"Line"},
3098 "Target"=>$tr_name{$VirtFuncName},
3099 "Signature"=>$tr_name{$TargetFunction},
3100 "Old_SoName"=>$Interface_Library{1}{$TargetFunction},
3101 "New_SoName"=>$Interface_Library{2}{$TargetFunction} );
3102 }
3103 }
3104 }
3105}
3106
3107sub find_virtual_method_in_base_classes($$$)
3108{
3109 my ($VirtFuncName, $Checked_ClassId, $LibVersion) = @_;
3110 foreach my $BaseClass_Id (keys(%{$TypeDescr{$LibVersion}{$Tid_TDid{$LibVersion}{$Checked_ClassId}}{$Checked_ClassId}{"BaseClass"}}))
3111 {
3112 my $VirtMethodInClass = find_virtual_method_in_class($VirtFuncName, $BaseClass_Id, $LibVersion);
3113 if($VirtMethodInClass)
3114 {
3115 return $VirtMethodInClass;
3116 }
3117 my $VirtMethodInBaseClasses = find_virtual_method_in_base_classes($VirtFuncName, $BaseClass_Id, $LibVersion);
3118 if($VirtMethodInBaseClasses)
3119 {
3120 return $VirtMethodInBaseClasses;
3121 }
3122 }
3123 return "";
3124}
3125
3126sub find_virtual_method_in_class($$$)
3127{
3128 my ($VirtFuncName, $Checked_ClassId, $LibVersion) = @_;
3129 my $Suffix = getFuncSuffix($VirtFuncName, $LibVersion);
3130 foreach my $Checked_VirtFuncName (keys(%{$ClassIdVirtFunc{$LibVersion}{$Checked_ClassId}}))
3131 {
3132 if($Suffix eq getFuncSuffix($Checked_VirtFuncName, $LibVersion)
3133 and ((not $CompleteSignature{$LibVersion}{$VirtFuncName}{"Constructor"} and not $CompleteSignature{$LibVersion}{$VirtFuncName}{"Destructor"} and $CompleteSignature{$LibVersion}{$VirtFuncName}{"ShortName"} eq $CompleteSignature{$LibVersion}{$Checked_VirtFuncName}{"ShortName"}) or ($CompleteSignature{$LibVersion}{$VirtFuncName}{"Constructor"} or $CompleteSignature{$LibVersion}{$VirtFuncName}{"Destructor"})))
3134 {
3135 return $Checked_VirtFuncName;
3136 }
3137 }
3138 return "";
3139}
3140
3141sub getFuncSuffix($$)
3142{
3143 my ($FuncName, $LibVersion) = @_;
3144 my $ClassId = $CompleteSignature{$LibVersion}{$FuncName}{"Class"};
3145 my $ClassName = $TypeDescr{$LibVersion}{$Tid_TDid{$LibVersion}{$ClassId}}{$ClassId}{"Name"};
3146 my $ShortName = $CompleteSignature{$LibVersion}{$FuncName}{"ShortName"};
3147 my $Suffix = $tr_name{$FuncName};
3148 $Suffix =~ s/\A$ClassName\:\:[~]*$ShortName[ ]*//g;
3149 return $Suffix;
3150}
3151
3152sub isRecurType($$$$)
3153{
3154 foreach (@RecurTypes)
3155 {
3156 if($_->{"Tid1"} eq $_[0]
3157 and $_->{"TDid1"} eq $_[1]
3158 and $_->{"Tid2"} eq $_[2]
3159 and $_->{"TDid2"} eq $_[3])
3160 {
3161 return 1;
3162 }
3163 }
3164 return 0;
3165}
3166
3167sub find_MemberPair_Pos_byName($$)
3168{
3169 my ($Member_Name, $Pair_Type) = @_;
3170 foreach my $MemberPair_Pos (sort keys(%{$Pair_Type->{"Memb"}}))
3171 {
3172 if($Pair_Type->{"Memb"}{$MemberPair_Pos}{"name"} eq $Member_Name)
3173 {
3174 return $MemberPair_Pos;
3175 }
3176 }
3177 return "lost";
3178}
3179
3180sub getBitfieldSum($$)
3181{
3182 my ($Member_Pos, $Pair_Type) = @_;
3183 my $BitfieldSum = 0;
3184 while($Member_Pos>-1)
3185 {
3186 return $BitfieldSum if(not $Pair_Type->{"Memb"}{$Member_Pos}{"bitfield"});
3187 $BitfieldSum += $Pair_Type->{"Memb"}{$Member_Pos}{"bitfield"};
3188 $Member_Pos -= 1;
3189 }
3190 return $BitfieldSum;
3191}
3192
3193sub find_MemberPair_Pos_byVal($$)
3194{
3195 my ($Member_Value, $Pair_Type) = @_;
3196 foreach my $MemberPair_Pos (sort keys(%{$Pair_Type->{"Memb"}}))
3197 {
3198 if($Pair_Type->{"Memb"}{$MemberPair_Pos}{"value"} eq $Member_Value)
3199 {
3200 return $MemberPair_Pos;
3201 }
3202 }
3203 return "lost";
3204}
3205
3206my %Priority_Value=(
3207"High"=>3,
3208"Medium"=>2,
3209"Low"=>1
3210);
3211
3212sub max_priority($$)
3213{
3214 my ($Priority1, $Priority2) = @_;
3215 if(cmp_priority($Priority1, $Priority2))
3216 {
3217 return $Priority1;
3218 }
3219 else
3220 {
3221 return $Priority2;
3222 }
3223}
3224
3225sub cmp_priority($$)
3226{
3227 my ($Priority1, $Priority2) = @_;
3228 return ($Priority_Value{$Priority1}>$Priority_Value{$Priority2});
3229}
3230
3231sub set_Problems_Priority()
3232{
3233 foreach my $InterfaceName (sort keys(%CompatProblems))
3234 {
3235 foreach my $Kind (sort keys(%{$CompatProblems{$InterfaceName}}))
3236 {
3237 foreach my $Location (sort keys(%{$CompatProblems{$InterfaceName}{$Kind}}))
3238 {
3239 my $IsInTypeInternals = $CompatProblems{$InterfaceName}{$Kind}{$Location}{"IsInTypeInternals"};
3240 my $InitialType_Type = $CompatProblems{$InterfaceName}{$Kind}{$Location}{"InitialType_Type"};
3241 if($Kind eq "Function_Become_Static")
3242 {
3243 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3244 }
3245 elsif($Kind eq "Function_Become_NonStatic")
3246 {
3247 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3248 }
3249 elsif($Kind eq "Parameter_Type_And_Size")
3250 {
3251 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3252 }
3253 elsif($Kind eq "Parameter_Type")
3254 {
3255 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3256 }
3257 elsif($Kind eq "Withdrawn_Parameter")
3258 {
3259 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3260 }
3261 elsif($Kind eq "Added_Parameter")
3262 {
3263 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3264 }
3265 elsif($Kind eq "Parameter_BaseType_And_Size")
3266 {
3267 if($InitialType_Type eq "Pointer")
3268 {
3269 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3270 }
3271 else
3272 {
3273 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3274 }
3275 }
3276 elsif($Kind eq "Parameter_BaseType")
3277 {
3278 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3279 }
3280 elsif($Kind eq "Parameter_PointerLevel")
3281 {
3282 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3283 }
3284 elsif($Kind eq "Return_Type_And_Size")
3285 {
3286 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3287 }
3288 elsif($Kind eq "Return_Type")
3289 {
3290 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3291 }
3292 elsif($Kind eq "Return_BaseType_And_Size")
3293 {
3294 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3295 }
3296 elsif($Kind eq "Return_BaseType")
3297 {
3298 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3299 }
3300 elsif($Kind eq "Return_PointerLevel")
3301 {
3302 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3303 }
3304 if($Kind eq "Added_Virtual_Function")
3305 {
3306 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3307 }
3308 elsif($Kind eq "Withdrawn_Virtual_Function")
3309 {
3310 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3311 }
3312 elsif($Kind eq "Virtual_Function_Position")
3313 {
3314 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3315 }
3316 elsif($Kind eq "Virtual_Function_Redefinition")
3317 {
3318 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3319 }
3320 elsif($Kind eq "Virtual_Function_Redefinition_B")
3321 {
3322 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3323 }
3324 elsif($Kind eq "Size")
3325 {
3326 if(($InitialType_Type eq "Pointer") or ($InitialType_Type eq "Array"))
3327 {
3328 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3329 }
3330 else
3331 {
3332 if($IsInTypeInternals)
3333 {
3334 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3335 }
3336 else
3337 {
3338 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3339 }
3340 }
3341 }
3342 elsif($Kind eq "BaseType")
3343 {
3344 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3345 }
3346 elsif($Kind eq "Added_Member_And_Size")
3347 {
3348 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3349 }
3350 elsif($Kind eq "Added_Middle_Member_And_Size")
3351 {
3352 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3353 }
3354 elsif($Kind eq "Withdrawn_Member_And_Size")
3355 {
3356 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3357 }
3358 elsif($Kind eq "Withdrawn_Member")
3359 {
3360 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3361 }
3362 elsif($Kind eq "Withdrawn_Middle_Member_And_Size")
3363 {
3364 if($IsInTypeInternals)
3365 {
3366 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3367 }
3368 else
3369 {
3370 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3371 }
3372 }
3373 elsif($Kind eq "Withdrawn_Middle_Member")
3374 {
3375 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3376 }
3377 elsif($Kind eq "Member_Rename")
3378 {
3379 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3380 }
3381 elsif($Kind eq "Enum_Member_Value")
3382 {
3383 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3384 }
3385 elsif($Kind eq "Enum_Member_Name")
3386 {
3387 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3388 }
3389 elsif($Kind eq "Member_Type_And_Size")
3390 {
3391 if(($InitialType_Type eq "Pointer") or ($InitialType_Type eq "Array"))
3392 {
3393 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3394 }
3395 else
3396 {
3397 if($IsInTypeInternals)
3398 {
3399 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3400 }
3401 else
3402 {
3403 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3404 }
3405 }
3406 }
3407 elsif($Kind eq "Member_Type")
3408 {
3409 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3410 }
3411 elsif($Kind eq "Member_BaseType_And_Size")
3412 {
3413 if(($InitialType_Type eq "Pointer") or ($InitialType_Type eq "Array"))
3414 {
3415 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3416 }
3417 else
3418 {
3419 if($IsInTypeInternals)
3420 {
3421 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3422 }
3423 else
3424 {
3425 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "High";
3426 }
3427 }
3428 }
3429 elsif($Kind eq "Member_BaseType")
3430 {
3431 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3432 }
3433 elsif($Kind eq "Member_PointerLevel")
3434 {
3435 if(($InitialType_Type eq "Pointer") or ($InitialType_Type eq "Array"))
3436 {
3437 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3438 }
3439 else
3440 {
3441 if($IsInTypeInternals)
3442 {
3443 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Low";
3444 }
3445 else
3446 {
3447 $CompatProblems{$InterfaceName}{$Kind}{$Location}{"Priority"} = "Medium";
3448 }
3449 }
3450 }
3451 }
3452 }
3453 }
3454}
3455
3456sub pushType($$$$)
3457{
3458 my %TypeDescriptor=(
3459 "Tid1" => $_[0],
3460 "TDid1" => $_[1],
3461 "Tid2" => $_[2],
3462 "TDid2" => $_[3] );
3463 push(@RecurTypes, \%TypeDescriptor);
3464}
3465
3466sub mergeTypes($$$$)
3467{
3468 my ($Type1_Id, $Type1_DId, $Type2_Id, $Type2_DId) = @_;
3469 my (%Sub_SubProblems, %SubProblems) = ();
3470 if((not $Type1_Id and not $Type1_DId) or (not $Type2_Id and not $Type2_DId))
3471 {#Not Empty Inputs Only
3472 return ();
3473 }
3474 if($Cache{"mergeTypes"}{$Type1_Id}{$Type1_DId}{$Type2_Id}{$Type2_DId})
3475 {#Already Merged
3476 return %{$Cache{"mergeTypes"}{$Type1_Id}{$Type1_DId}{$Type2_Id}{$Type2_DId}};
3477 }
3478 my %Type1 = get_Type($Type1_DId, $Type1_Id, 1);
3479 my %Type2 = get_Type($Type2_DId, $Type2_Id, 2);
3480 my %Type1_Pure = get_PureType($Type1_DId, $Type1_Id, 1);
3481 my %Type2_Pure = get_PureType($Type2_DId, $Type2_Id, 2);
3482 return () if(not $Type1_Pure{"Size"} or not $Type2_Pure{"Size"});
3483 if(isRecurType($Type1_Pure{"Tid"}, $Type1_Pure{"TDid"}, $Type2_Pure{"Tid"}, $Type2_Pure{"TDid"}))
3484 {#Recursive Declarations
3485 return ();
3486 }
3487 return if(not $Type1_Pure{"Name"} or not $Type2_Pure{"Name"});
3488 return if($OpaqueTypes{1}{$Type1_Pure{"Name"}} or $OpaqueTypes{2}{$Type1_Pure{"Name"}} or $OpaqueTypes{1}{$Type1{"Name"}} or $OpaqueTypes{2}{$Type1{"Name"}});
3489
3490 my %Typedef_1 = goToFirst($Type1{"TDid"}, $Type1{"Tid"}, 1, "Typedef");
3491 my %Typedef_2 = goToFirst($Type2{"TDid"}, $Type2{"Tid"}, 2, "Typedef");
3492 if($Typedef_1{"Type"} eq "Typedef" and $Typedef_2{"Type"} eq "Typedef" and $Typedef_1{"Name"} eq $Typedef_2{"Name"})
3493 {
3494 my %Base_1 = get_OneStep_BaseType($Typedef_1{"TDid"}, $Typedef_1{"Tid"}, 1);
3495 my %Base_2 = get_OneStep_BaseType($Typedef_2{"TDid"}, $Typedef_2{"Tid"}, 2);
3496 if($Base_1{"Name"}!~/anon\-/ and $Base_2{"Name"}!~/anon\-/
3497 and ($Base_1{"Name"} ne $Base_2{"Name"}))
3498 {
3499 %{$SubProblems{"BaseType"}{$Typedef_1{"Name"}}}=(
3500 "Type_Name"=>$Typedef_1{"Name"},
3501 "Type_Type"=>"Typedef",
3502 "Header"=>$Typedef_2{"Header"},
3503 "Line"=>$Typedef_2{"Line"},
3504 "Old_Value"=>$Base_1{"Name"},
3505 "New_Value"=>$Base_2{"Name"} );
3506 }
3507 }
3508
3509 if(($Type1_Pure{"Name"} ne $Type2_Pure{"Name"}) and ($Type1_Pure{"Type"} ne "Pointer") and $Type1_Pure{"Name"}!~/anon\-/)
3510 {#Different types
3511 return ();
3512 }
3513
3514 pushType($Type1_Pure{"Tid"}, $Type1_Pure{"TDid"}, $Type2_Pure{"Tid"}, $Type2_Pure{"TDid"});
3515 if(($Type1_Pure{"Name"} eq $Type2_Pure{"Name"}) and ($Type1_Pure{"Type"} =~ /Struct|Class|Union/))
3516 {#Check Size
3517 if($Type1_Pure{"Size"} ne $Type2_Pure{"Size"})
3518 {
3519 %{$SubProblems{"Size"}{$Type1_Pure{"Name"}}}=(
3520 "Type_Name"=>$Type1_Pure{"Name"},
3521 "Type_Type"=>$Type1_Pure{"Type"},
3522 "Header"=>$Type2_Pure{"Header"},
3523 "Line"=>$Type2_Pure{"Line"},
3524 "Old_Value"=>$Type1_Pure{"Size"},
3525 "New_Value"=>$Type2_Pure{"Size"} );
3526 }
3527 }
3528 if($Type1_Pure{"Name"} and $Type2_Pure{"Name"} and ($Type1_Pure{"Name"} ne $Type2_Pure{"Name"}) and ($Type1_Pure{"Name"} !~ /\Avoid[ ]*\*/) and ($Type2_Pure{"Name"} =~ /\Avoid[ ]*\*/))
3529 {#Check "void *"
3530 pop(@RecurTypes);
3531 return ();
3532 }
3533 if($Type1_Pure{"BaseType"}{"Tid"} and $Type2_Pure{"BaseType"}{"Tid"})
3534 {#Check Base Types
3535 %Sub_SubProblems = &mergeTypes($Type1_Pure{"BaseType"}{"Tid"}, $Type1_Pure{"BaseType"}{"TDid"}, $Type2_Pure{"BaseType"}{"Tid"}, $Type2_Pure{"BaseType"}{"TDid"});
3536 foreach my $Sub_SubProblemType (keys(%Sub_SubProblems))
3537 {
3538 foreach my $Sub_SubLocation (keys(%{$Sub_SubProblems{$Sub_SubProblemType}}))
3539 {
3540 %{$SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}} = %{$Sub_SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}};
3541 $SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}{"InitialType_Type"} = $Type1_Pure{"Type"};
3542 }
3543 }
3544 }
3545 foreach my $Member_Pos (sort keys(%{$Type1_Pure{"Memb"}}))
3546 {#Check Members
3547 next if($Type1_Pure{"Memb"}{$Member_Pos}{"access"} eq "private");
3548 my $Member_Name = $Type1_Pure{"Memb"}{$Member_Pos}{"name"};
3549 next if(not $Member_Name);
3550 my $Member_Location = $Member_Name;
3551 my $MemberPair_Pos = find_MemberPair_Pos_byName($Member_Name, \%Type2_Pure);
3552 if(($MemberPair_Pos eq "lost") and (($Type2_Pure{"Type"} eq "Struct") or ($Type2_Pure{"Type"} eq "Class")))
3553 {#Withdrawn_Member
3554 if($Member_Pos > keys(%{$Type2_Pure{"Memb"}}) - 1)
3555 {
3556 if($Type1_Pure{"Size"} ne $Type2_Pure{"Size"})
3557 {
3558 %{$SubProblems{"Withdrawn_Member_And_Size"}{$Member_Name}}=(
3559 "Target"=>$Member_Name,
3560 "Type_Name"=>$Type1_Pure{"Name"},
3561 "Type_Type"=>$Type1_Pure{"Type"},
3562 "Header"=>$Type2_Pure{"Header"},
3563 "Line"=>$Type2_Pure{"Line"},
3564 "Old_Size"=>$Type1_Pure{"Size"},
3565 "New_Size"=>$Type2_Pure{"Size"} );
3566 }
3567 else
3568 {
3569 %{$SubProblems{"Withdrawn_Member"}{$Member_Name}}=(
3570 "Target"=>$Member_Name,
3571 "Type_Name"=>$Type1_Pure{"Name"},
3572 "Type_Type"=>$Type1_Pure{"Type"},
3573 "Header"=>$Type2_Pure{"Header"},
3574 "Line"=>$Type2_Pure{"Line"} );
3575 }
3576 next;
3577 }
3578 elsif($Member_Pos < keys(%{$Type1_Pure{"Memb"}}) - 1)
3579 {
3580 my $MemberType_Id = $Type1_Pure{"Memb"}{$Member_Pos}{"type"};
3581 my %MemberType_Pure = get_PureType($Tid_TDid{1}{$MemberType_Id}, $MemberType_Id, 1);
3582 my $MemberStraightPairType_Id = $Type2_Pure{"Memb"}{$Member_Pos}{"type"};
3583 my %MemberStraightPairType_Pure = get_PureType($Tid_TDid{2}{$MemberStraightPairType_Id}, $MemberStraightPairType_Id, 2);
3584
3585 if(($MemberType_Pure{"Size"} eq $MemberStraightPairType_Pure{"Size"}) and find_MemberPair_Pos_byName($Type2_Pure{"Memb"}{$Member_Pos}{"name"}, \%Type1_Pure) eq "lost")
3586 {
3587 %{$SubProblems{"Member_Rename"}{$Member_Name}}=(
3588 "Target"=>$Member_Name,
3589 "Type_Name"=>$Type1_Pure{"Name"},
3590 "Type_Type"=>$Type1_Pure{"Type"},
3591 "Header"=>$Type2_Pure{"Header"},
3592 "Line"=>$Type2_Pure{"Line"},
3593 "Old_Value"=>$Type1_Pure{"Memb"}{$Member_Pos}{"name"},
3594 "New_Value"=>$Type2_Pure{"Memb"}{$Member_Pos}{"name"} );
3595 $MemberPair_Pos = $Member_Pos;
3596 }
3597 else
3598 {
3599 if($Type1_Pure{"Memb"}{$Member_Pos}{"bitfield"})
3600 {
3601 my $BitfieldSum = getBitfieldSum($Member_Pos-1, \%Type1_Pure)%($POINTER_SIZE*8);
3602 if($BitfieldSum and $BitfieldSum-$Type2_Pure{"Memb"}{$Member_Pos}{"bitfield"}>=0)
3603 {
3604 %{$SubProblems{"Withdrawn_Middle_Member"}{$Member_Name}}=(
3605 "Target"=>$Member_Name,
3606 "Type_Name"=>$Type1_Pure{"Name"},
3607 "Type_Type"=>$Type1_Pure{"Type"},
3608 "Header"=>$Type2_Pure{"Header"},
3609 "Line"=>$Type2_Pure{"Line"} );
3610 next;
3611 }
3612 }
3613 %{$SubProblems{"Withdrawn_Middle_Member_And_Size"}{$Member_Name}}=(
3614 "Target"=>$Member_Name,
3615 "Type_Name"=>$Type1_Pure{"Name"},
3616 "Type_Type"=>$Type1_Pure{"Type"},
3617 "Header"=>$Type2_Pure{"Header"},
3618 "Line"=>$Type2_Pure{"Line"} );
3619 next;
3620 }
3621 }
3622 }
3623 if($Type1_Pure{"Type"} eq "Enum")
3624 {
3625 my $Member_Value1 = $Type1_Pure{"Memb"}{$Member_Pos}{"value"};
3626 next if(not $Member_Value1);
3627 my $Member_Value2 = $Type2_Pure{"Memb"}{$MemberPair_Pos}{"value"};
3628 if($MemberPair_Pos eq "lost")
3629 {
3630 $MemberPair_Pos = find_MemberPair_Pos_byVal($Member_Value1, \%Type2_Pure);
3631 if($MemberPair_Pos ne "lost")
3632 {
3633 %{$SubProblems{"Enum_Member_Name"}{$Type1_Pure{"Memb"}{$Member_Pos}{"value"}}}=(
3634 "Target"=>$Type1_Pure{"Memb"}{$Member_Pos}{"value"},
3635 "Type_Name"=>$Type1_Pure{"Name"},
3636 "Type_Type"=>"Enum",
3637 "Header"=>$Type2_Pure{"Header"},
3638 "Line"=>$Type2_Pure{"Line"},
3639 "Old_Value"=>$Type1_Pure{"Memb"}{$Member_Pos}{"name"},
3640 "New_Value"=>$Type2_Pure{"Memb"}{$MemberPair_Pos}{"name"} );
3641 }
3642 }
3643 else
3644 {
3645 if($Member_Value1 ne "" and $Member_Value2 ne "")
3646 {
3647 if($Member_Value1 ne $Member_Value2)
3648 {
3649 %{$SubProblems{"Enum_Member_Value"}{$Member_Name}}=(
3650 "Target"=>$Member_Name,
3651 "Type_Name"=>$Type1_Pure{"Name"},
3652 "Type_Type"=>"Enum",
3653 "Header"=>$Type2_Pure{"Header"},
3654 "Line"=>$Type2_Pure{"Line"},
3655 "Old_Value"=>$Type1_Pure{"Memb"}{$Member_Pos}{"value"},
3656 "New_Value"=>$Type2_Pure{"Memb"}{$MemberPair_Pos}{"value"} );
3657 }
3658 }
3659 }
3660 next;
3661 }
3662 my $MemberType1_Id = $Type1_Pure{"Memb"}{$Member_Pos}{"type"};
3663 my $MemberType2_Id = $Type2_Pure{"Memb"}{$MemberPair_Pos}{"type"};
3664 %Sub_SubProblems = detectTypeChange($MemberType1_Id, $MemberType2_Id, "Member");
3665 foreach my $Sub_SubProblemType (keys(%Sub_SubProblems))
3666 {
3667 %{$SubProblems{$Sub_SubProblemType}{$Member_Name}}=(
3668 "Target"=>$Member_Name,
3669 "Member_Position"=>$Member_Pos,
3670 "Type_Name"=>$Type1_Pure{"Name"},
3671 "Type_Type"=>$Type1_Pure{"Type"},
3672 "Header"=>$Type2_Pure{"Header"},
3673 "Line"=>$Type2_Pure{"Line"});
3674 @{$SubProblems{$Sub_SubProblemType}{$Member_Name}}{keys(%{$Sub_SubProblems{$Sub_SubProblemType}})} = values %{$Sub_SubProblems{$Sub_SubProblemType}};
3675 }
3676 if($MemberType1_Id and $MemberType2_Id)
3677 {#checking member type change (replace)
3678 %Sub_SubProblems = &mergeTypes($MemberType1_Id, $Tid_TDid{1}{$MemberType1_Id}, $MemberType2_Id, $Tid_TDid{2}{$MemberType2_Id});
3679 foreach my $Sub_SubProblemType (keys(%Sub_SubProblems))
3680 {
3681 foreach my $Sub_SubLocation (keys(%{$Sub_SubProblems{$Sub_SubProblemType}}))
3682 {
3683 my $NewLocation = ($Sub_SubLocation)?$Member_Location."->".$Sub_SubLocation:$Member_Location;
3684 %{$SubProblems{$Sub_SubProblemType}{$NewLocation}}=(
3685 "IsInTypeInternals"=>"Yes");
3686 @{$SubProblems{$Sub_SubProblemType}{$NewLocation}}{keys(%{$Sub_SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}})} = values %{$Sub_SubProblems{$Sub_SubProblemType}{$Sub_SubLocation}};
3687 if($Sub_SubLocation !~ /\-\>/)
3688 {
3689 $SubProblems{$Sub_SubProblemType}{$NewLocation}{"Member_Type_Name"} = get_TypeName($MemberType1_Id, 1);
3690 $SubProblems{$Sub_SubProblemType}{$NewLocation}{"Start_Type_Name"} = get_TypeName($MemberType1_Id, 1);
3691 }
3692 }
3693 }
3694 }
3695 }
3696 if(($Type2_Pure{"Type"} eq "Struct") or ($Type2_Pure{"Type"} eq "Class"))
3697 {
3698 foreach my $Member_Pos (sort keys(%{$Type2_Pure{"Memb"}}))
3699 {#checking added members
3700 next if(not $Type2_Pure{"Memb"}{$Member_Pos}{"name"});
3701 my $MemberPair_Pos = find_MemberPair_Pos_byName($Type2_Pure{"Memb"}{$Member_Pos}{"name"}, \%Type1_Pure);
3702 if($MemberPair_Pos eq "lost")
3703 {#Added_Member
3704 if($Member_Pos > keys(%{$Type1_Pure{"Memb"}}) - 1)
3705 {
3706 if($Type1_Pure{"Size"} ne $Type2_Pure{"Size"})
3707 {
3708 if($Type2_Pure{"Memb"}{$Member_Pos}{"bitfield"})
3709 {
3710 my $BitfieldSum = getBitfieldSum($Member_Pos-1, \%Type2_Pure)%($POINTER_SIZE*8);
3711 next if($BitfieldSum and $BitfieldSum<=$POINTER_SIZE*8-$Type2_Pure{"Memb"}{$Member_Pos}{"bitfield"});
3712 }
3713 %{$SubProblems{"Added_Member_And_Size"}{$Type2_Pure{"Memb"}{$Member_Pos}{"name"}}}=(
3714 "Target"=>$Type2_Pure{"Memb"}{$Member_Pos}{"name"},
3715 "Type_Name"=>$Type1_Pure{"Name"},
3716 "Type_Type"=>$Type1_Pure{"Type"},
3717 "Header"=>$Type2_Pure{"Header"},
3718 "Line"=>$Type2_Pure{"Line"} );
3719 }
3720 }
3721 else
3722 {
3723 my $MemberType_Id = $Type2_Pure{"Memb"}{$Member_Pos}{"type"};
3724 my $MemberType_DId = $Tid_TDid{2}{$MemberType_Id};
3725 my %MemberType_Pure = get_PureType($MemberType_DId, $MemberType_Id, 2);
3726
3727 my $MemberStraightPairType_Id = $Type1_Pure{"Memb"}{$Member_Pos}{"type"};
3728 my %MemberStraightPairType_Pure = get_PureType($Tid_TDid{1}{$MemberStraightPairType_Id}, $MemberStraightPairType_Id, 1);
3729
3730 if(($MemberType_Pure{"Size"} eq $MemberStraightPairType_Pure{"Size"}) and find_MemberPair_Pos_byName($Type1_Pure{"Memb"}{$Member_Pos}{"name"}, \%Type2_Pure) eq "lost")
3731 {
3732 next if($Type1_Pure{"Memb"}{$Member_Pos}{"access"} eq "private");
3733 %{$SubProblems{"Member_Rename"}{$Type2_Pure{"Memb"}{$Member_Pos}{"name"}}}=(
3734 "Target"=>$Type1_Pure{"Memb"}{$Member_Pos}{"name"},
3735 "Type_Name"=>$Type1_Pure{"Name"},
3736 "Type_Type"=>$Type1_Pure{"Type"},
3737 "Header"=>$Type2_Pure{"Header"},
3738 "Line"=>$Type2_Pure{"Line"},
3739 "Old_Value"=>$Type1_Pure{"Memb"}{$Member_Pos}{"name"},
3740 "New_Value"=>$Type2_Pure{"Memb"}{$Member_Pos}{"name"} );
3741 }
3742 else
3743 {
3744 if($Type1_Pure{"Size"} ne $Type2_Pure{"Size"})
3745 {
3746 if($Type2_Pure{"Memb"}{$Member_Pos}{"bitfield"})
3747 {
3748 my $BitfieldSum = getBitfieldSum($Member_Pos-1, \%Type2_Pure)%($POINTER_SIZE*8);
3749 next if($BitfieldSum and $BitfieldSum<=$POINTER_SIZE*8-$Type2_Pure{"Memb"}{$Member_Pos}{"bitfield"});
3750 }
3751 %{$SubProblems{"Added_Middle_Member_And_Size"}{$Type2_Pure{"Memb"}{$Member_Pos}{"name"}}}=(
3752 "Target"=>$Type2_Pure{"Memb"}{$Member_Pos}{"name"},
3753 "Type_Name"=>$Type1_Pure{"Name"},
3754 "Type_Type"=>$Type1_Pure{"Type"},
3755 "Header"=>$Type2_Pure{"Header"},
3756 "Line"=>$Type2_Pure{"Line"} );
3757 }
3758 }
3759 }
3760 }
3761 }
3762 }
3763 %{$Cache{"mergeTypes"}{$Type1_Id}{$Type1_DId}{$Type2_Id}{$Type2_DId}} = %SubProblems;
3764 pop(@RecurTypes);
3765 return %SubProblems;
3766}
3767
3768sub get_TypeName($$)
3769{
3770 my ($TypeId, $LibVersion) = @_;
3771 return $TypeDescr{$LibVersion}{$Tid_TDid{$LibVersion}{$TypeId}}{$TypeId}{"Name"};
3772}
3773
3774sub goToFirst($$$$)
3775{
3776 my ($TypeDId, $TypeId, $LibVersion, $Type_Type) = @_;
3777 if(defined $Cache{"goToFirst"}{$TypeDId}{$TypeId}{$LibVersion}{$Type_Type})
3778 {
3779 return %{$Cache{"goToFirst"}{$TypeDId}{$TypeId}{$LibVersion}{$Type_Type}};
3780 }
3781 return () if(not $TypeDescr{$LibVersion}{$TypeDId}{$TypeId});
3782 my %Type = %{$TypeDescr{$LibVersion}{$TypeDId}{$TypeId}};
3783 return () if(not $Type{"Type"});
3784 if($Type{"Type"} ne $Type_Type)
3785 {
3786 return () if(not $Type{"BaseType"}{"TDid"} and not $Type{"BaseType"}{"Tid"});
3787 %Type = goToFirst($Type{"BaseType"}{"TDid"}, $Type{"BaseType"}{"Tid"}, $LibVersion, $Type_Type);
3788 }
3789 $Cache{"goToFirst"}{$TypeDId}{$TypeId}{$LibVersion}{$Type_Type} = \%Type;
3790 return %Type;
3791}
3792
3793my %TypeSpecAttributes = (
3794 "Ref" => 1,
3795 "Const" => 1,
3796 "Volatile" => 1,
3797 "Restrict" => 1,
3798 "Typedef" => 1
3799);
3800
3801sub get_PureType($$$)
3802{
3803 my ($TypeDId, $TypeId, $LibVersion) = @_;
3804 return "" if(not $TypeId);
3805 if(defined $Cache{"get_PureType"}{$TypeDId}{$TypeId}{$LibVersion})
3806 {
3807 return %{$Cache{"get_PureType"}{$TypeDId}{$TypeId}{$LibVersion}};
3808 }
3809 return "" if(not $TypeDescr{$LibVersion}{$TypeDId}{$TypeId});
3810 my %Type = %{$TypeDescr{$LibVersion}{$TypeDId}{$TypeId}};
3811 if($Type{"Type"} =~ /Struct|Union|Typedef|Class|Enum/)
3812 {
3813 $CheckedTypes{$Type{"Name"}} = 1;
3814 }
3815 return %Type if(not $Type{"BaseType"}{"TDid"} and not $Type{"BaseType"}{"Tid"});
3816 if($TypeSpecAttributes{$Type{"Type"}})
3817 {
3818 %Type = get_PureType($Type{"BaseType"}{"TDid"}, $Type{"BaseType"}{"Tid"}, $LibVersion);
3819 }
3820 $Cache{"get_PureType"}{$TypeDId}{$TypeId}{$LibVersion} = \%Type;
3821 return %Type;
3822}
3823
3824sub get_PointerLevel($$$)
3825{
3826 my ($TypeDId, $TypeId, $LibVersion) = @_;
3827 return "" if(not $TypeId);
3828 if(defined $Cache{"get_PointerLevel"}{$TypeDId}{$TypeId}{$LibVersion})
3829 {
3830 return $Cache{"get_PointerLevel"}{$TypeDId}{$TypeId}{$LibVersion};
3831 }
3832 return "" if(not $TypeDescr{$LibVersion}{$TypeDId}{$TypeId});
3833 my %Type = %{$TypeDescr{$LibVersion}{$TypeDId}{$TypeId}};
3834 return 0 if(not $Type{"BaseType"}{"TDid"} and not $Type{"BaseType"}{"Tid"});
3835 my $PointerLevel = 0;
3836 if($Type{"Type"} eq "Pointer")
3837 {
3838 $PointerLevel += 1;
3839 }
3840 $PointerLevel += get_PointerLevel($Type{"BaseType"}{"TDid"}, $Type{"BaseType"}{"Tid"}, $LibVersion);
3841 $Cache{"get_PointerLevel"}{$TypeDId}{$TypeId}{$LibVersion} = $PointerLevel;
3842 return $PointerLevel;
3843}
3844
3845sub get_BaseType($$$)
3846{
3847 my ($TypeDId, $TypeId, $LibVersion) = @_;
3848 return "" if(not $TypeId);
3849 if(defined $Cache{"get_BaseType"}{$TypeDId}{$TypeId}{$LibVersion})
3850 {
3851 return %{$Cache{"get_BaseType"}{$TypeDId}{$TypeId}{$LibVersion}};
3852 }
3853 return "" if(not $TypeDescr{$LibVersion}{$TypeDId}{$TypeId});
3854 my %Type = %{$TypeDescr{$LibVersion}{$TypeDId}{$TypeId}};
3855 if($Type{"Type"} =~ /Struct|Union|Typedef|Class|Enum/)
3856 {
3857 $CheckedTypes{$Type{"Name"}} = 1;
3858 }
3859 return %Type if(not $Type{"BaseType"}{"TDid"} and not $Type{"BaseType"}{"Tid"});
3860 %Type = get_BaseType($Type{"BaseType"}{"TDid"}, $Type{"BaseType"}{"Tid"}, $LibVersion);
3861 $Cache{"get_BaseType"}{$TypeDId}{$TypeId}{$LibVersion} = \%Type;
3862 return %Type;
3863}
3864
3865sub get_OneStep_BaseType($$$)
3866{
3867 my ($TypeDId, $TypeId, $LibVersion) = @_;
3868 return "" if(not $TypeId);
3869 return "" if(not $TypeDescr{$LibVersion}{$TypeDId}{$TypeId});
3870 my %Type = %{$TypeDescr{$LibVersion}{$TypeDId}{$TypeId}};
3871 return %Type if(not $Type{"BaseType"}{"TDid"} and not $Type{"BaseType"}{"Tid"});
3872 return get_Type($Type{"BaseType"}{"TDid"}, $Type{"BaseType"}{"Tid"}, $LibVersion);
3873}
3874
3875sub get_Type($$$)
3876{
3877 my ($TypeDId, $TypeId, $LibVersion) = @_;
3878 return "" if(not $TypeId);
3879 return "" if(not $TypeDescr{$LibVersion}{$TypeDId}{$TypeId});
3880 return %{$TypeDescr{$LibVersion}{$TypeDId}{$TypeId}};
3881}
3882
3883sub mergeLibs()
3884{
3885 foreach my $Interface (sort keys(%AddedInt))
3886 {#checking added interfaces
3887 next if($InternalInterfaces{1}{$Interface} or $InternalInterfaces{2}{$Interface});
3888 next if(defined $InterfacesListPath and not $InterfacesList{$Interface});
3889 next if(defined $AppPath and not $InterfacesList_App{$Interface});
3890 next if($FuncAttr{2}{$Interface}{"Private"});
3891 next if(not $FuncAttr{2}{$Interface}{"Header"});
3892 %{$CompatProblems{$Interface}{"Added_Interface"}{"SharedLibrary"}}=(
3893 "Header"=>$FuncAttr{2}{$Interface}{"Header"},
3894 "Line"=>$FuncAttr{2}{$Interface}{"Line"},
3895 "Signature"=>$FuncAttr{2}{$Interface}{"Signature"},
3896 "New_SoName"=>$Interface_Library{2}{$Interface} );
3897 }
3898 foreach my $Interface (sort keys(%WithdrawnInt))
3899 {#checking withdrawn interfaces
3900 next if($InternalInterfaces{1}{$Interface} or $InternalInterfaces{2}{$Interface});
3901 next if(defined $InterfacesListPath and not $InterfacesList{$Interface});
3902 next if(defined $AppPath and not $InterfacesList_App{$Interface});
3903 next if($FuncAttr{1}{$Interface}{"Private"});
3904 next if(not $FuncAttr{1}{$Interface}{"Header"});
3905 %{$CompatProblems{$Interface}{"Withdrawn_Interface"}{"SharedLibrary"}}=(
3906 "Header"=>$FuncAttr{1}{$Interface}{"Header"},
3907 "Line"=>$FuncAttr{1}{$Interface}{"Line"},
3908 "Signature"=>$FuncAttr{1}{$Interface}{"Signature"},
3909 "Old_SoName"=>$Interface_Library{1}{$Interface} );
3910 }
3911}
3912
3913sub mergeSignatures()
3914{
3915 my %SubProblems = ();
3916
3917 prepareInterfaces(1);
3918 prepareInterfaces(2);
3919 %FuncDescr=();
3920
3921 initializeClassVirtFunc(1);
3922 initializeClassVirtFunc(2);
3923
3924 checkVirtFuncRedefinitions(1);
3925 checkVirtFuncRedefinitions(2);
3926
3927 setVirtFuncPositions(1);
3928 setVirtFuncPositions(2);
3929
3930 foreach my $Interface (sort keys(%AddedInt))
3931 {#collecting the attributes of added interfaces
3932 next if($CheckedInterfaces{$Interface});
3933 if($CompleteSignature{2}{$Interface})
3934 {
3935 if($CompleteSignature{2}{$Interface}{"Private"})
3936 {
3937 $FuncAttr{2}{$Interface}{"Private"} = 1;
3938 }
3939 if($CompleteSignature{2}{$Interface}{"Protected"})
3940 {
3941 $FuncAttr{2}{$Interface}{"Protected"} = 1;
3942 }
3943 if($CompleteSignature{2}{$Interface}{"Header"})
3944 {
3945 $FuncAttr{2}{$Interface}{"Header"} = $CompleteSignature{2}{$Interface}{"Header"};
3946 }
3947 if($CompleteSignature{2}{$Interface}{"Line"})
3948 {
3949 $FuncAttr{2}{$Interface}{"Line"} = $CompleteSignature{2}{$Interface}{"Line"};
3950 }
3951 $FuncAttr{2}{$Interface}{"Signature"} = get_Signature($Interface, 2);
3952 foreach my $ParamPos (keys(%{$CompleteSignature{2}{$Interface}{"Param"}}))
3953 {
3954 my $ParamType_Id = $CompleteSignature{2}{$Interface}{"Param"}{$ParamPos}{"type"};
3955 my $ParamType_DId = $Tid_TDid{2}{$ParamType_Id};
3956 my %ParamType = get_Type($ParamType_DId, $ParamType_Id, 2);
3957 }
3958 #checking virtual table
3959 check_VirtualTable($Interface, 2);
3960 $CheckedInterfaces{$Interface} = 1;
3961 }
3962 }
3963 foreach my $Interface (sort keys(%WithdrawnInt))
3964 {#collecting the attributes of withdrawn interfaces
3965 next if($CheckedInterfaces{$Interface});
3966 if($CompleteSignature{1}{$Interface})
3967 {
3968 if($CompleteSignature{1}{$Interface}{"Private"})
3969 {
3970 $FuncAttr{1}{$Interface}{"Private"} = 1;
3971 }
3972 if($CompleteSignature{1}{$Interface}{"Protected"})
3973 {
3974 $FuncAttr{1}{$Interface}{"Protected"} = 1;
3975 }
3976 if($CompleteSignature{1}{$Interface}{"Header"})
3977 {
3978 $FuncAttr{1}{$Interface}{"Header"} = $CompleteSignature{1}{$Interface}{"Header"};
3979 }
3980 if($CompleteSignature{1}{$Interface}{"Line"})
3981 {
3982 $FuncAttr{1}{$Interface}{"Line"} = $CompleteSignature{1}{$Interface}{"Line"};
3983 }
3984 $FuncAttr{1}{$Interface}{"Signature"} = get_Signature($Interface, 1);
3985 foreach my $ParamPos (keys(%{$CompleteSignature{1}{$Interface}{"Param"}}))
3986 {
3987 my $ParamType_Id = $CompleteSignature{1}{$Interface}{"Param"}{$ParamPos}{"type"};
3988 my $ParamType_DId = $Tid_TDid{1}{$ParamType_Id};
3989 my %ParamType = get_Type($ParamType_DId, $ParamType_Id, 1);
3990 }
3991 #checking virtual table
3992 check_VirtualTable($Interface, 1);
3993 $CheckedInterfaces{$Interface} = 1;
3994 }
3995 }
3996
3997 foreach my $Interface (sort keys(%{$CompleteSignature{1}}))
3998 {#checking interfaces
3999 if(($Interface !~ /\@/) and ($SymVer{1}{$Interface} =~ /\A(.*)[\@]+/))
4000 {
4001 next if($1 eq $Interface);
4002 }
4003 my ($MnglName, $SymbolVersion) = ($Interface, "");
4004 if($Interface =~ /\A([^@]+)[\@]+([^@]+)\Z/)
4005 {
4006 ($MnglName, $SymbolVersion) = ($1, $2);
4007 }
4008 next if($InternalInterfaces{1}{$Interface} or $InternalInterfaces{2}{$Interface});
4009 next if(defined $InterfacesListPath and not $InterfacesList{$Interface});
4010 next if(defined $AppPath and not $InterfacesList_App{$Interface});
4011 next if($CheckedInterfaces{$Interface});
4012 next if($CompleteSignature{1}{$Interface}{"Private"});
4013 next if(not $CompleteSignature{1}{$Interface}{"Header"} or not $CompleteSignature{2}{$Interface}{"Header"});
4014 next if(not $CompleteSignature{1}{$Interface}{"MnglName"} or not $CompleteSignature{2}{$Interface}{"MnglName"});
4015 next if((not $CompleteSignature{1}{$Interface}{"PureVirt"} and $CompleteSignature{2}{$Interface}{"PureVirt"}) or ($CompleteSignature{1}{$Interface}{"PureVirt"} and not $CompleteSignature{2}{$Interface}{"PureVirt"}));
4016 $CheckedInterfaces{$Interface} = 1;
4017 #checking virtual table
4018 check_VirtualTable($Interface, 1);
4019 #checking attributes
4020 if($CompleteSignature{2}{$Interface}{"Static"} and not $CompleteSignature{1}{$Interface}{"Static"})
4021 {
4022 %{$CompatProblems{$Interface}{"Function_Become_Static"}{"Attributes"}}=(
4023 "Header"=>$CompleteSignature{1}{$Interface}{"Header"},
4024 "Line"=>$CompleteSignature{1}{$Interface}{"Line"},
4025 "Signature"=>get_Signature($Interface, 1),
4026 "Old_SoName"=>$Interface_Library{1}{$Interface},
4027 "New_SoName"=>$Interface_Library{2}{$Interface} );
4028 }
4029 elsif(not $CompleteSignature{2}{$Interface}{"Static"} and $CompleteSignature{1}{$Interface}{"Static"})
4030 {
4031 %{$CompatProblems{$Interface}{"Function_Become_NonStatic"}{"Attributes"}}=(
4032 "Header"=>$CompleteSignature{1}{$Interface}{"Header"},
4033 "Line"=>$CompleteSignature{1}{$Interface}{"Line"},
4034 "Signature"=>get_Signature($Interface, 1),
4035 "Old_SoName"=>$Interface_Library{1}{$Interface},
4036 "New_SoName"=>$Interface_Library{2}{$Interface} );
4037 }
4038 if($CompleteSignature{1}{$Interface}{"Virt"} and $CompleteSignature{2}{$Interface}{"Virt"})
4039 {
4040 if($CompleteSignature{1}{$Interface}{"Position"}!=$CompleteSignature{2}{$Interface}{"Position"})
4041 {
4042 my $Class_Id = $CompleteSignature{1}{$Interface}{"Class"};
4043 my $Class_DId = $Tid_TDid{1}{$Class_Id};
4044 my %Class_Type = get_Type($Class_DId, $Class_Id, 1);
4045 %{$CompatProblems{$Interface}{"Virtual_Function_Position"}{$tr_name{$MnglName}}}=(
4046 "Type_Name"=>$Class_Type{"Name"},
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: