Skip to content

Commit 57e61df

Browse files
Merge pull request fossillogic#78 from dreamer-coding/main
2 parents 4cc1bcb + 4ea9ebe commit 57e61df

File tree

10 files changed

+3257
-20
lines changed

10 files changed

+3257
-20
lines changed

code/logic/archive.c

Lines changed: 594 additions & 0 deletions
Large diffs are not rendered by default.

code/logic/fossil/io/archive.h

Lines changed: 799 additions & 0 deletions
Large diffs are not rendered by default.

code/logic/fossil/io/framework.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "output.h"
3030
#include "input.h"
3131
#include "error.h"
32+
#include "archive.h"
3233
#include "cstring.h"
3334
#include "stream.h"
3435
#include "soap.h"

code/logic/fossil/io/stream.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <stdio.h>
2929
#include <stdint.h>
3030
#include <unistd.h>
31+
#include <stdbool.h>
3132
#include <fcntl.h>
3233

3334
#ifdef __cplusplus

code/logic/meson.build

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ add_project_arguments('-D_POSIX_C_SOURCE=200112L', language: 'c')
44
add_project_arguments('-D_POSIX_C_SOURCE=200112L', language: 'cpp')
55

66
fossil_io_lib = library('fossil_io',
7-
files('parser.c', 'input.c', 'output.c', 'error.c', 'soap.c', 'stream.c', 'cstring.c'),
7+
files(
8+
'parser.c',
9+
'archive.c',
10+
'input.c',
11+
'output.c',
12+
'error.c',
13+
'soap.c',
14+
'stream.c',
15+
'cstring.c'
16+
),
817
install: true,
918
dependencies: [cc.find_library('m', required: false)],
1019
include_directories: dir)

code/logic/output.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void fossil_io_apply_color(const char *color) {
9696
printf(FOSSIL_IO_COLOR_BRIGHT_CYAN);
9797
} else if (strcmp(color, "bright_white") == 0) {
9898
printf(FOSSIL_IO_COLOR_BRIGHT_WHITE);
99-
} else {
99+
} else if (strcmp(color, "reset") == 0) {
100100
printf(FOSSIL_IO_COLOR_RESET); // Reset to default if color not recognized
101101
}
102102
}
@@ -119,6 +119,8 @@ void fossil_io_apply_attribute(const char *attribute) {
119119
printf(FOSSIL_IO_ATTR_ITALIC);
120120
} else if (strcmp(attribute, "strikethrough") == 0) {
121121
printf(FOSSIL_IO_ATTR_STRIKETHROUGH);
122+
} else if (strcmp(attribute, "reset") == 0) {
123+
printf(FOSSIL_IO_ATTR_NORMAL); // Reset to normal if attribute not recognized
122124
}
123125
}
124126

0 commit comments

Comments
 (0)