aboutsummaryrefslogtreecommitdiff
path: root/src/field.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-11-19 19:52:23 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-11-19 19:52:23 +0300
commit03c27c8542d23a5e4072f0c080c396ce608c1d50 (patch)
treea80e7de3bffbf1e17d2f19dc8a50f9bdd3ececc5 /src/field.c
parent42bb3d37c156df14560347d4c7df3f0dd0551389 (diff)
downloadmagi-03c27c8542d23a5e4072f0c080c396ce608c1d50.tar
magi-03c27c8542d23a5e4072f0c080c396ce608c1d50.tar.xz
magi-03c27c8542d23a5e4072f0c080c396ce608c1d50.zip
.
Diffstat (limited to 'src/field.c')
-rw-r--r--src/field.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/field.c b/src/field.c
deleted file mode 100644
index 6358151..0000000
--- a/src/field.c
+++ /dev/null
@@ -1,53 +0,0 @@
-#include "field.h"
-
-#include "error.h"
-#include "param.h"
-#include <stdlib.h>
-#include <string.h>
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Form Field
- */
-int magi_field_list_add(struct magi_field_list ** list,
- struct magi_field * item)
-{
- struct magi_field_list * old = *list;
- int ok = 1;
- *list = malloc(sizeof(**list));
- if (*list) {
- (*list)->next = old;
- (*list)->item = *item;
- } else {
- ok = 0;
- magi_error_set("[field:list] Cannot allocate new list node.");
- *list = old;
- }
- return ok;
-}
-
-struct magi_field * magi_field_list_get(struct magi_field_list * list,
- const char * name)
-{
- struct magi_field * item = 0;
- if (list && name) {
- if (!strcmp(list->item.name, name)) {
- item = &list->item;
- } else {
- item = magi_field_list_get(list->next, name);
- }
- }
- return item;
-}
-
-void magi_field_list_destroy(struct magi_field_list * list)
-{
- if (list) {
- magi_field_list_destroy(list->next);
- magi_param_list_destroy(list->item.params);
- free(list->next);
- free(list->item.name);
- free(list->item.data);
- free(list->item.params);
- }
-}