diff options
author | Werner Koch <[email protected]> | 2012-02-07 09:15:57 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2012-02-07 09:15:57 +0000 |
commit | 13ec74481ce0137f7a60b3256cc4840073c77efa (patch) | |
tree | e64592195ace4c61af85095fdbab613246d16f46 /common/tlv.h | |
parent | Add replacement hack for Android's broken ttyname. (diff) | |
download | gnupg-13ec74481ce0137f7a60b3256cc4840073c77efa.tar.gz gnupg-13ec74481ce0137f7a60b3256cc4840073c77efa.zip |
common: Replace macro based function calls by using DEFAULT_ERRSOURCE.
* common/dns-cert.h (get_dns_cert): Remove macro.
* common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert. Replace
arg ERRSOURCE by global DEFAULT_ERRSOURCE.
* common/http.h (http_parse_uri, http_raw_connect, http_open)
(http_open_document, http_wait_response): Remove macros.
* common/http.c (_http_parse_uri, _http_raw_connect, _http_open)
(_http_open_document, _http_wait_response): Remove underscore from
symbols. Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
* common/ssh-utils.h (ssh_get_fingerprint)
(ssh_get_fingerprint_string): Remove macros.
* common/ssh-utils.h (_ssh_get_fingerprint)
(_ssh_get_fingerprint_string): Remove underscore from symbols.
Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
* common/tlv.h (parse_ber_header, parse_sexp): Remove macros.
* common/tlv.c: Include util.h.
(_parse_ber_header, _parse_sexp): Remove underscore from symbols.
Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
Diffstat (limited to 'common/tlv.h')
-rw-r--r-- | common/tlv.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/common/tlv.h b/common/tlv.h index fd57e1e90..f346394ac 100644 --- a/common/tlv.h +++ b/common/tlv.h @@ -80,14 +80,10 @@ const unsigned char *find_tlv_unchecked (const unsigned char *buffer, /* ASN.1 BER parser: Parse BUFFER of length SIZE and return the tag and the length part from the TLV triplet. Update BUFFER and SIZE on success. */ -gpg_error_t _parse_ber_header (unsigned char const **buffer, size_t *size, +gpg_error_t parse_ber_header (unsigned char const **buffer, size_t *size, int *r_class, int *r_tag, int *r_constructed, - int *r_ndef, size_t *r_length, size_t *r_nhdr, - gpg_err_source_t errsource); -#define parse_ber_header(a,b,c,d,e,f,g,h) \ - _parse_ber_header ((a),(b),(c),(d),(e),(f),(g),(h),\ - GPG_ERR_SOURCE_DEFAULT) + int *r_ndef, size_t *r_length, size_t *r_nhdr); /* Return the next token of an canonical encoded S-expression. BUF @@ -102,11 +98,8 @@ gpg_error_t _parse_ber_header (unsigned char const **buffer, size_t *size, reflect on return the actual depth of the tree. To detect the end of the S-expression it is advisable to check DEPTH after a successful return. */ -gpg_error_t _parse_sexp (unsigned char const **buf, size_t *buflen, - int *depth, unsigned char const **tok, size_t *toklen, - gpg_err_source_t errsource); -#define parse_sexp(a,b,c,d,e) \ - _parse_sexp ((a),(b),(c),(d),(e), GPG_ERR_SOURCE_DEFAULT) +gpg_error_t parse_sexp (unsigned char const **buf, size_t *buflen, + int *depth, unsigned char const **tok, size_t *toklen); |