From 88081d9a4376b1ee4feed3bc843c46096e087b1e Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 22 Nov 2019 18:55:54 +0300 Subject: . --- src/param.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/param.h') diff --git a/src/param.h b/src/param.h index 21e9538..6fd0ba0 100644 --- a/src/param.h +++ b/src/param.h @@ -5,36 +5,28 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Parameter */ -enum { magi_param_max = 1024 }; - struct magi_param { - char * name; /* name: free(name) is valid. */ - char * data; /* data: free(data) is valid. */ + char * name; + char * data; }; -/* Null is valid "struct magi_param_list *" object. */ struct magi_param_list { struct magi_param_list * next; struct magi_param item; }; -/* - * Adds *item to the begining of *list, item and list are dereferencable; - * Returns null in case of error. - */ + +/* Adds *item to the begining of *list, item and list are dereferencable; + * Returns null in case of error. */ int magi_param_list_add(struct magi_param_list ** list, struct magi_param * item); -/* - * Searchs for first node in list: node.name == name, name is C-string; - * Returns node itself if succeed, otherwise result is null. - */ +/* Searchs for first node in list: node.name == name, name is C-string; + * Returns node itself if succeed, otherwise result is null. */ struct magi_param * magi_param_list_get(struct magi_param_list * list, const char * name); -/* - * Destroys list; list is not valid after destruction. - */ +/* Destroys list; list is not valid after destruction. */ void magi_param_list_destroy(struct magi_param_list * list); -- cgit v1.2.3