payredu

Cross-platform ledger GUI written in c99
git clone git@getsh.org:payredu.git
Log | Files | Refs | README

account.h (660B)


      1 #ifndef __PAYEREDO_ACCOUNT_H
      2 #define __PAYEREDO_ACCOUNT_H
      3 
      4 #include <string.h>
      5 #include <assert.h>
      6 
      7 #include <vstr.h>
      8 
      9 struct map_tree;
     10 
     11 struct map_tree {
     12 	vstr_t *value;
     13 	size_t children_cap;
     14 	size_t children_len;
     15 	struct map_tree* children;
     16 };
     17 
     18 typedef struct map_tree map_tree_t;
     19 
     20 // acc: this:is:us
     21 //root->|this|->|is|->|us|
     22 //	->children
     23 //			->children
     24 //				  ->children
     25 
     26 // TODO handle both rootp,this:is:us case and rootp->children,is:us case
     27 // Currently only the rootp->value and acc are compared
     28 
     29 map_tree_t *account_search(map_tree_t *rootp, char *acc, size_t acc_size);
     30 
     31 
     32 int account_add(map_tree_t **rootp, char *acc, size_t acc_size);
     33 
     34 #endif