diff options
author | 2006-01-24 06:40:14 +1000 | |
---|---|---|
committer | 2006-01-24 06:40:14 +1000 | |
commit | 29c488c6dc4344015a6711efdd9a618813a82249 (patch) | |
tree | b7b8f3eee14261ddf2cd7546aa2f7102f8eb4ff0 /common.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 'common.c')
-rw-r--r-- | common.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -88,8 +88,6 @@ int error_max=1; wchar_t ellipsis_char; -static int c1=0, c2=0, c3=0, c4=0, c5; - char *profile=0; wchar_t *program_name; @@ -107,6 +105,9 @@ static struct winsize termsize; */ static int block_count=0; +/** + String buffer used by the wsetlocale function +*/ static string_buffer_t *setlocale_buff=0; @@ -117,8 +118,6 @@ void common_destroy() sb_destroy( setlocale_buff ); free( setlocale_buff ); } - - debug( 3, L"Calls: wcsdupcat %d, wcsdupcat2 %d, wcsndup %d, str2wcs %d, wcs2str %d", c1, c2, c3, c4, c5 ); } @@ -256,8 +255,6 @@ void sort_list( array_list_t *comp ) wchar_t *str2wcs( const char *in ) { - c4++; - wchar_t *res; res = malloc( sizeof(wchar_t)*(strlen(in)+1) ); @@ -299,9 +296,8 @@ void error_reset() char *wcs2str( const wchar_t *in ) { - c5++; - char *res = malloc( MAX_UTF8_BYTES*wcslen(in)+1 ); + if( res == 0 ) { die_mem(); @@ -311,7 +307,7 @@ char *wcs2str( const wchar_t *in ) in, MAX_UTF8_BYTES*wcslen(in)+1 ); -// res = realloc( res, strlen( res )+1 ); + res = realloc( res, strlen( res )+1 ); return res; } @@ -340,15 +336,11 @@ char **wcsv2strv( const wchar_t **in ) wchar_t *wcsdupcat( const wchar_t *a, const wchar_t *b ) { - c1++; - return wcsdupcat2( a, b, 0 ); } wchar_t *wcsdupcat2( const wchar_t *a, ... ) { - c2++; - int len=wcslen(a); int pos; va_list va, va2; |