gpg: Change parse_packet to take a context.
authorWerner Koch <wk@gnupg.org>
Wed, 29 Mar 2017 08:02:40 +0000 (10:02 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 29 Mar 2017 08:06:29 +0000 (10:06 +0200)
commit0526c99164d3531b5ec763ffc672407eb24b2296
tree0deb94a79a1cb2b916548e5d5cbb58114402dc2e
parentf5b565a5b8de3f2a3d98bc1a655e18333aee223b
gpg: Change parse_packet to take a context.

* g10/packet.h (struct parse_packet_ctx_s): New.
(parse_packet_ctx_t): New type.
(init_parse_packet): New macro.
* g10/parse-packet.c (parse_packet, dbg_parse_packet): Change to take
a parse context.  Change all callers to provide a context instead of
directly supplying the input stream.
(search_packet, dbg_search_packet): Ditto.
(copy_all_packets, dbg_copy_all_packets): Init an use a parse context.
(copy_some_packets, dbg_copy_some_packets): Ditto.
(skip_some_packets, dbg_skip_some_packets): Ditto.
--

We will need this change to handle ring packets inside the parser.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/import.c
g10/keydb.c
g10/keyedit.c
g10/keyring.c
g10/mainproc.c
g10/packet.h
g10/parse-packet.c