Pi66

randoms
Random C experiments.
git clone https://git.pi66.xyz/randoms

← back to log

remove garbage

author: pi66
date: 2025-09-11 14:17
hash: 9e6dc2e28987f6b5cbd9979a43b102a972c27282

Diffstat:

D

sta66/a.c
62 ------------------------------

D

sta66/main
0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff --git a/sta66/a.c b/sta66/a.c
deleted file mode 100644
index 6081ea1..0000000
--- a/sta66/a.c
+++ /dev/null
@@ -1,62 +0,0 @@
-
-typedef struct {
-   char *key;
-   char *value;
-} KeyValue;
-
-typedef struct {
-   KeyValue *items;
-   int count;
-} Section;
-
-
-typedef struct {
-   Section macro;
-   Section block;
-   Section repeat;
-} Config;
-
-Config * init_config()
-{
-   Config *list = malloc(sizeof(Config));
-   if (!list) error("Config","can not initialize.");
-
-   list->macro.items = list->block.items = list->repeat.items = malloc(sizeof(KeyValue));
-   list->macro.count = list->block.count = list->repeat.count = 1;
-
-   return list;
-}
-
-void add_config(Section *header,const char* key,const char* value)
-{
-   header = realloc(header,sizeof(KeyValue) * header->count);
-   header[header->count].items->key = strdup(key);
-   header[header->count].items->value = strdup(value);
-   header->count++;
-}
-
-void free_config(Config *config)
-{
-   for (int i=0;i <= config->macro->count;++i){
-       free(config->macro[i].items->key);
-       free(config->macro[i].items->value);
-   }
-
-   for (int i=0;i <= config->block->count;++i){
-       free(config->block[i].items->key);
-       free(config->block[i].items->value);
-   }
-   for (int i=0;i <= config->repeat->count;++i){
-       free(config->repeat[i].items->key);
-       free(config->repeat[i].items->value);
-   }
-   free(config->macro->items);
-   free(config->macro);
-   free(config->block->items);
-   free(config->block);
-   free(config->repeat->items);
-   free(config->repeat);
-   free(config);
-}
-
-
diff --git a/sta66/main b/sta66/main
deleted file mode 100755
index 56705d4..0000000
Binary files a/sta66/main and /dev/null differ