From 8dbfb0890560fd1cd698d06fa05ac868c4db8576 Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Mon, 22 Jun 2020 20:53:39 +0200 Subject: Removes 'cruft' from cmark. We only care for the source anyways. --- lib/cmark/tools/appveyor-build.bat | 13 -- lib/cmark/tools/make_entities_inc.py | 32 ---- lib/cmark/tools/mkcasefold.pl | 22 --- lib/cmark/tools/xml2md.xsl | 319 ----------------------------------- 4 files changed, 386 deletions(-) delete mode 100644 lib/cmark/tools/appveyor-build.bat delete mode 100644 lib/cmark/tools/make_entities_inc.py delete mode 100755 lib/cmark/tools/mkcasefold.pl delete mode 100644 lib/cmark/tools/xml2md.xsl (limited to 'lib/cmark/tools') diff --git a/lib/cmark/tools/appveyor-build.bat b/lib/cmark/tools/appveyor-build.bat deleted file mode 100644 index 73d555b..0000000 --- a/lib/cmark/tools/appveyor-build.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -if "%MSVC_VERSION%" == "10" goto msvc10 - -call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" amd64 -goto build - -:msvc10 -call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 - -:build -nmake - diff --git a/lib/cmark/tools/make_entities_inc.py b/lib/cmark/tools/make_entities_inc.py deleted file mode 100644 index 7b8ee41..0000000 --- a/lib/cmark/tools/make_entities_inc.py +++ /dev/null @@ -1,32 +0,0 @@ -# Creates C data structures for binary lookup table of entities, -# using python's html5 entity data. -# Usage: python3 tools/make_entities_inc.py > src/entities.inc - -import html - -entities5 = html.entities.html5 - -# remove keys without semicolons. For some reason the list -# has duplicates of a few things, like auml, one with and one -# without a semicolon. -entities = sorted([(k[:-1], entities5[k].encode('utf-8')) for k in entities5.keys() if k[-1] == ';']) - -# Print out the header: -print("""/* Autogenerated by tools/make_headers_inc.py */ - -struct cmark_entity_node { - unsigned char *entity; - unsigned char bytes[8]; -}; - -#define CMARK_ENTITY_MIN_LENGTH 2 -#define CMARK_ENTITY_MAX_LENGTH 32""") - -print("#define CMARK_NUM_ENTITIES " + str(len(entities))); - -print("\nstatic const struct cmark_entity_node cmark_entities[] = {"); - -for (ent, bs) in entities: - print('{(unsigned char*)"' + ent + '", {' + ', '.join(map(str, bs)) + ', 0}},') - -print("};") diff --git a/lib/cmark/tools/mkcasefold.pl b/lib/cmark/tools/mkcasefold.pl deleted file mode 100755 index 740ce77..0000000 --- a/lib/cmark/tools/mkcasefold.pl +++ /dev/null @@ -1,22 +0,0 @@ -binmode STDOUT; -print(" switch (c) {\n"); -my $lastchar = ""; -while () { - if (/^[A-F0-9]/ and / [CF]; /) { - my ($char, $type, $subst) = m/([A-F0-9]+); ([CF]); ([^;]+)/; - if ($char eq $lastchar) { - break; - } - my @subst = $subst =~ m/(\w+)/g; - printf(" case 0x%s:\n", $char); - foreach (@subst) { - printf(" bufpush(0x%s);\n", $_); - } - printf(" break;\n"); - $lastchar = $char; - } -} -printf(" default:\n"); -printf(" bufpush(c);\n"); -print(" }\n"); - diff --git a/lib/cmark/tools/xml2md.xsl b/lib/cmark/tools/xml2md.xsl deleted file mode 100644 index 0122e5f..0000000 --- a/lib/cmark/tools/xml2md.xsl +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - Unsupported element '' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *** - - - - - - - - - - - - - - - - - - . - ) - - - - - - - - - - - - - - - - - - - - - - - > - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \. - - - - - - - \) - - - - - - - \ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * - - * - - - - ** - - ** - - - - - - - - - - - - - - - - - - - - - ! - [ - - ]( - - - - - - " - - - - - " - - ) - - - - - - - - - - - - - - - - - - - - - \ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3