1
0
Fork
You've already forked m2h
0
No description
  • C 86.2%
  • Makefile 13.8%
2025年11月24日 16:26:04 -05:00
LICENSE add license and readme 2025年01月26日 00:55:16 -05:00
m2h.c formatting and more cleanup 2025年11月24日 16:26:04 -05:00
Makefile added malloc wrappers and new makefile target 2025年03月01日 13:32:16 -05:00
README.md added malloc wrappers and new makefile target 2025年03月01日 13:32:16 -05:00
test.txt adding back *working* repetitive code lol. my original fix wasn't really a fix 2025年11月23日 19:03:12 -05:00

(WIP) m2h

a second attempt at making a markup-to-html converter in c89.

requirements

a C compiler

quick start

run the following commands:

make
./m2h <filename>

compiling

run make

using m2h

m2h takes a filename as an argument, and then converts the contents of the file into html. after m2h converts the contents of the file to html, m2h prints html to stdout.

for example, to convert a file named my_file.txt, you can run the following command:

./m2h my_file.txt

to write the generated html to a file, instead of to stdout, you can run the following command:

./m2h my_file.txt > index.html

testing

  1. ensure you have clang on your system
  2. run make check

if you want to do similar checks with gcc, there is a extra_check makefile target that you can use by running the following command:

make extra_check

originally, similar sanitizer/memory checks using gcc and valgrind were included in the check makefile target, but too many false positives or unrealistic warnings related to cwe-401 kept occuring, so the sanitization checks that caused those false positives were removed, and the remaining checks were moved into the extra_check makefile target.