REFACTOR: Translated to internal file for setup towards singular Vec
This commit is contained in:
+9
-18
@@ -12,31 +12,22 @@
|
||||
* String 32 Bits with suffix of 's'
|
||||
*/
|
||||
|
||||
#include <libvec.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "char.h"
|
||||
#include "utils.h"
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
char ar1[] = { '1', '2', '3', '4' };
|
||||
char ar2[] = { 'a', 'b', 'c', 'd' };
|
||||
// Vec8_t v1;
|
||||
Vec8_t v1 = create(ar2, find_len(ar2));
|
||||
// char ar1[] = { '1', '2', '3', '4' };
|
||||
// char ar2[] = { 'a', 'b', 'c', 'd' };
|
||||
// Vec8_t v1 = create(ar2, find_len(ar2));
|
||||
// v1 = reserve(&v1, 9);
|
||||
// print_vec(&v1);
|
||||
// v1 = insert(&v1, 1, 'x');
|
||||
// v1 = resize(&v1, 12);
|
||||
// print_vec(&v1);
|
||||
// printf("Hello\n");
|
||||
// v1 = assign(&v1, &v2, 0, 1);
|
||||
v1 = reserve(&v1, 9);
|
||||
print_vec(&v1);
|
||||
v1 = insert(&v1, 1, 'x');
|
||||
v1 = resize(&v1, 12);
|
||||
// v1 = insert(&v1, 1, 5, 'a');
|
||||
// printf("%c", at(&v1, 1));
|
||||
// printf("RESERVED SIZE: %zu", v1.max_size);
|
||||
print_vec(&v1);
|
||||
// v2 = resize(&v2, 3);
|
||||
|
||||
// print_vec(&v2);
|
||||
@@ -58,7 +49,7 @@ main()
|
||||
// v1 = push_back(&v1, 'a');
|
||||
// print_vec(&v1);
|
||||
// printf("SIZE: %zu\n", v1.size);
|
||||
delete(&v1);
|
||||
// delete(&v1);
|
||||
// delete(&v2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user