Luiserebii
5f2edbd393
Adding info on safestrcpy/safestrcat in README.md
10 months ago
Luiserebii
1592e0dc16
Updating README.md on cstring
10 months ago
Luiserebii
766759ee9e
Modfiying corrected cstring interface, much smoother, and updated Makefile to test
10 months ago
Luiserebii
24328179fb
Refashioning new method to allow for conditional compilation, giving us the override feature we want (tested this out on a seperate piece of code, should work)
10 months ago
Luiserebii
6824f170f7
Worked out logic, fixed string/vector bug, and string should now be const-correct with cstr()!
10 months ago
Luiserebii
97a4876457
Seems like we've fixed things, more or less, by "overloading" vecto_init, though we're getting some serious memory issues via valgrind; perhaps not as simple as I thought
10 months ago
Luiserebii
033d9c3687
Ahhh, I see the segfault for an empty string; we need to ensure that there's allocation for at least some null-terminator to exist
10 months ago
Luiserebii
2698399ca7
Attempting to refactor vector for string
10 months ago
Luiserebii
0824a9ca00
Minor attempt to try to make string cstr() const-correct; deciding to allocate one more for the null term behind the scenes, but required expanding everything, and needs a rewrite. (There is one way to potentially refactor this by giving vector a way to maybe use a macro for allocs that can be supplanted...)
10 months ago
Luiserebii
64f5375f40
This is a little tough... our interface for c-strings might be a little screwed, committing it though
10 months ago
Luiserebii
d9e728e5a8
Continuing to flesh out this attempt to wrap heap c-strings
10 months ago
Luiserebii
49d1837293
Writing a new set of idiomatic OO-like functions for a simple heap-allocated c-string
10 months ago
Luiserebii
d1f6dd11f7
Adding fast version of strcat, both safe and non-safe
10 months ago
Luiserebii
3a2032eca4
Updating README.md to new semantics
10 months ago
Luiserebii
8288f8da0b
Tests for string transitioned, and passing... and, no leaks possible!
10 months ago
Luiserebii
b8fe774a7a
test-vector-point shift compiling, and successful
10 months ago
Luiserebii
6d358937dd
Cleared compiler errors, finally, tests running for our vector-int
10 months ago
Luiserebii
0b552843c7
Finished converting test-vector-int set, now to test for compilation errors
10 months ago
Luiserebii
3066e5902d
Continuing to make appropriate rewrites to tests
10 months ago
Luiserebii
0b21c9585c
Undergoing mass vector test renaming to also correct for current default scheme (vector_type_function)
10 months ago
Luiserebii
1c8a51413a
Finishing up shift to new semantics, now to adjust tests...
10 months ago
Luiserebii
de0297f9f1
Beginning shift to init-deinit, create-destroy semantics
10 months ago
Luiserebii
3ea09cb357
Corrected for const in vector, and formatting changes in README.md
10 months ago
Luiserebii
9adf18c396
Minor corrections/adjustments to README.md
10 months ago
Luiserebii
b801f6c405
Updating README.md with algorithm example
10 months ago
Luiserebii
8172acc4f6
Updating README.md with correct links and a little more documentation
10 months ago
Luiserebii
ae174c4aa9
Tests passing!
10 months ago
Luiserebii
5c8ed82978
malloc(0) is implementation-defined, resulting in either NULL or a pointer value that can be passed to free(); it can also be ralloc()'d simply, so we can allow grow to receive a size the same size as the vector (like 0), in exchange for saving on a control statement.
10 months ago
Luiserebii
11f4e79ecd
Hmmm, very interesting; we've found an edge case through being specific with some of these test cases
10 months ago
Luiserebii
230755183c
Tests passing for string_cmp_cstr
10 months ago
Luiserebii
c920eb008a
Typing up some tests for string_cmp_cstr
10 months ago
Luiserebii
d323bf9595
Minor improvement to string comparison function (I think)
10 months ago
Luiserebii
eef11b237b
Our string comparison is passing... but not as elegant as strcmp, should make a note of this
10 months ago
Luiserebii
6d501272d9
Toying with different ways of implementing this broken string comparison... this is a little tough, to get to the same level of elegance as strcmp
10 months ago
Luiserebii
fa1ec3c368
Adding tests for remaining string functions
10 months ago
Luiserebii
f670e86ac2
Updating README.md
10 months ago
Luiserebii
7a2f9a4921
Added vector_asn function to allow for easy vector assignment (future note, should this be a macro? The compiler should inline it anyways, right? If it should be, then _begin and _end should be switched to macros), and shifted string_set_cstr to string_asn_cstr
10 months ago
Luiserebii
358510717f
Found and fixed bug in string_cmp_cstr
10 months ago
Luiserebii
d05b1c93de
Acknowledging a bug in documentation, and fixing up vector_clear to better reflect what it usually is
10 months ago
Luiserebii
51f1d8668d
Addition of string_cmp-like funciton headers, and fixed small const-correctness issue in vector
10 months ago
Luiserebii
290e70dfe2
Implementing string_cmp for string, and c-string
10 months ago
Luiserebii
d1e03c1722
Adding cstring utility functions
10 months ago
Luiserebii
9db845a3af
Adding a string_cat for cstr as string_cat_cstr
Not sure whether to rename string_set_cstr as string_cpy_cstr... also, considering adding some sort of macro function for vector that just does something like vector_asn, simply assigns directly as a short-hand for vector_assign(a, vector_begin(b), vector_end(b))
10 months ago
Luiserebii
f2ae980f48
Moving include/ files into cstl folder for include convenience, deciding to use this to express this within our test files as well
10 months ago
Luiserebii
f62980016b
Updating README.md
10 months ago
Luiserebii
376f2abd1d
Ahhh, fixed bugs, tests passing, nice
10 months ago
Luiserebii
30d4a1d87a
Fixed compilation errors, now to test
10 months ago
Luiserebii
f53df8cfd6
Adding tests for string_cstr(), now to add header file and compile
10 months ago
Luiserebii
50b506b069
Adding tests for string_cat
10 months ago
Luiserebii
4f615f93b5
Fleshed out test for setting c-strings to strings
10 months ago