diff options
author | 2006-01-24 06:40:14 +1000 | |
---|---|---|
committer | 2006-01-24 06:40:14 +1000 | |
commit | 29c488c6dc4344015a6711efdd9a618813a82249 (patch) | |
tree | b7b8f3eee14261ddf2cd7546aa2f7102f8eb4ff0 /translate.c | |
parent | 14ae10daf7de7a14335047d2cd52bcfed9352e36 (diff) |
Fixes to api documentation, added .PHONY to makefile actions, made a few private functions static
darcs-hash:20060123204014-ac50b-b9d2a10c7f00945b5d9d244cb3b8c1489fe280de.gz
Diffstat (limited to 'translate.c')
-rw-r--r-- | translate.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/translate.c b/translate.c index 29541b91..b540d0e6 100644 --- a/translate.c +++ b/translate.c @@ -20,15 +20,34 @@ Translation library, internally uses catgets #if HAVE_GETTEXT +/** + Number of string_buffer_t in the ring of buffers +*/ #define BUFF_COUNT 64 +/** + The ring of string_buffer_t +*/ static string_buffer_t buff[BUFF_COUNT]; +/** + Current position in the ring +*/ static int curr_buff=0; +/** + Buffer used by translate_wcs2str +*/ static char *wcs2str_buff=0; +/** + Size of buffer used by translate_wcs2str +*/ static size_t wcs2str_buff_count=0; -char *translate_wcs2str( const wchar_t *in ) +/** + Wide to narrow character conversion. Internal implementation that + avoids exessive calls to malloc +*/ +static char *translate_wcs2str( const wchar_t *in ) { size_t len = MAX_UTF8_BYTES*wcslen(in)+1; if( len > wcs2str_buff_count ) |