summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2011-07-12 14:08:07 +0200
committerMichael Schroeder <mls@suse.de>2011-07-12 14:08:07 +0200
commit09f29f706df0cf171ba7e7e8a3272388039630e4 (patch)
tree8751165a972da652b43bc1219ccc64cfdd3901e1 /src/util.h
parente29f9ccb48086b27462c751d1905ed3c5e703dfd (diff)
downloadlibsolv-09f29f706df0cf171ba7e7e8a3272388039630e4.tar.gz
libsolv-09f29f706df0cf171ba7e7e8a3272388039630e4.tar.bz2
libsolv-09f29f706df0cf171ba7e7e8a3272388039630e4.zip
- rename all sat_ to solv_
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/util.h b/src/util.h
index f424ab9..41c82b9 100644
--- a/src/util.h
+++ b/src/util.h
@@ -20,32 +20,32 @@
* malloc
* exits with error message on error
*/
-extern void *sat_malloc(size_t);
-extern void *sat_malloc2(size_t, size_t);
-extern void *sat_calloc(size_t, size_t);
-extern void *sat_realloc(void *, size_t);
-extern void *sat_realloc2(void *, size_t, size_t);
-extern void *sat_free(void *);
-extern void sat_oom(size_t, size_t);
-extern unsigned int sat_timems(unsigned int subtract);
-extern void sat_sort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *compard);
-extern char *sat_dupjoin(const char *str1, const char *str2, const char *str3);
-extern char *sat_dupappend(const char *str1, const char *str2, const char *str3);
-extern int sat_hex2bin(const char **strp, unsigned char *buf, int bufl);
-extern char *sat_bin2hex(const unsigned char *buf, int l, char *str);
+extern void *solv_malloc(size_t);
+extern void *solv_malloc2(size_t, size_t);
+extern void *solv_calloc(size_t, size_t);
+extern void *solv_realloc(void *, size_t);
+extern void *solv_realloc2(void *, size_t, size_t);
+extern void *solv_free(void *);
+extern void solv_oom(size_t, size_t);
+extern unsigned int solv_timems(unsigned int subtract);
+extern void solv_sort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *compard);
+extern char *solv_dupjoin(const char *str1, const char *str2, const char *str3);
+extern char *solv_dupappend(const char *str1, const char *str2, const char *str3);
+extern int solv_hex2bin(const char **strp, unsigned char *buf, int bufl);
+extern char *solv_bin2hex(const unsigned char *buf, int l, char *str);
-static inline void *sat_extend(void *buf, size_t len, size_t nmemb, size_t size, size_t block)
+static inline void *solv_extend(void *buf, size_t len, size_t nmemb, size_t size, size_t block)
{
if (nmemb == 1)
{
if ((len & block) == 0)
- buf = sat_realloc2(buf, len + (1 + block), size);
+ buf = solv_realloc2(buf, len + (1 + block), size);
}
else
{
if (((len - 1) | block) != ((len + nmemb - 1) | block))
- buf = sat_realloc2(buf, (len + (nmemb + block)) & ~block, size);
+ buf = solv_realloc2(buf, (len + (nmemb + block)) & ~block, size);
}
return buf;
}
@@ -58,26 +58,26 @@ static inline void *sat_extend(void *buf, size_t len, size_t nmemb, size_t size,
* size size of each element
* block block size used to allocate the elements
*/
-static inline void *sat_zextend(void *buf, size_t len, size_t nmemb, size_t size, size_t block)
+static inline void *solv_zextend(void *buf, size_t len, size_t nmemb, size_t size, size_t block)
{
- buf = sat_extend(buf, len, nmemb, size, block);
+ buf = solv_extend(buf, len, nmemb, size, block);
memset((char *)buf + len * size, 0, nmemb * size);
return buf;
}
-static inline void *sat_extend_resize(void *buf, size_t len, size_t size, size_t block)
+static inline void *solv_extend_resize(void *buf, size_t len, size_t size, size_t block)
{
if (len)
- buf = sat_realloc2(buf, (len + block) & ~block, size);
+ buf = solv_realloc2(buf, (len + block) & ~block, size);
return buf;
}
-static inline void *sat_calloc_block(size_t len, size_t size, size_t block)
+static inline void *solv_calloc_block(size_t len, size_t size, size_t block)
{
void *buf;
if (!len)
return 0;
- buf = sat_malloc2((len + block) & ~block, size);
+ buf = solv_malloc2((len + block) & ~block, size);
memset(buf, 0, ((len + block) & ~block) * size);
return buf;
}