[Gpa-commits] r713 - trunk/src

marcus at wald.intevation.org marcus at wald.intevation.org
Fri Oct 28 16:35:31 CEST 2005


Author: marcus
Date: 2005-10-28 16:35:30 +0200 (Fri, 28 Oct 2005)
New Revision: 713

Modified:
   trunk/src/ChangeLog
   trunk/src/expirydlg.c
   trunk/src/gpa.c
   trunk/src/gpawidgets.c
   trunk/src/keytable.c
   trunk/src/keytable.h
   trunk/src/options.c
   trunk/src/options.h
   trunk/src/qdchkpwd.c
   trunk/src/server_access.c
Log:
2005-10-28  Marcus Brinkmann  <marcus at g10code.de>

	* gpa.c [!HAVE_CONFIG_H]: Don't include config.h.
	(main) [!USE_SIMPLE_GETTEXT && ENABLE_NLS]: Invoke
	gpgme_set_locale.	
	* options.h: Remove const qualifier from return type.
	* options.c (gpa_options_get_default_key): Likewise.
	* keytable.h (gpa_keytable_lookup_key): Likewise.
	* keytable.c (gpa_keytable_lookup_key): Likewise.
	* gpawidgets.c (gpa_expiry_frame_get_expiration): Make day, month
	and year of type guint.
	* expirydlg.c (expiry_ok): Likewise.
	* qdchkpwd.c (qdchkpwd): Cast char pointer to unsigned char
	pointer for compress.
	* server_access.c (do_spawn): Make length of type gsize.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/ChangeLog	2005-10-28 14:35:30 UTC (rev 713)
@@ -1,3 +1,19 @@
+2005-10-28  Marcus Brinkmann  <marcus at g10code.de>
+
+	* gpa.c [!HAVE_CONFIG_H]: Don't include config.h.
+	(main) [!USE_SIMPLE_GETTEXT && ENABLE_NLS]: Invoke
+	gpgme_set_locale.	
+	* options.h: Remove const qualifier from return type.
+	* options.c (gpa_options_get_default_key): Likewise.
+	* keytable.h (gpa_keytable_lookup_key): Likewise.
+	* keytable.c (gpa_keytable_lookup_key): Likewise.
+	* gpawidgets.c (gpa_expiry_frame_get_expiration): Make day, month
+	and year of type guint.
+	* expirydlg.c (expiry_ok): Likewise.
+	* qdchkpwd.c (qdchkpwd): Cast char pointer to unsigned char
+	pointer for compress.
+	* server_access.c (do_spawn): Make length of type gsize.
+
 2005-10-06  Marcus Brinkmann  <marcus at g10code.de>
 
 	* w32reg.c: Don't include util.h.

Modified: trunk/src/expirydlg.c
===================================================================
--- trunk/src/expirydlg.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/expirydlg.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -51,7 +51,7 @@
 
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->radio_date)))
     {
-      gint day, month, year;
+      guint day, month, year;
       gtk_calendar_get_date (GTK_CALENDAR (dialog->calendar),
                              &year, &month, &day);
 

Modified: trunk/src/gpa.c
===================================================================
--- trunk/src/gpa.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/gpa.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -1,24 +1,26 @@
-/* gpa.c - The GNU Privacy Assistant
- * Copyright (C) 2000-2002 G-N-U GmbH.
- *
- * This file is part of GPA.
- *
- * GPA is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GPA; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
+/* gpa.c - The GNU Privacy Assistant main file.
+   Copyright (C) 2000-2002 G-N-U GmbH.
+   Copyright (C) 2005 g10 Code GmbH.
 
+   This file is part of GPA.
+
+   GPA is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GPA is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GPA; if not, write to the Free Software Foundation, Inc.,
+   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+#if HAVE_CONFIG_H
 #include <config.h>
+#endif
 
 #include <gtk/gtk.h>
 
@@ -365,6 +367,14 @@
 
   /* Initialize GPGME */
   gpgme_check_version (NULL);
+#ifdef USE_SIMPLE_GETTEXT
+  /* FIXME */
+#else
+#ifdef ENABLE_NLS
+  gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
+  gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
+#endif
+#endif
 
   /* Locate GPA's configuration file.
    */

Modified: trunk/src/gpawidgets.c
===================================================================
--- trunk/src/gpawidgets.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/gpawidgets.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -292,7 +292,7 @@
     }
   else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (frame->radioAt)))
     {
-      gint day, month, year;
+      guint day, month, year;
       gtk_calendar_get_date (GTK_CALENDAR (frame->calendar),
                              &year, &month, &day);
       *date = g_date_new_dmy (day, month+1, year);

Modified: trunk/src/keytable.c
===================================================================
--- trunk/src/keytable.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/keytable.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -1,23 +1,23 @@
-/* keytable.c  -  The GNU Privacy Assistant
- *      Copyright (C) 2002 Miguel Coca
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+/* keytable.c - The GNU Privacy Assistant key table.
+   Copyright (C) 2002 Miguel Coca
+   Copyright (C) 2005 g10 Code GmbH.
 
+   This file is part of GPA
+
+   GPA is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GPA is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GPA; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  */
+
 #include <glib.h>
 #include <gtk/gtk.h>
 #include "gpa.h"
@@ -306,10 +306,9 @@
 }
 
 /* Return the key with a given fingerprint from the keytable, NULL if
- * there is none. No reference is provided.
- */
-const gpgme_key_t gpa_keytable_lookup_key (GpaKeyTable *keytable,
-					   const char *fpr)
+   there is none. No reference is provided.  */
+gpgme_key_t
+gpa_keytable_lookup_key (GpaKeyTable *keytable, const char *fpr)
 {
   if (keytable->initialized)
     {

Modified: trunk/src/keytable.h
===================================================================
--- trunk/src/keytable.h	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/keytable.h	2005-10-28 14:35:30 UTC (rev 713)
@@ -1,28 +1,26 @@
-/* keytable.h  -  The GNU Privacy Assistant
- *      Copyright (C) 2002 Miguel Coca
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+/* keytable.h - The GNU Privacy Assistant key table.
+   Copyright (C) 2002 Miguel Coca
+   Copyright (C) 2005 g10 Code GmbH.
 
-/*
- * Table of all the keys in the keyring. Singleton object.
- * Acts as a key cache for key listing.
- */
+   This file is part of GPA
 
+   GPA is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GPA is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GPA; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  */
+
+/* Table of all the keys in the keyring.  Singleton object.  Acts as a
+   key cache for key listing.  */
+
 #ifndef KEYTABLE_H
 #define KEYTABLE_H
 
@@ -105,9 +103,7 @@
 			    gpointer data);
 
 /* Return the key with a given fingerprint from the keytable, NULL if
- * there is none. No reference is provided.
- */
-const gpgme_key_t gpa_keytable_lookup_key (GpaKeyTable *keytable,
-					   const char *fpr);
+   there is none. No reference is provided.  */
+gpgme_key_t gpa_keytable_lookup_key (GpaKeyTable *keytable, const char *fpr);
 
 #endif /* KEYTABLE_H */

Modified: trunk/src/options.c
===================================================================
--- trunk/src/options.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/options.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -1,23 +1,23 @@
-/* options.h - global option declarations
- *	Copyright (C) 2002 Miguel Coca.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+/* options.h - global option declarations.
+   Copyright (C) 2002 Miguel Coca.
+   Copyright (C) 2005 g10 Code GmbH.
 
+   This file is part of GPA.
+  
+   GPA is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   GPA is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GPA; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  */
+
 #include <glib.h>
 #include "options.h"
 #include "gpa.h"
@@ -243,12 +243,14 @@
   g_signal_emit (options, signals[CHANGED_DEFAULT_KEY], 0);
 }
 
-const gpgme_key_t
+
+gpgme_key_t
 gpa_options_get_default_key (GpaOptions *options)
 {
   return options->default_key;
 }
 
+
 /* Return the default key gpg would use, or at least a first
  * approximation. Currently this means the first secret key in the keyring.
  * If there's no secret key at all, return NULL

Modified: trunk/src/options.h
===================================================================
--- trunk/src/options.h	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/options.h	2005-10-28 14:35:30 UTC (rev 713)
@@ -1,23 +1,23 @@
-/* options.h - global option declarations
- *	Copyright (C) 2000, 2001 G-N-U GmbH.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GPA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+/* options.h - global option declarations.
+   Copyright (C) 2000, 2001 G-N-U GmbH.
+   Copyright (C) 2005 g10 Code GmbH.
 
+   This file is part of GPA.
+
+   GPA is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+   GPA is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GPA; if not, write to the Free Software Foundation,
+   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  */
+
 #ifndef OPTIONS_H
 #define OPTIONS_H
 
@@ -81,7 +81,8 @@
 
 /* Choose the default key */
 void gpa_options_set_default_key (GpaOptions *options, gpgme_key_t key);
-const gpgme_key_t gpa_options_get_default_key (GpaOptions *options);
+gpgme_key_t gpa_options_get_default_key (GpaOptions *options);
+
 /* Try to find a reasonable value for the default key if there wasn't one */
 void gpa_options_update_default_key (GpaOptions *options);
 

Modified: trunk/src/qdchkpwd.c
===================================================================
--- trunk/src/qdchkpwd.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/qdchkpwd.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -67,7 +67,8 @@
   source_length = strlen (source_buffer);
   dest_length = 2 * source_length + 256;
   dest_buffer = g_malloc (dest_length);
-  if (compress (dest_buffer, &dest_length, source_buffer, source_length) != 0)
+  if (compress ((unsigned char *) dest_buffer, &dest_length,
+		(unsigned char *) source_buffer, source_length) != 0)
     return -1.0;
   test_comp_length = dest_length;
   g_free (source_buffer);
@@ -77,7 +78,8 @@
   source_length = strlen (source_buffer);
   dest_length = 2 * source_length + 256;
   dest_buffer = g_malloc (dest_length);
-  if (compress (dest_buffer, &dest_length, source_buffer, source_length) != 0)
+  if (compress ((unsigned char *) dest_buffer, &dest_length,
+		(unsigned char *) source_buffer, source_length) != 0)
     return -1.0;
   comp_length = dest_length;
   g_free (source_buffer);

Modified: trunk/src/server_access.c
===================================================================
--- trunk/src/server_access.c	2005-10-26 10:13:01 UTC (rev 712)
+++ trunk/src/server_access.c	2005-10-28 14:35:30 UTC (rev 713)
@@ -396,7 +396,8 @@
   GError *error = NULL;
 #ifdef G_OS_UNIX
   pid_t pid;
-  gint standard_error, length;
+  gint standard_error;
+  gsize length;
   GIOChannel *channel;
 #endif
 



More information about the Gpa-commits mailing list