[Gpa-commits] r846 - trunk/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 12 13:17:51 CET 2008


Author: marcus
Date: 2008-03-12 13:17:50 +0100 (Wed, 12 Mar 2008)
New Revision: 846

Modified:
   trunk/src/ChangeLog
   trunk/src/clipboard.c
   trunk/src/gpgmetools.c
   trunk/src/gpgmetools.h
Log:
2008-03-12  Marcus Brinkmann  <marcus at g10code.de>

	* clipboard.c (dos_to_unix): Removed.
	* gpgmetools.h (dos_to_unix): New prototype.
	* gpgmetools.c (dos_to_unix): Add comment.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2008-03-11 16:51:20 UTC (rev 845)
+++ trunk/src/ChangeLog	2008-03-12 12:17:50 UTC (rev 846)
@@ -1,3 +1,9 @@
+2008-03-12  Marcus Brinkmann  <marcus at g10code.de>
+
+	* clipboard.c (dos_to_unix): Removed.
+	* gpgmetools.h (dos_to_unix): New prototype.
+	* gpgmetools.c (dos_to_unix): Add comment.
+
 2008-03-11  Marcus Brinkmann  <marcus at g10code.de>
 
 	* gpgmetools.c (dos_to_unix) [G_OS_WIN32]: New function.

Modified: trunk/src/clipboard.c
===================================================================
--- trunk/src/clipboard.c	2008-03-11 16:51:20 UTC (rev 845)
+++ trunk/src/clipboard.c	2008-03-12 12:17:50 UTC (rev 846)
@@ -42,6 +42,7 @@
 #include "gpapastrings.h"
 
 #include "gtktools.h"
+#include "gpgmetools.h"
 #include "gpawidgets.h"
 #include "siglist.h"
 #include "helpmenu.h"
@@ -271,30 +272,6 @@
 }
 
 
-#ifdef G_OS_WIN32
-void
-dos_to_unix (gchar *str, gsize *len)
-{
-  /* On Windows 2000, we need to convert \r\n to \n in the output for
-     cut & paste to work properly (otherwise, extra newlines will be
-     inserted).  */
-  gchar *src;
-  gchar *dst;
-  
-  src = str;
-  dst = str;
-  while (*src)
-    {
-      if (src[0] == '\r' && src[1] == '\n')
-	src++;
-      *(dst++) = *(src++);
-    }
-  *dst = '\0';
-  *len = dst - str;
-}
-#endif
-
-
 /* Add a file created by an operation to the list */
 static void
 file_created_cb (GpaFileOperation *op, gpa_file_item_t item, gpointer data)

Modified: trunk/src/gpgmetools.c
===================================================================
--- trunk/src/gpgmetools.c	2008-03-11 16:51:20 UTC (rev 845)
+++ trunk/src/gpgmetools.c	2008-03-12 12:17:50 UTC (rev 846)
@@ -251,6 +251,7 @@
 
 
 #ifdef G_OS_WIN32
+/* Convert newlines.  */
 void
 dos_to_unix (gchar *str, gsize *len)
 {

Modified: trunk/src/gpgmetools.h
===================================================================
--- trunk/src/gpgmetools.h	2008-03-11 16:51:20 UTC (rev 845)
+++ trunk/src/gpgmetools.h	2008-03-12 12:17:50 UTC (rev 846)
@@ -101,6 +101,11 @@
 int gpa_open_input (const char *filename, gpgme_data_t *data,
 		    GtkWidget *parent);
 
+#ifdef G_OS_WIN32
+/* Convert newlines.  */
+void dos_to_unix (gchar *str, gsize *len);
+#endif
+
 /* Write the contents of the gpgme_data_t into the clipboard.  */
 void dump_data_to_clipboard (gpgme_data_t data, GtkClipboard *clipboard);
 



More information about the Gpa-commits mailing list