mathematical 1.6.17 → 1.6.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/mathematical/lasem/COPYING +502 -0
- data/ext/mathematical/lasem/NEWS.md +146 -0
- data/ext/mathematical/lasem/README.md +65 -0
- data/ext/mathematical/lasem/TODO +50 -0
- data/ext/mathematical/lasem/docs/lasem-render-0.6.1 +106 -0
- data/ext/mathematical/lasem/docs/meson.build +3 -0
- data/ext/mathematical/lasem/docs/reference/lasem/building.md +32 -0
- data/ext/mathematical/lasem/docs/reference/lasem/lasem.toml.in +47 -0
- data/ext/mathematical/lasem/docs/reference/lasem/meson.build +44 -0
- data/ext/mathematical/lasem/docs/reference/lasem/overview.md +24 -0
- data/ext/mathematical/lasem/docs/reference/lasem/urlmap.js +5 -0
- data/ext/mathematical/lasem/itex2mml/COPYING.itex2MML +3 -0
- data/ext/mathematical/lasem/itex2mml/README.itex2MML +16 -0
- data/ext/mathematical/lasem/itex2mml/itex2MML.h +63 -0
- data/ext/mathematical/lasem/itex2mml/itex2MML.l +1183 -0
- data/ext/mathematical/lasem/itex2mml/itex2MML.y +2108 -0
- data/ext/mathematical/lasem/itex2mml/meson.build +17 -0
- data/ext/mathematical/lasem/lasem.doap +21 -0
- data/ext/mathematical/lasem/meson.build +46 -0
- data/ext/mathematical/lasem/meson_options.txt +5 -0
- data/ext/mathematical/lasem/org.lasem.Viewer.json +41 -0
- data/ext/mathematical/lasem/po/LINGUAS +31 -0
- data/ext/mathematical/lasem/po/POTFILES.in +195 -0
- data/ext/mathematical/lasem/po/POTFILES.skip +1 -0
- data/ext/mathematical/lasem/po/bs.po +65 -0
- data/ext/mathematical/lasem/po/cs.po +102 -0
- data/ext/mathematical/lasem/po/da.po +99 -0
- data/ext/mathematical/lasem/po/de.po +104 -0
- data/ext/mathematical/lasem/po/el.po +73 -0
- data/ext/mathematical/lasem/po/es.po +107 -0
- data/ext/mathematical/lasem/po/eu.po +66 -0
- data/ext/mathematical/lasem/po/fr.po +65 -0
- data/ext/mathematical/lasem/po/fur.po +101 -0
- data/ext/mathematical/lasem/po/gl.po +64 -0
- data/ext/mathematical/lasem/po/hu.po +105 -0
- data/ext/mathematical/lasem/po/id.po +102 -0
- data/ext/mathematical/lasem/po/it.po +104 -0
- data/ext/mathematical/lasem/po/lt.po +106 -0
- data/ext/mathematical/lasem/po/lv.po +109 -0
- data/ext/mathematical/lasem/po/meson.build +4 -0
- data/ext/mathematical/lasem/po/nb.po +62 -0
- data/ext/mathematical/lasem/po/nl.po +102 -0
- data/ext/mathematical/lasem/po/oc.po +65 -0
- data/ext/mathematical/lasem/po/pl.po +102 -0
- data/ext/mathematical/lasem/po/pt.po +77 -0
- data/ext/mathematical/lasem/po/pt_BR.po +105 -0
- data/ext/mathematical/lasem/po/ru.po +66 -0
- data/ext/mathematical/lasem/po/sl.po +117 -0
- data/ext/mathematical/lasem/po/sr.po +105 -0
- data/ext/mathematical/lasem/po/sr@latin.po +105 -0
- data/ext/mathematical/lasem/po/sv.po +105 -0
- data/ext/mathematical/lasem/po/tg.po +64 -0
- data/ext/mathematical/lasem/po/tr.po +105 -0
- data/ext/mathematical/lasem/po/zh_CN.po +100 -0
- data/ext/mathematical/lasem/src/lasemrender.c +357 -0
- data/ext/mathematical/lasem/src/lsm.c +33 -0
- data/ext/mathematical/lasem/src/lsm.h +39 -0
- data/ext/mathematical/lasem/src/lsmattributes.c +276 -0
- data/ext/mathematical/lasem/src/lsmattributes.h +75 -0
- data/ext/mathematical/lasem/src/lsmcairo.c +598 -0
- data/ext/mathematical/lasem/src/lsmcairo.h +51 -0
- data/ext/mathematical/lasem/src/lsmdebug.c +185 -0
- data/ext/mathematical/lasem/src/lsmdebug.h +73 -0
- data/ext/mathematical/lasem/src/lsmdom.h +43 -0
- data/ext/mathematical/lasem/src/lsmdomcharacterdata.c +131 -0
- data/ext/mathematical/lasem/src/lsmdomcharacterdata.h +59 -0
- data/ext/mathematical/lasem/src/lsmdomdocument.c +272 -0
- data/ext/mathematical/lasem/src/lsmdomdocument.h +75 -0
- data/ext/mathematical/lasem/src/lsmdomdocumentfragment.c +81 -0
- data/ext/mathematical/lasem/src/lsmdomdocumentfragment.h +55 -0
- data/ext/mathematical/lasem/src/lsmdomelement.c +148 -0
- data/ext/mathematical/lasem/src/lsmdomelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmdomentities.c +2166 -0
- data/ext/mathematical/lasem/src/lsmdomentities.h +35 -0
- data/ext/mathematical/lasem/src/lsmdomimplementation.c +82 -0
- data/ext/mathematical/lasem/src/lsmdomimplementation.h +41 -0
- data/ext/mathematical/lasem/src/lsmdomnamednodemap.c +118 -0
- data/ext/mathematical/lasem/src/lsmdomnamednodemap.h +64 -0
- data/ext/mathematical/lasem/src/lsmdomnode.c +737 -0
- data/ext/mathematical/lasem/src/lsmdomnode.h +122 -0
- data/ext/mathematical/lasem/src/lsmdomnodelist.c +70 -0
- data/ext/mathematical/lasem/src/lsmdomnodelist.h +58 -0
- data/ext/mathematical/lasem/src/lsmdomparser.c +523 -0
- data/ext/mathematical/lasem/src/lsmdomparser.h +54 -0
- data/ext/mathematical/lasem/src/lsmdomtext.c +82 -0
- data/ext/mathematical/lasem/src/lsmdomtext.h +55 -0
- data/ext/mathematical/lasem/src/lsmdomtypes.h +44 -0
- data/ext/mathematical/lasem/src/lsmdomview.c +423 -0
- data/ext/mathematical/lasem/src/lsmdomview.h +94 -0
- data/ext/mathematical/lasem/src/lsmitex.c +79 -0
- data/ext/mathematical/lasem/src/lsmitex.h +36 -0
- data/ext/mathematical/lasem/src/lsmmathml.h +66 -0
- data/ext/mathematical/lasem/src/lsmmathmlactionelement.c +93 -0
- data/ext/mathematical/lasem/src/lsmmathmlactionelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmmathmlaligngroupelement.c +102 -0
- data/ext/mathematical/lasem/src/lsmmathmlaligngroupelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlalignmarkelement.c +102 -0
- data/ext/mathematical/lasem/src/lsmmathmlalignmarkelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlattributes.c +219 -0
- data/ext/mathematical/lasem/src/lsmmathmlattributes.h +126 -0
- data/ext/mathematical/lasem/src/lsmmathmldocument.c +307 -0
- data/ext/mathematical/lasem/src/lsmmathmldocument.h +61 -0
- data/ext/mathematical/lasem/src/lsmmathmlelement.c +491 -0
- data/ext/mathematical/lasem/src/lsmmathmlelement.h +107 -0
- data/ext/mathematical/lasem/src/lsmmathmlencloseelement.c +142 -0
- data/ext/mathematical/lasem/src/lsmmathmlencloseelement.h +64 -0
- data/ext/mathematical/lasem/src/lsmmathmlenums.c +500 -0
- data/ext/mathematical/lasem/src/lsmmathmlenums.h +224 -0
- data/ext/mathematical/lasem/src/lsmmathmlerrorelement.c +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlerrorelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlfencedelement.c +180 -0
- data/ext/mathematical/lasem/src/lsmmathmlfencedelement.h +65 -0
- data/ext/mathematical/lasem/src/lsmmathmlfractionelement.c +253 -0
- data/ext/mathematical/lasem/src/lsmmathmlfractionelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmmathmlglyphtableams.c +661 -0
- data/ext/mathematical/lasem/src/lsmmathmlglyphtableams.h +45 -0
- data/ext/mathematical/lasem/src/lsmmathmlitexelement.c +189 -0
- data/ext/mathematical/lasem/src/lsmmathmlitexelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmmathmllayoututils.c +191 -0
- data/ext/mathematical/lasem/src/lsmmathmllayoututils.h +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlmathelement.c +212 -0
- data/ext/mathematical/lasem/src/lsmmathmlmathelement.h +81 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.c +3342 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.h +55 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatorelement.c +314 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatorelement.h +73 -0
- data/ext/mathematical/lasem/src/lsmmathmlpaddedelement.c +137 -0
- data/ext/mathematical/lasem/src/lsmmathmlpaddedelement.h +61 -0
- data/ext/mathematical/lasem/src/lsmmathmlphantomelement.c +71 -0
- data/ext/mathematical/lasem/src/lsmmathmlphantomelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationcontainer.c +43 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationcontainer.h +54 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationtoken.c +303 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationtoken.h +83 -0
- data/ext/mathematical/lasem/src/lsmmathmlradicalelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmmathmlradicalelement.h +71 -0
- data/ext/mathematical/lasem/src/lsmmathmlrowelement.c +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlrowelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlscriptelement.c +282 -0
- data/ext/mathematical/lasem/src/lsmmathmlscriptelement.h +78 -0
- data/ext/mathematical/lasem/src/lsmmathmlsemanticselement.c +84 -0
- data/ext/mathematical/lasem/src/lsmmathmlsemanticselement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlspaceelement.c +156 -0
- data/ext/mathematical/lasem/src/lsmmathmlspaceelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmmathmlstringelement.c +123 -0
- data/ext/mathematical/lasem/src/lsmmathmlstringelement.h +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyle.c +130 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyle.h +89 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyleelement.c +391 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyleelement.h +94 -0
- data/ext/mathematical/lasem/src/lsmmathmltablecellelement.c +122 -0
- data/ext/mathematical/lasem/src/lsmmathmltablecellelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmmathmltableelement.c +572 -0
- data/ext/mathematical/lasem/src/lsmmathmltableelement.h +78 -0
- data/ext/mathematical/lasem/src/lsmmathmltablerowelement.c +120 -0
- data/ext/mathematical/lasem/src/lsmmathmltablerowelement.h +64 -0
- data/ext/mathematical/lasem/src/lsmmathmltraits.c +867 -0
- data/ext/mathematical/lasem/src/lsmmathmltraits.h +129 -0
- data/ext/mathematical/lasem/src/lsmmathmltypes.h +67 -0
- data/ext/mathematical/lasem/src/lsmmathmlunderoverelement.c +485 -0
- data/ext/mathematical/lasem/src/lsmmathmlunderoverelement.h +82 -0
- data/ext/mathematical/lasem/src/lsmmathmlutils.c +170 -0
- data/ext/mathematical/lasem/src/lsmmathmlutils.h +57 -0
- data/ext/mathematical/lasem/src/lsmmathmlview.c +1343 -0
- data/ext/mathematical/lasem/src/lsmmathmlview.h +179 -0
- data/ext/mathematical/lasem/src/lsmmisc.c +15 -0
- data/ext/mathematical/lasem/src/lsmmisc.h +32 -0
- data/ext/mathematical/lasem/src/lsmproperties.c +415 -0
- data/ext/mathematical/lasem/src/lsmproperties.h +85 -0
- data/ext/mathematical/lasem/src/lsmstr.c +231 -0
- data/ext/mathematical/lasem/src/lsmstr.h +114 -0
- data/ext/mathematical/lasem/src/lsmsvg.h +67 -0
- data/ext/mathematical/lasem/src/lsmsvgaelement.c +73 -0
- data/ext/mathematical/lasem/src/lsmsvgaelement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgattributes.h +168 -0
- data/ext/mathematical/lasem/src/lsmsvgcircleelement.c +153 -0
- data/ext/mathematical/lasem/src/lsmsvgcircleelement.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgclippathelement.c +134 -0
- data/ext/mathematical/lasem/src/lsmsvgclippathelement.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgcolors.c +212 -0
- data/ext/mathematical/lasem/src/lsmsvgcolors.h +39 -0
- data/ext/mathematical/lasem/src/lsmsvgdefselement.c +74 -0
- data/ext/mathematical/lasem/src/lsmsvgdefselement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgdocument.c +306 -0
- data/ext/mathematical/lasem/src/lsmsvgdocument.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgelement.c +371 -0
- data/ext/mathematical/lasem/src/lsmsvgelement.h +80 -0
- data/ext/mathematical/lasem/src/lsmsvgellipseelement.c +158 -0
- data/ext/mathematical/lasem/src/lsmsvgellipseelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgenums.c +674 -0
- data/ext/mathematical/lasem/src/lsmsvgenums.h +416 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterblend.c +105 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterblend.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.c +115 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercomposite.c +109 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercomposite.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.c +206 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.c +124 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterelement.h +66 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterflood.c +86 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterflood.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltergaussianblur.c +114 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltergaussianblur.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterimage.c +169 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterimage.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermerge.c +98 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermerge.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermergenode.c +87 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermergenode.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.c +116 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilteroffset.c +112 -0
- data/ext/mathematical/lasem/src/lsmsvgfilteroffset.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterprimitive.c +168 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterprimitive.h +66 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterspecularlighting.c +134 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterspecularlighting.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.c +1540 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.h +92 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltertile.c +102 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltertile.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.c +142 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvggelement.c +73 -0
- data/ext/mathematical/lasem/src/lsmsvggelement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvggradientelement.c +151 -0
- data/ext/mathematical/lasem/src/lsmsvggradientelement.h +68 -0
- data/ext/mathematical/lasem/src/lsmsvgimageelement.c +261 -0
- data/ext/mathematical/lasem/src/lsmsvgimageelement.h +67 -0
- data/ext/mathematical/lasem/src/lsmsvglength.c +152 -0
- data/ext/mathematical/lasem/src/lsmsvglength.h +65 -0
- data/ext/mathematical/lasem/src/lsmsvglineargradientelement.c +271 -0
- data/ext/mathematical/lasem/src/lsmsvglineargradientelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvglineelement.c +153 -0
- data/ext/mathematical/lasem/src/lsmsvglineelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgmarkerelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmsvgmarkerelement.h +74 -0
- data/ext/mathematical/lasem/src/lsmsvgmaskelement.c +232 -0
- data/ext/mathematical/lasem/src/lsmsvgmaskelement.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgmatrix.c +221 -0
- data/ext/mathematical/lasem/src/lsmsvgmatrix.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgpathelement.c +115 -0
- data/ext/mathematical/lasem/src/lsmsvgpathelement.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgpatternelement.c +398 -0
- data/ext/mathematical/lasem/src/lsmsvgpatternelement.h +69 -0
- data/ext/mathematical/lasem/src/lsmsvgpolygonelement.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgpolygonelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgpolylineelement.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgpolylineelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgradialgradientelement.c +323 -0
- data/ext/mathematical/lasem/src/lsmsvgradialgradientelement.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvgrectelement.c +184 -0
- data/ext/mathematical/lasem/src/lsmsvgrectelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmsvgstopelement.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgstopelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgstyle.c +546 -0
- data/ext/mathematical/lasem/src/lsmsvgstyle.h +217 -0
- data/ext/mathematical/lasem/src/lsmsvgsvgelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmsvgsvgelement.h +71 -0
- data/ext/mathematical/lasem/src/lsmsvgswitchelement.c +103 -0
- data/ext/mathematical/lasem/src/lsmsvgswitchelement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgsymbolelement.c +148 -0
- data/ext/mathematical/lasem/src/lsmsvgsymbolelement.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgtextelement.c +203 -0
- data/ext/mathematical/lasem/src/lsmsvgtextelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgtraits.c +1490 -0
- data/ext/mathematical/lasem/src/lsmsvgtraits.h +122 -0
- data/ext/mathematical/lasem/src/lsmsvgtransformable.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgtransformable.h +54 -0
- data/ext/mathematical/lasem/src/lsmsvgtspanelement.c +174 -0
- data/ext/mathematical/lasem/src/lsmsvgtspanelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgtypes.h +83 -0
- data/ext/mathematical/lasem/src/lsmsvguseelement.c +238 -0
- data/ext/mathematical/lasem/src/lsmsvguseelement.h +69 -0
- data/ext/mathematical/lasem/src/lsmsvgview.c +2797 -0
- data/ext/mathematical/lasem/src/lsmsvgview.h +203 -0
- data/ext/mathematical/lasem/src/lsmtraits.c +171 -0
- data/ext/mathematical/lasem/src/lsmtraits.h +51 -0
- data/ext/mathematical/lasem/src/lsmtypes.h +36 -0
- data/ext/mathematical/lasem/src/lsmutils.c +54 -0
- data/ext/mathematical/lasem/src/lsmutils.h +56 -0
- data/ext/mathematical/lasem/src/meson.build +321 -0
- data/ext/mathematical/lasem/subprojects/gi-docgen.wrap +6 -0
- data/ext/mathematical/lasem/tests/data/mathml/gtkmathview/README +5 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction-02.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction-03-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction-03.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/integrals/closed.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/integrals/multiples.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/integrals/standard.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/matrices/matrix-01.tex +5 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/array.tex +3 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/cases-cr.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/cases-space.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/cases.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/color.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/complex-2.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/complex-inline.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/complex.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/quadratic-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/quadratic.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/radicals/radical-01.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/radicals/radical-02.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/accents.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/script.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/stack.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/subscript.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/sums-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/sums.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/superscript-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/superscript.tex +1 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/bmpCursor.bmp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/brushedMetal.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/jpeg.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/jpegCursor.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/operaBridge.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/operaSteps.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/operaWalk.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors_pb.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors_pb_tile.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors_tile.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/tde.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/tiffCursor.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.1/images/image1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.1/images/struct-image-01.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.1/images/struct-image-02.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/CNN.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/SVG-1.1-monolithic-fixed.dtd +1622 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/TraitAccess.common.es +672 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/advice.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/beep.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/boing_x.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/clock.mp4 +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud-ps411q4app.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q25s.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q65float.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q75o.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q75p.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q75s.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud444q65o.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloudgsq75s.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloudoddq65o.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloudqllo.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/copyright-documents-19990405.html +89 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/disco.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/dogandball.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/dogandball.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/dogandball.mov +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/duckfeeding.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/duckfeeding.mov +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/excuse_me.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/externalscript.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton2.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton3.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton4.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/heroesLanding.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/image1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/image2_b.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/myimage.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pacman.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/plant.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image0.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image2.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image3.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image4.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image5.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image6.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image7.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image8.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image9.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script1.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script10.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script2.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script3.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script4.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script5.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script6.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script7.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script8.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script9.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/skier.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/skier.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/struct-image-01.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/struct-image-02.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/svgRef4.css +4 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/welcome.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/xmltree.xml +4 -0
- data/ext/mathematical/lasem/tests/dom.c +266 -0
- data/ext/mathematical/lasem/tests/filter.c +153 -0
- data/ext/mathematical/lasem/tests/fuzztest.sh +12 -0
- data/ext/mathematical/lasem/tests/lasem.supp +185 -0
- data/ext/mathematical/lasem/tests/lsmtest.c +592 -0
- data/ext/mathematical/lasem/tests/meson.build +39 -0
- data/ext/mathematical/lasem/tests/str.c +44 -0
- data/ext/mathematical/lasem/tests/suite.c +140 -0
- data/ext/mathematical/lasem/tests/suite.ini +27 -0
- data/ext/mathematical/lasem/tools/change-license +3 -0
- data/ext/mathematical/lasem/tools/charlist.dtd +73 -0
- data/ext/mathematical/lasem/tools/entities-to-c.xsl +1067 -0
- data/ext/mathematical/lasem/tools/fuzzxml +243 -0
- data/ext/mathematical/lasem/tools/generate-entity-array.c +2136 -0
- data/ext/mathematical/lasem/tools/unicode.xml +44303 -0
- data/ext/mathematical/lasem/viewer/meson.build +17 -0
- data/ext/mathematical/lasem/viewer/viewer.c +248 -0
- data/ext/mathematical/lasem_overrides.c +4 -8
- data/ext/mathematical/mathematical.c +7 -9
- data/ext/mathematical/mtex2MML/CMakeLists.txt +255 -0
- data/ext/mathematical/mtex2MML/CONTRIBUTING.md +22 -0
- data/ext/mathematical/mtex2MML/README.md +143 -0
- data/ext/mathematical/mtex2MML/SUPPORTED.md +1216 -0
- data/ext/mathematical/mtex2MML/appveyor.yml +35 -0
- data/ext/mathematical/mtex2MML/cmake/Modules/astyle.cmake +12 -0
- data/ext/mathematical/mtex2MML/deps/uthash/package.json +27 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utarray.h +239 -0
- data/ext/mathematical/mtex2MML/deps/uthash/uthash.h +1074 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utlist.h +895 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utringbuffer.h +108 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utstring.h +398 -0
- data/ext/mathematical/mtex2MML/script/bootstrap +39 -0
- data/ext/mathematical/mtex2MML/script/cibuild +58 -0
- data/ext/mathematical/mtex2MML/script/tag +28 -0
- data/ext/mathematical/mtex2MML/src/colors.c +44 -0
- data/ext/mathematical/mtex2MML/src/colors.h +23 -0
- data/ext/mathematical/mtex2MML/src/em.c +99 -0
- data/ext/mathematical/mtex2MML/src/em.h +31 -0
- data/ext/mathematical/mtex2MML/src/environment.c +515 -0
- data/ext/mathematical/mtex2MML/src/environment.h +85 -0
- data/ext/mathematical/mtex2MML/src/lexer.l +1594 -0
- data/ext/mathematical/mtex2MML/src/libmtex2MML.pc.in +10 -0
- data/ext/mathematical/mtex2MML/src/main.c +187 -0
- data/ext/mathematical/mtex2MML/src/mtex2MML.h +89 -0
- data/ext/mathematical/mtex2MML/src/parser.y +3817 -0
- data/ext/mathematical/mtex2MML/src/string_dup.c +23 -0
- data/ext/mathematical/mtex2MML/src/string_dup.h +23 -0
- data/ext/mathematical/mtex2MML/src/string_extras.c +47 -0
- data/ext/mathematical/mtex2MML/src/string_extras.h +30 -0
- data/ext/mathematical/mtex2MML/src/win32-shims/unistd.h +51 -0
- data/ext/mathematical/mtex2MML/tests/array.c +127 -0
- data/ext/mathematical/mtex2MML/tests/basic.c +96 -0
- data/ext/mathematical/mtex2MML/tests/clar/fixtures.h +38 -0
- data/ext/mathematical/mtex2MML/tests/clar/fs.h +335 -0
- data/ext/mathematical/mtex2MML/tests/clar/print.h +66 -0
- data/ext/mathematical/mtex2MML/tests/clar/sandbox.h +141 -0
- data/ext/mathematical/mtex2MML/tests/clar.c +644 -0
- data/ext/mathematical/mtex2MML/tests/clar.h +163 -0
- data/ext/mathematical/mtex2MML/tests/clar_test.h +20 -0
- data/ext/mathematical/mtex2MML/tests/cornercases.c +46 -0
- data/ext/mathematical/mtex2MML/tests/debug/mtex2MML_debug.cc +21 -0
- data/ext/mathematical/mtex2MML/tests/delimiters.c +242 -0
- data/ext/mathematical/mtex2MML/tests/deps/file2str/file2str.c +62 -0
- data/ext/mathematical/mtex2MML/tests/deps/file2str/file2str.h +12 -0
- data/ext/mathematical/mtex2MML/tests/deps/file2str/package.json +9 -0
- data/ext/mathematical/mtex2MML/tests/deps/mkdtemp/mkdtemp.c +151 -0
- data/ext/mathematical/mtex2MML/tests/deps/mkdtemp/mkdtemp.h +10 -0
- data/ext/mathematical/mtex2MML/tests/deps/trim/package.json +7 -0
- data/ext/mathematical/mtex2MML/tests/deps/trim/trim.c +27 -0
- data/ext/mathematical/mtex2MML/tests/deps/trim/trim.h +7 -0
- data/ext/mathematical/mtex2MML/tests/env.c +334 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/amscd-1.html +86 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/amscd-2.html +148 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/amscd-3.html +188 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/arrows-2.html +156 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/min-1.html +45 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/min-2.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-1.html +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-3.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/buildrel-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue490.html +0 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue877.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue937.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overbrace-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overbracket-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overset-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/sideset-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/stackrel-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/subarray-1.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/substack-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/underbrace-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/underbracket-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/underset-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/action/mathtip-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/action/texttip-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/action/toggle-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/Newextarrow-1.html +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-1.html +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-2.html +30 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-3.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-4.html +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-5.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathbin-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathinner-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathop-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathop-1b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathop-2.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathopenclose-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathord-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathpunct-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathrel-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/backslashed-1.html +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/basic-operators-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/basic-operators-2.html +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/remap-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/color-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/colorbox-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/definecolor-1.html +37 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/definecolor-2.html +79 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/fcolorbox-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/issue446.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/namedcolors-1.html +70 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/big-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/big-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/big-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/delimiters-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/delimiters-2.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue775.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-1a.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-1b.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-2.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-3.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-4.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-5.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/left-right-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/align-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/align-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/alignat-1a.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/alignat-1b.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/aligned-1.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/aligned-2.html +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/alignedat-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqalign-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqalignno-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqnarray-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqnarray-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqnarray-2.html +64 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/equation-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/equation-2.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gather-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gather-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gathered-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gathered-2.html +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-1a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-1b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-2a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-2b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-3a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-3b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/leqalignno-1.html +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/multline-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/multline-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/split-1.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/errors/noErrors-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/errors/noUndefined-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/above-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/abovewithdelims-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/atop-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/atopwithdelims-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/binom-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/brace-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/brack-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/cfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/choose-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/dbinom-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/dfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/frac-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/frac-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/genfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/issue969.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/overwithdelims-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/tbinom-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/tfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue1152-1.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue1152-2.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue375.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue856.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1c.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1d.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/boxes-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/kern-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/kern-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/llap-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/lower-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/mathstrut-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/moveleft-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/moveright-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/newline-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/phantom-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/raise-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/rlap-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/shove-1.html +19 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/skip-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/skip-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/smash-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/spaces-1.html +18 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/strut-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/vcenter-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-1.html +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-2.html +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-3.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-4.html +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/hebrew-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/begingroup-1.html +15 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/def-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/let-1.html +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-2.html +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-3.html +50 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-5.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-6.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-7.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/Bbb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/bf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/boldsymbol-1.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/cal-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/frak-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/it-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbf-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbf-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbf-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathcal-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathfrak-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathit-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathrm-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathscr-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathsf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathtt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mit-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/pmb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/rm-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/scr-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/sf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/text-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textbf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textit-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textrm-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textsf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/texttt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/tt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/bmatrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/bmatrix-2.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/matrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/matrix-2.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/pmatrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/pmatrix-2.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/smallmatrix-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/vmatrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/vmatrix-2.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/advanced-1.html +120 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/advanced-2.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/advanced-3.html +138 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/amounts-1.html +46 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/arrows-1.html +235 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/arrows-2.html +159 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/basics-1.html +139 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/bonds-1.html +256 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/environments-1.html +81 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/isotopes-1.html +30 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/math-1.html +101 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/special_symbols-1.html +176 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/Rule-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/Tiny-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/class-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/cssId-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/href-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/href-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/require-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/style-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/unicode-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/LaTeX-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/bbox-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/boxed-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/cancel-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/cases-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/displaylines-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/enclose-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/functions-1.html +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/limits-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/limits-2.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/limits-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/mathsize-1.html +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/mod-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/not-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/pod-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/primes-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/primes-2.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/primes-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/style-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/style-2.html +0 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/verb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/verb-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/eqref-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/label-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/label-2.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/notag-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/ref-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/ref-2.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/ref-3.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/root-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/root-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/root-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/sqrt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/sqrt-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/binaryops-1.html +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/dots-1.html +26 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/largeops-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/largeops-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/relations-1.html +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-1.html +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-2.html +31 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-3.html +40 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-4.html +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-5.html +56 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-6.html +49 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/amscd-1.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/amscd-2.no_tex +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/amscd-3.no_tex +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/arrows-1.no_tex +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/arrows-2.no_tex +26 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/min-1.no_tex +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/min-2.no_tex +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/accents-1.txt +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/accents-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/accents-3.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/buildrel-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/issue490.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/issue877.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/issue937.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/overbrace-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/overbracket-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/overset-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/sideset-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/stackrel-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/subarray-1.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/substack-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/underbrace-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/underbracket-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/underset-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/action/mathtip-1.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/action/texttip-1.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/action/toggle-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/Newextarrow-1.xtex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-1.txt +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-2.txt +30 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-3.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-4.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-5.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathbin-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathinner-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathop-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathop-1b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathop-2.xtex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathopenclose-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathord-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathpunct-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathrel-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/backslashed-1.txt +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/basic-operators-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/basic-operators-2.xtex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/remap-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/color-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/colorbox-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-1a.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-1b.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-1c.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-2.xtex +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/fcolorbox-1.xtex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/issue446.xtex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/namedcolors-1.txt +70 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/big-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/big-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/big-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/delimiters-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/delimiters-2.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue775.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-1a.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-1b.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-2.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-3.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-4.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-5.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/left-right-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/align-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/align-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/alignat-1a.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/alignat-1b.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/aligned-1.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/aligned-2.txt +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/alignedat-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqalign-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqalignno-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-1c.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-2a.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/equation-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/equation-2.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gather-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gather-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gathered-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gathered-2.txt +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-1a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-1b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-2a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-2b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-3a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-3b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/leqalignno-1.xtex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/multline-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/multline-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/split-1.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/errors/noErrors-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/errors/noUndefined-1.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/above-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/abovewithdelims-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/atop-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/atopwithdelims-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/binom-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/brace-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/brack-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/cfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/choose-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/dbinom-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/dfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/frac-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/frac-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/genfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/issue969.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/overwithdelims-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/tbinom-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/tfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue1151.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue1152-1.xtex +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue1152-2.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue375.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue856.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1c.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1d.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue903-1.xtex +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue903-2.xtex +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/boxes-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/kern-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/kern-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/llap-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/lower-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/mathstrut-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/moveleft-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/moveright-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/newline-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/phantom-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/raise-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/rlap-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/shove-1.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/skip-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/skip-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/smash-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/spaces-1.txt +18 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/strut-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/vcenter-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-1.txt +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-2.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-3.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-4.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/hebrew-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/begingroup-1.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/def-1.no_tex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/let-1.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-1a.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-1b.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-2.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-3.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-5.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-6.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-7.no_tex +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/Bbb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/bf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/boldsymbol-1.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/cal-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/frak-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/it-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbf-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbf-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbf-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathcal-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathfrak-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathit-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathrm-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathscr-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathsf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathtt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mit-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/pmb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/rm-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/scr-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/sf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/text-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textbf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textit-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textrm-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textsf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/texttt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/tt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/bmatrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/bmatrix-2.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/matrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/matrix-2.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/pmatrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/pmatrix-2.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/smallmatrix-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/vmatrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/vmatrix-2.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/advanced-1.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/advanced-2.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/advanced-3.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/amounts-1.no_tex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/arrows-1.no_tex +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/arrows-2.no_tex +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/basics-1.no_tex +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/bonds-1.no_tex +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/environments-1.no_tex +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/isotopes-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/math-1.no_tex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/special_symbols-1.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/Rule-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/Tiny-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/class-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/cssId-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/href-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/href-2.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/require-1.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/style-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/unicode-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/LaTeX-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/bbox-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/boxed-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/cancel-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/cases-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/displaylines-1.xtex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/enclose-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/functions-1.txt +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/limits-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/limits-2.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/limits-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/mathsize-1.txt +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/mod-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/not-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/pod-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/primes-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/primes-2.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/primes-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/style-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/style-2.no_tex +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/verb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/verb-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/eqref-1.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/label-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/label-2.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/notag-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-1a.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-1b.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-2.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-3.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-1.no_tex +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-2.no_tex +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-3.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-4.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/root-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/root-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/root-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/sqrt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/sqrt-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/binaryops-1.txt +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/dots-1.txt +26 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/largeops-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/largeops-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/relations-1.txt +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-1.txt +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-2.txt +31 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-3.txt +40 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-4.txt +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-5.txt +56 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-6.txt +49 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/TODO.md +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_nesting.html +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_nesting.txt +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment_with_hline.html +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment_with_hline.txt +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column_with_align.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column_with_align.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline_and_hdashline.html +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline_and_hdashline.txt +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_vertical_and_horizontal_dashes.html +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_vertical_and_horizontal_dashes.txt +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/augmented_matrix.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/augmented_matrix.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/basic_array.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/basic_array.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/strip_excess_whitespace_in_array_attributes.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/strip_excess_whitespace_in_array_attributes.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/block.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/block.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/comments.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/comments.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/filter.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/filter.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/inline.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/inline.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/strict_filter.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/strict_filter.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_filter.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_filter.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_rendering.html +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_rendering.txt +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/broken_up_inline_env.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/broken_up_inline_env.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/some_crazy_alignment.html +24 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/some_crazy_alignment.txt +24 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/align.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/align.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/alignat-1a.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/alignat-1a.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/aligned_ex_spacing.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/aligned_ex_spacing.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/basic_array.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/basic_array.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/brackets.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_filter.html +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_filter.txt +27 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_text_filter.html +27 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_text_filter.txt +27 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/double_dollar.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping.txt +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping_with_brackets.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping_with_dollars.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping_with_parens.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed_env.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed_env.txt +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/parens.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/single_dollar.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/single_equation.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/single_equation.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_lines.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_lines.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_lines.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_lines.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_ex_spacing.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_ex_spacing.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/spaces_after_rowsep.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/spaces_after_rowsep.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/max_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/max_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/min_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/min_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/prod_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/prod_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/maliciousness/excess_parsing.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/maliciousness/just_enough_parsing.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/maliciousness/just_enough_parsing.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_equations.html +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_equations.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_notag_nonumber.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_notag_nonumber.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_equation.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_equation.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_nonumber.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_nonumber.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_notag.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_notag.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_label.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_label.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_tag.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_tag.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/performance/big_file.html +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/performance/big_file.txt +1755 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/gt.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/gt.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/lt.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/lt.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textgreater.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textgreater.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textless.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textless.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/functions.c +55 -0
- data/ext/mathematical/mtex2MML/tests/generate.py +244 -0
- data/ext/mathematical/mtex2MML/tests/helpers.c +29 -0
- data/ext/mathematical/mtex2MML/tests/helpers.h +8 -0
- data/ext/mathematical/mtex2MML/tests/main.c +35 -0
- data/ext/mathematical/mtex2MML/tests/maliciousness.c +107 -0
- data/ext/mathematical/mtex2MML/tests/mathjax.c +2040 -0
- data/ext/mathematical/mtex2MML/tests/mathjax_generate.py +72 -0
- data/ext/mathematical/mtex2MML/tests/numbered_equations.c +92 -0
- data/ext/mathematical/mtex2MML/tests/performance.c +39 -0
- data/ext/mathematical/mtex2MML/tests/symbols.c +69 -0
- data/lib/mathematical/version.rb +1 -1
- data/mathematical.gemspec +1 -1
- metadata +1191 -6
@@ -0,0 +1,1074 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2016, Troy D. Hanson http://troydhanson.github.com/uthash/
|
3
|
+
All rights reserved.
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
* Redistributions of source code must retain the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
10
|
+
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
12
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
13
|
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
14
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
15
|
+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
16
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
17
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
18
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
19
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
20
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
21
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef UTHASH_H
|
25
|
+
#define UTHASH_H
|
26
|
+
|
27
|
+
#define UTHASH_VERSION 2.0.1
|
28
|
+
|
29
|
+
#include <string.h> /* memcmp,strlen */
|
30
|
+
#include <stddef.h> /* ptrdiff_t */
|
31
|
+
#include <stdlib.h> /* exit() */
|
32
|
+
|
33
|
+
/* These macros use decltype or the earlier __typeof GNU extension.
|
34
|
+
As decltype is only available in newer compilers (VS2010 or gcc 4.3+
|
35
|
+
when compiling c++ source) this code uses whatever method is needed
|
36
|
+
or, for VS2008 where neither is available, uses casting workarounds. */
|
37
|
+
#if defined(_MSC_VER) /* MS compiler */
|
38
|
+
#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */
|
39
|
+
#define DECLTYPE(x) (decltype(x))
|
40
|
+
#else /* VS2008 or older (or VS2010 in C mode) */
|
41
|
+
#define NO_DECLTYPE
|
42
|
+
#define DECLTYPE(x)
|
43
|
+
#endif
|
44
|
+
#elif defined(__BORLANDC__) || defined(__LCC__) || defined(__WATCOMC__)
|
45
|
+
#define NO_DECLTYPE
|
46
|
+
#define DECLTYPE(x)
|
47
|
+
#else /* GNU, Sun and other compilers */
|
48
|
+
#define DECLTYPE(x) (__typeof(x))
|
49
|
+
#endif
|
50
|
+
|
51
|
+
#ifdef NO_DECLTYPE
|
52
|
+
#define DECLTYPE_ASSIGN(dst,src) \
|
53
|
+
do { \
|
54
|
+
char **_da_dst = (char**)(&(dst)); \
|
55
|
+
*_da_dst = (char*)(src); \
|
56
|
+
} while (0)
|
57
|
+
#else
|
58
|
+
#define DECLTYPE_ASSIGN(dst,src) \
|
59
|
+
do { \
|
60
|
+
(dst) = DECLTYPE(dst)(src); \
|
61
|
+
} while (0)
|
62
|
+
#endif
|
63
|
+
|
64
|
+
/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */
|
65
|
+
#if defined(_WIN32)
|
66
|
+
#if defined(_MSC_VER) && _MSC_VER >= 1600
|
67
|
+
#include <stdint.h>
|
68
|
+
#elif defined(__WATCOMC__) || defined(__MINGW32__) || defined(__CYGWIN__)
|
69
|
+
#include <stdint.h>
|
70
|
+
#else
|
71
|
+
typedef unsigned int uint32_t;
|
72
|
+
typedef unsigned char uint8_t;
|
73
|
+
#endif
|
74
|
+
#elif defined(__GNUC__) && !defined(__VXWORKS__)
|
75
|
+
#include <stdint.h>
|
76
|
+
#else
|
77
|
+
typedef unsigned int uint32_t;
|
78
|
+
typedef unsigned char uint8_t;
|
79
|
+
#endif
|
80
|
+
|
81
|
+
#ifndef uthash_fatal
|
82
|
+
#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */
|
83
|
+
#endif
|
84
|
+
#ifndef uthash_malloc
|
85
|
+
#define uthash_malloc(sz) malloc(sz) /* malloc fcn */
|
86
|
+
#endif
|
87
|
+
#ifndef uthash_free
|
88
|
+
#define uthash_free(ptr,sz) free(ptr) /* free fcn */
|
89
|
+
#endif
|
90
|
+
#ifndef uthash_strlen
|
91
|
+
#define uthash_strlen(s) strlen(s)
|
92
|
+
#endif
|
93
|
+
#ifndef uthash_memcmp
|
94
|
+
#define uthash_memcmp(a,b,n) memcmp(a,b,n)
|
95
|
+
#endif
|
96
|
+
|
97
|
+
#ifndef uthash_noexpand_fyi
|
98
|
+
#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */
|
99
|
+
#endif
|
100
|
+
#ifndef uthash_expand_fyi
|
101
|
+
#define uthash_expand_fyi(tbl) /* can be defined to log expands */
|
102
|
+
#endif
|
103
|
+
|
104
|
+
/* initial number of buckets */
|
105
|
+
#define HASH_INITIAL_NUM_BUCKETS 32U /* initial number of buckets */
|
106
|
+
#define HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */
|
107
|
+
#define HASH_BKT_CAPACITY_THRESH 10U /* expand when bucket count reaches */
|
108
|
+
|
109
|
+
/* calculate the element whose hash handle address is hhp */
|
110
|
+
#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
|
111
|
+
/* calculate the hash handle from element address elp */
|
112
|
+
#define HH_FROM_ELMT(tbl,elp) ((UT_hash_handle *)(((char*)(elp)) + ((tbl)->hho)))
|
113
|
+
|
114
|
+
#define HASH_VALUE(keyptr,keylen,hashv) \
|
115
|
+
do { \
|
116
|
+
HASH_FCN(keyptr, keylen, hashv); \
|
117
|
+
} while (0)
|
118
|
+
|
119
|
+
#define HASH_FIND_BYHASHVALUE(hh,head,keyptr,keylen,hashval,out) \
|
120
|
+
do { \
|
121
|
+
(out) = NULL; \
|
122
|
+
if (head) { \
|
123
|
+
unsigned _hf_bkt; \
|
124
|
+
HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _hf_bkt); \
|
125
|
+
if (HASH_BLOOM_TEST((head)->hh.tbl, hashval) != 0) { \
|
126
|
+
HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \
|
127
|
+
} \
|
128
|
+
} \
|
129
|
+
} while (0)
|
130
|
+
|
131
|
+
#define HASH_FIND(hh,head,keyptr,keylen,out) \
|
132
|
+
do { \
|
133
|
+
unsigned _hf_hashv; \
|
134
|
+
HASH_VALUE(keyptr, keylen, _hf_hashv); \
|
135
|
+
HASH_FIND_BYHASHVALUE(hh, head, keyptr, keylen, _hf_hashv, out); \
|
136
|
+
} while (0)
|
137
|
+
|
138
|
+
#ifdef HASH_BLOOM
|
139
|
+
#define HASH_BLOOM_BITLEN (1UL << HASH_BLOOM)
|
140
|
+
#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8UL) + (((HASH_BLOOM_BITLEN%8UL)!=0UL) ? 1UL : 0UL)
|
141
|
+
#define HASH_BLOOM_MAKE(tbl) \
|
142
|
+
do { \
|
143
|
+
(tbl)->bloom_nbits = HASH_BLOOM; \
|
144
|
+
(tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \
|
145
|
+
if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \
|
146
|
+
memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \
|
147
|
+
(tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \
|
148
|
+
} while (0)
|
149
|
+
|
150
|
+
#define HASH_BLOOM_FREE(tbl) \
|
151
|
+
do { \
|
152
|
+
uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \
|
153
|
+
} while (0)
|
154
|
+
|
155
|
+
#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8U] |= (1U << ((idx)%8U)))
|
156
|
+
#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8U] & (1U << ((idx)%8U)))
|
157
|
+
|
158
|
+
#define HASH_BLOOM_ADD(tbl,hashv) \
|
159
|
+
HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1U)))
|
160
|
+
|
161
|
+
#define HASH_BLOOM_TEST(tbl,hashv) \
|
162
|
+
HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1U)))
|
163
|
+
|
164
|
+
#else
|
165
|
+
#define HASH_BLOOM_MAKE(tbl)
|
166
|
+
#define HASH_BLOOM_FREE(tbl)
|
167
|
+
#define HASH_BLOOM_ADD(tbl,hashv)
|
168
|
+
#define HASH_BLOOM_TEST(tbl,hashv) (1)
|
169
|
+
#define HASH_BLOOM_BYTELEN 0U
|
170
|
+
#endif
|
171
|
+
|
172
|
+
#define HASH_MAKE_TABLE(hh,head) \
|
173
|
+
do { \
|
174
|
+
(head)->hh.tbl = (UT_hash_table*)uthash_malloc( \
|
175
|
+
sizeof(UT_hash_table)); \
|
176
|
+
if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \
|
177
|
+
memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \
|
178
|
+
(head)->hh.tbl->tail = &((head)->hh); \
|
179
|
+
(head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \
|
180
|
+
(head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \
|
181
|
+
(head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \
|
182
|
+
(head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
|
183
|
+
HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \
|
184
|
+
if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \
|
185
|
+
memset((head)->hh.tbl->buckets, 0, \
|
186
|
+
HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \
|
187
|
+
HASH_BLOOM_MAKE((head)->hh.tbl); \
|
188
|
+
(head)->hh.tbl->signature = HASH_SIGNATURE; \
|
189
|
+
} while (0)
|
190
|
+
|
191
|
+
#define HASH_REPLACE_BYHASHVALUE_INORDER(hh,head,fieldname,keylen_in,hashval,add,replaced,cmpfcn) \
|
192
|
+
do { \
|
193
|
+
(replaced) = NULL; \
|
194
|
+
HASH_FIND_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, replaced); \
|
195
|
+
if (replaced) { \
|
196
|
+
HASH_DELETE(hh, head, replaced); \
|
197
|
+
} \
|
198
|
+
HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh, head, &((add)->fieldname), keylen_in, hashval, add, cmpfcn); \
|
199
|
+
} while (0)
|
200
|
+
|
201
|
+
#define HASH_REPLACE_BYHASHVALUE(hh,head,fieldname,keylen_in,hashval,add,replaced) \
|
202
|
+
do { \
|
203
|
+
(replaced) = NULL; \
|
204
|
+
HASH_FIND_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, replaced); \
|
205
|
+
if (replaced) { \
|
206
|
+
HASH_DELETE(hh, head, replaced); \
|
207
|
+
} \
|
208
|
+
HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, add); \
|
209
|
+
} while (0)
|
210
|
+
|
211
|
+
#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \
|
212
|
+
do { \
|
213
|
+
unsigned _hr_hashv; \
|
214
|
+
HASH_VALUE(&((add)->fieldname), keylen_in, _hr_hashv); \
|
215
|
+
HASH_REPLACE_BYHASHVALUE(hh, head, fieldname, keylen_in, _hr_hashv, add, replaced); \
|
216
|
+
} while (0)
|
217
|
+
|
218
|
+
#define HASH_REPLACE_INORDER(hh,head,fieldname,keylen_in,add,replaced,cmpfcn) \
|
219
|
+
do { \
|
220
|
+
unsigned _hr_hashv; \
|
221
|
+
HASH_VALUE(&((add)->fieldname), keylen_in, _hr_hashv); \
|
222
|
+
HASH_REPLACE_BYHASHVALUE_INORDER(hh, head, fieldname, keylen_in, _hr_hashv, add, replaced, cmpfcn); \
|
223
|
+
} while (0)
|
224
|
+
|
225
|
+
#define HASH_APPEND_LIST(hh, head, add) \
|
226
|
+
do { \
|
227
|
+
(add)->hh.next = NULL; \
|
228
|
+
(add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \
|
229
|
+
(head)->hh.tbl->tail->next = (add); \
|
230
|
+
(head)->hh.tbl->tail = &((add)->hh); \
|
231
|
+
} while (0)
|
232
|
+
|
233
|
+
#define HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh,head,keyptr,keylen_in,hashval,add,cmpfcn) \
|
234
|
+
do { \
|
235
|
+
unsigned _ha_bkt; \
|
236
|
+
(add)->hh.hashv = (hashval); \
|
237
|
+
(add)->hh.key = (char*) (keyptr); \
|
238
|
+
(add)->hh.keylen = (unsigned) (keylen_in); \
|
239
|
+
if (!(head)) { \
|
240
|
+
(add)->hh.next = NULL; \
|
241
|
+
(add)->hh.prev = NULL; \
|
242
|
+
(head) = (add); \
|
243
|
+
HASH_MAKE_TABLE(hh, head); \
|
244
|
+
} else { \
|
245
|
+
struct UT_hash_handle *_hs_iter = &(head)->hh; \
|
246
|
+
(add)->hh.tbl = (head)->hh.tbl; \
|
247
|
+
do { \
|
248
|
+
if (cmpfcn(DECLTYPE(head) ELMT_FROM_HH((head)->hh.tbl, _hs_iter), add) > 0) \
|
249
|
+
break; \
|
250
|
+
} while ((_hs_iter = _hs_iter->next)); \
|
251
|
+
if (_hs_iter) { \
|
252
|
+
(add)->hh.next = _hs_iter; \
|
253
|
+
if (((add)->hh.prev = _hs_iter->prev)) { \
|
254
|
+
HH_FROM_ELMT((head)->hh.tbl, _hs_iter->prev)->next = (add); \
|
255
|
+
} else { \
|
256
|
+
(head) = (add); \
|
257
|
+
} \
|
258
|
+
_hs_iter->prev = (add); \
|
259
|
+
} else { \
|
260
|
+
HASH_APPEND_LIST(hh, head, add); \
|
261
|
+
} \
|
262
|
+
} \
|
263
|
+
(head)->hh.tbl->num_items++; \
|
264
|
+
HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _ha_bkt); \
|
265
|
+
HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], &(add)->hh); \
|
266
|
+
HASH_BLOOM_ADD((head)->hh.tbl, hashval); \
|
267
|
+
HASH_EMIT_KEY(hh, head, keyptr, keylen_in); \
|
268
|
+
HASH_FSCK(hh, head); \
|
269
|
+
} while (0)
|
270
|
+
|
271
|
+
#define HASH_ADD_KEYPTR_INORDER(hh,head,keyptr,keylen_in,add,cmpfcn) \
|
272
|
+
do { \
|
273
|
+
unsigned _hs_hashv; \
|
274
|
+
HASH_VALUE(keyptr, keylen_in, _hs_hashv); \
|
275
|
+
HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh, head, keyptr, keylen_in, _hs_hashv, add, cmpfcn); \
|
276
|
+
} while (0)
|
277
|
+
|
278
|
+
#define HASH_ADD_BYHASHVALUE_INORDER(hh,head,fieldname,keylen_in,hashval,add,cmpfcn) \
|
279
|
+
HASH_ADD_KEYPTR_BYHASHVALUE_INORDER(hh, head, &((add)->fieldname), keylen_in, hashval, add, cmpfcn)
|
280
|
+
|
281
|
+
#define HASH_ADD_INORDER(hh,head,fieldname,keylen_in,add,cmpfcn) \
|
282
|
+
HASH_ADD_KEYPTR_INORDER(hh, head, &((add)->fieldname), keylen_in, add, cmpfcn)
|
283
|
+
|
284
|
+
#define HASH_ADD_KEYPTR_BYHASHVALUE(hh,head,keyptr,keylen_in,hashval,add) \
|
285
|
+
do { \
|
286
|
+
unsigned _ha_bkt; \
|
287
|
+
(add)->hh.hashv = (hashval); \
|
288
|
+
(add)->hh.key = (char*) (keyptr); \
|
289
|
+
(add)->hh.keylen = (unsigned) (keylen_in); \
|
290
|
+
if (!(head)) { \
|
291
|
+
(add)->hh.next = NULL; \
|
292
|
+
(add)->hh.prev = NULL; \
|
293
|
+
(head) = (add); \
|
294
|
+
HASH_MAKE_TABLE(hh, head); \
|
295
|
+
} else { \
|
296
|
+
(add)->hh.tbl = (head)->hh.tbl; \
|
297
|
+
HASH_APPEND_LIST(hh, head, add); \
|
298
|
+
} \
|
299
|
+
(head)->hh.tbl->num_items++; \
|
300
|
+
HASH_TO_BKT(hashval, (head)->hh.tbl->num_buckets, _ha_bkt); \
|
301
|
+
HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], &(add)->hh); \
|
302
|
+
HASH_BLOOM_ADD((head)->hh.tbl, hashval); \
|
303
|
+
HASH_EMIT_KEY(hh, head, keyptr, keylen_in); \
|
304
|
+
HASH_FSCK(hh, head); \
|
305
|
+
} while (0)
|
306
|
+
|
307
|
+
#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \
|
308
|
+
do { \
|
309
|
+
unsigned _ha_hashv; \
|
310
|
+
HASH_VALUE(keyptr, keylen_in, _ha_hashv); \
|
311
|
+
HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, keyptr, keylen_in, _ha_hashv, add); \
|
312
|
+
} while (0)
|
313
|
+
|
314
|
+
#define HASH_ADD_BYHASHVALUE(hh,head,fieldname,keylen_in,hashval,add) \
|
315
|
+
HASH_ADD_KEYPTR_BYHASHVALUE(hh, head, &((add)->fieldname), keylen_in, hashval, add)
|
316
|
+
|
317
|
+
#define HASH_ADD(hh,head,fieldname,keylen_in,add) \
|
318
|
+
HASH_ADD_KEYPTR(hh, head, &((add)->fieldname), keylen_in, add)
|
319
|
+
|
320
|
+
#define HASH_TO_BKT(hashv,num_bkts,bkt) \
|
321
|
+
do { \
|
322
|
+
bkt = ((hashv) & ((num_bkts) - 1U)); \
|
323
|
+
} while (0)
|
324
|
+
|
325
|
+
/* delete "delptr" from the hash table.
|
326
|
+
* "the usual" patch-up process for the app-order doubly-linked-list.
|
327
|
+
* The use of _hd_hh_del below deserves special explanation.
|
328
|
+
* These used to be expressed using (delptr) but that led to a bug
|
329
|
+
* if someone used the same symbol for the head and deletee, like
|
330
|
+
* HASH_DELETE(hh,users,users);
|
331
|
+
* We want that to work, but by changing the head (users) below
|
332
|
+
* we were forfeiting our ability to further refer to the deletee (users)
|
333
|
+
* in the patch-up process. Solution: use scratch space to
|
334
|
+
* copy the deletee pointer, then the latter references are via that
|
335
|
+
* scratch pointer rather than through the repointed (users) symbol.
|
336
|
+
*/
|
337
|
+
#define HASH_DELETE(hh,head,delptr) \
|
338
|
+
do { \
|
339
|
+
struct UT_hash_handle *_hd_hh_del; \
|
340
|
+
if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \
|
341
|
+
uthash_free((head)->hh.tbl->buckets, \
|
342
|
+
(head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
|
343
|
+
HASH_BLOOM_FREE((head)->hh.tbl); \
|
344
|
+
uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \
|
345
|
+
head = NULL; \
|
346
|
+
} else { \
|
347
|
+
unsigned _hd_bkt; \
|
348
|
+
_hd_hh_del = &((delptr)->hh); \
|
349
|
+
if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \
|
350
|
+
(head)->hh.tbl->tail = \
|
351
|
+
(UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \
|
352
|
+
(head)->hh.tbl->hho); \
|
353
|
+
} \
|
354
|
+
if ((delptr)->hh.prev != NULL) { \
|
355
|
+
((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \
|
356
|
+
(head)->hh.tbl->hho))->next = (delptr)->hh.next; \
|
357
|
+
} else { \
|
358
|
+
DECLTYPE_ASSIGN(head,(delptr)->hh.next); \
|
359
|
+
} \
|
360
|
+
if (_hd_hh_del->next != NULL) { \
|
361
|
+
((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \
|
362
|
+
(head)->hh.tbl->hho))->prev = \
|
363
|
+
_hd_hh_del->prev; \
|
364
|
+
} \
|
365
|
+
HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \
|
366
|
+
HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
|
367
|
+
(head)->hh.tbl->num_items--; \
|
368
|
+
} \
|
369
|
+
HASH_FSCK(hh,head); \
|
370
|
+
} while (0)
|
371
|
+
|
372
|
+
|
373
|
+
/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
|
374
|
+
#define HASH_FIND_STR(head,findstr,out) \
|
375
|
+
HASH_FIND(hh,head,findstr,(unsigned)uthash_strlen(findstr),out)
|
376
|
+
#define HASH_ADD_STR(head,strfield,add) \
|
377
|
+
HASH_ADD(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add)
|
378
|
+
#define HASH_REPLACE_STR(head,strfield,add,replaced) \
|
379
|
+
HASH_REPLACE(hh,head,strfield[0],(unsigned)uthash_strlen(add->strfield),add,replaced)
|
380
|
+
#define HASH_FIND_INT(head,findint,out) \
|
381
|
+
HASH_FIND(hh,head,findint,sizeof(int),out)
|
382
|
+
#define HASH_ADD_INT(head,intfield,add) \
|
383
|
+
HASH_ADD(hh,head,intfield,sizeof(int),add)
|
384
|
+
#define HASH_REPLACE_INT(head,intfield,add,replaced) \
|
385
|
+
HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced)
|
386
|
+
#define HASH_FIND_PTR(head,findptr,out) \
|
387
|
+
HASH_FIND(hh,head,findptr,sizeof(void *),out)
|
388
|
+
#define HASH_ADD_PTR(head,ptrfield,add) \
|
389
|
+
HASH_ADD(hh,head,ptrfield,sizeof(void *),add)
|
390
|
+
#define HASH_REPLACE_PTR(head,ptrfield,add,replaced) \
|
391
|
+
HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced)
|
392
|
+
#define HASH_DEL(head,delptr) \
|
393
|
+
HASH_DELETE(hh,head,delptr)
|
394
|
+
|
395
|
+
/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined.
|
396
|
+
* This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined.
|
397
|
+
*/
|
398
|
+
#ifdef HASH_DEBUG
|
399
|
+
#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
|
400
|
+
#define HASH_FSCK(hh,head) \
|
401
|
+
do { \
|
402
|
+
struct UT_hash_handle *_thh; \
|
403
|
+
if (head) { \
|
404
|
+
unsigned _bkt_i; \
|
405
|
+
unsigned _count; \
|
406
|
+
char *_prev; \
|
407
|
+
_count = 0; \
|
408
|
+
for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \
|
409
|
+
unsigned _bkt_count = 0; \
|
410
|
+
_thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
|
411
|
+
_prev = NULL; \
|
412
|
+
while (_thh) { \
|
413
|
+
if (_prev != (char*)(_thh->hh_prev)) { \
|
414
|
+
HASH_OOPS("invalid hh_prev %p, actual %p\n", \
|
415
|
+
_thh->hh_prev, _prev ); \
|
416
|
+
} \
|
417
|
+
_bkt_count++; \
|
418
|
+
_prev = (char*)(_thh); \
|
419
|
+
_thh = _thh->hh_next; \
|
420
|
+
} \
|
421
|
+
_count += _bkt_count; \
|
422
|
+
if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
|
423
|
+
HASH_OOPS("invalid bucket count %u, actual %u\n", \
|
424
|
+
(head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
|
425
|
+
} \
|
426
|
+
} \
|
427
|
+
if (_count != (head)->hh.tbl->num_items) { \
|
428
|
+
HASH_OOPS("invalid hh item count %u, actual %u\n", \
|
429
|
+
(head)->hh.tbl->num_items, _count ); \
|
430
|
+
} \
|
431
|
+
/* traverse hh in app order; check next/prev integrity, count */ \
|
432
|
+
_count = 0; \
|
433
|
+
_prev = NULL; \
|
434
|
+
_thh = &(head)->hh; \
|
435
|
+
while (_thh) { \
|
436
|
+
_count++; \
|
437
|
+
if (_prev !=(char*)(_thh->prev)) { \
|
438
|
+
HASH_OOPS("invalid prev %p, actual %p\n", \
|
439
|
+
_thh->prev, _prev ); \
|
440
|
+
} \
|
441
|
+
_prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \
|
442
|
+
_thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \
|
443
|
+
(head)->hh.tbl->hho) : NULL ); \
|
444
|
+
} \
|
445
|
+
if (_count != (head)->hh.tbl->num_items) { \
|
446
|
+
HASH_OOPS("invalid app item count %u, actual %u\n", \
|
447
|
+
(head)->hh.tbl->num_items, _count ); \
|
448
|
+
} \
|
449
|
+
} \
|
450
|
+
} while (0)
|
451
|
+
#else
|
452
|
+
#define HASH_FSCK(hh,head)
|
453
|
+
#endif
|
454
|
+
|
455
|
+
/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to
|
456
|
+
* the descriptor to which this macro is defined for tuning the hash function.
|
457
|
+
* The app can #include <unistd.h> to get the prototype for write(2). */
|
458
|
+
#ifdef HASH_EMIT_KEYS
|
459
|
+
#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \
|
460
|
+
do { \
|
461
|
+
unsigned _klen = fieldlen; \
|
462
|
+
write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \
|
463
|
+
write(HASH_EMIT_KEYS, keyptr, (unsigned long)fieldlen); \
|
464
|
+
} while (0)
|
465
|
+
#else
|
466
|
+
#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)
|
467
|
+
#endif
|
468
|
+
|
469
|
+
/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */
|
470
|
+
#ifdef HASH_FUNCTION
|
471
|
+
#define HASH_FCN HASH_FUNCTION
|
472
|
+
#else
|
473
|
+
#define HASH_FCN HASH_JEN
|
474
|
+
#endif
|
475
|
+
|
476
|
+
/* The Bernstein hash function, used in Perl prior to v5.6. Note (x<<5+x)=x*33. */
|
477
|
+
#define HASH_BER(key,keylen,hashv) \
|
478
|
+
do { \
|
479
|
+
unsigned _hb_keylen=(unsigned)keylen; \
|
480
|
+
const unsigned char *_hb_key=(const unsigned char*)(key); \
|
481
|
+
(hashv) = 0; \
|
482
|
+
while (_hb_keylen-- != 0U) { \
|
483
|
+
(hashv) = (((hashv) << 5) + (hashv)) + *_hb_key++; \
|
484
|
+
} \
|
485
|
+
} while (0)
|
486
|
+
|
487
|
+
|
488
|
+
/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
|
489
|
+
* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
|
490
|
+
#define HASH_SAX(key,keylen,hashv) \
|
491
|
+
do { \
|
492
|
+
unsigned _sx_i; \
|
493
|
+
const unsigned char *_hs_key=(const unsigned char*)(key); \
|
494
|
+
hashv = 0; \
|
495
|
+
for(_sx_i=0; _sx_i < keylen; _sx_i++) { \
|
496
|
+
hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \
|
497
|
+
} \
|
498
|
+
} while (0)
|
499
|
+
/* FNV-1a variation */
|
500
|
+
#define HASH_FNV(key,keylen,hashv) \
|
501
|
+
do { \
|
502
|
+
unsigned _fn_i; \
|
503
|
+
const unsigned char *_hf_key=(const unsigned char*)(key); \
|
504
|
+
hashv = 2166136261U; \
|
505
|
+
for(_fn_i=0; _fn_i < keylen; _fn_i++) { \
|
506
|
+
hashv = hashv ^ _hf_key[_fn_i]; \
|
507
|
+
hashv = hashv * 16777619U; \
|
508
|
+
} \
|
509
|
+
} while (0)
|
510
|
+
|
511
|
+
#define HASH_OAT(key,keylen,hashv) \
|
512
|
+
do { \
|
513
|
+
unsigned _ho_i; \
|
514
|
+
const unsigned char *_ho_key=(const unsigned char*)(key); \
|
515
|
+
hashv = 0; \
|
516
|
+
for(_ho_i=0; _ho_i < keylen; _ho_i++) { \
|
517
|
+
hashv += _ho_key[_ho_i]; \
|
518
|
+
hashv += (hashv << 10); \
|
519
|
+
hashv ^= (hashv >> 6); \
|
520
|
+
} \
|
521
|
+
hashv += (hashv << 3); \
|
522
|
+
hashv ^= (hashv >> 11); \
|
523
|
+
hashv += (hashv << 15); \
|
524
|
+
} while (0)
|
525
|
+
|
526
|
+
#define HASH_JEN_MIX(a,b,c) \
|
527
|
+
do { \
|
528
|
+
a -= b; a -= c; a ^= ( c >> 13 ); \
|
529
|
+
b -= c; b -= a; b ^= ( a << 8 ); \
|
530
|
+
c -= a; c -= b; c ^= ( b >> 13 ); \
|
531
|
+
a -= b; a -= c; a ^= ( c >> 12 ); \
|
532
|
+
b -= c; b -= a; b ^= ( a << 16 ); \
|
533
|
+
c -= a; c -= b; c ^= ( b >> 5 ); \
|
534
|
+
a -= b; a -= c; a ^= ( c >> 3 ); \
|
535
|
+
b -= c; b -= a; b ^= ( a << 10 ); \
|
536
|
+
c -= a; c -= b; c ^= ( b >> 15 ); \
|
537
|
+
} while (0)
|
538
|
+
|
539
|
+
#define HASH_JEN(key,keylen,hashv) \
|
540
|
+
do { \
|
541
|
+
unsigned _hj_i,_hj_j,_hj_k; \
|
542
|
+
unsigned const char *_hj_key=(unsigned const char*)(key); \
|
543
|
+
hashv = 0xfeedbeefu; \
|
544
|
+
_hj_i = _hj_j = 0x9e3779b9u; \
|
545
|
+
_hj_k = (unsigned)(keylen); \
|
546
|
+
while (_hj_k >= 12U) { \
|
547
|
+
_hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \
|
548
|
+
+ ( (unsigned)_hj_key[2] << 16 ) \
|
549
|
+
+ ( (unsigned)_hj_key[3] << 24 ) ); \
|
550
|
+
_hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \
|
551
|
+
+ ( (unsigned)_hj_key[6] << 16 ) \
|
552
|
+
+ ( (unsigned)_hj_key[7] << 24 ) ); \
|
553
|
+
hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \
|
554
|
+
+ ( (unsigned)_hj_key[10] << 16 ) \
|
555
|
+
+ ( (unsigned)_hj_key[11] << 24 ) ); \
|
556
|
+
\
|
557
|
+
HASH_JEN_MIX(_hj_i, _hj_j, hashv); \
|
558
|
+
\
|
559
|
+
_hj_key += 12; \
|
560
|
+
_hj_k -= 12U; \
|
561
|
+
} \
|
562
|
+
hashv += (unsigned)(keylen); \
|
563
|
+
switch ( _hj_k ) { \
|
564
|
+
case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */ \
|
565
|
+
case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); /* FALLTHROUGH */ \
|
566
|
+
case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); /* FALLTHROUGH */ \
|
567
|
+
case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); /* FALLTHROUGH */ \
|
568
|
+
case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); /* FALLTHROUGH */ \
|
569
|
+
case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); /* FALLTHROUGH */ \
|
570
|
+
case 5: _hj_j += _hj_key[4]; /* FALLTHROUGH */ \
|
571
|
+
case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); /* FALLTHROUGH */ \
|
572
|
+
case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); /* FALLTHROUGH */ \
|
573
|
+
case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); /* FALLTHROUGH */ \
|
574
|
+
case 1: _hj_i += _hj_key[0]; \
|
575
|
+
} \
|
576
|
+
HASH_JEN_MIX(_hj_i, _hj_j, hashv); \
|
577
|
+
} while (0)
|
578
|
+
|
579
|
+
/* The Paul Hsieh hash function */
|
580
|
+
#undef get16bits
|
581
|
+
#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
|
582
|
+
|| defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
|
583
|
+
#define get16bits(d) (*((const uint16_t *) (d)))
|
584
|
+
#endif
|
585
|
+
|
586
|
+
#if !defined (get16bits)
|
587
|
+
#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \
|
588
|
+
+(uint32_t)(((const uint8_t *)(d))[0]) )
|
589
|
+
#endif
|
590
|
+
#define HASH_SFH(key,keylen,hashv) \
|
591
|
+
do { \
|
592
|
+
unsigned const char *_sfh_key=(unsigned const char*)(key); \
|
593
|
+
uint32_t _sfh_tmp, _sfh_len = (uint32_t)keylen; \
|
594
|
+
\
|
595
|
+
unsigned _sfh_rem = _sfh_len & 3U; \
|
596
|
+
_sfh_len >>= 2; \
|
597
|
+
hashv = 0xcafebabeu; \
|
598
|
+
\
|
599
|
+
/* Main loop */ \
|
600
|
+
for (;_sfh_len > 0U; _sfh_len--) { \
|
601
|
+
hashv += get16bits (_sfh_key); \
|
602
|
+
_sfh_tmp = ((uint32_t)(get16bits (_sfh_key+2)) << 11) ^ hashv; \
|
603
|
+
hashv = (hashv << 16) ^ _sfh_tmp; \
|
604
|
+
_sfh_key += 2U*sizeof (uint16_t); \
|
605
|
+
hashv += hashv >> 11; \
|
606
|
+
} \
|
607
|
+
\
|
608
|
+
/* Handle end cases */ \
|
609
|
+
switch (_sfh_rem) { \
|
610
|
+
case 3: hashv += get16bits (_sfh_key); \
|
611
|
+
hashv ^= hashv << 16; \
|
612
|
+
hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)]) << 18; \
|
613
|
+
hashv += hashv >> 11; \
|
614
|
+
break; \
|
615
|
+
case 2: hashv += get16bits (_sfh_key); \
|
616
|
+
hashv ^= hashv << 11; \
|
617
|
+
hashv += hashv >> 17; \
|
618
|
+
break; \
|
619
|
+
case 1: hashv += *_sfh_key; \
|
620
|
+
hashv ^= hashv << 10; \
|
621
|
+
hashv += hashv >> 1; \
|
622
|
+
} \
|
623
|
+
\
|
624
|
+
/* Force "avalanching" of final 127 bits */ \
|
625
|
+
hashv ^= hashv << 3; \
|
626
|
+
hashv += hashv >> 5; \
|
627
|
+
hashv ^= hashv << 4; \
|
628
|
+
hashv += hashv >> 17; \
|
629
|
+
hashv ^= hashv << 25; \
|
630
|
+
hashv += hashv >> 6; \
|
631
|
+
} while (0)
|
632
|
+
|
633
|
+
#ifdef HASH_USING_NO_STRICT_ALIASING
|
634
|
+
/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads.
|
635
|
+
* For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error.
|
636
|
+
* MurmurHash uses the faster approach only on CPU's where we know it's safe.
|
637
|
+
*
|
638
|
+
* Note the preprocessor built-in defines can be emitted using:
|
639
|
+
*
|
640
|
+
* gcc -m64 -dM -E - < /dev/null (on gcc)
|
641
|
+
* cc -## a.c (where a.c is a simple test file) (Sun Studio)
|
642
|
+
*/
|
643
|
+
#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86))
|
644
|
+
#define MUR_GETBLOCK(p,i) p[i]
|
645
|
+
#else /* non intel */
|
646
|
+
#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 3UL) == 0UL)
|
647
|
+
#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 3UL) == 1UL)
|
648
|
+
#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 3UL) == 2UL)
|
649
|
+
#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 3UL) == 3UL)
|
650
|
+
#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL))
|
651
|
+
#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__))
|
652
|
+
#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24))
|
653
|
+
#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16))
|
654
|
+
#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8))
|
655
|
+
#else /* assume little endian non-intel */
|
656
|
+
#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24))
|
657
|
+
#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16))
|
658
|
+
#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8))
|
659
|
+
#endif
|
660
|
+
#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \
|
661
|
+
(MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \
|
662
|
+
(MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \
|
663
|
+
MUR_ONE_THREE(p))))
|
664
|
+
#endif
|
665
|
+
#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
|
666
|
+
#define MUR_FMIX(_h) \
|
667
|
+
do { \
|
668
|
+
_h ^= _h >> 16; \
|
669
|
+
_h *= 0x85ebca6bu; \
|
670
|
+
_h ^= _h >> 13; \
|
671
|
+
_h *= 0xc2b2ae35u; \
|
672
|
+
_h ^= _h >> 16; \
|
673
|
+
} while (0)
|
674
|
+
|
675
|
+
#define HASH_MUR(key,keylen,hashv) \
|
676
|
+
do { \
|
677
|
+
const uint8_t *_mur_data = (const uint8_t*)(key); \
|
678
|
+
const int _mur_nblocks = (int)(keylen) / 4; \
|
679
|
+
uint32_t _mur_h1 = 0xf88D5353u; \
|
680
|
+
uint32_t _mur_c1 = 0xcc9e2d51u; \
|
681
|
+
uint32_t _mur_c2 = 0x1b873593u; \
|
682
|
+
uint32_t _mur_k1 = 0; \
|
683
|
+
const uint8_t *_mur_tail; \
|
684
|
+
const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+(_mur_nblocks*4)); \
|
685
|
+
int _mur_i; \
|
686
|
+
for(_mur_i = -_mur_nblocks; _mur_i!=0; _mur_i++) { \
|
687
|
+
_mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \
|
688
|
+
_mur_k1 *= _mur_c1; \
|
689
|
+
_mur_k1 = MUR_ROTL32(_mur_k1,15); \
|
690
|
+
_mur_k1 *= _mur_c2; \
|
691
|
+
\
|
692
|
+
_mur_h1 ^= _mur_k1; \
|
693
|
+
_mur_h1 = MUR_ROTL32(_mur_h1,13); \
|
694
|
+
_mur_h1 = (_mur_h1*5U) + 0xe6546b64u; \
|
695
|
+
} \
|
696
|
+
_mur_tail = (const uint8_t*)(_mur_data + (_mur_nblocks*4)); \
|
697
|
+
_mur_k1=0; \
|
698
|
+
switch((keylen) & 3U) { \
|
699
|
+
case 3: _mur_k1 ^= (uint32_t)_mur_tail[2] << 16; /* FALLTHROUGH */ \
|
700
|
+
case 2: _mur_k1 ^= (uint32_t)_mur_tail[1] << 8; /* FALLTHROUGH */ \
|
701
|
+
case 1: _mur_k1 ^= (uint32_t)_mur_tail[0]; \
|
702
|
+
_mur_k1 *= _mur_c1; \
|
703
|
+
_mur_k1 = MUR_ROTL32(_mur_k1,15); \
|
704
|
+
_mur_k1 *= _mur_c2; \
|
705
|
+
_mur_h1 ^= _mur_k1; \
|
706
|
+
} \
|
707
|
+
_mur_h1 ^= (uint32_t)(keylen); \
|
708
|
+
MUR_FMIX(_mur_h1); \
|
709
|
+
hashv = _mur_h1; \
|
710
|
+
} while (0)
|
711
|
+
#endif /* HASH_USING_NO_STRICT_ALIASING */
|
712
|
+
|
713
|
+
/* iterate over items in a known bucket to find desired item */
|
714
|
+
#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,hashval,out) \
|
715
|
+
do { \
|
716
|
+
if ((head).hh_head != NULL) { \
|
717
|
+
DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (head).hh_head)); \
|
718
|
+
} else { \
|
719
|
+
(out) = NULL; \
|
720
|
+
} \
|
721
|
+
while ((out) != NULL) { \
|
722
|
+
if ((out)->hh.hashv == (hashval) && (out)->hh.keylen == (keylen_in)) { \
|
723
|
+
if (uthash_memcmp((out)->hh.key, keyptr, keylen_in) == 0) { \
|
724
|
+
break; \
|
725
|
+
} \
|
726
|
+
} \
|
727
|
+
if ((out)->hh.hh_next != NULL) { \
|
728
|
+
DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (out)->hh.hh_next)); \
|
729
|
+
} else { \
|
730
|
+
(out) = NULL; \
|
731
|
+
} \
|
732
|
+
} \
|
733
|
+
} while (0)
|
734
|
+
|
735
|
+
/* add an item to a bucket */
|
736
|
+
#define HASH_ADD_TO_BKT(head,addhh) \
|
737
|
+
do { \
|
738
|
+
head.count++; \
|
739
|
+
(addhh)->hh_next = head.hh_head; \
|
740
|
+
(addhh)->hh_prev = NULL; \
|
741
|
+
if (head.hh_head != NULL) { (head).hh_head->hh_prev = (addhh); } \
|
742
|
+
(head).hh_head=addhh; \
|
743
|
+
if ((head.count >= ((head.expand_mult+1U) * HASH_BKT_CAPACITY_THRESH)) \
|
744
|
+
&& ((addhh)->tbl->noexpand != 1U)) { \
|
745
|
+
HASH_EXPAND_BUCKETS((addhh)->tbl); \
|
746
|
+
} \
|
747
|
+
} while (0)
|
748
|
+
|
749
|
+
/* remove an item from a given bucket */
|
750
|
+
#define HASH_DEL_IN_BKT(hh,head,hh_del) \
|
751
|
+
(head).count--; \
|
752
|
+
if ((head).hh_head == hh_del) { \
|
753
|
+
(head).hh_head = hh_del->hh_next; \
|
754
|
+
} \
|
755
|
+
if (hh_del->hh_prev) { \
|
756
|
+
hh_del->hh_prev->hh_next = hh_del->hh_next; \
|
757
|
+
} \
|
758
|
+
if (hh_del->hh_next) { \
|
759
|
+
hh_del->hh_next->hh_prev = hh_del->hh_prev; \
|
760
|
+
}
|
761
|
+
|
762
|
+
/* Bucket expansion has the effect of doubling the number of buckets
|
763
|
+
* and redistributing the items into the new buckets. Ideally the
|
764
|
+
* items will distribute more or less evenly into the new buckets
|
765
|
+
* (the extent to which this is true is a measure of the quality of
|
766
|
+
* the hash function as it applies to the key domain).
|
767
|
+
*
|
768
|
+
* With the items distributed into more buckets, the chain length
|
769
|
+
* (item count) in each bucket is reduced. Thus by expanding buckets
|
770
|
+
* the hash keeps a bound on the chain length. This bounded chain
|
771
|
+
* length is the essence of how a hash provides constant time lookup.
|
772
|
+
*
|
773
|
+
* The calculation of tbl->ideal_chain_maxlen below deserves some
|
774
|
+
* explanation. First, keep in mind that we're calculating the ideal
|
775
|
+
* maximum chain length based on the *new* (doubled) bucket count.
|
776
|
+
* In fractions this is just n/b (n=number of items,b=new num buckets).
|
777
|
+
* Since the ideal chain length is an integer, we want to calculate
|
778
|
+
* ceil(n/b). We don't depend on floating point arithmetic in this
|
779
|
+
* hash, so to calculate ceil(n/b) with integers we could write
|
780
|
+
*
|
781
|
+
* ceil(n/b) = (n/b) + ((n%b)?1:0)
|
782
|
+
*
|
783
|
+
* and in fact a previous version of this hash did just that.
|
784
|
+
* But now we have improved things a bit by recognizing that b is
|
785
|
+
* always a power of two. We keep its base 2 log handy (call it lb),
|
786
|
+
* so now we can write this with a bit shift and logical AND:
|
787
|
+
*
|
788
|
+
* ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0)
|
789
|
+
*
|
790
|
+
*/
|
791
|
+
#define HASH_EXPAND_BUCKETS(tbl) \
|
792
|
+
do { \
|
793
|
+
unsigned _he_bkt; \
|
794
|
+
unsigned _he_bkt_i; \
|
795
|
+
struct UT_hash_handle *_he_thh, *_he_hh_nxt; \
|
796
|
+
UT_hash_bucket *_he_new_buckets, *_he_newbkt; \
|
797
|
+
_he_new_buckets = (UT_hash_bucket*)uthash_malloc( \
|
798
|
+
2UL * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \
|
799
|
+
if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \
|
800
|
+
memset(_he_new_buckets, 0, \
|
801
|
+
2UL * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \
|
802
|
+
tbl->ideal_chain_maxlen = \
|
803
|
+
(tbl->num_items >> (tbl->log2_num_buckets+1U)) + \
|
804
|
+
(((tbl->num_items & ((tbl->num_buckets*2U)-1U)) != 0U) ? 1U : 0U); \
|
805
|
+
tbl->nonideal_items = 0; \
|
806
|
+
for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \
|
807
|
+
{ \
|
808
|
+
_he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \
|
809
|
+
while (_he_thh != NULL) { \
|
810
|
+
_he_hh_nxt = _he_thh->hh_next; \
|
811
|
+
HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2U, _he_bkt); \
|
812
|
+
_he_newbkt = &(_he_new_buckets[ _he_bkt ]); \
|
813
|
+
if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \
|
814
|
+
tbl->nonideal_items++; \
|
815
|
+
_he_newbkt->expand_mult = _he_newbkt->count / \
|
816
|
+
tbl->ideal_chain_maxlen; \
|
817
|
+
} \
|
818
|
+
_he_thh->hh_prev = NULL; \
|
819
|
+
_he_thh->hh_next = _he_newbkt->hh_head; \
|
820
|
+
if (_he_newbkt->hh_head != NULL) { _he_newbkt->hh_head->hh_prev = \
|
821
|
+
_he_thh; } \
|
822
|
+
_he_newbkt->hh_head = _he_thh; \
|
823
|
+
_he_thh = _he_hh_nxt; \
|
824
|
+
} \
|
825
|
+
} \
|
826
|
+
uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
|
827
|
+
tbl->num_buckets *= 2U; \
|
828
|
+
tbl->log2_num_buckets++; \
|
829
|
+
tbl->buckets = _he_new_buckets; \
|
830
|
+
tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \
|
831
|
+
(tbl->ineff_expands+1U) : 0U; \
|
832
|
+
if (tbl->ineff_expands > 1U) { \
|
833
|
+
tbl->noexpand=1; \
|
834
|
+
uthash_noexpand_fyi(tbl); \
|
835
|
+
} \
|
836
|
+
uthash_expand_fyi(tbl); \
|
837
|
+
} while (0)
|
838
|
+
|
839
|
+
|
840
|
+
/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
|
841
|
+
/* Note that HASH_SORT assumes the hash handle name to be hh.
|
842
|
+
* HASH_SRT was added to allow the hash handle name to be passed in. */
|
843
|
+
#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn)
|
844
|
+
#define HASH_SRT(hh,head,cmpfcn) \
|
845
|
+
do { \
|
846
|
+
unsigned _hs_i; \
|
847
|
+
unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \
|
848
|
+
struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \
|
849
|
+
if (head != NULL) { \
|
850
|
+
_hs_insize = 1; \
|
851
|
+
_hs_looping = 1; \
|
852
|
+
_hs_list = &((head)->hh); \
|
853
|
+
while (_hs_looping != 0U) { \
|
854
|
+
_hs_p = _hs_list; \
|
855
|
+
_hs_list = NULL; \
|
856
|
+
_hs_tail = NULL; \
|
857
|
+
_hs_nmerges = 0; \
|
858
|
+
while (_hs_p != NULL) { \
|
859
|
+
_hs_nmerges++; \
|
860
|
+
_hs_q = _hs_p; \
|
861
|
+
_hs_psize = 0; \
|
862
|
+
for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \
|
863
|
+
_hs_psize++; \
|
864
|
+
_hs_q = (UT_hash_handle*)((_hs_q->next != NULL) ? \
|
865
|
+
((void*)((char*)(_hs_q->next) + \
|
866
|
+
(head)->hh.tbl->hho)) : NULL); \
|
867
|
+
if (! (_hs_q) ) { break; } \
|
868
|
+
} \
|
869
|
+
_hs_qsize = _hs_insize; \
|
870
|
+
while ((_hs_psize > 0U) || ((_hs_qsize > 0U) && (_hs_q != NULL))) {\
|
871
|
+
if (_hs_psize == 0U) { \
|
872
|
+
_hs_e = _hs_q; \
|
873
|
+
_hs_q = (UT_hash_handle*)((_hs_q->next != NULL) ? \
|
874
|
+
((void*)((char*)(_hs_q->next) + \
|
875
|
+
(head)->hh.tbl->hho)) : NULL); \
|
876
|
+
_hs_qsize--; \
|
877
|
+
} else if ( (_hs_qsize == 0U) || (_hs_q == NULL) ) { \
|
878
|
+
_hs_e = _hs_p; \
|
879
|
+
if (_hs_p != NULL){ \
|
880
|
+
_hs_p = (UT_hash_handle*)((_hs_p->next != NULL) ? \
|
881
|
+
((void*)((char*)(_hs_p->next) + \
|
882
|
+
(head)->hh.tbl->hho)) : NULL); \
|
883
|
+
} \
|
884
|
+
_hs_psize--; \
|
885
|
+
} else if (( \
|
886
|
+
cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \
|
887
|
+
DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \
|
888
|
+
) <= 0) { \
|
889
|
+
_hs_e = _hs_p; \
|
890
|
+
if (_hs_p != NULL){ \
|
891
|
+
_hs_p = (UT_hash_handle*)((_hs_p->next != NULL) ? \
|
892
|
+
((void*)((char*)(_hs_p->next) + \
|
893
|
+
(head)->hh.tbl->hho)) : NULL); \
|
894
|
+
} \
|
895
|
+
_hs_psize--; \
|
896
|
+
} else { \
|
897
|
+
_hs_e = _hs_q; \
|
898
|
+
_hs_q = (UT_hash_handle*)((_hs_q->next != NULL) ? \
|
899
|
+
((void*)((char*)(_hs_q->next) + \
|
900
|
+
(head)->hh.tbl->hho)) : NULL); \
|
901
|
+
_hs_qsize--; \
|
902
|
+
} \
|
903
|
+
if ( _hs_tail != NULL ) { \
|
904
|
+
_hs_tail->next = ((_hs_e != NULL) ? \
|
905
|
+
ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \
|
906
|
+
} else { \
|
907
|
+
_hs_list = _hs_e; \
|
908
|
+
} \
|
909
|
+
if (_hs_e != NULL) { \
|
910
|
+
_hs_e->prev = ((_hs_tail != NULL) ? \
|
911
|
+
ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \
|
912
|
+
} \
|
913
|
+
_hs_tail = _hs_e; \
|
914
|
+
} \
|
915
|
+
_hs_p = _hs_q; \
|
916
|
+
} \
|
917
|
+
if (_hs_tail != NULL){ \
|
918
|
+
_hs_tail->next = NULL; \
|
919
|
+
} \
|
920
|
+
if ( _hs_nmerges <= 1U ) { \
|
921
|
+
_hs_looping=0; \
|
922
|
+
(head)->hh.tbl->tail = _hs_tail; \
|
923
|
+
DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \
|
924
|
+
} \
|
925
|
+
_hs_insize *= 2U; \
|
926
|
+
} \
|
927
|
+
HASH_FSCK(hh,head); \
|
928
|
+
} \
|
929
|
+
} while (0)
|
930
|
+
|
931
|
+
/* This function selects items from one hash into another hash.
|
932
|
+
* The end result is that the selected items have dual presence
|
933
|
+
* in both hashes. There is no copy of the items made; rather
|
934
|
+
* they are added into the new hash through a secondary hash
|
935
|
+
* hash handle that must be present in the structure. */
|
936
|
+
#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \
|
937
|
+
do { \
|
938
|
+
unsigned _src_bkt, _dst_bkt; \
|
939
|
+
void *_last_elt=NULL, *_elt; \
|
940
|
+
UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \
|
941
|
+
ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \
|
942
|
+
if (src != NULL) { \
|
943
|
+
for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \
|
944
|
+
for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
|
945
|
+
_src_hh != NULL; \
|
946
|
+
_src_hh = _src_hh->hh_next) { \
|
947
|
+
_elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \
|
948
|
+
if (cond(_elt)) { \
|
949
|
+
_dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \
|
950
|
+
_dst_hh->key = _src_hh->key; \
|
951
|
+
_dst_hh->keylen = _src_hh->keylen; \
|
952
|
+
_dst_hh->hashv = _src_hh->hashv; \
|
953
|
+
_dst_hh->prev = _last_elt; \
|
954
|
+
_dst_hh->next = NULL; \
|
955
|
+
if (_last_elt_hh != NULL) { _last_elt_hh->next = _elt; } \
|
956
|
+
if (dst == NULL) { \
|
957
|
+
DECLTYPE_ASSIGN(dst,_elt); \
|
958
|
+
HASH_MAKE_TABLE(hh_dst,dst); \
|
959
|
+
} else { \
|
960
|
+
_dst_hh->tbl = (dst)->hh_dst.tbl; \
|
961
|
+
} \
|
962
|
+
HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \
|
963
|
+
HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \
|
964
|
+
(dst)->hh_dst.tbl->num_items++; \
|
965
|
+
_last_elt = _elt; \
|
966
|
+
_last_elt_hh = _dst_hh; \
|
967
|
+
} \
|
968
|
+
} \
|
969
|
+
} \
|
970
|
+
} \
|
971
|
+
HASH_FSCK(hh_dst,dst); \
|
972
|
+
} while (0)
|
973
|
+
|
974
|
+
#define HASH_CLEAR(hh,head) \
|
975
|
+
do { \
|
976
|
+
if (head != NULL) { \
|
977
|
+
uthash_free((head)->hh.tbl->buckets, \
|
978
|
+
(head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \
|
979
|
+
HASH_BLOOM_FREE((head)->hh.tbl); \
|
980
|
+
uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \
|
981
|
+
(head)=NULL; \
|
982
|
+
} \
|
983
|
+
} while (0)
|
984
|
+
|
985
|
+
#define HASH_OVERHEAD(hh,head) \
|
986
|
+
((head != NULL) ? ( \
|
987
|
+
(size_t)(((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \
|
988
|
+
((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \
|
989
|
+
sizeof(UT_hash_table) + \
|
990
|
+
(HASH_BLOOM_BYTELEN))) : 0U)
|
991
|
+
|
992
|
+
#ifdef NO_DECLTYPE
|
993
|
+
#define HASH_ITER(hh,head,el,tmp) \
|
994
|
+
for(((el)=(head)), ((*(char**)(&(tmp)))=(char*)((head!=NULL)?(head)->hh.next:NULL)); \
|
995
|
+
(el) != NULL; ((el)=(tmp)), ((*(char**)(&(tmp)))=(char*)((tmp!=NULL)?(tmp)->hh.next:NULL)))
|
996
|
+
#else
|
997
|
+
#define HASH_ITER(hh,head,el,tmp) \
|
998
|
+
for(((el)=(head)), ((tmp)=DECLTYPE(el)((head!=NULL)?(head)->hh.next:NULL)); \
|
999
|
+
(el) != NULL; ((el)=(tmp)), ((tmp)=DECLTYPE(el)((tmp!=NULL)?(tmp)->hh.next:NULL)))
|
1000
|
+
#endif
|
1001
|
+
|
1002
|
+
/* obtain a count of items in the hash */
|
1003
|
+
#define HASH_COUNT(head) HASH_CNT(hh,head)
|
1004
|
+
#define HASH_CNT(hh,head) ((head != NULL)?((head)->hh.tbl->num_items):0U)
|
1005
|
+
|
1006
|
+
typedef struct UT_hash_bucket {
|
1007
|
+
struct UT_hash_handle *hh_head;
|
1008
|
+
unsigned count;
|
1009
|
+
|
1010
|
+
/* expand_mult is normally set to 0. In this situation, the max chain length
|
1011
|
+
* threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If
|
1012
|
+
* the bucket's chain exceeds this length, bucket expansion is triggered).
|
1013
|
+
* However, setting expand_mult to a non-zero value delays bucket expansion
|
1014
|
+
* (that would be triggered by additions to this particular bucket)
|
1015
|
+
* until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH.
|
1016
|
+
* (The multiplier is simply expand_mult+1). The whole idea of this
|
1017
|
+
* multiplier is to reduce bucket expansions, since they are expensive, in
|
1018
|
+
* situations where we know that a particular bucket tends to be overused.
|
1019
|
+
* It is better to let its chain length grow to a longer yet-still-bounded
|
1020
|
+
* value, than to do an O(n) bucket expansion too often.
|
1021
|
+
*/
|
1022
|
+
unsigned expand_mult;
|
1023
|
+
|
1024
|
+
} UT_hash_bucket;
|
1025
|
+
|
1026
|
+
/* random signature used only to find hash tables in external analysis */
|
1027
|
+
#define HASH_SIGNATURE 0xa0111fe1u
|
1028
|
+
#define HASH_BLOOM_SIGNATURE 0xb12220f2u
|
1029
|
+
|
1030
|
+
typedef struct UT_hash_table {
|
1031
|
+
UT_hash_bucket *buckets;
|
1032
|
+
unsigned num_buckets, log2_num_buckets;
|
1033
|
+
unsigned num_items;
|
1034
|
+
struct UT_hash_handle *tail; /* tail hh in app order, for fast append */
|
1035
|
+
ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */
|
1036
|
+
|
1037
|
+
/* in an ideal situation (all buckets used equally), no bucket would have
|
1038
|
+
* more than ceil(#items/#buckets) items. that's the ideal chain length. */
|
1039
|
+
unsigned ideal_chain_maxlen;
|
1040
|
+
|
1041
|
+
/* nonideal_items is the number of items in the hash whose chain position
|
1042
|
+
* exceeds the ideal chain maxlen. these items pay the penalty for an uneven
|
1043
|
+
* hash distribution; reaching them in a chain traversal takes >ideal steps */
|
1044
|
+
unsigned nonideal_items;
|
1045
|
+
|
1046
|
+
/* ineffective expands occur when a bucket doubling was performed, but
|
1047
|
+
* afterward, more than half the items in the hash had nonideal chain
|
1048
|
+
* positions. If this happens on two consecutive expansions we inhibit any
|
1049
|
+
* further expansion, as it's not helping; this happens when the hash
|
1050
|
+
* function isn't a good fit for the key domain. When expansion is inhibited
|
1051
|
+
* the hash will still work, albeit no longer in constant time. */
|
1052
|
+
unsigned ineff_expands, noexpand;
|
1053
|
+
|
1054
|
+
uint32_t signature; /* used only to find hash tables in external analysis */
|
1055
|
+
#ifdef HASH_BLOOM
|
1056
|
+
uint32_t bloom_sig; /* used only to test bloom exists in external analysis */
|
1057
|
+
uint8_t *bloom_bv;
|
1058
|
+
uint8_t bloom_nbits;
|
1059
|
+
#endif
|
1060
|
+
|
1061
|
+
} UT_hash_table;
|
1062
|
+
|
1063
|
+
typedef struct UT_hash_handle {
|
1064
|
+
struct UT_hash_table *tbl;
|
1065
|
+
void *prev; /* prev element in app order */
|
1066
|
+
void *next; /* next element in app order */
|
1067
|
+
struct UT_hash_handle *hh_prev; /* previous hh in bucket order */
|
1068
|
+
struct UT_hash_handle *hh_next; /* next hh in bucket order */
|
1069
|
+
void *key; /* ptr to enclosing struct's key */
|
1070
|
+
unsigned keylen; /* enclosing struct's key len */
|
1071
|
+
unsigned hashv; /* result of hash-fcn(key) */
|
1072
|
+
} UT_hash_handle;
|
1073
|
+
|
1074
|
+
#endif /* UTHASH_H */
|