Make a big amalgamation of HTTP, WL, sqlite alongside cweb
This commit is contained in:
@@ -12,7 +12,7 @@ class Amalgamator:
|
||||
self.out += "// " + file + "\n"
|
||||
self.out += "////////////////////////////////////////////////////////////////////////////////////////\n"
|
||||
self.out += "\n"
|
||||
#self.out += "#line 1 \"" + file + "\"\n"
|
||||
self.out += "#line 1 \"" + file + "\"\n"
|
||||
self.out += open(file).read()
|
||||
|
||||
if len(self.out) > 0 and self.out[len(self.out)-1] != '\n':
|
||||
@@ -35,8 +35,55 @@ header.save("cweb.h")
|
||||
|
||||
source = Amalgamator()
|
||||
source.append_text("#include \"cweb.h\"\n")
|
||||
source.append_text("#define CRYPT_BLOWFISH_NOINCLUDE")
|
||||
source.append_file("src/crypt_blowfish.h")
|
||||
source.append_file("src/crypt_blowfish.c")
|
||||
source.append_text("#define WL_NOINCLUDE\n")
|
||||
source.append_text("#define HTTP_NOINCLUDE\n")
|
||||
source.append_text("#define CRYPT_BLOWFISH_NOINCLUDE\n")
|
||||
|
||||
source.append_file("3p/chttp.h")
|
||||
source.append_file("3p/chttp.c")
|
||||
|
||||
source.append_text("#undef MIN\n")
|
||||
source.append_text("#undef MAX\n")
|
||||
source.append_text("#undef ASSERT\n")
|
||||
source.append_text("#undef SIZEOF\n")
|
||||
source.append_text("#undef TRACE\n")
|
||||
|
||||
source.append_file("3p/sqlite3.c")
|
||||
|
||||
source.append_text("#undef MIN\n")
|
||||
source.append_text("#undef MAX\n")
|
||||
source.append_text("#undef ASSERT\n")
|
||||
source.append_text("#undef SIZEOF\n")
|
||||
source.append_text("#undef TRACE\n")
|
||||
|
||||
source.append_text("#define Scanner WL_Scanner\n")
|
||||
source.append_text("#define Token WL_Token\n")
|
||||
source.append_text("#define is_space is_space__wl\n")
|
||||
source.append_text("#define is_digit is_digit__wl\n")
|
||||
source.append_text("#define is_alpha is_alpha__wl\n")
|
||||
source.append_text("#define is_printable is_printable__wl\n")
|
||||
source.append_text("#define is_hex_digit is_hex_digit__wl\n")
|
||||
source.append_text("#define hex_digit_to_int hex_digit_to_int__wl\n")
|
||||
source.append_text("#define consume_str consume_str__wl\n")
|
||||
|
||||
source.append_file("3p/wl.h")
|
||||
source.append_file("3p/wl.c")
|
||||
|
||||
source.append_text("#undef Scanner\n")
|
||||
source.append_text("#undef Token\n")
|
||||
source.append_text("#undef is_space\n")
|
||||
source.append_text("#undef is_digit\n")
|
||||
source.append_text("#undef is_alpha\n")
|
||||
source.append_text("#undef is_printable\n")
|
||||
source.append_text("#undef is_hex_digit\n")
|
||||
source.append_text("#undef hex_digit_to_int\n")
|
||||
|
||||
source.append_text("#undef MIN\n")
|
||||
source.append_text("#undef MAX\n")
|
||||
source.append_text("#undef ASSERT\n")
|
||||
source.append_text("#undef SIZEOF\n")
|
||||
|
||||
source.append_file("3p/crypt_blowfish.h")
|
||||
source.append_file("3p/crypt_blowfish.c")
|
||||
source.append_file("src/main.c")
|
||||
source.save("cweb.c")
|
||||
|
||||
Reference in New Issue
Block a user