View | Details | Raw Unified
Collapse All | Expand All

(-) hddtemp-0.3-beta15/src/utf8.c~ (+4 lines)
 Lines 23-29    Link Here 
// Standard includes
// Standard includes
#include <stdlib.h>
#include <stdlib.h>
#ifdef HAVE_ICONV
#include <iconv.h>
#include <iconv.h>
#endif
#include <langinfo.h>
#include <langinfo.h>
#include <locale.h>
#include <locale.h>
#include <string.h>
#include <string.h>
 Lines 34-39    Link Here 
static char *iconv_from_utf8_to_locale(const char *string, const char* fallback_string)
static char *iconv_from_utf8_to_locale(const char *string, const char* fallback_string)
{
{
#ifdef HAVE_ICONV
  const size_t buffer_inc = 80;	// Increment buffer size in 80 bytes step
  const size_t buffer_inc = 80;	// Increment buffer size in 80 bytes step
  const char *charset;
  const char *charset;
  iconv_t cd;
  iconv_t cd;
 Lines 93-98    Link Here 
  if (dest_buffer != NULL)
  if (dest_buffer != NULL)
    free(dest_buffer);  		// free buffer
    free(dest_buffer);  		// free buffer
  free(src_buffer);			// free string
  free(src_buffer);			// free string
#endif // HAVE_ICONV
  return strdup(fallback_string); 	// and return fallback string
  return strdup(fallback_string); 	// and return fallback string
}
}