[svn] gpgme - r1110 - trunk/gpgme
svn author marcus
cvs at cvs.gnupg.org
Sat Oct 1 22:42:35 CEST 2005
Author: marcus
Date: 2005-10-01 22:42:34 +0200 (Sat, 01 Oct 2005)
New Revision: 1110
Modified:
trunk/gpgme/ChangeLog
trunk/gpgme/engine-backend.h
trunk/gpgme/engine-gpgsm.c
trunk/gpgme/engine.c
trunk/gpgme/engine.h
Log:
2005-10-01 Marcus Brinkmann <marcus at g10code.de>
* engine.h (_gpgme_set_engine_info): Add prototype.
* engine-backend.h (struct engine_ops): Change return type of
get_file_name() to const char * to silence gcc warning.
* engine.c (engine_get_file_name): Change return type to const
char * to silence gcc warning.
(gpgme_get_engine_info): Use transitional variable to go from
const char * to char * to silence gcc warning.
(_gpgme_set_engine_info): Likewise.
* engine-gpgsm.c (struct engine_gpgsm): Change type of LINE to
char * to silence gcc warning.
(gpgsm_new): Make ARGV a pointer to const char.
(status_handler): Change type of SRC, END, DST, ALINE and NEWLINE
to char * to silence gcc warning.
Modified: trunk/gpgme/ChangeLog
===================================================================
--- trunk/gpgme/ChangeLog 2005-10-01 20:41:41 UTC (rev 1109)
+++ trunk/gpgme/ChangeLog 2005-10-01 20:42:34 UTC (rev 1110)
@@ -1,5 +1,19 @@
2005-10-01 Marcus Brinkmann <marcus at g10code.de>
+ * engine.h (_gpgme_set_engine_info): Add prototype.
+ * engine-backend.h (struct engine_ops): Change return type of
+ get_file_name() to const char * to silence gcc warning.
+ * engine.c (engine_get_file_name): Change return type to const
+ char * to silence gcc warning.
+ (gpgme_get_engine_info): Use transitional variable to go from
+ const char * to char * to silence gcc warning.
+ (_gpgme_set_engine_info): Likewise.
+ * engine-gpgsm.c (struct engine_gpgsm): Change type of LINE to
+ char * to silence gcc warning.
+ (gpgsm_new): Make ARGV a pointer to const char.
+ (status_handler): Change type of SRC, END, DST, ALINE and NEWLINE
+ to char * to silence gcc warning.
+
* gpgme.def: Add gpgme_data_set_file_name,
gpgme_data_get_file_name, gpgme_sig_notation_clear,
gpgme_sig_notation_add and gpgme_sig_notation_get.
Modified: trunk/gpgme/engine-backend.h
===================================================================
--- trunk/gpgme/engine-backend.h 2005-10-01 20:41:41 UTC (rev 1109)
+++ trunk/gpgme/engine-backend.h 2005-10-01 20:42:34 UTC (rev 1110)
@@ -33,7 +33,7 @@
/* Static functions. */
/* Return the default file name for the binary of this engine. */
- char *(*get_file_name) (void);
+ const char *(*get_file_name) (void);
/* Returns a malloced string containing the version of the engine
with the given binary file name (or the default if FILE_NAME is
Modified: trunk/gpgme/engine-gpgsm.c
===================================================================
--- trunk/gpgme/engine-gpgsm.c 2005-10-01 20:41:41 UTC (rev 1109)
+++ trunk/gpgme/engine-gpgsm.c 2005-10-01 20:42:34 UTC (rev 1110)
@@ -85,7 +85,7 @@
void *fnc_value;
struct
{
- unsigned char *line;
+ char *line;
int linesize;
int linelen;
} attic;
@@ -320,7 +320,7 @@
{
gpgme_error_t err = 0;
engine_gpgsm_t gpgsm;
- char *argv[5];
+ const char *argv[5];
int argc;
int fds[2];
int child_fds[4];
@@ -749,17 +749,16 @@
/* FIXME We can't use this for binary data because we
assume this is a string. For the current usage of colon
output it is correct. */
- unsigned char *src = line + 2;
- unsigned char *end = line + linelen;
- unsigned char *dst;
- unsigned char **aline = &gpgsm->colon.attic.line;
+ char *src = line + 2;
+ char *end = line + linelen;
+ char *dst;
+ char **aline = &gpgsm->colon.attic.line;
int *alinelen = &gpgsm->colon.attic.linelen;
if (gpgsm->colon.attic.linesize
< *alinelen + linelen + 1)
{
- unsigned char *newline = realloc (*aline,
- *alinelen + linelen + 1);
+ char *newline = realloc (*aline, *alinelen + linelen + 1);
if (!newline)
err = gpg_error_from_errno (errno);
else
@@ -778,7 +777,7 @@
{
/* Handle escaped characters. */
++src;
- *dst = (unsigned char) _gpgme_hextobyte (src);
+ *dst = _gpgme_hextobyte (src);
(*alinelen)++;
src += 2;
}
Modified: trunk/gpgme/engine.c
===================================================================
--- trunk/gpgme/engine.c 2005-10-01 20:41:41 UTC (rev 1109)
+++ trunk/gpgme/engine.c 2005-10-01 20:42:34 UTC (rev 1110)
@@ -60,7 +60,7 @@
/* Get the file name of the engine for PROTOCOL. */
-static char *
+static const char *
engine_get_file_name (gpgme_protocol_t proto)
{
if (proto > DIM (engine_ops))
@@ -155,12 +155,13 @@
for (proto = 0; proto < DIM (proto_list); proto++)
{
- char *file_name = engine_get_file_name (proto_list[proto]);
+ const char *ofile_name = engine_get_file_name (proto_list[proto]);
+ char *file_name;
- if (!file_name)
+ if (!ofile_name)
continue;
- file_name = strdup (file_name);
+ file_name = strdup (ofile_name);
*lastp = malloc (sizeof (*engine_info));
if (!*lastp || !file_name)
@@ -304,9 +305,9 @@
new_file_name = strdup (file_name);
else
{
- new_file_name = engine_get_file_name (proto);
- assert (new_file_name);
- new_file_name = strdup (new_file_name);
+ const char *ofile_name = engine_get_file_name (proto);
+ assert (ofile_name);
+ new_file_name = strdup (ofile_name);
}
if (!new_file_name)
return gpg_error_from_errno (errno);
Modified: trunk/gpgme/engine.h
===================================================================
--- trunk/gpgme/engine.h 2005-10-01 20:41:41 UTC (rev 1109)
+++ trunk/gpgme/engine.h 2005-10-01 20:42:34 UTC (rev 1110)
@@ -42,7 +42,14 @@
/* Release the engine info INFO. */
void _gpgme_engine_info_release (gpgme_engine_info_t info);
+/* Set the engine info for the info list INFO, protocol PROTO, to the
+ file name FILE_NAME and the home directory HOME_DIR. */
+gpgme_error_t _gpgme_set_engine_info (gpgme_engine_info_t info,
+ gpgme_protocol_t praoto,
+ const char *file_name,
+ const char *home_dir);
+
gpgme_error_t _gpgme_engine_new (gpgme_engine_info_t info,
engine_t *r_engine,
const char *lc_ctype,
More information about the Gnupg-commits
mailing list