Commit Graph

160 Commits

Author SHA1 Message Date
Jordan Bancino 5067b5bcf0 Remove `send-patch` and `tp`. See #20. 2023-09-11 19:53:31 +02:00
Jordan Bancino fd28f97449 Finish remaining issues in TODO.txt and add docs/ROADMAP.md. 2023-09-05 21:30:09 -04:00
Jordan Bancino 1c32e18c74 Json now uses Int64 for integers.
This should fix all timestamp errors on 32-bit systems in Cytoplasm and
Telodendria.
2023-08-13 03:11:40 +00:00
Jordan Bancino 5f3220372e Implement filter validation by using j2s. 2023-08-05 13:46:23 +00:00
Jordan Bancino c96ac30f28 Fix Unicode handling in Json, don't sign-extend bytes in Stream. 2023-07-15 17:57:21 +00:00
Jordan Bancino 539fde773f Fix CanonicalJson and ArraySort. 2023-06-21 02:37:56 +00:00
Jordan Bancino e3badbd55c Format source code. 2023-06-18 02:53:52 +00:00
Jordan Bancino 8f0d197480 Bump version: v0.3.0 -> v0.4.0 2023-06-16 16:01:19 +00:00
Jordan Bancino 1f14169284 Apply #70: Fix warnings of unused variables. 2023-06-12 14:10:08 +00:00
Jordan Bancino 2f946848cb Telodendria Bot can now send messages again.
The problem here is that some Matrix homeservers reject requests that don't
have a Content-Length. http was not sending a Content-Length because it was
reading from standard input. By reading from an actual file, we can actually
easily get the size of the file to send as the Content-Length.
2023-06-12 14:01:56 +00:00
Jordan Bancino af15234799 Make the debug server more accurately mimic the actual server. 2023-06-10 13:16:41 +00:00
Jordan Bancino 88f73a6131 Fix a few segfaults in http and json. 2023-05-29 22:48:50 +00:00
Jordan Bancino d81600d944 Fix more memory leaks in json.
By doing a little reference tracking, we can make sure we don't miss any
JsonValues that may be floating around by the time we're done.
2023-05-26 22:11:07 +00:00
Jordan Bancino 2693b89598 Add sane default memory hook to Cytoplasm, fix more leaks in json. 2023-05-23 22:43:37 +00:00
Jordan Bancino e22cf38eac Fix leaks in json. 2023-05-23 20:34:27 +00:00
Jordan Bancino b1049a9a70 Fix leak in http. 2023-05-23 20:19:27 +00:00
Jordan Bancino 441599b088 Don't leak so much memory. 2023-05-23 17:53:19 +00:00
Jordan Bancino 51b9e2eaed Clean Cytoplasm when td clean is run. 2023-05-21 13:34:05 +00:00
Jordan Bancino f2f972bb9d Fix memory leaks in hdoc. 2023-05-15 22:38:52 +00:00
Jordan Bancino 4043285413 Telodendria and all tools now use the Cytoplasm runtime stub.
This reduces the amount of manual work programs have to do, and gives us
some free features, like automatic leak reports in all tools.
2023-05-14 22:15:48 +00:00
Jordan Bancino 8021cff122 Make Telodendria use Cytoplasm.
This commit removes all the duplicate code and makes Telodendria use the
new Cytoplasm library.
2023-05-14 19:35:23 +00:00
Jordan Bancino 609890654e Fix handling of STATIC and broken compilation on GNU systems. 2023-05-10 03:32:56 +00:00
Jordan Bancino 0b11b97022 Add StrEquals(), as equality checking is the most common use for strcmp().
This allows us to get rid of the hideous MATRIX_PATH_PART_EQUALS macro,
and prevents inconsistent usage of strcmp() (for example, !strcmp() vs
strcmp() == 0).

StrEquals() also has sensible behavior for dealing with NULL strings (it
doesn't just segfault like strcmp()).
2023-05-06 22:34:36 +00:00
Jordan Bancino 95ceba0645 Add length calculations to JsonEncode() so we can set Content-Length. 2023-05-06 19:23:13 +00:00
Jordan Bancino 3d9a7664b1 Add support for building static and shared libraries. 2023-05-06 17:04:35 +00:00
Jordan Bancino f1f66c6331 Fix the Makefile by sourcing tools/env.sh if TELODENDRIA_ENV is unset. 2023-04-30 01:47:27 +00:00
Jordan Bancino abbbfe4d7f Replace all usages of curl in tp, document tp and tt. 2023-04-29 23:28:33 +00:00
Jordan Bancino e0c94d7bd2 Site now pulls built man pages. 2023-04-29 18:39:01 +00:00
Jordan Bancino f819093b7d Don't spew unknown expression warnings if @suppress-warnings is set. 2023-04-29 15:28:42 +00:00
Jordan Bancino 0b1b4a8b29 Cope with preprocessor macro usage at the top level of the header.
This workaround allows us to parse the Routes.h properly, although it
notably lacks support for multi-word unknown expressions.
2023-04-29 15:24:46 +00:00
Jordan Bancino b70c3f0bed Finish converting all existing documentation. Next up is writing new docs. 2023-04-29 02:54:49 +00:00
Jordan Bancino 71fa96d10d Format source code. 2023-04-27 20:05:08 +00:00
Jordan Bancino a00ded6d06 Add support for parsing global variables, not just function declarations. 2023-04-27 20:04:15 +00:00
Jordan Bancino 9292f1d9da Add docs recipe for generating documentation from the headers.
Note that since all the headers are not documented yet, this will fail
because an undocumented function is a fatal error in hdoc.
2023-04-27 18:39:05 +00:00
Jordan Bancino 9880aac674 Split format recipe into format and license.
Format formats only C source code. License applies the license file to
C source code *and* header files.
2023-04-27 18:03:32 +00:00
Jordan Bancino 72467f6503 Begin moving documentation to headers. 2023-04-27 03:08:39 +00:00
Jordan Bancino 3b06ab120b Add some flags to hdoc to make it more useful. 2023-04-27 02:30:44 +00:00
Jordan Bancino 2447bb63cc Add hdoc, a simple tool for generating documentation from a C header.
This is a very early prototype. It works, but it is probably not efficient
or reliable. However, the documentation format it parses is stable, so I
will begin moving the documentation into the headers.
2023-04-27 01:34:49 +00:00
Jordan Bancino fdcf7ec065 Update changelog, add LD_EXTRA variable in td. 2023-04-26 01:43:32 +00:00
Jordan Bancino 459b2e856f Format source code. 2023-04-25 22:13:28 +00:00
Jordan Bancino d933d12e1b Make Rand use a provided Mersenne Twister.
This implementation is loosely inspired by the original paper on the
Mersenne Twister, and borrows code from a public-domain implementation of
it, adapting it to fit the style of Telodendria's code, and fixing a few
bugs regarding the size of the data type used.

Neither C nor POSIX provide a good, thread-safe pseudorandom number
generator. The OpenBSD linker started complaining about the use of
rand_r(), and no standard alternative presented itself as worthy of
consideration, so I finally decided it was time to roll my own PRNG.
2023-04-25 21:28:55 +00:00
Jordan Bancino 098eed44a0 Fix bug in MatrixWellKnown(), begin /_matrix/client/v3/capabilities 2023-04-25 18:37:25 +00:00
Jordan Bancino 737e060243 Finish up Uia fallback. 2023-04-22 15:40:25 +00:00
Jordan Bancino 0cca38115a Move configuration to database, add process control API, fix memory leaks. 2023-04-19 00:33:38 +00:00
Jordan Bancino 3192063340 Fix broken tt script. 2023-04-07 14:20:22 +00:00
Jordan Bancino e0c8530b12 Clean up http client enough to replace curl in send-patch. 2023-04-01 02:46:07 +00:00
Jordan Bancino e592840c99 Clean up some HTTP client stuff. 2023-04-01 02:13:41 +00:00
Jordan Bancino 7b3d537175 Remove UtilStreamCopy() 2023-04-01 00:20:18 +00:00
Jordan Bancino aeb49f80e5 Add support for OpenSSL. This is a good demo of how easy it is to support TLS libraries. 2023-03-24 02:41:01 +00:00
Jordan Bancino 007e639b0c Don't require the TLS_ in the environment variable.
It's redundant.
2023-03-24 00:25:44 +00:00