Pi66

Home | Repos | About | Blog | Gaza

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

About | Files | Commits | Refs | License


remove garbage

Author: pi66
Date: 2025-09-11 14:17
commit: 9e6dc2e2

Stat

D sta66/a.c 62 +0 -62

Diff

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;

...
Show all
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

// Created by Pi66

// Copyright ©Pi66 2026