From 02ccf6ec3b5531f5c092369a6120ace0cf435674 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 18 Mar 2006 00:12:25 +0000 Subject: [PATCH] * Cosmetic fixes. --- caca/caca.h | 2 ++ caca/caca_internals.h | 9 ++++++++- caca/event.c | 4 ---- caca/graphics.c | 5 ----- cucul/char.c | 3 ++- cucul/cucul_internals.h | 24 ++++++++++++------------ 6 files changed, 24 insertions(+), 23 deletions(-) diff --git a/caca/caca.h b/caca/caca.h index 8f1bfa0..5940a03 100644 --- a/caca/caca.h +++ b/caca/caca.h @@ -100,6 +100,8 @@ #ifndef __CACA_H__ #define __CACA_H__ +#define CACA_API_VERSION_1 + #include #ifdef __cplusplus diff --git a/caca/caca_internals.h b/caca/caca_internals.h index c05115b..1fcc393 100644 --- a/caca/caca_internals.h +++ b/caca/caca_internals.h @@ -152,8 +152,15 @@ struct caca_context } events; }; -/* Timer functions */ +/* Internal timer functions */ extern void _caca_sleep(unsigned int); extern unsigned int _caca_getticks(struct caca_timer *); +/* Internal event functions */ +extern void _caca_handle_resize(caca_t *); +#if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO) +extern void _push_event(caca_t *, unsigned int); +extern unsigned int _pop_event(caca_t *); +#endif + #endif /* __CACA_INTERNALS_H__ */ diff --git a/caca/event.c b/caca/event.c index 7ee3815..9098a1b 100644 --- a/caca/event.c +++ b/caca/event.c @@ -26,10 +26,6 @@ static unsigned int _get_next_event(caca_t *); static unsigned int _lowlevel_event(caca_t *); -#if defined(USE_SLANG) || defined(USE_NCURSES) || defined(USE_CONIO) -void _push_event(caca_t *, unsigned int); -unsigned int _pop_event(caca_t *); -#endif #if !defined(_DOXYGEN_SKIP_ME) /* If no new key was pressed after AUTOREPEAT_THRESHOLD usec, assume the diff --git a/caca/graphics.c b/caca/graphics.c index 6479e73..7e8aef5 100644 --- a/caca/graphics.c +++ b/caca/graphics.c @@ -24,11 +24,6 @@ #include "cucul.h" #include "cucul_internals.h" -/* - * Local functions - */ -void _caca_handle_resize(caca_t *kk); - /** \brief Set the window title. * * If libcaca runs in a window, try to change its title. This works with diff --git a/cucul/char.c b/cucul/char.c index 14b7f48..2150187 100644 --- a/cucul/char.c +++ b/cucul/char.c @@ -47,7 +47,8 @@ * \param fgcolor The requested foreground colour. * \param bgcolor The requested background colour. */ -void cucul_set_color(cucul_t *qq, enum cucul_color fgcolor, enum cucul_color bgcolor) +void cucul_set_color(cucul_t *qq, enum cucul_color fgcolor, + enum cucul_color bgcolor) { if(fgcolor < 0 || fgcolor > 15 || bgcolor < 0 || bgcolor > 15) return; diff --git a/cucul/cucul_internals.h b/cucul/cucul_internals.h index eab0f73..ba637f6 100644 --- a/cucul/cucul_internals.h +++ b/cucul/cucul_internals.h @@ -52,21 +52,21 @@ struct cucul_context /* Initialisation functions */ extern int _cucul_init_bitmap(void); extern int _cucul_end_bitmap(void); -void _cucul_set_size(cucul_t *qq, unsigned int width, unsigned int height); +extern void _cucul_set_size(cucul_t *, unsigned int, unsigned int); /* Charset functions */ -unsigned int _cucul_strlen_utf8(char const *s); -char const *_cucul_skip_utf8(char const *s, unsigned int x); -uint32_t _cucul_utf8_to_utf32(char const *s); -uint8_t _cucul_utf32_to_cp437(uint32_t c); -uint32_t _cucul_cp437_to_utf32(uint8_t c); +extern unsigned int _cucul_strlen_utf8(char const *); +extern char const *_cucul_skip_utf8(char const *, unsigned int); +extern uint32_t _cucul_utf8_to_utf32(char const *); +extern uint8_t _cucul_utf32_to_cp437(uint32_t); +extern uint32_t _cucul_cp437_to_utf32(uint8_t); /* Export functions */ -void _cucul_get_ansi(cucul_t *qq, struct cucul_buffer *ex); -void _cucul_get_html(cucul_t *qq, struct cucul_buffer *ex); -void _cucul_get_html3(cucul_t *qq, struct cucul_buffer *ex); -void _cucul_get_irc(cucul_t *qq, struct cucul_buffer *ex); -void _cucul_get_ps(cucul_t *qq, struct cucul_buffer *ex); -void _cucul_get_svg(cucul_t *qq, struct cucul_buffer *ex); +extern void _cucul_get_ansi(cucul_t *, struct cucul_export *); +extern void _cucul_get_html(cucul_t *, struct cucul_export *); +extern void _cucul_get_html3(cucul_t *, struct cucul_export *); +extern void _cucul_get_irc(cucul_t *, struct cucul_export *); +extern void _cucul_get_ps(cucul_t *, struct cucul_export *); +extern void _cucul_get_svg(cucul_t *, struct cucul_export *); #endif /* __CUCUL_INTERNALS_H__ */