mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
cpp-ify iconv_tools.c
This commit is contained in:
parent
96bf9d0d72
commit
f0eec1e0c5
@ -45,11 +45,11 @@ static iconv_t **iconv_cd = 0;
|
||||
|
||||
int register_iconv(iconv_t *new_iconv)
|
||||
{
|
||||
iconv_cd = realloc(iconv_cd, sizeof(iconv_t *) * (iconv_count + 1));
|
||||
iconv_cd = (void ***) realloc(iconv_cd, sizeof(iconv_t *) * (iconv_count + 1));
|
||||
if (!iconv_cd) {
|
||||
CRIT_ERR(NULL, NULL, "Out of memory");
|
||||
}
|
||||
iconv_cd[iconv_count] = malloc(sizeof(iconv_t));
|
||||
iconv_cd[iconv_count] = (void **) malloc(sizeof(iconv_t));
|
||||
if (!iconv_cd[iconv_count]) {
|
||||
CRIT_ERR(NULL, NULL, "Out of memory");
|
||||
}
|
||||
|
@ -31,10 +31,6 @@
|
||||
#ifndef _ICONV_TOOLS_H
|
||||
#define _ICONV_TOOLS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void free_iconv(struct text_object *);
|
||||
void iconv_convert(size_t *, char *, char *, size_t);
|
||||
void init_iconv_start(struct text_object *, void *, const char *);
|
||||
@ -43,8 +39,4 @@ void init_iconv_stop(void);
|
||||
void print_iconv_start(struct text_object *, char *, int);
|
||||
void print_iconv_stop(struct text_object *, char *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ICONV_TOOLS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user