From: Michael Schroeder Date: Wed, 28 Mar 2012 10:31:22 +0000 (+0200) Subject: - rename map_and_not to map_subtract X-Git-Tag: BASE-SuSE-Code-12_2-Branch~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c177fd42e93f6290d910d0694b8179c45eb2fb0;p=thirdparty%2Flibsolv.git - rename map_and_not to map_subtract --- diff --git a/src/bitmap.c b/src/bitmap.c index 5a8dcd80..21630ade 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -66,19 +66,19 @@ map_and(Map *t, Map *s) unsigned char *ti, *si, *end; ti = t->map; si = s->map; - end = ti + t->size; + end = ti + (t->size < s->size ? t->size : s->size); while (ti < end) *ti++ &= *si++; } -/* like map_and but negates value in s first, i.e. t & ~s */ +/* remove all set bits in s from t. */ void -map_and_not(Map *t, Map *s) +map_subtract(Map *t, Map *s) { unsigned char *ti, *si, *end; ti = t->map; si = s->map; - end = ti + t->size; + end = ti + (t->size < s->size ? t->size : s->size); while (ti < end) *ti++ &= ~*si++; } diff --git a/src/bitmap.h b/src/bitmap.h index b098b260..3a60c517 100644 --- a/src/bitmap.h +++ b/src/bitmap.h @@ -35,7 +35,7 @@ extern void map_init_clone(Map *t, Map *s); extern void map_grow(Map *m, int n); extern void map_free(Map *m); extern void map_and(Map *t, Map *s); -extern void map_and_not(Map *t, Map *s); +extern void map_subtract(Map *t, Map *s); static inline void map_empty(Map *m) { diff --git a/src/libsolv.ver b/src/libsolv.ver index 3902354b..9c77fc4e 100644 --- a/src/libsolv.ver +++ b/src/libsolv.ver @@ -27,7 +27,7 @@ SOLV_1.0 { dirpool_init; dirpool_make_dirtraverse; map_and; - map_and_not; + map_subtract; map_free; map_grow; map_init;