1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-29 18:18:39 +00:00

cpp-ify conf_cookie.c

This commit is contained in:
Nikolas Garofil 2010-02-24 15:37:20 +01:00
parent c1648e6558
commit 63133c19d6
3 changed files with 6 additions and 15 deletions

View File

@ -166,7 +166,7 @@ if(BUILD_ICONV)
endif(BUILD_ICONV)
if(BUILD_BUILTIN_CONFIG)
set(optional_sources ${optional_sources} conf_cookie.c)
set(optional_sources ${optional_sources} conf_cookie.cc)
endif(BUILD_BUILTIN_CONFIG)
add_executable(conky ${conky_sources} ${optional_sources})

View File

@ -61,14 +61,13 @@ conf_read(void *cookie, char *buf, COOKIE_LEN_T size)
#endif /* defined(HAVE_FOPENCOOKIE) || defined(HAVE_FUNOPEN) */
#if defined(HAVE_FOPENCOOKIE)
static cookie_io_functions_t conf_cookie = {
.read = &conf_read,
.write = NULL,
.seek = NULL,
.close = NULL,
};
static cookie_io_functions_t conf_cookie;
FILE *conf_cookie_open(void)
{
conf_cookie.read = &conf_read;
conf_cookie.write = NULL;
conf_cookie.seek = NULL;
conf_cookie.close = NULL;
return fopencookie(NULL, "r", conf_cookie);
}
#elif defined(HAVE_FUNOPEN)

View File

@ -3,14 +3,6 @@
#ifndef _CONF_COOKIE_H
#define _CONF_COOKIE_H
#ifdef __cplusplus
extern "C" {
#endif
FILE *conf_cookie_open(void);
#ifdef __cplusplus
}
#endif
#endif /* _CONF_COOKIE_H */