--- src/histadd.c.orig	Mon Jul 26 19:58:48 1999
+++ src/histadd.c	Thu Nov 25 00:11:26 1999
@@ -22,13 +22,14 @@
 	time_t timedate;
 	struct tm *my_tm;
 	gchar *pdate = NULL;
-	int cx, cy, cz;
 	char *halves[] = { "AM", "PM" };
 	int half = 0;
 
 	gchar *filename;
 	int file;
 
+	gchar *new_statement = toLocal( statement );
+
 #ifdef TRACE_FUNCTION
 	g_print( "add_incoming_to_history\n" );
 #endif
@@ -64,35 +65,13 @@
 
 	g_free( pdate );
 
-	cy = cz = 0;
-	for( cx = 0; cx < strlen( statement ); cx ++ )
-	{
-		cy ++;
-		if( statement[cx] == '\n' || cy == 70 ||
-		    ( cy >= 60 && statement[cx] == ' ' ) )
-		{
-			write( file, ( statement + cz ), cy );
-			if( cy >= 60 && cy != 70 )
-			{
-				write( file, "\n", 1 );
-			}
-			if( cy == 70 )
-			{
-				write( file, "-\n", 2 );
-			}
-			cz += cy;
-			cy = 0;
-		}
-	}			
-
-	if( cz != strlen( statement ) )
-	{
-		write( file, ( statement + cz ), strlen( statement ) - cz );
-	}
+	write( file, new_statement, strlen( new_statement ) );
 
 	write( file, "\n", 1 );
 
 	close( file );
+
+	g_free( new_statement );
 }
 
 void add_outgoing_to_history( int uin, char *statement )
@@ -100,7 +79,6 @@
 	time_t timedate;
 	struct tm *my_tm;
 	gchar *pdate = NULL;
-	int cx, cy, cz;
 	char *halves[] = { "AM", "PM" };
 	int half = 0;
 
@@ -144,31 +122,7 @@
 
 	g_free( pdate );
 
-	cy = cz = 0;
-	for( cx = 0; cx < strlen( statement ); cx ++ )
-	{
-		cy ++;
-		if( statement[cx] == '\n' || cy == 70 ||
-		    ( cy >= 60 && statement[cx] == ' ' ) )
-		{
-			write( file, ( statement + cz ), cy );
-			if( cy >= 60 && cy != 70 )
-			{
-				write( file, "\n", 1 );
-			}
-			if( cy == 70 )
-			{
-				write( file, "-\n", 2 );
-			}
-			cz += cy;
-			cy = 0;
-		}
-	}			
-
-	if( cz != strlen( statement ) )
-	{
-		write( file, ( statement + cz ), strlen( statement ) - cz );
-	}
+	write( file, statement, strlen( statement ) );
 	
 	write( file, "\n", 1 );
 
