aciplist in config file.

FossilOrigin-Name: 0ae2ea51cbbb8c346b811c5ed15b41fb1445a9e97b574379596be9333f051858
This commit is contained in:
7u83@mail.ru
2015-04-24 05:13:54 +00:00
parent 035e0a38c7
commit 99beef377e
17 changed files with 196 additions and 47 deletions

View File

@ -1,8 +1,8 @@
#ifndef __ACIPRIORITYLIST_H
#define __ACIPRIORITYLIST_H
#include "avltree.h"
#include "mavl.h"
//#include "mavl.h"
struct cw_acprio{
char *name;
@ -10,7 +10,7 @@ struct cw_acprio{
};
typedef struct cw_acprio cw_acprio_t;
typedef struct avltree * cw_acpriolist_t;
typedef struct mavl * cw_acpriolist_t;
extern cw_acpriolist_t cw_acpriolist_create();
cw_acprio_t * cw_acpriolist_add(cw_acpriolist_t l, const char *name,int name_len, uint8_t prio);
@ -19,13 +19,13 @@ static inline int cw_acpriolist_get(cw_acpriolist_t l, char * acname){
cw_acprio_t ps,*pf;
ps.name=acname;
pf=avltree_get(l,&ps);
pf=mavl_get(l,&ps);
if (!pf)
return 256;
return pf->prio;
}
#define cw_acpriolist_del(l,s) avltree_del(l,s)
#define cw_acpriolist_del(l,s) mavl_del(l,s)
#define cw_acpriolist_set(l,n,nl,p) cw_acpriolist_add(l,n,nl,p)
#endif