add array functionality

This commit is contained in:
2026-05-05 01:21:11 -05:00
parent fdc5b699bd
commit cb5111de82
5 changed files with 83 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
#ifndef LSORT_H
#define LSORT_H
int add(int x, int y);
#endif

29
include/types.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef LSORT_TYPES_H
#define LSORT_TYPES_H
#include <stddef.h>
#include "string.h"
typedef struct {
const char *buf;
size_t len;
} lsort_string;
typedef struct {
size_t count;
size_t capacity;
int* items;
} lsort_int_array;
lsort_int_array* lsort_create_int_array();
void lsort_int_array_append(lsort_int_array* array, int number);
int lsort_int_array_swap(lsort_int_array* array, int indexA, int indexB);
// struct lsort_int_link {
// int value;
// lsort_int_array* next;
// };
#endif