2003-09-30 Marcus Brinkmann <marcus@g10code.de>

* gpgme.h (gpg_strerror_r): Change prototype to match
	gpg_strerror_r change.
	* error.c (gpg_strerror_r): Likewise, also update implementation.
This commit is contained in:
Marcus Brinkmann 2003-09-30 19:36:20 +00:00
parent d66ff5e665
commit 2f91a25865
3 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,9 @@
2003-09-30 Marcus Brinkmann <marcus@g10code.de> 2003-09-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (gpg_strerror_r): Change prototype to match
gpg_strerror_r change.
* error.c (gpg_strerror_r): Likewise, also update implementation.
* gpgme.c (gpgme_hash_algo_name): Change name of RMD160 to * gpgme.c (gpgme_hash_algo_name): Change name of RMD160 to
RIPEMD160, name of TIGER to TIGER192, name of CRC32-RFC1510 to RIPEMD160, name of TIGER to TIGER192, name of CRC32-RFC1510 to
CRC32RFC1510, and name of CRC24-RFC2440 to CRC24RFC2440. CRC32RFC1510, and name of CRC24-RFC2440 to CRC24RFC2440.

View File

@ -32,14 +32,17 @@ gpgme_strerror (gpgme_error_t err)
} }
/* Return a pointer to a string containing a description of the error /* Return the error string for ERR in the user-supplied buffer BUF of
code in the error value ERR. The buffer for the string is size BUFLEN. This function is, in contrast to gpg_strerror,
allocated with malloc(), and has to be released by the user. On thread-safe if a thread-safe strerror_r() function is provided by
error, NULL is returned. */ the system. If the function succeeds, 0 is returned and BUF
char * contains the string describing the error. If the buffer was not
gpgme_strerror_r (gpgme_error_t err) large enough, ERANGE is returned and BUF contains as much of the
beginning of the error string as fits into the buffer. */
int
gpgme_strerror_r (gpg_error_t err, char *buf, size_t buflen)
{ {
return gpg_strerror_r (err); return gpg_strerror_r (err, buf, buflen);
} }

View File

@ -131,11 +131,14 @@ gpgme_err_source (gpgme_error_t err)
code in the error value ERR. This function is not thread safe. */ code in the error value ERR. This function is not thread safe. */
const char *gpgme_strerror (gpgme_error_t err); const char *gpgme_strerror (gpgme_error_t err);
/* Return a pointer to a string containing a description of the error /* Return the error string for ERR in the user-supplied buffer BUF of
code in the error value ERR. The buffer for the string is size BUFLEN. This function is, in contrast to gpg_strerror,
allocated with malloc(), and has to be released by the user. On thread-safe if a thread-safe strerror_r() function is provided by
error, NULL is returned. */ the system. If the function succeeds, 0 is returned and BUF
char *gpgme_strerror_r (gpgme_error_t err); contains the string describing the error. If the buffer was not
large enough, ERANGE is returned and BUF contains as much of the
beginning of the error string as fits into the buffer. */
int gpgme_strerror_r (gpg_error_t err, char *buf, size_t buflen);
/* Return a pointer to a string containing a description of the error /* Return a pointer to a string containing a description of the error