This commit is contained in:
parent
3de3860163
commit
a04e00132c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: val.c 155 2008-03-22 06:47:27Z baconevi $
|
* $Id: val.c 156 2008-03-22 12:09:35Z baconevi $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -206,7 +206,7 @@ ase_awk_val_t* ase_awk_makerealval (ase_awk_run_t* run, ase_real_t v)
|
|||||||
|
|
||||||
c->next = run->vmgr.rchunk;
|
c->next = run->vmgr.rchunk;
|
||||||
/*run->vmgr.rchunk = c;*/
|
/*run->vmgr.rchunk = c;*/
|
||||||
run->vmgr.ichunk = (ase_awk_val_chunk_t*)c;
|
run->vmgr.rchunk = (ase_awk_val_chunk_t*)c;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
x = (ase_awk_val_real_t*)(c + 1);
|
x = (ase_awk_val_real_t*)(c + 1);
|
||||||
@ -1066,9 +1066,11 @@ static int print_pair (ase_pair_t* pair, void* arg)
|
|||||||
{
|
{
|
||||||
ase_awk_run_t* run = (ase_awk_run_t*)arg;
|
ase_awk_run_t* run = (ase_awk_run_t*)arg;
|
||||||
|
|
||||||
DPRINTF (DCUSTOM, ASE_T(" %s=>"), pair->key);
|
DPRINTF (DCUSTOM, ASE_T(" %.*s=>"),
|
||||||
|
(int)ASE_PAIR_KEYLEN(pair), ASE_PAIR_KEYPTR(pair));
|
||||||
ase_awk_dprintval ((ase_awk_run_t*)arg, pair->val);
|
ase_awk_dprintval ((ase_awk_run_t*)arg, pair->val);
|
||||||
DPRINTF (DCUSTOM, ASE_T(" "));
|
DPRINTF (DCUSTOM, ASE_T(" "));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: map.c 116 2008-03-03 11:15:37Z baconevi $
|
* $Id: map.c 156 2008-03-22 12:09:35Z baconevi $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -17,6 +17,7 @@ static int rehash (ase_map_t* map);
|
|||||||
ASE_FREE ((map)->mmgr, pair); \
|
ASE_FREE ((map)->mmgr, pair); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
/*
|
||||||
#define RECYCLE_PAIR(map,pair) \
|
#define RECYCLE_PAIR(map,pair) \
|
||||||
do { \
|
do { \
|
||||||
if ((map)->freeval != ASE_NULL) \
|
if ((map)->freeval != ASE_NULL) \
|
||||||
@ -24,6 +25,7 @@ static int rehash (ase_map_t* map);
|
|||||||
(pair)->next = (map)->fp; \
|
(pair)->next = (map)->fp; \
|
||||||
(map)->fp = (pair); \
|
(map)->fp = (pair); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
*/
|
||||||
|
|
||||||
ase_map_t* ase_map_open (
|
ase_map_t* ase_map_open (
|
||||||
void* owner, ase_size_t capa, unsigned int factor,
|
void* owner, ase_size_t capa, unsigned int factor,
|
||||||
@ -247,8 +249,7 @@ ase_pair_t* ase_map_getpair (
|
|||||||
return pair;
|
return pair;
|
||||||
}
|
}
|
||||||
|
|
||||||
ase_pair_t* ase_map_setpair (
|
ase_pair_t* ase_map_setpair (ase_map_t* map, ase_pair_t* pair, void* val)
|
||||||
ase_map_t* map, ase_pair_t* pair, void* val)
|
|
||||||
{
|
{
|
||||||
/* use this function with care */
|
/* use this function with care */
|
||||||
if (ASE_PAIR_VAL(pair) == val)
|
if (ASE_PAIR_VAL(pair) == val)
|
||||||
@ -312,8 +313,7 @@ int ase_map_remove (
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ase_map_walk (ase_map_t* map,
|
int ase_map_walk (ase_map_t* map, int (*walker) (ase_pair_t*,void*), void* arg)
|
||||||
int (*walker) (ase_pair_t*,void*), void* arg)
|
|
||||||
{
|
{
|
||||||
ase_size_t i;
|
ase_size_t i;
|
||||||
ase_pair_t* pair, * next;
|
ase_pair_t* pair, * next;
|
||||||
@ -333,8 +333,7 @@ int ase_map_walk (ase_map_t* map,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ase_pair_t* ase_map_getfirstpair (
|
ase_pair_t* ase_map_getfirstpair (ase_map_t* map, ase_size_t* buckno)
|
||||||
ase_map_t* map, ase_size_t* buckno)
|
|
||||||
{
|
{
|
||||||
ase_size_t i;
|
ase_size_t i;
|
||||||
ase_pair_t* pair;
|
ase_pair_t* pair;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user