Commit Graph

138 Commits (c1b6c3005f2e7125849eec2326eb0ab2cd20be6f)

Author SHA1 Message Date
Milan Suman c1b6c3005f lib/java_string: fix end character issues 2022-07-20 08:39:29 +05:30
BodgeMaster 45538e156a lib/java_string: replace std::vector with std::string 2022-07-20 04:23:06 +02:00
BodgeMaster 34e30c0bd4 test/java_string: replace tabs with spaces, fix how tiny_utf8::string is being instantiated 2022-07-20 04:02:44 +02:00
BodgeMaster e184acde00 lib/java_string: rename functions
JavaCompat::importJavaFormatToString() → JavaCompat::importJavaString()
JavaCompat::exportStringToJavaFormat() → JavaCompat::exportJavaString()
2022-07-20 04:00:17 +02:00
Milan Suman 42336c560a Birthed an abomination, what the fuck 2022-07-18 12:13:10 +05:30
BodgeMaster a3a9078965 build system: include tinyutf8 in include path 2022-07-17 13:03:19 +02:00
BodgeMaster 79f58a6242 lib/java_string: add placeholder functions 2022-07-17 13:02:45 +02:00
BodgeMaster 2cbf048f2e lib/cli: make flags return more accurate error codes
revealed by writing a test and it behaving differently from what I expected
2022-07-17 12:09:19 +02:00
BodgeMaster 4ceaca745b test/cli_argument_parser: notes outlining what additional tests are needed 2022-07-15 19:47:07 +02:00
BodgeMaster db6e543c5c test/cli_argument_parser: add a test for dealing with "empty" command lines 2022-07-15 19:46:20 +02:00
BodgeMaster 8835b90398 test/cli_argument_parser: rename everything to have nice long descriptive names
This is in preparation for adding more tests that require the same kinds of components.
2022-07-15 19:43:17 +02:00
BodgeMaster efa4fa560e tools/hexnet: replace built-in argument parser with lib/cli
This is the entire reason I build lib/cli in the first place:
Parsing arguments directly in a given program tends to get really messy,
not to mention all the different ways that arguments can be specified
and the redundant work required to do that on multiple programs.
2022-07-15 13:51:19 +02:00
BodgeMaster 4c3d2fdbbf lib/cli: ArgumentsParser constructor can accept both char** and const char** 2022-07-15 13:49:43 +02:00
BodgeMaster 3b1d288d1e test/cli_argument_parser add an assertion to the valid input test that expects the value of unpositional arguments that are not present to be "" 2022-07-15 13:44:56 +02:00
BodgeMaster 362ec5f4f9 Build system: symlink dependency libs to bin/lib 2022-07-15 13:43:58 +02:00
BodgeMaster b18a97713d test/cli_argument_parser: fix using delete instead of delete[] on pointer array 2022-07-15 11:47:19 +02:00
BodgeMaster 9ce979aa7c lib/cli: first unit test implemented 2022-07-15 11:33:02 +02:00
BodgeMaster 82d611b984 lib/cli: various fixes
- argumentWaitingForValue was never reset after the value had been retrieved
- made it so the ArgumentsParser constructor can accept const char**
- correct usage of substr() and actually use the correct position in the first place
- fix a typo where I tried to dereference `this` with `-` instead of `->`
2022-07-15 11:21:18 +02:00
BodgeMaster f5b0b74f94 lib/cli: remove useless arguments from getters, remove useless getter getProgramName (made the string public instead) 2022-07-15 09:11:39 +02:00
BodgeMaster a1223ea4b9 Minor improvements and fixes.
test/nbt_helpers: add a headline to output
Build system: remove comma from array that I added bc I thought it was correct sytax, it wasn't
lib/cli: change argument order of PositionalArgument constructor to fit in with Flag and UnpositionalArgument
lib/cli: properly define what is private and what is public in the ArgumentsParser class
2022-07-15 08:54:09 +02:00
BodgeMaster 390087fc35 lib/cli: finish initial implementation
This should be all functionality that is needed for now.
The next step is building unit tests to check that everything works correctly.

Who am I kidding? There will most certainly be bugs in there given that this
code has been typed out without ever being run.
2022-07-14 04:57:48 +02:00
BodgeMaster a2084e296a lib/error: Remove ErrorOr<T>(bool) constructor
This allows ErrorOr<T> to be used for bool, as there would be conflicting
constructors otherwise.

Also, we have ErrorCodes::UNKNOWN now so, instead of `ErrorOr<T>(true)`,
`ErrorOr<T>(true, ErrorCodes::UNKNOWN)` can be used.
2022-07-14 03:58:13 +02:00
BodgeMaster e6f4884b60 lib/error: finally removed that useless cpp file 2022-07-14 03:16:58 +02:00
BodgeMaster 91f3dfaa5e lib/cli: Add a library for command line arguments parsing
This has the parser itself already implemented, all other functionality is still
missing. So are tests.

Yes, I’m making my own getopt. Let me.
2022-07-14 03:13:48 +02:00
BodgeMaster 7e049fcfd1 lib/error: rename and add error constants 2022-07-13 22:01:18 +02:00
BodgeMaster c406555e4e tools/hexnet: argument parser fix 2022-07-13 20:35:33 +02:00
BodgeMaster 5cb1a52ec4 tools/hexnet: replace "server" with "listen" because that's what netcat calls it and the argument we use is -l like netcat's listen mode 2022-07-13 20:30:27 +02:00
BodgeMaster 9639ef065f tools/hexnet: Work on argument parser to finish suppurt for client mode 2022-07-13 20:27:58 +02:00
BodgeMaster 310011a6da tools/hexnet: replace exit codes with macros to improve readability 2022-07-13 06:06:09 +02:00
BodgeMaster 6a5096dfa3 tools/hexnet: add server/client concept to arguments parser 2022-07-13 06:03:41 +02:00
BodgeMaster b3cd8709fb Tools: Add WIP hexnet tool. This will be similar to hexdump and netcat in one.
Yes, I am using this as an exercise for myself to figure out networking.
2022-07-12 05:13:01 +02:00
BodgeMaster eaedc0cb56 Build instructions: add missing dep 2022-07-12 05:12:23 +02:00
BodgeMaster e608d82444 Dependencies: add sockpp 2022-07-12 01:51:23 +02:00
Shwoomple e01ce8f0ce gitignore: Update gitignore for vscode 2022-07-06 18:33:42 +05:30
Shwoomple 346161de1d Merge branch 'master' of https://lostcave.ddnss.de/git/BodgeMaster/FOSS-VG 2022-07-06 18:30:16 +05:30
Shwoomple 68484c6a20 NBT: Moar nbt helper functions. Add all functions in issue #18 except writeString 2022-07-06 18:28:02 +05:30
BodgeMaster a1b200b694 Build system: verify downloaded files 2022-07-06 14:15:40 +02:00
BodgeMaster 91ec84e625 Documentation: Fix typos and formatting 2022-07-06 13:57:07 +02:00
Shwoomple 847b73c6ae NBT: implement the overloaded writeInt8Array 2022-07-06 17:16:47 +05:30
BodgeMaster ecd1bfa496 Merge branch 'master' of https://lostcave.ddnss.de/git/BodgeMaster/FOSS-VG 2022-07-06 13:33:44 +02:00
BodgeMaster bb8c597ec2 Documentation: add detailed build system documentation, add documentation for some files in resources 2022-07-06 13:33:10 +02:00
Shwoomple 18184294df Merge branch 'master' of https://lostcave.ddnss.de/git/BodgeMaster/FOSS-VG 2022-07-06 16:30:16 +05:30
Shwoomple 8d8c1e6b90 NBT: change "[]" to "Array" in unit test messages. 2022-07-06 16:28:08 +05:30
Shwoomple b0ccc74409 NBT: Added writeInt8Array. 2022-07-06 16:27:32 +05:30
BodgeMaster 4e2a9f6297 Environment: remove useless environment variable specification from build alias 2022-07-06 12:29:52 +02:00
BodgeMaster 3f6e74ed4e Build system: add single threaded mode 2022-07-06 10:50:55 +02:00
BodgeMaster 51200e7d75 Resources: Add two files that contain the same data, one being normal UTF-8, the other being Java-style unicode 2022-07-05 19:57:43 +02:00
BodgeMaster b428b17647 Reoucres: add a Java tool to convert normal strings into Java-style strings 2022-07-05 19:35:37 +02:00
BodgeMaster 762ba7f089 NBT: add write helpers for float types 2022-07-04 19:43:31 +02:00
BodgeMaster 8c7be385ae NBT: add write helpers for int32 and int64 2022-07-04 18:29:38 +02:00