lounge_lizard 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +33 -0
- data/LICENSE.txt +21 -0
- data/README.md +50 -0
- data/Rakefile +43 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/circle.yml +14 -0
- data/ext/drafter/CHANGELOG.md +278 -0
- data/ext/drafter/Dockerfile +17 -0
- data/ext/drafter/Makefile +62 -0
- data/ext/drafter/appveyor.yml +17 -0
- data/ext/drafter/bin/drafter +0 -0
- data/ext/drafter/build/Makefile +387 -0
- data/ext/drafter/build/drafter.Makefile +6 -0
- data/ext/drafter/build/drafter.target.mk +159 -0
- data/ext/drafter/build/ext/snowcrash/libmarkdownparser.target.mk +141 -0
- data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +154 -0
- data/ext/drafter/build/ext/snowcrash/libsundown.target.mk +149 -0
- data/ext/drafter/build/ext/snowcrash/perf-libsnowcrash.target.mk +147 -0
- data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
- data/ext/drafter/build/gyp-mac-tool +606 -0
- data/ext/drafter/build/libdrafter.target.mk +186 -0
- data/ext/drafter/build/libsos.target.mk +137 -0
- data/ext/drafter/build/out/Release/drafter +0 -0
- data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
- data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
- data/ext/drafter/build/out/Release/libsos.a +0 -0
- data/ext/drafter/build/out/Release/libsundown.a +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/ConversionContext.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/NamedTypesRegistry.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractAPI.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractDataStructure.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractElementFactory.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractSourceMap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Render.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter_private.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ComparableVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Element.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ExpandVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/IsExpandableVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/JSONSchemaVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/PrintVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Query.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Registry.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/RenderJSONVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeCompactVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/TypeQueryVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/VisitorUtils.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/drafter/circle.yml +32 -0
- data/ext/drafter/config.gypi +10 -0
- data/ext/drafter/config.mk +5 -0
- data/ext/drafter/configure +224 -0
- data/ext/drafter/drafter.gyp +189 -0
- data/ext/drafter/drafter.xcworkspace/contents.xcworkspacedata +13 -0
- data/ext/drafter/ext/snowcrash/Makefile +58 -0
- data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
- data/ext/drafter/ext/snowcrash/common.gypi +165 -0
- data/ext/drafter/ext/snowcrash/configure +197 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/Makefile +90 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +10 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile +84 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile.win +33 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/smartypants.c +72 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/sundown.c +80 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini.h +37 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +108 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +84 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.c +647 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.h +77 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.c +389 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html_block_names.txt +25 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.c +297 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.h +51 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.c +225 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.h +96 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/html_blocks.h +206 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.c +2726 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.h +147 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.c +204 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.h +58 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.c +81 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.h +29 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/sundown.def +20 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/markdown/markdown.vcproj +188 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/msvc.sln +38 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/sundown/sundown.vcproj +206 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.cc +160 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.h +90 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.cc +152 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.h +103 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.cc +388 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.h +106 -0
- data/ext/drafter/ext/snowcrash/snowcrash.gyp +196 -0
- data/ext/drafter/ext/snowcrash/src/ActionParser.h +560 -0
- data/ext/drafter/ext/snowcrash/src/AssetParser.h +123 -0
- data/ext/drafter/ext/snowcrash/src/AttributesParser.h +123 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.h +489 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintParser.h +845 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.h +345 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintUtility.h +111 -0
- data/ext/drafter/ext/snowcrash/src/CodeBlockUtility.h +276 -0
- data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +157 -0
- data/ext/drafter/ext/snowcrash/src/HTTP.cc +49 -0
- data/ext/drafter/ext/snowcrash/src/HTTP.h +108 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +117 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.h +377 -0
- data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
- data/ext/drafter/ext/snowcrash/src/MSON.h +405 -0
- data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +103 -0
- data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +135 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
- data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +166 -0
- data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +106 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
- data/ext/drafter/ext/snowcrash/src/MSONUtility.h +506 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +214 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +390 -0
- data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
- data/ext/drafter/ext/snowcrash/src/ParameterParser.h +516 -0
- data/ext/drafter/ext/snowcrash/src/ParametersParser.h +222 -0
- data/ext/drafter/ext/snowcrash/src/PayloadParser.h +733 -0
- data/ext/drafter/ext/snowcrash/src/Platform.h +33 -0
- data/ext/drafter/ext/snowcrash/src/RegexMatch.h +32 -0
- data/ext/drafter/ext/snowcrash/src/RelationParser.h +87 -0
- data/ext/drafter/ext/snowcrash/src/ResourceGroupParser.h +297 -0
- data/ext/drafter/ext/snowcrash/src/ResourceParser.h +536 -0
- data/ext/drafter/ext/snowcrash/src/Section.cc +48 -0
- data/ext/drafter/ext/snowcrash/src/Section.h +60 -0
- data/ext/drafter/ext/snowcrash/src/SectionParser.h +246 -0
- data/ext/drafter/ext/snowcrash/src/SectionParserData.h +109 -0
- data/ext/drafter/ext/snowcrash/src/SectionProcessor.h +299 -0
- data/ext/drafter/ext/snowcrash/src/Signature.cc +75 -0
- data/ext/drafter/ext/snowcrash/src/Signature.h +103 -0
- data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +442 -0
- data/ext/drafter/ext/snowcrash/src/SourceAnnotation.h +166 -0
- data/ext/drafter/ext/snowcrash/src/StringUtility.h +323 -0
- data/ext/drafter/ext/snowcrash/src/UriTemplateParser.cc +195 -0
- data/ext/drafter/ext/snowcrash/src/UriTemplateParser.h +240 -0
- data/ext/drafter/ext/snowcrash/src/ValuesParser.h +111 -0
- data/ext/drafter/ext/snowcrash/src/posix/RegexMatch.cc +99 -0
- data/ext/drafter/ext/snowcrash/src/snowcrash.cc +90 -0
- data/ext/drafter/ext/snowcrash/src/snowcrash.h +44 -0
- data/ext/drafter/ext/snowcrash/src/win/RegexMatch.cc +78 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/AUTHORS +12 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/DEPS +23 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/OWNERS +1 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/PRESUBMIT.py +137 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/buildbot_run.py +136 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/OWNERS +6 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/cq_config.json +15 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/codereview.settings +10 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp +8 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp.bat +5 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp_main.py +16 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSSettings.py +1096 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.py +270 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.py +445 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.py +548 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.py +608 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/easy_xml.py +157 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/flock_tool.py +54 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/analyzer.py +741 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/android.py +1069 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/cmake.py +1248 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +99 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/eclipse.py +425 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypd.py +94 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.py +2218 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/msvs.py +3467 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.py +2427 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.py +1300 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.py +2899 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/mac_tool.py +605 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.py +1093 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ordered_dict.py +289 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.py +46 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/win_tool.py +314 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.py +1664 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.py +276 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.py +2927 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xml_fix.py +69 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylintrc +307 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples +81 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples.bat +5 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/setup.py +19 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/emacs/gyp.el +275 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/graphviz.py +100 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_gyp.py +155 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_sln.py +169 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_vcproj.py +329 -0
- data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
- data/ext/drafter/ext/sos/Makefile +62 -0
- data/ext/drafter/ext/sos/src/sos.cc +235 -0
- data/ext/drafter/ext/sos/src/sos.h +188 -0
- data/ext/drafter/ext/sos/src/sosJSON.h +121 -0
- data/ext/drafter/ext/sos/src/sosYAML.h +105 -0
- data/ext/drafter/src/ConversionContext.cc +39 -0
- data/ext/drafter/src/ConversionContext.h +34 -0
- data/ext/drafter/src/NamedTypesRegistry.cc +405 -0
- data/ext/drafter/src/NamedTypesRegistry.h +28 -0
- data/ext/drafter/src/NodeInfo.h +143 -0
- data/ext/drafter/src/RefractAPI.cc +579 -0
- data/ext/drafter/src/RefractAPI.h +28 -0
- data/ext/drafter/src/RefractDataStructure.cc +1199 -0
- data/ext/drafter/src/RefractDataStructure.h +26 -0
- data/ext/drafter/src/RefractElementFactory.cc +107 -0
- data/ext/drafter/src/RefractElementFactory.h +67 -0
- data/ext/drafter/src/RefractSourceMap.cc +29 -0
- data/ext/drafter/src/RefractSourceMap.h +57 -0
- data/ext/drafter/src/Render.cc +157 -0
- data/ext/drafter/src/Render.h +40 -0
- data/ext/drafter/src/Serialize.cc +160 -0
- data/ext/drafter/src/Serialize.h +289 -0
- data/ext/drafter/src/SerializeAST.cc +507 -0
- data/ext/drafter/src/SerializeAST.h +29 -0
- data/ext/drafter/src/SerializeResult.cc +170 -0
- data/ext/drafter/src/SerializeResult.h +34 -0
- data/ext/drafter/src/SerializeSourcemap.cc +331 -0
- data/ext/drafter/src/SerializeSourcemap.h +21 -0
- data/ext/drafter/src/Version.h +40 -0
- data/ext/drafter/src/config.cc +91 -0
- data/ext/drafter/src/config.h +38 -0
- data/ext/drafter/src/drafter.cc +137 -0
- data/ext/drafter/src/drafter.h +102 -0
- data/ext/drafter/src/drafter_private.cc +85 -0
- data/ext/drafter/src/drafter_private.h +34 -0
- data/ext/drafter/src/main.cc +137 -0
- data/ext/drafter/src/refract/AppendDecorator.h +58 -0
- data/ext/drafter/src/refract/Build.h +67 -0
- data/ext/drafter/src/refract/ComparableVisitor.cc +43 -0
- data/ext/drafter/src/refract/ComparableVisitor.h +62 -0
- data/ext/drafter/src/refract/Element.cc +409 -0
- data/ext/drafter/src/refract/Element.h +656 -0
- data/ext/drafter/src/refract/ElementFwd.h +37 -0
- data/ext/drafter/src/refract/ElementInserter.h +59 -0
- data/ext/drafter/src/refract/Exception.h +31 -0
- data/ext/drafter/src/refract/ExpandVisitor.cc +359 -0
- data/ext/drafter/src/refract/ExpandVisitor.h +58 -0
- data/ext/drafter/src/refract/FilterVisitor.h +52 -0
- data/ext/drafter/src/refract/IsExpandableVisitor.cc +140 -0
- data/ext/drafter/src/refract/IsExpandableVisitor.h +31 -0
- data/ext/drafter/src/refract/Iterate.h +160 -0
- data/ext/drafter/src/refract/JSONSchemaVisitor.cc +675 -0
- data/ext/drafter/src/refract/JSONSchemaVisitor.h +73 -0
- data/ext/drafter/src/refract/PrintVisitor.cc +164 -0
- data/ext/drafter/src/refract/PrintVisitor.h +50 -0
- data/ext/drafter/src/refract/Query.cc +13 -0
- data/ext/drafter/src/refract/Query.h +38 -0
- data/ext/drafter/src/refract/Registry.cc +114 -0
- data/ext/drafter/src/refract/Registry.h +43 -0
- data/ext/drafter/src/refract/RenderJSONVisitor.cc +255 -0
- data/ext/drafter/src/refract/RenderJSONVisitor.h +51 -0
- data/ext/drafter/src/refract/SerializeCompactVisitor.cc +167 -0
- data/ext/drafter/src/refract/SerializeCompactVisitor.h +56 -0
- data/ext/drafter/src/refract/SerializeVisitor.cc +214 -0
- data/ext/drafter/src/refract/SerializeVisitor.h +55 -0
- data/ext/drafter/src/refract/TypeQueryVisitor.cc +46 -0
- data/ext/drafter/src/refract/TypeQueryVisitor.h +110 -0
- data/ext/drafter/src/refract/Visitor.h +126 -0
- data/ext/drafter/src/refract/VisitorUtils.cc +63 -0
- data/ext/drafter/src/refract/VisitorUtils.h +231 -0
- data/ext/drafter/src/reporting.cc +263 -0
- data/ext/drafter/src/reporting.h +39 -0
- data/ext/drafter/src/stream.h +148 -0
- data/ext/drafter/tools/homebrew/drafter.rb +18 -0
- data/ext/drafter/tools/make-tarball.sh +39 -0
- data/ext/drafter/tools/refract-filter.py +96 -0
- data/ext/drafter/tools/release.sh +17 -0
- data/ext/drafter/vcbuild.bat +203 -0
- data/lib/lounge_lizard/binding.rb +29 -0
- data/lib/lounge_lizard/version.rb +3 -0
- data/lib/lounge_lizard.rb +18 -0
- data/lounge_lizard.gemspec +37 -0
- metadata +547 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2011, Vicent Marti
|
|
3
|
+
*
|
|
4
|
+
* Permission to use, copy, modify, and distribute this software for any
|
|
5
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
6
|
+
* copyright notice and this permission notice appear in all copies.
|
|
7
|
+
*
|
|
8
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
9
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
10
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
11
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
12
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
13
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
14
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#ifndef UPSKIRT_AUTOLINK_H
|
|
18
|
+
#define UPSKIRT_AUTOLINK_H
|
|
19
|
+
|
|
20
|
+
#include "buffer.h"
|
|
21
|
+
|
|
22
|
+
#ifdef __cplusplus
|
|
23
|
+
extern "C" {
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
enum {
|
|
27
|
+
SD_AUTOLINK_SHORT_DOMAINS = (1 << 0)
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
int
|
|
31
|
+
sd_autolink_issafe(const uint8_t *link, size_t link_len);
|
|
32
|
+
|
|
33
|
+
size_t
|
|
34
|
+
sd_autolink__www(size_t *rewind_p, struct buf *link,
|
|
35
|
+
uint8_t *data, size_t offset, size_t size, unsigned int flags);
|
|
36
|
+
|
|
37
|
+
size_t
|
|
38
|
+
sd_autolink__email(size_t *rewind_p, struct buf *link,
|
|
39
|
+
uint8_t *data, size_t offset, size_t size, unsigned int flags);
|
|
40
|
+
|
|
41
|
+
size_t
|
|
42
|
+
sd_autolink__url(size_t *rewind_p, struct buf *link,
|
|
43
|
+
uint8_t *data, size_t offset, size_t size, unsigned int flags);
|
|
44
|
+
|
|
45
|
+
#ifdef __cplusplus
|
|
46
|
+
}
|
|
47
|
+
#endif
|
|
48
|
+
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
/* vim: set filetype=c: */
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2008, Natacha Porté
|
|
3
|
+
* Copyright (c) 2011, Vicent Martí
|
|
4
|
+
*
|
|
5
|
+
* Permission to use, copy, modify, and distribute this software for any
|
|
6
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
* copyright notice and this permission notice appear in all copies.
|
|
8
|
+
*
|
|
9
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#define BUFFER_MAX_ALLOC_SIZE (1024 * 1024 * 16) //16mb
|
|
19
|
+
|
|
20
|
+
#include "buffer.h"
|
|
21
|
+
|
|
22
|
+
#include <stdio.h>
|
|
23
|
+
#include <stdlib.h>
|
|
24
|
+
#include <string.h>
|
|
25
|
+
#include <assert.h>
|
|
26
|
+
|
|
27
|
+
/* MSVC compat */
|
|
28
|
+
#if defined(_MSC_VER)
|
|
29
|
+
# define _buf_vsnprintf _vsnprintf
|
|
30
|
+
#else
|
|
31
|
+
# define _buf_vsnprintf vsnprintf
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
int
|
|
35
|
+
bufprefix(const struct buf *buf, const char *prefix)
|
|
36
|
+
{
|
|
37
|
+
size_t i;
|
|
38
|
+
assert(buf && buf->unit);
|
|
39
|
+
|
|
40
|
+
for (i = 0; i < buf->size; ++i) {
|
|
41
|
+
if (prefix[i] == 0)
|
|
42
|
+
return 0;
|
|
43
|
+
|
|
44
|
+
if (buf->data[i] != prefix[i])
|
|
45
|
+
return buf->data[i] - prefix[i];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* bufgrow: increasing the allocated size to the given value */
|
|
52
|
+
int
|
|
53
|
+
bufgrow(struct buf *buf, size_t neosz)
|
|
54
|
+
{
|
|
55
|
+
size_t neoasz;
|
|
56
|
+
void *neodata;
|
|
57
|
+
|
|
58
|
+
assert(buf && buf->unit);
|
|
59
|
+
|
|
60
|
+
if (neosz > BUFFER_MAX_ALLOC_SIZE)
|
|
61
|
+
return BUF_ENOMEM;
|
|
62
|
+
|
|
63
|
+
if (buf->asize >= neosz)
|
|
64
|
+
return BUF_OK;
|
|
65
|
+
|
|
66
|
+
neoasz = buf->asize + buf->unit;
|
|
67
|
+
while (neoasz < neosz)
|
|
68
|
+
neoasz += buf->unit;
|
|
69
|
+
|
|
70
|
+
neodata = realloc(buf->data, neoasz);
|
|
71
|
+
if (!neodata)
|
|
72
|
+
return BUF_ENOMEM;
|
|
73
|
+
|
|
74
|
+
buf->data = neodata;
|
|
75
|
+
buf->asize = neoasz;
|
|
76
|
+
return BUF_OK;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/* bufnew: allocation of a new buffer */
|
|
81
|
+
struct buf *
|
|
82
|
+
bufnew(size_t unit)
|
|
83
|
+
{
|
|
84
|
+
struct buf *ret;
|
|
85
|
+
ret = malloc(sizeof (struct buf));
|
|
86
|
+
|
|
87
|
+
if (ret) {
|
|
88
|
+
ret->data = 0;
|
|
89
|
+
ret->size = ret->asize = 0;
|
|
90
|
+
ret->unit = unit;
|
|
91
|
+
}
|
|
92
|
+
return ret;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* bufnullterm: NULL-termination of the string array */
|
|
96
|
+
const char *
|
|
97
|
+
bufcstr(struct buf *buf)
|
|
98
|
+
{
|
|
99
|
+
assert(buf && buf->unit);
|
|
100
|
+
|
|
101
|
+
if (buf->size < buf->asize && buf->data[buf->size] == 0)
|
|
102
|
+
return (char *)buf->data;
|
|
103
|
+
|
|
104
|
+
if (buf->size + 1 <= buf->asize || bufgrow(buf, buf->size + 1) == 0) {
|
|
105
|
+
buf->data[buf->size] = 0;
|
|
106
|
+
return (char *)buf->data;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return NULL;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* bufprintf: formatted printing to a buffer */
|
|
113
|
+
void
|
|
114
|
+
bufprintf(struct buf *buf, const char *fmt, ...)
|
|
115
|
+
{
|
|
116
|
+
va_list ap;
|
|
117
|
+
int n;
|
|
118
|
+
|
|
119
|
+
assert(buf && buf->unit);
|
|
120
|
+
|
|
121
|
+
if (buf->size >= buf->asize && bufgrow(buf, buf->size + 1) < 0)
|
|
122
|
+
return;
|
|
123
|
+
|
|
124
|
+
va_start(ap, fmt);
|
|
125
|
+
n = _buf_vsnprintf((char *)buf->data + buf->size, buf->asize - buf->size, fmt, ap);
|
|
126
|
+
va_end(ap);
|
|
127
|
+
|
|
128
|
+
if (n < 0) {
|
|
129
|
+
#ifdef _MSC_VER
|
|
130
|
+
va_start(ap, fmt);
|
|
131
|
+
n = _vscprintf(fmt, ap);
|
|
132
|
+
va_end(ap);
|
|
133
|
+
#else
|
|
134
|
+
return;
|
|
135
|
+
#endif
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if ((size_t)n >= buf->asize - buf->size) {
|
|
139
|
+
if (bufgrow(buf, buf->size + n + 1) < 0)
|
|
140
|
+
return;
|
|
141
|
+
|
|
142
|
+
va_start(ap, fmt);
|
|
143
|
+
n = _buf_vsnprintf((char *)buf->data + buf->size, buf->asize - buf->size, fmt, ap);
|
|
144
|
+
va_end(ap);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (n < 0)
|
|
148
|
+
return;
|
|
149
|
+
|
|
150
|
+
buf->size += n;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* bufput: appends raw data to a buffer */
|
|
154
|
+
void
|
|
155
|
+
bufput(struct buf *buf, const void *data, size_t len)
|
|
156
|
+
{
|
|
157
|
+
assert(buf && buf->unit);
|
|
158
|
+
|
|
159
|
+
if (buf->size + len > buf->asize && bufgrow(buf, buf->size + len) < 0)
|
|
160
|
+
return;
|
|
161
|
+
|
|
162
|
+
memcpy(buf->data + buf->size, data, len);
|
|
163
|
+
buf->size += len;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* bufputs: appends a NUL-terminated string to a buffer */
|
|
167
|
+
void
|
|
168
|
+
bufputs(struct buf *buf, const char *str)
|
|
169
|
+
{
|
|
170
|
+
bufput(buf, str, strlen(str));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
/* bufputc: appends a single uint8_t to a buffer */
|
|
175
|
+
void
|
|
176
|
+
bufputc(struct buf *buf, int c)
|
|
177
|
+
{
|
|
178
|
+
assert(buf && buf->unit);
|
|
179
|
+
|
|
180
|
+
if (buf->size + 1 > buf->asize && bufgrow(buf, buf->size + 1) < 0)
|
|
181
|
+
return;
|
|
182
|
+
|
|
183
|
+
buf->data[buf->size] = c;
|
|
184
|
+
buf->size += 1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* bufrelease: decrease the reference count and free the buffer if needed */
|
|
188
|
+
void
|
|
189
|
+
bufrelease(struct buf *buf)
|
|
190
|
+
{
|
|
191
|
+
if (!buf)
|
|
192
|
+
return;
|
|
193
|
+
|
|
194
|
+
free(buf->data);
|
|
195
|
+
free(buf);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
/* bufreset: frees internal data of the buffer */
|
|
200
|
+
void
|
|
201
|
+
bufreset(struct buf *buf)
|
|
202
|
+
{
|
|
203
|
+
if (!buf)
|
|
204
|
+
return;
|
|
205
|
+
|
|
206
|
+
free(buf->data);
|
|
207
|
+
buf->data = NULL;
|
|
208
|
+
buf->size = buf->asize = 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* bufslurp: removes a given number of bytes from the head of the array */
|
|
212
|
+
void
|
|
213
|
+
bufslurp(struct buf *buf, size_t len)
|
|
214
|
+
{
|
|
215
|
+
assert(buf && buf->unit);
|
|
216
|
+
|
|
217
|
+
if (len >= buf->size) {
|
|
218
|
+
buf->size = 0;
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
buf->size -= len;
|
|
223
|
+
memmove(buf->data, buf->data + len, buf->size);
|
|
224
|
+
}
|
|
225
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2008, Natacha Porté
|
|
3
|
+
* Copyright (c) 2011, Vicent Martí
|
|
4
|
+
*
|
|
5
|
+
* Permission to use, copy, modify, and distribute this software for any
|
|
6
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
* copyright notice and this permission notice appear in all copies.
|
|
8
|
+
*
|
|
9
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#ifndef BUFFER_H__
|
|
19
|
+
#define BUFFER_H__
|
|
20
|
+
|
|
21
|
+
#include <stddef.h>
|
|
22
|
+
#include <stdarg.h>
|
|
23
|
+
#include <stdint.h>
|
|
24
|
+
|
|
25
|
+
#ifdef __cplusplus
|
|
26
|
+
extern "C" {
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#if defined(_MSC_VER)
|
|
30
|
+
#define __attribute__(x)
|
|
31
|
+
#define inline __inline
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
typedef enum {
|
|
35
|
+
BUF_OK = 0,
|
|
36
|
+
BUF_ENOMEM = -1
|
|
37
|
+
} buferror_t;
|
|
38
|
+
|
|
39
|
+
/* struct buf: character array buffer */
|
|
40
|
+
struct buf {
|
|
41
|
+
uint8_t *data; /* actual character data */
|
|
42
|
+
size_t size; /* size of the string */
|
|
43
|
+
size_t asize; /* allocated size (0 = volatile buffer) */
|
|
44
|
+
size_t unit; /* reallocation unit size (0 = read-only buffer) */
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/* CONST_BUF: global buffer from a string litteral */
|
|
48
|
+
#define BUF_STATIC(string) \
|
|
49
|
+
{ (uint8_t *)string, sizeof string -1, sizeof string, 0, 0 }
|
|
50
|
+
|
|
51
|
+
/* VOLATILE_BUF: macro for creating a volatile buffer on the stack */
|
|
52
|
+
#define BUF_VOLATILE(strname) \
|
|
53
|
+
{ (uint8_t *)strname, strlen(strname), 0, 0, 0 }
|
|
54
|
+
|
|
55
|
+
/* BUFPUTSL: optimized bufputs of a string litteral */
|
|
56
|
+
#define BUFPUTSL(output, literal) \
|
|
57
|
+
bufput(output, literal, sizeof literal - 1)
|
|
58
|
+
|
|
59
|
+
/* bufgrow: increasing the allocated size to the given value */
|
|
60
|
+
int bufgrow(struct buf *, size_t);
|
|
61
|
+
|
|
62
|
+
/* bufnew: allocation of a new buffer */
|
|
63
|
+
struct buf *bufnew(size_t) __attribute__ ((malloc));
|
|
64
|
+
|
|
65
|
+
/* bufnullterm: NUL-termination of the string array (making a C-string) */
|
|
66
|
+
const char *bufcstr(struct buf *);
|
|
67
|
+
|
|
68
|
+
/* bufprefix: compare the beginning of a buffer with a string */
|
|
69
|
+
int bufprefix(const struct buf *buf, const char *prefix);
|
|
70
|
+
|
|
71
|
+
/* bufput: appends raw data to a buffer */
|
|
72
|
+
void bufput(struct buf *, const void *, size_t);
|
|
73
|
+
|
|
74
|
+
/* bufputs: appends a NUL-terminated string to a buffer */
|
|
75
|
+
void bufputs(struct buf *, const char *);
|
|
76
|
+
|
|
77
|
+
/* bufputc: appends a single char to a buffer */
|
|
78
|
+
void bufputc(struct buf *, int);
|
|
79
|
+
|
|
80
|
+
/* bufrelease: decrease the reference count and free the buffer if needed */
|
|
81
|
+
void bufrelease(struct buf *);
|
|
82
|
+
|
|
83
|
+
/* bufreset: frees internal data of the buffer */
|
|
84
|
+
void bufreset(struct buf *);
|
|
85
|
+
|
|
86
|
+
/* bufslurp: removes a given number of bytes from the head of the array */
|
|
87
|
+
void bufslurp(struct buf *, size_t);
|
|
88
|
+
|
|
89
|
+
/* bufprintf: formatted printing to a buffer */
|
|
90
|
+
void bufprintf(struct buf *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
|
|
91
|
+
|
|
92
|
+
#ifdef __cplusplus
|
|
93
|
+
}
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
#endif
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/* C code produced by gperf version 3.0.3 */
|
|
2
|
+
/* Command-line: gperf -N find_block_tag -H hash_block_tag -C -c -E --ignore-case html_block_names.txt */
|
|
3
|
+
/* Computed positions: -k'1-2' */
|
|
4
|
+
|
|
5
|
+
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
|
6
|
+
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
|
7
|
+
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
|
|
8
|
+
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
|
|
9
|
+
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
|
|
10
|
+
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
|
|
11
|
+
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
|
|
12
|
+
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
|
|
13
|
+
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
|
|
14
|
+
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
|
|
15
|
+
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
|
|
16
|
+
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
|
|
17
|
+
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
|
|
18
|
+
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
|
|
19
|
+
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
|
|
20
|
+
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
|
|
21
|
+
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
|
|
22
|
+
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
|
|
23
|
+
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
|
|
24
|
+
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
|
|
25
|
+
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
|
|
26
|
+
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
|
|
27
|
+
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
|
|
28
|
+
/* The character set is not based on ISO-646. */
|
|
29
|
+
error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
/* maximum key range = 37, duplicates = 0 */
|
|
33
|
+
|
|
34
|
+
#ifndef GPERF_DOWNCASE
|
|
35
|
+
#define GPERF_DOWNCASE 1
|
|
36
|
+
static unsigned char gperf_downcase[256] =
|
|
37
|
+
{
|
|
38
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
|
39
|
+
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
|
40
|
+
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
|
|
41
|
+
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
42
|
+
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
|
|
43
|
+
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
|
|
44
|
+
122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
|
|
45
|
+
105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
|
|
46
|
+
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
|
|
47
|
+
135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
|
48
|
+
150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
|
|
49
|
+
165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
|
|
50
|
+
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
|
|
51
|
+
195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
|
|
52
|
+
210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
|
|
53
|
+
225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
|
54
|
+
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
|
|
55
|
+
255
|
|
56
|
+
};
|
|
57
|
+
#endif
|
|
58
|
+
|
|
59
|
+
#ifndef GPERF_CASE_STRNCMP
|
|
60
|
+
#define GPERF_CASE_STRNCMP 1
|
|
61
|
+
static int
|
|
62
|
+
gperf_case_strncmp (s1, s2, n)
|
|
63
|
+
register const char *s1;
|
|
64
|
+
register const char *s2;
|
|
65
|
+
register unsigned int n;
|
|
66
|
+
{
|
|
67
|
+
for (; n > 0;)
|
|
68
|
+
{
|
|
69
|
+
unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
|
|
70
|
+
unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
|
|
71
|
+
if (c1 != 0 && c1 == c2)
|
|
72
|
+
{
|
|
73
|
+
n--;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
return (int)c1 - (int)c2;
|
|
77
|
+
}
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
80
|
+
#endif
|
|
81
|
+
|
|
82
|
+
#ifdef __GNUC__
|
|
83
|
+
__inline
|
|
84
|
+
#else
|
|
85
|
+
#ifdef __cplusplus
|
|
86
|
+
inline
|
|
87
|
+
#endif
|
|
88
|
+
#endif
|
|
89
|
+
static unsigned int
|
|
90
|
+
hash_block_tag (str, len)
|
|
91
|
+
register const char *str;
|
|
92
|
+
register unsigned int len;
|
|
93
|
+
{
|
|
94
|
+
static const unsigned char asso_values[] =
|
|
95
|
+
{
|
|
96
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
97
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
98
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
99
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
100
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
101
|
+
8, 30, 25, 20, 15, 10, 38, 38, 38, 38,
|
|
102
|
+
38, 38, 38, 38, 38, 38, 0, 38, 0, 38,
|
|
103
|
+
5, 5, 5, 15, 0, 38, 38, 0, 15, 10,
|
|
104
|
+
0, 38, 38, 15, 0, 5, 38, 38, 38, 38,
|
|
105
|
+
38, 38, 38, 38, 38, 38, 38, 38, 0, 38,
|
|
106
|
+
0, 38, 5, 5, 5, 15, 0, 38, 38, 0,
|
|
107
|
+
15, 10, 0, 38, 38, 15, 0, 5, 38, 38,
|
|
108
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
109
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
110
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
111
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
112
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
113
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
114
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
115
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
116
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
117
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
118
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
119
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
120
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
121
|
+
38, 38, 38, 38, 38, 38, 38
|
|
122
|
+
};
|
|
123
|
+
register int hval = len;
|
|
124
|
+
|
|
125
|
+
switch (hval)
|
|
126
|
+
{
|
|
127
|
+
default:
|
|
128
|
+
hval += asso_values[(unsigned char)str[1]+1];
|
|
129
|
+
/*FALLTHROUGH*/
|
|
130
|
+
case 1:
|
|
131
|
+
hval += asso_values[(unsigned char)str[0]];
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
return hval;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
#ifdef __GNUC__
|
|
138
|
+
__inline
|
|
139
|
+
#ifdef __GNUC_STDC_INLINE__
|
|
140
|
+
__attribute__ ((__gnu_inline__))
|
|
141
|
+
#endif
|
|
142
|
+
#endif
|
|
143
|
+
const char *
|
|
144
|
+
find_block_tag (str, len)
|
|
145
|
+
register const char *str;
|
|
146
|
+
register unsigned int len;
|
|
147
|
+
{
|
|
148
|
+
enum
|
|
149
|
+
{
|
|
150
|
+
TOTAL_KEYWORDS = 24,
|
|
151
|
+
MIN_WORD_LENGTH = 1,
|
|
152
|
+
MAX_WORD_LENGTH = 10,
|
|
153
|
+
MIN_HASH_VALUE = 1,
|
|
154
|
+
MAX_HASH_VALUE = 37
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
static const char * const wordlist[] =
|
|
158
|
+
{
|
|
159
|
+
"",
|
|
160
|
+
"p",
|
|
161
|
+
"dl",
|
|
162
|
+
"div",
|
|
163
|
+
"math",
|
|
164
|
+
"table",
|
|
165
|
+
"",
|
|
166
|
+
"ul",
|
|
167
|
+
"del",
|
|
168
|
+
"form",
|
|
169
|
+
"blockquote",
|
|
170
|
+
"figure",
|
|
171
|
+
"ol",
|
|
172
|
+
"fieldset",
|
|
173
|
+
"",
|
|
174
|
+
"h1",
|
|
175
|
+
"",
|
|
176
|
+
"h6",
|
|
177
|
+
"pre",
|
|
178
|
+
"", "",
|
|
179
|
+
"script",
|
|
180
|
+
"h5",
|
|
181
|
+
"noscript",
|
|
182
|
+
"",
|
|
183
|
+
"style",
|
|
184
|
+
"iframe",
|
|
185
|
+
"h4",
|
|
186
|
+
"ins",
|
|
187
|
+
"", "", "",
|
|
188
|
+
"h3",
|
|
189
|
+
"", "", "", "",
|
|
190
|
+
"h2"
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
|
|
194
|
+
{
|
|
195
|
+
register int key = hash_block_tag (str, len);
|
|
196
|
+
|
|
197
|
+
if (key <= MAX_HASH_VALUE && key >= 0)
|
|
198
|
+
{
|
|
199
|
+
register const char *s = wordlist[key];
|
|
200
|
+
|
|
201
|
+
if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strncmp (str, s, len) && s[len] == '\0')
|
|
202
|
+
return s;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return 0;
|
|
206
|
+
}
|