commit 21575682e4a170f5b042d9f26cf4efad8f22168d Author: Jeff Epler Date: Fri Mar 11 17:11:07 2022 -0600 initial commit diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a57380c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "c2t"] + path = c2t + url = https://github.com/jepler/c2t diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..9f83b17 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +[ -d output ] || mkdir output + +make -C c2t c2t.h +emcc -g -O -Wall -Werror -Wno-unused -s TOTAL_MEMORY=$((2<<28)) -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=1 -s ASSERTIONS=2 -s FORCE_FILESYSTEM=1 -s EXPORTED_RUNTIME_METHODS="['ccall']" -DPACKAGE_STRING=\"bdftopcf\" -Ic2t wrap_c2t.c -o output/index.html --shell-file shell.html diff --git a/c2t b/c2t new file mode 160000 index 0000000..b459cc1 --- /dev/null +++ b/c2t @@ -0,0 +1 @@ +Subproject commit b459cc1b2a537f72f83890e7ff384218438d628c diff --git a/import.py b/import.py new file mode 100755 index 0000000..4d7293d --- /dev/null +++ b/import.py @@ -0,0 +1,30 @@ +#!/usr/bin/python3 +import argparse +import glob +import os +import subprocess +import sys + + +parser = argparse.ArgumentParser() +parser.add_argument("branch", default="gh-pages", nargs="?") +args = parser.parse_args() + +version = subprocess.getoutput("git describe --always") + +fd = os.fdopen(sys.stdout.fileno(), 'wb') + +fd.write(b"commit refs/heads/" + args.branch.encode('utf-8') + b"\n") +fd.write(b"committer Doc Man now" + b"\n") +fd.write(b"data < + + + + + bdftopcf font converter + + + + Convert an apple2 5.25 floppy file to wave format for uploading via the tape interface. + +
emscripten
+
Downloading...
+
+ +
+ +
+ +
+ +
+
+ +
+ + + + {{{ SCRIPT }}} + + diff --git a/wrap_c2t.c b/wrap_c2t.c new file mode 100644 index 0000000..bb8d306 --- /dev/null +++ b/wrap_c2t.c @@ -0,0 +1,16 @@ +#define main c2t_main +#include "c2t/c2t-96h.c" +#undef main + +#include + +int main(int argc, char *argv[]) {} + +EMSCRIPTEN_KEEPALIVE +int wave_convert(char *input_name) { + static char program_name[] = "c2t-96h", + dashb[] = "-b", + output_name[]="/output.wav"; + char *args[] = { program_name, dashb, input_name, output_name, 0 }; + return c2t_main(4, args) == 0; +}