1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2025-05-21 23:21:15 +02:00

feat!: rename types string to string_t and byte to byte_t

This commit is contained in:
2023-06-25 15:03:04 +02:00
parent 8f3ee199e5
commit 1ded37b106
13 changed files with 100 additions and 100 deletions

View File

@ -1,6 +1,6 @@
#include "filesystem.h"
int filesystem_read(string path, byte **file_content, off_t *file_size) {
int filesystem_read(string_t path, byte_t **file_content, off_t *file_size) {
int file_descriptor = open(path, O_RDONLY);
if (file_descriptor == -1) {
return -1;
@ -15,7 +15,7 @@ int filesystem_read(string path, byte **file_content, off_t *file_size) {
return 0;
}
int filesystem_write(string path, byte *file_content, off_t file_size) {
int filesystem_write(string_t path, byte_t *file_content, off_t file_size) {
int file_descriptor = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (file_descriptor == -1) {
return -1;
@ -27,7 +27,7 @@ int filesystem_write(string path, byte *file_content, off_t file_size) {
return 0;
}
char *filesystem_get_mimetype(string path) {
char *filesystem_get_mimetype(string_t path) {
if (string_ends_with(path, ".html")) {
return "text/html";
}