2023-12-07 20:05:35 +01:00
2023-12-07 20:03:18 +01:00
2023-12-07 20:03:18 +01:00
2023-12-07 20:03:18 +01:00
2023-12-07 20:03:18 +01:00
2023-12-07 20:05:35 +01:00
2023-12-07 20:03:18 +01:00

OdwetaLibC

I got bored with having to use complicated checking and stuff when working with files and arrays in C, so I implemented a new file_t struct which can load the contents of a file into a dynamically allocated array (yes, there is an implmentation of those here as well... (vector_t struct)). The struct also stores the number of lines the file has.

Files

What works so far:

  1. Reading files into a 2D vector
  2. Converting a file into a string

TODO:

  1. File writing logic
  2. File appending logic
  • You tell me

Vectors (dynamic arrays)

What works so far:

  1. Dynamically allocated arrays (vectors)
  2. Converting a vector into a string (has to be a char vector)
  3. Popping the last value of a vector and returning it
  4. Getting and setting a value of a vector on a given index
  5. Pushing a value at the end of a vector
  6. Inserting a value into a vector at a given index

TODO:

  1. Insertion of a vector into another vector
  • You tell me
S
Description
No description provided
Readme GPL-3.0
212 KiB
Languages
C 95.5%
Makefile 4.5%